RTCInboundRtpStreamStats

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

* Some parts of this feature may have varying levels of support.

The RTCInboundRtpStreamStats dictionary of the WebRTC API is used to report statistics related to the receiving end of an RTP stream on the local end of the RTCPeerConnection.

The statistics can be obtained by iterating the RTCStatsReport returned by RTCPeerConnection.getStats() or RTCRtpReceiver.getStats() until you find a report with the type of inbound-rtp.

Instance properties

audioLevel

A number that indicates the audio level of the received track. Undefined for video streams.

bytesReceived

A positive integer that indicates the total number of bytes that have been received so far for this media source.

concealedSamples

A positive integer that indicates the number of samples that had to be concealed because they were in packets that were lost or arrived too late to be played out. Undefined for video streams.

concealmentEvents

A positive integer that indicates the number of concealment events, where a single event is counted for all consecutive concealed samples following a non-concealed sample. Undefined for video streams.

estimatedPlayoutTimestamp

A DOMHighResTimeStamp that indicates the estimated playout time of this receiver's track.

fecPacketsDiscarded

A positive integer value that indicates the number of RTP Forward Error Correction (FEC) packets which have been received for this source, for which the error correction payload was discarded.

fecPacketsReceived

A positive integer value that indicates the total number of Forward Error Correction (FEC) packets received for this source.

frameHeight

A positive integer that indicates the height of the last decoded frame, in pixels. Undefined for audio streams and before the first frame is decoded.

framesAssembledFromMultiplePackets

A positive integer that indicates the total number of correctly decoded frames for this RTP stream that consist of more than one RTP packet. Undefined for audio streams.

framesDecoded

A long integer value that indicates the total number of frames of video which have been correctly decoded so far for this media source. This is the number of frames that would have been rendered if none were dropped. Only valid for video streams.

framesPerSecond

A positive integer that indicates the number of frames decoded in the last second. Undefined for audio streams.

framesReceived

A positive integer that indicates the total number of complete frames received on this RTP stream. Undefined for audio streams.

frameWidth

A positive integer that indicates the width of the last decoded frame, in pixels. Undefined for audio streams and before the first frame is decoded.

freezeCount

A positive integer that indicates the total number of video freezes experienced by this receiver. Undefined for audio streams.

headerBytesReceived

A positive integer that indicates the total number of RTP header and padding bytes received for this SSRC, including retransmissions.

insertedSamplesForDeceleration

TBD.

jitterBufferDelay

TBD.

jitterBufferEmittedCount

TBD.

jitterBufferMinimumDelay

TBD.

jitterBufferTargetDelay

TBD.

keyFramesDecoded

A positive integer that indicates the total number of key frames successfully decoded for this RTP media stream. Undefined for audio streams.

lastPacketReceivedTimestamp

A DOMHighResTimeStamp that indicates the time at which the last packet was received for this source. The timestamp property, on the other hand, indicates the time at which the statistics object was generated.

mid

A string that uniquely identifies the pairing of source and destination of the transceiver's stream. This is the value of the corresponding RTCRtpTransceiver.mid unless that is null, in which case the statistic property is not present.

packetsDiscarded

TBD.

pauseCount

TBD.

playoutId

TBD.

remoteId

A string that identifies the RTCRemoteOutboundRtpStreamStats object that provides statistics for the remote peer for this same SSRC. This ID is stable across multiple calls to getStats().

removedSamplesForAcceleration

TBD.

silentConcealedSamples

A positive integer that indicates the number of silent concealed samples. Undefined for video streams.

totalAssemblyTime

A number that indicates the total time spent assembling successfully decoded video frames that were transported in multiple RTP packets, in seconds. Undefined for audio streams.

totalAudioEnergy

A number that represents the total audio energy of the received track over the lifetime of the stats object. Undefined for video streams.

totalDecodeTime

TBD.

totalFreezesDuration

TBD.

totalInterFrameDelay

TBD.

totalPausesDuration

TBD.

totalProcessingDelay

TBD.

totalSamplesDuration

TBD.

totalSamplesReceived

TBD.

totalSquaredInterFrameDelay

TBD.

trackIdentifier

A string that provides the id value of the MediaStreamTrack associated with the inbound stream.

Local-only measurements

These properties are computed locally, and are only available to the device receiving the media stream. Their primary purpose is to examine the error resiliency of the connection, as they provide information about lost packets, lost frames, and how heavily compressed the data is.

nackCount

A number that indicates the number of times the receiver notified the sender that one or more RTP packets has been lost by sending a Negative ACKnowledgement (NACK, also called "Generic NACK") packet to the sender. This value is only available to the receiver.

qpSum

A positive integer that provides the sum of the QP values for every frame decoded by this RTP receiver to date on the video track described by this statistics object. Valid only for video streams.

Statistics measured at the receiver of an RTP stream

These statistics are measured at the receiving end of an RTP stream, regardless of whether it's local or remote.

packetsReceived

The total number of RTP packets received for this synchronizing source, including retransmissions.

packetsLost

The total number of RTP packets lost for this synchronizing source. Note that this can be negative if more packets are received than sent.

jitter

Packet jitter for this synchronizing source, measured in seconds.

Common RTP stream statistics

codecId

A string that uniquely identifies the object which was inspected to produce the RTCCodecStats object associated with this RTP stream.

kind

A string that indicates whether the MediaStreamTrack associated with the stream is an audio or a video track.

ssrc

The 32-bit integer that identifies the source of the RTP packets this object provides. This value is generated per the RFC 3550 specification.

transportId

A string that uniquely identifies the object which was inspected to produce the RTCTransportStats object associated with this RTP stream.

Common instance properties

The following properties are common to all WebRTC statistics objects.

id

A string that uniquely identifies the object that is being monitored to produce this set of statistics.

timestamp

A DOMHighResTimeStamp object that indicates the time at which the sample was taken for this statistics object.

type

A string with the value "inbound-rtp", which indicates the type of statistics that the object contains.

Specifications

Specification
Identifiers for WebRTC's Statistics API
# dom-rtcstatstype-inbound-rtp

See also