w3c / webcodecs

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

`contentHint`: notes aren't normative and shouldn't describe normative behaviour #735

Closed padenot closed 5 months ago

padenot commented 8 months ago

I just found a tab with my review of https://github.com/w3c/webcodecs/pull/729 unsubmitted, so I'm opening this new issue with my comments:

See contentHint:

NOTE: Any codec-specific encoding options take precedence over contentHint.

This seems to be a requirement, but is in an informative note, and that's not correct. We want to describe in what case and which codec-specific option overrides this contentHint. Also, we might want this for audio, e.g. we could make it map to those Opus flags: https://github.com/xiph/opus/blob/master/include/opus_defines.h#L191-L199

tguilbert-google commented 6 months ago

I will be submitting a PR to add contentHint to AudioEncoderConfig, for that specific Opus use case.

Should we then add text in the registries, and have the main spec defer to the registries?

chrisn commented 5 months ago

@tguilbert-google Adding to the registries sounds good, yes. We may want to add to the registry entry requirements to say that registry entries may add codec-specific options that override contentHint, and we should reword the Note as Paul suggests.