For the amf encoders to work properly, it is required to have both media-video/amdgpu-pro-amf and media-libs/amdgpu-pro-vulkan installed. These dependencies are not pulled when using the amf use flag currently. Without these packages, FFmpeg will throw an error when using either of the amf encoders.
please add the logs
(In reply to Jonas Stein from comment #1) > please add the logs Logs without media-video/amdgpu-pro-amf and media-libs/amdgpu-pro-vulkan: [h264_amf @ 0x55c1722769c0] DLL libamfrt64.so.1 failed to open Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed! With media-video/amdgpu-pro-amf but no media-libs/amdgpu-pro-vulkan, it resolves the first issue, but I get an error message about no valid Vulkan device being found since amf also requires the proprietary amdgpu-pro vulkan driver. I am using the free drivers besides that. Thanks for looking into this issue, I hope it can be resolved!
You are absolutely right, these runtime dependencies are needed. And ffmpeg needs to be run with a specific environment variable VK_ICD_FILENAME that points to the proprietary amdgpu vulkan driver. I will ask Gentoo devs how I can figure out the last problem, and how I can restrict the use flag to only amdgpu users. As this is entirely unusable by Nvidia users.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c480f3e6a065304cd0f27474f15488dac6c0925 commit 7c480f3e6a065304cd0f27474f15488dac6c0925 Author: Adel KARA SLIMANE <adel.ks@zegrapher.com> AuthorDate: 2022-03-26 10:58:25 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2022-03-26 14:15:04 +0000 media-video/ffmpeg: amf: add media-video/amdgpu-pro-amf as rdep And change VK_ICD_FILENAMES env var so amf can be used more easily Closes: https://bugs.gentoo.org/834974 Signed-off-by: Adel KARA SLIMANE <adel.ks@zegrapher.com> Signed-off-by: Joonas Niilola <juippis@gentoo.org> .../ffmpeg/{ffmpeg-4.4.1-r3.ebuild => ffmpeg-4.4.1-r4.ebuild} | 9 ++++++--- media-video/ffmpeg/ffmpeg-9999.ebuild | 9 ++++++--- media-video/ffmpeg/files/amf-env-vulkan-override | 1 + 3 files changed, 13 insertions(+), 6 deletions(-)