Jellyfin Forum
hardware acceleration on jelly fin - 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: hardware acceleration on jelly fin (/t-hardware-acceleration-on-jelly-fin)



hardware acceleration on jelly fin - Prince3739 - 2024-01-22

Hello all,
I'm trying to figure out hardware acceleration on jelly fin. I have jell fin installed on a docker container.

My setup
Device : Intel NUC
CPU : Intel® Core™ i5-5250U processor Architecture: X64
OS : Linux Mint
Jellyfin Version : Version: 10.8.13

Graphics: Driver: i915 Model: HD Graphics 6000

Below is the stack I'm running on docker container.

services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Berlin
    volumes:
      - /xxxxx/xxxx/Documents/docker/dockerconfigs/jellyfin: /config
      - /media/datadrive/media/tv: /data/tvshows
      - /media/datadrive/media/movies: /data/movies
    ports:
      - 8096:8096
      - 8920:8920 #optional
      - 7359:7359/udp #optional
      - 1900:1900/udp #optional
    devices:
      - /dev/dri: /dev/dir
    restart: unless-stopped


Whenever trying to play HEVC format for chrome browser on my PC, getting this error: Playback Error
This client isn't compatible with the media and the server isn't sending a compatible media format.

Also tried both Intel quick sync and video acceleration API but nothing works
I have checked off the HEVC decoding but still wont work.

Any suggestion would be help full, thanks


RE: hardware acceleration on jelly fin - mikesulsenti - 2024-01-22

You should be using QSV instead of VA-API when using Intel graphics

See if your docker container can actually utilize it:
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo
and
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va



RE: hardware acceleration on jelly fin - TheDreadPirate - 2024-01-22

You also have too many of those codec boxes checked.

https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardware_decoding_and_encoding

MPEG2
H264
VC-1
VP8
VP9?


RE: hardware acceleration on jelly fin - Prince3739 - 2024-01-22

(2024-01-22, 11:41 AM)mikesulsenti Wrote: You should be using QSV instead of VA-API when using Intel graphics

See if your docker container can actually utilize it:
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo
and
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va

(2024-01-22, 04:25 PM)Prince3739 Wrote:
(2024-01-22, 11:41 AM)mikesulsenti Wrote: You should be using QSV instead of VA-API when using Intel graphics

See if your docker container can actually utilize it:
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo
and
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va

(2024-01-22, 10:28 AM)Prince3739 Wrote: Hello all,
I'm trying to figure out hardware acceleration on jelly fin. I have jell fin installed on a docker container.

My setup
Device : Intel NUC
CPU : Intel® Core™ i5-5250U processor Architecture: X64
OS : Linux Mint
Jellyfin Version : Version: 10.8.13

Graphics: Driver: i915 Model: HD Graphics 6000

Below is the stack I'm running on docker container.

services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/Berlin
    volumes:
      - /xxxxx/xxxx/Documents/docker/dockerconfigs/jellyfin: /config
      - /media/datadrive/media/tv: /data/tvshows
      - /media/datadrive/media/movies: /data/movies
    ports:
      - 8096:8096
      - 8920:8920 #optional
      - 7359:7359/udp #optional
      - 1900:1900/udp #optional
    devices:
      - /dev/dri: /dev/dir
    restart: unless-stopped


Whenever trying to play HEVC format for chrome browser on my PC, getting this error: Playback Error
This client isn't compatible with the media and the server isn't sending a compatible media format.

Also tried both Intel quick sync and video acceleration API but nothing works
I have checked off the HEVC decoding but still wont work.

Any suggestion would be help full, thanks



RE: hardware acceleration on jelly fin - Prince3739 - 2024-01-22

@mikesulsenti thank you for suggestion, refer below, i run the commands and below is the result, what does this mean ?



sysadmin@LinuxMint:~$ sudo docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo
Trying display: drm
error: failed to initialize display
sysadmin@LinuxMint:~$ sudo docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va~
ffmpeg version 5.1.4-Jellyfin Copyright © 2000-2023 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
[AVHWDeviceContext @ 0x560b122254c0] Cannot open DRM render node for device 0.
[AVHWDeviceContext @ 0x560b122254c0] Cannot open DRM render node for device 1.
[AVHWDeviceContext @ 0x560b122254c0] Cannot open DRM render node for device 2.
[AVHWDeviceContext @ 0x560b122254c0] Cannot open DRM render node for device 3.
[AVHWDeviceContext @ 0x560b122254c0] Cannot open DRM render node for device 4.
[AVHWDeviceContext @ 0x560b122254c0] Cannot open DRM render node for device 5.
[AVHWDeviceContext @ 0x560b122254c0] Cannot open DRM render node for device 6.
[AVHWDeviceContext @ 0x560b122254c0] Cannot open DRM render node for device 7.
[AVHWDeviceContext @ 0x560b122254c0] No VA display found for any default device.
Device creation failed: -22.
Failed to set value 'vaapi=va' for option 'init_hw_device': Invalid argument
Error parsing global options: Invalid argument
sysadmin@LinuxMint:~$


RE: hardware acceleration on jelly fin - tmsrxzar - 2024-01-22

i see you have worked out how to quote posts on the forum; any chance you plan on following up to the responses you've received?

nvm



you have a typo

devices:
- /dev/dri: /dev/dir

should be /dev/dri on the second one, not dir


RE: hardware acceleration on jelly fin - Prince3739 - 2024-01-22

(2024-01-22, 11:41 AM)mikesulsenti Wrote: You should be using QSV instead of VA-API when using Intel graphics

See if your docker container can actually utilize it:
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo
and
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va

(2024-01-22, 11:41 AM)mikesulsenti Wrote: You should be using QSV instead of VA-API when using Intel graphics

See if your docker container can actually utilize it:
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo
and
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va

@TheDreadPirate thanks for sharing the wiki my cpu falls under broadwell family and HEVC is NO on the table what dos that mean ?


RE: hardware acceleration on jelly fin - tmsrxzar - 2024-01-22

"thanks for sharing the wiki my cpu falls under broadwell family and HEVC is NO on the table what dos that mean ? "

unselect everything under hardware decoding, only select things that your gpu supports, the wiki link does not show capabilities for broadwell so you will have to source your own information

unselect hevc encoding, broadwell is unlikely to be capable but when you find your gpu specs you can verify

lastly fix the typo, nothing is going to work when you passed it as /dev/dir; it needs to be /dev/dri



here i found your specs

https://www.cpu-monkey.com/en/igpu-intel_hd_graphics_6000

under the table hardware codec support, your gpu only supports h264 encoding
supports h264, vp8, vc-1 and jpeg decoding


RE: hardware acceleration on jelly fin - Efficient_Good_5784 - 2024-01-22

(2024-01-22, 10:28 AM)Prince3739 Wrote:     devices:
      - /dev/dri: /dev/dir
Is the "/dev/dir" at the end a typo?

(2024-01-22, 04:53 PM)Prince3739 Wrote: my cpu falls under broadwell family and HEVC is NO on the table what dos that mean ?
This means that the iGPU doesn't support HEVC.

I looked at the codec support table for your iGPU (with Quick Sync, hopefully these also apply for VAAPI).

Enable these:
  1. H.264
  2. MPEG-2
  3. VC1
  4. VP8
  5. VP9 (depends on linux, disable this too if unsure)

Disable these (don't work with your iGPU):
  1. HEVC
  2. AV1
  3. HEVC 10-bit
  4. VP9 10-bit

The ones that you will have disabled will fall back onto the CPU.
That is, when you attempt to stream a HEVC video on a client that wont support it, your Jellyfin server will use the CPU instead of the iGPU to transcode it.