Repository navigation
v0.1.68 — Jellyfin: client-side seek for image-sub files
Jellyfin: handle image-subtitle files end-to-end
v0.1.67 only dropped StartTimeTicks when the caller picked an image-based subtitle. The real problem is broader: any file whose MediaStreams contains a PGS/DVB/DVD/VOB/HDMV subtitle stream 400s every segment request when the transcoder is asked to seek — even when subs are off:
Call 1 (no sub, StartTimeTicks=0): worked
Call 2 (PGSSUB picked, ticks=0): worked
Call 3 (no sub, ticks=573s): 400 on every segment
Call 6 (no sub, ticks=10s): 400 on every segment
The Jellyfin/FFmpeg seek pipeline chokes on the PGSSUB streams in the container regardless of whether we burn one.
Fix
- Backend detects image-sub streams in
MediaStreamsand dropsStartTimeTicksfor any swap or resume on those files. - New
clientSeekMsfield in the PlaybackInfo response: backend tells the client "stream starts at 0, seek the video element to N ms after load." - Web
VideoPlayer.tsxhonoursclientSeekMs— seeks the video element to that offset (overrides the no-seek-on-swap rule) and keepsbaseSecondsRef=0so the progress math stays correct (currentTime IS the source position in this mode).
Works for both initial-load resume and mid-stream swaps.
Trade-off
Transcoder runs from t=0 every time on these files, so a swap or resume on a long PGSSUB file has a couple seconds of warmup before the segment containing the seek target is delivered. Acceptable — beats "playback dies entirely."
Test
After auto-update at 192.168.1.181:3001:
- Watch a few minutes of an image-sub file (Addams Family / any BluRay PGSSUB), exit. Re-enter — should resume at the previous position (with the brief warmup).
- Mid-playback change subs / quality — segments should load, playback should pick up at where you were.
- Backend
.dbglogs will showstreamUrl source: server.TranscodingUrl (StartTimeTicks dropped — source has image subs; clientSeekMs=N)on these flows.