Ffmpeg segfaulting when trying to use vaapi


I’m trying to enable hardware acceleration for my video encoding / decoding using linuxserver containers, the hardware is an intel i3-10100.

I’ve enabled it without issues using linuxserver/jellyfin, which is now transcoding using ffmpeg / vaapi without a hitch, but trying to do the same to encode with linuxserver/ffmpeg just leads to a segfault :

# LIBVA_DRIVER_NAME=iHD docker run --rm --privileged --device=/dev/dri:/dev/dri -v /path:/path linuxserver/ffmpeg -i /path/input.mkv -map 0 -c:s srt -c:a aac -c:v hevc_vaapi -preset medium -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -vf 'format=nv12,hwupload' -debug /path/output.mkv

I stole the hw parameters here from the jellyfin logs since that’s also using ffmpeg and does work, and added the format line to see if that makes a difference but I don’t think that’s the issue.
If I just encode using hevc (not _vaapi) I still get the same segfault so I think the issue is with trying to init vaapi, not with the actual parameters passed here.

Of course if I don’t try to use vaapi, the same line works perfectly fine using software encoding. I do get decent speeds (1.2x) but I just wanted to see if hw encoding could save some time and or energy.

I’ve tried running privileged here but I’ve also tried group-add (render is 107 on my system), user and so on, always got the same result :

Parsing a group of options: global .
Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128.
[AVHWDeviceContext @ 0x561dfd1ad880] libva: VA-API version 1.1.0
/ffmpegwrapper.sh: line 13:    56 Segmentation fault      s6-setuidgid abc /usr/local/bin/ffmpeg ${FULL_ARGS}

Is there an easy way to get more info out of this ?


this is still an issue, any idea on a way to make this work ?