W3C WebRTC statistics (webrtc-stats)

View Source

webrtc:get_stats(Pc, #{format => w3c}) returns the statistics of Identifiers for WebRTC's Statistics API (webrtc_stats): a map from stats id to a map of the dictionary's members, with id, type and timestamp. You need it to compare a call with what a browser reports, or to feed tools written for getStats(). get_stats/1 keeps the internal format.

The member list below is the WebIDL of the specification (checked on 2026-11-17), one row per member. webrtc_stats_SUITE checks that every member reported belongs to its dictionary, that the required ones are there, that every id a report names exists, and that the counters of two peers agree; webrtc_pc_interop_SUITE:stats_agree compares them with Chrome's and Firefox's getStats().

Status: Reported or Not reported, with the reason.

Lifetime (W3C §4.3, §8.1): an inbound-rtp stream that ends (BYE, or 60 s without packets) is still reported with its last values. It is deleted when its SSRC is replaced on the same mid and rid, when an SSRC is recycled, or when its transceiver stops, as W3C asks. The library keeps at most 16 ended streams per transport, so a peer cannot grow this list.

RTCStats

MemberRequiredStatus
timestampyesReported: ms since the Unix epoch
typeyesReported
idyesReported

RTCRtpStreamStats

Inherits RTCStats.

MemberRequiredStatus
ssrcyesReported
kindyesReported: from the m= section
transportIdReported
codecIdReported: the section's first codec (RFC 9429 §5.3.1)

RTCCodecStats (codec)

Inherits RTCStats.

MemberRequiredStatus
payloadTypeyesReported
transportIdyesReported
mimeTypeyesReported
clockRateReported
channelsReported: audio
sdpFmtpLineReported

RTCReceivedRtpStreamStats

Inherits RTCRtpStreamStats.

MemberRequiredStatus
packetsReceivedReported: every packet, retransmissions included
packetsReceivedWithEct1Not reported: L4S (ECT(1)) not used
packetsReceivedWithCeNot reported: Not counted per stream
packetsReportedAsLostNot reported: Not counted (RFC 8888)
packetsReportedAsLostButRecoveredNot reported: Not counted (RFC 8888)
packetsLostReported: RFC 3550 §6.4.1 (remote-inbound: the report block)
jitterReported: RFC 3550 §A.8, in seconds

RTCInboundRtpStreamStats (inbound-rtp)

Inherits RTCReceivedRtpStreamStats.

MemberRequiredStatus
trackIdentifieryesReported: the mid: there is no MediaStreamTrack
midReported
remoteIdReported
framesDecodedReported by a codec plugin or webrtc:report_media_stats/4
keyFramesDecodedReported by a codec plugin or webrtc:report_media_stats/4
framesRenderedReported by a codec plugin or webrtc:report_media_stats/4
framesDroppedReported with frames on the transceiver, from the frame buffer: frames that missed packets or a frame they depend on
frameWidthReported with frames on the transceiver, from the frame buffer: from the last key frame (VP8, VP9 headers, H.264 SPS, AV1 sequence header)
frameHeightReported with frames on the transceiver, from the frame buffer: as frameWidth
framesPerSecondReported with frames on the transceiver, from the frame buffer: frames released in the last second
qpSumReported by a codec plugin or webrtc:report_media_stats/4
totalDecodeTimeReported by a codec plugin or webrtc:report_media_stats/4
totalInterFrameDelayReported by a codec plugin or webrtc:report_media_stats/4
totalSquaredInterFrameDelayReported by a codec plugin or webrtc:report_media_stats/4
pauseCountReported by a codec plugin or webrtc:report_media_stats/4
totalPausesDurationReported by a codec plugin or webrtc:report_media_stats/4
freezeCountReported by a codec plugin or webrtc:report_media_stats/4
totalFreezesDurationReported by a codec plugin or webrtc:report_media_stats/4
lastPacketReceivedTimestampReported
headerBytesReceivedReported
packetsDiscardedReported with frames on the transceiver, from the frame buffer: packets that came after their frame left
fecBytesReceivedReported with ULPFEC: payload bytes of the FEC packets
fecPacketsReceivedReported with ULPFEC
fecPacketsDiscardedReported with ULPFEC: FEC packets whose packets all arrived or were recovered otherwise, or that came too late
bytesReceivedReported: payload octets
nackCountReported
firCountReported
pliCountReported
totalProcessingDelayReported by a codec plugin or webrtc:report_media_stats/4
estimatedPlayoutTimestampReported with frames on the transceiver once a sync mapping is known (SR or RFC 6051): the sender's time of the last frame released, moved on by the time since, in ms since the Unix epoch. A codec plugin or webrtc:report_media_stats/4 overrides it
jitterBufferDelayReported with frames on the transceiver, from the frame buffer
jitterBufferTargetDelayReported with frames on the transceiver, from the frame buffer
jitterBufferEmittedCountReported with frames on the transceiver, from the frame buffer
jitterBufferMinimumDelayReported with frames on the transceiver, from the frame buffer: three times the jitter, before min_delay and the playout-delay extension
totalSamplesReceivedReported by a codec plugin or webrtc:report_media_stats/4
concealedSamplesReported by a codec plugin or webrtc:report_media_stats/4
silentConcealedSamplesReported by a codec plugin or webrtc:report_media_stats/4
concealmentEventsReported by a codec plugin or webrtc:report_media_stats/4
insertedSamplesForDecelerationReported by a codec plugin or webrtc:report_media_stats/4
removedSamplesForAccelerationReported by a codec plugin or webrtc:report_media_stats/4
audioLevelReported when the RFC 6464 extension is negotiated: the level the sender put in the last packet, not one measured on decoded audio
totalAudioEnergyReported with audioLevel: the level squared times each packet's duration (Opus TOC, G.711 and G.722 size)
totalSamplesDurationReported with audioLevel
framesReceivedReported with frames on the transceiver, from the frame buffer
decoderImplementationReported by a codec plugin or webrtc:report_media_stats/4: the plugin's info/1
playoutIdReported when the transceiver's playout is reported (media-playout)
powerEfficientDecoderReported by a codec plugin or webrtc:report_media_stats/4
framesAssembledFromMultiplePacketsReported with frames on the transceiver, from the frame buffer
totalAssemblyTimeReported with frames on the transceiver, from the frame buffer
retransmittedPacketsReceivedReported: RTX (RFC 4588)
retransmittedBytesReceivedReported
rtxSsrcReported
fecSsrcReported with FlexFEC: the repair stream; ULPFEC travels on the media SSRC
totalCorruptionProbabilityReported by a codec plugin or webrtc:report_media_stats/4
totalSquaredCorruptionProbabilityReported by a codec plugin or webrtc:report_media_stats/4
corruptionMeasurementsReported by a codec plugin or webrtc:report_media_stats/4

RTCRemoteInboundRtpStreamStats (remote-inbound-rtp)

Inherits RTCReceivedRtpStreamStats.

MemberRequiredStatus
localIdReported
roundTripTimeReported: from LSR and DLSR (RFC 3550 §6.4.1)
totalRoundTripTimeReported
fractionLostReported
roundTripTimeMeasurementsReported
packetsWithBleachedEct1MarkingNot reported: L4S (ECT(1)) not used

RTCSentRtpStreamStats

Inherits RTCRtpStreamStats.

MemberRequiredStatus
packetsSentReported: retransmissions included, on the RTX stream or not
bytesSentReported: payload octets, retransmissions included

RTCOutboundRtpStreamStats (outbound-rtp)

Inherits RTCSentRtpStreamStats.

MemberRequiredStatus
midReported
mediaSourceIdReported when the transceiver's source is reported (media-source)
remoteIdReported
ridReported
encodingIndexReported: the layer's place in the send encodings, 0 for a single stream
headerBytesSentReported
retransmittedPacketsSentReported
retransmittedBytesSentReported: payload octets of RTX packets; a retransmission without RTX replays the protected packet and adds no bytes
rtxSsrcReported when RTX is negotiated
targetBitrateReported by a codec plugin or webrtc:report_media_stats/4
totalEncodedBytesTargetReported by a codec plugin or webrtc:report_media_stats/4
frameWidthReported: from the key frames sent (VP8, VP9 headers, H.264 SPS, AV1 sequence header)
frameHeightReported: as frameWidth
framesPerSecondReported: frames sent in the last second
framesSentReported: video frames, by marker bit
hugeFramesSentReported: frames of at least 2.5 times the average size of the frames sent before
framesEncodedReported by a codec plugin or webrtc:report_media_stats/4
keyFramesEncodedReported by a codec plugin or webrtc:report_media_stats/4
qpSumReported by a codec plugin or webrtc:report_media_stats/4
psnrSumReported by a codec plugin or webrtc:report_media_stats/4
psnrMeasurementsReported by a codec plugin or webrtc:report_media_stats/4
totalEncodeTimeReported by a codec plugin or webrtc:report_media_stats/4
totalPacketSendDelayReported: the time packets wait in the pacer
qualityLimitationReasonReported by a codec plugin or webrtc:report_media_stats/4
qualityLimitationDurationsReported by a codec plugin or webrtc:report_media_stats/4
qualityLimitationResolutionChangesReported by a codec plugin or webrtc:report_media_stats/4
nackCountReported
firCountReported
pliCountReported
encoderImplementationReported by a codec plugin or webrtc:report_media_stats/4: the plugin's info/1
powerEfficientEncoderReported by a codec plugin or webrtc:report_media_stats/4
activeReported
scalabilityModeReported by a codec plugin or webrtc:report_media_stats/4
packetsSentWithEct1Not reported: L4S (ECT(1)) not used

RTCRemoteOutboundRtpStreamStats (remote-outbound-rtp)

Inherits RTCSentRtpStreamStats.

MemberRequiredStatus
localIdReported
remoteTimestampReported: the sender report NTP time
reportsSentReported
roundTripTimeReported: from the DLRR block (RFC 3611 §4.5) answering our Receiver Reference Time block, which libwebrtc sends
totalRoundTripTimeReported: as roundTripTime
roundTripTimeMeasurementsReported: as roundTripTime

RTCMediaSourceStats (media-source)

Inherits RTCStats.

Reported when a codec plugin or webrtc:report_media_stats/4 (source) reports the transceiver's source; the outbound stream then names it in mediaSourceId.

MemberRequiredStatus
trackIdentifieryesReported: the mid
kindyesReported

RTCAudioSourceStats

Inherits RTCMediaSourceStats.

MemberRequiredStatus
audioLevelReported by a codec plugin or webrtc:report_media_stats/4
totalAudioEnergyReported by a codec plugin or webrtc:report_media_stats/4
totalSamplesDurationReported by a codec plugin or webrtc:report_media_stats/4
echoReturnLossReported by a codec plugin or webrtc:report_media_stats/4
echoReturnLossEnhancementReported by a codec plugin or webrtc:report_media_stats/4

RTCVideoSourceStats

Inherits RTCMediaSourceStats.

MemberRequiredStatus
widthReported by a codec plugin or webrtc:report_media_stats/4
heightReported by a codec plugin or webrtc:report_media_stats/4
framesReported by a codec plugin or webrtc:report_media_stats/4
framesPerSecondReported by a codec plugin or webrtc:report_media_stats/4

RTCAudioPlayoutStats (media-playout)

Inherits RTCStats.

Reported when webrtc:report_media_stats/4 (playout) reports the playout of a received audio transceiver; the inbound stream then names it in playoutId.

MemberRequiredStatus
kindyesReported: audio
synthesizedSamplesDurationReported by a codec plugin or webrtc:report_media_stats/4
synthesizedSamplesEventsReported by a codec plugin or webrtc:report_media_stats/4
totalSamplesDurationReported by a codec plugin or webrtc:report_media_stats/4
totalPlayoutDelayReported by a codec plugin or webrtc:report_media_stats/4
totalSamplesCountReported by a codec plugin or webrtc:report_media_stats/4

RTCPeerConnectionStats (peer-connection)

Inherits RTCStats.

MemberRequiredStatus
dataChannelsOpenedReported
dataChannelsClosedReported

RTCDataChannelStats (data-channel)

Inherits RTCStats.

MemberRequiredStatus
labelReported
protocolReported
dataChannelIdentifierReported
stateyesReported
messagesSentReported
bytesSentReported
messagesReceivedReported
bytesReceivedReported

RTCTransportStats (transport)

Inherits RTCStats.

MemberRequiredStatus
packetsSentReported: datagrams other than ICE checks
packetsReceivedReported
bytesSentReported
bytesReceivedReported
iceRoleReported
iceLocalUsernameFragmentReported
dtlsStateyesReported
iceStateReported
selectedCandidatePairIdReported
localCertificateIdReported
remoteCertificateIdReported
tlsVersionReported
dtlsCipherReported
dtlsRoleReported
srtpCipherReported
selectedCandidatePairChangesReported
ccfbMessagesSentReported: RFC 8888 feedback packets
ccfbMessagesReceivedReported: RFC 8888 feedback packets

RTCIceCandidateStats (local-candidate, remote-candidate)

Inherits RTCStats.

MemberRequiredStatus
transportIdyesReported
addressReported
portReported
protocolReported
candidateTypeyesReported
priorityReported
urlReported for server reflexive and relay candidates of a server given by URI
relayProtocolReported for relay candidates: how the TURN server is reached
foundationReported
relatedAddressReported
relatedPortReported
usernameFragmentReported
tcpTypeReported

RTCIceCandidatePairStats (candidate-pair)

Inherits RTCStats.

MemberRequiredStatus
transportIdyesReported
localCandidateIdyesReported
remoteCandidateIdyesReported
stateyesReported
nominatedReported
packetsSentReported: the selected pair: the transport's datagrams
packetsReceivedReported
bytesSentReported
bytesReceivedReported
lastPacketSentTimestampReported on the selected pair
lastPacketReceivedTimestampReported on the selected pair
totalRoundTripTimeReported: every check and consent response with a round trip (not those of retransmitted requests)
currentRoundTripTimeReported: the last check
availableOutgoingBitrateReported: the congestion control target
availableIncomingBitrateNot reported: Receiver side estimate (REMB) not computed
requestsReceivedReported
requestsSentReported
responsesReceivedReported
responsesSentReported
consentRequestsSentReported
packetsDiscardedOnSendReported on the selected pair: datagrams the socket refused
bytesDiscardedOnSendReported on the selected pair

RTCCertificateStats (certificate)

Inherits RTCStats.

MemberRequiredStatus
fingerprintyesReported
fingerprintAlgorithmyesReported: sha-256
base64CertificateyesReported
issuerCertificateIdNot reported: Self-signed certificates only