问题
im using webrtc to send and get video in conference. The subcriser video is display normally
But the problem is about the video is not publish to the server, i check the method "setlocalDescription" is not return error, here is my sdp, can anyone help?
I searched a lot soluition but i still can not know my problem, i think it's about codec error, may be the codec is not H264( my server accpept H264) then im trying to force to H264 by using replace profile-level-id to 42e01f, but it's not working.
let encoderFactory = RTCVideoEncoderFactoryH264()
let decoderFactory = RTCVideoDecoderFactoryH264()
factory = RTCPeerConnectionFactory(encoderFactory: encoderFactory, decoderFactory: decoderFactory)
publisherPeerConnection sdp: v=0
o=- 3622980835820981111 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS ARDAMS
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:JkM5
a=ice-pwd:ZA9uRVkCYtN378Y5a3KDdZhH
a=ice-options:trickle renomination
a=fingerprint:sha-256 11:76:45:6E:D7:AF:8F:5C:D6:92:9C:0A:BA:B8:EB:A6:14:9A:5C:2D:2C:67:A2:D9:C6:F1:7D:97:7D:E9:09:0B
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:102 ILBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:1949288389 cname:1V8vIuBCo3jUloXY
a=ssrc:1949288389 msid:ARDAMS d7849f66-f8e4-42ef-8e85-58b08cf8c531
a=ssrc:1949288389 mslabel:ARDAMS
a=ssrc:1949288389 label:d7849f66-f8e4-42ef-8e85-58b08cf8c531
m=video 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:JkM5
a=ice-pwd:ZA9uRVkCYtN378Y5a3KDdZhH
a=ice-options:trickle renomination
a=fingerprint:sha-256 11:76:45:6E:D7:AF:8F:5C:D6:92:9C:0A:BA:B8:EB:A6:14:9A:5C:2D:2C:67:A2:D9:C6:F1:7D:97:7D:E9:09:0B
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 H264/90000
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=ssrc-group:FID 554880171 3682085542
a=ssrc:554880171 cname:1V8vIuBCo3jUloXY
a=ssrc:554880171 msid:ARDAMS c7384d55-f6f7-45a0-9c83-72b535cf3f30
a=ssrc:554880171 mslabel:ARDAMS
a=ssrc:554880171 label:c7384d55-f6f7-45a0-9c83-72b535cf3f30
a=ssrc:3682085542 cname:1V8vIuBCo3jUloXY
a=ssrc:3682085542 msid:ARDAMS c7384d55-f6f7-45a0-9c83-72b535cf3f30
a=ssrc:3682085542 mslabel:ARDAMS
a=ssrc:3682085542 label:c7384d55-f6f7-45a0-9c83-72b535cf3f30
I see the codec for h264 is:
a=rtpmap:96 H264/90000
then the video display is right:
m=video 9 UDP/TLS/RTP/SAVPF 96 97
but what's wrong? im using iphone 8plus, ios 13.1 to test
来源:https://stackoverflow.com/questions/62749512/org-webrtc-rtcpeerconnection-can-not-publish-video-to-server