View Single Post
Old 8th October 2018, 00:17   #3140  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
Handling of more than 1 audio tracks

Just found another bug when dealing with clips with more than 1 audio tracks:

With the default source configuration (A2DSource) DirectShow will be used for audio. But only for the first audio track, because DirectShowSource does not allow track selection. The second and third audio tracks will use FFmpegSource because it allows track selection.

This works nicely as long as DirectShowSource picks the first audio track of the source clip. But I found that this is not always true. The sample clip from this post
https://forum.doom9.org/showthread.p...24#post1854124
has 3 audio tracks, and the second one is marked as "default". For this clip DirectShowSource will pick the second (default) audio track as the first audio track, and A2D will throw an error because the number of channels is different for the two tracks.

The only workaround I can think of so far is to not use DirectShowSource Audio at all for such sources, force using FFmpegSource instead. This will treat the track numbers correctly, but the "Default" audio track flag will be lost. Does MPEG2 even support this flag at all?


Cheers
manolito
manolito is offline   Reply With Quote