Welcome folks today in this blog post we will be enabling NVIDIA or AMD GPU Acceleration
in ffmpeg library to speed up encoding
and conversion of video and audio in terminal. All the instructions is shown below.
Get Started
In order to get started you need to install the ffmpeg
library installed on your system. Now to enable the GPU
for ffmpeg you need to execute the below commands as shown below
AMD GPU Command in FFMPEG
ffmpeg -i input.mp4 -c:v h264_amf output.mp4
Here as you can see we are providing the input
video.mp4 file and then we are using the amd gpu
using the h264_amf
and then we are providing the output file called output.mp4.
NVIDIA GPU Command in FFMPEG
ffmpeg -i input.mp4 -c:v h264_nvenc output.mp4
Here as you can see we are providing the input
video.mp4 file and then we are using the nvidia gpu
using the h264_nvenc
and then we are providing the output file called output.mp4.