无法在本机上设置远程视频描述发送参数 IOS

Failed to set remote video description send parameters on native IOS

这里是 sdpOffer:

offer

v=0

o=- 1514366952141741 1 IN IP4 hostx

s=Mountpoint 99

t=0 0

a=group:BUNDLE video

a=msid-semantic: WMS janus

m=video 9 UDP/TLS/RTP/SAVPF 96

c=IN IP4 hostx

a=sendonly

a=mid:video

a=rtcp-mux

a=ice-ufrag:7joH

a=ice-pwd:bdRP/kVha/3vSoGEvstOxK

a=ice-options:trickle

a=fingerprint:sha-256 D2:B9:31:8F:DF:24:D8:0E:ED:D2:EF:25:9E:AF:6F:B8:34:AE:53:9C:E6:F3:8F:F2:64:15:FA:E8:7F:53:2D:38

a=setup:actpass

a=rtpmap:96 H264/90000

a=fmtp:96 profile-level-id=420029; packetization-mode=1; sprop-parameter-sets=Z00AH5Y1QWgUNNwEBAQI,aO48gA==

a=rtcp-fb:96 nack

a=rtcp-fb:96 goog-remb

a=ssrc:2233529852 cname:janusvideo

a=ssrc:2233529852 msid:janus janusv0

a=ssrc:2233529852 mslabel:janus

a=ssrc:2233529852 label:janusv0

a=candidate:1 1 udp 2013266431 host 42772 typ host

a=candidate:2 1 udp 2013266431 hostx 54166 typ host

a=candidate:1 2 udp 2013266430 host 54469 typ host

a=candidate:2 2 udp 2013266430 hostx 49119 typ host

a=end-of-candidates

我在本机 IOS 上调用 setRemoteDescription 时出现以下错误。

Failed to set remote video description send parameters

请帮忙!

问题来自这一行:

profile-level-id 420029

我的解决办法是简单地将“420029”替换为“42e01f”,然后一切正常。这种情况似乎与 RFC 6184 8.2.2 有关。您可以访问here了解更多详情。

我分析了您的 SDP,发现其中不正确。因此,您需要比较下面的 SDP,即使遇到问题,您也可以将下面的 SDP 格式硬编码为调试。

char const *local_OR_Remote_sdp =
    "v=0\r\n\
    o=- 4340022199490876901 2 IN IP4 127.0.0.1\r\n\
    s=-\r\n\
    t=0 0\r\n\
    a=group:BUNDLE audio video\r\n\
    a=msid-semantic: WMS ARDAMS\r\n\
    m=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 106 105 13 127 126\r\n\
    c=IN IP4 0.0.0.0\r\n\
    a=rtcp:9 IN IP4 0.0.0.0\r\n\
    a=ice-ufrag:Gok2zrJABO7lhGB8\r\n\
    a=ice-pwd:J1UXkVsMivK9+rqzPuP//OVe\r\n\
    a=fingerprint:sha-256 1F:68:4B:D3:85:4E:11:4C:9B:F7:5A:B9:4C:74:0A:BD:D4:FC:8F:E6:53:68:81:20:D1:03:C9:A9:AD:86:5D:A2\r\n\
    a=setup:actpass\r\n\
    a=mid:audio\r\n\
    a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\n\
    a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n\
    a=sendrecv\r\n\
    a=rtcp-mux\r\n\
    a=rtpmap:111 opus/48000/2\r\n\
    a=fmtp:111 minptime=10; useinbandfec=1\r\n\
    a=rtpmap:103 ISAC/16000\r\n\
    a=rtpmap:9 G722/8000\r\n\
    a=rtpmap:102 ILBC/8000\r\n\
    a=rtpmap:0 PCMU/8000\r\n\
    a=rtpmap:8 PCMA/8000\r\n\
    a=rtpmap:106 CN/32000\r\n\
    a=rtpmap:105 CN/16000\r\n\
    a=rtpmap:13 CN/8000\r\n\
    a=rtpmap:127 red/8000\r\n\
    a=rtpmap:126 telephone-event/8000\r\n\
    a=maxptime:60\r\n\
    a=ssrc:2271307011 cname:Pjjr5hQnoeV7A6WS\r\n\
    a=ssrc:2271307011 msid:ARDAMS ARDAMSa0\r\n\
    a=ssrc:2271307011 mslabel:ARDAMS\r\n\
    a=ssrc:2271307011 label:ARDAMSa0\r\n\
    m=video 9 UDP/TLS/RTP/SAVPF 100 101 116 117 96\r\n\
    c=IN IP4 0.0.0.0\r\n\
    a=rtcp:9 IN IP4 0.0.0.0\r\n\
    a=ice-ufrag:Gok2zrJABO7lhGB8\r\n\
    a=ice-pwd:J1UXkVsMivK9+rqzPuP//OVe\r\n\
    a=fingerprint:sha-256 1F:68:4B:D3:85:4E:11:4C:9B:F7:5A:B9:4C:74:0A:BD:D4:FC:8F:E6:53:68:81:20:D1:03:C9:A9:AD:86:5D:A2\r\n\
    a=setup:actpass\r\n\
    a=mid:video\r\n\
    a=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\n\
    a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\n\
    a=extmap:4 urn:3gpp:video-orientation\r\n\
    a=sendrecv\r\n\
    a=rtcp-mux\r\n\
    a=rtpmap:100 VP8/90000\r\n\
    a=rtcp-fb:100 ccm fir\r\n\
    a=rtcp-fb:100 nack\r\n\
    a=rtcp-fb:100 nack pli\r\n\
    a=rtcp-fb:100 goog-remb\r\n\
    a=rtcp-fb:100 transport-cc\r\n\
    a=rtpmap:101 VP9/90000\r\n\
    a=rtcp-fb:101 ccm fir\r\n\
    a=rtcp-fb:101 nack\r\n\
    a=rtcp-fb:101 nack pli\r\n\
    a=rtcp-fb:101 goog-remb\r\n\
    a=rtcp-fb:101 transport-cc\r\n\
    a=rtpmap:116 red/90000\r\n\
    a=rtpmap:117 ulpfec/90000\r\n\
    a=rtpmap:96 rtx/90000\r\n\
    a=fmtp:96 apt=100\r\n\
    a=ssrc-group:FID 4091763228 2995868033\r\n\
    a=ssrc:4091763228 cname:Pjjr5hQnoeV7A6WS\r\n\
    a=ssrc:4091763228 msid:ARDAMS ARDAMSv0\r\n\
    a=ssrc:4091763228 mslabel:ARDAMS\r\n\
    a=ssrc:4091763228 label:ARDAMSv0\r\n\
    a=ssrc:2995868033 cname:Pjjr5hQnoeV7A6WS\r\n\
    a=ssrc:2995868033 msid:ARDAMS ARDAMSv0\r\n\
    a=ssrc:2995868033 mslabel:ARDAMS\r\n\
    a=ssrc:2995868033 label:ARDAMSv0\r\n\
    ";