There are three options, sorted by complexity:
- Homebrew (or other package managers)
- Static builds
- Compile yourself
To follow this you need to have a bit of knowledge using a terminal/shell under OS X.
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!
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then install FFmpeg through the
brew install ffmpeg
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:
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265
To update ffmpeg later on, run:
brew update && brew upgrade ffmpeg
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
sudo mkdir -p /usr/local/bin/
sudo cp ./ffmpeg /usr/local/bin
sudo chmod 644 /usr/local/bin/ffmpeg
Now, if you use Bash (which is the default shell), add it to your $PATH:
open -e ~/.bash_profile
Add this to the file at the end:
Save it, and close the editor. Now restart your Terminal and
which ffmpeg should return
3. Compiling yourself
You can of course build FFmpeg tools yourself, following the OS X compilation guide. This guide will always be up to date, and by manually compiling you may be able to tweak a few parameters.
To uninstall whatever version of FFmpeg you installed we'd need to know how you've installed it in the first place. Since Homebrew will install to
/usr/local/Cellar, and symlink to
/usr/local/bin/ffmpeg, it probably won't cause any problems with other libraries. However, check the
make install scripts of the versions you (supposedly) built yourself and see where they placed FFmpeg. Then just delete them from there — it won't interfere with Homebrew.
The segmentation fault could be due to improper linking between the x264 or libvpx libraries. Since Homebrew will take care of this, you shouldn't run into any issues.