Sunday, 14 November 2010

Compiling MPlayer on OpenSolaris 2008.05

Video playback (with codecs) is an absolute must to make OpenSolaris a workable alternative to Ubuntu for my home machine

What follows is a very quick guide to compiling MPlayer v1.0rc2 on OpenSolaris

Fetch gcc, gmake and gawk to allow us to compile MPlayer with minimum fuss; we also pull SUNWxorg-headers to allow us to compile the Xv video-out plugin (I also have FSWxorg-headers installed; if things don't work out, you may want to add that to the end of the list). As IPSgawk is in the Blastwave IPS repository, we add that also:

$ pfexec pkg set-authority -O Blastwave
$ pfexec pkg install SUNWgcc SUNWgmake IPSgawk SUNWxorg-headers

Compiling MPlayer is now very straightforward, the only special thing we need to do is promote /opt/csw/gnu in our PATH during compile time. This is because various parts of the build fail with the standard Solaris awk, so we override with GNU awk:

$ echo $PATH
$ export PATH=/usr/gnu/bin:/opt/csw/gnu:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
$ wget
$ tar jxf MPlayer-1.0rc2.tar.bz2 && cd MPlayer-1.0rc2
$ ./configure
$ gmake

Key points to watch out for are the list of enabled audio and video plugins upon configure completing (you almost certainly want Xv)

If all went well, you should be able to run MPlayer with a simple ./mplayer -vo xv /path/to/video

In the meantime, I'm looking into the best way to get MPlayer packages available via one of the standard IPS repositories


  1. Thanks for posting these clear instructions.

    I agree that what most would consider basic media playback will hold back Indiana from many people using it day to day. We "the community" need to start looking at how we can incorporate this and other encumbered functionality (such as DVD playback) whilst also avoiding any sort of legal issues that come from the fact that these technologies are heavily patented.

    I can see that MPlayer is in Blastwaves IPS however it seems to be one of the packages that wont work as yet (loops).

  2. imho if you are compiling mplayer from source, better do that with the svn version not rc2

  3. Looks like the /opt/csw/gnu directory was never created, and gawk is found in /opt/csw/bin.

  4. @Ken

    the gmplayer pumps out: mplayer: fatal: open failed: No such file or directory

    I gather it is looking for something that has moved in indiana???