EncoderSettingsX264
Electron APIs / Recorder / EncoderSettingsX264
Configuration options for the x264 software video encoder.
Allows customization of encoding behavior including rate control, quality presets, profiles, and advanced tuning.
See
Extends
Properties
Property | Type | Description |
---|---|---|
bitrate? | number | Target encoding bitrate in kilobits per second (kbps). Default 8000 |
buffer_size? | number | Custom buffer size (in kbps) to be used when use_bufsize is true . |
keyint_sec? | number | Keyframe interval, in seconds. Defines how frequently a keyframe (I-frame) is inserted into the video stream. - 0 — Automatically selected by the encoder. - Recommended values: 2 for high quality/editability, 4 for reduced file size. - 1 — Suitable for short replays or splitting, but more CPU/GPU intensive. Balances quality, file size, and streaming performance. |
max_bitrate? | number | Maximum bitrate in kilobits per second (kbps). Caps the bitrate for encoders using variable bitrate modes (e.g., VBR). |
preset? | kX264EncoderPreset | Specifies the encoding speed/quality trade-off preset. A slower preset provides better compression (quality per bitrate). Default 'veryfast' See kX264EncoderPreset |
profile? | kX264EncoderProfile | Sets the H.264 encoding profile. Default '' (no profile). See kX264EncoderProfile |
rate_control? | kX264EncoderRateControl | Specifies the rate control method for x264. Common options include 'CBR' , 'VBR' , 'CRF' , and 'ABR' . Default rate_control . See kX264EncoderRateControl |
tune? | kX264EncoderTune | Specifies a tuning parameter to optimize the encoder for a specific type of content. Default '' (no tuning). See kX264EncoderTune |
type | kSupportedEncodersTypes | The selected video encoder type. See kSupportedEncodersTypes |
use_bufsize? | boolean | Whether to use a custom buffer size. Default false |
x264opts? | string | Additional x264 encoder options, provided as a space-separated string. Example ``"ref=4 bframes=2 me=umh subme=9". |