David Bosch - Mar 4th, 2022
FFMPEG is a popular tool to encode, transcode and convert multimedia files. It supports an extensive number of formats including AVI, MPEG, MP4, WEBM and more. FFMPEG is open source and free software licensed under the GNU General Public License.
To learn more about what FFMPEG is read the lesson 1 of this FFMPEG free course.
FFMPEG is available for Mac OSX, Windows, Linux and many other platforms.
There are different options to install FFMPEG on your Mac, all perfectly valid. You must choose based on your current setup, your knowledge/experience or your specific needs.
This chapter covers installing FFMPEG on Mac OSX, in two approaches:
Install FFMPEG on Mac from binaries
The first option is to download and install already compiled binaries from the official FFMPEG sources. This option is good if you do not have any package manager installed (or if you don't know if you have it), but it requires more steps than using brew or snap.
The FFMPEG website does not host the compiled binaries, only the source files, but it links to "pseudo-official" sites that have compiled the source code into a Mac binary
-
STEP 1: Go to the FFMPEG downloads page
On the downloads section FFMPEG site you will find all the options for downloading FFMPEG, including the source code and the binaries for the different platforms
-
STEP 2: Select MacOS platform
Under the "Get packages & executable files" section, click on the Apple logo to get the list of sources. For Mac, there's only one option: Evermeet.cx
Use this link to download the latest version of FFMPEG for Mac OSX. Additionally, you can download FFPROBE and FFPLAY.
-
STEP 3: Unzip the file
Once you downloaded the file, unzip the file double-clicking on it to extract the
ffmpeg
binary file. -
STEP 4: Move the FFMPEG file to your preferred folder
I suggest moving the
ffmpeg
executable to yourhome
directory. Yourhome
directory is already available in the systemPATH
, but if you decide to moveffmpeg
to another folder, I recommend you to add this folder to yourPATH
environment variable (learn how). -
STEP 5: Unblock FFMPEG on Mac OS
The first time you run
ffmpeg
on your Mac, it will be blocked by the Mac OSX security system. To unblock it, follow these steps:From a terminal window, move to the folder where FFMPEG is, and then run:
./ffmpeg --version
You will be prompted with a window like this:
Click the Cancel button.
Then, open the System Preferences from the 🍎 menu on the top-left, select Security & Privacy to see this screen:
Click the Allow anyway button.
-
STEP 6: Test the installation
To test the installation, just run this command from the Terminal:
ffmpeg -version
And you should get an output similar to this:
Uninstall FFMPEG
If you installed FFMPEG from binaries as explained above, uninstalling it is as simple as deleting the ffmpeg
file, wherever it is:
rm ffmpeg
Finding ffmpeg on your Mac
If ffmpeg
is installed but you can't remember where, the following command will look at the directories in your PATH to find it:
which ffmpeg
If you don't have ffmpeg
in your PATH, or you think you may have more than one copy of it:
find / -name ffmpeg 2>/dev/null
This command will take several minutes to search across all your directories, so be patient.
Install FFMPEG on Mac with brew
The second option to install FFMPEG is to use Homebrew.
Homebrew, or just brew
, is a package manager for macOS that makes things easier
when installing software from the command-line.
-
STEP 1: Confirm you have brew installed
First things first, let's check if you have brew installed on your computer:
brew -v
If you get a "command not found" error, install
brew
:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
STEP 2: Install ffmpeg with brew
Run this simple command on your terminal:
brew install ffmpeg
-
STEP 3: Check installed version
Once installed, you can check the current installed version with:
ffmpeg -version
Keep FFMPEG updated with brew
If at any time you want to update your FFMPEG installation, you just need this command:
brew update && brew upgrade ffmpeg
This command will update your brew
database and then it will upgrade ffmpeg
.
Uninstall FFMPEG with brew
To uninstall a Homebrew FFMPEG installation, you simply need this command:
brew uninstall ffmpeg