Arbitrary channel count with rtpl16depay

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

Arbitrary channel count with rtpl16depay

James Cowdery
I'm receiving an arbitrary number of audio channels over RTP and then using
audioconvert to mix down to stereo for playout.
For a channel count of 9, rtpl16depay can't match one of the predefined
layouts (stereo, 5.1 etc.) so it reports "Unknown channel order '(NULL)' for
9 channels"
This then causes "WARNING **: Unpositioned audio channel position flag not
set but no channel positions present". The pipeline works but I'd like to
suppress the warnings. I'm using Python bindings (PyGObject) and argv at
Gst.Init doesn't seem to be parsed so can't get rid of them with --quiet.

The layouts are hard-coded in. I'm guessing there must be an easy workaround
but I've struggled to find it. I need a general solution that works for any
number of input channels. Here is the pipeline:

udpsrc address=239.150.138.1 port=5004 buffer-size=1000000
caps="application/x-rtp, media=(string)audio, clock-rate=(int)48000,
channels = 9, encoding-name=(string)L16" ! rtpL16depay ! audioconvert
mix-matrix="<<(float)1.0, (float)0.0, (float)1.0, (float)0.0, (float)1.0,
(float)0.0, (float)1.0, (float)0.0, (float)0.0>, <(float)0.0, (float)1.0,
(float)1.0, (float)0.0, (float)0.0, (float)1.0, (float)1.0, (float)0.0,
(float)0.0>>" ! playsink volume = 5 channels = 2

Thanks, James



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Arbitrary channel count with rtpl16depay

Tim Müller
On Fri, 2020-01-10 at 19:18 -0600, James Cowdery wrote:

Hi James,

> I'm receiving an arbitrary number of audio channels over RTP and then
> using audioconvert to mix down to stereo for playout.
> For a channel count of 9, rtpl16depay can't match one of the
> predefined layouts (steeo, 5.1 etc.) so it reports "Unknown channel
> order '(NULL)' for 9 channels" This then causes "WARNING **:
> Unpositioned audio channel position flag not set but no channel
> positions present". The pipeline works but I'd like to suppress the
> warnings. I'm using Python bindings (PyGObject) and argv at Gst.Init
> doesn't seem to be parsed so can't get rid of them with --quiet.
>
> The layouts are hard-coded in. I'm guessing there must be an easy
> workaround but I've struggled to find it. I need a general solution
> that works for any number of input channels. Here is the pipeline:
> (snip)

Would it be enough / help in your case if rtpL16depay set the channel
positions to NONE (unpositioned)?

Cheers
 Tim


--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Arbitrary channel count with rtpl16depay

James Cowdery
This post was updated on .
Tim,
Thanks for the reply.
If setting the positions to None will allow the pipeline to ignore the
issue of channel positions altogether and suppress the warnings, then that is
what I want. The audioconvert plugin will always output only two channels
allowing the downstream player to assume a stereo layout.

I did try specifying all the channels as unpositioned in the caps but this
didn't help.
For Example: channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_NONE, GST_AUDIO_CHANNEL_POSITION_NONE, ...

The received audio tracks could be audio objects which have arbitrary X,Y,Z
positions in space and so can't be described with a conventional channel
position such as Left, Right, Center etc.
As formats such as HOA and object audio become more mainstream I think this
use-case will become more common.
Thanks, James



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Arbitrary channel count with rtpl16depay

Tim Müller
On Sat, 2020-01-11 at 10:57 -0600, James Cowdery wrote:

Hi James,

> Yes. If setting the positions to None will allow the pipeline to
> ignore the issue of channel positions altogether and suppress the
> warnings, that is what I want. The audioconvert plugin will always
> output only two channels allowing the downstream player to assume a
> stereo layout.
>
> I did try specifying all the channels as unpositioned in the caps but
> this didn't help.
> For Example: channel-positions=(GstAudioChannelPosition)<
> GST_AUDIO_CHANNEL_POSITION_NONE, GST_AUDIO_CHANNEL_POSITION_NONE, ...
>
> The received audio tracks could be audio objects which has arbitrary
> X,Y,Z positions in space and so can't be described with a
> conventional channel position such as Left, Right, Center etc.
> As formats such as HOA and object audio become more mainstream I
> think this use-case will become more common.

Is there already an issue in gitlab for this?

If not, could you file one and attach a wireshark dump or the output of

  ... ! gdppay ! filesink location=rtpL16-9channels.gdp

to the issue? (where gdppay ! ... is in place of rtpL16depay).

https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/new

Thanks!

Cheers
 Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Arbitrary channel count with rtpl16depay

James Cowdery
I have not checked GitLab. I assumed I was doing something stupid as a noob
as there was an easy workaround.
I will file an issue as you suggest. I'd still be interested in any
workaround or hack.
Thanks,
James




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel