Unmanic / unmanic

Unmanic - Library Optimiser
GNU General Public License v3.0
1.66k stars 82 forks source link

Hardware decoding error #435

Open Deedasmi opened 1 year ago

Deedasmi commented 1 year ago

Have you read the Code of Conduct? By filing an Issue, you are expected to comply with it, including treating everyone with respect:

Remember that these are some guidelines, use your best judgement.

Description

I have a 7900 XTX added into docker (image Version: 0.2.4~7339f8b). I found related issue here that indicates I need a newer version of LLVM, and thus a newer version of ffmpeg. Your dockerfile has the versions hardcoded and getting dependencies fixed is a little outside my league here.

The error message shown in the web ui is

amdgpu: unknown (family_id, chip_external_rev): (145, 1)

[AVHWDeviceContext @ 0x5628b8b76cc0] libva: /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so init failed

[AVHWDeviceContext @ 0x5628b8b76cc0] Failed to initialise VAAPI connection: 2 (resource allocation failed).

Device creation failed: -5.

Failed to set value 'vaapi=vaapi0:/dev/dri/renderD128' for option 'init_hw_device': Input/output error

Error parsing global options: Input/output error

When I open a shell into the image and run vainfo I see

amdgpu: unknown (family_id, chip_external_rev): (145, 1)

[AVHWDeviceContext @ 0x5628b8b76cc0] libva: /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so init failed

[AVHWDeviceContext @ 0x5628b8b76cc0] Failed to initialise VAAPI connection: 2 (resource allocation failed).

Device creation failed: -5.

Failed to set value 'vaapi=vaapi0:/dev/dri/renderD128' for option 'init_hw_device': Input/output error

Error parsing global options: Input/output error

Steps to Reproduce

  1. Have a new gen AMD card
  2. Try to use hardware decoding

Expected behavior: It to work

Actual behaviour: unknown chipset errors

Reproduces how often: 100%

Versions

The version can be found at the footer of the WebUI. Also, please include the OS details and what version you are running (e.g. cat /etc/os-release).

Version: 0.2.4~7339f8b)

Installation Method Used

Docker

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Hardware transcoding works fine in tdarr.

root@fd59758c5448:/# ffmpeg
ffmpeg version 4.4.1-Jellyfin Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --arch=amd64 --enable-opencl --enable-vaapi --enable-amf --enable-libmfx --enable-vdpau --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
PutzJimmy commented 11 months ago

Any news on this? I'm in the same boat with my new mini server with a Ryzen 9 7940HS with integrated Radeon 780M, hardware acceleration works in just fine in Emby 4.8.0.61 for whatever version of ffmpeg they use

PutzJimmy commented 11 months ago

This solved it for me =)

yajrendrag — Today at 1:01 AM so Josh posted a new staging image you can try - based on ubuntu 22.04 with jellyfin-ffmpeg6 installed. It should have the latest mesa drivers for vaapi, so hoping this is going to solve the issue... You can remove the startup.sh file and change the docker image to use the staging tag instead of latest. Stop the container, remove it, keep appdata and then restart and lets see where you're at after that

Josh5 commented 11 months ago

This solved it for me =)

yajrendrag — Today at 1:01 AM so Josh posted a new staging image you can try - based on ubuntu 22.04 with jellyfin-ffmpeg6 installed. It should have the latest mesa drivers for vaapi, so hoping this is going to solve the issue... You can remove the startup.sh file and change the docker image to use the staging tag instead of latest. Stop the container, remove it, keep appdata and then restart and lets see where you're at after that

Thanks for reporting that.