Skip to main content

How to install FFmpeg

· 2 min read

What is FFmpeg?

FFmpeg is a very powerful tool for manipulating and encoding media. You can do thousands of different things such as adding/removing streams to media, changing codecs, streaming data, adding/removing subs etc. For a full list of commands visit this page:

https://gist.github.com/tayvano/6e2d456a9897f55025e25035478a3a50

How to install FFmpeg on Linux/Ubuntu:

sudo apt-get update
sudo apt-get install ffmpeg
ffmpeg -version

The final output should give something along the following:

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)

You can now start using FFmpeg!

How to install FFmpeg on Windows:

To install FFmpeg on Windows visit the following link:

https://www.gyan.dev/ffmpeg/builds/

Scroll down to the release builds section and you'll see the latest release section.

Download ffmpeg-release-essentials.zip and unzip it. Inside you'll see ffmpeg.exe which in most cases is all you need.

How to install FFmpeg on macOS:

Using homebrew you can simply run the following:

brew install ffmpeg
brew link ffmpeg
ffmpeg -version

Hardware transcoding using GPUs and FFmpeg

Often users want to be able to use their graphics cards for increased decoding/encoding speed when transcoding video, in which case you'll need to make sure your FFmpeg version has the relevant encoders. The most commonly used ones are the following:

# For Nvidia GPUs
nvenc_h264
nvenc_h265

# For AMD GPUs
h264_amf
hevc_amf

# For Intel iGPUs (6000 series onwards)
hevc_vaapi
hevc_qsv

You can check the FFmpeg encoders available by running:

ffmpeg -encoders

Which will produce output such as the following:

 V..... libx265              libx265 H.265 / HEVC (codec hevc)
V..... nvenc_hevc NVIDIA NVENC hevc encoder (codec hevc)
V..... hevc_nvenc NVIDIA NVENC hevc encoder (codec hevc)
info

Get started using Tdarr transcode automation for free with this link:

https://tdarr.io/download/