Skip to content

Menu

  • Home
  • Sysadmin
  • Debian
  • Security
  • Docker

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

SpaaaceNo Ads, No Trackers, No AI, just DevOps

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.

Comments

Steve December 21, 2022 at 17:23 - Reply

Both configs for Proxmox = 7.0 are the same?

    Constantin May 23, 2023 at 22:29 - Reply

    It’s not the same, Proxmox 7.0 uses cgroup2.

Heinrich September 17, 2023 at 13:16 - Reply

Hi does this Work in Proxmox 8 too?

    Constantin October 5, 2023 at 23:09 - Reply

    Should work please try and give feedback.

    Mine still works with upgrade but I never tried a fresh install of Proxmox 8.

Bjarne November 23, 2023 at 15:20 - Reply

Thanks for this. I can confirm that it works on Proxmox 8

Phillip Glau December 1, 2024 at 22:02 - Reply

Just want to add that you should pass through either the iGPU or NVIDA gpu ~~prior~~ to performing ‘apt install plexmediaserver’

I spend days chasing this down. I had created an LXC container on ProxMox to run Plex Media Server, but did not initially pass through the iGPU from my Intel chip.

Apparently there is something in the install process that ‘sets up’ Plex at that point to be able to do hardware encoding or not. After setting up the Plex server, I later did the steps to get the iGPU passed through but no matter what I did it only ever used the CPU to transcode.

My solution was to ‘apt uninstall plexmediaserver’ and then follow it up with ‘apt install plexmediaserver’. Doing so ‘discovered’ the Intel iGPU during the install process and subsequently all my transcodes now take advantage of the iGPU.

While I did a passthrough to a LXC container, my assumption would be that if I had attached the iGPU as a PCI device to a VM, I would also have needed to ‘re-install’ plex to ‘see’ it during the set up phase.

Chris April 21, 2025 at 05:36 - Reply

As if 2025-04-20 still works with proxmox-ve: 8.4.0 (running kernel: 6.8.12-9-pve)

Write a Reply or Comment Cancel reply

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

Recent Posts

  • APT Upgrade Handling using Ansible
  • Sentry alternative: Bugsink to the rescue
  • Create SWAP on ZFS ZVOL
  • Raspberry Pi Grafana Kiosk
  • Proxmox Grafana Dashboard

Categories

  • Ansible
  • Debian
  • Development
  • Docker
  • IaC
  • Monitoring
  • Personal
  • Proxmox
  • Raspberry Pi
  • Security
  • Sysadmin