mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #11689] Workaround ffmpeg keyframe seeking for external subtitles #12972
Reference in New Issue
Block a user
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?
Original Pull Request: https://github.com/jellyfin/jellyfin/pull/11689
State: closed
Merged: Yes
We seek to the exact position of the keyframe for direct stream/remuxing, but FFmpeg seeks to the previous keyframe when the exact time is provided as input. To work around this, add a 0.5 second offset to the seeking time so that the correct keyframe is returned for most videos.
This is probably not the most correct way to handle this, but I found that it might be the only way to include this in the 10.9 branch. Other approaches might require either significant changes to the server or an API change.
This does not solve desyncing after transcoding for some video files, but I haven't found a good way to fix those yet due to the complexity of different encoders' outputs. Maybe adding an option to force burn-in subtitles during transcoding could be a good workaround? Currently, client settings enforce burn-in in all situations when set.
Changes
Issues
Fixes #11567
Partially Fixes #2547