Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 834974 - media-video/ffmpeg ebuild does not include all required dependencies for the AMF use flag
Summary: media-video/ffmpeg ebuild does not include all required dependencies for the ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-03-11 23:51 UTC by applesrcol8796@gmail.com
Modified: 2022-03-26 14:20 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description applesrcol8796@gmail.com 2022-03-11 23:51:13 UTC
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.
Comment 1 Jonas Stein gentoo-dev 2022-03-12 23:39:16 UTC
please add the logs
Comment 2 applesrcol8796@gmail.com 2022-03-18 16:20:29 UTC
(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!
Comment 3 Adel KARA SLIMANE 2022-03-18 17:21:33 UTC
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.
Comment 4 Larry the Git Cow gentoo-dev 2022-03-26 14:20:53 UTC
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(-)