We run a hosted box with Intel Corporation HD Graphics 630. We have there Debian Buster with i965-va-driver-shaders
and intel-media-va-driver-non-free
installed. We are able to do hardware-accelerated video encoding of screen grabbed from Xvfb using ffmpeg which is from Debian Multimedia repository.
ffmpeg -hide_banner -y -loglevel error -vaapi_device /dev/dri/renderD128 -thread_queue_size 512 -video_size 1280x720 -framerate 25 -draw_mouse 0 -f x11grab -i :0.0 -f pulse -i mspmqp2tda.monitor -map 0:v -map 1:a -vf hwupload,scale_vaapi=format=nv12 -c:v h264_vaapi -qp 24 -c:a libfdk_aac rec.mp4
What we are missing is hardware accelerated video decoding in Chromium. It seems it doesn't work out of the box if it is running in Xvfb. Command vainfo errors with following output:
root@box:~# DISPLAY=:1 vainfo
error: XDG_RUNTIME_DIR not set in the environment.
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns -1
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)
vaInitialize failed with error code -1 (unknown libva error),exit
Is there a way to have VA-API HW decoding capability enabled on headless server?
Note that HW decoding works with Chromium on Debian Buster (same software) on our local desktop PC.