Repository navigation
New Bandwidth Estimation stack #1895
Copy link
Copy link
Description
Overview
We must drop libwebrtc dependency, which is very old and it's only used for BWE purposes. It's also not ideal for a SFU since it's designed for a browser/device that produces up to 2-3 audio/video streams and can change their bitrate at any time to accomplish with network limits dynamically.
So we need to write our own BWE stack.
Related TODO
Here some tasks/issues that are partially related to BWE so they may need to be addressed:
- Need pacing during RTP retransmissions #1934
- Support "transport-wide-cc-02" RTP Extension #1948
- Make the RTP retransmission window RTT-relative instead of a fixed time and item count #1969
- New BWE: Producer uplink packet loss is reported back as downlink loss and affects downlink available bandwidth #1973
Ongoing work (PRs)
- New BWE:
InterArrivalDeltaclass #1896 - New BWE: Add
TrendlineEstimatorclass andByeTypes#1897 - New BWE: Improvements to
InterArrivalDeltaandTrendlineEstimatorclasses #1900 - New BWE:
LinkCapacityEstimator,AimdRateControlclasses #1903 - New BWE:
DelayBasedBweandRobustThroughputEstimatorclasses #1911 - Worker: Fix transport-cc arrival time precision by working in microseconds #1914
- Worker: Use real receive time of packets #1917
- Worker: Use
int64_tfor time everywhere #1918 - Worker: Use
int64_tfor bitrate everywhere #1919 - New BWE:
SendPacketHistoryandFeedbackAdapterclasses #1921 - Add Meson option to use the new built-in BWE #1922
- New BWE:
TargetRateControllerandLossBasedControllerclasses #1925 - New BWE:
AlrDetectorandIntervalBudgetclasses #1929 - New BWE:
ProbeBitrateEstimatorclass #1931 - New BWE:
ProbeControllerclass #1932 - New BWE:
BitrateProberclass #1935 - New BWE:
ProbePacketGeneratorclass #1936 - Sync BWE classes with libwebrtc ones #1938
- New BWE: Document the constraints of the
RTC::BWEoptions structs #1939 - New BWE:
ProbingSchedulerclass #1940 - Remove support for the
urn:ietf:params:rtp-hdrext:toffsetRTP extension #1942 - New BWE:
InterArrival,OveruseEstimatorandOveruseDetectorclasses #1943 - Worker: Compute bitrate over the active window in
RateCalculator(and more) #1944 - New BWE:
RemoteBitrateEstimatorAbsSendTimeclass #1947 - New BWE:
TransportWideCcFeedbackGeneratorclass #1949 - New BWE:
RembGeneratorclass #1951 - NEW BWE: Improve
RateCalculatorand port the remaining integration tests ofBWE::RemoteBitrateEstimatorAbsSendTime#1959 - NEW BWE: Simplify
BWE::BitrateProberclass #1960 - New BWE:
ReceiverTransportCongestionControlclass #1963 - Space in time RTP retransmissions triggered by NACKs #1965
- Remove
rtpPacketLossReceivedandrtpPacketLossSenttransport custom stats #1968 - NEW BWE:
PacketLossTrackerclass #1970 - New BWE:
SenderTransportCongestionControllerclass #1972 -
RtpStreamSend: Don't count the sender's uplink loss as loss of the consumer link #1974 -
Transport: Don't send the limiting REMB to peers that don't support REMB #1982 - New BWE:
BitrateAllocatorclass #1991 - New BWE: Integrate
ReceiverTransportCongestionControllerinTransportand addRTC::RttCalculatorclass #1992 - New BWE: Integrate
SenderTransportCongestionControllerinTransport#1995
Reactions are currently unavailable
Activity
New BWE: `InterArrivalDelta` class (#1896)
New BWE: Add `TrendlineEstimator` class and `ByeTypes` (#1897)
New BWE: `LinkCapacityEstimator`, `AimdRateControl` classes (#1903)
New BWE: `DelayBasedBwe` and `RobustThroughputEstimator` classes (#1911)
The whole new ongoing/WIP BWE (see #1895) now uses microseconds as well
ggarber commentedon Sep 18, 2026
This looks fun :P Just make sure you run a suite of automated tests in different network conditions at the end of the refactor and compare the results before and after.
ibc commentedon Sep 18, 2026
And if something goes wrong I can randomly change the value of some of those 84-97 trial fields across those 12-19 BWE related classes and try again.