$ podman exec -u root -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device Device creation failed: -2.
Failed to set value 'drm=dr:/dev/dri/renderD128' for option 'init_hw_device': No such file or directory
Error parsing global options: No such file or directory
if privileged is true.
$ podman exec -u root -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v debug -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr
ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12 (Debian 12.2.0-14)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'drm=dr:/dev/dri/renderD128'.
Reading option '-init_hw_device' ... matched as option 'init_hw_device' (initialise hardware device) with argument 'vaapi=va@dr'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Applying option init_hw_device (initialise hardware device) with argument drm=dr:/dev/dri/renderD128.
[AVHWDeviceContext @ 0x55e56e90b480] Opened DRM device /dev/dri/renderD128: driver i915 version 1.6.0.
Applying option init_hw_device (initialise hardware device) with argument vaapi=va@dr.
[AVHWDeviceContext @ 0x55e56e90b8c0] libva: VA-API version 1.21.0
[AVHWDeviceContext @ 0x55e56e90b8c0] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x55e56e90b8c0] libva: Found init function __vaDriverInit_1_21
[AVHWDeviceContext @ 0x55e56e90b8c0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55e56e90b8c0] Initialised VAAPI connection: version 1.21
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x42475241 -> argb.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x52474241 -> abgr.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x42475258 -> 0rgb.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x52474258 -> 0bgr.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30335241 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30334241 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30335258 -> x2rgb10le.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30334258 -> x2bgr10le.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x36314752 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x56555941 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x56555958 -> vuyx.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30303859 -> gray.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x3132564e -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x50313134 -> yuv411p.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x48323234 -> yuv422p.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x56323234 -> yuv440p.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x50343434 -> yuv444p.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x33434d49 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x32313050 -> p012le.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30313259 -> y210le.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x32313259 -> y212le.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x36313259 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x30313459 -> xv30le.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x32313459 -> xv36le.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x36313459 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x50424752 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] Format 0x50524742 -> unknown.
[AVHWDeviceContext @ 0x55e56e90b8c0] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.2.1 (0593864).
[AVHWDeviceContext @ 0x55e56e90b8c0] Driver not found in known nonstandard list, using standard behaviour.
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
I can speak at least for rootless podman, I spent some hours on it and different ways I tried all ended in permission issues.
I gave up on trying to do it properly and just set the permissions of the /dev/dri device to 666, so that my podman container can use the gpu for transcoding.
Part of the issue with the container images that I tried is that they create a new user with whatever uid:gid I pass to the container, and so even if my nonroot user is part of the render group, the new user inside the container is not and so it can't write to the /dev/dri/renderD128 (gpu), and so transcode wouldn't work.
That's where I left the troubleshooting at cause it was being a headache