linuxserver/docker-emby and I assume others like docker-jellyfin would benefit from access to hw accelerated video encoding and decoding. For Intel and nvidia the needed drivers are provided.
For AMD they can easily be installed with apt-get install mesa-va-drivers
To actually use it this ENV must be updated.
export LIBVA_DRIVERS_PATH=/usr/lib/x86_64-linux-gnu/dri:${LIBVA_DRIVERS_PATH}
root@docker:/# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Mesa Gallium driver 19.2.8 for AMD RAVEN (DRM 3.36.0, 5.6.0-0.bpo.2-amd64, LLVM 9.0.0)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc```
## Current Behavior
The drivers to use vaapi on AMD hardware is not installed, thus trying to use such functionality fails
## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1. `apt-get update && apt-get -y install vainfo`
2. ```
root@docker:/# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can't connect to X server!
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
libva info: Trying to open /usr/lib/dri/radeonsi_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit```
## Environment
**OS:** Debian 10 / Openmediavault
**CPU architecture:** x86_64
**How docker service was installed:**
Docker was installed from the Openmediavault web interface.
## Command used to create docker container (run/create/compose/screenshot)
`docker run -d --device=/dev/dri:/dev/dri -v /srv/dev-disk-by-label-appdata/AppData/Emby:/config -v /srv/dev-disk-by-label-media/media:/data/media -v /srv/dev-disk-by-label-transcode/transcode:/transcode --network=host --name emby linuxserver/emby:latest`