root@plex:/# vainfo
vainfo: Relink /vaapi-amdgpu/lib/libbsd.so.0' with /lib/x86_64-linux-gnu/libc.so.6’ for IFUNC symbol `memmove’
Segmentation fault (core dumped)
@war_lock Once you have launched the container shell, you can execute the command below before installing the packages.
unset LD_LIBRARY_PATH
This will restore use of the default librairies for the duration of your shell’ session.
EDIT
Another (probably most effective) way to identify the differences between @hexeth image and the mod would be to use ldd. You could execute this command on each container and report the results here.
Thank you, @hexeth I was spending like 10 hours in front of my computer trying to figure it out and bump! This work perfect. Usually I dont reply any post but you deserved. Have a nice day.,
Could you explain a little more how can this work because I do not much familiar with docker and stuffs. Thank for your contribution. How should add this to my current image docker plex?
When the container starts, it downloads the mod which contains the librairies. To enable the mod you need to specify the DOCKER_MODS environment variable. In addition, you need to specify LIBVA_DRIVERS_PATH and LD_LIBRARY_PATH environment variables, so the mod’s librairies get actually loaded at runtime.
just to clarify, hexeth image does not work for me, hw acceleration works but it creates color flashes which are presumably from faulty drivers, the container that does work 100% is the current one from mauimauer which is alpine based
Your image though, does not even work with any hw acceleration at all for me.
its strange though that this seems to work fine for other users using desktop CPUs (I am using a mobile CPU)
this is the vainfo output from the container after unset of the path and then installing all packages:
root@plex:/# vainfo
error: XDG_RUNTIME_DIR not set in the environment.
error: can’t connect to X server!
libva info: VA-API version 1.14.0
libva info: Trying to open /vaapi-amdgpu/lib/dri/radeonsi_drv_video.so
libva error: dlopen of /vaapi-amdgpu/lib/dri/radeonsi_drv_video.so failed: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
@jeffle81 To add on to what @war_lock said, using hexeth’s image HW transcoding works 80% of the time but I don’t have any encoding issues when it runs. Whereas, mauimauer’s image works perfectly for me, but I switched because it was not being updated regularly.
I just published a newer release which automatically defines LD_LIBRARY_PATH specifically scoped at Plex. So, it won’t apply to other binaries in the container.
You now need to remove -e LD_LIBRARY_PATH=... from your docker run command.
@war_lock and @InvisiGo thanks for the clarification. I will have a look at @mauimauer image when I will have some time.
What are your Linux kernel versions? Mine is 5.10.146
I am asking because there has been a lot of changes on the AMDGPU kernel internal module lately. Maybe you are running an older kernel version which is not compatible with current radeonsi_drv_video.so driver.
I get 5.15.0-53-generic and it seems that hw transcoding now sometimes does work while sometimes it doesnt which is better than before, also works without color flashing.
mauimauers image is based on Alpine which is why its so different, I would just use his image if it were maintained at all
Splitting the commandline.
Reading option '-hide_banner' ... matched as option 'hide_banner' (do not show program banner) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-vaapi_device' ... matched as option 'vaapi_device' (set VAAPI hardware device (DRM path or X11 display name)) with argument '/dev/dri/renderD128'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option hide_banner (do not show program banner) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Applying option vaapi_device (set VAAPI hardware device (DRM path or X11 display name)) with argument /dev/dri/renderD128.
[AVHWDeviceContext @ 0x7f97d681a0c0] libva: VA-API version 1.16.0
[AVHWDeviceContext @ 0x7f97d681a0c0] libva: Trying to open /vaapi-amdgpu/lib/dri/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x7f97d681a0c0] libva: Found init function __vaDriverInit_1_16
/usr/share/libdrm/amdgpu.ids: No such file or directory
[AVHWDeviceContext @ 0x7f97d681a0c0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x7f97d681a0c0] Initialised VAAPI connection: version 1.16
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x7f97d681a0c0] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x7f97d681a0c0] VAAPI driver: Mesa Gallium driver 22.2.4 for AMD Radeon Graphics (renoir, LLVM 15.0.5, DRM 3.42, 5.15.0-53-generic).
[AVHWDeviceContext @ 0x7f97d681a0c0] Driver not found in known nonstandard list, using standard behaviour.
Successfully parsed a group of options.
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
Use -h to get full help or, even better, run 'man ffmpeg'
I would like to help further but I don’t know where to look at!
On my side, I observed that hw decoding doest not always apply. Sometimes it doesn’t enable at all for some specific files, while it will enable only at some specific resolutions for some other files. I have not been able yet to understand on what basis this happens. No error in Plex logs… Let me know if you happen to identify a pattern in which case it works or not.
By the way, the librairies of the mod are taken out of current Alpine edge version, so that shouldn’t be the issue.
It looks like LD_LIBRARY_PATH is not set. If you use the previous mod version you need to set an environment variable in docker run command. This was done with the following arguments