← Back to release summary

WebCodecs AudioEncoder bitrateMode

Category
Multimedia
Type
Chromium catches up
Status
Enabled by default (Chrome 119)
Intent stage
None

Summary

Some audio codecs support specifying the audio encoder bitrate modes. This feature adds a "bitrateMode" flag with a default value of “variable” to WebCodec's AudioEncoderConfig, which mirrors the config option and default already present for VideoEncoderConfig. This flag will allow web authors to choose between encoding audio with a variable bitrate or a constant bitrate. Specific codec encoder implementations might have slightly different terminology (e.g. `CBR` vs `VBR` for Opus), but all of them should map to the general concept of "constant" versus "variable" bitrate. The two options have the following effects: “variable”: allows an audio encoder to increase or lower its bitrate according to the content of the audio it is encoding, in order to preserve bandwidth/binary-size, while still maintaining a target quality. For example, an encoder might lower its bitrate when encoding silence, and revert to a full bitrate when encoding speech. “constant” : forces an audio encoder to maintain the same bitrate, regardless of the audio content. This can be useful when a predictable bandwidth consumption is preferable. As of M119, this flag will affect two codecs on Chromium: Opus and AAC.

Standards & signals

View on chromestatus.com