As a follow up to my post this weekend about standing up Jellyfin inside an unprivileged LXC container, @kiraso asked me on Mastodon if the Intel QuickSync iGPU could be shared with more than 1 LXC. For example, perhaps I want to run Plex and Jellyfin in two separate LXCs and have them both take advantage of hardware accelerated decoding. Possible?1

Sure is!

To test this, I modified my Ansible playbook (sample available in this gist) to create a second Jellyfin host configured exactly the same as the first. I passed through the same /dev/dri devices, set the same permissions via group ID mapping, and booted both containers up.

To start, I did not enable hardware accelerated transcoding on the second Jellyfin container, which I gave to hostname jellyfin2. I wanted to evidence the high CPU usage that would occur without hw-transcoding turned on inside of Jellyfin’s configuration.

Then I started playing a 4K video in jellyfin2 transcoded to 1080p. Here’s what htop showed:

After a cold boot

After a cold boot

With a transcode running, no hw-accel

With a transcode running, no hw-accel

Next, I’ll enable hardware transcoding in the Jellyfin GUI and play the same video file again. Now htop shows:

Hardware transcoding enabled in jellyfin2 host

Hardware transcoding enabled in jellyfin2 host

Neat! Hardware transcoding is working. The CPU usage is reduced from almost pegging both cores. Notice the ffmpeg command has changed, too.

...-init_hw_device vaapi=va: ,kernel_driver=i915,driver=...

I did not show this in my earlier post, but here’s the output of running intel_gpu_top on the host proxmox machine:

Result of intel_gpu_top on proxmox host machine

Result of intel_gpu_top on proxmox host machine

Seeing all of those buffers lit up is exactly what we’re after. This proves the Intel QuickSync engine is doing the transcoding work.

Next, let’s start two hardware-accelerated transcodes on both my original jellyfin container and the new jellyfin2 container. We should expect to see that the iGPU is being used by both containers – I hope!

htop on jellyfin

htop on jellyfin

htop on jellyfin2

htop on jellyfin2

Great! We’re seeing hardware transcoding on both of the Jellyfin containers. I’m watching the video playback side-by-side in two different browser windows on my screen.

Finally, here’s the output of intel_gpu_top on the proxmox host:

intel_gpu_top on proxmox host with two concurrent transcodes running

intel_gpu_top on proxmox host with two concurrent transcodes running

Wrap up

As seen above, the Intel QuickSync iGPU can be shared to multiple LXCs and used concurrently. Hope this helps someone!

Are there limits to this? Probably, but I’m not looking to explore them right now. My homelab needs just the one Jellyfin instance running, and it won’t be used concurrently with Plex.


  1. In defiance of Betteridge’s law of headlines, I am happy to report that this headline that ends in a question mark can be answered by the word “yes”. 😁 I even managed to get the answer out by the second graph; burying the lede is for hacks! ↩︎