-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Added linux support for amf encoder through vulkan. #2151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The changes to libhb look innocent enough. I can't test since I don't have the necessary hardware. Have you submitted the ffmpeg patch to ffmpeg yet? I don't see it on their mailing list. It would be nice to have that reviewed and accepted by them before committing to HandBrake. |
Not yet, but I will. |
Been there, done that 😜 |
|
Ditto on hardware :/ |
|
@OvchinnikovDmitrii Will you please re-post the ffmpeg-devel thread here so we can more easily follow it? Thanks. |
|
Hi! i reuploaded a new version of a patch (with docs and some refactoring) (https://patchwork.ffmpeg.org/patch/14319/). |
|
Hi! FFmpeg accepted the patch (FFmpeg/FFmpeg@f8ad2dd) |
|
Awesome. I requested a review on #ffmpeg-devel IRC yesterday and Philip came through. @jstebbins Are you good with this going in HandBrake? |
|
Yep, fine by me 👍 |
818f84b to
67bf399
Compare
|
Merged. Thanks @OvchinnikovDmitrii! |
|
@OvchinnikovDmitrii We have a user reporting that it's not currently working on a Radeon VII with amdgpu pro driver.
-7 appears to be VK_ERROR_DEVICE_LOST which doesn't really tell us much. |
|
@sr55
|
|
Let me confirm. He did say that the ffmpeg build works fine so it would suggest the vce_common.c init is the failure point "VCE: AMF failed to initialise on the given Vulkan device." |
|
s55: amf version is 19.30_855429-1, output of vulkaninfo: https://pastebin.com/J0udhGX8 That's the report back |
Looks like the driver version is up to date and vulkan works fine. We tried to reproduce this on Radeon VII and the same driver version, but the encoding was successful. I sent the information to the amf development team. I'll wait for their answer and come back. |
|
@sr55 Could you also provide this?
|
|
I've asked the user to join us here for feedback. |
|
User reports the following with invocation of HandBrake latest on Arch Linux: |
|
User reported hardware: https://pastebin.com/WZVBhcz9 And software: https://pastebin.com/Z7g7gwyV |
There are 2 versions of vulkan driver in the software list:
It is possible that the wrong driver is loading and causing an error. |
|
I was the one with the VII. Seems like the drivers was the problem all along. I did uninstall the open source Vulkan drivers and encoding in h.264 doesn't spit out any errors and the output seems fine. |
|
I was thinking of testing VCE. Do the CLI option visible in help output when VCE support is enabled? It is not mentioned anywhere in Handbrake documentation. |
|
VCE on Linux is experimental. You can enable it when building from source by passing |
|
@bradleysepos I was trying to figure out if there is an option to enable it when running |
|
It depends what you mean by enable. VCE support must be enabled at configure time, then when using HandBrakeCLI you must select the encoder you want to use with |
|
@bradleysepos yes, but I enabled it yet I see nothing in the I built it with and I see: But nothing in the encoder section of the binary which is built! I mean nothing related to VCE is in encoder section? |
|
Hmm, I believe it should be listed there if everything's functional. Can you do a quick encode with any settings you want, and provide the output here? Would help to see what the CLI is seeing. |
|
If it's not listed, it means the drivers are not setup correctly. |
|
@sr55 you are right, I seem to be missing some libraries that handbrake is looking at startup. It could come handy if there was a way to report what was missing to user. Anyway, I ran out of time now, but I will try this later perhaps next year again. Thanks for the help! |
|
It's enough of a pain on Linux that it's not practical I'm afraid. It's not even as simple as having the correct driver. You also need to make sure the open source one isn't loading It also gets quite messy between distros. |
|
@sr55 It was just a suggestion as it was not very straightforward to figure out why I did not see the hardware encoding option. If it is not possible then it is not possible.... I thought handbrake already had some checks as you guys put it adequately it only shows the encoder if the driver is installed properly. I also ran it with Anyway, thanks for the help. I will return back to trying this if and when I install the amdgpu-pro driver. |
Description of Change:
Added linux support for amf encoder through vulkan.
To use h.264(AMD VCE) encoder on linux amdgru-pro version 19.20+ and amf-amdgpu-pro package(amdgru-pro contains, but does not install automatically) are required.(https://www.amd.com/ru/support/)
initialization of amf encoder occurs in this order:
Only vulkan initialization available on linux.
Test on: