HELP! Need a detailed tutorial on getting Jellyfin to work with QSV/VAAPI on my Docker Container


Recommended Posts

Hello everyone, complete Unraid/Docker newbie here. I recently finished setting up my new server, and now I want to use Jellyfin via Docker. I installed Jellyfin (linuxserver.io's docker image) and added all my media though once I finally got around to actually try watching my media, it would refuse to play the video file(s) and it would pop up an error every time that says "This client isn't compatible with the media and the server isn't sending a compatible media format."

 

I ensured that I enabled Intel Quicksync and VAAPI for hardware encoding via Playback settings on Jellyfin but whatever I do, nothing seems to fix this issue. I went over to Github (linuserver.io Jellyfin page) to diagnose the problem and learned that I needed to pass this command "--device=/dev/dri:/dev/dri" when I install the Docker image or run the container, add the OpenCL-Intel mod to enable the OpenCL based DV, HDR10 and HLG tone-mapping, and ensure that I have the User / Group Identifiers set to PUID=1000 and PGID=1000 when running the script.

 

So knowing this, I removed Jellyfin from Docker so I can prepare to make the necessary changes. First, I need to know the host's render group id, but when I try to run the command "getent group render | cut -d: -f3" via the Unraid command prompt/terminal, it would output this every time:

 

"bash: gentent: command not found

cut: the delimiter must be a single character

Try 'cut --help' for more information."

 

So now, here's where I REALLY need your help:

 

I would like to know the following:

1. Why this command doesn't work in the Unraid command prompt/terminal?

2. What command(s) I should use to get the host's render group id via the Unraid command prompt/terminal?

3. How do I add both "--device=/dev/dri:/dev/dri" and the host's render group id to the Jellyfin Docker image script?

4. Will the changes added to the Jellyfin Docker image script remain if I restarted or shut down my server? If not, what should I do to prevent that from breaking my Jellyfin install?

5. What are some other recommended housekeeping steps to ensure that Jellyfin and its container will always run without issue?

 

Please provide instructions and/or answers in a way that I can easily understand. In spite being a complete newbie to all this, I'm willing to use the Unraid command prompt/terminal and Docker Compose if I'm thoroughly told what to do within either. But besides copying and pasting scripts that are available via docs/guides/videos/etc. or using very simple commands, I have absolutely no knowledge outside of those things, and I admit that I did expect to run into issues when setting up my server since this is technically my first time setting up/trying a "Linux-based" system/OS.

 

I really appreciate all the help I can get because I want Unraid (and Linux for that matter) to leave a very good impression on me, so i can prove to myself (and others) that there are some things that Windows just can't do.

 

~SandboxParadox

Link to comment

DAY 2

 

Okay, so I decided to do even more tinkering around and after looking through countless docs/guides/videos, I finally reached a possible solution to my issue.

 

This was compiled via Docker Compose and I had to make use of both guides from both the Jellyfin documentation and the linuxserver.io's documentation. (I added some dummy text in the code but you can fill it out yourself.)

 

version: '3.5'
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Americas/Toronto
      - JELLYFIN_PublishedServerUrl=IP_address_here
    extra_hosts:
      - "host.docker.internal:host-gateway"
    group_add:
      - "video_group_id" \ # Change this to match your "render/video/input" host group id and remove this comment
    network_mode: 'host'
    volumes:
     - /mnt/user/appdata/Jellyfin/config:/config
     - /mnt/user/appdata/Jellyfin/cache:/cache
     - /mnt/user/jellyfinmedia/Anime:/media
     - /mnt/user/jellyfinmedia/Movies:/media2:ro
    ports:
     - 8096:8096
     - 8920:8920
     - 7359:7359/udp
     - 1900:1900/udp
    devices:
     - /dev/dri/renderD128:/dev/dri/renderD128
    restart: 'unless-stopped'

 

I also ran the following commands to verify that Intel QSV and VAAPI are working when I ran Jellyfin, and they both reported that they're working:

 

docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo

and

docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va

 

After importing all my media, I tried playback on an H.264 video file and a 4K HEVC HDR file, and they successfully played without any issue.

 

Despite this however, I will continue to conduct further testing to ensure that this solution is indeed the one I'm looking for. Stay tuned. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.