Jellyfin Forum
SOLVED: Playback Fails with VAAPI Hardware Acceleration in Docker Setup (AMD iGPU Passthrough - 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: SOLVED: Playback Fails with VAAPI Hardware Acceleration in Docker Setup (AMD iGPU Passthrough (/t-solved-playback-fails-with-vaapi-hardware-acceleration-in-docker-setup-amd-igpu-passthrough)



Playback Fails with VAAPI Hardware Acceleration in Docker Setup (AMD iGPU Passthrough - alex-fl - 2025-01-13

Hello everyone,

I recently set up Jellyfin in a Docker container and configured hardware acceleration using an AMD iGPU through a VM passthrough. I followed the official Jellyfin documentation for AMD hardware acceleration: Hardware Acceleration Guide.

However, when enabling VAAPI hardware acceleration in the Jellyfin settings, playback fails with the following error message: 
"Playback has failed due to a critical player error."

Logs:
- Jellyfin Log: https://pastebin.com/vHXuy9WF
- FFMPEG Log: https://pastebin.com/hLvu0Mkr

Docker Configuration:
Here’s my docker-compose.yml for the Jellyfin container:

Code:
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    network_mode: host
    mem_limit: 10240M
    mem_reservation: 512M
    cpus: 0.5
    user: 0:0
    group_add:
      - "105"
    volumes:
      - /data/jellyfin/config:/config
      - /data/jellyfin/cache:/cache
      - type: bind
        source: /data/downloads/media
        target: /media
    restart: unless-stopped
    environment:
      - JELLYFIN_PublishedServerUrl=https://[hidden].com/
    extra_hosts:
      - host.docker.internal:host-gateway
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
networks: {}


I have ensured that the render group is configured correctly:
Code:
getent group render | cut -d: -f3
105

The vainfo output looks as follows:
Code:
docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
libva info: VA-API version 1.22.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_22
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Mesa Gallium driver 24.0.9 for AMD Radeon Graphics (radeonsi, renoir, LLVM 16.0.6, DRM 3.49, 6.1.0-28-amd64)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointVLD
      VAProfileH264Main              : VAEntrypointEncSlice
      VAProfileH264High              : VAEntrypointVLD
      VAProfileH264High              : VAEntrypointEncSlice
      VAProfileHEVCMain              : VAEntrypointVLD
      VAProfileHEVCMain              : VAEntrypointEncSlice
      VAProfileHEVCMain10            : VAEntrypointVLD
      VAProfileHEVCMain10            : VAEntrypointEncSlice
      VAProfileJPEGBaseline          : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                  : VAEntrypointVideoProc

Potential Issue: 
The warning in the vainfo output appears problematic:
Code:
amdgpu: os_same_file_description couldn't determine if two DRM fds reference the same file description.
If they do, bad things may happen!

I suspect this may be causing the transcoding failure, but I'm unsure how to resolve it.

Questions:
1. Has anyone encountered a similar issue with VAAPI and AMD GPUs in Docker?
2. Are there specific configurations or troubleshooting steps I might be missing?
3. Is this warning about os_same_file_description critical, and how can it be resolved?

Thank you for your help!


RE: Playback Fails with VAAPI Hardware Acceleration in Docker Setup (AMD iGPU Passthrough - Fate - 2025-01-13

Go to To Jellyfin Settings: Admin->Dashboard-> Playback-> Transcoding and uncheck "Allow encoding in AV1"

Please also state your CPU/GPU Model


RE: Playback Fails with VAAPI Hardware Acceleration in Docker Setup (AMD iGPU Passthrough - TheDreadPirate - 2025-01-13

(2025-01-13, 01:01 PM)Fate Wrote: Go to To Jellyfin Settings: Admin->Dashboard-> Playback-> Transcoding and uncheck "Allow encoding in AV1"

Please also state your CPU/GPU Model

Code:
vainfo: Driver version: Mesa Gallium driver 24.0.9 for AMD Radeon Graphics (radeonsi, renoir, LLVM 16.0.6, DRM 3.49, 6.1.0-28-amd64)

I'm assuming "renoir" means they have a 4000 series Ryzen CPU.  Which has AMD VCN 2.  Codec support is listed here.

https://github.com/GPUOpen-LibrariesAndSDKs/AMF/wiki/GPU%20and%20APU%20HW%20Features%20and%20Support#codecs

TLDR; most codecs except AV1, as you stated.


RE: Playback Fails with VAAPI Hardware Acceleration in Docker Setup (AMD iGPU Passthrough - alex-fl - 2025-01-14

Oh thanks for answer...i will try
My CPU is Ryzen 7 5825U