kX264EncoderRateControl
Electron APIs / recorder / kX264EncoderRateControl
type kX264EncoderRateControl = "CBR" | "ABR" | "VBR" | "CRF";
Specifies the available rate control modes for the x264 encoder.
Rate control modes determine how the encoder manages bitrate and quality over time. Each mode offers a different balance between output file size, quality, and encoding speed.
| Value | Description |
|---|---|
'CBR' | Constant Bitrate. Maintains a fixed bitrate throughout encoding. Useful for streaming where bandwidth predictability is important. |
'ABR' | Average Bitrate. Tries to maintain a target average bitrate across the whole stream. Balances quality and file size over long durations. |
'VBR' | Variable Bitrate. Allows the bitrate to vary depending on frame complexity. Offers better quality at lower file sizes, but less predictable bandwidth usage. |
'CRF' | Constant Rate Factor. Targets a consistent visual quality instead of bitrate. Ideal for scenarios where quality is more important than file size. |
Example
const rateControl: kX264EncoderRateControl = "CRF";