VideoToolboxEncodeSettings

Settings shared by the Apple VideoToolbox hardware encoders (macOS only).

Field

Type

Repeated

Description

rateControl

oneOf

⮑average_bitrate

uint32

⮑constant_bitrate

uint32

⮑quality

float

max_bitrate

OptionalInt

A hard cap on top of the rate control (kbit/s), measured over max_bitrate_window_ms (default one second)

max_bitrate_window_ms

OptionalInt

key_frame_interval

OptionalInt

Maximum distance between keyframes in frames; required for consistent gops

key_frame_interval_seconds

OptionalFloat

Maximum distance between keyframes in seconds

allow_frame_reordering

OptionalBool

Allow B-frames (VideoToolbox’s default is to allow them)

real_time

OptionalBool

low_latency

OptionalBool

Low-latency rate control; cannot be combined with frame reordering

prioritize_speed

OptionalBool

require_hardware

OptionalBool

Fail rather than fall back to a software encoder (default true)

Member of

Message

Description

VideoToolboxH264

Parameters for the Apple VideoToolbox H.264 hardware encoder (macOS only)

VideoToolboxHevc

Parameters for the Apple VideoToolbox HEVC hardware encoder (macOS only)