Jellyfin Forum
Issues with FFMPEG Decoding using Intel iGPU/LXC - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Issues with FFMPEG Decoding using Intel iGPU/LXC (/t-issues-with-ffmpeg-decoding-using-intel-igpu-lxc)



Issues with FFMPEG Decoding using Intel iGPU/LXC - Delzye - 2025-03-16

Hi, i tried to setup a jellyfin LXC container in my Proxmox VE, playback using software decoding works, hardware decoding does not.
For setup, i mostly followed this Guide . I'll attach an error log to the post.
Curiously, when I run the command from the log inside the shell of the LXC, it seems to work fine (as in, it produces files in the transcodes directory, which does not happen when I try to play a file via the web UI).
At first, I suspected a permissions error, since the shell runs as root and Jellyfin has it's own user. But "/var/chache/jellyfin" and the transcodes directory both belong to the user Jellyfin (I assume the directory is created by jellyfin, I did not change any of the permissions).

Any help would be appreciated.

This is the command:

Code:
/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f matroska  -i file:"/movies/6 Underground (2019) 4K.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi -rc_mode VBR -b:v 10721158 -maxrate 10721158 -bufsize 21442316 -profile:v:0 high -sei -a53_cc -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(3840\,1600*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(3840/a\,1600))/2)*2,format=nv12,hwupload_vaapi" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "1ccb7b62b9e345ab69d94c88be2d8004-1.mp4" -start_number 0 -hls_segment_filename "/var/cache/jellyfin/transcodes/1ccb7b62b9e345ab69d94c88be2d8004%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/var/cache/jellyfin/transcodes/1ccb7b62b9e345ab69d94c88be2d8004.m3u8"

This is the ls output:

Code:
root@Jellyfin:~# ls -lah /var/cache/jellyfin/           
total 44K
drwxr-x--- 7 jellyfin adm      4.0K Mar 16 11:05 .
drwxr-xr-x 9 root    root    4.0K Mar  9 19:31 ..
drwxr-xr-x 3 jellyfin jellyfin 4.0K Mar 16 11:05 attachments
drwxr-xr-x 3 jellyfin jellyfin 4.0K Mar 16 10:54 images
drwxr-xr-x 2 jellyfin jellyfin 4.0K Mar 16 10:53 imagesbyname
drwxr-xr-x 2 jellyfin jellyfin  12K Mar 16 11:15 omdb
drwxr-xr-x 2 jellyfin jellyfin  12K Mar 16 11:49 transcodes



RE: Issues with FFMPEG Decoding using Intel iGPU/LXC - TheDreadPirate - 2025-03-16

In the LXC, do you see anything in /dev/dri?

And what Intel CPU do you have?


RE: Issues with FFMPEG Decoding using Intel iGPU/LXC - Delzye - 2025-03-16

(2025-03-16, 04:13 PM)TheDreadPirate Wrote: In the LXC, do you see anything in /dev/dri?

And what Intel CPU do you have?

I have an i7-8700.

I have passed the render device to the lxc, so I have renderD128 under /dev/dri. I also changed the owning group to 100104, where 104 is the ID of the render group and added the jellyfin user to the render group.
Honestly, I an not 100% sure why I need to add 100000 to the GID of render, I did it since the guide said so and a quick google did not get me an answer as to what that does, so I assumed it was required.

Here is the output of some commands, in case that helps:
Code:
root@Jellyfin:~# ls -lah /dev/dri
total 0
drwxr-xr-x 2 root  root        60 Mar 16 11:15 .
drwxr-xr-x 7 root  root        500 Mar 16 11:15 ..
crw-rw---- 1 100000 100104 226, 128 Mar 16 10:43 renderD128
root@Jellyfin:~# groups jellyfin
jellyfin : jellyfin video render
root@Jellyfin:~# cat /etc/group | grep render
render:x:104:jellyfin



RE: Issues with FFMPEG Decoding using Intel iGPU/LXC - Delzye - 2025-03-16

Ok, I got it to work by switching from an unprivileged container to a privileged one and changing some of my IOMMU settings, did this last 8 years ago and it seems I messed something up in the config of the kernel modules.


RE: Issues with FFMPEG Decoding using Intel iGPU/LXC - jenkles316 - 2025-05-14

If you still want to run in an unprivileged container, I was able to get it working w/ my A310.

I upgraded Proxmox to pve 6.11.11

After that I was able to add the card and it worked without issues.

https://privatebin.net/?95da4c20dc1a4224#3YRqGc9EWGSUa7TZNPKoNBbZry9ZZscWaBuTW2K5kKZZ

If you have multiple GPU's make sure that Card0 and renderD128 are pointing to the correct device.