Plex, Proxmox 7.4, LXCs and Quicksync

Transcode Plex videos without the need for an expensive GPU with Intel QuickSync in Proxmox 7.4

Plex, Proxmox 7.4, LXCs and Quicksync
Photo by Glenn Carstens-Peters / Unsplash

I host Plex on Proxmox 7.4 in a privileged LXC container. This works well enough, but for transcoding data - if viewing on mobile devices, or burning subtitles, it's useful to pass through hardware that can be used to accelerate this process.

Intel QuickSync has been around for over a decade now and allows Plex to offload a lot of the processing requirements to transcode over traditional CPUs.

Luckily, QuickSync is supported almost out the box with Proxmox - we just need to do a bit of fiddling to get it up and running properly.

  • Enter the BIOS on your machine and disable IOMMU and enable Intel Integrated graphics
  • Reboot, and once in Proxmox, run ls -la /dev/dri
root@pve:~# ls -la /dev/dri
total 0
drwxr-xr-x  3 root root        100 Apr 16 10:32 .
drwxr-xr-x 22 root root       5040 Apr 16 10:48 ..
drwxr-xr-x  2 root root         80 Apr 16 10:32 by-path
crw-rw----  1 root video  226,   0 Apr 16 11:03 card0
crw-rw----  1 root render 226, 128 Apr 16 10:32 renderD128
  • If not done already, create a privileged LXC container for Plex. Install Plex as normal
  • Open up the configuration for your LXC container, for example: nano /etc/pve/lxc/101.conf
  • Add the following lines:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.cgroup2.devices.allow: c 29:0 rwm
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/101/mount_hook.sh
  • Create a file in /var/lib/lxc/101/mount_hook.sh and enter the following content:
mkdir -p ${LXC_ROOTFS_MOUNT}/dev/dri
mknod -m 666 ${LXC_ROOTFS_MOUNT}/dev/dri/card0 c 226 0
mknod -m 666 ${LXC_ROOTFS_MOUNT}/dev/dri/renderD128 c 226 128
mknod -m 666 ${LXC_ROOTFS_MOUNT}/dev/fb0 c 29 0
  • Restart the LXC container and ls -la /dev/dri. You should see the hardware mounted in the container
  • Ensure Plex has hardware transcoding turned on:
  • Play a file in Plex - turn the quality down. Open another tab and open Plex. Click on the dashboard icon and ensure you see hw next to video transcode