From 50ec2894ef5f8a83a761b434699e751089a040f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Spr=C3=A5ng?= Date: Fri, 8 May 2026 16:17:51 +0200 Subject: [PATCH 1/2] Add encodingComplexity to RTCRtpEncodingParameters This introduces a new enum `RTCEncodingComplexity` and adds an `encodingComplexity` member to `RTCRtpEncodingParameters` to allow applications to hint at the desired trade-off between quality and CPU/power consumption for an encoding. Includes guidance for implementors on expected relative encoding times and notes on the best-effort nature of this hint. Fixes #191 --- index.html | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 8ca3544..26d1334 100644 --- a/index.html +++ b/index.html @@ -390,13 +390,26 @@

Methods

- - -
-

- RTCRtpEncodingParameters extensions -

-

+ \ +

+ +
+

+ The {{RTCEncodingComplexity}} enum. +

+
enum RTCEncodingComplexity {
+        "minimum",
+        "low",
+        "normal",
+        "high",
+        "very-high",
+        "maximum"
+    };
+
+
+

+ RTCRtpEncodingParameters extensions +

The {{RTCRtpEncodingParameters}} dictionary is defined in [[WEBRTC]]. This document extends that dictionary with additional members to control audio packetization. @@ -405,6 +418,7 @@

RTCResolutionRestriction scaleResolutionDownTo; unsigned long ptime; boolean adaptivePtime = false; + RTCEncodingComplexity encodingComplexity; };

Dictionary {{RTCRtpEncodingParameters}} Members

@@ -470,6 +484,22 @@

Dictionary {{RTCRtpEncodingParameters}} Members

allows the user agent to adapt its bandwidth allocation strategy based on the current network conditions.

+
+ encodingComplexity of type {{RTCEncodingComplexity}} +
+
+

Indicates the desired complexity for this encoding. The user agent MAY use this as a hint to select encoder settings to achieve the desired complexity. Higher complexity values are expected to result in higher quality at the cost of higher CPU usage and power consumption. This feature is implemented on a best-effort basis, as not all encoder implementations support this, and others may only support a subset of the complexity settings. Even if an encoder supports a given complexity setting, the user agent MAY choose to use a different one, for example, selecting a lower complexity if the encoder is not meeting real-time deadlines. The actual encoding complexity used MAY also change dynamically based on system conditions.

+

Assuming that {{RTCEncodingComplexity/"normal"}} maps to the encoder's default real-time speed setting, the expected relative change in encoding time for other values are approximately:

+
    +
  • {{RTCEncodingComplexity/"maximum"}}: The highest complexity setting compliant with real-time constraints.
  • +
  • {{RTCEncodingComplexity/"very-high"}}: +50%
  • +
  • {{RTCEncodingComplexity/"high"}}: +15%
  • +
  • {{RTCEncodingComplexity/"normal"}}: +/- 0%
  • +
  • {{RTCEncodingComplexity/"low"}}: -15%
  • +
  • {{RTCEncodingComplexity/"minimum"}}: As low as possible
  • +
+

The user agent MAY choose to alternate between complexity levels to achieve an intermediate effect. This can be particularly useful in scenarios like temporal layering, where applying higher complexity to the base layer frames can yield significant quality benefits.

+

From a505af59ceda58622f7bba76c93c44a87843f4ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Spr=C3=A5ng?= Date: Fri, 8 May 2026 16:36:32 +0200 Subject: [PATCH 2/2] Updated styling --- index.html | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 26d1334..747ade9 100644 --- a/index.html +++ b/index.html @@ -390,14 +390,18 @@

Methods

- \ - - -
-

- The {{RTCEncodingComplexity}} enum. -

-
enum RTCEncodingComplexity {
+    
+ +
+

+ RTCRtpEncodingParameters extensions +

+

+ The {{RTCRtpEncodingParameters}} dictionary is defined in + [[WEBRTC]]. This document extends that dictionary with + additional members to control audio packetization. +

+
enum RTCEncodingComplexity {
         "minimum",
         "low",
         "normal",
@@ -405,15 +409,6 @@ 

"very-high", "maximum" };

-
-
-

- RTCRtpEncodingParameters extensions -

- The {{RTCRtpEncodingParameters}} dictionary is defined in - [[WEBRTC]]. This document extends that dictionary with - additional members to control audio packetization. -

partial dictionary RTCRtpEncodingParameters {
     RTCResolutionRestriction scaleResolutionDownTo;
     unsigned long            ptime;