• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: Jellyfin in Container

     
    • 0 Vote(s) - 0 Average

    SOLVED: Jellyfin in Container

    HW Transcoding in Portainer on Intel N5095 NAS
    fcs001fcs
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Sep
    Reputation: 0
    Country:Netherlands
    #1
    2023-09-18, 08:56 PM
    I have a Terramaster F4-423 NAS that is an Intel Celeron N5095 CPU with integrated GPU (i915) and Terramaster GUI version 5.1.41 which I read is a version of RHEL ("uname -r" results in "5.15.59", which I believe is the Linux Kernal) 

    Jellyfin works great but I just cannot get the Hardware Acceleration IntelQuickSync (QSV) working.

    I run Jellyfin under a Portainer container and have the Docker Mod "DOCKER_MODS=linuxserver/mods:jellyfin-opencl-intel" included and after extensive google searches, still cannot get the HW Acceleration to work.

    It seems the Intel drivers and linked files are setup correctly and running, as far as I can tell, so it should work.

    I think I narrowed it down to some permission issues with the "/dev/dri" directory on the host but cannot figure how to get the Jellyfin container set up to allow access to that directory.

    Note that Terramaster does not allow a root user but only a "Superuser" with full admin permissions.

    The output of "ls -la /dev/dri" is:

    Code:
    total 0
    drwxr-xr-x  3 KJM_SuperUser KJM_SuperUser      100 Sep 17 16:13 .
    drwxr-xr-x 17 KJM_SuperUser KJM_SuperUser    4000 Sep 17 16:13 ..
    drwxr-xr-x  2 KJM_SuperUser KJM_SuperUser      80 Sep 17 16:13 by-path
    crw-rw----  1 KJM_SuperUser video        226,  0 Sep 17 16:13 card0
    crw-rw----  1 KJM_SuperUser video        226, 128 Sep 17 16:13 renderD128

    How do I allow Jellyfin in a container to use the "video" Group for access to the "renderD128" on the host or is there something else I messed up?

    As you can probably tell, I am a beginner with Linux and containers, etc... so any help would be appreciated.

    BTW I love Jellyfin, it works fantastic, many thanks to the developers.
    Go to solution
    nooobieee
    Offline

    Junior Member

    Posts: 9
    Threads: 0
    Joined: 2023 Jul
    Reputation: 0
    Country:United States
    #2
    2023-09-18, 09:36 PM (This post was last modified: 2023-09-18, 09:37 PM by nooobieee. Edited 1 time in total.)
    Notice the device is 'rw' for group "video". Just map your container user to the same group to give that user permissions.

    I use docker and also declare the device to the container in my docker-compose.yml file as such:

    devices:
    - /dev/dri/renderD128Confused-facedev/dri/renderD128

    I just use the stock docker hub image, so don't know anything about DOCKER_MODS
    bitmap
    Offline

    Community Moderator

    Posts: 851
    Threads: 9
    Joined: 2023 Jul
    Reputation: 28
    #3
    2023-09-18, 10:33 PM (This post was last modified: 2023-09-18, 10:40 PM by bitmap. Edited 2 times in total.)
    Gotta make that declaration a code block or it just thinks you're very meh about your iGPU...

    I also tend to add the associated card device (which is card0 if you're using the Intel device and do not have a dGPU on the device...doubtful in a NAS box).

    Code:
    devices:
        - /dev/dri/renderD128:/dev/dri/renderD128
        - /dev/dri/card0:/dev/dri/card0

    Also I'd take a look at the user running Jellyfin and see what groups they're part of, as @nooobieee suggested. Then you can:

    Code:
    usermod -aG [group1],[group2] [user]

    This is important because differernt distros use different groups for device perms. Ubuntu uses video and render. So it would look like this for me (requires sudo, but you'll never copy sudo from me):

    Code:
    usermod -aG video,render bitmap

    You can figure out exactly which version of Linux you're running by using a few different commands, but try:

    Code:
    cat /etc/os-release

    Or:

    Code:
    lsb_release -a
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AIL4fc84QG6uSnTDEZiCCtosg7uAA8x9j1myFaFs...qL0Q=w2400]
    fcs001fcs
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Sep
    Reputation: 0
    Country:Netherlands
    #4
    2023-09-19, 04:14 PM
    Unfortunately, Terramaster seems to lockdown its version of RHEL a bit and those commands for Linux Version do not work. See result below:

    Code:
    Using username "KJM_SuperUser".
    Authenticating with public key "rsa-key-xxxxxxxx"
    Welcome to Tnas!
    [KJM_SuperUser@xxxxxxxx ~]# cat /etc/os-release
    cat: /etc/os-release: No such file or directory
    [KJM_SuperUser@xxxxxxxx~]# lsb_release -a
    -bash: lsb_release: command not found

    I will try the other suggestions tonight. Thanks.
    fcs001fcs
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Sep
    Reputation: 0
    Country:Netherlands
    #5
    2023-09-19, 04:55 PM
    I used the command "usermod -aG [group1],[group2] [user]" to get what I think is the correct user into the "video" group, user is listed in the video group, but no improvement. Transcoding a 4K video to a windows browser causes the CPU to go to approx 50%. I think that is wrong. The steam info is attached.
       

    How do I confirm the user for Jellyfin when it is running as a Portainer container; as I suspect that I may be referencing the wrong user. I am using the PUID of the container to determine the user, that may be the wrong thing to do.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2023-09-19, 05:02 PM
    50% CPU usage on a N5095 during transcoding sounds about right. Even if you are using the iGPU to do the actual encoding, the CPU still has to compose and feed the iGPU. I can tell you right now that 4K, 50FPS is NOT happening with a CPU transcode on a N5095. Heck, a 1080P transcode is not happening on a N5095. That is definitely an iGPU transcode.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    fcs001fcs
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Sep
    Reputation: 0
    Country:Netherlands
    #7
    2023-09-19, 07:23 PM
    @TheDreadPirate

    Many Thanks for the education. I did not realize that 4K transcoding took so much CPU even with HWA from the iGPU setup and working. 

    I was chasing a ghost, I guess. 

    Thanks
    fire_jellyfin
    Offline

    Junior Member

    Posts: 4
    Threads: 1
    Joined: 2023 Sep
    Reputation: 0
    Country:Netherlands
    #8
    2023-09-19, 08:01 PM
    To verify HW transcoding is working properly you can open the Jellyfin dashboard in the Jellyfin menu. Go to the advanced section and log-files "logboeken" in Dutch.

    If you did wacht a file that needed transcoding you will see log files starting with ffmpeg.transcode-...
    Search for the part where it shows what ffmpeg is doing. See my example below. If it states h264_vaapi the HW transcoding is working correctly.

    Stream mapping:
      Stream #0:0 -> #0:0 (vp9 (native) -> h264 (h264_vaapi))
      Stream #0:1 -> #0:1 (vorbis (native) -> ac3 (native))
    fcs001fcs
    Offline

    Junior Member

    Posts: 8
    Threads: 1
    Joined: 2023 Sep
    Reputation: 0
    Country:Netherlands
    #9
    2023-09-20, 07:19 PM
    (2023-09-19, 08:01 PM)fire_jellyfin Wrote: To verify HW transcoding is working properly you can open the Jellyfin dashboard in the Jellyfin menu. Go to the advanced section and log-files "logboeken" in Dutch.

    If you did wacht a file that needed transcoding you will see log files starting with ffmpeg.transcode-...
    Search for the part where it shows what ffmpeg is doing. See my example below. If it states h264_vaapi the HW transcoding is working correctly.

    Stream mapping:
      Stream #0:0 -> #0:0 (vp9 (native) -> h264 (h264_vaapi))
      Stream #0:1 -> #0:1 (vorbis (native) -> ac3 (native))

    Thanks for the advice to confirm, I still had doubts, but it does seem to be working. Below is a 4k video streamed to a Win 11 machine in an Edge video player.

    Stream mapping:
      Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_qsv))
      Stream #0:2 -> #0:1 (eac3 (native) -> aac (libfdk_aac))

    Video info from Jellyfin:

    Video
    Title: 4K HEVC HDR
    Codec: HEVC
    Profile: Main 10
    Level: 150
    Resolution: 3840x2160
    Aspect ratio: 16:9
    Interlaced: No
    Framerate: 23.976025
    Bitrate: 25603 kbps
    Bit depth: 10 bit
    Video range: HDR
    Video range type: HDR10
    Color space: bt2020nc
    Color transfer: smpte2084
    Color primaries: bt2020
    Pixel format: yuv420p10le
    Ref frames: 1
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #10
    2023-09-20, 07:27 PM
    (2023-09-20, 07:19 PM)fcs001fcs Wrote: Stream mapping:
      Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_qsv))
      Stream #0:2 -> #0:1 (eac3 (native) -> aac (libfdk_aac))

    Definitely hardware accelerated.  What I highlighted would say "libx264" if it was software transcoding.  But the audio is software transcoding so that contributes to your CPU usage.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode