<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

<!--  <!ENTITY mplayer-download-http "http://www.mplayerhq.hu/MPlayer/releases/MPlayer-&mplayer-version;.tar.xz">
  <!ENTITY mplayer-download-ftp "ftp://ftp.mplayerhq.hu/MPlayer/releases/MPlayer-&mplayer-version;.tar.xz">-->
  <!ENTITY mplayer-download-http "&sources-anduin-other-http;/mplayer-&mplayer-version;.tar.xz">
  <!ENTITY mplayer-download-ftp " ">
  <!ENTITY mplayer-md5sum        "466277d34edee7facd456cddfca10171">
  <!ENTITY mplayer-size          "12 MB">
  <!ENTITY mplayer-buildsize     "248 MB<!-- (120 MB using system-installed FFMpeg)-->">
  <!ENTITY mplayer-time          "3.6 SBU<!-- (1.5 SBU using system-installed FFMpeg)-->">

  <!ENTITY mplayer-skin          "Clearlooks-1.6">
  <!ENTITY mplayer-skin-download-http "http://www.mplayerhq.hu/MPlayer/skins/&mplayer-skin;.tar.bz2">
  <!ENTITY mplayer-skin-download-ftp "ftp://ftp.mplayerhq.hu/MPlayer/skins/&mplayer-skin;.tar.bz2">
  <!ENTITY mplayer-skin-md5sum   "f52b7592b8881021ec7ccb56ec455fba">
  <!ENTITY mplayer-skin-size     "40 KB">
]>

<sect1 id="mplayer" xreflabel="MPlayer-&mplayer-version;">
  <?dbhtml filename="mplayer.html"?>

  <sect1info>
    <othername>$LastChangedBy: bdubbs $</othername>
    <date>$Date: 2015-02-27 19:21:33 -0500 (Fri, 27 Feb 2015) $</date>
  </sect1info>

  <title>MPlayer-&mplayer-version;</title>

  <indexterm zone="mplayer">
    <primary sortas="a-MPlayer">MPlayer</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to MPlayer</title>

    <para>
      <application>MPlayer</application> 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, <application>MPlayer</application>
      can play video files without an <application>X Window System</application>
      installed.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&mplayer-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&mplayer-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &mplayer-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &mplayer-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &mplayer-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &mplayer-time;
        </para>
      </listitem>
    </itemizedlist>

    <para><application>MPlayer</application> developers recommend using current
    snapshots. The source tarball shown above was created by the BLFS team by
    downloading an <application>MPlayer</application> snapshot and an
    <application>ffmpeg</application> snapshot. To form the final tarball, the
    <application>MPlayer</application> tarball is uncompressed and the
    directory renamed. Then, the <application>ffmpeg</application> snapshot is
    uncompressed into this directory, which is in turn compressed into the
    tar.xz final format. BLFS made no other changes to the existing source
    files. The <application>ffmpeg</application> snapshot is required, or a git
    checkout will be requested at configure time. This is not desired, because
    both should be obtained at the same date.</para>

    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
