Repository navigation
v0.1.86 — Jellyfin: drop StartTimeTicks universally
Roku reported code=-5 msg="no valid bitrates" Errors seen on all bitrates: last_err: 400 when trying to resume a Jellyfin movie. Probed the segment endpoint directly:
/hls1/main/0.ts?...&StartTimeTicks=2636140000 → HTTP 400 (25 bytes)
/hls1/main/0.ts?... (no StartTimeTicks) → HTTP 200 (2.3 MB)
Jellyfin's segment endpoint can't serve segment 0 of the playlist when StartTimeTicks > 0 — the playlist spans the full source duration but the transcoder is configured to start at the seek point, so fragment indices and source positions don't line up. Roku's stricter HLS decoder dies on this immediately; web's hls.js tolerated it on swaps but hit it in narrower cases (the image-sub workaround we already had).
Fix
Extend the existing StartTimeTicks-drop trigger to fire on any Jellyfin seek:
const isJellyfinSeek = opts.source === 'jellyfin' && startTicks > 0;
const shouldDropStartTicks =
sourceHasImageSubs || isImageBasedSub || isEmbySubBurn || isJellyfinSeek;The transcoder runs from t=0, the playlist matches that, and the client seeks the video element locally via clientSeekMs. Web / mobile / Roku all already honour clientSeekMs.
Trade-off: ffmpeg has to wind forward to the seek point before the first segment is ready, so startup is a couple seconds slower on deep resumes. Acceptable vs. "playback fails entirely on Roku."