ibc
(Iñaki Baz Castillo)
October 26, 2026, 4:59pm
1
mediasoup (Node) 3.32.0 and mediasoup (Rust) 0.33.0 have been released, and they come with a new built-in BWE (bandwidth estimation) module.
See the BWE task and all the involved PRs:
opened 03:39PM - 01 Sep 26 UTC
enhancement
feature
# 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.
# Ongoing work (PRs)
- [x] https://github.com/versatica/mediasoup/pull/1896
- [x] https://github.com/versatica/mediasoup/pull/1897
- [x] https://github.com/versatica/mediasoup/pull/1900
- [x] https://github.com/versatica/mediasoup/pull/1903
- [x] https://github.com/versatica/mediasoup/pull/1911
- [x] https://github.com/versatica/mediasoup/pull/1914
- [x] https://github.com/versatica/mediasoup/pull/1917
- [x] https://github.com/versatica/mediasoup/pull/1918
- [x] https://github.com/versatica/mediasoup/pull/1919
- [x] https://github.com/versatica/mediasoup/pull/1921
- [x] https://github.com/versatica/mediasoup/pull/1922
- [x] https://github.com/versatica/mediasoup/pull/1925
- [x] https://github.com/versatica/mediasoup/pull/1929
- [x] https://github.com/versatica/mediasoup/pull/1931
- [x] https://github.com/versatica/mediasoup/pull/1932
- [x] https://github.com/versatica/mediasoup/pull/1935
- [x] https://github.com/versatica/mediasoup/pull/1936
- [x] https://github.com/versatica/mediasoup/pull/1938
- [x] https://github.com/versatica/mediasoup/pull/1939
- [x] https://github.com/versatica/mediasoup/pull/1940
- [x] https://github.com/versatica/mediasoup/pull/1942
- [x] https://github.com/versatica/mediasoup/pull/1943
- [x] https://github.com/versatica/mediasoup/pull/1944
- [x] https://github.com/versatica/mediasoup/pull/1947
- [x] https://github.com/versatica/mediasoup/pull/1949
- [x] https://github.com/versatica/mediasoup/pull/1951
- [x] https://github.com/versatica/mediasoup/pull/1959
- [x] https://github.com/versatica/mediasoup/pull/1960
- [x] https://github.com/versatica/mediasoup/pull/1963
- [x] https://github.com/versatica/mediasoup/pull/1965
- [x] https://github.com/versatica/mediasoup/pull/1968
- [x] https://github.com/versatica/mediasoup/pull/1970
- [x] https://github.com/versatica/mediasoup/pull/1972
- [x] https://github.com/versatica/mediasoup/pull/1974
- [x] https://github.com/versatica/mediasoup/pull/1982
- [x] https://github.com/versatica/mediasoup/pull/1991
- [x] https://github.com/versatica/mediasoup/pull/1992
- [x] https://github.com/versatica/mediasoup/pull/1995
- [x] https://github.com/versatica/mediasoup/pull/2010
# Related TODO
Here some tasks/issues that are partially related to BWE so they may need to be addressed:
- [x] https://github.com/versatica/mediasoup/issues/1934
- Done in PR https://github.com/versatica/mediasoup/pull/1965
- [ ] https://github.com/versatica/mediasoup/issues/1948
- [ ] https://github.com/versatica/mediasoup/issues/1969
- [x] https://github.com/versatica/mediasoup/issues/1973
- Done in PR https://github.com/versatica/mediasoup/pull/1974
- [ ] Consider a way to pass low level BWE options via API to change default values of so many BWE related classes.
- [x] `RTP::Packet` has no `GetMediaSsrc()`, so a retransmission cannot tell whether it went out over RTX, which is what `SendPacketHistory::AddPacketOptions::originalSsrc` needs to be filled correctly. Here we need that the `Producer` or `RtpStreamRecv` class invokes some new setter `SetIsRtx(boolean)` in `RTP::Packet` and then expose a getter. Such a value must change when invoking `RtxEncode()` and `RtxDecode()` in the packet.
- [x] `ortc.ts` and `ortc.rs`: Must revisit Dependency Descriptor RTP header extension for `PipeTransport` and `DirectTransport`.
- Done in https://github.com/versatica/mediasoup/pull/2010/commits/6328acdbb8a94645dc3fac1b619218b9066a71ff.
- [x] `BWE::TargetRateController::OnRouteChange()` has no caller anywhere and the configured BWE limits are not passed again after it, so the method would leave the controller with `Consts::BweMinBitrate` and `BweMaxBitrate` instead of what the application set. This should be used when ICE disconnects and reconnects. In this case the new selected path must be checked and update the "packet/transport overhead" and must be told to the BWE sender controller.
- _NOTE:_ The packet overhead change is implemented. But we are not gonna reset the whole estimation but instead will assume that we can keep the previous one.
# TODO for when the old BWE is entirely removed
- [x] Remove `ms_use_builtin_bwe` Meson option and every `MS_USE_BUILTIN_BWE` usage in the C++.
- [x] Remove `libwebrtcFieldTrials` from `WorkerSettings`, in worker, FBS, Node and Rust.
- [x] Remove `RTC::BweType` and also from FBS.
- [x] Remove `OldBweTraceInfo` from `transport.fbs`, remove `parseOldBweTraceInfo()` in `Transport.ts` in Node, remove `OldBweTraceInfo`, `OldBwe` in Rust, etc.
- [x] Delete `RTP::ProbationGenerator`.
- [x] Remove `abseil-cpp` Meson subproject.
# TODO for CHANGELOG and website API documentation
- [x] Document `enableBwe`, `initialAvailableOutgoingBitrate`, `minOutgoingBitrate`, `maxOutgoingBitrate` and `maxIncomingBitrate` in `WebRtcTransportOptions` and `PlainTransportOptions`.
- [x] **[Breaking change]** Document that `libwebrtcFieldTrials` in `WorkerSettings` has been removed (breaking change).
- [x] **[Breaking change]** Document the case of a peer that receives RTP from mediasoup (over a WebRTC or a plain transport) and supports neither transport-cc nor REMB. The `BWE::SenderTransportCongestionController` is **still** created in its mediasoup `Transport` since such a peer still reports loss in its RTCP Receiver Reports and downlink available bandwidth can be estimated out of that. But without those mechanisms the estimation can only grow slowly so setting a higher `initialAvailableOutgoingBitrate` in `router.createPlainTransport()` could be convenient. And if the peer sends no Receiver Reports at all the estimation **never moves**, so such a transport hands out `initialAvailableOutgoingBitrate` for its whole life. In those cases, it's better that the WebRTC or plain transport is created with `enableBwe: false` (or with a very high `initialAvailableOutgoingBitrate` value).
All these changes are already done in PR https://github.com/versatica/mediasoup-website/pull/77 in mediasoup-website that must be merged when we merge this PR and release a new version of mediasoup
mediasoup no longer bundles a copy (and terribly outdated) of libwebrtc for BWE purposes. The new BWE module is written with mediasoup’s own classes and code: the bandwidth estimation orchestrators, the bitrate allocator and several other components have been implemented from scratch, while most of the core congestion control and bandwidth estimation logic is derived from the one in libwebrtc.
Changes
WebRtcTransportOptions and PlainTransportOptions : Add enableBwe, initialAvailableOutgoingBitrate, minOutgoingBitrate, maxOutgoingBitrate and maxIncomingBitrate.
Breaking change: WorkerSettings no longer takes libwebrtcFieldTrials.
Breaking change: The transport “bwe” trace event now reports desiredBitrate, minBitrate, maxBitrate and availableBitrate.
If I understand correctly, this introduces a native bandwidth estimation module in mediasoup, giving the SFU more direct control over bandwidth estimation and congestion adaptation without relying on the older bundled libwebrtc implementation.
This looks like a valuable improvement for real-time communication, especially when network conditions vary significantly between participants. Looking forward to exploring how it performs in real-world SFU deployments. Great work! Thank you!