MPlayer does not work on Mac OS versions before 10, but should compile out-of-the-box on Mac OS X 10.2 and up. The preferred compiler is the Apple version of GCC 3.x or later. You can get the basic compilation environment by installing Apple's Xcode. If you have Mac OS X 10.3.9 or later and QuickTime 7 you can use the corevideo video output driver.
Unfortunately, this basic environment will not allow you to take advantage
of all the nice features of MPlayer.
For instance, in order to have OSD support compiled in, you will
need to have fontconfig
and freetype
libraries
installed on your machine. Contrary to other Unixes such as most
Linux and BSD variants, OS X does not have a package system
that comes with the system.
There are at least two to choose from: Fink and MacPorts. Both of them provide about the same service (i.e. a lot of packages to choose from, dependency resolution, the ability to simply add/update/remove packages, etc...). Fink offers both precompiled binary packages or building everything from source, whereas MacPorts only offers building from source. The author of this guide chose MacPorts for the simple fact that its basic setup was more lightweight. Later examples will be based on MacPorts.
For instance, to compile MPlayer with OSD support:
sudo port install pkg-config
You can get a native GUI for MPlayer together with precompiled MPlayer binaries for Mac OS X from the MPlayerOSX project, but be warned: that project is not active anymore.
Fortunately, MPlayerOSX has been taken over by a member of the MPlayer team. Preview releases are available from our download page and an official release should arrive soon.
In order to build MPlayerOSX from source
yourself, you need the mplayerosx
, the
main
and a copy of the
main
SVN module named
main_noaltivec
.
mplayerosx
is the GUI frontend,
main
is MPlayer and
main_noaltivec
is MPlayer built without AltiVec
support.
To check out SVN modules use:
svn checkout svn://svn.mplayerhq.hu/mplayerosx/trunk/ mplayerosx svn checkout svn://svn.mplayerhq.hu/mplayer/trunk/ main
In order to build MPlayerOSX you will need to set up something like this:
MPlayer_source_directory | |--->main (MPlayer Subversion source) | |--->main_noaltivec (MPlayer Subversion source configured with --disable-altivec) | \--->mplayerosx (MPlayer OS X Subversion source)
To begin with, in order to ensure maximum backwards compatibility, set an environment variable:
export MACOSX_DEPLOYMENT_TARGET=10.3
Then, configure:
If you configure for a G4 or later CPU with AltiVec support, do as follows:
./configure --disable-gl --disable-x11
Continue with
make
You can also use the Xcode 2.1 project; the old project for Xcode 1.x does not work anymore.