hey all!

for the life of me, i cannot get VAAPI hardware accelerated encoding to work. i always get this error:

Error: ffmpeg exited with code 234: Device creation failed: -22. Failed to set value ‘/dev/dri/renderD128’ for option ‘vaapi_device’: Invalid argument Error parsing global options: Invalid argument`

at ChildProcess.<anonymous> (/app/node_modules/fluent-ffmpeg/lib/processor.js:180:22)
at ChildProcess.emit (node:events:524:28)
at ChildProcess._handle.onexit (node:internal/child_process:293:12)
  • AMD Radeon RX 9060 XT
  • i have mesa-va-drivers and mesa-libgallium installed from bookworm backports.
  • the container is rootful.
  • /dev/dri is mapped
  • the render group id matches between host and container.
  • SELinux is set to allow containers access to devices.

no joy.

vainfo

error: XDG_RUNTIME_DIR is invalid or not set in the environment. error: can’t connect to X server! libva info: VA-API version 1.17.0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so libva info: Found init function __vaDriverInit_1_17 amdgpu: os_same_file_description couldn’t determine if two DRM fds reference the same file description. If they do, bad things may happen! libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.17 (libva 2.12.0) vainfo: Driver version: Mesa Gallium driver 25.0.4-1~bpo12+1 for AMD Radeon Graphics (radeonsi, gfx1200, ACO, DRM 3.63, 6.15.4-1-default) vainfo: Supported profile and entrypoints VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileHEVCMain : VAEntrypointVLD VAProfileHEVCMain : VAEntrypointEncSlice VAProfileHEVCMain10 : VAEntrypointVLD VAProfileHEVCMain10 : VAEntrypointEncSlice VAProfileJPEGBaseline : VAEntrypointVLD VAProfileVP9Profile0 : VAEntrypointVLD VAProfileVP9Profile2 : VAEntrypointVLD VAProfileAV1Profile0 : VAEntrypointVLD VAProfileAV1Profile0 : VAEntrypointEncSlice VAProfileNone : VAEntrypointVideoProc

i’ve also tried updating the packages from trixie and sid, and installing the firmware-linux-nonfree.

i’ve tried disabling SELinux. i’ve tried making the container permissive.

no change.

any help is appreciated! thank you!