Score:1

Installing FFMPEG with AMF Support on Ubuntu 20.04.5

lu flag

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?

andrew.46 avatar
in flag
More concrete advice here perhaps: https://ffmpeg.org/general.html#AMD-AMF_002fVCE
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.