MPlayer is a great media player app. It features codecs that will decode the majority of video and audio you'll find on the internet today, and with the bundled mencoder encoder you get a complete solution for media playback, transcoding and compression on your UNIX-like desktop or server.
The Problem
If you are a Mac OS X Leopard early adopter who has previously relied on the macports package manager to install and update MPlayer you may be feeling slightly hard-done-by right now, that's because MPlayer cannot currently be installed with out-of-the-box Macports 1.5 on leopard. In fact, macports won't even begin to build the MPlayer sources because the lzo2 dependency fails to compile, and even if you do have a working lzo2 installation MPlayer itself will fail to build. This is apparently x86 specific and is caused by problems building MMX and SSE assembly code.
The Solution
The short answer? Download and install the GUI MPlayer OS X 1.0rc1 OSX binaries provided at the mplayer download page. It's not as powerful as the cli version, but for simple playback of media files it's pretty great.
The long answer? Thankfully the lzo2 portfile in the latest development revisions of macports has been fixed for 10.5, you can substitute this new file for the unusable one, and afterwards edit the MPlayer portfile to disable compile options that cause the build to fail ...
In the Terminal
If you've already tried to build MPlayer with macports and the installation has failed at building lzo2 we'll first remove the evidence of that:
$ sudo rm -rf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_lzo2/
Lets navigate to the location of the current lzo2 Portfile and rename it.
$ cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/archivers/lzo2/
$ sudo mv Portfile Portfile.old
Now, become superuser and grab the development lzo2 portfile from the macports project website.
$ sudo -s
# curl http://trac.macports.org/projects/macports/browser/trunk/dports/archivers/lzo2/Portfile?format=raw >> Portfile
# exit
Now lets go ahead and build that pesky dependency
$ sudo port install lzo2
---> Fetching lzo2
---> Verifying checksum(s) for lzo2
---> Extracting lzo2
---> Configuring lzo2
---> Building lzo2 with target all
---> Staging lzo2 into destroot
---> Installing lzo2 2.02_2+darwin_9
---> Activating lzo2 2.02_2+darwin_9
---> Cleaning lzo2
SUCCESS!
But we're only half-way there. We still have to build and install MPlayer itself.
If you've already attempted to build MPlayer with macports remove the old build files
$ sudo rm -rf /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_MPlayer/ports_multimedia_MPlayer/
Install the lzop dependancy
$ sudo port install lzop
Now navigate to the Mplayer Portfile directory open the portfile with a text editor
$ cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/multimedia/mplayer
$ nano Portfile
...and edit the "configure.args-append" section by appending the following onto it
--disable-mmx --disable-sse --disable-xinerama
Now lets build and install MPlayer
$ sudo port install mplayer
Portfile changed since last build; discarding previous state.
---> Fetching MPlayer
---> Verifying checksum(s) for MPlayer
---> Extracting MPlayer
---> Applying patches to MPlayer
---> Configuring MPlayer
---> Building MPlayer with target all
---> Staging MPlayer into destroot
---> Installing MPlayer 1.0rc1try3_0+darwin_i386+macosx
---> Activating MPlayer 1.0rc1try3_0+darwin_i386+macosx
---> Cleaning MPlayer
$ mplayer
MPlayer 1.0rc1-4.0.1 (C) 2000-2006 MPlayer Team
CPU: Genuine Intel(R) CPU 1400 @ 1.83GHz (Family: 6, Model: 14, Stepping: 8)
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled
CPUflags: MMX: 0 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 1
Compiled for x86 CPU with extensions: SSE2
...
ITS ALIVE!
And there we have it, working MPlayer on Leopard with MacPorts. Having said that, the installation may be sluggish without the MMX and SSE code, your mileage and performance may vary. Let's cross our fingers that this will all be fixed in the next milestone release of Macports.
2 comments:
appears that with latest macports it builds on snow leopard now. I don't see the message "SSE disabled" so hopefully that's also now working :)
Use "Long Path This very useful if you are having problems
in deleting, unlocking, copying and even renaming files, also very easy.
Post a Comment