w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.

Home Page:https://w3c.github.io/webcodecs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specify AudioEncoderConfig.bitrateMode default

tguilbert-google opened this issue · comments

AudioEncoderConfig.bitrateMode [spec link] does not specify a default value.

Whether a codec uses VBR or CBR varies between codecs, and between encoders. Some default values for various encoders:

Variations in the default behavior for different codecs might make sense, if it was a well known that a codec uses VBR or CBR by default. Such details could be added to the codec registry. However, it is confusing if there are variations in the default behavior when using the same codec, with different encoders under the hood.

Proposal:
Set AudioEncoderConfig.bitrateMode = "variable" as default.

This would technically be a breaking change for AAC encoders, which do not default to VBR.

VideoEncoder also defaults to variable, so that seems reasonable to me.

commented

The media recorder spec also defaults to variable audio bitrateMode, it seems reasonable, sugguest to add defaulting to "variable" text hint .

@tguilbert-google Could you please prepare a PR for this?