I try to follow the docs but somehow it doesn’t work as expected. How does your compose file look and what to choose in the settings?

My current setup: (Not working)

services:
  # original source: https://jellyfin.org/docs/general/installation/container/
  jellyfin:
    image: docker.io/jellyfin/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
      - JELLYFIN_PublishedServerUrl=https://my.url
    volumes:
      - ./config:/config:Z
      - ./cache:/cache:Z
      - ./media:/media:rw
    ports:
      - 8096:8096
# no need for https since reverse proxy and no local discovery
    restart: always
    device:
      - /dev/dri/:/dev/dri/:Z
      - /dev/dri/renderD128:/dev/dri/renderD128:Z
    group-add:
      - 105
    privileged: true

I do not want a privileged container but I’m experimenting.

  • VAAPI is selected
  • VA-API device: is set to /dev/dri/renderD128
  • enable hardware decoding for : H264, HEVC, HEVC 10bit and VP9 10 bit
  • enable hardware encoding
  • allow encoding in HEVC

to get the group I ran getent group render | cut -d: -f3 on the host which returned 105.

$ podman exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo
Trying display: drm
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.21 (libva 2.21.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.2.1 (0593864)
vainfo: Supported profile and entrypoints

This command returns VA-API does that mean I can only (or I should) select this method? Or is QSV also possible? What’s better?

podman exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va
ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --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-opencl --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-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
[AVHWDeviceContext @ 0x55ef07507480] Trying to use DRM render node for device 0.
[AVHWDeviceContext @ 0x55ef07507480] libva: VA-API version 1.21.0
[AVHWDeviceContext @ 0x55ef07507480] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x55ef07507480] libva: Found init function __vaDriverInit_1_21
[AVHWDeviceContext @ 0x55ef07507480] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x55ef07507480] Initialised VAAPI connection: version 1.21
[AVHWDeviceContext @ 0x55ef07507480] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.2.1 (0593864).
[AVHWDeviceContext @ 0x55ef07507480] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x55ef07538b40] Failed to get number of OpenCL platforms: -1001.
Device creation failed: -19.
Failed to set value 'opencl@va' for option 'init_hw_device': No such device
Error parsing global options: No such device

within the container:

# ls -l /dev/dri
total 0
crw-rw----+ 1 nobody nogroup 226,   1 May 17 13:22 card1
crw-rw-rw-. 1 nobody nogroup 226, 128 May 17 13:22 renderD128
# whoami
root
# 
$ getsebool container_use_dri_devices
container_use_dri_devices --> on
$ sudo lshw -c video | grep driver
       configuration: driver=i915 latency=0
  • oakcroissant@feddit.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    I think VAAPI is still how the gpu is accessed but you can use the intel libva driver (vaapi) or the intel media driver (QSV) (arch wiki page). If I’m interpreting this all correctly.