【发布时间】:2021-01-17 01:25:07
【问题描述】:
我正在使用以下 sdk 为 uwp 实现 webrtc:https://github.com/webrtc-uwp/webrtc-uwp-sdk/tree/releases/m71
虽然在发生丢包时我的通话质量存在一些问题,但该实现通常运行良好。发生的情况是,当一个数据包或几个数据包丢失时,帧率会大大降低。考虑从 30 FPS 到小于 1 FPS。不过音频还不错。如果我的客户在连接再次改善时恢复,这将不是问题。但是此时,如果出现问题,则视频对于通话的其余部分不利。
我不知道问题可能出在哪里。据我了解,webrtc 应该补偿数据包丢失?我在想问题可能出在我正在使用的 sdk 中。当我从其他对等方获得视频轨道时,我只是将它连接到 uwp 中的媒体元素,因此我自己不处理传入的帧。作为旁注,我已经测试过在调用期间暂停调试器,这也会导致远程和本地轨道的帧速率不佳。然而值得注意的是,即使我的本地视频帧速率不佳,它在其他客户端上看起来也不错。这表明在本地播放视频轨道中的视频时出现问题。
我包括我的本地 sdp,以防万一它有问题:
v=0
o=- 3875426963439162405 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=msid-semantic: WMS
m=video 52241 UDP/TLS/RTP/SAVPF 96 98
c=IN IP4 ...MY IP ADRESS...
b=AS:1264
a=rtcp:9 IN IP4 0.0.0.0
... SOME ICE CANDIDATES ...
a=ice-ufrag:6ZNW
a=ice-pwd:1JMvi96Ju3YZCX9S+ChJNH2C
a=fingerprint:sha-256 7B:F5:B5:49:E7:76:54:5F:55:D6:D3:2E:97:38:E0:63:63:5F:2E:53:49:BC:BD:B9:1D:40:45:4B:EC:1E:EE:D4
a=setup:actpass
a=mid:0
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:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:- SELF_VIDEO
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: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=fmtp:98 x-google-profile-id=0
a=ssrc-group:FID 2190372283 111930078
a=ssrc:2190372283 cname:C+phDL3HvwhlyByD
a=ssrc:2190372283 msid: SELF_VIDEO
a=ssrc:2190372283 mslabel:
a=ssrc:2190372283 label:SELF_VIDEO
a=ssrc:111930078 cname:C+phDL3HvwhlyByD
a=ssrc:111930078 msid: SELF_VIDEO
a=ssrc:111930078 mslabel:
a=ssrc:111930078 label:SELF_VIDEO
m=audio 52242 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126
c=IN IP4 ...MY IP ADRESS...
a=rtcp:9 IN IP4 0.0.0.0
... SOME ICE CANDIDATES ...
a=ice-ufrag:6ZNW
a=ice-pwd:1JMvi96Ju3YZCX9S+ChJNH2C
a=fingerprint:sha-256 7B:F5:B5:49:E7:76:54:5F:55:D6:D3:2E:97:38:E0:63:63:5F:2E:53:49:BC:BD:B9:1D:40:45:4B:EC:1E:EE:D4
a=setup:actpass
a=mid:1
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:- SELF_AUDIO
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:2339515350 cname:C+phDL3HvwhlyByD
a=ssrc:2339515350 msid: SELF_AUDIO
a=ssrc:2339515350 mslabel:
a=ssrc:2339515350 label:SELF_AUDIO
对于可能出现的问题的任何帮助或建议将不胜感激!
【问题讨论】: