Since 2017 I provide a build script to compile FFmpeg on your own. If you just want to run FFmpeg, go to https://ffmpeg.org/download.html and download  the executable.

Compiling FFmpeg is not that hard. So simply download the latest source code and compile it, right? Same thoughts had I on my first try. And yea, it’s not working. It’s pretty simple so compile it. But then I got a big surprise: Encoding to h264 isn’t working!

Why? The reason is that FFmpeg has no own implementation of a h264 encoder. They are using x264, a project form the VideoLAN organization (known for VLC-Player). So we need to compile x264 first and then FFmpeg. Now FFmpeg works also with the h264 encoding. After copying then the binary to my other MacBook it was again not working.

The reason for this was, that x264 was compiled as a dynamic library. This means, that FFmpeg needs x264 library on the system that runs it. After some research I’ve found the static compilation. This is more what I was looking for. Here you compile x264 as a static library and then it gets included in FFmpeg. One binary that contains all. Great!

But there were more codecs missing: lame (for mp3 audio), VPX (for VP8/VP9) and more.So I made a shell script that contains more and more codecs and at least, it is available for you on GitLab:

https://gitlab.com/martinr92/ffmpeg

As of today it contains 13 additional libraries for FFmpeg. And it’s getting more over the time. Feel free to check out the repository and use it for compiling FFmpeg your self.