webrtc-stats icon indicating copy to clipboard operation
webrtc-stats copied to clipboard

Add stats for actually used temporal/spatial layers

Open bc-lee opened this issue 2 years ago • 1 comments

Related: #673

RTCOutboundRtpStreamStats.scalabilityMode represents the scalabilityMode value set for the RTP stream, and it provides useful information for the SVC stream.

However, the SVC stream may have a different temporal/spatial layer than the one set.

For temporal scalability, the VP8 codec may be using temporal scalability even when no scalabilityMode is configured. Also, some codec implementations may not support three temporal layers.

For spatial scalability, some layers may be disabled if there is not enough bandwidth.

I'd like to add a stats field to report these cases. How about adding these two fields to RTCOutboundRtpStreamStats?

numTemporalLayer: Only exists for video.. The number of temporal scalability currently in use.

numSpatialLayer: Only exists for video. The number of spatial scalability currently in use.

bc-lee avatar Dec 09 '22 01:12 bc-lee

in case spatial scalability used, how to get resolution of each layer? how to get which layer is active ? some layer may stopped/active on the fly.

bdrtc avatar Jun 07 '23 02:06 bdrtc