3

我正在使用 Simple Peer 通过 webRTC 连接 2 个客户端

在尝试将报价发送给接收者时,我得到了

设置远程视频描述发送参数失败。

这里是 SDP

{"type":"offer","sdp":"v=0\r\no=- 3967002803862387085 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=组:捆绑包 0 1 2\r\na=msid 语义:WMS 1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge\r\nm=音频 52914 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 1216\r\nc=。 .48.251\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3850540122 1 udp 2122260223 10.180.180.2 63782 typ host generation 0 network-id 1 network-cost 50\r\na=candidate:3165758154 1 udp 2122194687 10.100.190.5 63783 typ host generation 0 network-id 2\r\na=candidate:2868996266 1 tcp 1518280447 10.180.180.2 9 typ host tcptype active generation 0 network-id 1 network-cost 50\r\na=candidate :4063387194 1 tcp 1518214911 10.100.190.5 9 类型主机 tcptype 活动生成 0 网络 ID 2\r\na=candidate:1252121374 1 udp 1685987071 89.139.131。90 63783 typ srflx raddr 10.100.190.5 rport 63783 generation 0 network-id 2\r\na=candidate:257568702 1 udp 41820415 18.195.48.251 52914 typ relay raddr 89.139.133=ridport 2639.131.0-0 网络candidate:1104794446 1 udp 25042943 18.195.48.251 18200 typ relay raddr 89.139.131.90 rport 59073 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042687 18.195.48.251 45877 typ relay raddr 89.139.131.90 rport 59072 generation 0 network -id 2\r\na=ice-ufrag:Ujty\r\na=ice-pwd:PEzIY+m/GLK3tIKJKzdaL+QU\r\na=ice-options:trikle\r\na=指纹:sha-256 9F :35:29:B7:06:35:71:A3:24:57:BB:17:1D:46:A0:8A:DF:C3:43:D7:62:4F:28:82:C2:DA :6A:D8:1E:4D:7E:5C\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-级别\r\na=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:14 urn:ietf:params:rtp-hdrext:encrypt urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:13 urn:ietf:params:rtp-hdrext:encrypt urn:ietf:params:rtp-hdrext:sdes:mid\r\na= sendrecv\r\na=msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge 61b41b64-e659-44e5-b54a-fd985b0b6ab7\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 传输-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000 \r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap :13 CN/8000\r\na=rtpmap:110 电话事件/48000\r\na=rtpmap:112 电话事件/32000\r\na=rtpmap:113 电话事件/16000\r\na=rtpmap :126 电话事件/8000\r\na=ssrc:2346342125 cname:P/dCG3X5qY6a+Apj\r\na=ssrc:2346342125 msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge 61b41b64-e659-48sbrc-dab67-fa:2346342125 mslabel:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge\r\na=ssrc:2346342125 label:61b41b64-e659-44e5-b54a-fd985b0b6ab7\r\nm=video 23498 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 123 127 122 125 107 108 109 124\r\nc=IN IP4 18.195.48.251\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=candidate:3850540122 1 udp 2122260223 10.180.180.2 63784 typ host generation 0 network-id 1 network-成本 50\r\na=candidate:3165758154 1 udp 2122194687 10.100.190.5 63785 typ host generation 0 network-id 2\r\na=candidate:2868996266 1 tcp 1518280447 10.180.180.2 9 typ host generation 9 typ host 1t network-cost 50\r\na=candidate:4063387194 1 tcp 1518214911 10.100.190.5 9 typ host tcptype active generation 0 network-id 2\r\na=candidate:1252121374 1 udp 1685987071 89.139.131.90 63785 typ srflx raddr 10.100.190.5 rport 63785 第 0 代网络 ID 2\r\na=候选:1104794446 1 udp 25042687 18.195.48.251 23498 typ relay raddr 89.139.131.90 rport 59068 generation 0 network-id 2\r\na=candidate:257568702 1 udp 41820415 18.195.48.251 47216 typ relay raddr 89.139.131.90 rport 63785 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042943 18.195.48.251 55749 typ relay raddr 89.139.131.90 rport 59067 generation 0 network-id 2\r\na=ice-ufrag:Ujty\r\na=ice-pwd:PEzIY +m/GLK3tIKJKzdaL+QU\r\na=ice-options:trikle\r\na=指纹:sha-256 9F:35:29:B7:06:35:71:A3:24:57:BB:17: 1D:46:A0:8A:DF:C3:43:D7:62:4F:28:82:C2:DA:6A:D8:1E:4D:7E:5C\r\na=setup:actpass\r\ na=mid:1\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:390 rport 63785 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042943 18.195.48.251 55749 typ relay raddr 89.139.131.90 rport 59067 generation 0 network-id 2\r\na=ice-ufrag:Ujty\r \na=ice-pwd:PEzIY+m/GLK3tIKJKzdaL+QU\r\na=ice-options:trikle\r\na=fingerprint:sha-256 9F:35:29:B7:06:35:71:A3: 24:57:BB:17:1D:46:A0:8A:DF:C3:43:D7:62:4F:28:82:C2:DA:6A:D8:1E:4D:7E:5C\r\ na=setup:actpass\r\na=mid:1\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:390 rport 63785 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042943 18.195.48.251 55749 typ relay raddr 89.139.131.90 rport 59067 generation 0 network-id 2\r\na=ice-ufrag:Ujty\r \na=ice-pwd:PEzIY+m/GLK3tIKJKzdaL+QU\r\na=ice-options:trikle\r\na=fingerprint:sha-256 9F:35:29:B7:06:35:71:A3: 24:57:BB:17:1D:46:A0:8A:DF:C3:43:D7:62:4F:28:82:C2:DA:6A:D8:1E:4D:7E:5C\r\ na=setup:actpass\r\na=mid:1\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3actpass\r\na=mid:1\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3actpass\r\na=mid:1\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http://www. ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r \na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext /video-timing\r\na=extmap:10 https://datatracker.ietf.org/doc/html/draft-ietf-avtext-framemarking-07\r\na=extmap:9 urn:ietf:params:rtp -hdrext:sdes:mid\r\na=extmap:12 urn:ietf:params:rtp-hdrext:encrypt urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:11 urn:ietf:params: rtp-hdrext:encrypt urn:3gpp:video-orientation\r\na=extmap:0 urn:ietf:params:rtp-hdrext:encrypthttp://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:0 urn:ietf:params:rtp-hdrext:encrypt http:// www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:0 urn:ietf:params:rtp-hdrext:encrypt http://www.webrtc.org/experiments/rtp-hdrext/视频内容类型\r\na=extmap:13urn:ietf:params:rtp-hdrext:加密 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=sendrecv\r\na=msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\ na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc \r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na =fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp -fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 H264/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 传输- cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 level-asymmetry-allowed= 1;打包模式=1;profile-level-id=42001f\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:102 H264/90000\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\na=rtpmap:123 rtx/90000\r\na=fmtp:123 apt =102\r\na=rtpmap:127 H264/90000\r\na=rtcp-fb:127 goog-remb\r\na=rtcp-fb:127 transport-cc\r\na=rtcp-fb:127 ccm fir\r\na=rtcp-fb:127 nack\r\na=rtcp-fb:127 nack pli\r\na=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level- id=42e01f\r\na=rtpmap:122 rtx/90000\r\na=fmtp:122 apt=127\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 goog-remb\ r\na=rtcp-fb:125 transport-cc\r\na=rtcp-fb:125 ccm fir\r\na=rtcp-fb:125 nack\r\na=rtcp-fb:125 nack pli\r\ na=fmtp:125 水平不对称允许=1;打包模式=0;配置文件级别 id=42e01f\r\na=rtpmap:107 rtx/90000\r\na=fmtp:107 apt=125\r\na=rtpmap:108 red/90000\r\na =rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:124 ulpfec/90000\r\na=ssrc-group:FID 351153934 628720635\r\na=ssrc:351153934 cname :P/dCG3X5qY6a+Apj\r\na=ssrc:351153934 msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\na=ssrc:351153934 mslabel:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge\r\na=ssrc:351153934 label:ff8bcf60-6329 -4305-b4b8-daf20c56c10a\r\na=ssrc:628720635 cname:P/dCG3X5qY6a+Apj\r\na=ssrc:628720635 msid:1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\na=ssrc:628720635 mslabel :1cWiFgNnmw599HZ2elM3tijVTaIvKA9CJ6ge\r\na=ssrc:628720635 标签:ff8bcf60-6329-4305-b4b8-daf20c56c10a\r\nm=应用程序 12497 DTLS/SCTP 5000\r\nc=IN IP4 18.195.di\r51=candate:r5.23850540122 1 udp 2122260223 10.180.180.2 63786 typ host generation 0 network-id 1 network-cost 50\r\na=candidate:3165758154 1 udp 2122194687 10.100.190.5 63787 typ host generation 0 network-id: 2868996266 1 tcp 1518280447 10.180.180.2 9 typ host tcptype active generation 0 network-id 1 network-cost 50\r\na=candidate:4063387194 1 tcp 1518214911 10.100.190.5 9 typ host tcptype active generation 0 na=candidate:1252121374 1 udp 1685987071 89.139.131.84 63787 typ srflx raddr 10.100.190.5 rport 63787 generation 0 network-id 2\r\na=candidate:257568702 1 udp 41820415 18.195.48.251 12497 typ relay raddr 89.139.131.90 rport 63787 generation 0 network-id 2\r\na=candidate:1104794446 1 udp 25042943 18.195.48.251 55726 typ relay raddr 89.139.131.90 rport 59065 generation 0 network-id 2\r\na=candidate:1104794446 1 udp.250.250195.48.251 46602 typ relay raddr 89.139.131.90 rport 59066 generation 0 network-id 2\r\na=ice-ufrag:Ujty\r\na=ice-pwd:PEzIY+m/GLK3tIKJKzdaL+QU\r\na=ice -选项:涓流\r\na=指纹:sha-256 9F:35:29:B7:06:35:71:A3:24:57:BB:17:1D:46:A0:8A:DF:C3: 43:D7:62:4F:28:82:C2:DA:6A:D8:1E:4D:7E:5C\r\na=setup:actpass\r\na=mid:2\r\na=sctpmap: 5000 webrtc-数据通道 1024\r\n"}

如果有任何工具可以格式化它,请告诉我,我会做的。另外,我读到,这可能是一个编解码器问题,所以我尝试用 profile-level-id=42e01f 替换 profile-level-id=42001f 这并没有成功。

为什么 webRTC 必须这么难?它也可能被称为 hellRTC,为什么 SDP 的扩展部分充满了 URL?...它看起来不像你想在你的请求或信号中传递的东西。

谢谢你。

4

0 回答 0