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
trackframeskeyframesnackplifirvideo

Frame and packet counters (feature)

Track-level cumulative counters (frames, key frames, QP sum, and NACK/PLI/FIR feedback) summarising a track's lifetime volume and loss recovery.

Description

Track-level features, extracted per media track into features_track, read from the last getStats.

Cumulative counters describing a track's lifetime:

Extracted by the open-source rtcstats-features package.

Why it matters

These counters are the raw material for loss and quality ratios. nackCount, pliCount, and firCount are recovery signals: they rise when packets are lost and the receiver has to ask for retransmissions or fresh key frames, so a high count per minute of video is a direct symptom of a lossy path. keyFrameCount relative to frameCount shows how often the stream had to reset (frequent key frames waste bitrate). qpSum divided by frameCount approximates average quantization, a rough encoded-quality proxy.

Common values

  • Interpret as rates (per second or per frame), not absolutes: a long call naturally accumulates large counts.
  • Elevated pliCount/firCount per minute indicates repeated key-frame requests, usually from packet loss.

SQL example

Average NACK/PLI/FIR per inbound video track, on connections that actually established:

SELECT
  AVG(track.nack_count) AS avg_nack,
  AVG(track.pli_count)  AS avg_pli,
  AVG(track.fir_count)  AS avg_fir
FROM features_track AS track
JOIN features_connection AS connection ON connection.id = track.connection_id
WHERE connection.connected          -- only connections that reached 'connected'
  AND track.kind = 'video'          -- 'audio' or 'video'
  AND track.direction = 'inbound';  -- 'inbound' or 'outbound'

Related features

  • Freezes - the user-visible consequence when recovery fails.
  • Quality limitation - encoder-side constraints on outbound video.
  • Codec - which codec produced these frames.