mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[Issue]: ASS subtitles embedded in MKV files sometimes don't display (due to ffmpeg bug) #4643
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?
Originally created by @timangus on GitHub (Feb 18, 2023).
Please describe your bug
Jellyfin uses ffmpeg to extract embedded subtitles from their containers. In the case of ASS/SSA encoded subtitles in an MKV container, this results in a corrupt subtitle file that has a null character in its output, before the [Events] section of the file. (Presumably) Jellyfin interprets this null as the end of the string and ignores the rest of the file and thus the subtitles themselves, so they're never displayed. In any case, with the ffmpeg patch below applied, everything works fine.
I've tracked this down to be files that are encoded using Handbrake, which is a large fraction of files in my n=1 survey. It's arguable whether Handbrake is at fault here, but nevertheless the way ffmpeg deals with the problem is not great, so I've submitted a patch to the ffmpeg list, but despite my prompting (on the list itself and IRC) it does not seem to be of interest to the developers. I don't know the situation with Jellyfin and whether its included ffmpeg has patches applied, but if it does that is a potential route to getting this fixed in Jellyfin at least.
The patch is here: http://ffmpeg.org/pipermail/ffmpeg-devel/2023-January/306017.html
I've also entered a bug in ffmpeg trac here: https://trac.ffmpeg.org/ticket/10203 (I believe you can vote on bugs ;) )
Jellyfin Version
10.8.0
if other:
No response
Environment
Jellyfin logs
No response
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@Snipy2k4 commented on GitHub (Feb 18, 2023):
I also noticed that films with ASS/SSA subtitles created with Handbrake have problems.
A workaround is to extract the subs with MKVToolNix GUI and gMKVExtractGUI and implement them again. Then it also works with Jellyfin as usual.
That's how I currently solved it for myself.
It was a bit of work but oh well...
@nyanmisaka commented on GitHub (Feb 18, 2023):
I can reproduce the issue. The patch will be included in our next
jellyfin-ffmpegrelease.Thanks for your contribution! This may take longer to be noticed by upstream.
@Snipy2k4 commented on GitHub (Feb 18, 2023):
I have now extracted most of the files that had ASS/SSA subtitles as described above and re-entered them. (with MKVToolNix GUI and gMKVExtractGUI)
This is how it currently works with Jellyfin.
When the patch comes, will my actions have a negative impact on functionality? That was 2 weeks of work to do with every series and every film...
@timangus commented on GitHub (Feb 18, 2023):
Nah, shouldn't make any difference; basically it now treats "ABCDEF...\0" as if the \0 wasn't there, so if your string is already "ABCDEF..." it won't do anything.
@timangus commented on GitHub (Apr 10, 2023):
FYI, this now appears to have been addressed upstream:
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=5f92a192315fc9349e7c9bdc923666f79d5c5e8d
@nyanmisaka commented on GitHub (Apr 10, 2023):
Great! Then we don't need to patch the ffmpeg in the future release.
@Snipy2k4 commented on GitHub (Apr 10, 2023):
I don't understand that, who fixes it then?!
@Aghast-Buddhist commented on GitHub (Oct 2, 2023):
Hello,
I am affected by this issue.
Is there a fix or a workaround?
Thank you