View Single Post
Old 5th October 2020, 20:50   #3348  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
Quote:
I cannot think of an automatic and foolproof way to fix this. It is the "culture clash" between enumerating audio track based or stream based.
Maybe there is a way to determine if a track contains more than one audio stream by parsing the MediaInfo output. For a typical audio track with ATMOS/TrueHD plus an AC3 substream Mediainfo reports this:
Format profile : TrueHD+Atmos / TrueHD / AC-3
Channel(s) : Object Based / 8 channels / 6 channels


Both keys could be used IMO. An entry with "Atmos" or "Object Based" needs to be ignored, and if there are more than one entries left you will know that there is one or more additional substreams in this track. In the above example there is one substream, this means that 1 has to be added to the track number of the second and higher audio tracks for FFMS2 to work correctly.

For all the 8-ch clips I tested only the first audio track ever contained more than one stream, so it would not be hard to implement this. Of course I have no idea if higher audio tracks can also have more than one stream. If yes this would complicate the math to pass the correct track number to FFMS2.

Just an idea...

Cheers
manolito
manolito is offline   Reply With Quote