Nevcairiel / LAVFilters

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

Best audio stream selection / first stream selection - incorrect behaviour #464

Closed Stan-Dm closed 2 years ago

Stan-Dm commented 2 years ago

Issue 1: According to https://1f0.de/lav-splitter/lav-splitter-stream-selection/ "In case multiple streams match your preferred language, the best stream is decided on the quality. The first criteria is how many channels the stream has, the second is based on the codec used. Lossless streams are rated higher then lossy compressions."

Issue 1 Example: when playing an MKV file that contains a 7.1ch TrueHD track (first stream, not set as default), and a 5.1ch AC3 track (second stream, with the default flag set), LAV Splitter will select the stream with fewer channels and a lossy compression, instead of the stream with more channels and lossless compression. Therefore, the best stream is NOT decided on the quality, contrary to that website description.

Issue 2: Inside the LAV Splitter options, under Demuxer Settings, the description for option "Prefer Audio Stream with the Highest Quality" states "Controls if the stream with the highest quality (matching your language preferences) should always be used. If disabled, the first stream is always used.

Issue 2 Example: When the above Demuxer Setting checkbox is unchecked, the behaviour described in the tooltip says that it will select the first stream (Audio 1 per MediaInfo) . However, unchecking this box still results in the second stream (Audio 2 in MediaInfo) being played by default, even though the stream is second on the tracklist (and also has fewer channels and worse compression).

Can LAV Splitter be improved such that the behaviour matches the descriptions of those 2 sections above? If not, can a new setting be added in order to make those 2 descriptions truthful in all circumstances?

The end result I am seeking is that anytime I open any video file (MKV or anything else) processed by LAV Splitter, I want the highest quality audio stream selected (matching the preferred language), regardless of the default flag or any other hidden rules/specifications.

Thank you!

Windows 7/10/11 x64 MPC-HC versions 1.9.10.86 through 1.9.18.35 LAV Filters versions 0.75-2-gddef5 through 0.75.1-28-g56705

Nevcairiel commented 2 years ago

Container-specific rules override anything else, and the MKV specification is pretty clear how "Default" is supposed to be handled. There are no plans to diverge from that.