mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #10884] Extract all subtitle streams simultaneously #12649
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/10884
State: closed
Merged: Yes
Changes
Extracting a subtitle stream is a disk I/O bottlenecked operation as
ffmpeghas to read through the whole file, but usually there is nothing CPU intensive to do.If a file has multiple subtitle streams, and we want to extract more of them, extracting them one-by-one results in reading the whole file again and again.
However
ffmpegcan extract multiple streams at once.We can optimize this by extracting the subtitle streams all at once when only one of them gets queried, then we will have all of them cached for later use.
It is useful for people switching subtitles during playback.
It is even more useful for people who extract all the subtitle streams in advance, for example with the "Subtitle Extract" plugin.
In this case we reduce the extraction time significantly based on the number of subtitle streams in the files, which can be 5-10 in many cases.
Jellyfin logs
ffmpeg logs