Radeon GPU JellyFin Truenas Community Edition Hardware Encoding setup

Maybe this comes easier to some folks, but for me I did struggle to get this working for myself.

The setup:

  1. Dockge setup, with a Jellyfin container.
  2. AMD 7600X 6-Core Processor.
  3. Radeon 6600 RX 8GB PCI-E
  4. 32GB ECC RAM
  5. 1 Pool

In order to get Radeon Cards working you have to do a few things in advance.

Open up shell in Truenas and go to System→Shell and type the following:

ls -l /dev/dri

That should give you an output of your graphics card, make sure yours shows up there. You should see something like renderD128 or renderD129, mine was renderD128 and renderD129. (note this down you’ll need it later)

Next type in the following in your shell:

getent group render

My output was the following:

render:x:107:

Note the number after the X this is the group id you will need for your jellyfin container file in my case that was 107.

Below is my container file in dockge

  jellyfin:
    container_name: jellyfin
    image: lscr.io/linuxserver/jellyfin:latest
    environment:
      - PUID=568
      - PGID=568
      - TZ=America/New_York
    group_add:
      - "107" # !ADJUST Change this to match your "render" host group id shown in the step above - this is to allow jellyfin to access your cards.
    devices:
      - /dev/dri:/dev/dri # !this is needed to pass the cards over to jellyfin to make them available to it.
    ports:
      - 8096:8096
    restart: unless-stopped
    volumes:
      - /mnt/Tank/configs/jellyfin:/config
      - /mnt/Tank/Media:/media

Once Jellyfin is loaded to go Dashboard by clicking on your usericon in the top corner and dashboard, from there go to playback → Transcoding.

Choose Hardware Acceleration: Video Acceleration API (VAAPI)
Choose VA-API Dervice:
render device /dev/dri/renderD128 (the number you recorded earlier)

Scroll to the bottom and hit save, then go and test to see if it is working… start playing a high quality video file and try to drop the quality of the playback and go back to your Truenas server and see if the CPU load is less than it was before.

One issue I have found so far it breaks the ability to play XVID encoded files for whatever reason, I converted mine to mp4 to address this issue.

I hope this helps someone that was stuck like me.