diff --git a/codec_registry.src.html b/codec_registry.src.html index ab2b1096..3bf7e861 100644 --- a/codec_registry.src.html +++ b/codec_registry.src.html @@ -63,8 +63,11 @@ 4. Expectations for {{EncodedAudioChunk}} or {{EncodedVideoChunk}} {{EncodedVideoChunk/[[type]]}} 4. Where applicable, a registration specification may include a section - describing extensions to {{VideoEncoderConfig}} or {{AudioEncoderConfig}} - dictionaries. + describing: + 1. Extensions to {{VideoEncoderConfig}} or {{AudioEncoderConfig}} + dictionaries + 2. Guidelines for mapping {{VideoEncoderConfig/contentHint}} or + {{AudioEncoderConfig/contentHint}} values to codec-specific concepts. 5. Candidate entries must be announced by filing an issue in the [WebCodecs GitHub issue tracker](https://github.com/w3c/webcodecs/issues/) so they can be discussed and evaluated for compliance before being added to diff --git a/index.src.html b/index.src.html index 7a704560..fcf96209 100644 --- a/index.src.html +++ b/index.src.html @@ -52,6 +52,7 @@ spec: mst-content-hint; urlPrefix: https://www.w3.org/TR/mst-content-hint/ type: dfn; text: video content hints; url:#video-content-hints + type: dfn; text: audio content hints; url:#audio-content-hints spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/ type: dfn; text: the current Realm; url: #current-realm @@ -2051,6 +2052,7 @@ [EnforceRange] unsigned long numberOfChannels; [EnforceRange] unsigned long long bitrate; BitrateMode bitrateMode = "variable"; + DOMString contentHint; }; @@ -2090,6 +2092,22 @@ encouraged to check by calling {{AudioEncoder/isConfigSupported()}} with |config|. +
+spec: mst-content-hint; urlPrefix: https://www.w3.org/TR/mst-content-hint/ + type: dfn; text: speech; url:#idl-def-AudioContentHint.speech + type: dfn; text: music; url:#idl-def-AudioContentHint.music ++
{
"OPUS": {
@@ -46,7 +53,7 @@
"title": "RFC 7845: Ogg Encapsulation for the Opus Audio Codec",
"publisher": "IETF",
"date": "April 2016"
- }
+ },
}
@@ -89,6 +96,26 @@
NOTE: Once the initialization has succeeded, any packet can be decoded at any
time without error, but this might not result in the expected audio output.
+AudioEncoderConfig.contentHint guidelines {#contenthint-guidelines}
+================================================
+
+The User Agent MUST take into consideration the value
+of {{AudioEncoderConfig/contentHint}} when configuring an Opus encoder.
+
+If {{AudioEncoderConfig/contentHint}} is "[=speech=]", the User Agent
+MUST use encoder settings that are best for most
+VoIP/videoconference applications where listening quality and intelligibility
+matter most.
+
+If {{AudioEncoderConfig/contentHint}} is "[=music=]", the User Agent
+MUST use encoder settings that are best for
+broadcast/high-fidelity applications where the decoded audio should be as close
+as possible to the input.
+
+For all other values of {{AudioEncoderConfig/contentHint}}, the User Agent
+MAY ignore the flag or choose encoder settings based on
+any additional signals and context.
+
AudioEncoderConfig extensions {#audioencoderconfig-extensions}
=============================================================