Skip to content

v0.1.68 — Jellyfin: client-side seek for image-sub files

Choose a tag to compare

@NebulaSleuth NebulaSleuth released this 24 May 01:46
· 192 commits to main since this release

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

  1. Backend detects image-sub streams in MediaStreams and drops StartTimeTicks for any swap or resume on those files.
  2. New clientSeekMs field in the PlaybackInfo response: backend tells the client "stream starts at 0, seek the video element to N ms after load."
  3. Web VideoPlayer.tsx honours clientSeekMs — seeks the video element to that offset (overrides the no-seek-on-swap rule) and keeps baseSecondsRef=0 so 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 .dbg logs will show streamUrl source: server.TranscodingUrl (StartTimeTicks dropped — source has image subs; clientSeekMs=N) on these flows.