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

2

10

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?

Demurrer answered 10/1, 2019 at 8:12 Comment(1)
can u explain how u get Jitter, RTT, Packet lost, etc? or example code please.Deformity
D
8

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

Demurrer answered 17/1, 2019 at 7:37 Comment(1)
can u show the example js code for this formula?Deformity
C
1

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.

Cuspidor answered 28/8, 2023 at 4:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.