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
Track identity (feature)
Track-level identity features that set the grain of a track row: media kind, direction, track identifier, and when the track was added.
Description
Track-level features, extracted per media track into features_track.
These features identify what a features_track row is and how it joins to the rest of a session:
kind- media type of the track,audioorvideo.direction-outbound(sent by this peer) orinbound(received by this peer).trackIdentifier- the track id, ties the row back to a specificMediaStreamTrack.startTime- when the track was added to the connection.
Extracted by the open-source rtcstats-features package.
Why it matters
kind and direction are the two filters you reach for on almost every feature query. A single connection carries audio and video, sent and received, so every metric in features_track is meaningful only once you have split by these two columns. Audio concealment, video freezes, encoder cost: each belongs to one specific slice, and mixing slices produces numbers that mean nothing.
trackIdentifier gives you a stable handle on one track across the session, useful when you correlate a track row with raw getStats dumps or with signaling logs. startTime tells you when the track joined, which matters for tracks added mid-call (a screen share started later, a camera toggled on) and for normalizing cumulative counters by how long the track was actually live.
Treat features_track.connection_id = features_connection.id as the join key, then filter on kind and direction to reach the grain you want.
SQL example
Count tracks by kind and direction:
SELECT
track.kind, -- 'audio' or 'video'
track.direction, -- 'inbound' or 'outbound'
COUNT(*) AS tracks
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
JOIN features_track AS track ON track.connection_id = connection.id
GROUP BY track.kind, track.direction
ORDER BY track.kind, track.direction;
Related features
- Codec - the negotiated codec for each identified track.
See also
- rtcstats-server feature extraction - the full feature reference. These features are extracted by rtcstats-server and live in the open-source
rtcstats-featurespackage.