Jump to content

default ffmpeg bundled in linuxserver/emby:latest does not properly support VAAPI decoding of HEVC 10-bit


Recommended Posts

blakeusblade
Posted

I should prefix this with my goal of wanting to shift my emby server off a dedicated Windows machine into docker. I've been switching out SSDs one containing my original Windows installation and Emby installation with a SSD containing Linux and a docker container running emby/embyserver:latest (both Emby Windows and docker image is of writing this is v4.8.11.0). I should also say that its only happening with one of my TV series while nearly all other TV series encoding with H265 10bit (HVEC) work fine with the hardware acceleration in the docker container.

My hardware is 

Intel i5-10500T (supports HEVC Main10 decoding)
Host and container confirm support via vainfo
/dev/dri devices are passed correctly


After an exhaustive amount of troubleshooting with chatGPT it concluded that the Emby container does not fully support VAAPI HEVC 10-bit HW decoding with iHD driver despite system capability.

The inbuilt ffmpeg version supplied with emby/docker container 4.8.11.0 isn't compatabile or is missing certain libraries and reverts to terrible software transcoding ending up with pixelated image. (See attached screenshot) 

image.thumb.png.e2fc4a1efd05aaa266aea2a6c17ced1d.png

 

Whereas the Windows counterpart works fine playing the same file. (See screenshot below) 

image.thumb.png.3ef47d023c0b0805a3110952318aa8e2.png


ChatGPT told me to install and run vainfo on the host and within the container to prove that its all supported. Both the host and container return the below.
 

libva info: VA-API version 1.20.0
ibva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
ibva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0 vainfo:VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD



ChatGPT told me to run 

/app/emby/bin/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i test.mkv -f null -


and/or
 

/app/emby/bin/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/card0 -i your_hevc10bit.mkv -f null -


and failed for both with
 

ffmpeg: error while loading shared libraries: libavdevice.so.59: cannot open shared object file: No such file or directory

After fixing this issue by installing a full copy of ffmpeg using the below
 

apt update
apt install -y software-properties-common
add-apt-repository ppa:savoury1/ffmpeg5
apt update
apt install -y ffmpeg

and rerun

/usr/bin/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i test.mkv -f null -


and/or 

/usr/bin/ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/card0 -i your_hevc10bit.mkv -f null -


both worked.

ChatGPT suggested symlinking to see if it fixed the issue however all content became unplayable with the error below so I removed the symlink and put it back the original file.
 

"No compatible streams are currently available. Please try again later or contact your system administrator for details."
mv /app/emby/bin/ffmpeg /app/emby/bin/ffmpeg.backup
/app/emby/bin/ffmpeg => /usr/bin/ffmpeg

Attached are my clean log files from the the docker container.

hardware_detection-63884159906.txtembyserver.txtffmpeg-remux-94fc0f56-edc1-4720-be0d-b5273907fcbf_1.txtffmpeg-transcode-7324b96d-838c-4d71-abc2-def9280d22ea_1.txtembyserver-63884160000.txt

 

  • Thanks 1
  • 3 weeks later...
Posted

Hi @blakeusbladewe're going to have an updated ffmpeg build on the server beta channel in the near future, just FYI.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...