PSA: New stats IDs, deprecation of stream stats, and less codec stats bloat

Skip to first unread message

Henrik Boström

Sep 6, 2022, 3:56:28 AM9/6/22
to discuss-webrtc

RTCCodecStats optimizations
For years we've created RTCCodecStats on a per-transceiver basis often resulting in many hundreds of "codec" stats objects with duplicate information. These are now generated per-transport, which means that applications using BUNDLE can see up to a several KB reduction in their RTCStatsReport. In one example, the number of "codec" objects was reduced from 872 to 43.

Stats IDs
Stats IDs are more concise now, e.g. instead of "RTCIceCandidatePair_6cWRqicY_haEcM2xD" it's now "CP6cWRqicY_haEcM2xD". Other IDs have had similar changes.

This is just an FYI - different implementations generate stats IDs differently so please do not depend on any pattern in stats IDs. While the new pattern is predictable, at some point in the future stats IDs will become random and unpredictable according to spec.

Lastly, along with RTCMediaStreamTrackStats (previous PSA), RTCMediaStreamStats are also on track for deprecation. These stats have the "DEPRECATED_" prefix in their stats IDs so signify this.

Screen Shot 2022-09-05 at 14.25.25.png

Philipp Hancke

Sep 6, 2022, 4:10:49 AM9/6/22
these changes are coming in M107 (scheduled for end of October) with commits
respectively. Please test them out now


You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Henrik Boström

Sep 19, 2022, 5:57:25 AM9/19/22
to discuss-webrtc
You can expect to see more minor stats IDs tweaks happening in M108 and beyond as a result to bug fixes and optimizations in the stats collector.
Reply all
Reply to author
0 new messages