w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
941 stars 132 forks source link

support specify audio encode bitrateMode interface #657

Closed bdrtc closed 1 year ago

bdrtc commented 1 year ago

fixes #649


Preview | Diff

dalecurtis commented 1 year ago

Do we want a config level bitrate mode knob like we have for video instead?

Djuffin commented 1 year ago

I agree with @dalecurtis, bitrate mode seems like a very generic knob that will be used for many codecs with the same meaning. So I think it belongs in AudioEncoderConfig

bdrtc commented 1 year ago

AudioEncoderConfig

Thanks feedback, I considered add this to AudioEncoderConfig before commit, but for audio codec, not all codecs support vbr mode, For example ulaw/alaw, what will happen if user specify a bitrate mode to AudioEncoderConfig that current codec does't supported ?

Djuffin commented 1 year ago

what will happen if user specify a bitrate mode to AudioEncoderConfig that current codec does't supported ?

AudioEncoder.isConfigSupported() will return false.

bdrtc commented 1 year ago

Do we want a config level bitrate mode knob like we have for video instead?

I will move it to AudioEncoderConfig and add a Note, Thanks.

bdrtc commented 1 year ago

Dear editors, any more comments about this ? thanks.

Djuffin commented 1 year ago

LGTM @tguilbert-google please take a look

tguilbert-google commented 1 year ago

Also LGTM!

bdrtc commented 1 year ago

Also LGTM!

Thanks. If there's any questions please let me know when you approve this.