<!--
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Required patch:
          <ulink url="&patch-root;/MPlayer-&mplayer-version;-giflib_fixes-1.patch"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Required patch:
          <ulink url="&patch-root;/MPlayer-&mplayer-version;-live_fixes-1.patch"/>
        </para>
      </listitem>
    </itemizedlist>-->

    <itemizedlist spacing='compact'>
      <title>Skins</title>
      <listitem>
        <para>
          GUI skin (HTTP): <ulink url="&mplayer-skin-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          GUI skin (FTP): <ulink url="&mplayer-skin-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Skin MD5 sum: &mplayer-skin-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Skin size: &mplayer-skin-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Alternative skins:
          <ulink url="http://www.mplayerhq.hu/MPlayer/skins/"/>
        </para>
      </listitem>
    </itemizedlist>

    <note>
      <para>
        Skins are only required in order to use the
        <application>Gtk+ 2</application> user interface.
      </para>
    </note>

    <bridgehead renderas="sect3">MPlayer Dependencies</bridgehead>

    <bridgehead renderas="sect4">Required</bridgehead>
    <para role="required">
      <xref linkend="yasm"/>
    </para>

    <bridgehead renderas="sect4">Recommended</bridgehead>
    <para role="recommended">
      <xref linkend="gtk2"/> and
      <xref linkend="libvdpau"/>
    </para>

    <bridgehead renderas="sect4">Optional Input Drivers and Libraries</bridgehead>
    <para role="optional">
      <xref linkend="cdparanoia"/>,
      <xref linkend="libdvdread"/>,
      <xref linkend="libdvdnav"/>,
      <xref linkend="libdvdcss"/>,
      <xref linkend="samba"/>,
      <ulink url="http://www.videolan.org/developers/libbluray.html">libbluray</ulink>,
      <ulink url="http://www.gnu.org/software/libcdio/">libcdio</ulink>,
      <ulink url="http://www.live555.com/">LIVE555 Streaming Media</ulink>,
      <ulink url="http://rtmpdump.mplayerhq.hu/">RTMPDump</ulink>,
      <ulink url="http://code.google.com/p/vstream-client/">TiVo vstream client</ulink>, and
      <ulink url="http://www.xmms.org/">XMMS</ulink>
    </para>

    <bridgehead renderas="sect4">Optional Audio Output Drivers and Libraries</bridgehead>
    <para role="optional">
      <xref linkend="alsa"/>,
      <xref linkend="pulseaudio"/>,
      <xref linkend="sdl"/>,
      <ulink url="http://jackaudio.org/">JACK</ulink>,
      <ulink url="http://www.radscan.com/nas.html">NAS</ulink>, and
      <ulink url="http://kcat.strangesoft.net/openal-releases/">OpenAL</ulink>
    </para>

    <bridgehead renderas="sect4">Optional Video Output Drivers and Libraries</bridgehead>
    <para role="optional">
      <xref linkend="aalib"/>,
      <xref linkend="giflib"/>,
      <xref linkend="libjpeg"/>,
      <xref linkend="libmng"/>,
      <xref linkend="libpng"/>,
      <xref linkend="openjpeg"/>,
      <ulink url="http://www.directfb.org/">DirectFB</ulink>,
<!--      <ulink url="http://sam.zoy.org/projects/libcaca/">libcaca</ulink>, and-->
      <ulink url="http://pkgs.fedoraproject.org/repo/pkgs/libcaca/">libcaca</ulink>, and
      <ulink url="http://www.svgalib.org/">SVGAlib</ulink>
    </para>

    <bridgehead renderas="sect4">Optional CODECs</bridgehead>
    <para role="optional">
      <!-- includes its own version of FFmpeg which is the recommended one by
      the devs <xref linkend="ffmpeg"/>, -->
      <xref linkend="faac"/>,
      <xref linkend="faad2"/>,
      <xref linkend="lame"/>,
      <xref linkend="liba52"/>,
      <xref linkend="libdv"/>,
      <xref linkend="libmad"/>,
      <xref linkend="libmpeg2"/>,
      <xref linkend="libtheora"/>,
      <xref linkend="libvpx"/>,
      <xref linkend="lzo"/>,
      <xref linkend="mpg123"/>,
      <xref linkend="speex"/>,
      <xref linkend="xvid"/>,
      <xref linkend="x264"/>,
      <ulink url="http://www.broadcom.com/support/crystal_hd/">CrystalHD</ulink>,
<!--      <ulink url="http://diracvideo.org/download/dirac-research/">Dirac</ulink>,-->
      <ulink url="http://sourceforge.net/projects/dirac/">Dirac</ulink>,
      <ulink url="http://www.quut.com/gsm/">GSM</ulink>,
      <ulink url="http://www.ilbcfreeware.org/">iLBC</ulink>,
      <ulink url="http://www.videolan.org/developers/libdca.html">libdca</ulink>,
      <ulink url="http://wiki.multimedia.cx/index.php?title=NUT">libnut</ulink>,
      <ulink url="http://www.musepack.net/">libmpcdec</ulink>,
      <ulink url="http://sourceforge.net/projects/opencore-amr/">OpenCore
      Adaptive Multi Rate</ulink>,
