audioconvert from channels=6 to channels=2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

audioconvert from channels=6 to channels=2

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.

anybody help ?


--
Vincent GENIEUX
R&D Engineer
ENENSYS Technologies
Le Germanium
80 avenue des Buttes de Coësmes
35700 Rennes - FRANCE


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: audioconvert from channels=6 to channels=2

Sebastian Dröge-7
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.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: audioconvert from channels=6 to channels=2

Tim-Philipp Müller-2
In reply to this post by Vincent Génieux
On Thu, 2009-12-03 at 10:05 +0100, Vincent Génieux wrote:

> 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.

That's not possible with gst-launch, because when it parses those filter
caps strings the channel position enum types won't be registered with
the type system yet. It is possible in code though if you
g_type_class_ref() the type yourself before you call gst_parse_launch(),
or instantiate some element that does this for you, like audioconvert.

Btw, in the second filter caps that should be 'endianness' (two s).

But even if you made it work, this would downmix the 6 channels into
stereo, not select the first two channels.

You could try a combination of the interleave/deinterleave elements.

Cheers
 -Tim



------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: audioconvert from channels=6 to channels=2

Vincent Génieux

> That's not possible with gst-launch, because when it parses those filter
> caps strings the channel position enum types won't be registered with
> the type system yet. It is possible in code though if you
> g_type_class_ref() the type yourself before you call gst_parse_launch(),
> or instantiate some element that does this for you, like audioconvert.
>
> Btw, in the second filter caps that should be 'endianness' (two s).
>
> But even if you made it work, this would downmix the 6 channels into
> stereo, not select the first two channels.
>
> You could try a combination of the interleave/deinterleave elements.
>
>  

ok, thanks all for your answers.

--
Vincent GENIEUX
R&D Engineer
ENENSYS Technologies
Le Germanium
80 avenue des Buttes de Coësmes
35700 Rennes - FRANCE


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel