Probing FFmpeg's av1_vulkan en... Note

Probing FFmpeg's av1_vulkan encoder: does your GPU actually support it?

FFmpeg 8.x introduces av1_vulkan, the first cross-vendor GPU AV1 encoder, leveraging Vulkan's video encode extensions. This aims to unify AV1 encoding across NVIDIA, AMD, and Intel hardware through a single code path. However, driver support for these extensions is inconsistent, requiring users to first verify their system's capabilities. To do this, one must ensure they have FFmpeg 8.x with Vulkan enabled and the vulkaninfo tool.The crucial step is checking if the driver exposes the necessary Vulkan extensions for AV1 encoding. Successful detection means both VK_KHR_video_encode_av1 and VK_KHR_video_encode_queue are listed by vulkaninfo. If these extensions are missing, updating the GPU driver is the primary solution, as it's often a driver-level issue rather than a command-line problem.Once verified, a synthetic encode test using lavfi's testsrc2 is recommended to rule out file-specific issues. If this synthetic test passes, users should then attempt encoding their own content, ideally keeping both decode and encode on the GPU for maximum efficiency. For performance assessment, a benchmark comparing av1_vulkan against SVT-AV1 (software encoder) on representative content is essential.The general trade-off is that hardware encoding offers superior throughput and power efficiency, while software encoding typically yields better quality per bit. The decision of which encoder to use depends on the specific workload, with hardware acceleration favored for live transcoding, bulk ingestion, and previews where throughput is paramount. Cross-vendor compatibility offered by Vulkan simplifies pipeline management and allows for flexible scaling across different hardware.Running av1_vulkan in containers requires careful configuration, including passing through GPU devices and ensuring matching driver versions between the host and the container image. Common failures include missing AV1 encode extensions, which are resolved by driver updates, or issues with Vulkan device discovery in containers. Future developments may include the decode side of Vulkan video encoding, further enhancing GPU-resident processing pipelines.