Closed parkerlreed closed 5 years ago
libamfrt64.so is part of driver and installed optionally, similar to Vulkan runtime. Ffmpeg wrapper component should be built as part of sample build. Check public/samples/makefile
Well it's failing because I don't have that library. How can I get that library without installing amdgpu-pro?
public/samples/Makefile is what I ran.
Ok after grabbing https://www2.ati.com/drivers/linux/ubuntu/18.04/amdgpu-pro-18.30-641594.tar.xz
And then extracting the amf deb, and then extracting the libs manually and placing them in /usr/lib/
the examples do run.
[parker@e55 dbg_64]$ ./CapabilityManager
AMF version (header): 90000
AMF version (runtime): 90000
CreateDeviceAndQueues() vkCreateDevice() failed, Error=0-7 Error:AMF_FAIL
CreateDeviceAndFindQueues() failed Error:AMF_FAIL
libamf seems to only be available in the Pro stack. Does it need the Pro stack to actually be active to work?
I realized I wasn't using LunarG https://vulkan.lunarg.com/sdk/home
But even after cleaning everything and recompiling with that as the SDK path, still get the same Vulkan device creation failure. Vulkan elsewhere runs fine (as evident by the vulkaninfo and also vkcube)
You need Pro stack including Vulkan driver. Open source Vulkan driver will not work.
Well crap. I'm on Arch and the Pro stack is a pain to setup. Thanks for the info.
Are there any plans for amdgpu support?
At this point AMF uses private extensions in Vulkan runtime, that are available in Pro stack only. There is a work by Khronos consortium to standardize encoder and decoder extensions for Vulkan. Once it is done and implemented in Vulkan runtime, AMF will support them and parts of AMF will be open-sourced in amdgpu similar to Vulkan. I don't have timeline for all this.
I tried this on Gentoo, I have latest (from git) llvm/clang/mesa on 4.19-rc4 kernel, I created an /tmp/include/AMF
link to AMF/amf/public/include
, compiled ffmpeg (from git) and installed to /tmp
which built statically. I pointed a local vulkan.icd.json
which pointed to the amdvlk64.so
from amdgpu-pro
version of the library and also created local links to libamfrt64.so
to the ``amdgpu-pro``` version.
{
"file_format_version" : "1.0.0",
"ICD" : {
"library_path" : "./amdvlk64.so",
"api_version" : "1.1.70"
}
}
My command line looks like:
VK_ICD_FILENAMES=./vulkan.icd.json LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH /tmp/bin/ffmpeg -i <input vid> -c:v h264_amf -quality quality test.mp4 -loglevel verbose
I get the following error
...other stuff snipped...
[h264 @ 0x5593bd2caf40] Reinit context to 480x368, pix_fmt: yuv420p
[graph 0 input from stream 0:0 @ 0x5593bd4ce480] w:466 h:360 pixfmt:yuv420p tb:1/30 fr:30/1 sar:1/1 sws_param:flags=2
[h264_amf @ 0x5593bd230640] AMF initialisation failed via D3D9: error 10.
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
[AVIOContext @ 0x5593bd230ec0] Statistics: 0 seeks, 0 writeouts
[AVIOContext @ 0x5593bd20b7c0] Statistics: 191496 bytes read, 0 seeks
Conversion failed!
You are trying to run ffmpeg with AMF on Linux. This integration is not done yet. You can run AMF samples instead. But remember, you need AMD PRO driver from amd.com.
Neither work. Like I posted above, I have all the amdgpu-pro bits in place.
More info please, logs...
What logs?
You stated that samples don't work for you. I need to know the point of failure. AMF can output a lot of log/trace into into stdout, file etc. See TraceAdapter.h for configuration details.
I also tried using openmax for video encoding but ran into multiple problems as well, is openmax still supported or totally outdated and being replaced by amf now? https://www.phoronix.com/scan.php?page=news_item&px=MTYwMzA
AMF is supported on closed source (Pro) driver and OpenMax on open source (Mesa) driver.
Closed as stale issue
vulkaninfo http://ix.io/1m68
In
amf/public/samples
I ranVK_SDK_PATH=/usr/include/vulkan make -j10
Only issue I ran into was
glslangValidator
was expected in VK_SDK_PATH but is in my/usr/bin
I updated the three references in the various
Makefile
s to point to the correct location and it built successfully.Changed to the
amf/bin/dbg_64
folder and any of the binaries I try give meLooking at strace I get
Which doesn't exist
Also doesn't exist anywhere in the source tree
Build output http://ix.io/1m6d
EDIT: The def file only mentions
mesa
but the libamfrt64 file seems to be exclusive toamdgpu-pro
. Is the open source stack still not supported?https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/4#issuecomment-415199921