Android WebRTC低成功连接率

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android WebRTC低成功连接率相关的知识,希望对你有一定的参考价值。

我正在使用本地android WebRTC开发视频聊天应用程序。我正在使用公共Google STUN服务器以及XIRRYS STUN和TURN服务器。

我的问题是,成功的连接率非常低!

成功连接率如下:

  • 当我使用WIFI网络时,大约有50%的连接失败
  • 关于90%连接失败,当我使用移动互联网时。
  • 在所有情况下,要约,答案和候选消息都很好地通过信令服务器运行,但是正如我所说,在正常情况下,连接失败。

我试图检查SDP和候选者信息,但在那里看不到任何问题:

这是LOGCAT中的一个失败示例:

    2019-08-30 12:35:20.647 8450-8580 D/ZCF localconnection: onRenegotiationNeeded 
    2019-08-30 12:35:20.649 8450-8580 D/ZCF local offer sdp: onCreateSuccess v=0
    o=- 517380758811234323 2 IN IP4 127.0.0.1
    s=-
    t=0 0
    a=group:BUNDLE audio video
    a=msid-semantic: WMS localMediaStream
    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:Q6E1
    a=ice-pwd:Mtu+EvxO9zwAIYBAMrqgphUl
    a=ice-options:trickle renomination
    a=fingerprint:sha-256 96:FF:68:5B:85:00:71:06:58:93:7F:92:BA:CD:68:6A:31:D7:BC:95:5B:1E:F6:A8:C6:31:66:3F:90:B6:35:03
    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:831571398 cname:Q8DS5ia+kdlu8Q1f
    a=ssrc:831571398 msid:localMediaStream localAudioTrack
    a=ssrc:831571398 mslabel:localMediaStream
    a=ssrc:831571398 label:localAudioTrack
    m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
    c=IN IP4 0.0.0.0
    a=rtcp:9 IN IP4 0.0.0.0
    a=ice-ufrag:Q6E1
    a=ice-pwd:Mtu+EvxO9zwAIYBAMrqgphUl
    a=ice-options:trickle renomination
    a=fingerprint:sha-256 96:FF:68:5B:85:00:71:06:58:93:7F:92:BA:CD:68:6A:31:D7:BC:95:5B:1E:F6:A8:C6:31:66:3F:90:B6:35:03
    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=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
    a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/color-space
    a=sendrecv
    a=rtcp-mux
    a=rtcp-rsize
    a=rtpmap:96 VP8/90000
    a=rtcp-fb:96 goog-remb
    a=rtcp-fb:96 transport-cc
    a=rtcp-fb:96 ccm fir
    a=rtcp-fb:96 nack
    a=rtcp-fb:96 nack pli
    a=rtpmap:97 rtx/90000
    a=fmtp:97 apt=96
    a=rtpmap:98 VP9/90000
    a=rtcp-fb:98 goog-remb
    a=rtcp-fb:98 transport-cc
    a=rtcp-fb:98 ccm fir
    a=rtcp-fb:98 nack
    a=rtcp-fb:98 nack pli
    a=rtpmap:99 rtx/90000
    a=fmtp:99 apt=98
    a=rtpmap:100 H264/90000
    a=rtcp-fb:100 goog-remb
    a=rtcp-fb:100 transport-cc
    a=rtcp-fb:100 ccm fir
    a=rtcp-fb:100 nack
    a=rtcp-fb:100 nack pli
    a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
    a=rtpmap:101 rtx/90000
    a=fmtp:101 apt=100
    a=rtpmap:127 red/90000
    a=rtpmap:124 rtx/90000
    a=fmtp:124 apt=127
    a=rtpmap:125 ulpfec/90000
    a=ssrc-group:FID 4145536005 1421838753
    a=ssrc:4145536005 cname:Q8DS5ia+kdlu8Q1f
    a=ssrc:4145536005 msid:localMediaStream 100
    a=ssrc:4145536005 mslabel:localMediaStream
    a=ssrc:4145536005 label:100
    a=ssrc:1421838753 cname:Q8DS5ia+kdlu8Q1f
    a=ssrc:1421838753 msid:localMediaStream 100
    a=ssrc:1421838753 mslabel:localMediaStream
    a=ssrc:1421838753 label:100
