A channel notices and acts on what its viewer gets: stalls in the served playlist, not only the source's downloads #57
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#57
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 player froze 18 times in five minutes, for 6–18 s each, and finally quit. Throughout, the Admin card said Healthy · Nothing to do and the trouble count showed 0 stalls. Every remedy the channel has (recovery, the standby, the filler card, the buffer) was in place, and none of them acted until 18:53. When one finally did, Emby crashed. Times are local (UTC−4).
Error reinitializing filters!, #39), and the Shield left the stream.Tonight's cause was the channel's own downloads (#56): the source kept time. This issue is about why the channel could not see that and act on it.
Why nothing acted
Every trigger judges the source as the downloader (the puller) sees it, and none of them judges what the viewer gets.
classifyruns only intick(), after_pull_once()returns._pull_once()returns only after the last segment of its round has landed, andsegment_in()has just reset the clock.supervise(), which classifies on its own, is called only from the tests. The tests check the rules, not when production runs them._maybe_fillholds filler back while any appended segment is still being fetched.clock: seq N splicesline.trouble.stall()is called only when a recovery starts, so the card showed 0 stalls.Proposed change
Done when
These run through the real loops (
_runand_playout), not onlysupervise():_pull_oncethat blocks for 15 s on one download gets filler listed within one target duration plus a second, a stall counted, and a card that does not say Healthy.Related: #56 (tonight's cause), #39 (a splice keeps the stream's shape), #50 (filler before the player runs dry), #53 (the buffer), #40 (health notices dropped frames).
Closing: deployed 2026-10-31 (PR #60 and #61).
What changed:
Seen live: on Kent State vs. Sacramento State the card read Healthy and Nothing to do while the viewer was served at 1.0× real time with a full buffer. One stream played for about 4.5 min without a swap.
Found on the first live run and fixed in #61: the lag rule ("three behind the source") fired on one-second bursts while the viewer was fine, and with a standby ready the channel swapped about once a minute. Now the lag alone degrades nothing and stays on the card as a chip. Falling behind means game skipped, and Stalling means dry spells or under 0.9× real time.
Not seen live yet: a real stall; none happened during the runs. The tests cover it through the real loops: on virtual time, a 25 s download gets filler within a target duration and a stall counted, and two dry spells in two minutes make the stream Stalling.
First real stall seen live, 2026-10-31 17:47 UTC (a test tune of Spurs vs. C Palace on develop
1938e97).The channel ran dry once: 4 s of filler, served at 0.8× real time. The card read Stalling and "Let it work", and the channel swapped to its ready standby, iohit.st, within 3 s. It was Healthy at 1.0× real time with a 12 s buffer for the next four minutes.