Getting mplayer to work on OS X Snow Leopard

The post below is based off a post to the mplayer-users group by Reimar Döffinger.

To get mplayer on Snow Leopard, first checkout the latest code off subversion (as of writing, the snapshot offered for download is for September 1, 2009 and isn’t a working version):

svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

Change into the mplayer directory that gets created, and run

./configure --target=x86_64-Darwin

I’m not sure if the ./configure script errors if you don’t have the libs you need installed – I had them installed via macports.

Once that’s run, edit config.h and change #define HAVE_EBX_AVAILABLE 1 to #define HAVE_EBX_AVAILABLE 0. Then run make.

If you had the dependent libraries that mplayer needs installed under Leopard through macports, ld will complain about some dylibs being compiled for the wrong architecture (You can tell that the libs were originally installed via macports because the path to the lib is /opt/local/lib).

The solution is simple; for each dylib that it ld reports on (in my case libjpeg.dylib libpng.dylib, libfreetype.dylib, and libmad.dylib) run sudo port install <library name> +universal

Then run make again, then sudo make install.

Mplayer is now installed; test it by running mplayer on one of your videos.

04:19 PM on Saturday, 05/09/2009

Say something!

Brilliant. Thanks a lot!

bjoern @ 11:40 PM on Tuesday, 08/09/2009

I had no luck that way, either -- apparently due a problem with libsdl. Tried to install libsdl via mac ports and the regular UNIX way, but had no luck at all. Finally, using "./configure --target=x86_64-Darwin --disable-sdl" I got it working. Never had that trouble before, been using mplayer from the CLI since the Panther days...

Indi @ 06:19 AM on Wednesday, 09/09/2009

Thanks, worked for me. What's the reason to not use EBX register?

Marek Rosa @ 06:26 PM on Wednesday, 09/09/2009

Thanks for the comments!

Brenton @ 07:29 PM on Wednesday, 09/09/2009

@Marek Rosa: I'm not sure why it doesn't work, unfortunately; it just seems to fix it!

Brenton @ 07:54 PM on Thursday, 10/09/2009

It works! Thank you!

Libo @ 07:22 PM on Friday, 11/09/2009

Thanks. Any way to build x264?

Laine @ 01:45 PM on Sunday, 13/09/2009

@Laine This h264 test video worked for me: http://www.pool.org.au/video/john_jacobs/test_video_h264_mp4. Does h264 not work for you?

Brenton @ 07:36 PM on Sunday, 13/09/2009

I managed to build mplayer with this method, but I can't get libdca working now. If I enable libdca it keeps giving errors during "make". Any workaround on that?

Dogan @ 07:51 PM on Saturday, 19/09/2009

@Dogan I can only suggest going to the #mplayer IRC channel on Freenode and asking there, I don't know anything specifically about libdca, sorry.

Brenton @ 10:14 PM on Saturday, 19/09/2009

Nice - thanks for the quick guide. Worked great.

GregCube @ 07:27 AM on Thursday, 24/09/2009

any clues about make: *** [libvo/vo_sdl.o] Error 1 ? thanks

smok3y @ 06:58 AM on Thursday, 01/10/2009

@smok3y Sorry, not sure. I suggest trying the #mplayer IRC channel on Freenode.

Brenton @ 11:57 AM on Monday, 05/10/2009

Just adding to the chorus of thanks, this worked perfectly for me!

PeterP @ 12:14 PM on Sunday, 01/11/2009

Did not work for me. Configure run well as far as I can tell, but make ended with: ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [mplayer] Error 1 Any suggestions?

adw @ 10:29 PM on Tuesday, 10/11/2009

@adw Not sure; one thing to note is that the latest builds do not require you to modify config.h, nor does it require you to manually set your configure target. Other than that, try the #mplayer IRC channel on irc.freenode.net.

Brenton @ 09:01 AM on Wednesday, 11/11/2009

@smok3y --disable-sdl, you really don't need it because all video and audio is handled by coreaudio/video

mphatigo @ 01:41 AM on Thursday, 26/11/2009

Thanks for the --target tip!

Seth Thomas Rasmussen @ 07:32 AM on Wednesday, 16/12/2009

Thanks worked like a charm!!!

Edenshaw @ 11:21 AM on Friday, 16/04/2010

I am trying to install the mplayer on my mac I get this error after running ./configure ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [mplayer] Error 1 help please

A.J. @ 11:53 PM on Saturday, 21/05/2011

If you want to buy real estate, you will have to get the <a href="http://bestfinance-blog.com/topics/credit-loans">credit loans</a>. Moreover, my mother always utilizes a sba loan, which occurs to be the most reliable.

Miranda22Lydia @ 12:25 PM on Thursday, 01/09/2011

People deserve good life time and home loans or student loan would make it better. Just because people's freedom relies on money state.

business loans @ 05:44 AM on Saturday, 24/09/2011

I had got a desire to make my organization, nevertheless I did not have enough of money to do it. Thank heaven my colleague proposed to take the loan. So I received the short term loan and realized my desire.

loans @ 10:06 PM on Sunday, 25/09/2011

Your post shows off your thinking really clever you are?and thank you for sharring these kind of remarkable thoughts.. <a href="http://www.dissertationswriting.co.uk/">custom dissertation</a>

custom dissertation @ 06:25 PM on Saturday, 28/01/2012