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:
- Opus: VBR by default
- Windows MediaFoundation AAC: CBR by default
- MacOS AudioToolkit AAC: ABR by default
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.
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?