mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
noaccurate_seek breaks subtitle synchronisation #7940
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#7940
Loading…
Add table
Add a link
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?
Originally created by @abitofevrything on GitHub (Dec 20, 2025).
Description of the bug
Jellyfin passes
-noaccurate_seekto FFmpeg when transcoding to HLS. This means that when seeking ahead in a video and causing a new transcode to start (which therefore passes the-ssparameter), the HLS segments are not precisely aligned with the video timestamp - the timestamp in the new HLS stream may be a few seconds offset from the timestamp in the original video.For clients that render their own subtitles based on the video timestamp, this means subtitles are offset, and the offset changes whenever a seek occurs.
I can't find the original reason why this parameter was added. It seems that since it has been added there has been one instance of the parameter being required (#7435), but that PR doesn't actually provide details on how to reproduce the issue it is fixing. On the other hand, there have also been bugs that result from this flag being added, including this subtitle bug, which may be the cause of several issues raised on the jellyfin repos (#7338, https://github.com/jellyfin/jellyfin-web/issues/7413, https://github.com/jellyfin/jellyfin-web/issues/6210, https://github.com/jellyfin/jellyfin-web/issues/6210, https://github.com/jellyfin/jellyfin-web/issues/4346, https://github.com/jellyfin/jellyfin/issues/2547).
Is there any reason to keep this flag? I can see why it needs to be kept in the case of #7435, but the check added in that PR seems to be too large and is causing quite a few problems elsewhere. I was going to submit a PR that simply narrows the check to only add
-noaccurate_seekwhen dealing with the issue encountered in that PR, but without repro instructions, I can't.I'd want to remove the flag entirely myself but I don't want to risk breaking jellyfin for others. I have patched my server and the subtitle sync issues I was having on iOS, web, and Android have all disappeared since.
Reproduction steps
What is the current bug behavior?
Subtitles are desynced.
More accurately, the transcoded video is not aligned with the player timestamp, which causes subtitle desync (the transcoded video is the one with the wrong timestamp, not the player).
What is the expected correct behavior?
Subtitles should be synced.
Jellyfin Server version
10.11.5
Specify commit id
No response
Specify unstable release number
No response
Specify version number
No response
Specify the build version
10.11.5
Environment
Jellyfin logs
FFmpeg logs
Client / Browser logs
No response
Relevant screenshots or videos
No response
Additional information
No response
@gnattu commented on GitHub (Dec 21, 2025):
Because without this you break audio/video synchronization in fmp4.
@abitofevrything commented on GitHub (Dec 21, 2025):
That is indeed what the comment in the code says. But like I mentioned, I have been unable to reproduce this problem (I tried Safari and webviews on iOS, as that is where the commit says the issue appeared, but I also haven't seen it on any of the other platforms I tried).
On the other hand, this option is causing issues for many other users - just see the issues I linked above.
So my question is actually why are we keeping an option that fixes an issue nobody is able to reproduce, when that same option is causing known issues elsewhere?
@gnattu commented on GitHub (Dec 21, 2025):
That's not true. A lot of the issues you mentioned is not related to this option. If it was that easy those issues would be fixed long time ago. You can verify this by yourself for ANY cases that transcoding caused de-synced subtitles. The de-synced ones will still be de-synced.
Actually things is a bit different recently as Safari properly implemented non-keyframe seeking but for non-safari web browsers the issue is still there, for fmp4, audio trancoded + video copy, so the "direct stream" case.
In this case, when you are using a browser using hls.js like chrome, and you seeked to a position that is not yet be transcoded, you would see that the video frame jumps back and forth for a few seconds and then return to normal. In worst case the playback might just hang, if the video has high enough bitrate, or running audio totally out of sync after this happened. In case you might find it hard to reproduce, I made an example here:
https://github.com/user-attachments/assets/3530fb11-94d7-497e-932f-3a3a22c6065e