W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > April 2019

[webrtc-stats] Rethinking RTCOutboundRtpStreamStats.targetBitrate (#416)

From: henbos via GitHub <sysbot+gh@w3.org>
Date: Wed, 03 Apr 2019 09:24:56 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-428659692-1554283495-sysbot+gh@w3.org>
henbos has just created a new issue for https://github.com/w3c/webrtc-stats:

== Rethinking RTCOutboundRtpStreamStats.targetBitrate ==
Knowing something about the target encode bitrate is important, for example when debugging issues related to too large frames being encoded.

The current definition of [targetBitrate](https://w3c.github.io/webrtc-stats/#dom-rtcoutboundrtpstreamstats-targetbitrate) is:

> It is the current target bitrate configured for this particular SSRC and is the Transport Independent Application Specific (TIAS) bitrate [RFC3890]. Typically, the target bitrate is a configuration parameter provided to the codec's encoder and does not count the size of the IP or other transport layers like TCP or UDP. It is measured in bits per second and the bitrate is calculated over a 1 second window.

Two problems:
- Measuring the bitrate over a 1 second window is not what implementations necessarily should do. Chrome doesn't. We should not force implementation strategies about when this bitrate can and cannot update the target.
- This is a bitrate. If an application would like calculate the difference between target and actual bytes produced, there is no way to do this. You would have to estimate target total bytes based on bitrate and compare to total bytes sent. Why doesn't the stat provide accumulative counters instead?

**Proposal**
Replace targetBitrate with targetTotalBytesEncoded, to be defined as:

> The total number of bytes the encoder would have produced if it exactly matched the configured target. In reality, the actual number of bytes may be higher or lower on a frame-by-frame basis. This value is updated each time a frame has been encoded.

This definition is agnostic towards when or how the target is updated, the counter would go up with whatever the target was for each frame, which makes it directly comparable to bytesSent.

Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/416 using your GitHub account
Received on Wednesday, 3 April 2019 09:25:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 4 June 2019 15:32:56 UTC