VAAPI build need drivers in container to work
I'm trying image with tag 7.1-vaapi2404 and also building using docker-images/7.1/vaapi2404/Dockerfile, and I find it can't use Intel video cards.
This can be solved by installing intel-media-va-driver package, and then, we can see the info using vainfo. However, current Dockerfile seems don't want to install any Debian packages in the final image and copy files instead. What might be a better way to solve this?
I see the original PR adding this feature mentioned that the Intel driver should run the host and not in the container: https://github.com/jrottenberg/ffmpeg/pull/106#issuecomment-397232112
However, while vainfo is running well on host, if I don't have intel-media-va-driver package installed in container, executing ffmpeg directly will show error initializing VAAPI:
[AVHWDeviceContext @ 0x59fc40680700] libva: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
[AVHWDeviceContext @ 0x59fc40680700] Failed to initialise VAAPI connection: -1 (unknown libva error).
Device creation failed: -5.
[AVHWDeviceContext @ 0x59fc40668240] Cannot open the X11 display .
Device creation failed: -1313558101.
[vist#0:0/hevc @ 0x59fc4068cd80] [dec:hevc @ 0x59fc40641640] Auto hwaccel disabled: no device found.
I think we should add it.