diff --git a/misc/build.func b/misc/build.func index 8d09d8fa..656dfedb 100644 --- a/misc/build.func +++ b/misc/build.func @@ -593,6 +593,22 @@ lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file EOF fi + else + if [[ "$APP" == "Channels" || "$APP" == "Emby" || "$APP" == "Frigate" || "$APP" == "Jellyfin" || "$APP" == "Plex" || "$APP" == "Scrypted" || "$APP" == "Tdarr" || "$APP" == "Unmanic" ]]; then + if [[ -e "/dev/dri/card0" ]]; then + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +dev0: /dev/dri/card0,gid=44 +dev1: /dev/dri/renderD128,gid=104 +EOF + else + cat <>$LXC_CONFIG +# VAAPI hardware transcoding +dev0: /dev/dri/card1,gid=44 +dev1: /dev/dri/renderD128,gid=104 +EOF + fi + fi fi # This starts the container and executes -install.sh