This is a small step-by-step guide on how to download, compile and install GPAC and especially MP4Box on a Mac environment. I suppose most of it could be done with Linux in a very similar manner. There is an official guide for this, and it helped me quite a lot, but it was missing some (for me) crucial steps. That’s why I’m summarizing my steps I did to install GPAC.

#1 Clone GitHub

#2 Installing GPAC extra libs

Now it starts to get very interesting. You need some additional libraries so that GPAC works properly. To get them they use MacPorts in the official guide for this. If you haven’t installed MacPorts yet (as me) then you need to follow the steps on the MacPorts page here. I can only recommend using the package installer because that’s way easier than the other way (with Xcode etc.). But your choice.

If you have already installed MacPorts

If you have updated your operating system since you’ve last used MacPorts, then it is very likely that you have to update MacPorts again. You will get messages like:

If you get the warnings about not having installed the Xcode Command Line Tools:

Warning: The Xcode Command Line Tools don't appear to be installed; most ports will likely fail to build.Warning: Install them by running `xcode-select --install'.

Then just do as told and run

xcode-select --install

Error: Port libsdl-devel not found

This was an error that occurred while trying to install “libsdl-devel”. This library simply isn’t available anymore. But that’s no problem, as this was the development version anyway. Just use “libsdl” instead.

For my installation, I skipped the steps Setting up UPnP (Optional) and Setting up OpenSVCDecoder (Optional).

#3 Compile/Build the code

To configure the installation use the following command:

./configure

Then you can build GPAC with the normal make command:

make

The build process should work without problems now.

#4 Install GPAC/MP4Box

Now after the build was successful, you have two options to install GPAC. You can create a DMG-file or install it directly with:

sudo make install

Even though I made this and restarted everything MP4Box wasn’t still working and I had to manually copy the files to the system. I used the following commands for that: