Encoder bitrate higher than sent bitrate

152 views
Skip to first unread message

Lukas Daschinger

unread,
Mar 19, 2022, 3:32:33 PM3/19/22
to discuss-webrtc
I am working on a characterization of the WebRTC calls and noticed that the bitrate used for the encoder is often higher than the sent bitrate as reported in WebRTCStats.

for example the following states that the codec bitrate is set to 2542000 bits/s

```02-15 14:22:53.604 27336 27729 I ExtendedACodec: [OMX.qcom.video.encoder.vp8] configure, AMessage : AMessage(what = 'conf', target = 40) = {
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   int32_t color-format = 2130708361
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   int32_t i-frame-interval = 100
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   string mime = "video/x-vnd.on2.vp8"
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   int32_t width = 1632
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   int32_t bitrate-mode = 2
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   int32_t bitrate = 2542000
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   int32_t frame-rate = 60
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   int32_t height = 1224
02-15 14:22:53.604 27336 27729 I ExtendedACodec:   int32_t encoder = 1
02-15 14:22:53.604 27336 27729 I ExtendedACodec: }```

But then when we look at the WebRTC stats `RTCInboundRTPVideoStream_671706130-[bytesReceived_in_bits/s` we get a strongly varying rate with an average of ca 1500000 kbits/s (see image appended)

So we have a much lower sent rate. How does WebRTC handle that? does it drop frames or do further compression?

When I have checked that with a custom set value for the resolution like 720p this contradiction is not present and the send bitrate is just slightly above the codec bitrate...

Thank you for any hints on this behavior.

Bildschirmfoto 2022-03-16 um 22.14.31.png

Hugo Robles

unread,
Mar 21, 2022, 12:07:21 PM3/21/22
to discuss-webrtc
Hi Lukas,
I'm experiencing several performance issues with the WebRTC on Android. Just a question, how you are generating the stats and the chart, which tool are you using?

Lukas Daschinger

unread,
Mar 26, 2022, 8:56:28 AM3/26/22
to discuss-webrtc
For the chart I use the webRTC stats that are available in Chrome and then download the dump. The I paste the dump in fippo's tool: https://fippo.github.io/webrtc-dump-importer/

To get stats on Android I also WebRTC stats and write the output the a file every second.

Reply all
Reply to author
Forward
0 new messages