A channel keeps pace with a source that limits each connection: segments fetched in parallel, polls on a schedule #56
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
cmoriarty/sports-breaker#56
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened (2026-10-30, Wizards vs. Hornets, Emby on the Shield)
The picture froze again and again from the moment it was tuned, and Emby finally quit. The source was fine: the channel could not download it as fast as it played. Times are local (UTC−4).
hls.lshls.st: 1152×648 at 59.94 fps, 4 s segments of about 0.7 MB, and a playlist window of 10 segments.Error reinitializing filters!, #39), and the Shield left the stream.What we measured
Why
_prefetchdownloads one segment at a time._pull_oncewaits for all of them before the round ends._runadds its sleep on top of the work. It sleeps half a target duration (2 s) after each round, so a round costs sleep + playlist fetch + N downloads. At about 4 s per download, the channel never catches up.append_upstreamclamps its start to the oldest segment still listed, so the segments in between are dropped without any signal. That is the jump at every tenth seq.Proposed change
Done when
Closing: deployed 2026-10-31 at develop
2e1e618(PR #60, then #61 for what the first live run found).Seen live, with a Jellyfin-style ffmpeg reader on each game for 6–7 min: Lakers vs. Warriors, then Kent State vs. Sacramento State.
Found live and fixed in #61:
Tests: a virtual-time replay of the 2026-10-30 source keeps pace with three download slots and falls behind with one (
test_channel_pace.py).