Is there a formula for rating WebRTC audio quality as Excellent, Good, Fair, or Poor?

2.8k views Asked by At

I have been able to get various stats (Jitter, RTT, Packet lost, etc) of WebRTC audio call using RTCPeerConnection.getStats() API.

I need to rate the overall call quality as Excellent, Good, Fair, or Poor.

Is there a formula that uses WebRTC stats to give a overall rating? if not, which of the WebRTC stat(s) that I should give more weightage?

2

There are 2 answers

1
Girish MC On BEST ANSWER

We ended up using MOS (mean opinion score) algorithm to calculate voice call quality metric.

Here is the formula we used -

Take the average latency, add jitter, but double the impact to latency then add 10 for protocol latencies EffectiveLatency = ( AverageLatency + Jitter * 2 + 10 )

Implement a basic curve - deduct 4 for the R value at 160ms of latency (round trip). Anything over that gets a much more agressive deduction if EffectiveLatency < 160 then R = 93.2 - (EffectiveLatency / 40) else R = 93.2 - (EffectiveLatency - 120) / 10

Now, let's deduct 2.5 R values per percentage of packet loss R = R - (PacketLoss * 2.5)

Convert the R into an MOS value.(this is a known formula) MOS = 1 + (0.035) * R + (.000007) * R * (R-60) * (100-R)

We found the formula from https://www.pingman.com/kb/article/how-is-mos-calculated-in-pingplotter-pro-50.html

0
JasonDesh On

MOS (mean opinion score) is what are you looking for to estimate network quality. This algorithm is a part of tiny webrtc-issue-detector library so you can use it on the client side to analyze and monitor your getStats() results. The library also identifies issues that may affect media quality like client CPU issues, network or server side issues.