Skip to content

mac-videotoolbox: Add service-requested low latency rate control - #2

Open
ghbogarin wants to merge 1 commit into
masterfrom
feature/videotoolbox-low-latency
Open

mac-videotoolbox: Add service-requested low latency rate control#2
ghbogarin wants to merge 1 commit into
masterfrom
feature/videotoolbox-low-latency

Conversation

@ghbogarin

@ghbogarin ghbogarin commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds support for VideoToolbox's low latency rate control (kVTVideoEncoderSpecification_EnableLowLatencyRateControl) to the Apple H.264 and HEVC hardware encoders.

The mode is not exposed in the UI. It is requested programmatically through a hidden low_latency boolean registered on the encoder's property list, so a service can opt its encoder into it fromapply_encoder_settings.

When it is requested, create_encoder asks VideoToolbox for the low latency counterpart of the selected encoder with VTCopySupportedPropertyDictionaryForEncoder (the .rtvc variant) and builds the session against that encoder ID rather than overriding the user's encoder selection.

Motivation and Context

The Apple encoders currently target throughput and quality. Low latency rate control disables the encoder-side buffering and frame reordering that the default configuration relies on, which is what real-time delivery needs, at the cost of some compression efficiency, which is why it should not be turned on globally by default.


This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants