MPlayer - Introduction:
MPlayer is a movie player for UNIX/Linux and plays most MPEG, VOB, AVI, OGG/OGM, ASF/WMA/WMV, QT/MOV/MP4, RM etc., files, supported by many native, XAnim, RealPlayer, and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, RealMedia, and MPEG-4 (DivX) movies too
Prerequisites:
GNU tools: gmake (make), gcc (compiler), gas (assembler), libiconv etc.,
Note:
- On Solaris SPARC, we need the GNU C/C++ Compiler; it does not matter if GNU C/C++ compiler is configured with or without the GNU assembler
- On Solaris x86, we need the GNU assembler and the GNU C/C++ compiler, configured to use the GNU assembler. The MPlayer code on the x86 platform makes heavy use of MMX, SSE and 3DNOW! instructions that cannot be compiled using Sun's assembler /usr/ccs/bin/as
- Error message from configure on a Solaris x86 system using GCC without GNU assembler
:
% configure
...
Checking assembler (/usr/ccs/bin/as) ... , failed
Please upgrade(downgrade) binutils to 2.10.1...
- Typical error we get when building with a GNU C compiler that does not use GNU assembler (gas):
% gmake
...
gcc -c -Iloader -Ilibvo -O4 -march=i686 -mcpu=i686 -pipe -ffast-math
-fomit-frame-pointer -I/usr/local/include -o mplayer.o mplayer.c
Assembler: mplayer.c
"(stdin)", line 3567 : Illegal mnemonic
"(stdin)", line 3567 : Syntax error
... more "Illegal mnemonic" and "Syntax error" errors ...
Building MPlayer- Download the latest source from http://www.mplayerhq.hu/homepage/design7/dload.html and extract the files
- Check the PATH and make sure that GNU tools are available in PATH
./configure --prefix=<installation directory for mplayer> --as=gas
in the directory where you extracted the files. This is where you see the file "configure" and "src" directory
This step creates a bunch of Makefile(s) in different folders with the information that we supplied during "configure"gmake
It compiles the code and creates the executables and shared objects or static libraries (depending on options supplied to configure)
- Finally,
gmake install
This command installs the mplayer, dependencies in appropriate places. You may have to use the Sun audio driver with the -ao sun
option for sound
eg., Playing an mpeg-1 file called Matrix.mpgmplayer -ao sun Matrix.mpg
Suggested Reading:
- MPlayer's documentation http://www.mplayerhq.hu/DOCS/HTML/en/index.html &
- MPlayer documentation for Solaris port: http://www.mplayerhq.hu/DOCS/HTML/en/solaris.html