How to get channel setting /2 into a recvonly webrtcbin transceiver SDP

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

How to get channel setting /2 into a recvonly webrtcbin transceiver SDP

Anthony Alba
Problem: Cannot get SDP line (with the /2 appended)
a=rtpmap:96 OPUS/48000/2
from a audio recvonly transceiver on a webrtcbin

I am trying to setup a recvonly webrtcbin(for audio) and taking
guidance from here:

https://stackoverflow.com/questions/57430215/how-to-use-webrtcbin-create-offer-only-receive-video

When I do:

direction = GstWebRTC.WebRTCRTPTransceiverDirection.RECVONLY
caps = Gst.caps_from_string("application/x-rtp,media=opus,encoding-name=OPUS,channel-rate=48000,channels=2,payload=96")
self.webrtc.emit('add-transceiver', direction, caps)

This mostly works, and the resulting SDP looks like
# notice channels=2 is ignored

a=recvonly
a=rtpmap:96 OPUS/48000

Unfortunately my sender does not like this and wants
a=rtpmap:96 OPUS/48000/2

When I read back the transceiver, the codec_preferences member looks correct:

Transceiver: application/x-rtp, media=(string)audio,
encoding-name=(string)OPUS, clock-rate=(int)48000, channels=(int)2,
payload=(int)96;

What is the correct way to get the channel setting /2 append to the SDP offer?

Mangling the SDP in the application before sending to the peer works,
but I was hoping for a more canonical way to do this. The full
pipeline is eventually

# after pad-added signal
webrtcbin ! decodebin ! queue !  audioconvert ! audioresample ! autoaudiosink

Alternatively, what is the correct way to tell webrtcbin to add a
transceiver that will emit the desired SDP?


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

Re: How to get channel setting /2 into a recvonly webrtcbin transceiver SDP

Matthew Waters
Interesting, looks like a bug :)

https://tools.ietf.org/html/rfc7587#section-7 says the rtpmap 'channels'
must be 2 which GStreamer does not produce.

Could you file an issue on gitlab?

Cheers
-Matt

On 22/7/20 4:56 pm, Anthony Alba wrote:

> Problem: Cannot get SDP line (with the /2 appended)
> a=rtpmap:96 OPUS/48000/2
> from a audio recvonly transceiver on a webrtcbin
>
> I am trying to setup a recvonly webrtcbin(for audio) and taking
> guidance from here:
>
> https://stackoverflow.com/questions/57430215/how-to-use-webrtcbin-create-offer-only-receive-video
>
> When I do:
>
> direction = GstWebRTC.WebRTCRTPTransceiverDirection.RECVONLY
> caps = Gst.caps_from_string("application/x-rtp,media=opus,encoding-name=OPUS,channel-rate=48000,channels=2,payload=96")
> self.webrtc.emit('add-transceiver', direction, caps)
>
> This mostly works, and the resulting SDP looks like
> # notice channels=2 is ignored
>
> a=recvonly
> a=rtpmap:96 OPUS/48000
>
> Unfortunately my sender does not like this and wants
> a=rtpmap:96 OPUS/48000/2
>
> When I read back the transceiver, the codec_preferences member looks correct:
>
> Transceiver: application/x-rtp, media=(string)audio,
> encoding-name=(string)OPUS, clock-rate=(int)48000, channels=(int)2,
> payload=(int)96;
>
> What is the correct way to get the channel setting /2 append to the SDP offer?
>
> Mangling the SDP in the application before sending to the peer works,
> but I was hoping for a more canonical way to do this. The full
> pipeline is eventually
>
> # after pad-added signal
> webrtcbin ! decodebin ! queue !  audioconvert ! audioresample ! autoaudiosink
>
> Alternatively, what is the correct way to tell webrtcbin to add a
> transceiver that will emit the desired SDP?
>
>
> Thanks
> Anthony Alba
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: How to get channel setting /2 into a recvonly webrtcbin transceiver SDP

Anthony Alba
Thank you — filed as
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/591

On Wed, Jul 22, 2020 at 3:24 PM Matthew Waters <[hidden email]> wrote:

>
> Interesting, looks like a bug :)
>
> https://tools.ietf.org/html/rfc7587#section-7 says the rtpmap 'channels'
> must be 2 which GStreamer does not produce.
>
> Could you file an issue on gitlab?
>
> Cheers
> -Matt
>
> On 22/7/20 4:56 pm, Anthony Alba wrote:
> > Problem: Cannot get SDP line (with the /2 appended)
> > a=rtpmap:96 OPUS/48000/2
> > from a audio recvonly transceiver on a webrtcbin
> >
> > I am trying to setup a recvonly webrtcbin(for audio) and taking
> > guidance from here:
> >
> > https://stackoverflow.com/questions/57430215/how-to-use-webrtcbin-create-offer-only-receive-video
> >
> > When I do:
> >
> > direction = GstWebRTC.WebRTCRTPTransceiverDirection.RECVONLY
> > caps = Gst.caps_from_string("application/x-rtp,media=opus,encoding-name=OPUS,channel-rate=48000,channels=2,payload=96")
> > self.webrtc.emit('add-transceiver', direction, caps)
> >
> > This mostly works, and the resulting SDP looks like
> > # notice channels=2 is ignored
> >
> > a=recvonly
> > a=rtpmap:96 OPUS/48000
> >
> > Unfortunately my sender does not like this and wants
> > a=rtpmap:96 OPUS/48000/2
> >
> > When I read back the transceiver, the codec_preferences member looks correct:
> >
> > Transceiver: application/x-rtp, media=(string)audio,
> > encoding-name=(string)OPUS, clock-rate=(int)48000, channels=(int)2,
> > payload=(int)96;
> >
> > What is the correct way to get the channel setting /2 append to the SDP offer?
> >
> > Mangling the SDP in the application before sending to the peer works,
> > but I was hoping for a more canonical way to do this. The full
> > pipeline is eventually
> >
> > # after pad-added signal
> > webrtcbin ! decodebin ! queue !  audioconvert ! audioresample ! autoaudiosink
> >
> > Alternatively, what is the correct way to tell webrtcbin to add a
> > transceiver that will emit the desired SDP?
> >
> >
> > Thanks
> > Anthony Alba
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel