A splice keeps the stream's shape, so a media server keeps playing through filler and swaps #39
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#39
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?
Why
On 2026-10-29 Emby's player hung on "Stream interrupted - reconnecting" after the channel moved from filler to the real stream. Sports Breaker kept serving the stream, but Emby never recovered until the viewer re-tuned.
What we found (2026-10-29)
backend/app/assets/filler.ts) is 1280×720 at 25 fps (H.264 Main, level 5.0) with AAC 48 kHz stereo.VideoBitrate=3808002). It chose to transcode, withh264_qsv.Impossible to convert between the formats supported by the filter 'scaler_out_0_0' and the filter 'auto_scale_0',Error reinitializing filters!,Conversion failed!.copy), and it played.Non-monotonous DTS in output stream 0:1(audio) messages around that splice and the earlier one at 21:00:44, and none in between.What Changes
Pick one way to keep what the media server sees steady across a splice:
Done when a tune that shows filler, and a swap between links of different shapes, both keep Emby playing without a re-tune, including when Emby transcodes.
The same splice also slows the audio down (2026-10-29, 21:30 UTC)
The viewer heard the commentary slowed down and low-pitched, about half an hour after re-tuning.
-c:a copy). Its session still reportsaac 32000 1for the channel's audio, and that same ffmpeg was still running at 21:30 (output segment 592).Non-monotonous DTS in output stream 0:1continuously.So this issue covers the audio as well as the video. Re-encoding the audio to one fixed format (for example AAC 48 kHz stereo) on every segment would prevent this for any swap or recovery, and it's cheap. The video side still needs a choice: matching filler, as in #41, or preferring a standby of the same shape.
Decided 2026-10-29 for the batch: fixed audio plus matching filler.
Decided 2026-10-30 for the Steady streaming batch: re-encode to match.
Why it's needed: on 2026-10-30 at 18:53 a degrading swap on Wizards vs. Hornets went from 1152×648 at 59.94 fps to 1280×720 at 30 fps. Emby's VAAPI→QSV transcode died at that splice (
Error reinitializing filters!), and the Shield left the stream. The fixed audio and the matching filler card held; the change of video shape did not. A remote viewer always transcodes (ContainerBitrateExceedsLimit), and the Shield falls back to transcoding after any stall, so every swap to another shape can end a session.Closing: deployed 2026-10-31 (PR #60). The channel keeps one video shape, the first stream's, and re-encodes any stream of another shape to it.
Seen live on Lakers vs. Warriors:
A same-shape swap is copied: on Kent State vs. Sacramento State, s2watch.cyou into a 1280×720, 59.94 channel needed no re-encode.
Not tested live: an Emby transcode across such a swap, since no one was transcoding during the run. Emby now sees one shape throughout. Reopen if a transcoding session still breaks at a swap.
Known limit: a cold tune of a game with no verified measurement draws its first filler card at the default 1280×720, 30 fps, before the first stream lands. Emby's lineup lists only Ready games, which carry a measurement.
Seen live on a real Emby player, 2026-10-31. Chelsea vs. Man Utd, played from Emby for Android on the living-room Shield (direct play, so no Emby transcode).
The channel's shape came from iohit.st: 720×576 at 25 fps.
The card's record: no stalls, no dry spells, no filler, no game skipped, no failed re-encodes. Served at 0.93–1.23× real time.
The Shield: it played directly throughout and never froze or left the stream. The viewer saw only a few small skips, which fits the splices: the two sites are seconds apart in the game. shd247.world's own dropped frames also show.
Still not seen: an Emby transcode across a swap.