Intent to Prototype: WebRTC Codec Selection API

Skip to first unread message

Florent Castelli

May 16, 2023, 9:40:22 AM5/16/23
to blink-dev

Contact emails



This new API extends WebRTC encoding parameters to allow developers to choose a specific negotiated codec to be used for encoding an RTP stream.

Blink component



We want to be able to change codec with RTCRtpSender.setParameters() in order to do the following:

  • Allow different codecs on different encodings.
  • Make it possible to change codec without re-negotiating.
  • Allow specifying both codec and scalabilityMode with a single API call.

Current users of the WebRTC APIs can achieve the similar functionality with multiple calls that are not quite easy to use (renegotiate with a different codec order in the SDP, which is a heavy operation) and are not as efficient (changing the codec and then changing the scalability mode or other parameters may add an extra I-frame that is not needed).
This API also allows to have mixed-codec simulcast, which was not possible previously.

TAG review

TAG review status



Interoperability and Compatibility

Interoperability risks are low. This is a new dictionary member and API surface, if it isn't used by current applications, it should not cause any impact on compatibility.

Gecko: No signal (

WebKit: No signal (

Web developers: No signals

Other signals:


No ergonomic risks. This API is part of WebRTC and will be used with other encoding parameters. One of its goal is to improve the WebRTC ergonomics by removing the need to make several calls with possible side effects to change the active codec, which should improve performance as well.


WebRTC is not supported by DevTools at the moment. chrome://webrtc-internals will reflect in the RTP stream statistics which codec is currently used.

Is this feature fully tested by web-platform-tests?


Requires code in //chrome?


Tracking bug

Estimated milestones

No milestones specified

Link to entry on the Chrome Platform Status

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
0 new messages