Intent to Ship: [WebRTC] RTCRtpEncodingParameters.scaleResolutionDownTo

258 views
Skip to first unread message

Henrik Boström

unread,
Sep 16, 2024, 8:21:43 AMSep 16
to blink-dev
Contact emails
hb...@chromium.org

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

Summary

An API that configures WebRTC encoders to scale input frames if they are greater than the specified maxWidth and maxHeight. This API is similar to scaleResolutionDownBy except that resolution constraints are expressed in absolute terms (e.g. 640x360) as opposed to relative terms (e.g. scale down by 2), avoiding race conditions related to changing input frame size on the fly.


In particular, when simulcast is used to send multiple resolutions (e.g. 720p + 360p), the app may dynamically turn the top layer(s) on and off. Having an API that gives the app a race-free way to adjust the track resolution accordingly can have big performance wins, e.g. video effects processing on a 360p track instead of a 720p track when all we're sending is 360p. The old way to do this "scale down by factor X" is racy when track resolution changes dynamically (e.g. momentarily doing 360p + 180p or temporarily disabling encoding), which is not ideal for receive side quality. Not nice API ergonomics either.


Blink component
TAG review status
Not applicable - small addition to existing API

Risks


Interoperability and Compatibility

None assuming all browsers implement this, otherwise the app can always fall back to the old way of configuring scaling factors (the scaleResolutionDownBy API)



Web developers:
Positive (hearts and positive feedback on issue and positively received in Virtual Interim)

WebView application risks

None



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

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


Link to entry on the Chrome Platform Status

Henrik Boström

unread,
Sep 19, 2024, 3:32:08 AMSep 19
to blink-dev, Henrik Boström
Forgot to link but here are the notes + recordings from the virtual interim: https://www.w3.org/2024/08/27-webrtc-minutes.html#t06

Alex Russell

unread,
Sep 19, 2024, 2:55:05 PMSep 19
to blink-dev, Henrik Boström
LGTM1

Mike Taylor

unread,
Sep 22, 2024, 12:39:31 PM (14 days ago) Sep 22
to Alex Russell, blink-dev, Henrik Boström

LGTM2

--
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/3fd13984-64b0-4f05-bb8b-50c6a4ae05afn%40chromium.org.

Daniel Bratell

unread,
Sep 25, 2024, 10:53:39 AM (11 days ago) Sep 25
to Mike Taylor, Alex Russell, blink-dev, Henrik Boström
Reply all
Reply to author
Forward
0 new messages