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.
TheRTCInboundRtpStreamStats dictionary of theWebRTC API is used to report statistics related to the receiving end of an RTP stream on the local end of theRTCPeerConnection.
The statistics can be obtained by iterating theRTCStatsReport returned byRTCPeerConnection.getStats() orRTCRtpReceiver.getStats() until you find a report with thetype ofinbound-rtp.
In this article
Instance properties
audioLevelA number that indicates the audio level of the received track.Undefined for video streams.
bytesReceivedA positive integer that indicates the total number of bytes that have been received so far for this media source.
concealedSamplesA 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.
concealmentEventsA 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.
estimatedPlayoutTimestampExperimentalA
DOMHighResTimeStampthat indicates the estimated playout time of this receiver's track.fecPacketsDiscardedA 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.
fecPacketsReceivedA positive integer value that indicates the total number of Forward Error Correction (FEC) packets received for this source.
frameHeightA positive integer that indicates the height of the last decoded frame, in pixels.Undefined for audio streams and before the first frame is decoded.
framesAssembledFromMultiplePacketsExperimentalA 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.
framesDecodedA 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.Undefined for audio streams.
framesPerSecondA positive integer that indicates the number of frames decoded in the last second.Undefined for audio streams.
framesReceivedA positive integer that indicates the total number of complete frames received on this RTP stream.Undefined for audio streams.
frameWidthA positive integer that indicates the width of the last decoded frame, in pixels.Undefined for audio streams and before the first frame is decoded.
freezeCountExperimentalA positive integer that indicates the total number of video freezes experienced by this receiver.Undefined for audio streams.
headerBytesReceivedA positive integer that indicates the total number of RTP header and padding bytes received for this SSRC, including retransmissions.
insertedSamplesForDecelerationA positive integer that indicates the number of samples inserted to slow playout from the jitter buffer.Undefined for video streams.
jitterBufferDelayA number that indicates the accumulated time that all audio samples and complete video frames have spent in the jitter buffer, in seconds.
jitterBufferEmittedCountA positive integer indicating the total number of audio samples and/or video frames that have come out of the jitter buffer.
jitterBufferMinimumDelayA number that indicates the minimum delay that might be achieved given only the network characteristics such as jitter and packet loss.
jitterBufferTargetDelayA number that indicates the accumulated target jitter buffer delay.
keyFramesDecodedA positive integer that indicates the total number of key frames successfully decoded for this RTP media stream.Undefined for audio streams.
lastPacketReceivedTimestampA
DOMHighResTimeStampthat indicates the time at which the last packet was received for this source.Thetimestampproperty, on the other hand, indicates the time at which the statistics object was generated.midA string that uniquely identifies the pairing of source and destination of the transceiver's stream.This is the value of the corresponding
RTCRtpTransceiver.midunless that is null, in which case the statistic property is not present.packetsDiscardedA positive integer that indicates the total number of RTP packets discarded by the jitter buffer due to late or early-arrival.
pauseCountExperimentalA positive integer that indicates the number of video pauses experienced by this receiver.Undefined for audio streams.
playoutIdExperimentalA string that identifies the corresponding
RTCAudioPlayoutStatsfor an audio stream.Undefined for video streams.remoteIdA string that identifies the
RTCRemoteOutboundRtpStreamStatsobject that provides statistics for the remote peer for this same SSRC.This ID is stable across multiple calls togetStats().removedSamplesForAccelerationA positive integer that indicates the number of samples removed from to speed up playout from the jitter buffer.Undefined for video streams.
silentConcealedSamplesA positive integer that indicates the number of silent concealed samples.Undefined for video streams.
totalAssemblyTimeExperimentalA 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.
totalAudioEnergyA number that represents the total audio energy of the received track over the lifetime of the stats object.Undefined for video streams.
totalDecodeTimeA number that indicates the total time spent decoding frames in this stream, in seconds.Undefined for audio streams.
totalFreezesDurationExperimentalA positive number that indicates the total time that the stream has spent frozen, in seconds.Undefined for audio streams.
totalInterFrameDelayA positive number that indicates the total time spent between consecutively rendered frames, recorded just after a frame has been rendered.Undefined for audio streams.
totalPausesDurationExperimentalA positive number that indicates the total time that the stream has spent with paused video, in seconds.Undefined for audio streams.
totalProcessingDelayA positive number that indicates the total time spent processing audio or video samples, in seconds.
totalSamplesDurationA positive number that indicates the total duration of all samples that have been received, in seconds.Undefined for video streams.
totalSamplesReceivedA positive integer that indicates the total number of samples received on this stream.Undefined for video streams.
totalSquaredInterFrameDelayA positive number that indicates the sum of the square of inter-frame delays between consecutively rendered frames, recorded just after a frame has been rendered.Undefined for audio streams.
trackIdentifierA string that provides the
idvalue of theMediaStreamTrackassociated 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.
nackCountA 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.
qpSumA 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.
packetsReceivedThe total number of RTP packets received for thissynchronizing source (SSRC), including retransmissions.
packetsLostThe total number of RTP packets lost for thissynchronizing source (SSRC).Note that this can be negative, as more packets may be received than the receiver expects.
jitterPacket jitter for thissynchronizing source (SSRC), measured in seconds.
Common RTP stream statistics
codecIdA string that uniquely identifies the object which was inspected to produce the
RTCCodecStatsobject associated with thisRTP stream.kindA string that indicates whether the
MediaStreamTrackassociated with the stream is an audio or a video track.ssrcThe 32-bit integer that identifies the source of the RTP packets this object provides.This value is generated per theRFC 3550 specification.
transportIdA string that uniquely identifies the object which was inspected to produce the
RTCTransportStatsobject associated with this RTP stream.
Common instance properties
The following properties are common to all WebRTC statistics objects.
idA string that uniquely identifies the object that is being monitored to produce this set of statistics.
timestampA
DOMHighResTimeStampobject that indicates the time at which the sample was taken for this statistics object.typeA 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> |