You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
VP9 SvcConsumer on a transport without BWE never re-evaluates target layer when the top spatial layer stops #1821
mediasoup (Node) version: 3.20.2 (but seems relevant to other versions)
mediasoup (Rust) version: -
mediasoup-client version: -
Issue description
For a VP9 SVC consumer created on transport without BWE, when the producer stops sending the top spatial layer (e.g. the encoder drops it under a bitrate cap), the consumer keeps its target pinned to the now-absent layer and never falls back. With K-SVC this means all remaining (lower-layer) packets are dropped and the consumer produces no media at all.
Consume it on a transport without BWE (no custom preferredLayers - expect to consume best available layer). E.g. plain transport which connects to ffmpeg to record video.
Make the encoder stop the top spatial layer (e.g. cap sender bitrate via RTCRtpEncodingParameters.maxBitrate).
Consumer output goes black; no packets are forwarded.
Expected:
consumer falls back to the highest still-active spatial layer;
Actual:
target stays on the stopped layer; in K-SVC every remaining packet is dropped.
Workaround:
For my particular use case I can probably use pipe transport and forward everything verbatim.
Likely root cause
When the top spatial layer of VP9 SVC stops, the sequence stays continuous and no packet loss happen, the producer's RtpStreamRecv score does not change and SvcConsumer::MayChangeLayers() is never triggered.
It normally runs on producer-score changes or on BWE bitrate-allocation events, but on a transport without BWE (e.g. PlainTransport, or any consumer with no transport-wide-cc negotiated) there's no BWE timer to call it either. So RecalculateTargetLayers() never re-runs and the target stays on the missing layer.
So the problem is that in K-SVC each spatial layer is a like a separate stream, however we don't have a mechanism to track the status of the spatial layers of the producer and notify the consumers about it. This will take some time but we'll address this.
Activity
ibc commentedon Jun 4, 2026
The rationale is correct. I will come back to this next week.
ibc commentedon Jun 15, 2026
So the problem is that in K-SVC each spatial layer is a like a separate stream, however we don't have a mechanism to track the status of the spatial layers of the producer and notify the consumers about it. This will take some time but we'll address this.
ibc commentedon Sep 14, 2026
Steps to reproduce in the mediasoup demo
&info=true&stats=true&consume=false&disableBwe=true&forceVP9=true&mic=false&webcamScalabilityMode=L2T2_KEY(in Dev: https://local.dev:5555/?roomId=dev&&info=true&stats=true&consume=false&disableBwe=true&mic=false&forceVP9=true&webcamScalabilityMode=L2T2_KEY).&info=true&stats=false&produce=false&disableBwe=true(in Dev: https://local.dev:5555/?roomId=dev&info=true&stats=false&produce=false&disableBwe=true)ibc commentedon Sep 14, 2026
PR here: #1924