I'm on the AWS g4ad server instance that has AMD Radeon Pro V520 GPU. I am trying to get my ffmpeg to use the GPU when doing conversion as such:
ffmpeg -i input.avi -c:v h264_amf output.mp4
When I install normall ffmpeg or use the ffmpeg from ppa:savoury1/ffmpeg4, these not have the amf codec enabled (even though 4.3 is suppose to the code enable by default). I will get this error:
Unknown encoder 'h264_amf'
Also, the different are installed from here: https://www.amd.com/en/support/linux-drivers
Then I tried to compile ffmpeg from the source with:
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
--prefix="$HOME/ffmpeg_build" \
--pkg-config-flags="--static" \
--extra-cflags="-I$HOME/ffmpeg_build/include" \
--extra-ldflags="-L$HOME/ffmpeg_build/lib" \
--extra-libs="-lpthread -lm" \
--bindir="$HOME/bin" \
--enable-libfdk-aac \
--enable-gpl \
--enable-libass \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-libx265 \
--enable-libtheora \
--enable-openssl \
--enable-amf \
--enable-encoder=h264_amf \
--enable-nonfree
But I get the error
ERROR: amf requested but not found
And the instructions for how to include AMF are vague.
Can anyone provide a way of getting FFMPEG working with ffmpeg?