Intent to Prototype: WebRTC Codec Selection API

108 views
Skip to first unread message

Florent Castelli

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

Contact emails

orp...@chromium.org

Specification

https://w3c.github.io/webrtc-extensions/#dom-rtcrtpencodingparameters-codec

Summary

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

Blink>WebRTC>PeerConnection

Motivation

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

https://github.com/w3ctag/design-reviews/issues/836

TAG review status

Pending

Risks



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 (https://github.com/mozilla/standards-positions/issues/789)

WebKit: No signal (https://github.com/WebKit/standards-positions/issues/179)

Web developers: No signals

Other signals:

Ergonomics

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.



Debuggability

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?

Yes


Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1442194

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5200982281027584


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