problem with 8 channel interleaved audio over rtp

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

problem with 8 channel interleaved audio over rtp

Tristan Matthews-2
Hi,

I'm trying to send 8 channel interleaved audio, encoded with vorbis,
over rtp. Note that I don't care about preserving channel positions. I
have it working for stereo, like so:

gst-launch-0.10 -v interleave name=i ! vorbisenc ! rtpvorbispay !
udpsink host=localhost port=5060 \
audiotestsrc volume=0.5 freq=200 is-live=false ! audioconvert ! queue ! i. \
audiotestsrc volume=0.5 freq=400 is-live=false ! audioconvert ! queue ! i.

Any ideas on what's missing to get the following to work?

gst-launch-0.10 -v interleave name=i ! vorbisenc ! rtpvorbispay !
udpsink host=localhost port=5060 \
audiotestsrc volume=0.5 freq=200 is-live=false ! audioconvert ! queue ! i. \
audiotestsrc volume=0.5 freq=300 is-live=false ! audioconvert ! queue ! i. \
audiotestsrc volume=0.1 freq=400 is-live=false ! audioconvert ! queue ! i. \
audiotestsrc volume=0.1 freq=500 is-live=false ! audioconvert ! queue ! i. \
audiotestsrc volume=0.1 freq=600 is-live=false ! audioconvert ! queue ! i. \
audiotestsrc volume=0.1 freq=700 is-live=false ! audioconvert ! queue ! i. \
audiotestsrc volume=0.1 freq=800 is-live=false ! audioconvert ! queue ! i. \
audiotestsrc volume=0.1 freq=900 is-live=false !  audioconvert ! queue ! i.

It fails with:
ERROR: from element /pipeline0/audiotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2240): gst_base_src_loop (): /pipeline0/audiotestsrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...

It seems to be a caps negotiation issue, I've tried with and without
setting the caps with channel positions (i.e.  
"audio/x-raw-int,channel-position=(GstAudioChannelPosition)GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT")
to no avail.

Regards,
Tristan



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem with 8 channel interleaved audio over rtp

michael smith-6-3
On Mon, Jun 9, 2008 at 10:01 AM, Tristan Matthews <[hidden email]> wrote:

> Hi,
>
> I'm trying to send 8 channel interleaved audio, encoded with vorbis,
> over rtp. Note that I don't care about preserving channel positions. I
> have it working for stereo, like so:
>
> gst-launch-0.10 -v interleave name=i ! vorbisenc ! rtpvorbispay !
> udpsink host=localhost port=5060 \
> audiotestsrc volume=0.5 freq=200 is-live=false ! audioconvert ! queue ! i. \
> audiotestsrc volume=0.5 freq=400 is-live=false ! audioconvert ! queue ! i.
>
> Any ideas on what's missing to get the following to work?
>
> gst-launch-0.10 -v interleave name=i ! vorbisenc ! rtpvorbispay !
> udpsink host=localhost port=5060 \
> audiotestsrc volume=0.5 freq=200 is-live=false ! audioconvert ! queue ! i. \
> audiotestsrc volume=0.5 freq=300 is-live=false ! audioconvert ! queue ! i. \
> audiotestsrc volume=0.1 freq=400 is-live=false ! audioconvert ! queue ! i. \
> audiotestsrc volume=0.1 freq=500 is-live=false ! audioconvert ! queue ! i. \
> audiotestsrc volume=0.1 freq=600 is-live=false ! audioconvert ! queue ! i. \
> audiotestsrc volume=0.1 freq=700 is-live=false ! audioconvert ! queue ! i. \
> audiotestsrc volume=0.1 freq=800 is-live=false ! audioconvert ! queue ! i. \
> audiotestsrc volume=0.1 freq=900 is-live=false !  audioconvert ! queue ! i.
>
> It fails with:
> ERROR: from element /pipeline0/audiotestsrc0: Internal data flow error.
> Additional debug info:
> gstbasesrc.c(2240): gst_base_src_loop (): /pipeline0/audiotestsrc0:
> streaming task paused, reason not-negotiated (-4)
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...

This fails because the vorbis encoder won't accept 8-channel audio
unless it has the correct channel positions.

Because none of the inputs here have channel positions, interleave
creates output with all channels set to
GST_AUDIO_CHANNEL_POSITION_NONE - which vorbisenc refuses.

> It seems to be a caps negotiation issue, I've tried with and without
> setting the caps with channel positions (i.e.
> "audio/x-raw-int,channel-position=(GstAudioChannelPosition)GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT")
> to no avail.

This is probably (roughly) the right approach, but there are some
problems. You want float audio (not int) - that's what vorbisenc
requires. You want to set 'channel-positions' (not
'channel-position'). And I'm not sure if you can use channel positions
from gst-launch, you might need to write an actual application.

Mike

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: problem with 8 channel interleaved audio over rtp

Tristan Matthews-2
Hi Mike,

Michael Smith wrote:
> This is probably (roughly) the right approach, but there are some
> problems. You want float audio (not int) - that's what vorbisenc
> requires. You want to set 'channel-positions' (not
> 'channel-position'). And I'm not sure if you can use channel positions
> from gst-launch, you might need to write an actual application.
>  

You're right about the launch line not working for channel-positions,
fortunately this was going into a C app anyway.
I ended up fixing the issue by setting the channel-positions argument of
interleave to the 8 channel layout specified in
gst-plugins-base/ext/vorbis/vorbisenc.c
(other layouts may work as well, I'm not sure), kind of like the 2
channel example from gst-plugins-bad/tests/check/elements/interleave.c
Thanks for your help, and thanks also to slomo for some earlier feedback
on this issue.

-Tristan


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel