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 http://blastwave.network.com:10000/ 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
/usr/gnu/bin:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
$ export PATH=/usr/gnu/bin:/opt/csw/gnu:/usr/bin:/usr/X11/bin:/usr/sbin:/sbin
$ wget http://www8.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2
$ 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

4 comments:

  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).

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

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

    ReplyDelete
  4. @Ken

    the gmplayer pumps out: ld.so.1: mplayer: fatal: libggi.so.2: open failed: No such file or directory

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

    ReplyDelete