3 ms·
> If you pick embedded subtitles with these clients, Jellyfin must extract the subtitles files immediately, and this takes a while depending on container format
by thaumasiotes 1mo ago
> 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.
- drdexebtjl 1mo agoI 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.
- thaumasiotes 1mo agoAny chance you're doing a reencode to SRT? I don't see `-c copy`. If I extract SRT subtitles from a 47 minute video, it takes about one second, so your two-hour duration isn't what's causing you to wait. You might be decoding two hours of extremely high-resolution pixels, but there's no actual need to do that either.
- drdexebtjl 1mo agoNo, the subtitles are already in SRT. No video decoding is happening. ffmpeg was using 2% CPU and 0% GPU. The bottleneck is IO. ffmpeg must read the entire file, parse the container format and collect the subtitles. If the SSD was completely idle and could reach it's max rated read speed of 550 MB/s, assuming absolutely no overhead, ffmpeg would finish in just over 2 minutes (70000 MB / 550 MB/s / 60 s/min = 2.12 min). So, in the best case scenario, I'll be stuck waiting for 2 minutes for the subtitles to appear, if the client doesn't time out. Real-world speeds are 10x slower, as we've seen, but they're more than 10x faster than 4K Blu-ray bitrates, so they're sufficient. How large is your 47 minute video? If it's ~8 GB, which is typically on the high end for episodes from streaming services, and if you have an PCIe 3.0 NVMe SSD, which reads at ~6 GB/s, you'll extract subtitles in about 1 second.
- thunderfork 1mo agoIIRC, 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"
- axionbraid 1mo ago[flagged]
- tyffanypastecf 1mo ago[dead]