Comment by drdexebtjl

10 hours ago

I had this problem, but I fixed it by setting it up so it extracts all embedded subtitles into SRT files, and enabled a setting prevents Jellyfin from serving embedded subtitles.

From what I remember, some clients don't support streaming subtitles, so they must download them completely in advance, when the movie starts, before they start appearing. If you pick embedded subtitles with these clients, Jellyfin must extract the subtitles files immediately, and this takes a while depending on container format, file sizes and server load. External subtitles are faster.

Could you elaborate on how you set it up to extract the embedded subtitles?

  • I think you don't want to do the "extract embedded subtitles" method, it's slow as hell and downloading external subtitles is much faster than the built-in extract, at least for HDR+4K mkv video which is what we end up with the most. Can take up to a minute for a 40 minute episode to extract the subtitles, which means you'll need to pause for a minute before you can watch with subtitles, with a 5950X CPU.

    • > which means you'll need to pause for a minute before you can watch with subtitles

      The entire point is that it will extract the embedded subtitles ahead of time (when the media is added to the library) so Jellyfin doesn’t have to do it when you want to watch it.

      2 replies →

  • There's an official plug-in in Jellyfin called "Subtitle Extract" that does it automatically for you.

    I personally use Bazarr instead, because I also want to download subtitles for different languages. In Bazarr, Embedded Subtitles is just another subtitle provider that can fetch subtitles depending on your rules.

> If you pick embedded subtitles with these clients, Jellyfin must extract the subtitles files immediately, and this takes a while depending on container format, file sizes and server load.

Really? How?

My expectation would be that extracting a subtitle file takes a few seconds at most. If you had to do it on the fly every time you watched anything in your library, it wouldn't matter.

  • I don't undestand how movie containers work, but I ran this on a 70 GB movie file to test:

        ffmpeg -i input.mkv -map 0:s:0 /tmp/subtitles.srt
    

    The movie is 2 hours long, and the expected time to complete is 21 minutes. It seems like it's reading the entire file. This is on an average SATA SSD that is also being read/written to by the torrent client in the background.

  • IIRC, in many containers embedded subtitles will be interleaved with the video and audio atoms/boxes/packets/etc., and so pulling out the subtitles requires scanning the full file. Not quite as expensive as decoding or re-encoding, but still as slow as "stream the full file into memory and demux the streams"