[gst-devel] problem with 8 channel interleaved audio over rtp

Michael Smith msmith at xiph.org
Tue Jun 10 01:19:10 CEST 2008


On Mon, Jun 9, 2008 at 10:01 AM, Tristan Matthews <tristan at sat.qc.ca> 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




More information about the gstreamer-devel mailing list