webrtcbin recvonly offer
I'm running up against a problem with a PoC webrtcbin based Rust server using the following JSFiddle (from https://github.com/pions/webrtc/tree/master/examples/gstreamer-send): https://jsfiddle.net/Laf7ujeo/164/
The JS browser code generates the following offer SDP (with XXX indicating redacted fields):
v=0
o=mozilla...THIS_IS_SDPARTA-65.0.1 1890588838515498501 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 XXX
a=group:BUNDLE 0 1
a=ice-options:trickle
a=msid-semantic:WMS *
m=audio 52694 UDP/TLS/RTP/SAVPF 109 9 0 8 101
c=IN IP4 XXX
a=candidate:0 XXX
a=candidate:2 XXX
a=candidate:4 XXX
a=candidate:5 XXX
a=candidate:0 XXX
a=candidate:4 XXX
a=candidate:5 XXX
a=candidate:1 XXX
a=candidate:1 XXX
a=recvonly
a=end-of-candidates
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=fmtp:101 0-15
a=ice-pwd:XXX
a=ice-ufrag:XXX
a=mid:0
a=rtcp:36690 IN IP4 XXX
a=rtcp-mux
a=rtpmap:109 opus/48000/2
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=setup:actpass
a=ssrc:XXX
m=video 47734 UDP/TLS/RTP/SAVPF 120 121 126 97
c=IN IP4 XXX
a=candidate:0 XXX
a=candidate:4 XXX
a=candidate:5 XXX
a=candidate:0 XXX
a=candidate:4 XXX
a=candidate:5 XXX
a=candidate:1 XXX
a=candidate:1 XXX
a=recvonly
a=end-of-candidates
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 urn:ietf:params:rtp-hdrext:toffset
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:120 max-fs=12288;max-fr=60
a=fmtp:121 max-fs=12288;max-fr=60
a=ice-pwd:XXX
a=ice-ufrag:XXX
a=mid:1
a=rtcp:56352 IN IP4 XXX
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 goog-remb
a=rtcp-fb:121 nack
a=rtcp-fb:121 nack pli
a=rtcp-fb:121 ccm fir
a=rtcp-fb:121 goog-remb
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:126 goog-remb
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-fb:97 goog-remb
a=rtcp-mux
a=rtpmap:120 VP8/90000
a=rtpmap:121 VP9/90000
a=rtpmap:126 H264/90000
a=rtpmap:97 H264/90000
a=setup:actpass
a=ssrc:XXX
My code (which can be found here: https://gist.github.com/mchlrhw/c365bc8acdeac18c1626de3f92cffba5) generates the following answer, which when pasted back into the browser (encoded as base64) results in InvalidSessionDescriptionError: Answer tried to set recv when offer did not set send
:
v=0
o=- 1890588838515498501 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
m=audio 0 UDP/TLS/RTP/SAVPF 109 9 0 8 101
c=IN IP4 XXX
a=candidate:0 XXX
a=candidate:2 XXX
a=candidate:4 XXX
a=candidate:5 XXX
a=candidate:0 XXX
a=candidate:4 XXX
a=candidate:5 XXX
a=candidate:1 XXX
a=candidate:1 XXX
a=recvonly
a=end-of-candidates
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1
a=fmtp:101 0-15
a=ice-pwd:XXX
a=ice-ufrag:XXX
a=mid:0
a=rtcp:36690 IN IP4 XXX
a=rtcp-mux
a=rtpmap:109 opus/48000/2
a=rtpmap:9 G722/8000/1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=setup:actpass
a=ssrc:XXX
m=video 0 UDP/TLS/RTP/SAVPF 120 121 126 97
c=IN IP4 XXX
a=candidate:0 XXX
a=candidate:4 XXX
a=candidate:5 XXX
a=candidate:0 XXX
a=candidate:4 XXX
a=candidate:5 XXX
a=candidate:1 XXX
a=candidate:1 XXX
a=recvonly
a=end-of-candidates
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:5 urn:ietf:params:rtp-hdrext:toffset
a=fmtp:126 profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:120 max-fs=12288;max-fr=60
a=fmtp:121 max-fs=12288;max-fr=60
a=ice-pwd:XXX
a=ice-ufrag:XXX
a=mid:1
a=rtcp:56352 IN XXX
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:120 goog-remb
a=rtcp-fb:121 nack
a=rtcp-fb:121 nack pli
a=rtcp-fb:121 ccm fir
a=rtcp-fb:121 goog-remb
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:126 goog-remb
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-fb:97 goog-remb
a=rtcp-mux
a=rtpmap:120 VP8/90000
a=rtpmap:121 VP9/90000
a=rtpmap:126 H264/90000
a=rtpmap:97 H264/90000
a=setup:actpass
a=ssrc:XXX
Note the recvonly
fields for both audio and video media in the offer and the answer. I would expect the answer to have sendonly
for the video stream and inactive
for the audio stream (since my example only sends video).
I am not sure if this is a problem specific to webrtcbin and recvonly offers, or if there is a bug in my PoC server code, but thought it was worth raising as I can't seem to get past it.