Jellyfin Forum
Am I using the hardware acceleration correctly? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Am I using the hardware acceleration correctly? (/t-am-i-using-the-hardware-acceleration-correctly)

Pages: 1 2


Am I using the hardware acceleration correctly? - Grimlock - 2024-03-13

Pretty new to everything Jellyfin
 
CPU is a 100% while transcoding, but it appears the iGPU isn’t working very hard:
   

Or is it just a matter of working/not working and this is just expected performance?
 
Jellyfin is deployed as a docker from the linuxserver repository on my unraid system.
Intel Quicksync (QSV) has been enabled.
Intel GPU TOP plugin is installed and the --device=/dev/dri:/dev/dri flag has been added

 
System
CPU: 12th Gen Intel® Core™ i3-12100 @ 3267 MHz
Memory: 32 GiB DDR4


RE: Am I using the hardware acceleration correctly? - TheDreadPirate - 2024-03-13

Is a single core running at 100%? Or all cores? A single core at 100% probably means that the audio is transcoding on the CPU, which is expected.

Can you share your ffmpeg log with us via https://sourceb.in/ ?


RE: Am I using the hardware acceleration correctly? - Grimlock - 2024-03-13

All cores are pretty much at 100%

Here are my FFmpeg logs

https://srcb.in/eyLyRzzGy2


RE: Am I using the hardware acceleration correctly? - TheDreadPirate - 2024-03-13

It is using the iGPU.

Code:
Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_qsv))

Your video is a bit weird. It has 2 video streams? One with and without Dolby Vision?

Did you apply the Intel OpenCL mod for the LSIO Jellyfin container? Can you share the full docker config for Jellyfin?


RE: Am I using the hardware acceleration correctly? - Grimlock - 2024-03-13

Here is where my inexperience starts to show... Grimacing-face

How do I share my docker config from unRaid? this is what I could grab: https://sourceb.in/267c2UwI8Z

I did not apply the Intel OpenCL mod for the LSIO Jellyfin container... but I would not know how

here is a link to another file transcoding log if that's helpful: https://sourceb.in/GFU2e5wJNF


RE: Am I using the hardware acceleration correctly? - TheDreadPirate - 2024-03-13

You have to add an environment variable to the Docker config for Jellyfin.

https://github.com/linuxserver/docker-mods/tree/jellyfin-opencl-intel

Code:
DOCKER_MODS=linuxserver/mods:jellyfin-opencl-intel

Since your video is HDR, you need the OpenCL mod.


RE: Am I using the hardware acceleration correctly? - Grimlock - 2024-03-13

Thanks for the help. I've added the mod, but still CPU is running at 98~100%.


RE: Am I using the hardware acceleration correctly? - TheDreadPirate - 2024-03-13

For a sanity check, can you try another video? Preferably one that isn't HDR? The video we've been trying is a bit weird. Has two video streams.

Code:
Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 3840x2160 [SAR 1:1 DAR 16:9], 60746 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
    Metadata:
      creation_time   : 2023-01-11T16:59:46.000000Z
      vendor_id       : [0][0][0][0]
      encoder         : HEVC Coding
  Stream #0:1[0x2](und): Video: hevc (Main 10) (dvhe / 0x65687664), yuv420p10le(tv, bt2020nc/bt2020/smpte2084), 1920x1080 [SAR 1:1 DAR 16:9], 12172 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
    Metadata:
      creation_time   : 2023-01-11T16:59:46.000000Z
      vendor_id       : [0][0][0][0]
      encoder         : DOVI Coding
    Side data:
      DOVI configuration record: version: 1.0, profile: 7, level: 6, rpu flag: 1, el flag: 1, bl flag: 0, compatibility id: 6

The first 4K HEVC 10 stream and a separate HEVC 10 + DOVI 7.6 stream that is 1080P instead of 4K? Its a bit unusual. Normally you have the HEVC and DV side channel in the same stream.


RE: Am I using the hardware acceleration correctly? - Grimlock - 2024-03-15

Sorry - Took me a while to test out another video

This one is better but still chewing up 85% ~ 90% CPU

Here are the logs: https://sourceb.in/ZkVVVQDvJz

iGPU looks a little better though?
   


RE: Am I using the hardware acceleration correctly? - TheDreadPirate - 2024-03-15

For testing, can you spin up a jellyfin/jellyfin docker image? I've found that the LSIO docker image behaves differently than the official image in a lot of weird ways. This may be another.

Replace the group_add value with the GID of the render group on your PC. Add your media paths, etc.

Code:
version: '3.5'
services:
  jellyfin:
    image: jellyfin/jellyfin:10.8.13-1
    container_name: jellyfin-test
    user: 1000:1000
    group_add:
      - "122" # Change this to match your "render" host group id and remove this comment
    network_mode: 'host'
    volumes:
      - /path/to/config:/config
      - /path/to/cache:/cache
      - type: bind
        source: /path/to/media
        target: /media
      - type: bind
        source: /path/to/media2
        target: /media2
        read_only: true
    restart: 'unless-stopped'
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128