Installation
A quick installation guide can be found in the README
file. Please read it first and then come back here for the rest of the gory
details.
In this section you will be guided through the compilation and configuration
process of MPlayer. It's not easy, but it won't
necessarily be hard. If you experience a behavior different from this
description, please search through this documentation and you'll find your
answers.
Software requirementsbinutils - recommended version is
2.11.x.
gcc - recommended versions are 2.95
and 3.4+. 2.96 and 3.0.x are known to generate faulty code, 3.1 and
3.2 also had problems, 3.3 some minor ones. On PowerPC, use 4.x.
Xorg/XFree86 - recommended version is
4.3 or later. Make sure the
development packages are installed,
too, otherwise it won't work.
You don't absolutely need X, some video output drivers work without it.
GNU make 3.81
FreeType - 2.0.9 or later is required
for the OSD and subtitles
ALSA - optional, for ALSA audio output
support. At least 0.9.0rc4 is required.
libjpeg -
required for the optional JPEG video output driver
libpng -
required for the optional PNG video output driver
directfb - optional, 0.9.13 or later
required for the directfb video output driver
lame - 3.90 or later is recommended,
necessary for encoding MP3 audio with MEncoder.
zlib - recommended, many codecs use it.
LIVE555 Streaming Media
- optional, needed for some RTSP/RTP streams
cdparanoia - optional, for CDDA support
libxmms - optional, for XMMS input plugin
support. At least 1.2.7 is required.
libsmb - optional, for SMB networking support
libmad
- optional, for fast integer-only MP3 decoding on FPU-less platforms
Features
Decide if you need GUI. If you do, see the GUI
section before compiling.
If you want to install MEncoder (our great
all-purpose encoder), see the
MEncoder section.
If you have a V4L compatible TV tuner card,
and wish to watch/grab and encode movies with
MPlayer,
read the TV input section.
If you have a V4L compatible radio tuner
card, and wish to listen and capture sound with
MPlayer,
read the radio section.
There is a neat OSD Menu support ready to be
used. Check the OSD menu section.
Then build MPlayer:
./configure
make
make install
At this point, MPlayer is ready to use.
Check if you have a codecs.conf file in your home
directory at (~/.mplayer/codecs.conf) left from old
MPlayer versions. If you find one, remove it.
Debian users can build a .deb package for themselves, it's very simple.
Just exec
fakeroot debian/rules binary
in MPlayer's root directory. See
Debian packaging for detailed instructions.
Always browse the output of./configure, and the
configure.log file, they contain information about
what will be built, and what will not. You may also want to view
config.h and config.mak files.
If you have some libraries installed, but not detected by
./configure, then check if you also have the proper
header files (usually the -dev packages) and their version matches. The
configure.log file usually tells you what is missing.
Though not mandatory, the fonts should be installed in order to gain OSD,
and subtitle functionality. The recommended method is installing a TTF
font file and telling MPlayer to use it.
See the Subtitles and OSD section for details.
What about the GUI?
The GUI needs GTK 1.2.x or GTK 2.0 (it isn't fully GTK, but the panels are),
so GTK (and the devel stuff, usually
called gtk-dev) has to be installed.
You can build it by specifying during
./configure. Then, to turn on GUI mode, you have to
execute the gmplayer binary.
As MPlayer doesn't have a skin included, you
have to download one if you want to use the GUI. See the download page.
It should be extracted to the usual system-wide directory ($PREFIX/share/mplayer/skins), or to $HOME/.mplayer/skins.
MPlayer by default looks in these directories
for a directory named default, but
you can use the
option, or the skin=newskin config file directive to use
the skin in the */skins/newskin
directory.
Fonts and OSD
You need to tell MPlayer which font to use to
enjoy OSD and subtitles. Any TrueType font or special bitmap fonts will
work. However, TrueType fonts are recommended as they look far better,
can be properly scaled to the movie size and cope better with different
encodings.
TrueType fonts
There are two ways to get TrueType fonts to work. The first is to pass
the option to specify a TrueType font file on
the command line. This option will be a good candidate to put in your
configuration file (see the manual page for details).
The second is to create a symlink called subfont.ttf
to the font file of your choice. Either
ln -s /path/to/sample_font.ttf ~/.mplayer/subfont.ttf
for each user individually or a system-wide one:
ln -s /path/to/sample_font.ttf $PREFIX/share/mplayer/subfont.ttf
If MPlayer was compiled with
fontconfig support, the above methods
won't work, instead expects a
fontconfig font name
and defaults to the sans-serif font. Example:
mplayer -font 'Bitstream Vera Sans'anime.mkv
To get a list of fonts known to
fontconfig,
use fc-list.
bitmap fonts
If for some reason you wish or need to employ bitmap fonts, download a set
from our homepage. You can choose between various
ISO fonts
and some sets of fonts
contributed by users
in various encodings.
Uncompress the file you downloaded to
~/.mplayer or
$PREFIX/share/mplayer.
Then rename or symlink one of the extracted directories to
font, for example:
ln -s ~/.mplayer/arial-24 ~/.mplayer/font
ln -s $PREFIX/share/mplayer/arial-24 $PREFIX/share/mplayer/font
Fonts should have an appropriate font.desc file
which maps Unicode font positions to the actual code page of the
subtitle text. Another solution is to have UTF-8-encoded subtitles
and use the option or give the subtitles
file the same name as your video file with a .utf
extension and have it in the same directory as the video file.
OSD menuMPlayer has a completely user-definable
OSD Menu interface.
the Preferences menu is currently UNIMPLEMENTED!
Installation
compile MPlayer by passing the
to ./configure
make sure you have an OSD font installed
copy etc/menu.conf to your
.mplayer directory
copy etc/input.conf to your
.mplayer directory, or to the
system-wide MPlayer config dir (default:
/usr/local/etc/mplayer)
check and edit input.conf to enable menu movement keys
(it is described there).
start MPlayer by the following example:
mplayer -menu file.avi
push any menu key you defined
Codec installationXvidXvid is a free software MPEG-4 ASP
compliant video codec. Note that Xvid is not necessary to decode Xvid-encoded
video. libavcodec is used by
default as it offers better speed.
Installing Xvid
Like most open source software, it is available in two flavors:
official releases
and the CVS version.
The CVS version is usually stable enough to use, as most of the time it
features fixes for bugs that exist in releases.
Here is what to do to make Xvid
CVS work with MEncoder:
cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid logincvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcorecd xvidcore/build/generic./bootstrap.sh && ./configure
You may have to add some options (examine the output of
./configure --help).
make && make install
Recompile MPlayer.
x264x264
is a library for creating H.264 video.
MPlayer sources are updated whenever
an x264 API change
occurs, so it is always suggested to use
MPlayer from Subversion.
If you have a GIT client installed, the latest x264
sources can be gotten with this command:
git clone git://git.videolan.org/x264.git
Then build and install in the standard way:
./configure && make && make install
Now rerun ./configure for
MPlayer to pick up
x264 support.
AAC
An open source AAC decoder called FAAD2 is available from
.
MPlayer includes a copy of it in its source tree.
If you want to use the external library instead, install it and pass
to ./configure.
FAAD2 binaries are not available from audiocoding.com, but you can (apt-)get
Debian packages from
Christian Marillat,
Mandrake/Mandriva RPMs from the P.L.F
and Fedora RPMs from Livna.
If you choose to build from source, you do not need all of FAAD2 to decode
AAC files, libfaad is enough. Build it like this:
cd faad2/
sh bootstrap
./configure
cd libfaad
make
make install
AMR
Adaptive Multi-Rate speech codec is used in third generation (3G) mobile
phones.
Reference implementation is available from
The 3rd Generation Partnership Project
(free for private use).
To enable support, download and install support libraries for
AMR-NB and AMR-WB
following the instructions on that page. Recompile MPlayer afterwards.
XMMSMPlayer can use XMMS input
plugins to play many file formats. There are plugins for SNES game tunes, SID
tunes (from Commodore 64), many Amiga formats, .xm, .it, VQF, Musepack, Bonk,
shorten and many others. You can find them at the
XMMS input plugin page.
For this feature you need to have XMMS and compile
MPlayer with
./configure --enable-xmms.
RTC
There are three timing methods in MPlayer.
To use the old method, you don't have to do
anything. It uses usleep() to tune
A/V sync, with +/- 10ms accuracy. However sometimes the sync has to be
tuned even finer.
The new timer code uses the RTC (RealTime
Clock) for this task, because it has precise 1ms timers.
The option enables it,
but a properly set up kernel is required.
If you are running kernel 2.4.19pre8 or later you can adjust the maximum RTC
frequency for normal users through the /proc
file system. Use one of the following two commands to
enable RTC for normal users:
echo 1024 > /proc/sys/dev/rtc/max-user-freqsysctl dev/rtc/max-user-freq=1024
You can make this setting permanent by adding the latter to
/etc/sysctl.conf.
You can see the new timer's efficiency in the status line.
The power management functions of some notebook BIOSes with speedstep CPUs
interact badly with RTC. Audio and video may get out of sync. Plugging the
external power connector in before you power up your notebook seems to help.
In some hardware combinations (confirmed during usage of non-DMA DVD drive
on an ALi1541 board) usage of the RTC timer causes skippy playback. It's
recommended to use the third method in these cases.
The third timer code is turned on with the
option. It has the efficiency of the RTC, but it
doesn't use RTC. On the other hand, it requires more CPU.