WebRTC Metrics

A comprehensive overview of WebRTC statistics, derived calculations, extracted features, and observable signals, to better understand call quality, connectivity, and user experience in rtcStats

Back
On this page6 sections
connectionbitraterttlatencyquality

Lifetime averages (feature)

Last updated Applies tortcstats-serverrtcstats.com

Connection-level features summarising the whole connection in three numbers: average STUN round-trip time and average inbound and outbound bitrate.

Description

Connection-level features, extracted per RTCPeerConnection into features_connection.

These three features compress the entire connection into lifetime averages, computed from the last getStats ratios:

Extracted by the open-source rtcstats-features package.

Why it matters

Per-connection lifetime averages are the cheapest way to characterise call quality across a large population. averageStunRoundTripTime is your network-latency proxy: trend it by region or over time to catch degradation. The two bitrate averages tell you how much media actually flowed each way; unusually low values flag starved connections, and the asymmetry between them is often meaningful (e.g. a receive-heavy viewer vs a send-heavy presenter). Because they are single numbers per connection, they aggregate cleanly into dashboards.

Typical values

  • averageStunRoundTripTime: good < 100 ms; concerning 100 to 300 ms; poor > 300 ms (highly network-dependent).
  • Bitrates: interpret against your own codec/resolution targets. The useful signal is the distribution and its change over time, not an absolute threshold.

SQL example

Median STUN RTT and average bitrates by week:

SELECT
  DATE_TRUNC('week', server.created_at) AS week,
  PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY connection.average_stun_round_trip_time) AS median_rtt,
  AVG(connection.average_inbound_bitrate)  AS avg_in_bps,
  AVG(connection.average_outbound_bitrate) AS avg_out_bps
FROM "rtcstats-server" AS server
JOIN features_metadata   AS metadata   ON metadata.dump_id   = server.id
JOIN features_connection AS connection ON connection.dump_id = metadata.id
WHERE connection.connected -- steady-state averages only mean something once media flowed
GROUP BY week
ORDER BY week ASC;

See also