Interleaving into AC3
Tim Müller
tim at centricular.com
Tue Sep 20 10:50:55 UTC 2016
On Thu, 2016-09-15 at 23:48 +0000, John P Poet wrote:
Hi John,
> While working on adding multi-channel audio support to
> gstdecklinkaudiosrc, I tried to come up with a pipeline which throws
> away all but the first six channels, and encodes them into AC3. The
> following pipeline works:
> (snip)
>
> I would like to understand why the `wavenc ! wavparse` is necessary,
> though. Without that extra conversion step, I get (an error).
I haven't tried any of your pipelines, but my guess is that it's got to
do with channel positioning ("channel-mask" field in the raw audio
caps). decklinkaudiosrc probably outputs channel-mask=0 meaning all
channels are unpositioned, but the AC3 encoder likely wants positioned
channels. wavenc ! wavparse might work around this by accident more
than by design by assigning a default channel mask for 6 channels when
none is set in the headers, thus making the encoder happy.
You should be able to achieve the same effect either
- by setting the "channel-positions" property on interleave from code
(this won't work with gst-launch-1.0)
- by setting a channel position (channel-mask in the caps) on each
input channel to the interleave, then it will/should pick up the
positions and interleave them appropriately (hopefully).
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
Join us at the GStreamer Conference!
10-11 October 2016 in Berlin,
Germany
http://gstreamer.freedesktop.org/conference/
More information about the gstreamer-devel
mailing list