webrtcbin: missing H264 profile-level-id in SDP answer causes Firefox to not send anything
Offer received from Firefox
v=0
o=mozilla...THIS_IS_SDPARTA-98.0 4827139550677381398 0 IN IP4 0.0.0.0
s=-
t=0 0
a=sendrecv
a=fingerprint:sha-256 26:14:4F:20:DC:63:37:A1:07:B7:D6:DF:5F:7D:FF:B4:9C:0B:B6:3C:44:E8:74:3A:9F:F8:B7:86:92:18:AB:5E
a=group:BUNDLE 0 1
a=ice-options:trickle
a=msid-semantic:WMS *
m=video 9 UDP/TLS/RTP/SAVPF 120 124 121 125 126 127 97 98
c=IN IP4 0.0.0.0
a=sendrecv
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=extmap:6/recvonly http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
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:124 apt=120
a=fmtp:121 max-fs=12288;max-fr=60
a=fmtp:125 apt=121
a=fmtp:127 apt=126
a=fmtp:98 apt=97
a=ice-pwd:dd59bdaf4dc176c522eb5f96df351cb4
a=ice-ufrag:c83555c1
a=mid:0
a=msid:{15764474-e5c1-4b5a-bbaf-79b6f6537a88} {4329c55b-2af7-4845-a1e6-41ad70a0c778}
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:120 transport-cc
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:121 transport-cc
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:126 transport-cc
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-fb:97 transport-cc
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:120 VP8/90000
a=rtpmap:124 rtx/90000
a=rtpmap:121 VP9/90000
a=rtpmap:125 rtx/90000
a=rtpmap:126 H264/90000
a=rtpmap:127 rtx/90000
a=rtpmap:97 H264/90000
a=rtpmap:98 rtx/90000
a=setup:actpass
a=ssrc:579271606 cname:{477e29d7-1714-45c2-9a4c-4776f61b4330}
a=ssrc:1481256101 cname:{477e29d7-1714-45c2-9a4c-4776f61b4330}
a=ssrc-group:FID 579271606 1481256101
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=sendrecv
a=ice-pwd:dd59bdaf4dc176c522eb5f96df351cb4
a=ice-ufrag:c83555c1
a=mid:1
a=setup:actpass
a=sctp-port:5000
a=max-message-size:1073741823
Note the H264 fmtp: a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
, which is constrained-baseline
.
Then if we call add-transceiver
with these caps:
application/x-rtp, media=(string)video, payload=(int)97, clock-rate=(int)90000, encoding-name=(string)H264, profile=(string)constrained-baseline
The answer will be:
Answer created by webrtcbin
v=0
o=- 4827139550677381398 0 IN IP4 0.0.0.0
s=-
t=0 0
a=ice-options:trickle
m=video 9 UDP/TLS/RTP/SAVPF 97
c=IN IP4 0.0.0.0
a=ice-ufrag:agzwAicmGeuIIJdTNxOebKjILm/ADXL7
a=ice-pwd:5NHvthQgABKl6qrAADriS3DoHi54X/o1
a=mid:0
a=rtcp-mux
a=setup:active
a=rtpmap:97 H264/90000
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=rtcp-fb:97 transport-cc
a=fmtp:97 level-asymmetry-allowed=1
a=sendrecv
a=fingerprint:sha-256 90:F2:3E:53:47:6D:FB:5D:0E:AA:87:AA:24:7E:2B:C9:8B:10:E7:96:98:19:4B:F1:03:A9:2D:40:D6:8A:21:CA
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:agzwAicmGeuIIJdTNxOebKjILm/ADXL7
a=ice-pwd:5NHvthQgABKl6qrAADriS3DoHi54X/o1
a=mid:1
a=setup:active
a=sctp-port:5000
a=fingerprint:sha-256 90:F2:3E:53:47:6D:FB:5D:0E:AA:87:AA:24:7E:2B:C9:8B:10:E7:96:98:19:4B:F1:03:A9:2D:40:D6:8A:21:CA
Note the fmtp: a=fmtp:97 level-asymmetry-allowed=1
Since this is missing the profile-level-id
, Firefox barfs internally and doesn't send us anything. It emits no errors in the console or on about:webrtc
.
If we change the fmtp to: a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
, then everything works!
So I guess webrtcbin should just do that. Will probably require updates to the gstsdp
library and also gstcodecs
to do the inverse of gst_codec_utils_h264_get_profile()
.