Skip to content
rdp edited this page Apr 3, 2013 · 6 revisions

I run into several problems on Mac OSX, which I fixed and finally it was able to build ffmpeg directly using this script, with the following caveats.

The problems, as far as I remember them: You will need Mac Ports already setup. Also install wget from it.

built in tar does not support xz, even the tar from Mac Ports wont do it, as far as i remember.

You will probably have to bootstrap from sources: curl http://tukaani.org/xz/xz-5.1.2alpha.tar.gz curl http://ftp.gnu.org/gnu/tar/tar-1.26.tar.gz

  1. sed behaves strange on Mac OSX. No idea why, but it doesn't do the job. This probably leads to problems building zlib and openjpeg.

You will probably have to bootstrap from sources: curl ftp://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.gz

A bootstrapped pkg-config, yasm and cmake as well. One package wanted
a very new cmake, which is not available at Mac Ports.

wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz wget http://www.cmake.org/files/v2.8/cmake-2.8.10.2.tar.gz

Some packages (gmp, zlib) use uname and the OSX uname doesn't work. I believe, this happens on all build hosts, but when it is a normal Linux environment, the loader option derived from this process match the loader options of mingw, so everything is fine. No on OSX however. The libraries are complete different and several tools of mingw will fail naturally.

Create a "fake" uname script (in thread above), put it in some directory and add the search PATH to this ONLY when cross-compiling to Your environment. It will then take linker options from a "fake" Linux system, which does the job.

The problem with fontconfig might be due to depencies libraries not create by above problems. Finally the script will build ffmpeg with fontconfig.
Clone this wiki locally