How to get channel setting /2 into a recvonly webrtcbin transceiver SDP
Anthony Alba
ascanio.alba7 at gmail.com
Wed Jul 22 06:56:35 UTC 2020
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
More information about the gstreamer-devel
mailing list