- You can opt-in to VP9/AV1 simulcast by specifying scalabilityMode and scaleResolutionDownBy.
- In upcoming milestones we'll experiment with new bitrate allocation strategies for VP9/AV1 simulcast.
The spec and implementation supports configuring multiple encodings with addTransceiver() or multiple ssrcs in SDP and after negotiation, RTCRtpSender.getParameters() + setParameters() can be used to set which encodings are active or inactive without the need to re-negotiate.
- Multiple encodings has allowed VP8 and H264 to support simulcast for years.
According to the standard, this should work for any codec, including VP9 and AV1 as well. But for historical reasons and the previous lack of ability to control the number of spatial layers via the API, VP9 and AV1 has been treated differently. Instead of interpreting multiple encodings as multiple encodings, VP9/AV1 has interpreted this to mean "multiple spatial layers". For this reason, VP9/AV1 simulcast was not possible.
This is changing in M113, where VP9/AV1 simulcast is now possible: see this demo
working on latest Canary.
- For backwards-compat reasons, you only get the standard behavior if you specify both a scalabilityMode and a scaleResolutionDownBy value. This is considered the way to "opt-in" to the new standard API path.
If you don't specify these parameters, you still get "legacy SVC mode" when you have multiple encodings - e.g. see this example
, the legacy mode can be confirmed by going to chrome://webrtc-internals/ where you see a single "outbound-rtp" with scalabilityMode: L3T3_KEY
- The standard way to achieve L3T3_KEY is to specify it with scalabilityMode and to make any other encoding inactive (3 encoding example, 1 encoding example).
- In legacy mode, inactivating an encoding will inactivate a spatial layer. In standard mode, the active parameter refers to the entire encoding. If you want to disable a spatial layer in standard mode, you need to change to a different scalabilityMode/scaleResolutionDownBy for your active encoding.
Be aware that in upcoming milestones we'll continue to tweak the new VP9/AV1 simulcast paths. Most notably, there is a large difference between the bitrate allocation of simulcast and SVC. We will experiment with making VP9 simulcast bitrates more closely aligned with VP9 SVC bitrates.
Today's implementation supports many different scalabilityMode values when the first encoding is the only active encoding. For multiple active encodings (simulcast), only L1T1, L1T2 and L1T3 are supported and all encodings have to use the same value. Unsupported configurations will trigger fallback to a supported configuration such as L1T2. See getParameters() and getStats() for status.
- Stay tuned for future PSAs about supporting more combinations.