How to run FFmpeg on an AMD GPU

How to run FFmpeg under Ubuntu on an AMD GPU?

I am using the commands on this site but the GPU commands do not work. I'm not sure if my GPU driver is installed.

I write ffmpeg -i input.avi -c:v h264_amf output.mp4 but I get the error:

Unknown encoder 'h264_amf'

Upvotes: 1

Views: 12825

Answers (1)

L. Scott Johnson
L. Scott Johnson

Reputation: 4392

To use h264_amf, you have to build ffmpeg with support for that encoder using the

--build-amd-amf=y

flag. See the Windows build helpers project for more info.

On linux, use

ffmpeg -h encoder=h264_vaapi

instead. And see How to use GPU acceleration in FFmpeg with AMD Radeon? on askubuntu.

Upvotes: 3

Related Questions