MPlayer-1.0pre4

Introduction to MPlayer

The MPlayer package contains an audio/video player that is able to play almost every audio and video CODEC and can be controlled via the command line or a GUI.

Package information

Additional downloads

[Note]

Note

The additional downloads are not required to build and use MPlayer. You can find many more CODECs, skins and fonts at MPlayer's homepage.

Installation of MPlayer

If you downloaded any proprietary CODECs, extract them at some system-wide location (like /usr/lib/mplayer/codecs) and add --with-codecsdir=[location] option to the configure script.

[Note]

Note

The package maintainers recommend building without any optimizations.

Install MPlayer by running the following commands:

./configure --prefix=/usr --confdir=/etc/mplayer \
    --enable-largefiles --enable-shared-pp &&
make &&
make install &&
make -C libavcodec/libpostproc install

You will need codecs.conf only if you want to change its properties, as the main binary contains an internal copy of it:

cp etc/codecs.conf /etc/mplayer

The GUI version of MPlayer requires a skin. Extract the default one to the recommended location:

install -d /usr/share/mplayer/Skin &&
tar xjvf ../default-1.8.tar.bz2 -C /usr/share/mplayer/Skin

Installation for DVD playback

If you want DVD playback with MPlayer, you need to make a link from your DVD drive to /dev/dvd:

ln -s /dev/[dvd drive] /dev/dvd

Replace [dvd drive] with whatever device is appropriate, for example /dev/hdc. If you don't know which device to choose, type:

dmesg | grep DVD

It should result in an output like:

hdc: Pioneer DVD-ROM ATAPIModel DVD-114 0110,
ATAPI CD/DVD-ROM drive

If you have SCSI-Emulation activated for the drives, you'll need to get the right SCSI-device. Every CD/DVD-ROM drive is mapped in the same order as in IDE devices to the devices named /dev/scd0, /dev/scd1 and so on.

Command explanations

--enable-shared-pp: This enables the building of a shared libpostproc (library for post processing, featuring filters like sharpen).

--enable-gui: This switch tells MPlayer to compile the GUI code (requires GTK+-1.2.10).

--enable-menu: This switch enables the new menu support. It's like an OSD, but you can also run a shell with it.

Configuring MPlayer

Config files

/etc/mplayer/*, ~/.mplayer/*

Configuration Information

If you wish to utilize a FreeType font, you need to link a TTF file to your ~/.mplayer directory. For example:

ln -sf /usr/X11R6/lib/X11/fonts/TTF/luxisri.ttf ~/.mplayer/subfont.ttf

otherwise

tar xjvf ../font-arial-iso-8859-1.tar.bz2 -C /usr/share/mplayer/font &&
cd /usr/share/mplayer/font &&
ln -sf font-arial-iso-8859-1/font-arial-[font size]-iso-8859-1/* .

You can chose your font size of 14, 18, 24 or 28.

Set the proper ownership for CODECs, skins and fonts:

chown -R root:root [CODECs location] &&
chown -R root:root /usr/share/mplayer

Optionally, set up the GUI with the following commands:

cat > /etc/mplayer/mplayer.conf << "EOF"
gui = yes
skin = default
EOF

The first line, gui = yes, will make MPlayer start in GUI mode automatically. If you want to decide whether to start in GUI mode or not, leave that line out and start mplayer with -gui or as gmplayer (e.g., when starting from a Window Manager menu or command prompt). Note that the main configuration file is called config if it is placed in the ~/.mplayer directory.

Contents

The MPlayer package contains mplayer, gmplayer and mencoder.

Description

mplayer

mplayer manages the input formats, the CODECs and the output formats to play video files, DVDs, (S)VCDs or network streams containing audio and/or video information on your system.

Examples:

mplayer -fs blfs.avi
mplayer -vo fbdev -fb /dev/fb0 dvd://1 -aid 128 -sub en -framedrop
mplayer -fs vcd://1    # works both for VCDs and SVCDs
mplayer http://www.students.uni-marburg.de/~Klossa/hapkidofight_lo.mpg

For further information, look at the very good documentation included with the package in the source tree subdirectory DOCS/.

gmplayer

gmplayer is MPlayer with a graphical user interface.

mencoder

mencoder is used to encode any MPlayer playable movie to DivX4, XviD or any CODEC in libavcodec with PCM/MP3/VBRMP3 audio.

Example:

rm frameno.avi
mencoder -dvd 1 -aid 128 -ovc frameno -oac mp3lame \
-lameopts vbr=3 -o frameno.avi

# mencoder should output bitrates for average encodings
# now, choose one you like best! In the following lines,
# replace <bitrate> and <name.avi> with statements of your
# personal liking.

mencoder -dvd 1 -aid 128 -oac copy -ovc lavc \
-lavcopts vcodec=mpeg4:vpass=1:vhq:vbitrate=<bitrate> -o <name.avi>
mencoder -dvd 1 -aid 128 -oac copy -ovc lavc \
-lavcopts vcodec=mpeg4:vpass=2:vhq:vbitrate=<bitrate> -o <name.avi>
mencoder -forceidx <name.avi>