Expand description
VA-API hardware H.264 encoder for Intel / AMD GPUs via FFmpeg.
Hardware-accelerated H.264 encoding on VA-API through FFmpeg’s h264_vaapi
encoder. Frames reach the GPU by one of three entry points — a Wayland
DRM-PRIME dmabuf (encode_dmabuf), a host BGRA frame from the X11 capture
path (encode_host_argb), or already-planar pixels (encode_raw) — and an
FFmpeg filter graph runs VA-VPP (scale_vaapi) to land the pixels on the GPU
in BT.709 limited range before encode, so no colorspace conversion happens on
the CPU.
Chroma follows video_fullcolor: 4:2:0 lands as NV12, and 4:4:4 lands as
whichever 4:4:4 surface format the VA driver reports. 4:4:4 is negotiated
rather than assumed — see [fullcolor_sw_format] — and a device or FFmpeg
build that cannot carry it fails construction so the caller falls back.
Structs§
- Vaapi
Encoder - Hardware-accelerated H.264 encoder built on FFmpeg’s
h264_vaapi, owning the whole VA-API pipeline for one capture: device contexts, the surface pool, the color-convert filter graph, the reusable frames/packet, and live rate-control state.