Nevcairiel / LAVFilters

LAV Filters - Open-Source DirectShow Media Splitter and Decoders
GNU General Public License v2.0
7.23k stars 786 forks source link

Only generate forced subtitles stream from stream with forced subtitles #522

Closed Volbla closed 1 year ago

Volbla commented 1 year ago

When i watch bluray .m2ts or .mpls files, the autogenerated forced sub stream is always empty. This seems to be because oftentimes the first stream is for viewers with hearing disabilities, and only the second stream is for normal speech.

BD often contains lots of English subtitle tracks. First one is usually normal subs. If there are 2 English subtitles at the beginning - one of them will be normal the other one will be SDH (first one is often SDH). To make matters worst, SDH never contains forced flags and it is often the first English sub listed.

I checked this by remuxing a video with only the second sub stream. For that the generated stream worked. My only other option during regular viewing is to manually select the second stream for each file, and enable the "deliver only forced subtitles" option.

Would it be possible to scan through all streams of a given language, and choose the one that contains forced subtitles (if any) to generate the new stream from? I haven't been able to find any workaround for this on my own.

Nevcairiel commented 1 year ago

No, scanning the entire stream for presence of forced subtitles is not possible, it would take way too long. This would have to be done in an offline analysis process, not in LAV.