Installing FFmpeg on Mac

October 27, 2022

Introduction

FFmpeg is an open-source command-line tool for audio and video file processing. It comprises a suite of programs and libraries for decoding, encoding, streaming, filtering, and playing various multimedia formats.

This article will guide you through 3 different ways to install FFmpeg on macOS.

Installing FFmpeg on Mac

Prerequisites

  • Mac OS X 10.9 or newer.
  • Administrative access to the system.

Option 1: Installing FFmpeg on Mac via Homebrew

Package manager installations provide automatic app updates, simplifying the management process. The recommended way to install FFmpeg on macOS is using the Homebrew package manager.

The sections below describe the necessary steps and provide three ways to install the tool with Homebrew.

Note: If you do not have Homebrew installed on your system, read How to Install Homebrew on Mac.

Step 1: Update and Upgrade Homebrew Formulae

1. Before installing FFmpeg, ensure that Homebrew formulae on the system are up to date:

brew update

2. Upgrade outdated formulae by running:

brew upgrade

Step 2: Install FFmpeg

1. Install the latest version of FFmpeg available on Homebrew with the command below.

brew install ffmpeg

Homebrew installs the tool and all the dependencies.

Installing ffmpeg with Homebrew.

2. Wait for the installation to finish, then verify it by launching FFmpeg:

ffmpeg

If successfully installed, FFmpeg displays an overview of configuration options.

Testing ffmpeg from the terminal in macOS.

Install Git Master Version (Optional)

To install the latest Git master version of FFmpeg, add the --HEAD flag to the installation command.

brew install ffmpeg --HEAD

Homebrew clones FFmpeg's Git repository and checks out the master branch.

Installing FFmpeg with the Git master branch using Homebrew.

Install Using Third-Party Repository (Optional)

The default version of FFmpeg comes with a selection of free libraries. If you need additional libraries (including the proprietary ones) to be included in your FFmpeg installation, follow the steps below:

1. Add the following Homebrew tap (third-party repository):

brew tap homebrew-ffmpeg/ffmpeg
Adding a Homebrew tap.

2. Install the third-party version of FFmpeg with the command below.

brew install homebrew-ffmpeg/ffmpeg/ffmpeg
Installing FFmpeg from a third party repository in Homebrew.

Option 2: Installing FFmpeg on Mac via MacPorts

MacPorts is another popular package manager for macOS. If you do not have MacPorts on the system, install it by downloading and executing the PKG file for your macOS version.

Note: For detailed download and installation steps, refer to the Install MacPorts section of our PuTTY tutorial.

1. Install FFmpeg on MacPorts by typing the following command:

sudo port install ffmpeg

2. When prompted, enter Y to proceed with the installation. MacPorts installs FFmpeg and its dependencies.

Installing FFmpeg with MacPorts.

Option 3: Installing FFmpeg on Mac Using a Static Build

Another way to install FFmpeg on Mac is to download a static build binary. Static builds allow you to choose and install the latest snapshots and releases. However, app management will be more difficult as you will need to manually update the app.

Follow the steps below to run a static build of FFmpeg.

Step 1: Download FFmpeg

1. Visit the official FFmpeg download page.

2. In the Get packages & executable files section, select the Apple logo and click the Static builds for macOS 64-bit link.

Get packages and executable files section of the FFmpeg website.

3. Scroll down to the FFmpeg section and choose a version. To download the latest snapshot, select Download as ZIP in the column on the left side.

Selecting a FFmpeg snapshot to download.

Step 2: Extract and Move FFmpeg Binary

When the download completes, execute the following steps to place the binary in a location where the OS will recognize it.

1. Double-click to unzip if the file did not unzip automatically.

2. Move the file to a directory of your choice. Make a note of the directory path.

3. In the terminal, add the directory to the path variable. For example, if the FFmpeg binary is in /Users/test/local, type:

export PATH=$PATH:/Users/test/Local

4. Test the installation by invoking FFmpeg from the terminal.

ffmpeg

Conclusion

After reading this article, you should know how to install FFmpeg on macOS.

The guide explained 3 different methods for installing FFmpeg - using package managers (Howebrew and MacPorts) or by manually downloading and building a static binary file.

Was this article helpful?
YesNo
Marko Aleksic
Marko Aleksić is a Technical Writer at phoenixNAP. His innate curiosity regarding all things IT, combined with over a decade long background in writing, teaching and working in IT-related fields, led him to technical writing, where he has an opportunity to employ his skills and make technology less daunting to everyone.
Next you should read
Installing FFmpeg on Ubuntu
October 13, 2022

FFmpeg is a command-line tool that records, transcodes, mixes, formats, and streams multimedia content. This cross-platform...
Read more
Installing FFmpeg on Windows
October 19, 2022

In this guide, you will learn how to install FFmpeg on Windows in four simple steps. Even though FFmpeg doesn't have a clickable GUI...
Read more
How to Install PuTTY on Mac
September 21, 2021

PuTTY is an open-source SSH and Telnet client initially developed for Windows and later ported to macOS. The client allows users to connect remotely...
Read more
How to Install and Get started with Git on Mac
September 12, 2024

Git is a version control system that allows developers to track a project and actively...
Read more