[gst-devel] audioconvert from channels=6 to channels=2

Sebastian Dröge sebastian.droege at collabora.co.uk
Thu Dec 3 10:55:03 CET 2009


Am Donnerstag, den 03.12.2009, 10:05 +0100 schrieb Vincent Génieux:
> I all,
> 
> 
> I would like to select the 2 first channels of an audio signal.
> I tried the following pipeline but it does not work :
> 
> gst-launch mysrc ! 'audio/x-raw-int,endianness=1234,
> signed=true,width=32,depth=24,rate=48000,channels=6' ! audioconvert !
> 'audio/x-raw-int,endiannes=1234,
> signed=true,width=16,depth=16,rate=48000,channels=2' ! filesink
> location=out.raw
> 
> When I run this pipeline, I get the a warning message :
> "Failed to retrieve channel layout from caps."
> 
> I suppose I should add the "channel-positions" property but I do not
> know how to specify it on command line.

Unfortunately it's not possible to set the channel positions on the
command line with gst-launch. You have to write code for this :/

But the above pipeline doesn't do what you want anyway, it will mix the
6 channels to 2 channels. What you wanted is something like:

...channels=6" ! deinterleave name=d    d.src0 ! queue ! i.sink0
d.src1 ! queue ! i.sink1  interleave name=i ! filesink ...

This will select the first two channels of the input without mixing them
all.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091203/fbc75868/attachment.pgp>


More information about the gstreamer-devel mailing list