<!--      <ulink url="http://diracvideo.org/download/schroedinger/">Schroedinger</ulink>,-->
      <ulink url="http://sourceforge.net/projects/schrodinger/">Schroedinger</ulink>,
      <ulink url="http://wiki.xiph.org/Tremor">Tremor</ulink>, and
      <ulink url="http://sourceforge.net/projects/twolame/">TwoLAME</ulink>
    </para>

    <bridgehead renderas="sect4">Optional Miscellaneous Dependencies</bridgehead>
    <para role="optional">
      <xref linkend="fontconfig"/>,
      <xref linkend="freetype2"/>,
      <xref linkend="fribidi"/>,
      <xref linkend="gnutls"/>,
      <xref linkend="openssl"/>,
      <xref linkend="opus"/>, and
      <xref linkend="unrar"/>;
      <xref linkend="libxslt"/>,
      <xref linkend="DocBook"/> and
      <xref linkend="docbook-xsl"/> (all three required to build the HTML documentation); and
      <ulink url="http://cihar.com/software/enca/">Enca</ulink>,
      <ulink url="http://www.ladspa.org/">LADSPA</ulink>,
      <ulink url="http://sourceforge.net/projects/bs2b/">libbs2b</ulink>, and
      <ulink url="http://www.lirc.org/">LIRC</ulink> (and
      <ulink url="http://www.dolda2000.com/~fredrik/lirccd/">LIRC Client Daemon</ulink>)
    </para>

    <para condition="html" role="usernotes">
      User Notes: <ulink url="&blfs-wiki;/mplayer"/>
    </para>
  </sect2>

  <sect2 role="installation">
    <title>Installation of MPlayer</title>

    <sect3>
      <title>Main MPlayer Installation</title>

      <note>
        <para>
          The package maintainers recommend building without any
          optimizations.
        </para>
      </note>

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

      <para>
        Install <application>MPlayer</application> by running the following
        commands:
      </para>

<screen><userinput>sed -i 's:libsmbclient.h:samba-4.0/&amp;:' configure stream/stream_smb.c &amp;&amp;

./configure --prefix=/usr            \
            --confdir=/etc/mplayer   \
            --enable-dynamic-plugins \
            --enable-menu            \
            --enable-gui             &amp;&amp;
make</userinput></screen>

      <para>
        If you wish to build the HTML documentation, issue the
        following command:
      </para>

<screen><userinput>make doc</userinput></screen>

      <para>
        This package does not come with a test suite.
      </para>

      <para>
        Now, as the <systemitem class="username">root</systemitem> user:
      </para>

<screen role="root"><userinput>make install  &amp;&amp;
ln -svf ../icons/hicolor/48x48/apps/mplayer.png \
        /usr/share/pixmaps/mplayer.png</userinput></screen>

      <para>
        To install the HTML documentation, issue the following commands as the
        <systemitem class="username">root</systemitem> user:
      </para>

