Jon Simpson

Compiling MPlayer on Mac OS X Tiger

14 Nov 2005 — apple, mplayer, tiger, 10.4

Further to my earlier attempts at compiling mplayer from cvs, the bugs that were previously causing errors in the compilation (I believe, due to library dynamic/static linking strangeness and the stripping of symbols) have been fixed quite a while now and I’ve been enjoying up to date builds of mplayer on Mac OS X Tiger.

There are several great reasons to be running a CVS build of mplayer on OS X if you watch a lot of multimedia, mostly in increased performance, but also a lot of bugs have been worked out of the macosx video output driver, and there’s now a very cool transition as the window fullscreens, scaling out to meet the dimensions of the screen. Also, by running mplayer with the latest version of libavcodec (ffmpeg), improved support and performance for media formats comes as an added bonus.

To get hold of a copy of the current CVS code, there are instructions over at in the README file for mplayer. Once you have the code, you can give configure a little bit of help in locating the existing truetype font support on OS X (through telling it where to find the bundled copies of fontconfig and freetype). You can do so by using the following two commands in the terminal before running make.

export PKG_CONFIG_PATH="/usr/X11R6/lib/pkgconfig/"
./configure --with-freetype-config=/usr/X11R6/bin/freetype-config

And for future reference, I’m currently running OS X 10.4.3, with Xcode 2.0 and the following version strings from relevant apps. My CVS checkout includes libavcodec and libavutil subdirectories.

$ uname -a
Darwin Dokuro.local 8.3.0 Darwin Kernel Version 8.3.0: 
Mon Oct 3 20:04:04 PDT 2005; root:xnu-792.6.22.obj~2/RELEASE_PPC
Power Macintosh powerpc
$ gcc --version
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 20041026
(Apple Computer, Inc. build 4061)
$ mplayer -v
MPlayer dev-CVS-051114-02:29-4.0.0 (C) 2000-2005 MPlayer Team

I’ve also played with my ~/.mplayer/config file to enhance how softsubs look when played back through mplayer, after getting TTF support enabled, it seemed like a good thing to do. I use Myriad as my sub font face, and it looks best heavily aliased so I’ve customized quite a few of the parameters. Might be useful to someone…

(from ~/mplayer/.config)

# Make subtitles look as good as possible

Also, while I’m on the subject of mplayer tips for OS X, you can enable output to the secondary monitor by using the -vo command line parameter shown below. The MplayerOSX UI had this checkbox, and it took a bit of digging in the manpage to find the way to do it manually.

-vo macosx:device_id=1

This post was mainly to clear things up for anyone who may have come across my other post on the mplayer/Mac OS X front, and store the little tips and tricks that keep mplayer running exactly to my liking on the Mac.


Hi, I found your blog about using compiling MPlayer/MEncoder, and would like to shed my stresses on the matter. I have tried to get MPlayer compiled on Tiger too, without avail - I too had to remove the dust off my 10.3 DVD and re-install on an external disk to get MPlaeyer to compile. I have a feeling it could be something to do with gcc

Firas, 04 Dec 2005

Whatever bug it was with the ld: error, it seems to have returned. attempts with the recent cvs raise the same error from your previous entry on this subject. Alas, i don’t have the funds at present to install X.3 on an external disk like Firas here ;).

Alexander Wehr, 04 Dec 2005

Hey, after getting you guys’ comments I decided to build mplayer from a clean base, with the latest Apple toolchain, to see if I could replicate your issues. I built MPlayer dev-CVS-051205-00:59-4.0.1 successfully from a clean checkout of mplayer, ffmpeg (libavcodec, libavformat, libavutil) and even managed to include VC-1 support just fine. I’ll post up a full and complete process on how to build from scratch successfully, and hopefully that should help you out.

Jon, 05 Dec 2005

You can find the step-by-step process I used here

Jon, 05 Dec 2005

Hi, I just played around with the mplayer source a bit trying to get it to compile with x264 support and like to share my findings. First off, mplayer desires to use gcc-3.3, so if you intend to use any extension such as x264, I suggest you use gcc_select 3.3 upfront to building any of these. configure will fail to build the x264 test unless you add -lSystemStubs to the compile flags. I did this by searching for -lx264 in the configure script and adding it there. After the first run I got linker errors:

multiple definitions of symbol _glPointParameteri

and such.. which I tried to silence using -Xlinker -multiply_defined -assert -Xlinker suppress and also its -Wl, counterpart, but that didn’t work. So I resolved that matter with -disable-gl . After that I still had some unresolved symbols all starting with _pp_. These I found in a library (libpostproc) in one of the ffmpeg subdirs. I compiled the lib and linked against it. Now I had two rather huge binaries (about 14MB) which I could strip down to about 5MB. Unfortunately it isn’t a happy ending yet, I only own a G3 and I keep getting:

dyld: incompatible cpu-subtype
Trace/BPT trap

despite I used -disable-altivec for ffmpeg :-/. I hope I find it before my motivation runs out

Nagilum, 01 Feb 2006