Меню Рубрики

Ffmpeg mac os x

Ffmpeg mac os x

FFmpeg only provides source code. Below are some links that provide it already compiled and ready to go.

Linux Packages

Linux Static Builds

Windows EXE Files


You can retrieve the source code through Git by using the command:

FFmpeg has always been a very experimental and developer-driven project. It is a key component in many multimedia projects and has new features added constantly. Development branch snapshots work really well 99% of the time so people are not afraid to use them.

Since FFmpeg is developed with Git, multiple repositories from developers and groups of developers are available.

Main FFmpeg Git repository https://git.ffmpeg.org/ffmpeg-web Main ffmpeg.org website repository https://git.ffmpeg.org/fateserver fate.ffmpeg.org server software repository Mirrors

Approximately every 6 months the FFmpeg project makes a new major release. Between major releases point releases will appear that add important bug fixes but no new features. Note that these releases are intended for distributors and system integrators. Users that wish to compile from source themselves are strongly encouraged to consider using the development branch (see above), this is the only version on which FFmpeg developers actively work. The release branches only cherry pick selected changes from the development branch, which therefore receives much more and much faster bug fixes such as additional features and security patches.

FFmpeg 4.3.1 “4:3”

4.3.1 was released on 2020-07-11. It is the latest stable FFmpeg release from the 4.3 release branch, which was cut from master on 2020-06-08.

It includes the following library versions:

FFmpeg 4.2.4 “Ada”

4.2.4 was released on 2020-07-09. It is the latest stable FFmpeg release from the 4.2 release branch, which was cut from master on 2019-07-21.

It includes the following library versions:

FFmpeg 4.1.6 “al-Khwarizmi”

4.1.6 was released on 2020-07-05. It is the latest stable FFmpeg release from the 4.1 release branch, which was cut from master on 2018-11-02.

It includes the following library versions:

FFmpeg 4.0.6 “Wu”

4.0.6 was released on 2020-07-03. It is the latest stable FFmpeg release from the 4.0 release branch, which was cut from master on 2018-04-16.

It includes the following library versions:

FFmpeg 3.4.8 “Cantor”

3.4.8 was released on 2020-07-04. It is the latest stable FFmpeg release from the 3.4 release branch, which was cut from master on 2017-10-11.

It includes the following library versions:

FFmpeg 3.2.15 “Hypatia”

3.2.15 was released on 2020-07-02. It is the latest stable FFmpeg release from the 3.2 release branch, which was cut from master on 2016-10-26.

It includes the following library versions:

FFmpeg 2.8.17 “Feynman”

2.8.17 was released on 2020-07-07. It is the latest stable FFmpeg release from the 2.8 release branch, which was cut from master on 2015-09-05. Amongst lots of other changes, it includes all changes from ffmpeg-mt, libav master of 2015-08-28, libav 11 as of 2015-08-28.

It includes the following library versions:



Контекстная Навигация


There are a few ways to get FFmpeg on macOS:

  1. Use a package manager like ​ Homebrew or ​ MacPorts to install ffmpeg. These will automatically keep your FFmpeg installation up-to-date. See the Homebrew section below for more info.
  1. Download a static build for macOS. This is as easy as extracting and running the downloaded binary. One disadvantage with static builds is that updates have to be performed manually. Also, they may not contain all encoders or filters you want.
  1. Build it yourself. Compiling on macOS is as easy as on any other *nix machine. Download the source, then run ./configure with the needed flags, make and make install. However, the configuration options have to be set manually, and you will need to install third-party libraries yourself. See the compilation section below for more info.

ffmpeg through Homebrew

​ Homebrew is a command-line package manager, which is similar to apt-get on popular Linux distributions. In order to use it, you need to install brew first, if you haven’t already:

Follow the on-screen instructions. This will take a few minutes while it’s installing the necessary developer tools for macOS. Then, run:

to get the latest released version with minimal configuration (and library dependency) options. These versions are packaged as Homebrew formulas and will take care of all the dependencies and the installation itself. To get the latest Git master version, run:

Additional options

Since v2.0, Homebrew does not offer options for its core formulae anymore. Users who want to build ffmpeg with additional libraries (including non-free ones) need to use so-called taps from third party repositories. These repositories are not maintained by Homebrew.

The following repositories for ffmpeg are available – refer to the README for additional information about the included options:

ffmpeg can be installed from the repository using its full formula name after tapping, for example:

