medooze/media-server-node

SDP(Capabilities) generated from media server side is not compatible in WebRTC client

Closed this issue · 5 comments

Hi @murillo128 ,
Could you please help for below issue.
I am generating SDP offer from media server-side and passing it to client as offer but while setting it as remote description am facing below error.

//For more information
https://chromium.googlesource.com/external/webrtc/+/branch-heads/57/webrtc/media/engine/webrtcmediaengine.cc#137

Created channel for audio
[042:237] [19321] (webrtc_video_engine.cc:487): CreateMediaChannel. Options: VideoOptions {}
[042:237] [19321] (channel.cc:150): Created channel for video
[042:239] [19322] (peer_connection.cc:4771): Session: 4519748473137223778 Old state: kStable New state: kHaveRemoteOffer
[042:239] [19321] (channel.cc:886): Setting remote voice description
[042:239] [19321] (webrtc_voice_engine.cc:1284): WebRtcVoiceMediaChannel::SetSendParameters: {codecs: [AudioCodec[96:opus:48000:0:2]], extensions: [{uri: urn:ietf:params:rtp-hdrext:ssrc-audio-level, id: 0}, {uri: http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, id: 1}], extmap-allow-mixed: true, max_bandwidth_bps: -1, mid: audio, options: AudioOptions {}}
[042:239] [19321] (webrtc_voice_engine.cc:1684): Recreate all the receive streams because the send codec has changed.
[042:239] [19321] (webrtc_media_engine.cc:74): Bad RTP extension ID: {uri: urn:ietf:params:rtp-hdrext:ssrc-audio-level, id: 0}
[042:239] [19322] (peer_connection.cc:6034): Failed to set remote audio description send parameters. (INVALID_PARAMETER)
[042:239] [19322] (peer_connection.cc:3044): Failed to set remote offer sdp: Failed to set remote audio description send parameters.
[042:239] [19322] (observer.cpp:111): Failed to set local description : INVALID_PARAMETER: Failed to set remote offer sdp: Failed to set remote audio description send parameters.

//This is the SDP generated from media server side.
{"sdp":"v=0\r\no=- 1587408679994 1 IN IP4 127.0.0.1\r\ns=semantic-sdp\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\na=ice-lite\r\na=msid-semantic: WMS *\r\na=group:BUNDLE audio video\r\nm=audio 9 UDP/TLS/RTP/SAVPF 96\r\na=rtpmap:96 opus/48000/2\r\na=rtcp-fb:96 transport-cc \r\na=extmap:0 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:1 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap-allow-mixed\r\na=setup:actpass\r\na=mid:audio\r\na=sendrecv\r\na=ice-ufrag:fd217fca4d4d67c7\r\na=ice-pwd:af84f914dd4734c9ed052749606d95de0fee6a9c1dc05db9\r\na=fingerprint:sha-256 58:99:CC:F5:52:76:F3:C1:9A:96:7A:89:D0:15:BE:5B:45:0E:A6:BA:C3:CA:A7:07:F7:A6:C9:F6:49:67:D1:9B\r\na=candidate:1 1 UDP 2130706431 142.93.210.48 15466 typ host\r\na=rtcp-mux\r\na=rtcp-rsize\r\nm=video 9 UDP/TLS/RTP/SAVPF 97 98 99 100\r\na=rtpmap:97 VP8/90000\r\na=rtpmap:98 rtx/90000\r\na=rtpmap:99 H264/90000\r\na=rtpmap:100 rtx/90000\r\na=fmtp:98 apt=97\r\na=fmtp:100 apt=99\r\na=fmtp:99 packetization-mode=1\r\na=rtcp-fb:97 goog-remb \r\na=rtcp-fb:97 transport-cc \r\na=rtcp-fb:97 ccm fir\r\na=rtcp-fb:97 nack \r\na=rtcp-fb:97 nack pli\r\na=rtcp-fb:99 goog-remb \r\na=rtcp-fb:99 transport-cc \r\na=rtcp-fb:99 ccm fir\r\na=rtcp-fb:99 nack \r\na=rtcp-fb:99 nack pli\r\na=extmap:0 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:1 urn:3gpp:video-orientation\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:5 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:8 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap-allow-mixed\r\na=setup:actpass\r\na=mid:video\r\na=sendrecv\r\na=ice-ufrag:fd217fca4d4d67c7\r\na=ice-pwd:af84f914dd4734c9ed052749606d95de0fee6a9c1dc05db9\r\na=fingerprint:sha-256 58:99:CC:F5:52:76:F3:C1:9A:96:7A:89:D0:15:BE:5B:45:0E:A6:BA:C3:CA:A7:07:F7:A6:C9:F6:49:67:D1:9B\r\na=candidate:1 1 UDP 2130706431 142.93.210.48 15466 typ host\r\na=rtcp-mux\r\na=rtcp-rsize\r\n"}

which chrome version are you using? and how are you generating the answer from the capabilities?

@murillo128 Sorry for the delayed response,
Am using MOMO Webrtc client but not sure about which Chrome they are using but looks like they are using recent one.

code example:
const Capabilities = {
audio: {
codecs: ["opus"],
extensions: [
"urn:ietf:params:rtp-hdrext:ssrc-audio-level:1",
"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
],
rtc: false,
},
video: {
codecs: ["vp8", "h264;packetization-mode=1"],
rtx: true,
rtcpfbs: [
{ id: "transport-cc" },
{ id: "ccm", params: ["fir"] },
{ id: "nack" },
{ id: "nack", params: ["pli"] },
],
extensions: [
"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01",
],
},
};

const createdOffer = endpoint.createOffer(Capabilities);
peer.offerSDP = createdOffer && createdOffer.toString();
and sending it as offer to MOMO WebRTC client

Thank You.

Bad RTP extension ID: {uri: urn:ietf:params:rtp-hdrext:ssrc-audio-level, id: 0}

This issue has been recently fixed in semantic-sdp-js, which media server uses internally.

@pradeep538 Ensure that you have semantic-sdp-js version 3.18.2 installed and please check if the issue persists.

Sure I will use the same.

Thank You @bakoushin , @murillo128

as it is not reproducable , hence closing this issue.