天天看点

Introduction to MPlayer

Introduction to MPlayer

http://www.linuxfromscratch.org/blfs/view/svn/multimedia/mplayer.html

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 Systeminstalled.

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

Package Information

  • Download (HTTP): http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.1.tar.xz
  • Download (FTP): ftp://ftp.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.1.tar.xz
  • Download MD5 sum: 39dd55f30eb5403f219a606e79a6648a
  • Download size: 11 MB
  • Estimated disk space required: 183 MB (120 MB using system-installed FFMpeg)
  • Estimated build time: 4 SBU (1.5 SBU using system-installed FFMpeg)

Additional Downloads

  • Required patch: http://www.linuxfromscratch.org/patches/blfs/svn/MPlayer-1.1.1-giflib_fixes-1.patch
  • Required patch: http://www.linuxfromscratch.org/patches/blfs/svn/MPlayer-1.1.1-live_fixes-1.patch

Skins

  • GUI skin (HTTP): http://www.mplayerhq.hu/MPlayer/skins/Clearlooks-1.5.tar.bz2
  • GUI skin (FTP): ftp://ftp.mplayerhq.hu/MPlayer/skins/Clearlooks-1.5.tar.bz2
  • Skin MD5 sum: 6b046a78fb15b243dc1eb5884276a750
  • Skin size: 40 KB
  • Alternative skins: http://www1.mplayerhq.hu/MPlayer/skins/
Introduction to MPlayer

Note

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

MPlayer Dependencies

Required

yasm-1.2.0

Recommended

GTK+-2.24.20 and libvdpau-0.7

Optional Input Drivers and Libraries

CDParanoia-III-10.2, Samba-4.0.8, libdvdread-4.2.0, libdvdnav-4.2.0, libdvdcss-1.2.13, libbluray, libcdio, LIVE555 Streaming Media,RTMPDump, TiVo vstream client and XMMS

Optional Audio Output Drivers and Libraries

ALSA-1.0.27, EsounD-0.2.41, PulseAudio-4.0, SDL-1.2.15, JACK, OpenAL and NAS

Optional Video Output Drivers and Libraries

AAlib-1.4rc5, DirectFB, giflib-5.0.4, libcaca, libjpeg-turbo-1.3.0, libmng-1.0.10, libpng-1.6.3, OpenJPEG-1.5.1 and SVGAlib

Optional CODECs

FFmpeg-1.2.1, libmad-0.15.1b, LZO-2.06, Speex-1.2rc1, libtheora-1.1.1, mpg123-1.15.4, liba52-0.7.4, FAAC-1.28, FAAD2-2.7, libdv-1.0.0,XviD-1.3.2, libvpx-1.1.0, LAME-3.99.5, TwoLAME, GSM, libdca, libmpcdec, OpenCore Adaptive Multi Rate, CrystalHD, x264, Dirac,Schroedinger and libnut

Optional Miscellaneous Dependencies

Enca, Fontconfig-2.10.93, FreeType-2.5.0.1, FriBidi-0.19.5, LADSPA, libbs2b, LIRC (and LIRC Client Daemon), UnRar-5.0.10, and libxslt-1.1.28, docbook-xml-4.5 and docbook-xsl-1.78.1 (all three required to build the HTML documentation)

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

Installation of MPlayer

Main MPlayer Installation

Introduction to MPlayer

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:

patch -Np1 -i ../MPlayer-1.1.1-giflib_fixes-1.patch &&
patch -Np1 -i ../MPlayer-1.1.1-live_fixes-1.patch &&
sed -i 's:libsmbclient.h:samba-4.0/&:' configure stream/stream_smb.c &&
./configure --prefix=/usr            \
            --confdir=/etc/mplayer   \
            --enable-dynamic-plugins \
            --enable-menu            \
            --enable-gui             &&
make
      

If you wish to rebuild the chunked HTML documentation and build a non-chunked HTML version of the docs, issue the following command:

This package does not come with a test suite.

Now, as the 

root

 user:

To install the HTML documentation, issue the following commands as the 

root

 user:

install -v -m755 -d /usr/share/doc/mplayer-1.1.1 &&
install -v -m644    DOCS/HTML/en/* \
                    /usr/share/doc/mplayer-1.1.1
      

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:

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:

Introduction to MPlayer

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.20 or GTK+-3.8.2 installed (for the icon cache) and desktop-file-utils-0.21 (for the desktop cache) and issue the following commands as the 

root

 user:

gtk-update-icon-cache &&
update-desktop-database
      

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-1.5.tar.bz2 \
       -C /usr/share/mplayer/skins &&
ln -sfv Clearlooks /usr/share/mplayer/skins/default
      

Command Explanations

--enable-gui

: This option builds the GUI interface into mplayer.

--enable-menu

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

--disable-ffmpeg_a

: You can use this option if you have installed FFmpeg-1.2.1. MPlayer includes a copy of the FFmpeg source and without this option it will statically compile the included version of FFmpeg into itself. Dynamically linking to a system installed FFmpeg makes MPlayer and Mencoder about 9MB smaller. If MPlayer exhibits unstable behavior linked to a system installed FFmpeg, try recompiling MPlayer without this option (it is always more thoroughly tested with the included FFmpeg).

Configuring MPlayer

Config Files

/etc/mplayer/*

 and 

~/.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 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/lib/mplayer, /usr/share/mplayer and /usr/share/doc/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-1.1.1/mencoder.html)