Type
QuantitativeQualityOptions
Quality options expressing quantitative rate control: an explicit bitrate, an explicit quantizer, or both.
ts
type QuantitativeQualityOptions = {
bitrate?: number;
bitrateMode?: 'constant' | 'variable';
quantizer?: number;
};Used by
Properties
bitrate
ts
bitrate?: number;An explicit bitrate in bits per second. When set, this bitrate is used for encoding. It also acts as the fallback in case a specified quantizer cannot be used.
bitrateMode
ts
bitrateMode?: 'constant' | 'variable';The bitrate mode to use when encoding resolves to bitrate-based encoding.
quantizer
ts
quantizer?: number;An explicit quantizer value used for quantizer-based video encoding; lower values mean higher quality. The valid range depends on the codec and is defined in the Mediabunny Codec Registry. This option is like FFmpeg's constant-rate factor (CRF).
If the quantizer cannot be used due to missing support, then it will throw, unless bitrate is defined as a fallback.