#### Beyond Linux® From Scratch (systemd Edition) - Version 11.1

### Chapter 44. Video Utilities

- Prev

  FFmpeg-4.4.1

- Next

  Transcode-1.1.7

- Up
- Home

# MPlayer-export-2021-07-29

## Introduction to MPlayer

MPlayer is a powerful audio/video player controlled via the command line or a graphical interface that is able to play almost every popular audio and video file format. With supported video hardware and additional drivers, MPlayer can play video files without an X Window System installed.

### Note

The latest “stable” version was released in April 2019. That version no longer builds properly with the latest build tools and system libraries. The version below is a snapshot that may not be available on the upstream server but was uploaded to our file server. If you want to test a later version, check http://www.mplayerhq.hu/MPlayer/releases/.

This package is known to build and work properly using an LFS-11.1 platform.

### Package Information

- Download (HTTP): https://anduin.linuxfromscratch.org/BLFS/mplayer/mplayer-export-2021-07-29.tar.bz2

- Download MD5 sum: 887fa9fce21feecbe0f43388d49f4a93

- Download size: 5.7 MB

- Estimated disk space required: 207 MB

- Estimated build time: 0.4 SBU (Using parallelism=4)

### Additional Downloads

Skins

- GUI skin (HTTP): http://www.mplayerhq.hu/MPlayer/skins/Clearlooks-2.0.tar.bz2

- GUI skin (FTP): ftp://ftp.mplayerhq.hu/MPlayer/skins/Clearlooks-2.0.tar.bz2

- Skin MD5 sum: c82d4dbd7f0c36dfecd63dff972807c5

- Skin size: 34 KB

- Alternative skins: https://www.mplayerhq.hu/MPlayer/skins/

### Note

Skins are only required in order to use the Gtk+ 2 user interface.

### MPlayer Dependencies

#### Required

yasm-1.3.0

#### Recommended

FFmpeg-4.4.1, GTK+-2.24.33, and libvdpau-va-gl-0.4.0

#### Optional Input Drivers and Libraries

CDParanoia-III-10.2, libcdio-2.1.0 (to identify and play CDs), libdvdread-6.1.2, libdvdnav-6.1.1, libdvdcss-1.4.3, Samba-4.15.5, libbluray, LIVE555 Streaming Media, RTMPDump, TiVo vstream client, and XMMS

#### Optional Audio Output Drivers and Libraries

ALSA-1.2.6, PulseAudio-15.0, SDL-1.2.15, JACK, NAS, and OpenAL

#### Optional Video Output Drivers and Libraries

AAlib-1.4rc5, giflib-5.2.1, libjpeg-turbo-2.1.2, libmng-2.0.3, libpng-1.6.37, OpenJPEG1 DirectFB, libcaca, and SVGAlib

#### Optional CODECs

FAAC-1_30, FAAD2-2_10_0, LAME-3.100, liba52-0.7.4, libdv-1.0.0, libmad-0.15.1b, libmpeg2-0.5.1, libtheora-1.1.1, libvpx-1.11.0, LZO-2.10, mpg123-1.29.3, Speex-1.2.0, XviD-1.3.7, x264-20220219, CrystalHD, Dirac, GSM, iLBC, libdca, libnut, libmpcdec, OpenCore Adaptive Multi Rate, Schroedinger, Tremor, and TwoLAME

#### Optional Miscellaneous Dependencies

Fontconfig-2.13.1, FreeType-2.11.1, FriBidi-1.0.11, GnuTLS-3.7.3, Opus-1.3.1, and UnRar-6.1.4; libxslt-1.1.35, docbook-xml-4.5 and docbook-xsl-1.79.2 (all three required to build the HTML documentation); and Enca, libbs2b, and LIRC (and LIRC Client Daemon)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/mplayer

## Installation of MPlayer

###

#### Main MPlayer Installation

### Note

The package maintainers recommend building without any optimizations.

You may wish to examine the output from ./configure --help to find out what additional parameters to configure are needed to include the dependencies you have installed on your system.

Install MPlayer by running the following commands:

    ./configure --prefix=/usr                 \
                --confdir=/etc/mplayer        \
                --enable-dynamic-plugins      \
                --disable-libmpeg2-internal   \
                --disable-ffmpeg_a            \
                --enable-menu                 \
                --enable-runtime-cpudetection \
                --enable-gui                  &&
    make

