Skip to content

Menu

  • Home
  • Sysadmin
  • Debian
  • Security
  • Docker

Blog by Constantin Herold | Theme by ThemeinProgress | Proudly powered by WordPress

Spaaacesysadmin & dev stuff

Proxmox LXC Intel Quick Sync Transcode for Plex

February 23, 2021Docker, Proxmox, Sysadmin Standard
Read time < 1 minute

Plex, Emby and Jellyfin can transcode media files on the fly so you can watch them in a browser and set the quality.

However by default they use the CPU which adds a lot of overhead.

All Intel CPU’s since Sandy Bridge released in 2011 have hardware acceleration for H.264 built in.

So if your CPU supports Quick Sync you can speed up transcoding and reduce load as well as energy consumption.

Proxmox by default does not give LXC containers access to the GPU.

Add the following to your LXC configuration in order to allow it.

Note: This only works with privileged containers.

nano /etc/pve/lxc/<container id>.conf

For Proxmox <= 6.4

lxc.cgroup.devices.allow: c 226:0 rwm
lxc.cgroup.devices.allow: c 226:128 rwm
lxc.cgroup.devices.allow: c 29:0 rwm
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file

For Proxmox >= 7.0

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.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/fb0 dev/fb0 none bind,optional,create=file

If you use Docker within LXC recreate your Plex container with the following argument

--device /dev/dri:/dev/dri

Plex will now have access to Quick Sync using /dev/dri/renderD128

Just enable “Use hardware acceleration” in transcoder settings.

Write a Reply or Comment Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Create SWAP on ZFS ZVOL
  • Raspberry Pi Grafana Kiosk
  • Proxmox Grafana Dashboard
  • Proxmox Full Disk Encryption with SSH Remote Unlock
  • Login Mail Alert Using Rsyslog

Categories

  • Debian
  • Docker
  • Monitoring
  • Personal
  • Proxmox
  • Raspberry Pi
  • Security
  • Sysadmin