Installing FFmpeg with H264 support on Mac OS X (Mountain Lion)

If you are installing Adobe CQ5, you’ll love the fact that FFmpeg integration is supported out of the box. The bad news is that due to licensing restrictions Adobe does not bundle FFmpeg with the standard CQ installation. Another issue is that the “standard” FFmpeg build does not include support for H264 which is useful for video playback on iOS devices etc.

Given that I had to repeat the installation process recently after reinstalling my MacBook AIR with Mountain Lion, I took some notes compiled from a few different sites into one quick cheat sheet. Note that this will take at least an hour to complete due to the need to download and compile a bunch of stuff.

Hear is the quick summary of what needs to be done;

  1. Install XCode
  2. Install Command Line tools for Xcode
  3. Install MacPorts
  4. Install FFmpeg

Now here is the longer explanation;

First install XCode

Xcode is required to be installed as its needed in step 4 to actually download and compile FFMPEG. I’ve tested with XCode 4.3 on Lion, and XCode 4.4 on Mountain Lion without issues.

Install Command Line tools for XCode

The Command Line Tools make the XCode “stuff” available to MacPorts, which we will install in the next step. You can download Command Line tools for XCode for free, you just need an Apple ID.

Install MacPorts

You can grab the latest from I’m using the Mountain Lion version

MacPorts is actually pretty useful and gives you access to a whole bunch of open source software. It’s worth while typing the following command to keep MacPorts up to date;

sudo port -v selfupdate

If you are curious and want to explore more about MacPorts and arent that comfortable in a terminal window, I recommend installing Pallet, but its optional and not required for FFmpeg

sudo port install Pallet

Install FFmpeg

Finally we actually get to install FFmpeg! Open up a Terminal window and type the following (all on one line)

sudo port install ffmpeg +gpl +postproc +lame +theora +libogg +vorbis
 +xvid +x264 +a52 +faac +faad +dts +nonfree

This will take some time, as your Mac will chug away downloading the various packages, compiling them and installing them. On my Mac & Connection it took about 45 minutes to complete the above command. You will notice the various options, including +264 etc which include the various options needed. I’d recommend the above configuration for use with CQ5.


Thats it.. congratulations, you should now have FFmpeg installed!


Written by:


  1. Tom
    January 9, 2013

    Thank your for your useful explanation.
    Which is the differences of installing FFMPEG using your way on this webpage or using this option on this link?:
    Which is better?

    • January 13, 2013

      Hi Tom
      Actually i’m not familiar with what is on the evermeet site however it looks like they are precompiled where as my method gives you more flexibility into which options are included. Hope that helps.

  2. lucifer
    January 16, 2013

    Very helpful indeed, thanks!
    Much simpler than installing it manually.

  3. Kim
    February 6, 2013

    btw, you have to launch XCode once to finish its installation, otherwise ffmpeg fails.. =)

  4. Angus
    March 11, 2013

    Thanks – I was looking for this command!

    sudo port install ffmpeg +gpl +postproc +lame +theora +libogg +vorbis
    +xvid +x264 +a52 +faac +faad +dts +nonfree

  5. mhr
    March 20, 2013

    Thanks for the instructions. I have a ffmpeg Unix executable file sitting in opt/local/bin. How do I get it to Applications and the LaunchPad? Please advise. Thanks.

  6. […] burn in text or subtitles). There is a good tutorial for installing FFmpeg with extensions on Mac here and for Windows this site offers custom ffmpeg builds on […]

Comments are closed.