Skip to main content

EncoderSettingsAMF264

Electron APIs / recorder / EncoderSettingsAMF264

Configuration settings for AMD H.264 (AVC) video encoding.

Extends EncoderSettingsAMF to provide H.264-specific options such as profile and encoding preset.

See​

  • kAMDEncoderProfile264
  • kAMDEncoderPreset

Extends​

Properties​

PropertyTypeDescription
bf?numberMaximum number of B-frames allowed in the video stream. B-frames improve compression efficiency but may add encoding latency. Applies to H.264 and AV1; ignored for HEVC. AV1 B-frames need a GPU that supports them, such as the Radeon RX 9000 series; on other GPUs the encoder logs a warning and encodes without B-frames. Default 3 (2 for AV1)
bitrate?numberTarget encoding bitrate in kilobits per second (kbps). Default 8000
cpq?numberDeprecated Use cqp instead. Retained for backward compatibility; this value is ignored by the encoder.
cqp?numberConstant Quantization Parameter (CQP) level. Determines the quality level for quantizer-based rate control. Only applies when rate_control is 'CQP' or 'QVBR'. Range: 0–51 (0–63 for AV1). Default 20
ffmpeg_opts?stringPass custom options directly to the AMF encoder or FFmpeg. This allows advanced tuning or enabling experimental features. Example: "level=5.2 profile=main" Refer to AMD AMF documentation for supported flags.
keyint_sec?numberKeyframe 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?numberMaximum bitrate in kilobits per second (kbps). Caps the bitrate for encoders using variable bitrate modes (e.g., VBR).
preset?kAMDEncoderPresetDefines the encoding preset used to balance quality and performance. See kAMDEncoderPreset
profile?kAMDEncoderProfile264Specifies the H.264 profile to use for encoding. Determines compression efficiency and compatibility. Default 'high' See kAMDEncoderProfile264
rate_control?kAMDEncoderRateControlSpecifies the rate control method used by the encoder. Options include: - 'CBR' — Constant Bitrate - 'CQP' — Constant Quantization Parameter - 'VBR' — Variable Bitrate - 'VBR_LAT' — Latency-aware VBR - 'QVBR' — Quality Variable Bitrate - 'HQVBR' — High Quality VBR - 'HQCBR' — High Quality Constant Bitrate Default 'CBR' See kAMDEncoderRateControl
typekSupportedEncodersTypesThe selected video encoder type. See kSupportedEncodersTypes