AAC encoding downmixes surround to mono
I found an issue where audioconvert
element is preferring 1 channel over the original multichannel during negotiation, presumably if the channel-mask layout doesn't match exactly. This happens when trying to convert from ac3 to aac.
It's easily reproducible with this minimal test pipeline:
gst-launch-1.0 audiotestsrc num-buffers=1 ! audio/x-raw, channels=6 ! avenc_ac3 ! avdec_ac3 ! audioconvert ! faac ! fakesink -v
it happens without re-encoding too, when channel-mask
is explicitely specified, and also with fdkaacenc
:
gst-launch-1.0 audiotestsrc num-buffers=1 ! audio/x-raw, channels=6, channel-mask=\(bitmask\)0x0000000000000c0f ! audioconvert ! fdkaacenc ! fakesink -v