MPlayer on Solaris 10

[Image]
MPlayer with the standard skin playing MÄX from Huba

About MPlayer

MPlayer is a popular movie player that runs on Solaris, as well as on many other systems. MPlayer features an extensive collection of video codes allowing you to play movies and audio in all major formats. Furthermore, MPlayer is not just a player - you can even use MPlayer to capture video streams, convert between video formats and create video DVDs!

The instructions below will help you compile MPlayer for Solaris 10 u4.

Compile and Install MPlayer

Prerequisites

GNU AWK

Download GNU AWK from Sun Freeware, if not installed already.

Install GNU AWK as root

bunzip2 SFWgawk.pkg.bz2
pkgadd -d SFWgawk.pkg

Done

GNU C

MPlayer does not compile with gcc 3.4.3 from Sun Freeware and a newer version of gcc must be installed temporarily. Note that gcc 3.4.3 is still required at run-time.

Get gcc and configure

wget ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.6/gcc-3.4.6.tar.bz2
bunzip2 -c gcc-3.4.6.tar.bz2 | gtar xf -
cd gcc-3.4.6/
mkdir obj
cd obj
../configure --prefix=/tmp/build  \
    --with-as=`which gas` --enable-languages=c,c++

Compile (~15 min)

time gmake

Install

gmake install
PATH=/tmp/build/bin:/sbin:/usr/sbin:/bin:/usr/bin
cd ../..

Done

Get MPlayer Source Code

wget http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2

Done

Compile

Unpack source distribution

bunzip2 -c MPlayer-1.0rc2.tar.bz2 | tar xf -
cd MPlayer-1.0rc2

Apply my patch for Solaris 10

wget http://softagalleria.net/mplayer/mplayer-1.0rc2.diff
gpatch -p 1 -i mplayer-1.0rc2.diff
chmod +x install

Configure MPlayer without optimizations to improve stability. (If you want to enable optimizations, then you will need to experiment with different versions of GCC.)

bash ./configure --with-extraincdir=/usr/X11R6/include --enable-gui \
  --prefix=/opt/mplayer-1.0rc2 --as=/usr/sfw/bin/gas \
  --with-install=`pwd`/install \
  --disable-mmx --disable-mmxext --disable-sse --disable-sse2 \
  --disable-ssse3 --disable-3dnow --disable-3dnowext \
  --disable-runtime-cpudetection

Compile (~10 min)

time gmake

Done

Install

Login as root, cd to the package directory and install MPlayer

gmake install

Install default skin

wget http://www.mplayerhq.hu/MPlayer/skins/standard-1.9.tar.bz2
bunzip2 -c standard-1.9.tar.bz2 | \
  ( cd /opt/mplayer-1.0rc2/share/mplayer/skins && tar xf - )
( cd /opt/mplayer-1.0rc2/share/mplayer/skins && ln -s standard default )

Install subtitle font

ln -s /usr/openwin/lib/X11/fonts/TrueType/Arial.ttf \
  /opt/mplayer-1.0rc2/share/mplayer/subfont.ttf

You should now be able to play movies as

/opt/mplayer-1.0rc2/bin/gmplayer avifile

Complete

Version History

Feb 29, 2008: Compiled succesfully with Solaris 10 u4.