Every few years we need
ffplay for some little job. The ffmpeg suite is my go-to swiss-army knife for whipping video into shape. Unfortunately, the compilation process is challenging. Here is a summary of the recipe I used to build these tools on OSX 10.10.2. It was not exactly straightforward. That’s why I wrote it down.
If you want to build FFmpeg with additional libraries, download Cygwin 'Devel' packages for Ogg and Vorbis from any Cygwin packages repository: libogg-devel, libvorbis-devel These library packages are only available from Cygwin Ports.
- Building FFmpeg for Mac OS X 10.2 [ Update: the OS X 10.2 procedure results in an ffmpeg binary that can decode only some of the video formats listed in the ffmpeg documentation. In particular, it can't decode Quicktime video.
- Building ffmpeg with libfaac and libx264 on Mac OS X. Hello, I failed building ffmpeg with libfaac and libx264 on Mac OS X. I used the current git masters of ffmpeg, libx264 and version 1.28 of.
- This is the highly recommended FFmpeg for Mac alternative as I am concerned. ISkysoft iMedia Converter Deluxe not only provides you with a user-friendly interface, but also comes with more features than FFmpeg, including optimized presets for all popular devices, DVD burning, DVD backup, and so on.
To jump to the end, the most difficult part was getting SDL-1 to build. (https://www.libsdl.org) I tried using SDL-2 with
ffplay, but that combination did not compile correctly.
ffplay requires SDL-1, and SDL-1 required some manual edits to get it installed.
Here is what is on my system:
Vlc Download For Mac
- xcode 6, clang 6.1.0
- X11 headers and libraries in /opt/X11 (get XQuartz from here http://xquartz.macosforge.org/landing/).
I do not use Homebrew (brew) and I do not use Macports (ports).
I’ll present each of the steps as a little BASH function. On my system, these are all put in one large .bash script, but I run each one by hand. This process is not automated.
Set the location where the libraries and binaries will build. Add these locations to your search path and the dynamic library search path. I like to build these tools in their own location, out of the way.
First build YASM. YASM is an assembler used by x264 and ffmpeg.
Music Download For Mac
Now build x264. This builds the head. If you desire a particular commit, use the ‘git checkout’ line.
Free Downloads For Mac
Build some encoders: MP3 and AAC. These are good to have around.
Build OGG, Theora and Vorbis.
Build the latest VPX library, that includes VP8 and VP9.
Now things start to get tricky.
ffplay is going to need
SDL-1. This part took some trial and error. My system does not have GLIB on it, so I compiled using the “–with-internal-glib” flag.
Now, compile SDL-1.2.15. This part is NOT straightforward, and required some patches and hand-edits.
Download and unpack the SDL source.
- edit src/video/quartz/SDL_QuartzVideo.h and remove the line with CGDirectPaletteRef (see http://hg.libsdl.org/SDL/rev/e9466ead70e5)
- And apply this patch https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch. I edited the named files by hand.
Download Ffmpeg Windows
But you’re still not done. If you try compiling this, you will find that the compiler complains about conflicting definitions. I solved it by editing the file
SDL_x11sym.h to look like this below. (Notice the second “_Xconst” declaration.)
Now try compiling SDL.
If you make it past this, you should be able to compile
ffplay cleanly. Here is my little recipe. Notice that I explicitly set the CPPFLAGS and LDFLAGS variables to include my local distribution and the location of SDL.
If all goes well, you will find the ffmpeg and ffplay binaries on your path, and if you run ‘ffmpeg -help’ or ‘ffplay -help’ there will not be an error.
Let me know if this recipe helps at all, or if you have an improvement for the SDL step. This all seemed very difficult.