PSA: inbound-rtp headerBytesReceived, bytesReceived and packetsReceived now include retransmissions (in Chrome M115+)

139 views
Skip to first unread message

Philipp Hancke

unread,
May 5, 2023, 5:09:52 AM5/5/23
to discuss...@googlegroups.com

  https://chromiumdash.appspot.com/commit/f78d1f211a4f3b36bafb6bb4303450129e1dbdb5

which added stats for retransmittedBytesReceived that are exposed to Chromium as of

  https://chromiumdash.appspot.com/commit/9c88ebf1f457d5f780fe3da6b8c9b40223c809bf

will also change the inbound-rtp statistics for headerBytesReceived, bytesReceived and packetsReceived slightly.

These counters now include any packets retransmitted via RTX which brings the numbers closer to the total ones than can be observed in the transport stats.

Note that bandwidth estimation probes get reported as retransmissions on the receiving end, so this counter going up is not necessarily a sign of packet loss.


If you see a slight increase in average bitrate from getStats this is likely due to this. This increase in bytesReceived should correlate with the newly added retransmittedBytesReceived.


If you are interested in the math involved please see the discussion in

https://github.com/w3c/webrtc-stats/issues/755


cheers

Philipp

Henrik Boström

unread,
May 5, 2023, 11:57:44 AM5/5/23
to discuss-webrtc
This is great, and most use cases should be interested in the total bytes/packets received on the RTP stream which this change makes possible.

But as an FYI, if anyone has a dependency on bytesReceived et. al. not including RTX traffic, then do note that the old value can be trivially calculated as "bytesReceived - retransmittedBytesReceived" and you'll have a backwards-compatible value.

Reply all
Reply to author
Forward
0 new messages