<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/mplayer-&mplayer-version; &amp;&amp;
install -v -m644    DOCS/HTML/en/* \
                    /usr/share/doc/mplayer-&mplayer-version;</userinput></screen>

      <para>
        You will only need <filename>codecs.conf</filename> if you want to
        change its properties, as the main binary contains an internal copy of
        it. Ensure any changes you make to <filename>codecs.conf</filename>
        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 <systemitem class="username">root</systemitem>
        user:
      </para>

<screen role="root"><userinput>install -v -m644 etc/codecs.conf /etc/mplayer</userinput></screen>

      <para>
        You may alternatively want to copy all the default configuration files
        to <filename class='directory'>/etc/mplayer</filename> for future
        reference or more customization ability. As the
        <systemitem class="username">root</systemitem> user:
      </para>

<screen role="root"><userinput>install -v -m644 etc/*.conf /etc/mplayer</userinput></screen>

    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
      href="../../xincludes/update-icons-and-desktop.xml"/>

    </sect3>

    <sect3>
      <title>Skin Installation (Optional)</title>

      <para>
        To enable the Gtk+ 2 frontend of <application>MPlayer</application>,
        you'll need to install at least one skin. Extract the desired skin and
        create the default location (as the
        <systemitem class="username">root</systemitem> user):
      </para>

<screen role="root"><userinput>tar -xvf  ../&mplayer-skin;.tar.bz2 \
    -C    /usr/share/mplayer/skins &amp;&amp;
ln  -sfvn Clearlooks /usr/share/mplayer/skins/default</userinput></screen>
    </sect3>
  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <command>sed -i 's:libsmbclient.h:samba-4.0 ...</command>: Include
      support for Samba 4.
    </para>

    <para>
      <parameter>--enable-gui</parameter>: This option builds the GUI interface
      into <command>mplayer</command>.
    </para>

    <para>
      <parameter>--enable-menu</parameter>: This option is set to enable the
      on-screen display.
    </para>
<!--Currently broken
    <para>
      <option>-\-disable-ffmpeg_a</option>: You can use this option if you have
      installed <xref linkend="ffmpeg"/>. 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).
    </para>-->

    <para>
      <option>--language-doc="<replaceable>&lt;lang&gt;</replaceable>"</option>:
      This switch enables the language used for the documentation. Use
      <command>./configure --help</command> to find out what additional
      information.
    </para>

    <para>
      <option>--language-man="<replaceable>&lt;lang&gt;</replaceable>"</option>:
      This switch enables the language used for the man pages. Use
      <command>./configure --help</command> to find out what additional
      information.
    </para>

    <para>
      <option>--language-msg="<replaceable>&lt;lang&gt;</replaceable>"</option>:
      This switch enables the language used for the messages and the GUI. Use
      <command>./configure --help</command> to find out what additional
      information.
    </para>

    <para>
      <option>--language="<replaceable>&lt;lang&gt;</replaceable>"</option>:
      This switch defines the default language used. Use <command>./configure
      --help</command> to find out what additional information.
    </para>

      <note>
        <para>
          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 <command>./configure --help</command> are
          not all available, as would normally be expected. You need to build
          test.
        </para>
      </note>

  </sect2>

  <sect2 role="configuration">
    <title>Configuring MPlayer</title>

    <sect3 id="mplayer-config">
      <title>Config Files</title>

      <para>
        <filename>/etc/mplayer/*</filename> and
        <filename>~/.mplayer/*</filename>
      </para>

      <indexterm zone="mplayer mplayer-config">
        <primary sortas="e-AA.mplayer">~/.mplayer/*</primary>
      </indexterm>

      <indexterm zone="mplayer mplayer-config">
        <primary sortas="e-etc-mplayer">/etc/mplayer/*</primary>
      </indexterm>
    </sect3>

    <sect3>
      <title>Configuration Information</title>

      <para>
        Typically, there's no configuration required for the system-wide files
        in <filename class='directory'>/etc/mplayer</filename> (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 <application>MPlayer</application> GUI. Any
        configuration changes made in the GUI will be saved in the user's
        <filename class='directory'>~/.mplayer</filename> directory.
      </para>

    </sect3>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>
          gmplayer, mplayer and mencoder
        </seg>
        <seg>
          None
        </seg>
        <seg>
          /etc/mplayer,
          /usr/share/doc/mplayer-&mplayer-version; and
          /usr/share/mplayer
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="gmplayer">
        <term><command>gmplayer</command></term>
        <listitem>
          <para>
            is a symlink to <command>mplayer</command> which brings up the
            GTK+ 2 frontend of <application>MPlayer</application>.
          </para>
          <indexterm zone="mplayer gmplayer">
            <primary sortas="b-gmplayer">gmplayer</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mplayer-prog">
        <term><command>mplayer</command></term>
        <listitem>
          <para> is the main MPlayer video player.</para>
          <indexterm zone="mplayer mplayer-prog">
            <primary sortas="b-mplayer">mplayer</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mencoder">
        <term><command>mencoder</command></term>
        <listitem>
          <para>
            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-&mplayer-version;/mencoder.html)
          </para>
          <indexterm zone="mplayer mencoder">
            <primary sortas="b-mencoder">mencoder</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