If you wish to build the HTML documentation, issue the following command:

    make doc

This package does not come with a test suite.

Now, as the `root` user:

    make install  &&
    ln -svf ../icons/hicolor/48x48/apps/mplayer.png \
            /usr/share/pixmaps/mplayer.png

To install the HTML documentation, issue the following commands as the `root` user:

    install -v -m755 -d /usr/share/doc/mplayer-export-2021-07-29 &&
    install -v -m644    DOCS/HTML/en/* \
                        /usr/share/doc/mplayer-export-2021-07-29

You will only need `codecs.conf` 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 as the `root` user:

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

You may alternatively want to copy all the default configuration files to `/etc/mplayer` for future reference or more customization ability. As the `root` user:

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

###

#### Skin Installation (Optional)

To enable the Gtk+ 2 frontend of MPlayer, you'll need to install at least one skin. Extract the desired skin and create the default location (as the `root` user):

    tar -xvf  ../Clearlooks-2.0.tar.bz2 \
        -C    /usr/share/mplayer/skins &&
    ln  -sfvn Clearlooks /usr/share/mplayer/skins/default

### Note

This package installs icon files into the `/usr/share/icons/hicolor` hierarchy and desktop files into the `/usr/share/applications` hierarchy. You can improve system performance and memory usage by updating `/usr/share/icons/hicolor/index.theme` and `/usr/share/applications/mimeinfo.cache`. To perform the update you must have GTK+-2.24.33 or GTK+-3.24.31 installed (for the icon cache) and desktop-file-utils-0.26 (for the desktop cache) and issue the following commands as the `root` user:

    gtk-update-icon-cache -qtf /usr/share/icons/hicolor &&
    update-desktop-database -q

## Command Explanations

`--enable-gui`: This option builds the GUI interface into mplayer.

`--enable-menu`: This option is set to enable the on-screen display.

`--enable-runtime-cpudetection`: This option makes MPlayer run with a generic CPU type, preventing optimizations that may cause runtime problems.

`--disable-ffmpeg_a`: You can use this option if you have installed FFmpeg-4.4.1. Dynamically linking to a system installed FFmpeg makes MPlayer and Mencoder about 9MB smaller.

`--disable-libmpeg2-internal`: This option makes MPlayer run with a system version of libmpeg2.

`--language-doc="`<lang>`"`: This switch sets the language used for the documentation. Use ./configure --help for more information.

`--language-man="`<lang>`"`: This switch sets the language used for the man pages. Use ./configure --help for more information.

`--language-msg="`<lang>`"`: This switch sets the language used for messages and the GUI. Use ./configure --help for more information

`--language="`<lang>`"`: This switch sets the default language used. Use ./configure --help for more information.

### Note

Specific options override --language. You can pass a list of languages separated by whitespace or commas instead of a single language. Nonexisting translations will be dropped from each list. All documentation and man page translations available in the list will be installed, for the messages the first available translation will be used. The value "all" will activate all translations. The LINGUAS environment variable is honored. In all cases the fallback is English. Values listed by ./configure --help are not all available, as would normally be expected. You need to build test.

## Configuring MPlayer

###

#### Config Files

`/etc/mplayer/*` and `~/.mplayer/*`

### Note

To play a DVD, it may be useful to ensure a /dev/dvd device is created. You may need to set this up as described in the section called “Devices for DVD Drives”.

###

#### 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 MPlayer GUI. Any configuration changes made in the GUI will be saved in the user's `~/.mplayer` directory.

## Contents

Installed Programs: gmplayer, mplayer and mencoder
Installed Libraries: None
Installed Directories: /etc/mplayer, /usr/share/doc/mplayer-export-2021-07-29 and /usr/share/mplayer

### Short Descriptions

gmplayer | is a symlink to mplayer which brings up the GTK+ 2 frontend of MPlayer
mplayer | is the main MPlayer video player
mencoder | is a powerful command line video decoding, encoding and filtering tool that is useful for (amongst other things) ripping DVDs to files on your hard disk (see /usr/share/doc/mplayer-export-2021-07-29/mencoder.html)

Last updated on

- Prev

  FFmpeg-4.4.1

- Next

  Transcode-1.1.7

- Up
- Home