Closed jorritsmit closed 2 years ago
Indeed, this would be great!
No one within the team has AMD gpu's to test against but you're more than welcome to add them yourselves and see if it works: https://blog.linuxserver.io/2019/09/14/customizing-our-containers/
I'm starting to take a shot at getting hwaccl working with the integrated GPU in my 3400G, if I'm successfull I will come back with a PR, which I think would be interesting as it's the most popular choice (and currently most capable) for AMD SFF builds without dGPU.
Some notes:
amdgpu-pro
consist of a non-free closed-source binary blob userland libraries in - would you be open to include this in the image? (I would personally be reluctant)amdgpu-pro
is not officially available for e.g the 3400G. Even so, there are reports of users getting it working. I'm personally not exploring this alternative since I'm not interested in installing these non-free binary drivers (If I would, I would probably use PLEX in the first place). amdgpu
drivers should be enough for hardware accelerated decodinglinuxserver/jellyfin
image:
amdgpupro
drivers not being present; ffmpeg exits with DLL libamfrt64.so.1 failed to open
To get VAAPI using hardware acceleration, there are some missing pieces:
mesa-vdpau-drivers
, mesa-va-drivers
, mesa-vdpau-drivers
, potentially also libdrm-radeon1
from ppa:oibaf/graphics-drivers
jellyfin-ffmpeg
in the repo with the --enable-vdpau
flagHow did you test vaapi? I did a quick test with an rx460, vaapi and our jellyfin image, and it does hw encode ootb (same with intel, where both do hw encode but sw decode with h264)
you need mesa 20.1
@aptalca Playing an mkv file, noticing CPU usage topping out and then running the logged ffmpeg
command inside the Docker container. Maybe I'm missing something and the situation is the same here - I don't suppose you have an easy way I could use to verify it other than just looking at resource usage? I'm not super familiar with ffmpeg tbh. Shouldn't h264 decode work as well?
I also have an i915 that I can easily cross-test with if need be.
@jorritsmit You mean mesa >= 20.1, right? The PPA I mentioned above currently provides 20.2.
@Legogris you can check the transcode logs in the jellyfin server gui. It tells you what methods it's using. I don't use jellyfin on an intel device, so I only tested it temporarily. It did hw encode, but not hw decode with vaapi. I observed the same behavior with amd rx460 and vaapi. Not sure why there was no hw decode (I believe for h264, ffmpeg does sw decode by default).
@aptalca It's not that surprising actually, if I read https://stackoverflow.com/questions/23289157/how-to-use-hardware-acceleration-with-ffmpeg and https://trac.ffmpeg.org/wiki/HWAccelIntro correctly (granted could be out of date) then vdpau should be enabled to get proper transcoding.
vdpau was disabled in jellyfin-ffmpeg since https://github.com/jellyfin/jellyfin-ffmpeg/pull/33/files
Isn't vdpau Nvidia's offering (that also worked on amd)?
Vaapi should be able to decode on both intel and amd: https://wiki.videolan.org/VLC_GPU_Decoding/#:~:text=On%20Linux%2FX11%2C%20there%20are,AMD%2FATI%20and%20NVIDIA%20cards.
@Legogris indeed >= 20.1 sorry didn't notice that
@aptalca I grant I may be confused wrt this. If you don't mind, what exactly am I looking for in the ffmpeg logs to determine if hw is used in and for what?
@Legogris Line 88 shows the decode is hevc
, which is sw. Line 90 is showing encode is h264_vaapi
@Legogris Line 88 shows the decode is
hevc
, which is sw. Line 90 is showing encode ish264_vaapi
For VAAPI, there is no specific hardware decoder name.
ffmpeg -decoders | grep vaapi
Even if the decoding is successful, only the corresponding format name will be displayed.
@Legogris Line 88 shows the decode is
hevc
, which is sw. Line 90 is showing encode ish264_vaapi
For VAAPI, there is no specific hardware decoder name.
ffmpeg -decoders | grep vaapi
Even if the decoding is successful, only the corresponding format name will be displayed.
So apart from eyeballing resource usage, is there an easy way to tell if transcoding is fully hardware-accelerated by looking at e.g. ffmpeg logs?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
As far as I can tell the devs have no plans to fix the bug with VAAPI and HEVC and hardware transcoding.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
There is a AMD mod for our jellyfin container - I assume this will cover what's needed for this to work: https://github.com/linuxserver/docker-mods/tree/jellyfin-amd
Please open a new issue if this is not the case.
Feature request: would it be possible to include amdgpu-pro drivers in the docker image so we can use amf transcoding in jellyfin?