Options are available with brew options homebrew-ffmpeg/ffmpeg/ffmpeg.

Updating ffmpeg

To later upgrade your ffmpeg version to the latest released, simply run:

If you have installed the HEAD, then you can upgrade by running:

Compiling FFmpeg yourself


Xcode is required to compile software on your Mac. Install Xcode by ​ downloading it from the website or using the Mac App Store.

After installing Xcode, install the Command Line Tools from Preferences > Downloads > Components. You can also install the tools via your shell:

Installing dependencies with Homebrew

To get some dependencies for ffmpeg, you can install ​ Homebrew.

Tip: If you don’t want to use Homebrew to get the dependencies, see the section below. Using Homebrew will however save you time in setting up all the needed tools.

Manual install of the dependencies without Homebrew

Pkg-config & GLib

Pkg-config is necessary for detecting some of the libraries you can compile into FFmpeg, and it requires GLib, which is not included in macOS (but almost every other *nix distribution). You may either download pkg-config 0.23, or download the large tarball from ​ Gnome.org and compile it. Pkg-config is available from ​ Freedesktop.org.

To compile GLib, you must also download gettext from ​ GNU.org and edit the file stpncpy.c to add #undef stpncpy just before #ifndef weak_alias. Mac OS X Lion has its own (incompatible) version of the stpncpy function, which overlaps in gettext. Compile gettext as usual. Compile GLib with

To compile pkg-config, run

Nasm is an assembler required for x264. The latest version is available at ​ nasm.us.

Additional libraries

These are just some examples. Run ./configure --help for all available options.

  • ​ x264 encodes H.264 video. Use --enable-gpl --enable-libx264.
  • ​ fdk-aac encodes AAC audio. Use --enable-libfdk-aac.
  • ​ libvpx is a VP8 and VP9 encoder. Use --enable-libvpx.
  • ​ libvorbis encodes Vorbis audio . Requires ​ libogg. Use --enable-libvorbis.
  • ​ libopus encodes Opus audio.
  • ​ LAME encodes MP3 audio. Use --enable-libmp3lame.
  • ​ libass is a subtitle renderer. Use --enable-libass.


macOS already comes with freetype installed (older versions may need X11 selected during installation), but in an atypical location: /opt/X11/.

Running freetype-config in Terminal can give the locations of the individual folders, like headers, and libraries, so be prepared to add lines like

in your ./configure command.


Once you have compiled all of the codecs/libraries you want, you can now download the FFmpeg source either with Git or the from release tarball links on the website.

For general instructions on how to compile software, consult the Generic compilation guide. The information there is applicable to the macOS environment as well.

Run ./configure --help, and study its output to learn what options are available. Make sure you’ve enabled all the features you want. Note that --enable-nonfree and --enable-gpl will be necessary for some of the dependencies above.


How to install latest ffmpeg on mac

I am using this command

But the installed version of ffmpeg I get is only 0.7.13.

I am using MacPorts which may be the issue

2 Answers 2

It’s a “problem” with MacPorts. As you say, the last port version is 0.7.13. There is also a devel port but with a recent revision (5 weeks ago). You could also take a look here. This site seems to have a 1.0 static binary. It is a trusted website. Actually is linked in the official ffmpeg website.

1. Homebrew

Homebrew has a formula for stable FFmpeg releases. This will get you running pretty fast. First, install Homebrew by opening Terminal.app and and pasting this. Follow all the instructions closely!

Then install FFmpeg through the ffmpeg formula:

This will download a lot of dependencies such as x264, LAME, FAAC, et cetera, but after that you should be good to go. You can also brew install ffmpeg –HEAD to get the absolute latest version.

For additional options, check the output of brew info ffmpeg. You can, for example, add the following options, which are normally disabled:

To update ffmpeg later on, run:

2. Static Builds

The FFmpeg project, on the download page, offers links to static builds for ffmpeg, which you can just download, extract, and use in a terminal.

At the moment, you can get them from here:

Static builds cannot contain every possible encoder, mostly due to licensing issues. This is why I don’t recommend using them unless you don’t really care about which specific features you need.

Once downloaded, extract the file, open up Terminal.app, and navigate to the directory where you unzipped the files, i.e. where you find a file called ffmpeg. Copy this file to /usr/local/bin:

Now, if you use Bash (which is the default shell), add it to your $PATH:

Add this to the file at the end:

Save it, and close the editor. Now restart your Terminal and which ffmpeg should return /usr/local/bin/ffmpeg .