2024-10-08, 05:49 AM
Hi, I turned on Hardware Acceleration with VAAPI on WSL2 Docker and can convert hevc to h264.
Device: Windows11 + Docker in WSL2 + Jellyfin.
First modify docker-compose.yml.
1. Add /usr/lib/wsl to volumes.
2. Add /dev/dxg to devices.
3. Add environment.
Then install dependencies in the jellyfin container.
Finally restart the container.
Refer to: https://github.com/microsoft/wslg/blob/m...ated-video and https://jellyfin.org/docs/general/admini...ualization
Device: Windows11 + Docker in WSL2 + Jellyfin.
First modify docker-compose.yml.
1. Add /usr/lib/wsl to volumes.
2. Add /dev/dxg to devices.
3. Add environment.
services:
jellyfin:
container_name: jellyfin
image: jellyfin/jellyfin
restart: always
network_mode: host
volumes:
- ./config:/config
- ./media:/media
- /usr/lib/wsl:/usr/lib/wsl
devices:
- /dev/dxg:/dev/dxg
- /dev/dri/card0:/dev/dri/card0
- /dev/dri/renderD128:/dev/dri/renderD128
environment:
- LIBVA_DRIVER_NAME=d3d12
- LD_LIBRARY_PATH=/usr/lib/wsl/lib
Then install dependencies in the jellyfin container.
apt update && apt install -y vainfo mesa-va-drivers mesa-vulkan-drivers vulkan-tools
Finally restart the container.
docker compose restart
Refer to: https://github.com/microsoft/wslg/blob/m...ated-video and https://jellyfin.org/docs/general/admini...ualization