WebRTC Metrics
A comprehensive overview of WebRTC statistics, derived indicators, and observable signals, to better understand call quality, connectivity, and user experience in rtcStats
The Complete WebRTC getStats() Reference
Every metric, explained in plain English. Built for developers who debug real-time communications.
WebRTC's getStats() API exposes over 200 metrics across 10 stat types. The W3C spec defines them formally. This reference explains what they actually mean - what values to expect, what causes anomalies, and how to act on them.
Each entry links to a detailed KB article with practical interpretation guidance.
Before we begin, it might make sense for you to understand the structure of the results coming from getStats(). Here is a short video explainer:
Inbound RTP Stream Stats
Metrics for media streams you are receiving. This is where you find packet loss, jitter, decoded frames, concealment, and all inbound quality signals.
Core Counters
| Metric | What it tells you |
|---|---|
| packetsReceived | Total RTP packets received for this stream |
| bytesReceived | Total payload bytes received |
| headerBytesReceived | RTP header bytes (overhead indicator) |
| packetsLost | Cumulative packets lost as reported by RTCP |
| packetsDiscarded | Packets received but dropped (e.g., arrived too late) |
Network Quality
| Metric | What it tells you |
|---|---|
| jitter(ms) | Packet arrival time variance - higher means more network instability |
| jitterBufferDelay | Total time samples/frames spent in the jitter buffer |
| jitterBufferEmittedCount | Count of samples/frames emitted from jitter buffer |
| jitterBufferMinimumDelay | Minimum delay the jitter buffer targets |
| jitterBufferTargetDelay | Current target delay of the jitter buffer |
| jitterBufferFlushes | Times the jitter buffer was flushed (quality disruptions) |
Audio Quality
These metrics only appear for audio channels.
| Metric | What it tells you |
|---|---|
| audioLevel | Current audio level (0.0 silent to 1.0 max) |
| totalAudioEnergy | Cumulative audio energy - useful for RMS calculation |
| totalSamplesDuration | Total duration of audio samples received |
| totalSamplesReceived | Total audio samples received |
| concealedSamples | Audio samples generated locally to hide packet loss |
| silentConcealedSamples | Concealed samples that were silence |
| concealmentEvents | Number of concealment events |
| insertedSamplesForDeceleration | Samples inserted to slow down playout |
| removedSamplesForAcceleration | Samples removed to speed up playout |
Video Quality
These metrics only appear for video channels.
| Metric | What it tells you |
|---|---|
| framesReceived | Total video frames received |
| framesDecoded | Total video frames successfully decoded |
| framesDropped | Frames dropped before rendering (performance issue) |
| framesRendered | Frames actually rendered to the user |
| framesPerSecond | Current frame rate |
| frameWidth | Current decoded frame width |
| frameHeight | Current decoded frame height |
| keyFramesDecoded | Total keyframes decoded |
| framesAssembledFromMultiplePackets | Frames that required multiple packets |
| qpSum | Sum of QP values - indicates compression level |
| totalDecodeTime | Total time spent decoding |
| totalInterFrameDelay | Sum of inter-frame delays |
| totalSquaredInterFrameDelay | For jitter calculation on frame delivery |
| totalAssemblyTime | Total time assembling frames from packets |
| totalProcessingDelay | Total processing delay from receipt to decode |
| freezeCount | Number of video freezes detected |
| totalFreezesDuration | Total duration of video freezes |
| pauseCount | Number of video pauses |
| totalPausesDuration | Total duration of video pauses |
| interruptionCount | Stream interruptions detected |
| totalInterruptionDuration | Total duration of interruptions |
| minPlayoutDelay | Minimum playout delay set by the application |
Error Correction & Retransmission
| Metric | What it tells you |
|---|---|
| fecPacketsReceived | Forward Error Correction packets received |
| fecPacketsDiscarded | FEC packets that arrived but weren't needed |
| fecBytesReceived | Bytes from FEC packets |
| retransmittedPacketsReceived | NACK-triggered retransmissions received |
| retransmittedBytesReceived | Bytes from retransmitted packets |
| nackCount | NACKs sent requesting retransmission |
| firCount | Full Intra Requests sent (keyframe requests) |
| pliCount | Picture Loss Indications sent |
Corruption Measurement
| Metric | What it tells you |
|---|---|
| corruptionMeasurements | Number of corruption measurements taken |
| totalCorruptionProbability | Cumulative corruption probability |
| totalSquaredCorruptionProbability | For variance calculation |
ECN (Explicit Congestion Notification)
| Metric | What it tells you |
|---|---|
| packetsReceivedWithCE | Packets marked with Congestion Experienced |
| packetsReceivedWithECT1 | Packets with ECN-Capable Transport mark |
| packetsReportedAsLost | Packets reported as lost in RTCP |
| packetsReportedAsLostButRecovered | Lost packets that were later recovered |
Outbound RTP Stream Stats
Metrics for media streams you are sending. Covers encoding performance, bitrate, retransmissions, and quality limitations.
Core Counters
| Metric | What it tells you |
|---|---|
| packetsSent | Total RTP packets sent |
| bytesSent | Total payload bytes sent |
| headerBytesSent | RTP header bytes (overhead indicator) |
| retransmittedPacketsSent | Packets sent as NACK retransmissions |
| retransmittedBytesSent | Bytes from retransmitted packets |
Encoding & Video
These metrics only appear for video channels.
| Metric | What it tells you |
|---|---|
| framesEncoded | Total video frames encoded |
| framesSent | Total video frames sent |
| framesPerSecond | Current outbound frame rate |
| frameWidth | Current encoded frame width |
| frameHeight | Current encoded frame height |
| hugeFramesSent | Frames much larger than average (spike indicator) |
| qpSum | Sum of QP values - tracks compression aggressiveness |
| totalEncodeTime | Total time spent encoding |
| totalEncodedBytesTarget | Target bytes the encoder aimed for |
| totalPacketSendDelay | Time packets waited before being sent |
Bitrate & Bandwidth
| Metric | What it tells you |
|---|---|
| targetBitrate | Current encoder target bitrate |
| qualityLimitationDurations | Time spent limited by CPU, bandwidth, or other factors |
Feedback Received
| Metric | What it tells you |
|---|---|
| nackCount | NACKs received from the remote side |
| firCount | FIR requests received |
| pliCount | PLI requests received |
ECN
| Metric | What it tells you |
|---|---|
| packetsSentWithECT1 | Packets sent with ECN marking |
Remote Inbound RTP Stats
Metrics reported by the remote peer about streams you sent. This is your view into how the other side is receiving your media - their packet loss, jitter, and round-trip time.
| Metric | What it tells you |
|---|---|
| packetsReceived | Packets the remote received from you |
| packetsLost | Packets the remote reports as lost |
| jitter(ms) | Jitter as measured by the remote receiver |
| roundTripTime(ms) | Current round-trip time to the remote peer |
| totalRoundTripTime | Cumulative RTT for averaging |
| roundTripTimeMeasurements | Number of RTT measurements taken |
| fractionLost | Fraction of packets lost in the last reporting interval |
ECN (Remote Side)
| Metric | What it tells you |
|---|---|
| packetsReceivedWithCE | Congestion-marked packets at remote |
| packetsReceivedWithECT1 | ECN-capable packets at remote |
| packetsReportedAsLost | Packets reported lost by remote |
| packetsReportedAsLostButRecovered | Lost packets recovered at remote |
| packetsWithBleachedECT1Marking | ECN marks stripped by the network |
Remote Outbound RTP Stats
Metrics reported by the remote peer about streams they are sending to you. Gives you insight into the sender's perspective.
| Metric | What it tells you |
|---|---|
| packetsSent | Packets the remote has sent |
| bytesSent | Bytes the remote has sent |
| reportsSent | RTCP Sender Reports received |
| roundTripTime(ms) | RTT calculated from Sender Reports |
| totalRoundTripTime | Cumulative RTT for averaging |
| roundTripTimeMeasurements | Number of RTT measurements |
ICE Candidate Pair Stats
Metrics for the network path between you and the remote peer. Covers bandwidth estimation, round-trip time, and packet flow at the transport level.
Bandwidth & Throughput
| Metric | What it tells you |
|---|---|
| availableOutgoingBitrate | Estimated available bandwidth for sending |
| availableIncomingBitrate | Estimated available bandwidth for receiving |
| bytesSent | Total bytes sent on this pair |
| bytesReceived | Total bytes received on this pair |
| bytesDiscardedOnSend | Bytes dropped before sending |
Connectivity
| Metric | What it tells you |
|---|---|
| currentRoundTripTime(ms) | Latest measured RTT on this path |
| totalRoundTripTime | Cumulative RTT for averaging |
| responsesReceived | STUN connectivity check responses received |
| requestsSent | STUN connectivity check requests sent |
| requestsReceived | STUN connectivity check requests received |
| responsesReceived | Responses to STUN requests |
| responsesSent | Responses sent to STUN requests |
| consentRequestsSent | STUN consent freshness requests |
Packet Flow
| Metric | What it tells you |
|---|---|
| packetsSent | Total packets sent on this pair |
| packetsReceived | Total packets received on this pair |
| packetsDiscardedOnSend | Packets dropped before sending |
Timestamps
| Metric | What it tells you |
|---|---|
| lastPacketSentTimestamp | When the last packet was sent |
| lastPacketReceivedTimestamp | When the last packet was received |
ICE Candidate Stats
Details about individual local and remote ICE candidates - the network addresses and paths available for the connection.
Local Candidate
| Metric | What it tells you |
|---|---|
| address | Local IP address (may be redacted for privacy) |
| port | Local port number |
| protocol | Transport protocol (UDP/TCP) |
| candidateType | How the address was obtained (host/srflx/prflx/relay) |
| priority | ICE priority for pair ordering |
| url | STUN/TURN server URL used to gather this candidate |
| relayProtocol | Protocol used to reach the TURN server (udp/tcp/tls) |
Remote Candidate
| Metric | What it tells you |
|---|---|
| address | Remote peer's IP address |
| port | Remote peer's port number |
| protocol | Transport protocol (UDP/TCP) |
| candidateType | How the remote address was obtained |
Transport Stats
Aggregate metrics at the DTLS/ICE transport layer - the encrypted tunnel that carries all media and data.
Bytes & Packets
| Metric | What it tells you |
|---|---|
| bytesSent | Total bytes sent at the transport layer |
| bytesReceived | Total bytes received at the transport layer |
| packetsSent | Total packets sent at the transport layer |
| packetsReceived | Total packets received at the transport layer |
Security
| Metric | What it tells you |
|---|---|
| dtlsState | DTLS handshake state (new/connecting/connected/closed/failed) |
| dtlsCipher | Negotiated DTLS cipher suite |
| tlsVersion | TLS version used for DTLS |
| srtpCipher | SRTP cipher protecting the media |
ICE State
| Metric | What it tells you |
|---|---|
| iceState | ICE connectivity state |
| selectedCandidatePairId | Currently active candidate pair |
| selectedCandidatePairChanges | Number of path switches during the session |
Codec Stats
Details about the audio and video codecs negotiated for each stream.
| Metric | What it tells you |
|---|---|
| payloadType | RTP payload type number |
| mimeType | Codec identifier (e.g., video/VP8, audio/opus) |
| clockRate | Codec clock rate in Hz |
| channels | Audio channel count (mono/stereo) |
| sdpFmtpLine | Codec-specific SDP parameters |
Media Source Stats
Metrics from the local media source before encoding - the raw camera/microphone input.
Audio Source
| Metric | What it tells you |
|---|---|
| audioLevel | Current microphone audio level |
| totalAudioEnergy | Cumulative audio energy from the source |
| totalSamplesDuration | Duration of audio samples captured |
| echoReturnLoss | Echo cancellation effectiveness |
| echoReturnLossEnhancement | Additional echo suppression |
Video Source
| Metric | What it tells you |
|---|---|
| width | Camera capture width |
| height | Camera capture height |
| frames | Total frames from the camera |
| framesPerSecond | Current camera frame rate |
Media Playout Stats
Metrics about audio playout to the speakers/headphones.
| Metric | What it tells you |
|---|---|
| totalPlayoutDelay | Cumulative delay from jitter buffer to speaker |
| totalSamplesCount | Total samples played out |
| totalSamplesDuration | Total duration of played audio |
Certificate Stats
Details about the DTLS certificates used to secure the connection.
| Metric | What it tells you |
|---|---|
| fingerprint | Certificate fingerprint for DTLS verification |
| fingerprintAlgorithm | Hash algorithm used (typically sha-256) |
Peer Connection Stats
Session-level metrics about the RTCPeerConnection itself.
| Metric | What it tells you |
|---|---|
| dataChannelsOpened | Total data channels opened during the session |
| dataChannelsClosed | Total data channels closed during the session |
Data Channel Stats
Metrics for individual RTCDataChannels - the non-media data pathway.
| Metric | What it tells you |
|---|---|
| bytesSent | Bytes sent through this data channel |
| bytesReceived | Bytes received on this data channel |
| messagesSent | Messages sent |
| messagesReceived | Messages received |
Calculated Metrics
rtcStats computes additional derived metrics that aren't in the raw getStats() output but are essential for understanding quality.
Bitrate (bits/s)
| Metric | What it tells you |
|---|---|
| inbound-rtp.bytesReceived(bits/s) | Inbound media bitrate |
| outbound-rtp.bytesSent(bits/s) | Outbound media bitrate |
| candidate-pair.bytesSent(bits/s) | Transport-level send bitrate |
| candidate-pair.bytesReceived(bits/s) | Transport-level receive bitrate |
Packet Loss
| Metric | What it tells you |
|---|---|
| inbound-rtp.packetsLost(%) | Inbound packet loss percentage |
| remote-inbound-rtp.packetsLost(%) | Remote-side packet loss percentage |
Latency
| Metric | What it tells you |
|---|---|
| candidate-pair.totalRoundTripTime/responsesReceived | Average RTT |
| remote-inbound-rtp.totalRoundTripTime/roundTripTimeMeasurements | Average RTT from RTCP |
| inbound-rtp.jitterBufferDelay/jitterBufferEmittedCount(ms) | Average jitter buffer delay |
| media-playout.totalPlayoutDelay/totalSamplesCount(ms) | Average playout delay |
MOS Score
| Metric | What it tells you |
|---|---|
| MOS | Estimated Mean Opinion Score (1-5) for voice and quality |
Frame & Sample Rates
| Metric | What it tells you |
|---|---|
| inbound-rtp.framesDecoded(/s) | Decoded frame rate |
| inbound-rtp.framesReceived(/s) | Received frame rate |
| outbound-rtp.framesEncoded(/s) | Encoded frame rate |
| outbound-rtp.framesSent(/s) | Sent frame rate |
Observations
Beyond raw metrics, rtcStats automatically detects 100+ behavioral patterns and anomalies - from symmetric NAT detection to CPU-limited encoding, from buffer bloat to echo feedback loops. Browse the full observations library.
This reference covers all metrics defined in the W3C WebRTC Statistics API plus rtcStats calculated metrics. Each entry links to a detailed KB article with interpretation guidance, anomaly causes, and related metrics.
Built and maintained by rtcStats - WebRTC session quality, decoded.