2019-08-30 12:35:20.658 8450-8580 D/ZCF localconnection: onSignalingChange HAVE_LOCAL_OFFER
2019-08-30 12:35:20.692 8450-8742 I/org.webrtc.Logging: NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted:  LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -40 SSID: "zcf"]
2019-08-30 12:35:20.696 8450-8580 I/ZCF: Message Sent to WebSocket={"to":"2","from":"1","type":"offer","sdp":"v=0
o=- 517380758811234323 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS localMediaStream
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:Q6E1
a=ice-pwd:Mtu+EvxO9zwAIYBAMrqgphUl
a=ice-options:trickle renomination
a=fingerprint:sha-256 96:FF:68:5B:85:00:71:06:58:93:7F:92:BA:CD:68:6A:31:D7:BC:95:5B:1E:F6:A8:C6:31:66:3F:90:B6:35:03
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:831571398 cname:Q8DS5ia+kdlu8Q1f
a=ssrc:831571398 msid:localMediaStream localAudioTrack
a=ssrc:831571398 mslabel:localMediaStream
a=ssrc:831571398 label:localAudioTrack
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Q6E1
a=ice-pwd:Mtu+EvxO9zwAIYBAMrqgphUl
a=ice-options:trickle renomination
a=fingerprint:sha-256 96:FF:68:5B:85:00:71:06:58:93:7F:92:BA:CD:68:6A:31:D7:BC:95:5B:1E:F6:A8:C6:31:66:3F:90:B6:35:03
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=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 H264/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000
a=ssrc-group:FID 4145536005 1421838753
a=ssrc:4145536005 cname:Q8DS5ia+kdlu8Q1f
a=ssrc:4145536005 msid:localMediaStream 100
a=ssrc:4145536005 mslabel:localMediaStream
a=ssrc:4145536005 label:100
a=ssrc:1421838753 cname:Q8DS5ia+kdlu8Q1f
a=ssrc:1421838753 msid:localMediaStream 100
a=ssrc:1421838753 mslabel:localMediaStream
a=ssrc:1421838753 label:100
"}
2019-08-30 12:35:20.696 8450-8580 I/ZCF: createOffer----> onCreateSuccess
2019-08-30 12:35:20.696 8450-8580 I/ZCF: createOffer---> connectionState: 0 NEW
2019-08-30 12:35:20.696 8450-8580 D/ZCF local set local: onSetSuccess 
2019-08-30 12:35:20.696 8450-8580 D/ZCF localconnection: onIceGatheringChange GATHERING
2019-08-30 12:35:20.712 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.712 8450-8580 D/ZCF localconnection: onIceCandidate audio:0:candidate:2087201215 1 udp 2122260223 192.168.1.14 41002 typ host generation 0 ufrag Q6E1 network-id 3 network-cost 10:
2019-08-30 12:35:20.713 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:2087201215 1 udp 2122260223 192.168.1.14 41002 typ host generation 0 ufrag Q6E1 network-id 3 network-cost 10"}"}
2019-08-30 12:35:20.713 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.714 8450-8580 D/ZCF localconnection: onIceCandidate audio:0:candidate:559267639 1 udp 2122202367 ::1 41426 typ host generation 0 ufrag Q6E1 network-id 2:
2019-08-30 12:35:20.715 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:559267639 1 udp 2122202367 ::1 41426 typ host generation 0 ufrag Q6E1 network-id 2"}"}
2019-08-30 12:35:20.715 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.715 8450-8580 D/ZCF localconnection: onIceCandidate audio:0:candidate:1510613869 1 udp 2122129151 127.0.0.1 42151 typ host generation 0 ufrag Q6E1 network-id 1:
2019-08-30 12:35:20.716 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:1510613869 1 udp 2122129151 127.0.0.1 42151 typ host generation 0 ufrag Q6E1 network-id 1"}"}
2019-08-30 12:35:20.716 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.717 8450-8580 D/ZCF localconnection: onIceCandidate video:1:candidate:2087201215 1 udp 2122260223 192.168.1.14 40642 typ host generation 0 ufrag Q6E1 network-id 3 network-cost 10:
2019-08-30 12:35:20.718 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:2087201215 1 udp 2122260223 192.168.1.14 40642 typ host generation 0 ufrag Q6E1 network-id 3 network-cost 10"}"}
2019-08-30 12:35:20.718 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.718 8450-8580 D/ZCF localconnection: onIceCandidate video:1:candidate:559267639 1 udp 2122202367 ::1 49813 typ host generation 0 ufrag Q6E1 network-id 2:
2019-08-30 12:35:20.719 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:559267639 1 udp 2122202367 ::1 49813 typ host generation 0 ufrag Q6E1 network-id 2"}"}
2019-08-30 12:35:20.720 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.720 8450-8580 D/ZCF localconnection: onIceCandidate video:1:candidate:1510613869 1 udp 2122129151 127.0.0.1 44066 typ host generation 0 ufrag Q6E1 network-id 1:
2019-08-30 12:35:20.721 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:1510613869 1 udp 2122129151 127.0.0.1 44066 typ host generation 0 ufrag Q6E1 network-id 1"}"}
2019-08-30 12:35:20.801 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.801 8450-8580 D/ZCF localconnection: onIceCandidate audio:0:candidate:842163049 1 udp 1686052607 213.57.141.90 41002 typ srflx raddr 192.168.1.14 rport 41002 generation 0 ufrag Q6E1 network-id 3 network-cost 10:stun:159.89.29.128:80
2019-08-30 12:35:20.802 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:842163049 1 udp 1686052607 213.57.141.90 41002 typ srflx raddr 192.168.1.14 rport 41002 generation 0 ufrag Q6E1 network-id 3 network-cost 10"}"}
2019-08-30 12:35:20.816 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.816 8450-8580 D/ZCF localconnection: onIceCandidate audio:0:candidate:1876313031 1 tcp 1518222591 ::1 37446 typ host tcptype passive generation 0 ufrag Q6E1 network-id 2:
2019-08-30 12:35:20.817 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:1876313031 1 tcp 1518222591 ::1 37446 typ host tcptype passive generation 0 ufrag Q6E1 network-id 2"}"}
2019-08-30 12:35:20.818 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.818 8450-8580 D/ZCF localconnection: onIceCandidate audio:0:candidate:344579997 1 tcp 1518149375 127.0.0.1 42010 typ host tcptype passive generation 0 ufrag Q6E1 network-id 1:
2019-08-30 12:35:20.819 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:344579997 1 tcp 1518149375 127.0.0.1 42010 typ host tcptype passive generation 0 ufrag Q6E1 network-id 1"}"}
2019-08-30 12:35:20.820 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.820 8450-8580 D/ZCF localconnection: onIceCandidate video:1:candidate:1876313031 1 tcp 1518222591 ::1 41321 typ host tcptype passive generation 0 ufrag Q6E1 network-id 2:
2019-08-30 12:35:20.821 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:1876313031 1 tcp 1518222591 ::1 41321 typ host tcptype passive generation 0 ufrag Q6E1 network-id 2"}"}
2019-08-30 12:35:20.822 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.822 8450-8580 D/ZCF localconnection: onIceCandidate video:1:candidate:842163049 1 udp 1686052607 213.57.141.90 40642 typ srflx raddr 192.168.1.14 rport 40642 generation 0 ufrag Q6E1 network-id 3 network-cost 10:stun:66.102.1.127:19302
2019-08-30 12:35:20.823 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:842163049 1 udp 1686052607 213.57.141.90 40642 typ srflx raddr 192.168.1.14 rport 40642 generation 0 ufrag Q6E1 network-id 3 network-cost 10"}"}
2019-08-30 12:35:20.828 8450-8580 I/ZCF: onIceCandidate ---> connectionState: 0 NEW
2019-08-30 12:35:20.828 8450-8580 D/ZCF localconnection: onIceCandidate video:1:candidate:344579997 1 tcp 1518149375 127.0.0.1 43485 typ host tcptype passive generation 0 ufrag Q6E1 network-id 1:
2019-08-30 12:35:20.830 8450-8580 I/ZCF: Message Sent to WebSocket={"type":"candidate","to":"2","from":"1","candidate":"{"sdpMid":"video","sdpMLineIndex":1,"candidate":"candidate:344579997 1 tcp 1518149375 127.0.0.1 43485 typ host tcptype passive generation 0 ufrag Q6E1 network-id 1"}"}
2019-08-30 12:35:20.961 8450-8559 I/ZCF: Got Message From SOCKET:{"from":"2","to":"1","type":"answer","sdp":"v=0
o=- 147041557092641575 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS localMediaStream
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:zD1C
a=ice-pwd:fg2lXM5S68gQfjhYJiz4CIzc
a=ice-options:trickle renomination
a=fingerprint:sha-256 E0:B9:4E:EC:91:26:96:47:7F:09:7D:B6:21:19:AD:30:87:FB:9B:05:5B:73:9E:D3:55:A4:92:47:78:68:64:30
a=setup:active
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:1363396504 cname:4D2HgDuIZ41xb2u2
a=ssrc:1363396504 msid:localMediaStream localAudioTrack
a=ssrc:1363396504 mslabel:localMediaStream
a=ssrc:1363396504 label:localAudioTrack
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:zD1C
a=ice-pwd:fg2lXM5S68gQfjhYJiz4CIzc
a=ice-options:trickle renomination
a=fingerprint:sha-256 E0:B9:4E:EC:91:26:96:47:7F:09:7D:B6:21:19:AD:30:87:FB:9B:05:5B:73:9E:D3:55:A4:92:47:78:68:64:30
a=setup:active
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=extmap:10 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=sendrecv
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 H264/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 red/90000
a=rtpmap:124 rtx/90000
a=fmtp:124 apt=127
a=rtpmap:125 ulpfec/90000
a=ssrc-group:FID 3714610068 3180849917
a=ssrc:3714610068 cname:4D2HgDuIZ41xb2u2
a=ssrc:3714610068 msid:localMediaStream 100
a=ssrc:3714610068 mslabel:localMediaStream
a=ssrc:3714610068 label:100
a=ssrc:3180849917 cname:4D2HgDuIZ41xb2u2
a=ssrc:3180849917 msid:localMediaStream 100
a=ssrc:3180849917 mslabel:localMediaStream
a=ssrc:3180849917 label:100
"}
2019-08-30 12:35:20.990 8450-8580 D/ZCF localconnection: onSignalingChange STABLE
2019-08-30 12:35:21.041 8450-8580 I/ZCF: onIceConnectionChange ---> connectionState: 0 NEW
2019-08-30 12:35:21.041 8450-8580 I/ZCF: onIceConnectionChange CHECKING
2019-08-30 12:35:21.043 8450-8580 D/ZCF localconnection: onAddTrack [Lorg.webrtc.MediaStream;@72634d7
2019-08-30 12:35:21.043 8450-8580 D/ZCF localconnection: onAddTrack [Lorg.webrtc.MediaStream;@4a831c4
2019-08-30 12:35:21.044 8450-8580 I/ZCF: onAddStream ---> connectionState: 0 NEW
2019-08-30 12:35:21.044 8450-8580 D/ZCF localconnection: onAddStream [localMediaStream:A=1:V=1]
2019-08-30 12:35:21.044 8450-8580 D/ZCF localconnection: onConnectionChange CONNECTING
2019-08-30 12:35:21.044 8450-8580 D/ZCF localSetRemote: onSetSuccess 
2019-08-30 12:35:21.044 8450-8559 I/ZCF: onAnswerReceived---> connectionState: 0 CONNECTING
2019-08-30 12:35:21.045 8450-8559 I/ZCF: Got Message From SOCKET:{"candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:202810205 1 udp 2122260223 192.168.1.21 56587 typ host generation 0 ufrag zD1C network-id 3 network-cost 10"}","from":"2","to":"1","type":"candidate"}
2019-08-30 12:35:21.048 8450-8559 I/ZCF: onIceCandidateReceived---> connectionState: 0 CONNECTING
2019-08-30 12:35:21.048 8450-8559 I/ZCF: Got Message From SOCKET:{"candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:559267639 1 udp 2122202367 ::1 35289 typ host generation 0 ufrag zD1C network-id 2"}","from":"2","to":"1","type":"candidate"}
2019-08-30 12:35:21.051 8450-8559 I/ZCF: onIceCandidateReceived---> connectionState: 0 CONNECTING
2019-08-30 12:35:21.051 8450-8559 I/ZCF: Got Message From SOCKET:{"candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:1510613869 1 udp 2122129151 127.0.0.1 38621 typ host generation 0 ufrag zD1C network-id 1"}","from":"2","to":"1","type":"candidate"}
2019-08-30 12:35:21.053 8450-8559 I/ZCF: onIceCandidateReceived---> connectionState: 0 CONNECTING
2019-08-30 12:35:21.237 8450-8559 I/ZCF: Got Message From SOCKET:{"candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:842163049 1 udp 1686052607 213.57.141.90 56587 typ srflx raddr 192.168.1.21 rport 56587 generation 0 ufrag zD1C network-id 3 network-cost 10"}","from":"2","to":"1","type":"candidate"}
2019-08-30 12:35:21.240 8450-8559 I/ZCF: onIceCandidateReceived---> connectionState: 0 CONNECTING
2019-08-30 12:35:21.240 8450-8559 I/ZCF: Got Message From SOCKET:{"candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:1876313031 1 tcp 1518222591 ::1 44335 typ host tcptype passive generation 0 ufrag zD1C network-id 2"}","from":"2","to":"1","type":"candidate"}
2019-08-30 12:35:21.244 8450-8559 I/ZCF: onIceCandidateReceived---> connectionState: 0 CONNECTING
2019-08-30 12:35:21.245 8450-8559 I/ZCF: Got Message From SOCKET:{"candidate":"{"sdpMid":"audio","sdpMLineIndex":0,"candidate":"candidate:344579997 1 tcp 1518149375 127.0.0.1 59586 typ host tcptype passive generation 0 ufrag zD1C network-id 1"}","from":"2","to":"1","type":"candidate"}
2019-08-30 12:35:21.253 8450-8559 I/ZCF: onIceCandidateReceived---> connectionState: 0 CONNECTING
2019-08-30 12:35:21.299 8450-8580 D/ZCF localconnection: onIceGatheringChange COMPLETE
2019-08-30 12:35:53.512 8450-8580 I/ZCF: onIceConnectionChange ---> connectionState: 0 CONNECTING
2019-08-30 12:35:53.513 8450-8580 I/ZCF: onIceConnectionChange FAILED
2019-08-30 12:35:53.575 8450-8450 I/ZCF: reInitPeerConnection ---> Closing PeerConnection: 0
2019-08-30 12:35:53.579 8450-8580 I/ZCF: onIceConnectionChange ---> connectionState: 0 CONNECTING
2019-08-30 12:35:53.579 8450-8580 I/ZCF: onIceConnectionChange CLOSED
2019-08-30 12:35:53.580 8450-8580 D/ZCF localconnection: onConnectionChange CLOSED
2019-08-30 12:35:53.580 8450-8580 D/ZCF localconnection: onSignalingChange CLOSED

为了提高成功的连接速度我该怎么办?

我正在使用本地android WebRTC开发视频聊天应用程序。我正在使用公共Google STUN服务器以及XIRRYS STUN和TURN服务器。我的问题是成功的连接速率非常高...

答案

经过许多检查,并进行了许多测试和连接尝试。...经过如此多的日志和显示后,无论设备的网络如何,我都能够解决问题并成功实现100%的连接速率!

以上是关于Android WebRTC低成功连接率的主要内容,如果未能解决你的问题,请参考以下文章

Android push推送消息到达成功率优化

用metaRTC(yangwebrtc)搭建低延迟并节省一半码率的H265的webrtc应用

片段在较低版本的android中无法正常工作

webRTC Android开启底层日志

webrtc分辨率和比特率--问题集锦

webrtc分辨率和比特率--问题集锦