Intent to Ship: WebRTC Codec Selection API

172 views
Skip to first unread message

Florent Castelli

unread,
Sep 20, 2023, 5:48:21 AM9/20/23
to blink-dev

Contact emails

orp...@chromium.org

Explainer

https://github.com/Orphis/webrtc-extensions/blob/explainer/explainers/codec-selection.md

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

TAG review

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

TAG review status

Issues addressed

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

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

Web developers: No signals

Ergonomics

No ergonomic risks. This API is part of WebRTC and will be used with other encoding parameters. One of its goals 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.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

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

Yes

Flag name on chrome://flags



Finch feature name

RTCRtpEncodingParametersCodec

Requires code in //chrome?

False

Tracking bug

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

Estimated milestones

Shipping on desktop119
Shipping on Android119
Shipping on WebView119
Shipping on WebView119



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5200982281027584

Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADRnnSXEi2i3DzkXQo1ptX-KR%2BULh-4LOt5zpOi14BTstZN_9g%40mail.gmail.com

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Sep 20, 2023, 11:21:20 AM9/20/23
to Florent Castelli, blink-dev
LGTM1

On Wed, Sep 20, 2023 at 11:48 AM Florent Castelli <orp...@chromium.org> wrote:

Contact emails

orp...@chromium.org

Explainer

https://github.com/Orphis/webrtc-extensions/blob/explainer/explainers/codec-selection.md

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

TAG review

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

TAG review status

Issues addressed

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

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

Web developers: No signals

Presumably this is something WebRTC developers are interested in. Any ways you can think of to extract such a signal for WebRTC things in the future?
 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADRnnSXo_QcNo%3DSXCxq_bh%2BMEhoUY6FCDJK%3D3q%3DkDr4xs1yUbw%40mail.gmail.com.

Florent Castelli

unread,
Sep 21, 2023, 4:43:26 AM9/21/23
to Yoav Weiss, blink-dev
On Wed, Sep 20, 2023 at 5:21 PM Yoav Weiss <yoav...@chromium.org> wrote:
LGTM1

On Wed, Sep 20, 2023 at 11:48 AM Florent Castelli <orp...@chromium.org> wrote:

Contact emails

orp...@chromium.org

Explainer

https://github.com/Orphis/webrtc-extensions/blob/explainer/explainers/codec-selection.md

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

TAG review

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

TAG review status

Issues addressed

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

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

Web developers: No signals

Presumably this is something WebRTC developers are interested in. Any ways you can think of to extract such a signal for WebRTC things in the future?

WebRTC developers are indeed interested but have nothing to link to. Google Meet is interested in using the API and other conferencing solutions have been interested in advanced scenarios this API allows as well.

Philipp Hancke

unread,
Sep 21, 2023, 5:31:55 AM9/21/23
to Florent Castelli, Yoav Weiss, blink-dev, Saúl Ibarra Corretgé
Same for MSFT Teams which I work on. Switching between codecs on the fly is becoming important (e.g. because AV1 has encoding tools which very much benefit static content for slide sharing).
While this is already possible with SDP renegotiation (even locally), the API is much more ergonomic and avoids some race conditions.

The API also enables use-cases where multiple simulcast streams (i.e. same picture but different resolutions) can use different codecs, e.g. a more modern one like AV1 for small resolutions where software encoding is feasible and a hardware encoded one (H264, VP9 I think) for large resolutions

What I heard from Jitsi Meet via Saul (cc'd in case he wants to say more) sounded similar.

Mike Taylor

unread,
Sep 21, 2023, 9:23:38 AM9/21/23
to Philipp Hancke, Florent Castelli, Yoav Weiss, blink-dev, Saúl Ibarra Corretgé

Chris Harrelson

unread,
Sep 26, 2023, 1:57:07 PM9/26/23
to Mike Taylor, Philipp Hancke, Florent Castelli, Yoav Weiss, blink-dev, Saúl Ibarra Corretgé
Reply all
Reply to author
Forward
0 new messages