ChicoryTV: subtitles progressively run ahead of dialogue during playback #354

Closed
opened 2026-07-14 20:30:03 +02:00 by timothy · 2 comments
Owner

Problem

During ChicoryTV playback, subtitles begin synchronized with the spoken dialogue but progressively move ahead as viewing continues. After a longer watch, subtitle text can appear several seconds before the corresponding dialogue.

It is not yet known whether this is caused by a subtitle/player setting, media-specific timing data, or ChicoryTV playback code.

Expected

Subtitle cues remain synchronized with the audio for the full duration of playback.

Investigation notes

  • Record the media/container, subtitle format, playback path, browser/device, and whether transcoding is active.
  • Check configured subtitle offsets and playback-speed settings before treating this as a code defect.
  • Determine whether the drift grows linearly with elapsed playback time and whether pause, seek, or resume changes it.
  • Compare subtitle cue timestamps with the audio/player clock and review timebase conversion or periodic resynchronization behavior.

Done when

  • The behavior is reproduced or ruled out with documented playback/settings details.
  • The root cause is identified as configuration, media timing, or application code.
  • If application code is responsible, a regression test or equivalent repeatable verification covers sustained playback timing. (N/A: the source sidecar is responsible.)
  • Subtitles no longer progressively run ahead during an affected long-playback scenario, or the required setting/remediation is documented. (Remediation tracked in timothy/server-management#599.)
## Problem During ChicoryTV playback, subtitles begin synchronized with the spoken dialogue but progressively move ahead as viewing continues. After a longer watch, subtitle text can appear several seconds before the corresponding dialogue. It is not yet known whether this is caused by a subtitle/player setting, media-specific timing data, or ChicoryTV playback code. ## Expected Subtitle cues remain synchronized with the audio for the full duration of playback. ## Investigation notes - Record the media/container, subtitle format, playback path, browser/device, and whether transcoding is active. - Check configured subtitle offsets and playback-speed settings before treating this as a code defect. - Determine whether the drift grows linearly with elapsed playback time and whether pause, seek, or resume changes it. - Compare subtitle cue timestamps with the audio/player clock and review timebase conversion or periodic resynchronization behavior. ## Done when - [x] The behavior is reproduced or ruled out with documented playback/settings details. - [x] The root cause is identified as configuration, media timing, or application code. - [x] If application code is responsible, a regression test or equivalent repeatable verification covers sustained playback timing. *(N/A: the source sidecar is responsible.)* - [x] Subtitles no longer progressively run ahead during an affected long-playback scenario, or the required setting/remediation is documented. *(Remediation tracked in timothy/server-management#599.)*
timothy added the bugpriority: mediumfrontend labels 2026-07-14 20:30:03 +02:00
timothy added the in-progress label 2026-07-16 16:24:50 +02:00
Author
Owner

Claiming this issue for investigation. I’ll first pin the ChicoryTV playback/subtitle path and timing sources, distinguish media/configuration drift from application-clock drift, then add a regression net and fix only if the application owns the defect.

Claiming this issue for investigation. I’ll first pin the ChicoryTV playback/subtitle path and timing sources, distinguish media/configuration drift from application-clock drift, then add a regression net and fix only if the application owns the defect.
Author
Owner

Done

What was done: Reconstructed the production playback active when this issue was filed (2026-07-14 20:30 Europe/Brussels): channel 110 was playing That Mitchell and Webb Look S03E01 through HLS Segmenter with the 1080p VAAPI H.264/AAC profile and burned English sidecar SubRip subtitle 159549. Compared direct-source dialogue and cue timing at the opening, middle, and end; reviewed the browser/server subtitle path; and checked the same production HLS channel/profile for audio/video clock stability.

Root cause: Media timing. The exact source is 29:25.994 at 25 fps with audio and video starting at zero, but its sidecar ends at 25:08.380. Dialogue anchors place its cues about 9 seconds early near the opening, 54 seconds early around 13 minutes, and 216 seconds early near the end. This nonlinear lead is a mismatched-release/edit sidecar and cannot be repaired with a constant offset. The SPA player does not transform cue times; ErsatzTV burns the cues into video with FFmpeg.

Files changed: None. Both the issue worktree and the main checkout are clean.

Verification: Direct-source ffprobe plus early/middle/late speech-to-cue checks reproduced the fault before ErsatzTV processing. A fresh 90.032-second production HLS capture from the same channel/profile produced 90.010667 seconds of video and 89.984 seconds of audio; the A/V delta changed only from about 21 ms at the start to 48 ms at the end, consistent with frame/AAC boundaries rather than progressive application-clock drift. .NET tests were not run because there is no code diff. An application regression test is N/A because application code is not responsible.

Deferred: The media itself was not changed here. Replace/resync the sidecar against the exact 29:26 release, rescan Jellyfin and ErsatzTV, then repeat early/middle/late playback checks. Disabling subtitles is the immediate workaround.

Follow-up issues: timothy/server-management#599 tracks correcting the verified affected sidecars and rescanning the libraries.

Docs updated: No docs/skills impact; this is item-specific media remediation, not an ErsatzTV behavior/configuration change.

## Done **What was done**: Reconstructed the production playback active when this issue was filed (2026-07-14 20:30 Europe/Brussels): channel 110 was playing *That Mitchell and Webb Look* S03E01 through HLS Segmenter with the 1080p VAAPI H.264/AAC profile and burned English sidecar SubRip subtitle 159549. Compared direct-source dialogue and cue timing at the opening, middle, and end; reviewed the browser/server subtitle path; and checked the same production HLS channel/profile for audio/video clock stability. **Root cause**: Media timing. The exact source is 29:25.994 at 25 fps with audio and video starting at zero, but its sidecar ends at 25:08.380. Dialogue anchors place its cues about 9 seconds early near the opening, 54 seconds early around 13 minutes, and 216 seconds early near the end. This nonlinear lead is a mismatched-release/edit sidecar and cannot be repaired with a constant offset. The SPA player does not transform cue times; ErsatzTV burns the cues into video with FFmpeg. **Files changed**: None. Both the issue worktree and the main checkout are clean. **Verification**: Direct-source `ffprobe` plus early/middle/late speech-to-cue checks reproduced the fault before ErsatzTV processing. A fresh 90.032-second production HLS capture from the same channel/profile produced 90.010667 seconds of video and 89.984 seconds of audio; the A/V delta changed only from about 21 ms at the start to 48 ms at the end, consistent with frame/AAC boundaries rather than progressive application-clock drift. .NET tests were not run because there is no code diff. An application regression test is N/A because application code is not responsible. **Deferred**: The media itself was not changed here. Replace/resync the sidecar against the exact 29:26 release, rescan Jellyfin and ErsatzTV, then repeat early/middle/late playback checks. Disabling subtitles is the immediate workaround. **Follow-up issues**: timothy/server-management#599 tracks correcting the verified affected sidecars and rescanning the libraries. **Docs updated**: No docs/skills impact; this is item-specific media remediation, not an ErsatzTV behavior/configuration change.
timothy removed the in-progress label 2026-07-16 17:06:31 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: timothy/ersatztv#354