Definition
WebCodecs defines VideoEncoderConfig
dictionary VideoEncoderConfig {
required DOMString codec;
[EnforceRange] required unsigned long width;
[EnforceRange] required unsigned long height;
[EnforceRange] unsigned long displayWidth;
[EnforceRange] unsigned long displayHeight;
[EnforceRange] unsigned long long bitrate;
double framerate;
HardwareAcceleration hardwareAcceleration = "no-preference";
AlphaOption alpha = "discard";
DOMString scalabilityMode;
VideoEncoderBitrateMode bitrateMode = "variable";
LatencyMode latencyMode = "quality";
DOMString contentHint;
};
This dictionary is extended in the following specifications:
- AVC (H.264) WebCodecs Registration
partial dictionary VideoEncoderConfig { AvcEncoderConfig avc; };
- HEVC (H.265) WebCodecs Registration
partial dictionary VideoEncoderConfig { HevcEncoderConfig hevc; };
Consolidated IDL (across partials)
dictionary VideoEncoderConfig {
required DOMString codec;
[EnforceRange] required unsigned long width;
[EnforceRange] required unsigned long height;
[EnforceRange] unsigned long displayWidth;
[EnforceRange] unsigned long displayHeight;
[EnforceRange] unsigned long long bitrate;
double framerate;
HardwareAcceleration hardwareAcceleration = "no-preference";
AlphaOption alpha = "discard";
DOMString scalabilityMode;
VideoEncoderBitrateMode bitrateMode = "variable";
LatencyMode latencyMode = "quality";
DOMString contentHint;
AvcEncoderConfig avc;
HevcEncoderConfig hevc;
};
Referring IDL interfaces/dictionaries
Referring specifications
- AVC (H.264) WebCodecs Registration refers to
VideoEncoderConfig
- HEVC (H.265) WebCodecs Registration refers to
VideoEncoderConfig