如何判断 WebRTC 调用的质量

Posted

技术标签:

【中文标题】如何判断 WebRTC 调用的质量【英文标题】:How to determine the quality of WebRTC call 【发布时间】:2018-12-17 19:20:09 【问题描述】:

这是我从 android 中的 Peerconnection jingle 库中获得的统计报告信息。

如果可能,我想在 UI 上显示一个指示器,以根据此报告向用户显示当前通话质量。

我不确定如何确定通话质量好还是差

发送视频统计数据

s-s-rc_2849248716_send
bytesSent=44487
codecImplementationName=HWEncoder
framesEncoded=30
mediaType=video
packetsLost=0
packetsSent=68
qpSum=2200
s-s-rc=2849248716
transportId=Channel-0-1
AdaptationChanges=0
AvgEncodeMs=0
BandwidthLimitedResolution=true
CodecName=VP8
ContentType=realtime
CpuLimitedResolution=false
EncodeUsagePercent=0
FirsReceived=0
FrameHeightInput=720
FrameHeightSent=360
FrameRateInput=30
FrameRateSent=30
FrameWidthInput=1280
FrameWidthSent=640
HasEnteredLowResolution=false
hugeFramesSent=0
NacksReceived=0
PlisReceived=0
Rtt=0
TrackId=ARDAMSv0

接收视频统计数据

s-s-rc_1142651072_recv
bytesReceived=22760
codecImplementationName=HWDecoder
framesDecoded=21
mediaType=video
packetsLost=0
packetsReceived=31
qpSum=1684
transportId=Channel-0-1
CaptureStartNtpTimeMs=0
CodecName=VP8
ContentType=realtime
CurrentDelayMs=108
DecodeMs=14
FirsSent=0
FrameHeightReceived=360
FrameRateDecoded=34
FrameRateOutput=34
FrameRateReceived=25
FrameWidthReceived=640
InterframeDelayMax=46
JitterBufferMs=77
MaxDecodeMs=21
MinPlayoutDelayMs=0
NacksSent=0
PlisSent=0
RenderDelayMs=10
TargetDelayMs=108
TimingFrameInfo=126116936,-226,-207,-13,-13,-1,-226,-226,5772436049,5772436065,5772436217,5772436273,5772436065,0,1
TrackId=ARDAMSv0

BWE 统计 = bweforvideo

ActualEncBitrate=291163
ReceiveBandwidth=0
SendBandwidth=1654217
BucketDelay=0
RetransmitBitrate=0
TargetEncBitrate=1654217
TransmitBitrate=389383

连接统计 = Conn-0-1-0

ActiveConnection=true
bytesReceived=17759
bytesSent=31747
packetsSent=75
Readable=true
requestsSent=3
consentRequestsSent=1
responsesSent=3
requestsReceived=3
responsesReceived=3
ChannelId=Channel-0-1
localCandidateId=Cand-P/Rpk08E
LocalCandidateType=prflx
remoteCandidateId=Cand-gAVGaHs7
RemoteCandidateType=relay
Rtt=110
packetsDiscardedOnSend=0
TransportType=udp
Writable=true
onPeerConnectionStatsReady: fps = 30 target BR = 1654217 actual BR = 291163

【问题讨论】:

【参考方案1】:

我建议向他们展示基本的统计数据作为第一步,例如Packet loss %bandwidth (upload & download),如果可能的话,还可以显示网络信号强度。每两秒计算一次。

参考:

Chromes Webrtc 统计数据:chrome://webrtc-internals

信号强度:How to detect internet speed in javascript?

丢包:Math.round((totalPacketLost / totalPacketSent) * 1000);

【讨论】:

以上是关于如何判断 WebRTC 调用的质量的主要内容,如果未能解决你的问题,请参考以下文章

机器人地图---如何判断建图的质量

机器人地图---如何判断建图的质量

webrtc packetbuffer 完整frame 判断

webrtc packetbuffer 完整frame 判断

webrtc packetbuffer 完整frame 判断

光模块质量如何判断?