Beyond Linux From Scratch - Version 6.0

Chapter 39. Video utilities

MPlayer-1.0pre6a

Introduction to MPlayer

The MPlayer package contains an
audio/video player controlled via the command line or a graphical
interface which is able to play almost every popular audio and
video file format and CODEC
(COder/DECoder, also COmpressor/DECompressor). With supported video
hardware and additional drivers, MPlayer can play video files without an
X window system installed.

For MPlayer general information
and available features, including a full list of file formats,
CODECs and output devices supported by
MPlayer, visit the MPlayer web site.

Optional
CODECs

Installation of MPlayer

CODEC installation (optional)

If you downloaded any proprietary CODECs (which can provide support for additional
audio and video formats such as Real, Indeo and QuickTime),
extract them to /usr/lib/mplayer/codecs
using the following commands as the root user (substitute and/or
add different CODEC filenames, if
necessary):

If you installed any CODECs, ensure
you add --with-codecsdir=/usr/lib/mplayer/codecs to the
configure script.

GUI installation (optional)

To enable building the GUI version
of MPlayer (requires GTK+-1.2.10), add --enable-gui to the configure script. You'll also need to
extract at least one skin. Extract the desired skin and create
the default location (as the root user):

MPlayer can build a shared
post-processing library which other packages can link to. Doing
this means that MPlayer must
also link dynamically to this library instead of the default
statically linked method. If you desire to build the shared
library, add --enable-shared-pp to the
configure script,
then execute the following command after the commands above:

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. Ensure any changes you make to codecs.conf achieve the desired results, as
incorrect entries in this file have been known to cause errors
and render the player unusable. If necessary, create the file
using the following command.

install -m644 etc/codecs.conf /etc/mplayer

You may also want to copy all the default configuration files to
/etc/mplayer for future reference or
more customization ability.

install -m644 etc/*.conf /etc/mplayer

OSD and subtitles font installation
(required if --enable-menu was passed to
configure)

The recommended method to set up a font for MPlayer is to link a TTF file to your ~/.mplayer directory. A link should be created in
each user's home directory who may use MPlayer. For example:

Replace [dvd drive] with
whatever device is appropriate, for example 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

Configuring MPlayer

Config
files

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

Configuration
information

Typically, there's no configuration required for the system-wide
files in /etc/mplayer (in fact, this
directory is empty unless you copied the default files as
mentioned above). Configuration can be accomplished by choosing
the configuration button located on the MPlayerGUI.
Any configuration changes made here will be copied to the user's
~/.mplayer directory.