

The error InitVulkan returns is 1 meaning AMF_FAIL while the documentation states the only expected errors are AMF_NOT_SUPPORTED and AMF_ALREADY_INITIALIZED that might just be a clerical error to not include. "./ffmpeg -i videoplayback.flv -c:v h264_amf accel.mkv") will report "AMF failed to initialise on the given Vulkan device: 1." From looking through the source the call that is failing is to InitVulkan it appears to be passed Null by ffmpeg based on the documentation this should retrieve the default vulkan device. In that scenario a simple command that worked earlier (i.e. This effectively disables my vega gpu during boot and the rx 480 is the only accessible card. The problem arises when I use VFIO to do pci pass-through for the vega 56 card to a vm. I have noticed when the vega 56 card is active I have the capability to do an encode with ffmpeg using the h264_amf encoder. I have a dual GPU system with a rx vega 56 and a rx 480. And finally, ffmpeg configured and complied with -enable-cuda-nvcc option.I have been trying to utilize the amf-amdgpu-pro package from driver 19.30 in Ubuntu 18.04 using the latest branch of FFmpeg to do an h264_amf encode with varying success.In short, to enable support for GPU-assisted encoding with an NVIDIA GPU for ffmpeg, you need: Please see NVIDIA documentations and ffmpeg wiki page for further information. You learned how to install FFmpeg with NVIDIA GPU acceleration hardware support on Debian or Ubuntu Linux to speed up encoding with the ffmpeg command. Make sure you read the following man pages using the man command: Mine is a consumer-grade GPU, but no doubt data center or professional-grade NVIDIA GPU gives even better performance. Time ~/ffmpeg/ffmpeg -hwaccel cuda -y -i /tmp/input.mkv /tmp/out.mp4 Time command outputs with CPU used: realđm40.678sĪlso note down the speed: frame= 7320 fps= 73 q=-1.0 Lsize= 58306kB time=00:02:02.03 bitrate=3914.0kbits/s speed=1.22xĪnd now same file with NVIDIA GPU acceleration (note the path, I am calling the compiled version):

Time /bin/ffmpeg -y -i /tmp/input.mkv /tmp/out.mp4 In this example, I am converting input.mkv to out.mp4 as follows without using GPU acceleration: Related: Top 7 Linux GPU Monitoring and Diagnostic Commands Line Tools Result
