From: <ÓÉ Microsoft Internet Explorer 5 ±£´æ>
Subject: MPlayer - The Movie Player
Date: Mon, 20 Aug 2007 16:30:52 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
	boundary="----=_NextPart_000_0000_01C7E347.798AC830";
	type="text/html"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896

This is a multi-part message in MIME format.

------=_NextPart_000_0000_01C7E347.798AC830
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html

=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>MPlayer - The Movie Player</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dutf-8"><LINK=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/default.css" =

type=3Dtext/css rel=3Dstylesheet>
<META content=3D"MSHTML 6.00.2800.1595" name=3DGENERATOR></HEAD>
<BODY text=3Dblack vLink=3D#840084 aLink=3D#0000ff link=3D#0000ff =
bgColor=3Dwhite>
<DIV class=3Dbook lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H1 class=3Dtitle><A name=3Dindex></A><SPAN =
class=3Dapplication>MPlayer</SPAN> - The=20
Movie Player</H1></DIV>
<DIV>
<H2 class=3Dsubtitle><A href=3D"http://www.mplayerhq.hu/"=20
target=3D_top>http://www.mplayerhq.hu/</A></H2></DIV>
<DIV>
<P class=3Dcopyright>Copyright =C2=A9 2000-2007 MPlayer team</P></DIV>
<DIV>
<DIV class=3Dlegalnotice><A name=3Did2482000></A>
<P class=3Dlegalnotice-title><B>License</B></P>
<P>MPlayer is free software; you can redistribute it and/or modify it =
under the=20
terms of the GNU General Public License as published by the Free =
Software=20
Foundation; either version 2 of the License, or (at your option) any =
later=20
version.</P>
<P>MPlayer is distributed in the hope that it will be useful, but =
WITHOUT ANY=20
WARRANTY; without even the implied warranty of MERCHANTABILITY or =
FITNESS FOR A=20
PARTICULAR PURPOSE. See the GNU General Public License for more =
details.</P>
<P>You should have received a copy of the GNU General Public License =
along with=20
MPlayer; if not, write to the Free Software Foundation, Inc., 51 =
Franklin=20
Street, Fifth Floor, Boston, MA 02110-1301 USA.</P></DIV></DIV></DIV>
<HR>
</DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dpreface><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
howtoread">How=20
  to read this documentation</A></SPAN>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
intro">1.=20
  Introduction</A></SPAN>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
install">2.=20
  Installation</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
softreq">2.1.=20
    Software requirements</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
features">2.2.=20
    Features</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
gui">2.3.=20
    What about the GUI?</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fonts-osd">2.4.=20
    Fonts and OSD</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
truetype-fonts">2.4.1.=20
      TrueType fonts</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bitmap-fonts">2.4.2.=20
      bitmap fonts</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
osdmenu">2.4.3.=20
      OSD menu</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
rtc">2.5.=20
    RTC</A></SPAN></DT></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
usage">3.=20
  Usage</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
commandline">3.1.=20
    Command line</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
subosd">3.2.=20
    Subtitles and OSD</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
control">3.3.=20
    Control</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ctrl-cfg">3.3.1.=20
      Controls configuration</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
lirc">3.3.2.=20
      Control from LIRC</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
slave-mode">3.3.3.=20
      Slave mode</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
streaming">3.4.=20
    Streaming from network or pipes</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
streaming-save">3.4.1.=20
      Saving streamed content</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
edl">3.5.=20
    Edit Decision Lists (EDL)</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
edl_using">3.5.1.=20
      Using an EDL file</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
edl_making">3.5.2.=20
      Making an EDL file</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio">3.6.=20
    Advanced audio</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround">3.6.1.=20
      Surround/Multichannel playback</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-DVD">3.6.1.1.=20
        DVDs</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-stereoinfour">3.6.1.2.=20
        Playing stereo files to four speakers</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-passthrough">3.6.1.3.=20
        AC-3/DTS Passthrough</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
hwmpa-surround-passthrough">3.6.1.4.=20
        MPEG audio Passthrough</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-matrix">3.6.1.5.=20
        Matrix-encoded audio</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-hrtf">3.6.1.6.=20
        Surround emulation in headphones</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-troubleshooting">3.6.1.7.=20
        Troubleshooting</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels">3.6.2.=20
      Channel manipulation</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-general">3.6.2.1.=20
        General information</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-mono">3.6.2.2.=20
        Playing mono with two speakers</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-copying">3.6.2.3.=20
        Channel copying/moving</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-mixing">3.6.2.4.=20
        Channel mixing</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-volume">3.6.3.=20
      Software Volume adjustment</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
cd-dvd">4.=20
  CD/DVD usage</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
drives">4.1.=20
    CD/DVD drives</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
drives_linux">4.1.1.=20
      Linux</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
drives_freebsd">4.1.2.=20
      FreeBSD</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dvd">4.2.=20
    DVD playback</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vcd">4.3.=20
    VCD playback</A></SPAN></DT></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq">5.=20
  Frequently Asked Questions</A></SPAN>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
containers">6.=20
  Containers</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
video-formats">6.1.=20
    Video formats</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mpg-vob-dat">6.1.1.=20
      MPEG files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
avi">6.1.2.=20
      AVI files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
asf-wmv">6.1.3.=20
      ASF/WMV files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mov">6.1.4.=20
      QuickTime/MOV files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vivo">6.1.5.=20
      VIVO files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fli">6.1.6.=20
      FLI files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
realmedia">6.1.7.=20
      RealMedia (RM) files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
nuppelvideo">6.1.8.=20
      NuppelVideo files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
yuv4mpeg">6.1.9.=20
      yuv4mpeg files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
film">6.1.10.=20
      FILM files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
roq">6.1.11.=20
      RoQ files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ogg">6.1.12.=20
      OGG/OGM files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
sdp">6.1.13.=20
      SDP files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
pva">6.1.14.=20
      PVA files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
nsv">6.1.15.=20
      NSV files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
matroska">6.1.16.=20
      Matroska files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
nut">6.1.17.=20
      NUT files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
gif">6.1.18.=20
      GIF files</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
audio-formats">6.2.=20
    Audio formats</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mp3">6.2.1.=20
      MP3 files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ogg-vorbis">6.2.2.=20
      OGG/OGM files (Vorbis)</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
cdda">6.2.3.=20
      CD audio</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
xmms">6.2.4.=20
      XMMS</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codecs">7.=20
  Codecs</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
video-codecs">7.1.=20
    Video codecs</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ffmpeg">7.1.1.=20
      FFmpeg/libavcodec</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
xvid">7.1.2.=20
      Xvid</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264">7.1.3.=20
      <CODE class=3Dsystemitem>x264</CODE></A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264-whatis">7.1.3.1.=20
        What is <CODE class=3Dsystemitem>x264</CODE>?</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-h264-whatis">7.1.3.2.=20
        What is H.264?</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264-playback">7.1.3.3.=20
        How can I play H.264 videos with <SPAN=20
        class=3Dapplication>MPlayer</SPAN>?</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264-encode">7.1.3.4.=20
        How can I encode videos using <SPAN =
class=3Dapplication>MEncoder</SPAN>=20
        and <CODE =
class=3Dsystemitem>x264</CODE>?</A></SPAN></DT></DL></DD></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
audio-codecs">7.2.=20
    Audio codecs</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
swac3">7.2.1.=20
      Software AC-3 decoding</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
hwac3">7.2.2.=20
      Hardware AC-3 decoding</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
libmad">7.2.3.=20
      <CODE class=3Dsystemitem>libmad</CODE> support</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
hwmpa">7.2.4.=20
      Hardware MPEG audio codec</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aac">7.2.5.=20
      AAC codec</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
amr">7.2.6.=20
      AMR codecs</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-importing">7.3.=20
    Win32 codecs importing HOWTO</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vfw-codecs">7.3.1.=20
      VFW codecs</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dshow-codecs">7.3.2.=20
      DirectShow codecs</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
video">8.=20
  Video output devices</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mtrr">8.1.=20
    Setting up MTRR</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
xv">8.2.=20
    Xv</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tdfx">8.2.1.=20
      3dfx cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
s3">8.2.2.=20
      S3 cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
nvidia">8.2.3.=20
      nVidia cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ati">8.2.4.=20
      ATI cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
neomagic">8.2.5.=20
      NeoMagic cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
trident">8.2.6.=20
      Trident cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
kyro">8.2.7.=20
      Kyro/PowerVR cards</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dga">8.3.=20
    DGA</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
sdl">8.4.=20
    SDL</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
svgalib">8.5.=20
    SVGAlib</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fbdev">8.6.=20
    Framebuffer output (FBdev)</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mga_vid">8.7.=20
    Matrox framebuffer (mga_vid)</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tdfxfb">8.8.=20
    3Dfx YUV support</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tdfx_vid">8.9.=20
    tdfx_vid</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
opengl">8.10.=20
    OpenGL output</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aalib">8.11.=20
    AAlib =E2=80=93 text mode displaying</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
caca">8.12.=20
    <CODE class=3Dsystemitem>libcaca</CODE> =E2=80=93 Color ASCII Art =
library </A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vesa">8.13.=20
    VESA - output to VESA BIOS</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
x11">8.14.=20
    X11</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix">8.15.=20
    VIDIX</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-ati">8.15.1.=20
      ATI cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-mga">8.15.2.=20
      Matrox cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-trident">8.15.3.=20
      Trident cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-3dlabs">8.15.4.=20
      3DLabs cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-nvidia">8.15.5.=20
      nVidia cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-sis">8.15.6.=20
      SiS cards</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
directfb">8.16.=20
    DirectFB</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dfbmga">8.17.=20
    DirectFB/Matrox (dfbmga)</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mpeg_decoders">8.18.=20
    MPEG decoders</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dvb">8.18.1.=20
      DVB output and input</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dxr2">8.18.2.=20
      DXR2</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dxr3">8.18.3.=20
      DXR3/Hollywood+</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
other">8.19.=20
    Other visualization hardware</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
zr">8.19.1.=20
      Zr</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
blinkenlights">8.19.2.=20
      Blinkenlights</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout">8.20.=20
    TV-out support</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout-mga-g400">8.20.1.=20
      Matrox G400 cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-out_matrox_g450">8.20.2.=20
      Matrox G450/G550 cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout-ati">8.20.3.=20
      ATI cards</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout-nvidia">8.20.4.=20
      nVidia</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout-neomagic">8.20.5.=20
      NeoMagic</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
audio">9.=20
  Audio output devices</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
sync">9.1.=20
    Audio/Video synchronization</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
troubleshooting">9.2.=20
    Troubleshooting</A></SPAN></DT></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv">10.=20
  TV</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-input">10.1.=20
    TV input</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-compilation">10.1.1.=20
      Compilation</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-tips">10.1.2.=20
      Usage tips</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-examples">10.1.3.=20
      Examples</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio">11.=20
  Radio</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio-input">11.1.=20
    Radio input</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio-compilation">11.1.1.=20
      Compilation</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio-tips">11.1.2.=20
      Usage tips</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio-examples">11.1.3.=20
      Examples</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ports">12.=20
  Ports</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
linux">12.1.=20
    Linux</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
debian">12.1.1.=20
      Debian packaging</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
rpm">12.1.2.=20
      RPM packaging</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
arm">12.1.3.=20
      ARM</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bsd">12.2.=20
    *BSD</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
freebsd">12.2.1.=20
      FreeBSD</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
openbsd">12.2.2.=20
      OpenBSD</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
darwin">12.2.3.=20
      Darwin</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
unix">12.3.=20
    Commercial Unix</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
solaris">12.3.1.=20
      Solaris</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
irix">12.3.2.=20
      IRIX</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
hp-ux">12.3.3.=20
      HP-UX</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aix">12.3.4.=20
      AIX</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
windows">12.4.=20
    Windows</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
cygwin">12.4.1.=20
      <SPAN class=3Dapplication>Cygwin</SPAN></A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mingw">12.4.2.=20
      <SPAN class=3Dapplication>MinGW</SPAN></A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
macos">12.5.=20
    Mac OS</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
osx_gui">12.5.1.=20
      MPlayer OS X GUI</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
exotic_platforms">12.6.=20
    Exotic Platforms</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
qnx">12.6.1.=20
      QNX</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
amiga">12.6.2.=20
      Amiga/MorphOS (GeekGadgets)</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mencoder">13.=20
  Basic usage of <SPAN class=3Dapplication>MEncoder</SPAN></A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-selecting-codec">13.1.=20
    Selecting codecs and container formats</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-selecting-input">13.2.=20
    Selecting input file or device</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-mpeg4">13.3.=20
    Encoding two pass MPEG-4 ("DivX")</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-handheld-psp">13.4.=20
    Encoding to Sony PSP video format</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-mpeg">13.5.=20
    Encoding to MPEG format</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-rescale">13.6.=20
    Rescaling movies</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-streamcopy">13.7.=20
    Stream copying</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-images">13.8.=20
    Encoding from multiple input image files (JPEG, PNG, TGA, =
etc.)</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-extractsub">13.9.=20
    Extracting DVD subtitles to VOBsub file</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aspect">13.10.=20
    Preserving aspect ratio</A></SPAN></DT></DL>
  <DT><SPAN class=3Dchapter><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
encoding-guide">14.=20
  Encoding with <SPAN class=3Dapplication>MEncoder</SPAN></A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4">14.1.=20
    Making a high quality MPEG-4 ("DivX") rip of a DVD movie</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-preparing-encode">14.1.1.=20
      Preparing to encode: Identifying source material and =
framerate</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-preparing-encode-fps">14.1.1.1.=20
        Identifying source framerate</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-preparing-encode-material">14.1.1.2.=20
        Identifying source material</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-2pass">14.1.2.=20
      Constant quantizer vs. multipass</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-constraints">14.1.3.=20
      Constraints for efficient encoding</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-crop">14.1.4.=20
      Cropping and Scaling</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-resolution-bitrate">14.1.5.=20
      Choosing resolution and bitrate</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-resolution-bitrate-compute">14.1.5.1.=20
        Computing the resolution</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-filtering">14.1.6.=20
      Filtering</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-interlacing">14.1.7.=20
      Interlacing and Telecine</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-encoding-interlaced">14.1.8.=20
      Encoding interlaced video</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-av-sync">14.1.9.=20
      Notes on Audio/Video synchronization</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-codec">14.1.10.=20
      Choosing the video codec</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-audio">14.1.11.=20
      Audio</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing">14.1.12.=20
      Muxing</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing-filter-issues">14.1.12.1.=20
        Improving muxing and A/V sync reliability</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing-avi-limitations">14.1.12.2.=20
        Limitations of the AVI container</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing-matroska">14.1.12.3.=20
        Muxing into the Matroska =
container</A></SPAN></DT></DL></DD></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine">14.2.=20
    How to deal with telecine and interlacing within NTSC =
DVDs</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-intro">14.2.1.=20
      Introduction</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident">14.2.2.=20
      How to tell what type of video you have</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-progressive">14.2.2.1.=20
        Progressive</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-telecined">14.2.2.2.=20
        Telecined</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-interlaced">14.2.2.3.=20
        Interlaced</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-mixedpt">14.2.2.4.=20
        Mixed progressive and telecine</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-mixedpi">14.2.2.5.=20
        Mixed progressive and interlaced</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode">14.2.3.=20
      How to encode each category</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-progressive">14.2.3.1.=20
        Progressive</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-telecined">14.2.3.2.=20
        Telecined</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-interlaced">14.2.3.3.=20
        Interlaced</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-mixedpt">14.2.3.4.=20
        Mixed progressive and telecine</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-mixedpi">14.2.3.5.=20
        Mixed progressive and interlaced</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-footnotes">14.2.4.=20
      Footnotes</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec">14.3.=20
    Encoding with the <CODE class=3Dsystemitem>libavcodec</CODE> codec=20
    family</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec-video-codecs">14.3.1.=20
      <CODE class=3Dsystemitem>libavcodec</CODE>'s video =
codecs</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec-audio-codecs">14.3.2.=20
      <CODE class=3Dsystemitem>libavcodec</CODE>'s audio =
codecs</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec-audio-codecs-pcmadpcm">14.3.2.1.=20
        PCM/ADPCM format supplementary table</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-lavc-encoding-options">14.3.3.=20
      Encoding options of libavcodec</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-mpeg4-lavc-example-settings">14.3.4.=20
      Encoding setting examples</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
custommatrices">14.3.5.=20
      Custom inter/intra matrices</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-example">14.3.6.=20
      Example</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid">14.4.=20
    Encoding with the <CODE class=3Dsystemitem>Xvid</CODE> =
codec</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-intro">14.4.1.=20
      What options should I use to get the best results?</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-encoding-options">14.4.2.=20
      Encoding options of <CODE =
class=3Dsystemitem>Xvid</CODE></A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-encoding-profiles">14.4.3.=20
      Encoding profiles</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-example-settings">14.4.4.=20
      Encoding setting examples</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264">14.5.=20
    Encoding with the <CODE class=3Dsystemitem>x264</CODE> =
codec</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options">14.5.1.=20
      Encoding options of x264</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-intro">14.5.1.1.=20
        Introduction</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-speedvquality">14.5.1.2.=20
        Options which primarily affect speed and quality</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-misc-preferences">14.5.1.3.=20
        Options pertaining to miscellaneous =
preferences</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-example-settings">14.5.2.=20
      Encoding setting examples</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-video-for-windows">14.6.=20
    Encoding with the <CODE class=3Dsystemitem>Video For Windows</CODE> =
codec=20
    family </A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-vfw-video-codecs">14.6.1.=20
      Video for Windows supported codecs</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-video-for-windows-bitrate-settings">14.6.2.=20
      Using vfw2menc to create a codec settings =
file.</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7">14.7.=20
    Using <SPAN class=3Dapplication>MEncoder</SPAN> to create <SPAN=20
    class=3Dapplication>QuickTime</SPAN>-compatible files</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-why-use-it">14.7.1.=20
      Why would one want to produce <SPAN=20
      class=3Dapplication>QuickTime</SPAN>-compatible Files?</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-constraints">14.7.2.=20
      <SPAN class=3Dapplication>QuickTime</SPAN> 7 =
limitations</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-crop">14.7.3.=20
      Cropping</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-scale">14.7.4.=20
      Scaling</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-avsync">14.7.5.=20
      A/V sync</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-bitrate">14.7.6.=20
      Bitrate</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-example">14.7.7.=20
      Encoding example</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-remux">14.7.8.=20
      Remuxing as MP4</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-metadata">14.7.9.=20
      Adding metadata tags</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd">14.8.=20
    Using <SPAN class=3Dapplication>MEncoder</SPAN> to create=20
    VCD/SVCD/DVD-compliant files</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-constraints">14.8.1.=20
      Format Constraints</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-constraints-resolution">14.8.1.1.=20
        Format Constraints</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-constraints-gop">14.8.1.2.=20
        GOP Size Constraints</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-constraints-bitrate">14.8.1.3.=20
        Bitrate Constraints</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-output">14.8.2.=20
      Output Options</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-output-aspect">14.8.2.1.=20
        Aspect Ratio</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-a-v-sync">14.8.2.2.=20
        Maintaining A/V sync</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-output-srate">14.8.2.3.=20
        Sample Rate Conversion</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc">14.8.3.=20
      Using libavcodec for VCD/SVCD/DVD Encoding</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc-intro">14.8.3.1.=20
        Introduction</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc-options">14.8.3.2.=20
        lavcopts</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc-examples">14.8.3.3.=20
        Examples</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc-advanced">14.8.3.4.=20
        Advanced Options</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-audio">14.8.4.=20
      Encoding Audio</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-audio-toolame">14.8.4.1.=20
        toolame</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-audio-twolame">14.8.4.2.=20
        twolame</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-audio-lavc">14.8.4.3.=20
        libavcodec</A></SPAN></DT></DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all">14.8.5.=20
      Putting it all Together</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-pal-dvd">14.8.5.1.=20
        PAL DVD</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-ntsc-dvd">14.8.5.2.=20
        NTSC DVD</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-pal-ac3-copy">14.8.5.3.=20
        PAL AVI Containing AC-3 Audio to DVD</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-ntsc-ac3-copy">14.8.5.4.=20
        NTSC AVI Containing AC-3 Audio to DVD</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-pal-svcd">14.8.5.5.=20
        PAL SVCD</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-ntsc-svcd">14.8.5.6.=20
        NTSC SVCD</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-pal-vcd">14.8.5.7.=20
        PAL VCD</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-ntsc-vcd">14.8.5.8.=20
        NTSC VCD</A></SPAN></DT></DL></DD></DL></DD></DL>
  <DT><SPAN class=3Dappendix><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports">A.=20
  How to report bugs</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_security">A.1.=20
    Report security releated bugs</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_fix">A.2.=20
    How to fix bugs</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_regression_test">A.3.=20
    How to do regression testing using Subversion</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_report">A.4.=20
    How to report bugs</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_where">A.5.=20
    Where to report bugs</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_what">A.6.=20
    What to report</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_system">A.6.1.=20
      System Information</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_hardware">A.6.2.=20
      Hardware and drivers</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_configure">A.6.3.=20
      Configure problems</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_compilation">A.6.4.=20
      Compilation problems</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_playback">A.6.5.=20
      Playback problems</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_crash">A.6.6.=20
      Crashes</A></SPAN>
      <DD>
      <DL>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_debug">A.6.6.1.=20
        How to conserve information about a reproducible =
crash</A></SPAN>
        <DT><SPAN class=3Dsect3><A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_core">A.6.6.2.=20
        How to extract meaningful information from a core=20
      dump</A></SPAN></DT></DL></DD></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_advusers">A.7.=20
    I know what I am doing...</A></SPAN></DT></DL>
  <DT><SPAN class=3Dappendix><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs">B.=20
  Known bugs</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-special">B.1.=20
    Special system/CPU-specific bugs/problems</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-audio">B.2.=20
    Various A-V sync and other audio problems</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-delay-all">B.2.1.=20
      General audio delay or jerky sound (exists with all or many=20
      files)</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-delay-specific">B.2.2.=20
      Audio delay/de-sync specific to one or a few files</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-nosound">B.2.3.=20
      No sound at all</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-nopicture">B.2.4.=20
      No picture at all (just plain grey/green window)</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-video">B.2.5.=20
      Video-out problems</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dappendix><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin">C.=20
  <SPAN class=3Dapplication>MPlayer</SPAN> skin format</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview">C.1.=20
    Overview</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview-directories">C.1.1.=20
      Directories</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview-formats">C.1.2.=20
      Image formats</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview-components">C.1.3.=20
      Skin components</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-files">C.1.4.=20
      Files</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file">C.2.=20
    The skin file</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-main">C.2.1.=20
      Main window and playbar</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-subwindow">C.2.2.=20
      Subwindow</A></SPAN>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-menu">C.2.3.=20
      Skin menu</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-fonts">C.3.=20
    Fonts</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect2><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-fonts-symbols">C.3.1.=20
      Symbols</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-gui">C.4.=20
    GUI messages</A></SPAN>
    <DT><SPAN class=3Dsect1><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-quality">C.5.=20
    Creating quality skins</A></SPAN></DT></DL>
  <DT><SPAN class=3Dappendix><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
history">D.=20
  History</A></SPAN></DT></DL></DIV>
<DIV class=3Dpreface lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Dhowtoread></A>How to read this=20
documentation</H2></DIV></DIV></DIV>
<P>If you are a first-time installer: be sure to read everything from =
here to=20
the end of the Installation section, and follow the links you will find. =
If you=20
have any other questions, return to the <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
toc">Table=20
of Contents</A> and search for the topic, read the <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq">FAQ</A>,=20
or try grepping through the files. Most questions should be answered =
somewhere=20
here and the rest has probably already been asked on our <A=20
href=3D"http://www.mplayerhq.hu/design7/mailing_lists.html" =
target=3D_top>mailing=20
lists</A>. </P></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A=20
name=3Dintro></A>Chapter&nbsp;1.&nbsp;Introduction</H2></DIV></DIV></DIV>=

<P><SPAN class=3Dapplication>MPlayer</SPAN> is a movie player for Linux =
(runs on=20
many other Unices, and <SPAN =
class=3Dbold><STRONG>non-x86</STRONG></SPAN> CPUs,=20
see <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ports">Ports</A>).=20
It plays most MPEG, VOB, AVI, OGG/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, =
FLI, RM,=20
NuppelVideo, yuv4mpeg, FILM, RoQ, PVA, Matroska files, supported by many =
native,=20
XAnim, RealPlayer, and Win32 DLL codecs. You can watch <SPAN=20
class=3Dbold><STRONG>VideoCD, SVCD, DVD, 3ivx, RealMedia, Sorenson,=20
Theora</STRONG></SPAN>, and <SPAN class=3Dbold><STRONG>MPEG-4=20
(DivX)</STRONG></SPAN> movies too. Another big feature of <SPAN=20
class=3Dapplication>MPlayer</SPAN> is the wide range of supported output =
drivers.=20
It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, libcaca, =
DirectFB,=20
but you can use GGI and SDL (and this way all their drivers) and some =
lowlevel=20
card-specific drivers (for Matrox, 3Dfx and Radeon, Mach64, Permedia3) =
too! Most=20
of them support software or hardware scaling, so you can enjoy movies in =

fullscreen. <SPAN class=3Dapplication>MPlayer</SPAN> supports displaying =
through=20
some hardware MPEG decoder boards, such as the <A=20
title=3D"8.18.1.&nbsp;DVB output and input"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dvb">DVB</A>=20
and <A title=3D8.18.3.&nbsp;DXR3/Hollywood+=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dxr3">DXR3/Hollywood+</A>.=20
And what about the nice big antialiased shaded subtitles (<SPAN=20
class=3Dbold><STRONG>14 supported types</STRONG></SPAN>) with =
European/ISO=20
8859-1,2 (Hungarian, English, Czech, etc), Cyrillic, Korean fonts, and =
the=20
onscreen display (OSD)? </P>
<P>The player is rock solid playing damaged MPEG files (useful for some =
VCDs),=20
and it plays bad AVI files which are unplayable with the famous windows =
media=20
player. Even AVI files without index chunk are playable, and you can =
temporarily=20
rebuild their indexes with the <TT class=3Doption>-idx</TT> option, or =
permanently=20
with <SPAN class=3Dapplication>MEncoder</SPAN>, thus enabling seeking! =
As you see,=20
stability and quality are the most important things, but the speed is =
also=20
amazing. There is also a powerful filter system for video and audio=20
manipulation. </P>
<P><SPAN class=3Dapplication>MEncoder</SPAN> (<SPAN=20
class=3Dapplication>MPlayer</SPAN>'s Movie Encoder) is a simple movie =
encoder,=20
designed to encode <SPAN class=3Dapplication>MPlayer</SPAN>-playable =
movies (<SPAN=20
class=3Dbold><STRONG>AVI/ASF/OGG/DVD/VCD/VOB/MPG/MOV/VIV/FLI/RM/NUV/NET/P=
VA</STRONG></SPAN>)=20
to other <SPAN class=3Dapplication>MPlayer</SPAN>-playable formats (see =
below). It=20
can encode with various codecs, like <SPAN class=3Dbold><STRONG>MPEG-4=20
(DivX4)</STRONG></SPAN> (one or two passes), <CODE=20
class=3Dsystemitem>libavcodec</CODE>, <SPAN =
class=3Dbold><STRONG>PCM/MP3/VBR=20
MP3</STRONG></SPAN> audio. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B><SPAN class=3Dapplication>MEncoder</SPAN> =
features</B></P>
<UL type=3Ddisc>
  <LI>
  <P>Encoding from the wide range of fileformats and decoders of <SPAN=20
  class=3Dapplication>MPlayer</SPAN> </P>
  <LI>
  <P>Encoding to all the codecs of FFmpeg's <A=20
  title=3D7.1.1.&nbsp;FFmpeg/libavcodec=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ffmpeg"><CODE=20
  class=3Dsystemitem>libavcodec</CODE></A> </P>
  <LI>
  <P>Video encoding from <SPAN class=3Dbold><STRONG>V4L compatible TV=20
  tuners</STRONG></SPAN> </P>
  <LI>
  <P>Encoding/multiplexing to interleaved AVI files with proper index =
</P>
  <LI>
  <P>Creating files from external audio stream </P>
  <LI>
  <P>1, 2 or 3 pass encoding </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>VBR</STRONG></SPAN> MP3 audio </P>
  <DIV class=3Dimportant style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: =
0.5in">
  <H3 class=3Dtitle>Important</H3>
  <P>VBR MP3 audio doesn't always play nicely on windows players! =
</P></DIV>
  <P></P>
  <LI>
  <P>PCM audio </P>
  <LI>
  <P>Stream copying </P>
  <LI>
  <P>Input A/V synchronizing (PTS-based, can be disabled with <TT=20
  class=3Doption>-mc 0</TT> option) </P>
  <LI>
  <P>fps correction with <TT class=3Doption>-ofps</TT> option (useful =
when=20
  encoding 30000/1001 fps VOB to 24000/1001 fps AVI) </P>
  <LI>
  <P>Using our very powerful filter system (crop, expand, flip, =
postprocess,=20
  rotate, scale, rgb/yuv conversion) </P>
  <LI>
  <P>Can encode DVD/VOBsub <SPAN =
class=3Dbold><STRONG>AND</STRONG></SPAN> text=20
  subtitles into the output file </P>
  <LI>
  <P>Can rip DVD subtitles to VOBsub format </P></LI></UL></DIV>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>Planned features</B></P>
<UL type=3Ddisc>
  <LI>
  <P>Even wider variety of available en/decoding formats/codecs =
(creating VOB=20
  files with DivX4/Indeo5/VIVO streams :). </P></LI></UL></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> and <SPAN=20
class=3Dapplication>MEncoder</SPAN> can be distributed under the terms =
of the GNU=20
General Public License Version 2. </P></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A=20
name=3Dinstall></A>Chapter&nbsp;2.&nbsp;Installation</H2></DIV></DIV></DI=
V>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
softreq">2.1.=20
  Software requirements</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
features">2.2.=20
  Features</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
gui">2.3.=20
  What about the GUI?</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fonts-osd">2.4.=20
  Fonts and OSD</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
truetype-fonts">2.4.1.=20
    TrueType fonts</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bitmap-fonts">2.4.2.=20
    bitmap fonts</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
osdmenu">2.4.3.=20
    OSD menu</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
rtc">2.5.=20
  RTC</A></SPAN></DT></DL></DIV>
<P>A quick installation guide can be found in the <TT =
class=3Dfilename>README</TT>=20
file. Please read it first and then come back here for the rest of the =
gory=20
details. </P>
<P>In this section you will be guided through the compilation and =
configuration=20
process of <SPAN class=3Dapplication>MPlayer</SPAN>. It's not easy, but =
it won't=20
necessarily be hard. If you experience a behavior different from this=20
description, please search through this documentation and you'll find =
your=20
answers. </P>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dsoftreq></A>2.1.&nbsp;Software=20
requirements</H2></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>binutils</STRONG></SPAN> - recommended =
version is=20
  <SPAN class=3Dbold><STRONG>2.11.x</STRONG></SPAN>. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>gcc</STRONG></SPAN> - recommended =
versions are=20
  2.95 and 3.4+. 2.96 and 3.0.x are known to generate faulty code, 3.1 =
and 3.2=20
  also had problems, 3.3 some minor ones. On PowerPC, use 4.x. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Xorg/XFree86</STRONG></SPAN> - =
recommended version=20
  is 4.3 or later. Make sure the <SPAN class=3Dbold><STRONG>development=20
  packages</STRONG></SPAN> are installed, too, otherwise it won't work. =
You=20
  don't absolutely need X, some video output drivers work without it. =
</P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>make</STRONG></SPAN> - recommended =
version is=20
  3.79.x or later. To build the XML documentation you need 3.80. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>FreeType</STRONG></SPAN> - 2.0.9 or =
later is=20
  required for the OSD and subtitles </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>ALSA</STRONG></SPAN> - optional, for =
ALSA audio=20
  output support. At least 0.9.0rc4 is required. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>libjpeg</STRONG></SPAN> - required for =
the=20
  optional JPEG video output driver </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>libpng</STRONG></SPAN> - required for =
the optional=20
  PNG video output driver </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>directfb</STRONG></SPAN> - optional, =
0.9.13 or=20
  later required for the directfb video output driver </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>lame</STRONG></SPAN> - 3.90 or later is=20
  recommended, necessary for encoding MP3 audio with <SPAN=20
  class=3Dapplication>MEncoder</SPAN>. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>zlib</STRONG></SPAN> - recommended, =
necessary for=20
  compressed MOV header and PNG support </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><A =
href=3D"http://www.live555.com/mplayer/"=20
  target=3D_top>LIVE555 Streaming Media</A></STRONG></SPAN> - optional, =
needed for=20
  some RTSP/RTP streams </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>cdparanoia</STRONG></SPAN> - optional, =
for CDDA=20
  support </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>libxmms</STRONG></SPAN> - optional, for =
XMMS input=20
  plugin support. At least 1.2.7 is required. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>libsmb</STRONG></SPAN> - optional, for =
SMB=20
  networking support </P></LI></UL></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dfeatures></A>2.2.&nbsp;Features</H2></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>Decide if you need GUI. If you do, see the <A=20
  title=3D"2.3.&nbsp;What about the GUI?"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
gui">GUI</A>=20
  section before compiling. </P>
  <LI>
  <P>If you want to install <SPAN class=3Dapplication>MEncoder</SPAN> =
(our great=20
  all-purpose encoder), see the <A=20
  title=3D"Chapter&nbsp;13.&nbsp;Basic usage of MEncoder"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mencoder"><SPAN=20
  class=3Dapplication>MEncoder</SPAN></A> section. </P>
  <LI>
  <P>If you have a V4L compatible <SPAN class=3Dbold><STRONG>TV=20
  tuner</STRONG></SPAN> card, and wish to watch/grab and encode movies =
with=20
  <SPAN class=3Dapplication>MPlayer</SPAN>, read the <A=20
  title=3D"10.1.&nbsp;TV input"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-input">TV=20
  input</A> section. </P>
  <LI>
  <P>If you have a V4L compatible <SPAN class=3Dbold><STRONG>radio=20
  tuner</STRONG></SPAN> card, and wish to listen and capture sound with =
<SPAN=20
  class=3Dapplication>MPlayer</SPAN>, read the <A=20
  title=3DChapter&nbsp;11.&nbsp;Radio=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio">radio</A>=20
  section. </P>
  <LI>
  <P>There is a neat <SPAN class=3Dbold><STRONG>OSD Menu</STRONG></SPAN> =
support=20
  ready to be used. Check the <A title=3D"3.2.&nbsp;Subtitles and OSD"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
subosd">OSD=20
  menu</A> section. </P></LI></UL></DIV>
<P>Then build <SPAN class=3Dapplication>MPlayer</SPAN>: </P><PRE =
class=3Dscreen>./configure
make
make install
</PRE>
<P></P>
<P>At this point, <SPAN class=3Dapplication>MPlayer</SPAN> is ready to =
use. Check=20
if you have a <TT class=3Dfilename>codecs.conf</TT> file in your home =
directory at=20
(<TT class=3Dfilename>~/.mplayer/codecs.conf</TT>) left from old <SPAN=20
class=3Dapplication>MPlayer</SPAN> versions. If you find one, remove it. =
</P>
<P>Debian users can build a .deb package for themselves, it's very =
simple. Just=20
exec </P><PRE class=3Dscreen>fakeroot debian/rules binary</PRE>
<P>in <SPAN class=3Dapplication>MPlayer</SPAN>'s root directory. See <A=20
title=3D"12.1.1.&nbsp;Debian packaging"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
debian">Debian=20
packaging</A> for detailed instructions. </P>
<P><SPAN class=3Dbold><STRONG>Always browse the output =
of</STRONG></SPAN> <TT=20
class=3Dfilename>./configure</TT>, and the <TT =
class=3Dfilename>configure.log</TT>=20
file, they contain information about what will be built, and what will =
not. You=20
may also want to view <TT class=3Dfilename>config.h</TT> and <TT=20
class=3Dfilename>config.mak</TT> files. If you have some libraries =
installed, but=20
not detected by <TT class=3Dfilename>./configure</TT>, then check if you =
also have=20
the proper header files (usually the -dev packages) and their version =
matches.=20
The <TT class=3Dfilename>configure.log</TT> file usually tells you what =
is=20
missing. </P>
<P>Though not mandatory, the fonts should be installed in order to gain =
OSD, and=20
subtitle functionality. The recommended method is installing a TTF font =
file and=20
telling <SPAN class=3Dapplication>MPlayer</SPAN> to use it. See the <A=20
title=3D"3.2.&nbsp;Subtitles and OSD"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
subosd">Subtitles=20
and OSD</A> section for details. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A name=3Dgui></A>2.3.&nbsp;What =
about the=20
GUI?</H2></DIV></DIV></DIV>
<P>The GUI needs GTK 1.2.x or GTK 2.0 (it isn't fully GTK, but the =
panels are).=20
The skins are stored in PNG format, so GTK, <CODE =
class=3Dsystemitem>libpng</CODE>=20
(and their devel stuff, usually called <CODE =
class=3Dsystemitem>gtk-dev</CODE> and=20
<CODE class=3Dsystemitem>libpng-dev</CODE>) has to be installed. You can =
build it=20
by specifying <TT class=3Doption>--enable-gui</TT> during <TT=20
class=3Dfilename>./configure</TT>. Then, to turn on GUI mode, you have =
to execute=20
the <SPAN><STRONG class=3Dcommand>gmplayer</STRONG></SPAN> binary. </P>
<P>As <SPAN class=3Dapplication>MPlayer</SPAN> doesn't have a skin =
included, you=20
have to download them if you want to use the GUI. See the <A=20
href=3D"http://www.mplayerhq.hu/dload.html" target=3D_top>download =
page</A>. They=20
should be extracted to the usual system-wide directory (<TT=20
class=3Dfilename>$PREFIX/share/mplayer/skins</TT>), or to <TT=20
class=3Dfilename>$HOME/.mplayer/skins</TT>. <SPAN =
class=3Dapplication>MPlayer</SPAN>=20
by default looks in these directories for a directory named <TT=20
class=3Dfilename>default</TT>, but you can use the <TT =
class=3Doption>-skin <EM=20
class=3Dreplaceable><CODE>newskin</CODE></EM></TT> option, or the <CODE=20
class=3Dliteral>skin=3Dnewskin</CODE> config file directive to use the =
skin in <TT=20
class=3Dfilename>*/skins/newskin</TT> directory. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dfonts-osd></A>2.4.&nbsp;Fonts and=20
OSD</H2></DIV></DIV></DIV>
<P>You need to tell <SPAN class=3Dapplication>MPlayer</SPAN> which font =
to use to=20
enjoy OSD and subtitles. Any TrueType font or special bitmap fonts will =
work.=20
However, TrueType fonts are recommended as they look far better, can be =
properly=20
scaled to the movie size and cope better with different encodings. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dtruetype-fonts></A>2.4.1.&nbsp;TrueType=20
fonts</H3></DIV></DIV></DIV>
<P>There are two ways to get TrueType fonts to work. The first is to =
pass the=20
<TT class=3Doption>-font</TT> option to specify a TrueType font file on =
the=20
command line. This option will be a good candidate to put in your =
configuration=20
file (see the manual page for details). The second is to create a =
symlink called=20
<TT class=3Dfilename>subfont.ttf</TT> to the font file of your choice. =
Either </P><PRE class=3Dscreen>ln -s <EM =
class=3Dreplaceable><CODE>/path/to/sample_font.ttf</CODE></EM> =
~/.mplayer/subfont.ttf
</PRE>
<P>for each user individually or a system-wide one: </P><PRE =
class=3Dscreen>ln -s <EM =
class=3Dreplaceable><CODE>/path/to/sample_font.ttf</CODE></EM> =
$PREFIX/share/mplayer/subfont.ttf
</PRE>
<P></P>
<P>If <SPAN class=3Dapplication>MPlayer</SPAN> was compiled with <CODE=20
class=3Dsystemitem>fontconfig</CODE> support, the above methods won't =
work,=20
instead <TT class=3Doption>-font</TT> expects a <CODE=20
class=3Dsystemitem>fontconfig</CODE> font name and defaults to the =
sans-serif=20
font. Example: </P><PRE class=3Dscreen>mplayer -font <EM =
class=3Dreplaceable><CODE>'Bitstream Vera Sans'</CODE></EM> <EM =
class=3Dreplaceable><CODE>anime.mkv</CODE></EM>
</PRE>
<P></P>
<P>To get a list of fonts known to <CODE =
class=3Dsystemitem>fontconfig</CODE>, use=20
<SPAN><STRONG class=3Dcommand>fc-list</STRONG></SPAN>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbitmap-fonts></A>2.4.2.&nbsp;bitmap=20
fonts</H3></DIV></DIV></DIV>
<P>If for some reason you wish or need to employ bitmap fonts, download =
a set=20
from our homepage. You can choose between various <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/releases/fonts/" =
target=3D_top>ISO fonts</A>=20
and some sets of fonts <A =
href=3D"http://www.mplayerhq.hu/MPlayer/contrib/fonts/"=20
target=3D_top>contributed by users</A> in various encodings. </P>
<P>Uncompress the file you downloaded to <TT =
class=3Dfilename>~/.mplayer</TT> or=20
<TT class=3Dfilename>$PREFIX/share/mplayer</TT>. Then rename or symlink =
one of the=20
extracted directories to <TT class=3Dfilename>font</TT>, for example: =
</P><PRE class=3Dscreen>ln -s <EM =
class=3Dreplaceable><CODE>~/.mplayer/arial-24</CODE></EM> =
~/.mplayer/font
</PRE>
<P></P><PRE class=3Dscreen>ln -s <EM =
class=3Dreplaceable><CODE>$PREFIX/share/mplayer/arial-24</CODE></EM> =
$PREFIX/share/mplayer/font
</PRE>
<P></P>
<P>Fonts should have an appropriate <TT class=3Dfilename>font.desc</TT> =
file which=20
maps unicode font positions to the actual code page of the subtitle =
text.=20
Another solution is to have UTF-8-encoded subtitles and use the <TT=20
class=3Doption>-utf8</TT> option or give the subtitles file the same =
name as your=20
video file with a <TT class=3Dfilename>.utf</TT> extension and have it =
in the same=20
directory as the video file. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dosdmenu></A>2.4.3.&nbsp;OSD =
menu</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> has a completely user =
definiable OSD=20
Menu interface. </P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>the Preferences menu is currently UNIMPLEMENTED! </P></DIV>
<DIV class=3Dorderedlist>
<P class=3Dtitle><B>Installation</B></P>
<OL type=3D1>
  <LI>
  <P>compile <SPAN class=3Dapplication>MPlayer</SPAN> by passing the <TT =

  class=3Doption>--enable-menu</TT> to <TT =
class=3Dfilename>./configure</TT> </P>
  <LI>
  <P>make sure you have an OSD font installed </P>
  <LI>
  <P>copy <TT class=3Dfilename>etc/menu.conf</TT> to your <TT=20
  class=3Dfilename>.mplayer</TT> directory </P>
  <LI>
  <P>copy <TT class=3Dfilename>etc/input.conf</TT> to your <TT=20
  class=3Dfilename>.mplayer</TT> directory, or to the system-wide <SPAN=20
  class=3Dapplication>MPlayer</SPAN> config dir (default: <TT=20
  class=3Dfilename>/usr/local/etc/mplayer</TT>) </P>
  <LI>
  <P>check and edit <TT class=3Dfilename>input.conf</TT> to enable menu =
movement=20
  keys (it is described there). </P>
  <LI>
  <P>start <SPAN class=3Dapplication>MPlayer</SPAN> by the following =
example: </P><PRE class=3Dscreen>mplayer -menu <EM =
class=3Dreplaceable><CODE>file.avi</CODE></EM></PRE>
  <P></P>
  <LI>
  <P>push any menu key you defined </P></LI></OL></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Drtc></A>2.5.&nbsp;RTC</H2></DIV></DIV></DIV>
<P>There are three timing methods in <SPAN =
class=3Dapplication>MPlayer</SPAN>.=20
</P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>To use the old method</STRONG></SPAN>, =
you don't=20
  have to do anything. It uses <CODE class=3Dsystemitem>usleep()</CODE> =
to tune=20
  A/V sync, with +/- 10ms accuracy. However sometimes the sync has to be =
tuned=20
  even finer. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>The new timer</STRONG></SPAN> code uses =
the RTC=20
  (RealTime Clock) for this task, because it has precise 1ms timers. The =
<TT=20
  class=3Doption>-rtc</TT> option enables it, but a properly set up =
kernel is=20
  required. If you are running kernel 2.4.19pre8 or later you can adjust =
the=20
  maximum RTC frequency for normal users through the <CODE=20
  class=3Dsystemitem>/proc </CODE>filesystem. Use one of the following =
two=20
  commands to enable RTC for normal users: </P><PRE class=3Dscreen>echo =
1024 &gt; /proc/sys/dev/rtc/max-user-freq</PRE>
  <P></P><PRE class=3Dscreen>sysctl dev/rtc/max-user-freq=3D1024</PRE>
  <P>You can make this setting permanent by adding the latter to <TT=20
  class=3Dfilename>/etc/sysctl.conf</TT>. </P>
  <P>You can see the new timer's efficiency in the status line. The =
power=20
  management functions of some notebook BIOSes with speedstep CPUs =
interact=20
  badly with RTC. Audio and video may get out of sync. Plugging the =
external=20
  power connector in before you power up your notebook seems to help. In =
some=20
  hardware combinations (confirmed during usage of non-DMA DVD drive on =
an=20
  ALi1541 board) usage of the RTC timer causes skippy playback. It's =
recommended=20
  to use the third method in these cases. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>The third timer code</STRONG></SPAN> is =
turned on=20
  with the <TT class=3Doption>-softsleep</TT> option. It has the =
efficiency of the=20
  RTC, but it doesn't use RTC. On the other hand, it requires more CPU.=20
</P></LI></UL></DIV>
<P></P></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A=20
name=3Dusage></A>Chapter&nbsp;3.&nbsp;Usage</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
commandline">3.1.=20
  Command line</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
subosd">3.2.=20
  Subtitles and OSD</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
control">3.3.=20
  Control</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ctrl-cfg">3.3.1.=20
    Controls configuration</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
lirc">3.3.2.=20
    Control from LIRC</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
slave-mode">3.3.3.=20
    Slave mode</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
streaming">3.4.=20
  Streaming from network or pipes</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
streaming-save">3.4.1.=20
    Saving streamed content</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
edl">3.5.=20
  Edit Decision Lists (EDL)</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
edl_using">3.5.1.=20
    Using an EDL file</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
edl_making">3.5.2.=20
    Making an EDL file</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio">3.6.=20
  Advanced audio</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround">3.6.1.=20
    Surround/Multichannel playback</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-DVD">3.6.1.1.=20
      DVDs</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-stereoinfour">3.6.1.2.=20
      Playing stereo files to four speakers</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-passthrough">3.6.1.3.=20
      AC-3/DTS Passthrough</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
hwmpa-surround-passthrough">3.6.1.4.=20
      MPEG audio Passthrough</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-matrix">3.6.1.5.=20
      Matrix-encoded audio</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-hrtf">3.6.1.6.=20
      Surround emulation in headphones</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-surround-troubleshooting">3.6.1.7.=20
      Troubleshooting</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels">3.6.2.=20
    Channel manipulation</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-general">3.6.2.1.=20
      General information</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-mono">3.6.2.2.=20
      Playing mono with two speakers</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-copying">3.6.2.3.=20
      Channel copying/moving</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-mixing">3.6.2.4.=20
      Channel mixing</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-volume">3.6.3.=20
    Software Volume adjustment</A></SPAN></DT></DL></DD></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dcommandline></A>3.1.&nbsp;Command=20
line</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> utilizes a complex playtree. =
It=20
consists of global options written as first, for example </P><PRE =
class=3Dscreen>mplayer -vfm 5</PRE>
<P>and options written after filenames, that apply only to the given=20
filename/URL/whatever, for example: </P><PRE class=3Dscreen>mplayer -vfm =
5 <EM class=3Dreplaceable><CODE>movie1.avi</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie2.avi</CODE></EM> -vfm 4
</PRE>
<P></P>
<P>You can group filenames/URLs together using <CODE =
class=3Dliteral>{</CODE> and=20
<CODE class=3Dliteral>}</CODE>. It is useful with option <TT=20
class=3Doption>-loop</TT>: </P><PRE class=3Dscreen>mplayer { 1.avi -loop =
2 2.avi } -loop 3</PRE>
<P>The above command will play files in this order: 1, 1, 2, 1, 1, 2, 1, =
1, 2.=20
</P>
<P>Playing a file: </P><PRE class=3Dsynopsis><SPAN><STRONG =
class=3Dcommand>mplayer</STRONG></SPAN> [<EM =
class=3Dreplaceable><CODE>options</CODE></EM>] [<EM =
class=3Dreplaceable><CODE>path</CODE></EM>/]<EM =
class=3Dreplaceable><CODE>filename</CODE></EM>
</PRE>
<P></P>
<P>Another way to play a file: </P><PRE class=3Dsynopsis><SPAN><STRONG =
class=3Dcommand>mplayer</STRONG></SPAN> [<EM =
class=3Dreplaceable><CODE>options</CODE></EM>] <EM =
class=3Dreplaceable><CODE>file:///uri-escaped-path</CODE></EM>
</PRE>
<P></P>
<P>Playing more files: </P><PRE class=3Dsynopsis><SPAN><STRONG =
class=3Dcommand>mplayer</STRONG></SPAN> [<EM =
class=3Dreplaceable><CODE>default options</CODE></EM>] [<EM =
class=3Dreplaceable><CODE>path</CODE></EM>/]<EM =
class=3Dreplaceable><CODE>filename1</CODE></EM> [<EM =
class=3Dreplaceable><CODE>options for filename1</CODE></EM>] <EM =
class=3Dreplaceable><CODE>filename2</CODE></EM> [<EM =
class=3Dreplaceable><CODE>options for filename2</CODE></EM>] ...
</PRE>
<P></P>
<P>Playing VCD: </P><PRE class=3Dsynopsis><SPAN><STRONG =
class=3Dcommand>mplayer</STRONG></SPAN> [<EM =
class=3Dreplaceable><CODE>options</CODE></EM>] vcd://<EM =
class=3Dreplaceable><CODE>trackno</CODE></EM> [-cdrom-device <EM =
class=3Dreplaceable><CODE>/dev/cdrom</CODE></EM>]
</PRE>
<P></P>
<P>Playing DVD: </P><PRE class=3Dsynopsis><SPAN><STRONG =
class=3Dcommand>mplayer</STRONG></SPAN> [<EM =
class=3Dreplaceable><CODE>options</CODE></EM>] dvd://<EM =
class=3Dreplaceable><CODE>titleno</CODE></EM> [-dvd-device <EM =
class=3Dreplaceable><CODE>/dev/dvd</CODE></EM>]
</PRE>
<P></P>
<P>Playing from the WWW: </P><PRE class=3Dsynopsis><SPAN><STRONG =
class=3Dcommand>mplayer</STRONG></SPAN> [<EM =
class=3Dreplaceable><CODE>options</CODE></EM>] http://<EM =
class=3Dreplaceable><CODE>site.com/file.asf</CODE></EM>
</PRE>
<P>(playlists can be used, too) </P>
<P>Playing from RTSP: </P><PRE class=3Dsynopsis><SPAN><STRONG =
class=3Dcommand>mplayer</STRONG></SPAN> [<EM =
class=3Dreplaceable><CODE>options</CODE></EM>] rtsp://<EM =
class=3Dreplaceable><CODE>server.example.com/streamName</CODE></EM>
</PRE>
<P></P>
<P>Examples: </P><PRE class=3Dscreen>mplayer -vo x11 <EM =
class=3Dreplaceable><CODE>/mnt/Films/Contact/contact2.mpg</CODE></EM>
mplayer vcd://<EM class=3Dreplaceable><CODE>2</CODE></EM> -cdrom-device =
<EM class=3Dreplaceable><CODE>/dev/hdc</CODE></EM>
mplayer -afm 3 <EM =
class=3Dreplaceable><CODE>/mnt/DVDtrailers/alien4.vob</CODE></EM>
mplayer dvd://<EM class=3Dreplaceable><CODE>1</CODE></EM> -dvd-device =
<EM class=3Dreplaceable><CODE>/dev/hdc</CODE></EM>
mplayer -abs 65536 -delay -0.4 -nobps <EM =
class=3Dreplaceable><CODE>~/movies/test.avi</CODE></EM></PRE>
<P></P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dsubosd></A>3.2.&nbsp;Subtitles and=20
OSD</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> can display subtitles along =
with movie=20
files. Currently the following formats are supported: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>VOBsub</P>
  <LI>
  <P>OGM</P>
  <LI>
  <P>CC (closed caption)</P>
  <LI>
  <P>MicroDVD</P>
  <LI>
  <P>SubRip</P>
  <LI>
  <P>SubViewer</P>
  <LI>
  <P>Sami</P>
  <LI>
  <P>VPlayer</P>
  <LI>
  <P>RT</P>
  <LI>
  <P>SSA</P>
  <LI>
  <P>PJS (Phoenix Japanimation Society)</P>
  <LI>
  <P>MPsub</P>
  <LI>
  <P>AQTitle</P>
  <LI>
  <P><A href=3D"http://unicorn.us.com/jacosub/" =
target=3D_top>JACOsub</A>=20
</P></LI></UL></DIV>
<P></P>
<P><SPAN class=3Dapplication>MPlayer</SPAN> can dump the previously =
listed=20
subtitle formats (<SPAN class=3Dbold><STRONG>except the three=20
first</STRONG></SPAN>) into the following destination formats, with the =
given=20
options: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>MPsub: <TT class=3Doption>-dumpmpsub</TT></P>
  <LI>
  <P>SubRip: <TT class=3Doption>-dumpsrtsub</TT></P>
  <LI>
  <P>MicroDVD: <TT class=3Doption>-dumpmicrodvdsub</TT></P>
  <LI>
  <P>JACOsub: <TT class=3Doption>-dumpjacosub</TT></P>
  <LI>
  <P>Sami: <TT class=3Doption>-dumpsami</TT></P></LI></UL></DIV>
<P></P>
<P><SPAN class=3Dapplication>MEncoder</SPAN> can dump DVD subtitles into =
<A=20
title=3D"13.9.&nbsp;Extracting DVD subtitles to VOBsub file"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-extractsub">VOBsub</A>=20
format. </P>
<P>The command line options differ slightly for the different formats: =
</P>
<P><B>VOBsub subtitles.&nbsp;</B> VOBsub subtitles consist of a big =
(some=20
megabytes) <TT class=3Dfilename>.SUB</TT> file, and optional <TT=20
class=3Dfilename>.IDX</TT> and/or <TT class=3Dfilename>.IFO</TT> files. =
If you have=20
files like <TT class=3Dfilename><EM=20
class=3Dreplaceable><CODE>sample.sub</CODE></EM></TT>, <TT =
class=3Dfilename><EM=20
class=3Dreplaceable><CODE>sample.ifo</CODE></EM></TT> (optional), <TT=20
class=3Dfilename><EM =
class=3Dreplaceable><CODE>sample.idx</CODE></EM></TT> - you=20
have to pass <SPAN class=3Dapplication>MPlayer</SPAN> the <TT =
class=3Doption>-vobsub=20
sample [-vobsubid <EM class=3Dreplaceable><CODE>id</CODE></EM>]</TT> =
options (full=20
path optional). The <TT class=3Doption>-vobsubid</TT> option is like <TT =

class=3Doption>-sid</TT> for DVDs, you can choose between subtitle =
tracks=20
(languages) with it. In case that <TT class=3Doption>-vobsubid</TT> is =
omitted,=20
<SPAN class=3Dapplication>MPlayer</SPAN> will try to use the languages =
given by=20
the <TT class=3Doption>-slang</TT> option and fall back to the <CODE=20
class=3Dsystemitem>langidx</CODE> in the <TT class=3Dfilename>.IDX</TT> =
file to set=20
the subtitle language. If it fails, there will be no subtitles. </P>
<P><B>Other subtitles.&nbsp;</B> The other formats consist of a single =
text file=20
containing timing, placement and text information. Usage: If you have a =
file=20
like <TT class=3Dfilename><EM =
class=3Dreplaceable><CODE>sample.txt</CODE></EM></TT>,=20
you have to pass the option <TT class=3Doption>-sub <EM=20
class=3Dreplaceable><CODE>sample.txt</CODE></EM></TT> (full path =
optional). </P>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>Adjusting subtitle timing and placement:</B></P>
<DL>
  <DT><SPAN class=3Dterm><TT class=3Doption>-subdelay <EM=20
  class=3Dreplaceable><CODE>sec</CODE></EM></TT></SPAN>
  <DD>
  <P>Delays subtitles by <TT class=3Doption><EM=20
  class=3Dreplaceable><CODE>sec</CODE></EM></TT> seconds. Can be =
negative. The=20
  value is added to movie's time position counter. </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-subfps <EM=20
  class=3Dreplaceable><CODE>RATE</CODE></EM></TT></SPAN>
  <DD>
  <P>Specify frame/sec rate of subtitle file (float number). </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-subpos <EM=20
  class=3Dreplaceable><CODE>0-100</CODE></EM></TT></SPAN>
  <DD>
  <P>Specify the position of subtitles. </P></DD></DL></DIV>
<P>If you experience a growing delay between the movie and the subtitles =
when=20
using a MicroDVD subtitle file, most likely the framerate of the movie =
and the=20
subtitle file are different. Please note that the MicroDVD subtitle =
format uses=20
absolute frame numbers for its timing, but there is no fps information =
in it,=20
and therefore the <TT class=3Doption>-subfps</TT> option should be used =
with this=20
format. If you like to solve this problem permanently, you have to =
manually=20
convert the subtitle file framerate. <SPAN =
class=3Dapplication>MPlayer</SPAN> can=20
do this conversion for you: </P><PRE class=3Dscreen>mplayer =
-dumpmicrodvdsub -fps <EM =
class=3Dreplaceable><CODE>subtitles_fps</CODE></EM> -subfps <EM =
class=3Dreplaceable><CODE>avi_fps</CODE></EM> \
    -sub <EM class=3Dreplaceable><CODE>subtitle_filename</CODE></EM> <EM =
class=3Dreplaceable><CODE>dummy.avi</CODE></EM>
</PRE>
<P></P>
<P>About DVD subtitles, read the <A title=3D"4.2.&nbsp;DVD playback"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dvd">DVD</A>=20
section. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dcontrol></A>3.3.&nbsp;Control</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> has a fully configurable, =
command=20
driven, control layer which lets you control <SPAN=20
class=3Dapplication>MPlayer</SPAN> with keyboard, mouse, joystick or =
remote=20
control (using LIRC). See the man page for the complete list of keyboard =

controls. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dctrl-cfg></A>3.3.1.&nbsp;Controls=20
configuration</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> allows you bind any =
key/button to any=20
<SPAN class=3Dapplication>MPlayer</SPAN> command using a simple config =
file. The=20
syntax consist of a key name followed by a command. The default config =
file=20
location is <TT class=3Dfilename>$HOME/.mplayer/input.conf</TT> but it =
can be=20
overridden using the <TT class=3Doption>-input <EM=20
class=3Dreplaceable><CODE>conf</CODE></EM></TT> option (relative path =
are relative=20
to <TT class=3Dfilename>$HOME/.mplayer</TT>). </P>
<P>You can get a full list of supported key names by running =
<SPAN><STRONG=20
class=3Dcommand>mplayer -input keylist</STRONG></SPAN> and a full list =
of=20
available commands by running <SPAN><STRONG class=3Dcommand>mplayer =
-input=20
cmdlist</STRONG></SPAN>. </P>
<DIV class=3Dexample><A name=3Dinput_control_file></A>
<P class=3Dtitle><B>Example&nbsp;3.1.&nbsp;A simple input control =
file</B></P>
<DIV class=3Dexample-contents><PRE class=3Dprogramlisting>##
## MPlayer input control file
##

RIGHT seek +10
LEFT seek -10
- audio_delay 0.100
+ audio_delay -0.100
q quit
&gt; pt_step 1
&lt; pt_step -1
ENTER pt_step 1 1</PRE></DIV></DIV><BR class=3Dexample-break></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dlirc></A>3.3.2.&nbsp;Control from=20
LIRC</H3></DIV></DIV></DIV>
<P>Linux Infrared Remote Control - use an easy to build home-brewn =
IR-receiver,=20
an (almost) arbitrary remote control and control your Linux box with it! =
More=20
about it on the <A href=3D"http://www.lirc.org/" target=3D_top>LIRC =
homepage</A>.=20
</P>
<P>If you have the LIRC package installed, <TT =
class=3Dfilename>configure</TT>=20
will autodetect it. If everything went fine, <SPAN=20
class=3Dapplication>MPlayer</SPAN> will print "<CODE =
class=3Dsystemitem>Setting up=20
LIRC support...</CODE>" on startup. If an error occurs it will tell you. =
If=20
there is no message about LIRC there is no support compiled in. That's =
it :-)=20
</P>
<P>The application name for <SPAN class=3Dapplication>MPlayer</SPAN> is =
- surprise=20
- <TT class=3Dfilename>mplayer</TT>. You can use any <SPAN=20
class=3Dapplication>MPlayer</SPAN> commands and even pass more than one =
command by=20
separating them with <CODE class=3Dliteral>\n</CODE>. Do not forget to =
enable the=20
repeat flag in <TT class=3Dfilename>.lircrc</TT> when it makes sense =
(seek,=20
volume, etc). Here is an excerpt from a sample <TT =
class=3Dfilename>.lircrc</TT>:=20
</P><PRE class=3Dprogramlisting>begin
     button =3D VOLUME_PLUS
     prog =3D mplayer
     config =3D volume 1
     repeat =3D 1
end

begin
    button =3D VOLUME_MINUS
    prog =3D mplayer
    config =3D volume -1
    repeat =3D 1
end

begin
    button =3D CD_PLAY
    prog =3D mplayer
    config =3D pause
end

begin
    button =3D CD_STOP
    prog =3D mplayer
    config =3D seek 0 1\npause
end</PRE>
<P>If you do not like the standard location for the lirc-config file =
(<TT=20
class=3Dfilename>~/.lircrc</TT>) use the <TT class=3Doption>-lircconf =
<EM=20
class=3Dreplaceable><CODE>filename</CODE></EM></TT> switch to specify =
another=20
file. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dslave-mode></A>3.3.3.&nbsp;Slave=20
mode</H3></DIV></DIV></DIV>
<P>The slave mode allows you to build simple frontends to <SPAN=20
class=3Dapplication>MPlayer</SPAN>. When run with the <TT =
class=3Doption>-slave</TT>=20
option <SPAN class=3Dapplication>MPlayer</SPAN> will read commands =
separated by a=20
newline (\n) from stdin. The commands are documented in the <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/slave.txt"=20
target=3D_top>slave.txt</A> file. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dstreaming></A>3.4.&nbsp;Streaming=20
from network or pipes</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> can play files from the =
network, using=20
the HTTP, FTP, MMS or RTSP/RTP protocol. </P>
<P>Playing works simply by passing the URL on the command line. <SPAN=20
class=3Dapplication>MPlayer</SPAN> honors the <CODE =
class=3Denvar>http_proxy</CODE>=20
environment variable, using a proxy if available. Proxies can also be =
forced:=20
</P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>http_proxy://proxy.micorsops.com:3128/http://mi=
corsops.com:80/stream.asf</CODE></EM>
</PRE>
<P></P>
<P><SPAN class=3Dapplication>MPlayer</SPAN> can read from stdin (<SPAN=20
class=3Demphasis><EM>not</EM></SPAN> named pipes). This can for example =
be used to=20
play from FTP: </P><PRE class=3Dscreen>wget <EM =
class=3Dreplaceable><CODE>ftp://micorsops.com/something.avi</CODE></EM> =
-O - | mplayer -
</PRE>
<P></P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>It is also recommended to enable <TT class=3Doption>-cache</TT> when =
playing=20
from the network: </P><PRE class=3Dscreen>wget <EM =
class=3Dreplaceable><CODE>ftp://micorsops.com/something.avi</CODE></EM> =
-O - | mplayer -cache 8192 -
</PRE>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dstreaming-save></A>3.4.1.&nbsp;Saving =
streamed=20
content</H3></DIV></DIV></DIV>
<P>Once you succeed in making <SPAN class=3Dapplication>MPlayer</SPAN> =
play your=20
favorite internet stream, you can use the option <TT=20
class=3Doption>-dumpstream</TT> to save the stream into a file. For =
example: </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>http://217.71.208.37:8006</CODE></EM> =
-dumpstream -dumpfile <EM =
class=3Dreplaceable><CODE>stream.asf</CODE></EM>
</PRE>
<P>will save the content streamed from <EM=20
class=3Dreplaceable><CODE>http://217.71.208.37:8006</CODE></EM> into <EM =

class=3Dreplaceable><CODE>stream.asf</CODE></EM>. This works with all =
protocols=20
supported by <SPAN class=3Dapplication>MPlayer</SPAN>, like MMS, RSTP, =
and so=20
forth. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A name=3Dedl></A>3.5.&nbsp;Edit =
Decision=20
Lists (EDL)</H2></DIV></DIV></DIV>
<P>The edit decision list (EDL) system allows you to automatically skip =
or mute=20
sections of videos during playback, based on a movie specific EDL =
configuration=20
file. </P>
<P>This is useful for those who may want to watch a film in =
"family-friendly"=20
mode. You can cut out any violence, profanity, Jar-Jar Binks .. from a =
movie=20
according to your own personal preferences. Aside from this, there are =
other=20
uses, like automatically skipping over commercials in video files you =
watch.=20
</P>
<P>The EDL file format is pretty bare-bones. There is one command per =
line that=20
indicates what to do (skip/mute) and when to do it (using pts in =
seconds). </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dedl_using></A>3.5.1.&nbsp;Using an EDL=20
file</H3></DIV></DIV></DIV>
<P>Include the <TT class=3Doption>-edl &lt;filename&gt;</TT> flag when =
you run=20
<SPAN class=3Dapplication>MPlayer</SPAN>, with the name of the EDL file =
you want=20
applied to the video. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dedl_making></A>3.5.2.&nbsp;Making an EDL=20
file</H3></DIV></DIV></DIV>
<P>The current EDL file format is: </P><PRE =
class=3Dprogramlisting>[begin second] [end second] [action]</PRE>
<P>Where the seconds are floating-point numbers and the action is either =
<CODE=20
class=3Dliteral>0</CODE> for skip or <CODE class=3Dliteral>1</CODE> for =
mute.=20
Example: </P><PRE class=3Dprogramlisting>5.3   7.1    0
15    16.7   1
420   422    0
</PRE>
<P>This will skip from second 5.3 to second 7.1 of the video, then mute =
at 15=20
seconds, unmute at 16.7 seconds and skip from second 420 to second 422 =
of the=20
video. These actions will be performed when the playback timer reaches =
the times=20
given in the file. </P>
<P>To create an EDL file to work from, use the <TT =
class=3Doption>-edlout=20
&lt;filename&gt;</TT> flag. During playback, just hit <SPAN=20
class=3Dkeycap><B>i</B></SPAN> to mark the beginning and end of a skip =
block. A=20
corresponding entry will be written to the file for that time. You can =
then go=20
back and fine-tune the generated EDL file as well as change the default=20
operation which is to skip the block described by each line. =
</P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dadvaudio></A>3.6.&nbsp;Advanced=20
audio</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dadvaudio-surround></A>3.6.1.&nbsp;Surround/Multichannel=20
playback</H3></DIV></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dadvaudio-surround-DVD></A>3.6.1.1.&nbsp;DVDs</H4></DIV></DIV></DIV=
>
<P>Most DVDs and many other files include surround sound. <SPAN=20
class=3Dapplication>MPlayer</SPAN> supports surround playback but does =
not enable=20
it by default because stereo equipment is by far more common. To play a =
file=20
that has more than two channels of audio use <TT =
class=3Doption>-channels</TT>.=20
For example, to play a DVD with 5.1 audio: </P><PRE =
class=3Dscreen>mplayer dvd://1 -channels 6</PRE>
<P>Note that despite the name "5.1" there are actually six discrete =
channels. If=20
you have surround sound equipment it is safe to put the <TT=20
class=3Doption>channels</TT> option in your <SPAN =
class=3Dapplication>MPlayer</SPAN>=20
configuration file <TT class=3Dfilename>~/.mplayer/config</TT>. For =
example, to=20
make quadraphonic playback the default, add this line: </P><PRE =
class=3Dprogramlisting>channels=3D4</PRE>
<P><SPAN class=3Dapplication>MPlayer</SPAN> will then output audio in =
four=20
channels when all four channels are available. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dadvaudio-surround-stereoinfour></A>3.6.1.2.&nbsp;Playing=20
stereo files to four speakers</H4></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> does not duplicate any =
channels by=20
default, and neither do most audio drivers. If you want to do that =
manually:=20
</P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> -af =
channels=3D2:2:0:1:0:0</PRE>
<P>See the section on <A title=3D"3.6.2.3.&nbsp;Channel copying/moving"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
advaudio-channels-copying">channel=20
copying</A> for an explanation. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dadvaudio-surround-passthrough></A>3.6.1.3.&nbsp;AC-3/DTS=20
Passthrough</H4></DIV></DIV></DIV>
<P>DVDs usually have surround audio encoded in AC-3 (Dolby Digital) or =
DTS=20
(Digital Theater System) format. Some modern audio equipment is capable =
of=20
decoding these formats internally. <SPAN =
class=3Dapplication>MPlayer</SPAN> can be=20
configured to relay the audio data without decoding it. This will only =
work if=20
you have a S/PDIF (Sony/Philips Digital Interface) jack in your sound =
card. </P>
<P>If your audio equipment can decode both AC-3 and DTS, you can safely =
enable=20
passthrough for both formats. Otherwise, enable passthrough for only the =
format=20
your equipment supports. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>To enable passthrough on the command line:</B></P>
<UL type=3Ddisc>
  <LI>
  <P>For AC-3 only, use <TT class=3Doption>-ac hwac3</TT> </P>
  <LI>
  <P>For DTS only, use <TT class=3Doption>-ac hwdts</TT> </P>
  <LI>
  <P>For both AC-3 and DTS, use <TT class=3Doption>-afm hwac3</TT>=20
</P></LI></UL></DIV>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>To enable passthrough in the <SPAN=20
class=3Dapplication>MPlayer</SPAN> configuration file: </B></P>
<UL type=3Ddisc>
  <LI>
  <P>For AC-3 only, use <TT class=3Doption>ac=3Dhwac3,</TT> </P>
  <LI>
  <P>For DTS only, use <TT class=3Doption>ac=3Dhwdts,</TT> </P>
  <LI>
  <P>For both AC-3 and DTS, use <TT class=3Doption>afm=3Dhwac3</TT>=20
</P></LI></UL></DIV>
<P>Note that there is a comma (",") at the end of <TT=20
class=3Doption>ac=3Dhwac3,</TT> and <TT class=3Doption>ac=3Dhwdts,</TT>. =
This will make=20
<SPAN class=3Dapplication>MPlayer</SPAN> fall back on the codecs it =
normally uses=20
when playing a file that does not have AC-3 or DTS audio. <TT=20
class=3Doption>afm=3Dhwac3</TT> does not need a comma; <SPAN=20
class=3Dapplication>MPlayer</SPAN> will fall back anyway when an audio =
family is=20
specified. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dhwmpa-surround-passthrough></A>3.6.1.4.&nbsp;MPEG audio=20
Passthrough</H4></DIV></DIV></DIV>
<P>Digital TV transmissions (such as DVB and ATSC) and some DVDs usually =
have=20
MPEG audio streams (in particular MP2). Some MPEG hardware decoders such =
as=20
full-featured DVB cards and DXR2 adapters can natively decode this =
format. <SPAN=20
class=3Dapplication>MPlayer</SPAN> can be configured to relay the audio =
data=20
without decoding it. </P>
<P>To use this codec: </P><PRE class=3Dscreen> mplayer -ac hwmpa </PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dadvaudio-surround-matrix></A>3.6.1.5.&nbsp;Matrix-encoded=20
audio</H4></DIV></DIV></DIV>
<P><SPAN class=3Demphasis><EM>***TODO***</EM></SPAN> </P>
<P>This section has yet to be written and cannot be completed until =
somebody=20
provides sample files for us to test. If you have any matrix-encoded =
audio=20
files, know where to find some, or have any information that could be =
helpful,=20
please send a message to the <A=20
href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-docs"=20
target=3D_top>MPlayer-DOCS</A> mailing list. Put "[matrix-encoded =
audio]" in the=20
subject line. </P>
<P>If no files or further information are forthcoming this section will =
be=20
dropped. </P>
<P>Good links: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><A =
href=3D"http://electronics.howstuffworks.com/surround-sound5.htm"=20
  =
target=3D_top>http://electronics.howstuffworks.com/surround-sound5.htm</A=
> </P>
  <LI>
  <P><A =
href=3D"http://www.extremetech.com/article2/0,1697,1016875,00.asp"=20
  =
target=3D_top>http://www.extremetech.com/article2/0,1697,1016875,00.asp</=
A>=20
  </P></LI></UL></DIV>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dadvaudio-surround-hrtf></A>3.6.1.6.&nbsp;Surround=20
emulation in headphones</H4></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> includes an HRTF (Head =
Related=20
Transfer Function) filter based on an <A=20
href=3D"http://sound.media.mit.edu/KEMAR.html" target=3D_top>MIT =
project</A> wherein=20
measurements were taken from microphones mounted on a dummy human head. =
</P>
<P>Although it is not possible to exactly imitate a surround system, =
<SPAN=20
class=3Dapplication>MPlayer</SPAN>'s HRTF filter does provide more =
spatially=20
immersive audio in 2-channel headphones. Regular downmixing simply =
combines all=20
the channels into two; besides combining the channels, <TT=20
class=3Doption>hrtf</TT> generates subtle echoes, increases the stereo =
separation=20
slightly, and alters the volume of some frequencies. Whether HRTF sounds =
better=20
may be dependent on the source audio and a matter of personal taste, but =
it is=20
definitely worth trying out. </P>
<P>To play a DVD with HRTF: </P><PRE class=3Dscreen>mplayer dvd://1 =
-channels 6 -af hrtf</PRE>
<P></P>
<P><TT class=3Doption>hrtf</TT> only works well with 5 or 6 channels. =
Also, <TT=20
class=3Doption>hrtf</TT> requires 48 kHz audio. DVD audio is already 48 =
kHz, but=20
if you have a file with a different sampling rate that you want to play =
using=20
<TT class=3Doption>hrtf</TT> you must resample it: </P><PRE =
class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> -channels 6 -af =
resample=3D48000,hrtf
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dadvaudio-surround-troubleshooting></A>3.6.1.7.&nbsp;Troubleshootin=
g</H4></DIV></DIV></DIV>
<P>If you do not hear any sound out of your surround channels, check =
your mixer=20
settings with a mixer program such as <SPAN =
class=3Dapplication>alsamixer</SPAN>;=20
audio outputs are often muted and set to zero volume by default.=20
</P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dadvaudio-channels></A>3.6.2.&nbsp;Channel=20
manipulation</H3></DIV></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dadvaudio-channels-general></A>3.6.2.1.&nbsp;General=20
information</H4></DIV></DIV></DIV>
<P>Unfortunately, there is no standard for how channels are ordered. The =
orders=20
listed below are those of AC-3 and are fairly typical; try them and see =
if your=20
source matches. Channels are numbered starting with 0. </P>
<DIV class=3Dorderedlist>
<P class=3Dtitle><B>mono</B></P>
<OL type=3D1 compact>
  <LI value=3D0>
  <P>center</P></LI></OL></DIV>
<P></P>
<DIV class=3Dorderedlist>
<P class=3Dtitle><B>stereo</B></P>
<OL type=3D1 compact>
  <LI value=3D0>
  <P>left</P>
  <LI>
  <P>right</P></LI></OL></DIV>
<P></P>
<DIV class=3Dorderedlist>
<P class=3Dtitle><B>quadraphonic</B></P>
<OL type=3D1 compact>
  <LI value=3D0>
  <P>left front</P>
  <LI>
  <P>right front</P>
  <LI>
  <P>left rear</P>
  <LI>
  <P>right rear</P></LI></OL></DIV>
<P></P>
<DIV class=3Dorderedlist>
<P class=3Dtitle><B>surround 4.0</B></P>
<OL type=3D1 compact>
  <LI value=3D0>
  <P>left front</P>
  <LI>
  <P>right front</P>
  <LI>
  <P>center rear</P>
  <LI>
  <P>center front</P></LI></OL></DIV>
<P></P>
<DIV class=3Dorderedlist>
<P class=3Dtitle><B>surround 5.0</B></P>
<OL type=3D1 compact>
  <LI value=3D0>
  <P>left front</P>
  <LI>
  <P>right front</P>
  <LI>
  <P>left rear</P>
  <LI>
  <P>right rear</P>
  <LI>
  <P>center front</P></LI></OL></DIV>
<P></P>
<DIV class=3Dorderedlist>
<P class=3Dtitle><B>surround 5.1</B></P>
<OL type=3D1 compact>
  <LI value=3D0>
  <P>left front</P>
  <LI>
  <P>right front</P>
  <LI>
  <P>left rear</P>
  <LI>
  <P>right rear</P>
  <LI>
  <P>center front</P>
  <LI>
  <P>subwoofer</P></LI></OL></DIV>
<P></P>
<P>The <TT class=3Doption>-channels</TT> option is used to request the =
number of=20
channels from the audio decoder. Some audio codecs use the number of =
specified=20
channels to decide if downmixing the source is necessary. Note that this =
does=20
not always affect the number of output channels. For example, using <TT=20
class=3Doption>-channels 4</TT> to play a stereo MP3 file will still =
result in=20
2-channel output since the MP3 codec will not produce the extra =
channels. </P>
<P>The <TT class=3Doption>channels</TT> audio filter can be used to =
create or=20
remove channels and is useful for controlling the number of channels =
sent to the=20
sound card. See the following sections for more information on channel=20
manipulation. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dadvaudio-channels-mono></A>3.6.2.2.&nbsp;Playing mono=20
with two speakers</H4></DIV></DIV></DIV>
<P>Mono sounds a lot better when played through two speakers - =
especially when=20
using headphones. Audio files that truly have one channel are =
automatically=20
played through two speakers; unfortunately, most files with mono sound =
are=20
actually encoded as stereo with one channel silent. The easiest and most =

foolproof way to make both speakers output the same audio is the <TT=20
class=3Doption>extrastereo</TT> filter: </P><PRE class=3Dscreen>mplayer =
<EM class=3Dreplaceable><CODE>filename</CODE></EM> -af =
extrastereo=3D0</PRE>
<P></P>
<P>This averages both channels, resulting in both channels being half as =
loud as=20
the original. The next sections have examples of other ways to do this =
without a=20
volume decrease, but they are more complex and require different options =

depending on which channel to keep. If you really need to maintain the =
volume,=20
it may be easier to experiment with the <TT class=3Doption>volume</TT> =
filter and=20
find the right value. For example: </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> -af =
extrastereo=3D0,volume=3D5
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dadvaudio-channels-copying></A>3.6.2.3.&nbsp;Channel=20
copying/moving</H4></DIV></DIV></DIV>
<P>The <TT class=3Doption>channels</TT> filter can move any or all =
channels.=20
Setting up all the suboptions for the <TT class=3Doption>channels</TT> =
filter can=20
be complicated and takes a little care. </P>
<DIV class=3Dorderedlist>
<OL type=3D1 compact>
  <LI>
  <P>Decide how many output channels you need. This is the first =
suboption. </P>
  <LI>
  <P>Count how many channel moves you will do. This is the second =
suboption.=20
  Each channel can be moved to several different channels at the same =
time, but=20
  keep in mind that when a channel is moved (even if to only one =
destination)=20
  the source channel will be empty unless another channel is moved into =
it. To=20
  copy a channel, keeping the source the same, simply move the channel =
into both=20
  the destination and the source. For example: </P><PRE =
class=3Dprogramlisting>channel 2 --&gt; channel 3
channel 2 --&gt; channel 2</PRE>
  <P></P>
  <LI>
  <P>Write out the channel copies as pairs of suboptions. Note that the =
first=20
  channel is 0, the second is 1, etc. The order of these suboptions does =
not=20
  matter as long as they are properly grouped into <EM=20
  class=3Dreplaceable><CODE>source:destination</CODE></EM> pairs.=20
</P></LI></OL></DIV>
<P></P>
<H5><A name=3Did2530728></A>Example: one channel in two speakers</H5>
<P>Here is an example of another way to play one channel in both =
speakers.=20
Suppose for this example that the left channel should be played and the =
right=20
channel discarded. Following the steps above: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>In order to provide an output channel for each of the two speakers, =
the=20
  first suboption must be "2". </P>
  <LI>
  <P>The left channel needs to be moved to the right channel, and also =
must be=20
  moved to itself so it won't be empty. This is a total of two moves, =
making the=20
  second suboption "2" as well. </P>
  <LI>
  <P>To move the left channel (channel 0) into the right channel =
(channel 1),=20
  the suboption pair is "0:1", "0:0" moves the left channel onto itself. =

  </P></LI></OL></DIV>
<P>Putting that all together gives: </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> -af =
channels=3D2:2:0:1:0:0
</PRE>
<P></P>
<P>The advantage this example has over <TT =
class=3Doption>extrastereo</TT> is that=20
the volume of each output channel is the same as the input channel. The=20
disadvantage is that the suboptions must be changed to "2:2:1:0:1:1" =
when the=20
desired audio is in the right channel. Also, it is more difficult to =
remember=20
and type. </P>
<H5><A name=3Did2530789></A>Example: left channel in two speakers =
shortcut</H5>
<P>There is actually a much easier way to use the <TT =
class=3Doption>channels</TT>=20
filter for playing the left channel in both speakers: </P><PRE =
class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> -af channels=3D1</PRE>
<P>The second channel is discarded and, with no further suboptions, the =
single=20
remaining channel is left alone. Sound card drivers automatically play=20
single-channel audio in both speakers. This only works when the desired =
channel=20
is on the left. </P>
<H5><A name=3Did2530816></A>Example: duplicate front channels to the =
rear</H5>
<P>Another common operation is to duplicate the front channels and play =
them=20
back on the rear speakers of a quadraphonic setup. </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>There should be four output channels. The first suboption is "4". =
</P>
  <LI>
  <P>Each of the two front channels needs to be moved to the =
corresponding rear=20
  channel and also to itself. This is four moves, so the second =
suboption is=20
  "4". </P>
  <LI>
  <P>The left front (channel 0) needs to moved to the left rear (channel =
2):=20
  "0:2". The left front also needs to be moved to itself: "0:0". The =
right front=20
  (channel 1) is moved to the right rear (channel 3): "1:3", and also to =
itself:=20
  "1:1". </P></LI></OL></DIV>
<P>Combine all the suboptions to get: </P><PRE class=3Dscreen>mplayer =
<EM class=3Dreplaceable><CODE>filename</CODE></EM> -af =
channels=3D4:4:0:2:0:0:1:3:1:1
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dadvaudio-channels-mixing></A>3.6.2.4.&nbsp;Channel=20
mixing</H4></DIV></DIV></DIV>
<P>The <TT class=3Doption>pan</TT> filter can mix channels in =
user-specified=20
proportions. This allows for everything the <TT =
class=3Doption>channels</TT>=20
filter can do and more. Unfortunately, the suboptions are much more =
complicated.=20
</P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>Decide how many channels to work with. You may need to specify this =
with=20
  <TT class=3Doption>-channels</TT> and/or <TT class=3Doption>-af =
channels</TT>.=20
  Later examples will show when to use which. </P>
  <LI>
  <P>Decide how many channels to feed into <TT class=3Doption>pan</TT> =
(further=20
  decoded channels are discarded). This is the first suboption, and it =
also=20
  controls how many channels to employ for output. </P>
  <LI>
  <P>The remaining suboptions specify how much of each channel gets =
mixed into=20
  each other channel. This is the complicated part. To break the task =
down,=20
  split the suboptions into several sets, one set for each output =
channel. Each=20
  suboption within a set corresponds to an input channel. The number you =
specify=20
  will be the percentage of the input channel that gets mixed into the =
output=20
  channel. </P>
  <P><TT class=3Doption>pan</TT> accepts values from 0 to 512, yielding =
0% to=20
  51200% of the original volume. Be careful when using values greater =
than 1.=20
  Not only can this give you very high volume, but if you exceed the =
sample=20
  range of your sound card you may hear painful pops and clicks. If you =
want you=20
  can follow <TT class=3Doption>pan</TT> with <TT =
class=3Doption>,volume</TT> to=20
  enable clipping, but it is best to keep the values of <TT=20
  class=3Doption>pan</TT> low enough that clipping is not necessary.=20
</P></LI></OL></DIV>
<P></P>
<H5><A name=3Did2530960></A>Example: one channel in two speakers</H5>
<P>Here is yet another example for playing the left channel in two =
speakers.=20
Follow the steps above: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P><TT class=3Doption>pan</TT> should output two channels, so the =
first=20
  suboption is "2". </P>
  <LI>
  <P>Since we have two input channels, there will be two sets of =
suboptions.=20
  Since there are also two output channels, there will be two suboptions =
per=20
  set. The left channel from the file should go with full volume to the =
new left=20
  and the right channels. Thus the first set of suboptions is "1:1". The =
right=20
  channel should be discarded, so the second would be "0:0". Any 0 =
values at the=20
  end can be left out, but for ease of understanding we will keep them.=20
</P></LI></OL></DIV>
<P>Putting those options together gives: </P><PRE class=3Dscreen>mplayer =
<EM class=3Dreplaceable><CODE>filename</CODE></EM> -af =
pan=3D2:1:1:0:0</PRE>
<P>If the right channel is desired instead of the left, the suboptions =
to <TT=20
class=3Doption>pan</TT> will be "2:0:0:1:1". </P>
<H5><A name=3Did2531012></A>Example: left channel in two speakers =
shortcut</H5>
<P>As with <TT class=3Doption>channels</TT>, there is a shortcut that =
only works=20
with the left channel: </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> -af pan=3D1:1</PRE>
<P>Since <TT class=3Doption>pan</TT> has only one channel of input (the =
other=20
channel is discarded), there is only one set with one suboption, which =
specifies=20
that the only channel gets 100% of itself. </P>
<H5><A name=3Did2531041></A>Example: downmixing 6-channel PCM</H5>
<P><SPAN class=3Dapplication>MPlayer</SPAN>'s decoder for 6-channel PCM =
is not=20
capable of downmixing. Here is a way to downmix PCM using <TT=20
class=3Doption>pan</TT>: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>The number of output channels is 2, so the first suboption is "2". =
</P>
  <LI>
  <P>With six input channels there will be six sets of options. =
Fortunately,=20
  since we only care about the output of the first two channels, we only =
need to=20
  make two sets; the remaining four sets can be omitted. Beware that not =
all=20
  multichannel audio files have the same channel order! This example=20
  demonstrates downmixing a file with the same channels as AC-3 5.1: =
</P><PRE class=3Dprogramlisting>0 - front left
1 - front right
2 - rear left
3 - rear right
4 - center front
5 - subwoofer</PRE>
  <P>The first set of suboptions lists the percentages of the original =
volume,=20
  in order, which each output channel should receive from the front left =

  channel: "1:0". The front right channel should go into the right =
output:=20
  "0:1". The same for the rear channels: "1:0" and "0:1". The center =
channel=20
  goes into both output channels with half volume: "0.5:0.5", and the =
subwoofer=20
  goes into both with full volume: "1:1". </P></LI></OL></DIV>
<P>Put all that together, for: </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>6-channel.wav</CODE></EM> -af =
pan=3D2:1:0:0:1:1:0:0:1:0.5:0.5:1:1
</PRE>
<P>The percentages listed above are only a rough example. Feel free to =
tweak=20
them. </P>
<H5><A name=3Did2531111></A>Example: Playing 5.1 audio on big speakers =
without a=20
subwoofer</H5>
<P>If you have a huge pair of front speakers you may not want to waste =
any money=20
on buying a subwoofer for a complete 5.1 sound system. If you use <TT=20
class=3Doption>-channels 5</TT> to request that liba52 decode 5.1 audio =
in 5.0,=20
the subwoofer channel is simply discarded. If you want to distribute the =

subwoofer channel yourself you need to downmix manually with <TT=20
class=3Doption>pan</TT>: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>Since <TT class=3Doption>pan</TT> needs to examine all six =
channels, specify=20
  <TT class=3Doption>-channels 6</TT> so liba52 decodes them all. </P>
  <LI>
  <P><TT class=3Doption>pan</TT> outputs to only five channels, the =
first=20
  suboption is 5. </P>
  <LI>
  <P>Six input channels and five output channels means six sets of five=20
  suboptions. </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Ddisc compact>
    <LI>
    <P>The left front channel only replicates onto itself: "1:0:0:0:0" =
</P>
    <LI>
    <P>Same for the right front channel: "0:1:0:0:0" </P>
    <LI>
    <P>Same for the left rear channel: "0:0:1:0:0" </P>
    <LI>
    <P>And also the same for the right rear channel: "0:0:0:1:0" </P>
    <LI>
    <P>Center front, too: "0:0:0:0:1" </P>
    <LI>
    <P>And now we have to decide what to do with the subwoofer, e.g. =
half into=20
    front right and front left: "0.5:0.5:0:0:0" </P></LI></UL></DIV>
  <P></P></LI></OL></DIV>
<P>Combine all those options to get: </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>dvd://1</CODE></EM> -channels 6 -af =
pan=3D5:1:0:0:0:0:0:1:0:0:0:0:0:1:0:0:0:0:0:1:0:0:0:0:0:1:0.5:0.5:0:0:0
</PRE>
<P></P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dadvaudio-volume></A>3.6.3.&nbsp;Software =
Volume=20
adjustment</H3></DIV></DIV></DIV>
<P>Some audio tracks are too quiet to be heard comfortably without=20
amplification. This becomes a problem when your audio equipment cannot =
amplify=20
the signal for you. The <TT class=3Doption>-softvol</TT> option directs =
<SPAN=20
class=3Dapplication>MPlayer</SPAN> to use an internal mixer. You can =
then use the=20
volume adjustment keys (by default <SPAN class=3Dkeycap><B>9</B></SPAN> =
and <SPAN=20
class=3Dkeycap><B>0</B></SPAN>) to reach much higher volume levels. Note =
that this=20
does not bypass your sound card's mixer; <SPAN =
class=3Dapplication>MPlayer</SPAN>=20
only amplifies the signal before sending it to your sound card. The =
following=20
example is a good start: </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>quiet-file</CODE></EM> -softvol -softvol-max =
300
</PRE>
<P>The <TT class=3Doption>-softvol-max</TT> option specifies the maximum =
allowable=20
output volume as a percentage of the original volume. For example, <TT=20
class=3Doption>-softvol-max 200</TT> would allow the volume to be =
adjusted up to=20
twice its original level. It is safe to specify a large value with <TT=20
class=3Doption>-softvol-max</TT>; the higher volume will not be used =
until you use=20
the volume adjustment keys. The only disadvantage of a large value is =
that,=20
since <SPAN class=3Dapplication>MPlayer</SPAN> adjusts volume by a =
percentage of=20
the maximum, you will not have as precise control when using the volume=20
adjustment keys. Use a lower value with <TT =
class=3Doption>-softvol-max</TT>=20
and/or specify <TT class=3Doption>-volstep 1</TT> if you need higher =
precision.=20
</P>
<P>The <TT class=3Doption>-softvol</TT> option works by controlling the =
<TT=20
class=3Doption>volume</TT> audio filter. If you want to play a file at a =
certain=20
volume from the beginning you can specify <TT class=3Doption>volume</TT> =
manually:=20
</P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>quiet-file</CODE></EM> -af volume=3D10</PRE>
<P>This will play the file with a ten decibel gain. Be careful when =
using the=20
<TT class=3Doption>volume</TT> filter - you could easily hurt your ears =
if you use=20
too high a value. Start low and work your way up gradually until you get =
a feel=20
for how much adjustment is required. Also, if you specify excessively =
high=20
values, <TT class=3Doption>volume</TT> may need to clip the signal to =
avoid=20
sending your sound card data that is outside the allowable range; this =
will=20
result in distorted audio. </P></DIV></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Dcd-dvd></A>Chapter&nbsp;4.&nbsp;CD/DVD=20
usage</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
drives">4.1.=20
  CD/DVD drives</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
drives_linux">4.1.1.=20
    Linux</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
drives_freebsd">4.1.2.=20
    FreeBSD</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dvd">4.2.=20
  DVD playback</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vcd">4.3.=20
  VCD playback</A></SPAN></DT></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Ddrives></A>4.1.&nbsp;CD/DVD=20
drives</H2></DIV></DIV></DIV>
<P>Modern CD-ROM drives can attain very high head speeds, yet some =
CD-ROM drives=20
are capable of running at reduced speeds. There are several reasons that =
might=20
make you consider changing the speed of a CD-ROM drive: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>There have been reports of read errors at high speeds, especially =
with=20
  badly pressed CD-ROMs. Reducing the speed can prevent data loss under =
these=20
  circumstances. </P>
  <LI>
  <P>Many CD-ROM drives are annoyingly loud, a lower speed may reduce =
the noise.=20
  </P></LI></UL></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Ddrives_linux></A>4.1.1.&nbsp;Linux</H3></DIV></DIV></DIV>
<P>You can reduce the speed of IDE CD-ROM drives with <SPAN><STRONG=20
class=3Dcommand>hdparm</STRONG></SPAN>, <SPAN><STRONG=20
class=3Dcommand>setcd</STRONG></SPAN> or <SPAN><STRONG=20
class=3Dcommand>cdctl</STRONG></SPAN>. It works like this: </P><PRE =
class=3Dscreen>hdparm -E <EM =
class=3Dreplaceable><CODE>[speed]</CODE></EM> <EM =
class=3Dreplaceable><CODE>[cdrom device]</CODE></EM></PRE>
<P></P><PRE class=3Dscreen>setcd -x <EM =
class=3Dreplaceable><CODE>[speed]</CODE></EM> <EM =
class=3Dreplaceable><CODE>[cdrom device]</CODE></EM></PRE>
<P></P><PRE class=3Dscreen>cdctl -bS <EM =
class=3Dreplaceable><CODE>[speed]</CODE></EM></PRE>
<P></P>
<P>If you are using SCSI emulation, you might have to apply the settings =
to the=20
real IDE device, not the emulated SCSI device. </P>
<P>If you have root privileges the following command may also help: =
</P><PRE class=3Dscreen>echo file_readahead:2000000 &gt; /proc/ide/<EM =
class=3Dreplaceable><CODE>[cdrom device]</CODE></EM>/settings</PRE>
<P></P>
<P>This sets prefetched file reading to 2MB, which helps with scratched =
CD-ROMs.=20
If you set it to too high, the drive will continuously spin up and down, =
and=20
will dramatically decrease the performance. It is recommended that you =
also tune=20
your CD-ROM drive with <SPAN><STRONG =
class=3Dcommand>hdparm</STRONG></SPAN>: </P><PRE class=3Dscreen>hdparm =
-d1 -a8 -u1 <EM class=3Dreplaceable><CODE>[cdrom =
device]</CODE></EM></PRE>
<P></P>
<P>This enables DMA access, read-ahead, and IRQ unmasking (read the=20
<SPAN><STRONG class=3Dcommand>hdparm</STRONG></SPAN> man page for a =
detailed=20
explanation). </P>
<P>Please refer to "<TT class=3Dfilename>/proc/ide/<EM=20
class=3Dreplaceable><CODE>[cdrom device]</CODE></EM>/settings</TT>" for=20
fine-tuning your CD-ROM. </P>
<P>SCSI drives do not have a uniform way of setting these parameters (Do =
you=20
know one? Tell us!) There is a tool that works for <A=20
href=3D"http://das.ist.org/~georg/" target=3D_top>Plextor SCSI =
drives</A>.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Ddrives_freebsd></A>4.1.2.&nbsp;FreeBSD</H3></DIV></DIV></DIV>
<P>speed: </P><PRE class=3Dscreen>cdcontrol [-f <EM =
class=3Dreplaceable><CODE>device</CODE></EM>] speed <EM =
class=3Dreplaceable><CODE>[speed]</CODE></EM>
</PRE>
<P></P>
<P>DMA: </P><PRE class=3Dscreen>sysctl hw.ata.atapi_dma=3D1
</PRE>
<P></P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A name=3Ddvd></A>4.2.&nbsp;DVD=20
playback</H2></DIV></DIV></DIV>
<P>For the complete list of available options, please read the man page. =
The=20
syntax to play a standard DVD is as follows: </P><PRE =
class=3Dscreen>mplayer dvd://<EM =
class=3Dreplaceable><CODE>&lt;track&gt;</CODE></EM> [-dvd-device <EM =
class=3Dreplaceable><CODE>&lt;device&gt;</CODE></EM>]
</PRE>
<P></P>
<P>Example: </P><PRE class=3Dscreen>mplayer dvd://1 -dvd-device =
/dev/hdc</PRE>
<P></P>
<P>If you have compiled <SPAN class=3Dapplication>MPlayer</SPAN> with =
dvdnav=20
support, the syntax is the same, except that you need to use dvdnav:// =
instead=20
of dvd://. </P>
<P>The default DVD device is <TT class=3Dfilename>/dev/dvd</TT>. If your =
setup=20
differs, make a symlink or specify the correct device on the command =
line with=20
the <TT class=3Doption>-dvd-device</TT> option. </P>
<P><SPAN class=3Dapplication>MPlayer</SPAN> uses <CODE=20
class=3Dsystemitem>libdvdread</CODE> and <CODE =
class=3Dsystemitem>libdvdcss</CODE>=20
for DVD playback and decryption. These two libraries are contained in =
the <SPAN=20
class=3Dapplication>MPlayer</SPAN> source tree, you do not have to =
install them=20
separately. You can also use system-wide versions of the two libraries, =
but this=20
solution is not recommended, as it can result in bugs, library =
incompatibilities=20
and slower speed. </P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>In case of DVD decoding problems, try disabling supermount, or any =
other such=20
facilities. Some RPC-2 drives may also require setting the region code.=20
</P></DIV>
<P><B>DVD structure.&nbsp;</B> DVD disks have 2048 bytes per sector with =

ECC/CRC. They usually have an UDF filesystem on a single track, =
containing=20
various files (small .IFO and .BUP files and big (1GB) .VOB files). They =
are=20
real files and can be copied/played from the mounted filesystem of an=20
unencrypted DVD. </P>
<P>The .IFO files contain the movie navigation information =
(chapter/title/angle=20
map, language table, etc) and are needed to read and interpret the .VOB =
content=20
(movie). The .BUP files are backups of them. They use <SPAN=20
class=3Dbold><STRONG>sectors</STRONG></SPAN> everywhere, so you need to =
use raw=20
addressing of sectors of the disc to implement DVD navigation or decrypt =
the=20
content. </P>
<P>DVD support needs raw sector-based access to the device. =
Unfortunately you=20
must (under Linux) be root to get the sector address of a file. That's =
why we=20
don't use the kernel's filesystem driver at all, instead we reimplement =
it in=20
userspace. <CODE class=3Dsystemitem>libdvdread</CODE> 0.9.x does this. =
The kernel=20
UDF filesystem driver is not needed as they already have their own =
builtin UDF=20
filesystem driver. Also the DVD does not have to be mounted as only the =
raw=20
sector-based access is used. </P>
<P>Sometimes <TT class=3Dfilename>/dev/dvd</TT> cannot be read by users, =
so the=20
<CODE class=3Dsystemitem>libdvdread</CODE> authors implemented an =
emulation layer=20
which transfers sector addresses to filenames+offsets, to emulate raw =
access on=20
top of a mounted filesystem or even on a hard disk. </P>
<P><CODE class=3Dsystemitem>libdvdread</CODE> even accepts the =
mountpoint instead=20
of the device name for raw access and checks <TT=20
class=3Dfilename>/proc/mounts</TT> to get the device name. It was =
developed for=20
Solaris, where device names are dynamically allocated. </P>
<P><B>DVD decryption.&nbsp;</B> DVD decryption is done by <CODE=20
class=3Dsystemitem>libdvdcss</CODE>. The method can be specified through =
the <CODE=20
class=3Denvar>DVDCSS_METHOD</CODE> environment variable, see the manual =
page for=20
details. </P>
<P>RPC-1 DVD drives only protect region settings through software. RPC-2 =
drives=20
have a hardware protection that allows 5 changes only. It might be=20
needed/recommended to upgrade the firmware to RPC-1 if you have a RPC-2 =
DVD=20
drive. You can try finding firmware upgrades for your drive on the =
internet, <A=20
href=3D"http://forum.rpc-1.com/dl_all.php" target=3D_top>this firmware =
forum</A> may=20
be a good starting point for your search. If there is no firmware =
upgrade=20
available for your device, use the <A=20
href=3D"http://linvdr.org/projects/regionset/" target=3D_top>regionset =
tool</A> to=20
set the region code of your DVD drive (under Linux). <SPAN=20
class=3Dbold><STRONG>Warning</STRONG></SPAN>: You can only set the =
region 5 times.=20
</P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A name=3Dvcd></A>4.3.&nbsp;VCD=20
playback</H2></DIV></DIV></DIV>
<P>For the complete list of available options, please read the man page. =
The=20
Syntax for a standard Video CD (VCD) is as follows: </P><PRE =
class=3Dscreen>mplayer vcd://<EM =
class=3Dreplaceable><CODE>&lt;track&gt;</CODE></EM> [-cdrom-device <EM =
class=3Dreplaceable><CODE>&lt;device&gt;</CODE></EM>]</PRE>
<P>Example: </P><PRE class=3Dscreen>mplayer vcd://2 -cdrom-device =
/dev/hdc</PRE>
<P>The default VCD device is <TT class=3Dfilename>/dev/cdrom</TT>. If =
your setup=20
differs, make a symlink or specify the correct device on the command =
line with=20
the <TT class=3Doption>-cdrom-device</TT> option. </P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>At least Plextor and some Toshiba SCSI CD-ROM drives have horrible=20
performance reading VCDs. This is because the CDROMREADRAW <CODE=20
class=3Dsystemitem>ioctl</CODE> is not fully implemented for these =
drives. If you=20
have some knowledge of SCSI programming, please <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/patches.txt" =
target=3D_top>help=20
us</A> implement generic SCSI support for VCDs. </P></DIV>
<P>In the meantime you can extract data from VCDs with <A=20
href=3D"http://ftp.ntut.edu.tw/ftp/OS/Linux/packages/X/viewers/readvcd/" =

target=3D_top>readvcd</A> and play the resulting file with <SPAN=20
class=3Dapplication>MPlayer</SPAN>. </P>
<P><B>VCD structure.&nbsp;</B> A Video CD (VCD) is made up of CD-ROM XA =
sectors,=20
i.e. CD-ROM mode 2 form 1 and 2 tracks: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>The first track is in mode 2 form 2 format which means it uses L2 =
error=20
  correction. The track contains an ISO-9660 filesystem with 2048 =
bytes/sector.=20
  This filesystem contains VCD metadata information, as well as still =
frames=20
  often used in menus. MPEG segments for menus can also be stored in =
this first=20
  track, but the MPEGs have to be broken up into a series of 150-sector =
chunks.=20
  The ISO-9660 filesystem may contain other files or programs that are =
not=20
  essential for VCD operation. </P>
  <LI>
  <P>The second and remaining tracks are generally raw 2324 bytes/sector =
MPEG=20
  (movie) tracks, containing one MPEG PS data packet per sector. These =
are in=20
  mode 2 form 1 format, so they store more data per sector at the loss =
of some=20
  error correction. It is also legal to have CD-DA tracks in a VCD after =
the=20
  first track as well. On some operating systems there is some trickery =
that=20
  goes on to make these non-ISO-9660 tracks appear in a filesystem. On =
other=20
  operating systems like GNU/Linux this is not the case (yet). Here the =
MPEG=20
  data <SPAN class=3Dbold><STRONG>cannot be mounted</STRONG></SPAN>. As =
most=20
  movies are inside this kind of track, you should try <TT=20
  class=3Doption>vcd://2</TT> first. </P>
  <LI>
  <P>There exist VCD disks without the first track (single track and no=20
  filesystem at all). They are still playable, but cannot be mounted. =
</P>
  <LI>
  <P>The definition of the Video CD standard is called the Philips =
"White Book"=20
  and it is not generally available online as it must be purchased from =
Philips.=20
  More detailed information about Video CDs can be found in the <A=20
  =
href=3D"http://www.vcdimager.org/pub/vcdimager/manuals/0.7/vcdimager.html=
#SEC4"=20
  target=3D_top>vcdimager documentation</A>. </P></LI></UL></DIV>
<P></P>
<P><B>About .DAT files.&nbsp;</B> The ~600 MB file visible on the first =
track of=20
the mounted VCD is not a real file! It is a so called ISO gateway, =
created to=20
allow Windows to handle such tracks (Windows does not allow raw device =
access to=20
applications at all). Under Linux you cannot copy or play such files =
(they=20
contain garbage). Under Windows it is possible as its iso9660 driver =
emulates=20
the raw reading of tracks in this file. To play a .DAT file you need the =
kernel=20
driver which can be found in the Linux version of PowerDVD. It has a =
modified=20
iso9660 filesystem (<TT class=3Dfilename>vcdfs/isofs-2.4.X.o</TT>) =
driver, which=20
is able to emulate the raw tracks through this shadow .DAT file. If you =
mount=20
the disc using their driver, you can copy and even play .DAT files with =
<SPAN=20
class=3Dapplication>MPlayer</SPAN>. But it will not work with the =
standard iso9660=20
driver of the Linux kernel! Use <TT class=3Doption>vcd://</TT> instead.=20
Alternatives for VCD copying are the new <A=20
href=3D"http://www.elis.rug.ac.be/~ronsse/cdfs/" target=3D_top>cdfs</A> =
kernel=20
driver (not part of the official kernel) that shows CD sessions as image =
files=20
and <A href=3D"http://cdrdao.sf.net/" target=3D_top>cdrdao</A>, a =
bit-by-bit CD=20
grabbing/copying application. </P></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Dfaq></A>Chapter&nbsp;5.&nbsp;Frequently =
Asked=20
Questions</H2></DIV></DIV></DIV>
<DIV class=3Dqandaset>
<DL>
  <DT>5.1. <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq-development">Development</A>
  <DD>
  <DL>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535053">How=20
    do I create a proper patch for MPlayer? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535686">How=20
    do I translate MPlayer to a new language? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535719">How=20
    can I support MPlayer development? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535751">How=20
    can I become an MPlayer developer? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535793">Why=20
    don't you use autoconf/automake? </A></DT></DL>
  <DT>5.2. <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq-compilation-installation">Compilation=20
  and installation</A>
  <DD>
  <DL>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535829">Compilation=20
    fails with an error and gcc bails out with some cryptic message =
containing=20
    the phrase internal compiler error or unable to find a register to =
spill or=20
    can't find a register in class `GENERAL_REGS' while reloading `asm'. =
</A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535891">Are=20
    there binary (RPM/Debian) packages of MPlayer? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535925">How=20
    can I build a 32 bit MPlayer on a 64 bit Athlon? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535951">Configure=20
    ends with this text, and MPlayer won't compile! Your gcc does not =
support=20
    even i386 for '-march' and '-mcpu' </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535984">I=20
    have a Matrox G200/G400/G450/G550, how do I compile/use the mga_vid =
driver?=20
    </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536011">During=20
    'make', MPlayer complains about missing X11 libraries. I don't =
understand, I=20
    do have X11 installed!? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536071">Building=20
    on Mac OS 10.3 leads to several link errors. </A></DT></DL>
  <DT>5.3. <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq-general">General=20
  questions</A>
  <DD>
  <DL>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536188">Are=20
    there any mailing lists on MPlayer? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536213">I've=20
    found a nasty bug when I tried to play my favorite video! Who should =
I=20
    inform? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536236">I=20
    have problems playing files with the ... codec. Can I use them? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536273">When=20
    I start playing, I get this message but everything seems fine: Linux =
RTC=20
    init: ioctl (rtc_pie_on): Permission denied </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536302">How=20
    can I make a screenshot? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536349">What=20
    is the meaning of the numbers on the status line? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536573">There=20
    are error messages about file not found /usr/local/lib/codecs/ ... =
</A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536598">How=20
    can I make MPlayer remember the options I use for a particular file, =
e.g.=20
    movie.avi? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536639">Subtitles=20
    are very nice, the most beautiful I've ever seen, but they slow down =

    playing! I know it's unlikely ... </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536678">I=20
    can't access the GUI menu. I press right click, but I can't access =
any menu=20
    items! </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536746">How=20
    can I run MPlayer in the background? </A></DT></DL>
  <DT>5.4. <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq-playback">Playback=20
  problems</A>
  <DD>
  <DL>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536791">I=20
    cannot pinpoint the cause of some strange playback problem. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536849">How=20
    can I get subtitles to appear on the black margins around a movie? =
</A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536876">How=20
    can I select audio/subtitle tracks from a DVD, OGM, Matroska or NUT =
file?=20
    </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536935">I'm=20
    trying to play a random stream off the internet but it fails. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536952">I=20
    downloaded a movie off a P2P network and it doesn't work! </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536973">I'm=20
    having trouble getting my subtitles to display, help!! </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537007">Why=20
    doesn't MPlayer work on Fedora Core? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537158">MPlayer=20
    dies with MPlayer interrupted by signal 4 in module: decode_video =
</A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537196">When=20
    I try to grab from my tuner, it works, but colors are strange. It's =
OK with=20
    other applications. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537219">I=20
    get very strange percentage values (way too big) while playing files =
on my=20
    notebook. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537249">The=20
    audio/video gets totally out of sync when I run MPlayer as root on =
my=20
    notebook. It works normal when i run it as a user. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537289">While=20
    playing a movie it suddenly gets jerky and I get the following =
message:=20
    Badly interleaved AVI file detected - switching to -ni mode... =
</A></DT></DL>
  <DT>5.5. <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq-driver">Video/audio=20
  driver problems (vo/ao)</A>
  <DD>
  <DL>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537331">When=20
    I go into fullscreen mode I just get black borders around the image =
and no=20
    real scaling to fullscreen mode. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537383">I've=20
    just installed MPlayer. When I want to open a video file it causes a =
fatal=20
    error: Error opening/initializing the selected video_out (-vo) =
device. How=20
    can I solve my problem? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537451">I=20
    have problems with [your window manager] and fullscreen =
xv/xmga/sdl/x11=20
    modes ... </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537480">Audio=20
    goes out of sync playing an AVI file. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537508">My=20
    computer plays MS DivX AVIs with resolutions ~ 640x300 and stereo =
MP3 sound=20
    too slow. When I use the -nosound option, everything is OK (but =
quiet). </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537528">How=20
    can I use dmix with MPlayer? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537563">I=20
    have no sound when playing a video and get error messages similar to =
this=20
    one: AO: [oss] 44100Hz 2ch Signed 16-bit (Little-Endian) =
audio_setup: Can't=20
    open audio device /dev/dsp: Device or resource busy couldn't =
open/init audio=20
    device -&gt; NOSOUND Audio: no sound!!! Start playing... </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537608">When=20
    starting MPlayer under KDE I just get a black screen and nothing =
happens.=20
    After about one minute the video starts playing. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537647">I=20
    have A/V sync problems. Some of my AVIs play fine, but some play =
with double=20
    speed! </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537669">When=20
    I play this movie I get video-audio desync and/or MPlayer crashes =
with the=20
    following message: DEMUXER: Too many (945 in 8390980 bytes) video =
packets in=20
    the buffer! </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537770">How=20
    can I get rid of A/V desynchronization while seeking through =
RealMedia=20
    streams? </A></DT></DL>
  <DT>5.6. <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq-dvd">DVD=20
  playback</A>
  <DD>
  <DL>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537800">What=20
    about DVD navigation/menus? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537847">I=20
    can't watch any recent DVDs from Sony Pictures/BMG. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537876">What=20
    about subtitles? Can MPlayer display them? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537901">How=20
    can I set the region code of my DVD-drive? I don't have Windows! =
</A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537921">I=20
    can't play a DVD, MPlayer hangs or outputs "Encrypted VOB file!" =
errors.=20
</A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537937">Do=20
    I need to be (setuid) root to be able to play a DVD? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537959">Is=20
    it possible to play/encode only selected chapters? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537976">My=20
    DVD playback is sluggish! </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538007">I=20
    copied a DVD using vobcopy. How do I play/encode it from my hard =
disk?=20
    </A></DT></DL>
  <DT>5.7. <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq-features">Feature=20
  requests</A>
  <DD>
  <DL>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538046">If=20
    MPlayer is paused and I try to seek or press any key at all, MPlayer =
ceases=20
    to be paused. I would like to be able to seek in the paused movie. =
</A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538074">I'd=20
    like to seek +/- 1 frame instead of 10 seconds. </A></DT></DL>
  <DT>5.8. <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
faq-encoding">Encoding</A>
  <DD>
  <DL>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538110">How=20
    can I encode? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538132">How=20
    can I dump a full DVD title into a file? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538170">How=20
    can I create (S)VCDs automatically? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538199">How=20
    can I create (S)VCDs? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538231">How=20
    can I join two video files? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538289">How=20
    can I fix AVI files with a broken index or bad interleaving? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538328">How=20
    can I fix the aspect ratio of an AVI file? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538367">How=20
    can I backup and encode a VOB file with a broken beginning? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538428">I=20
    can't encode DVD subtitles into the AVI! </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538445">How=20
    can I encode only selected chapters from a DVD? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538466">I'm=20
    trying to work with 2GB+ files on a VFAT file system. Does it work? =
</A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538479">What=20
    is the meaning of the numbers on the status line during the encoding =

    process? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538623">Why=20
    is the recommended bitrate printed by MEncoder negative? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538644">I=20
    can't encode an ASF file to AVI/MPEG-4 (DivX) because it uses 1000 =
fps. </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538662">How=20
    can I put subtitles in the output file? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538689">How=20
    do I encode only sound from a music video? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538757">Why=20
    do third-party players fail to play MPEG-4 movies encoded by =
MEncoder=20
    versions later than 1.0pre7? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538872">How=20
    can I encode an audio only file? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538899">How=20
    can I play subtitles embedded in AVI? </A>
    <DT>Q: <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538934">MPlayer=20
    won't... </A></DT></DL></DD></DL>
<TABLE summary=3D"Q and A Set" border=3D0>
  <COLGROUP>
  <COL align=3Dleft width=3D"1%">
  <TBODY>
  <TR class=3Dqandadiv>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <H3 class=3Dtitle><A name=3Dfaq-development></A>5.1. =
Development</H3></TD></TR>
  <TR class=3Dtoc>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <DL>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535053">How=20
        do I create a proper patch for MPlayer? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535686">How=20
        do I translate MPlayer to a new language? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535719">How=20
        can I support MPlayer development? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535751">How=20
        can I become an MPlayer developer? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535793">Why=20
        don't you use autoconf/automake? </A></DT></DL></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535053></A><A=20
      name=3Did2535055></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How do I create a proper patch for <SPAN=20
      class=3Dapplication>MPlayer</SPAN>? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>We made a <A=20
      href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/patches.txt"=20
      target=3D_top>short document</A> describing all the necessary =
details.=20
      Please follow the instructions. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535686></A><A=20
      name=3Did2535688></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How do I translate <SPAN class=3Dapplication>MPlayer</SPAN> to =
a new=20
      language? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Read the <A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/translations.txt"=20
      target=3D_top>translation HOWTO</A>, it should explain everything. =
You can=20
      get further help on the <A=20
      =
href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-translations" =

      target=3D_top>MPlayer-translations</A> mailing list. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535719></A><A=20
      name=3Did2535721></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I support <SPAN class=3Dapplication>MPlayer</SPAN> =
development?=20
      </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>We are more than happy to accept your hardware and software <A=20
      href=3D"http://www.mplayerhq.hu/donations.html" =
target=3D_top>donations</A>.=20
      They help us in continuously improving <SPAN=20
      class=3Dapplication>MPlayer</SPAN>. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535751></A><A=20
      name=3Did2535753></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I become an <SPAN class=3Dapplication>MPlayer</SPAN> =
developer?=20
      </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>We always welcome coders and documenters. Read the <A=20
      href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/" =
target=3D_top>technical=20
      documentation</A> to get a first grasp. Then you should subscribe =
to the=20
      <A =
href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng"=20
      target=3D_top>MPlayer-dev-eng</A> mailing list and start coding. =
If you want=20
      to help out with the documentation, join the <A=20
      href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-docs"=20
      target=3D_top>MPlayer-docs</A> mailing list. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535793></A><A=20
      name=3Did2535795></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Why don't you use autoconf/automake? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>We have a modular, handwritten build system. It does a =
reasonably good=20
      job, so why change? Besides, we dislike the auto* tools, just like =
<A=20
      href=3D"http://freshmeat.net/articles/view/889/" =
target=3D_top>other=20
      people</A>. </P></TD></TR>
  <TR class=3Dqandadiv>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <H3 class=3Dtitle><A name=3Dfaq-compilation-installation></A>5.2. =
Compilation=20
      and installation</H3></TD></TR>
  <TR class=3Dtoc>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <DL>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535829">Compilation=20
        fails with an error and gcc bails out with some cryptic message=20
        containing the phrase internal compiler error or unable to find =
a=20
        register to spill or can't find a register in class =
`GENERAL_REGS' while=20
        reloading `asm'. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535891">Are=20
        there binary (RPM/Debian) packages of MPlayer? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535925">How=20
        can I build a 32 bit MPlayer on a 64 bit Athlon? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535951">Configure=20
        ends with this text, and MPlayer won't compile! Your gcc does =
not=20
        support even i386 for '-march' and '-mcpu' </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2535984">I=20
        have a Matrox G200/G400/G450/G550, how do I compile/use the =
mga_vid=20
        driver? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536011">During=20
        'make', MPlayer complains about missing X11 libraries. I don't=20
        understand, I do have X11 installed!? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536071">Building=20
        on Mac OS 10.3 leads to several link errors. =
</A></DT></DL></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535829></A><A=20
      name=3Did2535831></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Compilation fails with an error and <SPAN =
class=3Dapplication>gcc</SPAN>=20
      bails out with some cryptic message containing the phrase <CODE=20
      class=3Dsystemitem>internal compiler error</CODE> or <CODE=20
      class=3Dsystemitem>unable to find a register to spill</CODE> or =
<CODE=20
      class=3Dsystemitem>can't find a register in class `GENERAL_REGS' =
while=20
      reloading `asm'</CODE>. </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>You have stumbled over a bug in <SPAN =
class=3Dapplication>gcc</SPAN>.=20
      Please <A href=3D"http://gcc.gnu.org/bugs.html" =
target=3D_top>report it to the=20
      gcc team</A> but not to us. For some reason <SPAN=20
      class=3Dapplication>MPlayer</SPAN> seems to trigger compiler bugs=20
      frequently. Nevertheless we cannot fix them and do not add =
workarounds for=20
      compiler bugs to our sources. To avoid this problem, either stick =
with a=20
      compiler version that is known to be reliable and stable, or =
upgrade=20
      frequently. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535891></A><A=20
      name=3Did2535893></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Are there binary (RPM/Debian) packages of <SPAN=20
      class=3Dapplication>MPlayer</SPAN>? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>See the <A title=3D"12.1.1.&nbsp;Debian packaging"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
debian">Debian</A>=20
      and <A title=3D"12.1.2.&nbsp;RPM packaging"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
rpm">RPM</A>=20
      section for details. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535925></A><A=20
      name=3Did2535927></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I build a 32 bit <SPAN =
class=3Dapplication>MPlayer</SPAN> on a 64=20
      bit Athlon? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Try the following configure options: </P><PRE =
class=3Dscreen>./configure --target=3Dathlon_xp --cc=3D"gcc -m32" =
--as=3D"as --32" --with-extralibdir=3D/usr/lib
</PRE>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535951></A><A=20
      name=3Did2535953></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Configure ends with this text, and <SPAN=20
      class=3Dapplication>MPlayer</SPAN> won't compile! </P><PRE =
class=3Dscreen>Your gcc does not support even i386 for '-march' and =
'-mcpu'</PRE>
      <P></P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Your gcc isn't installed correctly, check the <TT=20
      class=3Dfilename>configure.log</TT> file for details. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2535984></A><A=20
      name=3Did2535986></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I have a Matrox G200/G400/G450/G550, how do I compile/use the =
<CODE=20
      class=3Dsystemitem>mga_vid</CODE> driver? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Read the <A title=3D"8.7.&nbsp;Matrox framebuffer (mga_vid)"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mga_vid">mga_vid</A>=20
      section. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536011></A><A=20
      name=3Did2536013></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>During 'make', <SPAN class=3Dapplication>MPlayer</SPAN> =
complains about=20
      missing X11 libraries. I don't understand, I <SPAN=20
      class=3Demphasis><EM>do</EM></SPAN> have X11 installed!? =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>... but you don't have the X11 development package installed. =
Or not=20
      correctly. It's called <TT class=3Dfilename>XFree86-devel*</TT> =
under Red=20
      Hat, <TT class=3Dfilename>xlibs-dev</TT> under Debian Woody and =
<TT=20
      class=3Dfilename>libx11-dev</TT> under Debian Sarge. Also check if =
the <TT=20
      class=3Dfilename>/usr/X11</TT> and <TT =
class=3Dfilename>/usr/include/X11</TT>=20
      symlinks exist. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536071></A><A=20
      name=3Did2536073></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Building on Mac OS 10.3 leads to several link errors. =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>The link error you're experiencing most likely looks like this: =
</P><PRE class=3Dscreen>ld: Undefined symbols:
_LLCStyleInfoCheckForOpenTypeTables referenced from QuartzCore expected =
to be defined in ApplicationServices
_LLCStyleInfoGetUserRunFeatures referenced from QuartzCore expected to =
be defined in ApplicationServices
</PRE>
      <P>This problem is the result of Apple developers using 10.4 to =
compile=20
      their software and distributing the binaries to 10.3 users via =
Software=20
      Update. The undefined symbols are present in Mac OS 10.4, but not =
10.3.=20
      One solution can be to downgrade to QuickTime 7.0.1. Here is a =
better=20
      solution. </P>
      <P>Get an <A=20
      =
href=3D"http://rapidshare.de/files/20281171/CompatFrameworks.tgz.html"=20
      target=3D_top>older copy of the frameworks</A>. This will give you =
a=20
      compressed file that contains the QuickTime 7.0.1 Framework and a =
10.3.9=20
      QuartzCore Framework. </P>
      <P>Uncompress the files somewhere that is not in your System =
folder. (i.e.=20
      do not install these frameworks into your <TT=20
      class=3Dfilename>/System/Library/Frameworks</TT>! Using this older =
copy is=20
      only meant to get around link errors!) </P><PRE =
class=3Dscreen>gunzip &lt; CompatFrameworks.tgz | tar xvf -</PRE>
      <P>In config.mak, you should append <CODE=20
      class=3Dsystemitem>-F/path/to/where/you/extracted</CODE> to the =
<CODE=20
      class=3Dsystemitem>OPTFLAGS</CODE> variable. If you use <SPAN=20
      class=3Dapplication>X-Code</SPAN>, you can just select these =
frameworks=20
      instead of the system ones. </P>
      <P>The resulting <SPAN class=3Dapplication>MPlayer</SPAN> binary =
will=20
      actually use the framework that is installed on your system via =
dynamic=20
      links that are resolved at run-time. (You can verify this using =
<CODE=20
      class=3Dsystemitem>otool -l</CODE>). </P></TD></TR>
  <TR class=3Dqandadiv>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <H3 class=3Dtitle><A name=3Dfaq-general></A>5.3. General =
questions</H3></TD></TR>
  <TR class=3Dtoc>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <DL>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536188">Are=20
        there any mailing lists on MPlayer? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536213">I've=20
        found a nasty bug when I tried to play my favorite video! Who =
should I=20
        inform? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536236">I=20
        have problems playing files with the ... codec. Can I use them? =
</A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536273">When=20
        I start playing, I get this message but everything seems fine: =
Linux RTC=20
        init: ioctl (rtc_pie_on): Permission denied </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536302">How=20
        can I make a screenshot? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536349">What=20
        is the meaning of the numbers on the status line? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536573">There=20
        are error messages about file not found /usr/local/lib/codecs/ =
... </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536598">How=20
        can I make MPlayer remember the options I use for a particular =
file,=20
        e.g. movie.avi? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536639">Subtitles=20
        are very nice, the most beautiful I've ever seen, but they slow =
down=20
        playing! I know it's unlikely ... </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536678">I=20
        can't access the GUI menu. I press right click, but I can't =
access any=20
        menu items! </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536746">How=20
        can I run MPlayer in the background? </A></DT></DL></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536188></A><A=20
      name=3Did2536190></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Are there any mailing lists on <SPAN =
class=3Dapplication>MPlayer</SPAN>?=20
      </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Yes. Look at the <A=20
      href=3D"http://www.mplayerhq.hu/design7/mailing_lists.html"=20
      target=3D_top>mailing lists section</A> of our homepage. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536213></A><A=20
      name=3Did2536216></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I've found a nasty bug when I tried to play my favorite video! =
Who=20
      should I inform? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Please read the <A title=3D"Appendix&nbsp;A.&nbsp;How to report =
bugs"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports">bug=20
      reporting guidelines</A> and follow the instructions. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536236></A><A=20
      name=3Did2536238></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I have problems playing files with the ... codec. Can I use =
them?=20
    </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Check the <A=20
      href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/codecs-status.html"=20
      target=3D_top>codec status</A>, if it doesn't contain your codec, =
read the=20
      <A title=3DChapter&nbsp;7.&nbsp;Codecs=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codecs">codec=20
      documentation</A>, especially the <A=20
      title=3D"7.3.&nbsp;Win32 codecs importing HOWTO"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-importing">codec=20
      importing HOWTO</A> and contact us. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536273></A><A=20
      name=3Did2536275></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>When I start playing, I get this message but everything seems =
fine:=20
</P><PRE class=3Dscreen>Linux RTC init: ioctl (rtc_pie_on): Permission =
denied</PRE>
      <P></P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>You need a specially set up kernel to use the RTC timing code. =
For=20
      details see the <A title=3D2.5.&nbsp;RTC=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
rtc">RTC</A>=20
      section of the documentation. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536302></A><A=20
      name=3Did2536304></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I make a screenshot? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>You have to use a video output driver that does not employ an =
overlay=20
      to be able to take a screenshot. Under X11, <TT class=3Doption>-vo =
x11</TT>=20
      will do, under Windows <TT class=3Doption>-vo directx:noaccel</TT> =
works.=20
      </P>
      <P>Alternatively you can run <SPAN =
class=3Dapplication>MPlayer</SPAN> with=20
      the <CODE class=3Dsystemitem>screenshot</CODE> video filter (<TT=20
      class=3Doption>-vf screenshot</TT>), and press the <SPAN=20
      class=3Dkeycap><B>s</B></SPAN> key to grab a screenshot. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536349></A><A=20
      name=3Did2536352></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>What is the meaning of the numbers on the status line? =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Example: </P><PRE class=3Dscreen>A: 2.1 V: 2.2 A-V: -0.167 ct: =
0.042 57/57 41% 0% 2.6% 0 4 49% 1.00x
</PRE>
      <P></P>
      <DIV class=3Dvariablelist>
      <DL>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>A: =
2.1</CODE></SPAN>
        <DD>
        <P>audio position in seconds</P>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>V: =
2.2</CODE></SPAN>
        <DD>
        <P>video position in seconds</P>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>A-V: =
-0.167</CODE></SPAN>
        <DD>
        <P>audio-video difference in seconds (delay)</P>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>ct: =
0.042</CODE></SPAN>
        <DD>
        <P>total A-V sync correction done</P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>57/57</CODE></SPAN>
        <DD>
        <P>frames played/decoded (counting from last seek) </P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>41%</CODE></SPAN>
        <DD>
        <P>video codec CPU usage in percent (for slice rendering and =
direct=20
        rendering this includes video_out) </P>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>0%</CODE></SPAN>
        <DD>
        <P>video_out CPU usage</P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>2.6%</CODE></SPAN>
        <DD>
        <P>audio codec CPU usage in percent</P>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>0</CODE></SPAN>
        <DD>
        <P>frames dropped to maintain A-V sync</P>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>4</CODE></SPAN>
        <DD>
        <P>current level of image postprocessing (when using <TT=20
        class=3Doption>-autoq</TT>) </P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>49%</CODE></SPAN>
        <DD>
        <P>current cache size used (around 50% is normal) </P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>1.00x</CODE></SPAN>
        <DD>
        <P>playback speed as a factor of original =
speed</P></DD></DL></DIV>
      <P>Most of them are for debug purposes, use the <TT=20
      class=3Doption>-quiet</TT> option to make them disappear. You =
might notice=20
      that video_out CPU usage is zero (0%) for some files. This is =
because it=20
      is called directly from the codec and thus cannot be measured =
separately.=20
      If you wish to know the video_out speed, compare the difference =
when=20
      playing the file with <TT class=3Doption>-vo null</TT> and your =
usual video=20
      output driver. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536573></A><A=20
      name=3Did2536575></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>There are error messages about file not found <TT=20
      class=3Dfilename>/usr/local/lib/codecs/</TT> ... </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Download and install the binary codecs from our <A=20
      href=3D"http://www.mplayerhq.hu/design7/dload.html" =
target=3D_top>download=20
      page</A>. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536598></A><A=20
      name=3Did2536600></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I make <SPAN class=3Dapplication>MPlayer</SPAN> =
remember the=20
      options I use for a particular file, e.g. <TT=20
      class=3Dfilename>movie.avi</TT>? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Create a file named <TT class=3Dfilename>movie.avi.conf</TT> =
with the=20
      file-specific options in it and put it in <TT=20
      class=3Dfilename>~/.mplayer</TT> or in the same directory as the =
file.=20
    </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536639></A><A=20
      name=3Did2536641></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Subtitles are very nice, the most beautiful I've ever seen, but =
they=20
      slow down playing! I know it's unlikely ... </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>After running <TT class=3Dfilename>./configure</TT>, edit <TT=20
      class=3Dfilename>config.h</TT> and replace <CODE =
class=3Dsystemitem>#undef=20
      FAST_OSD</CODE> with <CODE class=3Dsystemitem>#define =
FAST_OSD</CODE>. Then=20
      recompile. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536678></A><A=20
      name=3Did2536680></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I can't access the GUI menu. I press right click, but I can't =
access=20
      any menu items! </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Are you using FVWM? Try the following: </P>
      <DIV class=3Dorderedlist>
      <OL type=3D1>
        <LI>
        <P><SPAN class=3Dguimenu>Start</SPAN> =E2=86=92 <SPAN=20
        class=3Dguisubmenu>Settings</SPAN> =E2=86=92 <SPAN=20
        class=3Dguisubmenu>Configuration</SPAN> =E2=86=92 <SPAN =
class=3Dguimenuitem>Base=20
        Configuration</SPAN> </P>
        <LI>
        <P>Set <CODE class=3Dsystemitem>Use Applications position =
hints</CODE> to=20
        <CODE class=3Dsystemitem>Yes</CODE> </P></LI></OL></DIV>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536746></A><A=20
      name=3Did2536748></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I run <SPAN class=3Dapplication>MPlayer</SPAN> in the =
background?=20
      </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Use: </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>options</CODE></EM> <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> &lt; /dev/null &amp;
</PRE>
      <P></P></TD></TR>
  <TR class=3Dqandadiv>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <H3 class=3Dtitle><A name=3Dfaq-playback></A>5.4. Playback =
problems</H3></TD></TR>
  <TR class=3Dtoc>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <DL>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536791">I=20
        cannot pinpoint the cause of some strange playback problem. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536849">How=20
        can I get subtitles to appear on the black margins around a =
movie? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536876">How=20
        can I select audio/subtitle tracks from a DVD, OGM, Matroska or =
NUT=20
        file? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536935">I'm=20
        trying to play a random stream off the internet but it fails. =
</A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536952">I=20
        downloaded a movie off a P2P network and it doesn't work! </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2536973">I'm=20
        having trouble getting my subtitles to display, help!! </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537007">Why=20
        doesn't MPlayer work on Fedora Core? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537158">MPlayer=20
        dies with MPlayer interrupted by signal 4 in module: =
decode_video </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537196">When=20
        I try to grab from my tuner, it works, but colors are strange. =
It's OK=20
        with other applications. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537219">I=20
        get very strange percentage values (way too big) while playing =
files on=20
        my notebook. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537249">The=20
        audio/video gets totally out of sync when I run MPlayer as root =
on my=20
        notebook. It works normal when i run it as a user. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537289">While=20
        playing a movie it suddenly gets jerky and I get the following =
message:=20
        Badly interleaved AVI file detected - switching to -ni mode...=20
      </A></DT></DL></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536791></A><A=20
      name=3Did2536794></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I cannot pinpoint the cause of some strange playback problem.=20
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Do you have a stray <TT class=3Dfilename>codecs.conf</TT> file =
in <TT=20
      class=3Dfilename>~/.mplayer/</TT>, <TT =
class=3Dfilename>/etc/</TT>, <TT=20
      class=3Dfilename>/usr/local/etc/</TT> or a similar location? =
Remove it, an=20
      outdated <TT class=3Dfilename>codecs.conf</TT> file can cause =
obscure=20
      problems and is intended for use only by developers working on =
codec=20
      support. It overrides <SPAN class=3Dapplication>MPlayer</SPAN>'s =
internal=20
      codec settings, which will wreak havoc if incompatible changes are =
made in=20
      newer program versions. Unless used by experts it is a recipe for =
disaster=20
      in the form of seemingly random and very hard to localize crashes =
and=20
      playback problems. If you still have it somewhere on your system, =
you=20
      should remove it now. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536849></A><A=20
      name=3Did2536851></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I get subtitles to appear on the black margins around a =
movie?=20
      </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Use the <CODE class=3Dsystemitem>expand</CODE> video filter to =
increase=20
      the area onto which the movie is rendered vertically and place the =
movie=20
      at the top border, for example: </P><PRE class=3Dscreen>mplayer =
-vf expand=3D0:-100:0:0 -slang de dvd://1</PRE>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536876></A><A=20
      name=3Did2536879></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I select audio/subtitle tracks from a DVD, OGM, =
Matroska or NUT=20
      file? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>You have to use <TT class=3Doption>-aid</TT> (audio ID) or <TT=20
      class=3Doption>-alang</TT> (audio language), <TT=20
      class=3Doption>-sid</TT>(subtitle ID) or <TT =
class=3Doption>-slang</TT>=20
      (subtitle language), for example: </P><PRE class=3Dscreen>mplayer =
-alang eng -slang eng <EM =
class=3Dreplaceable><CODE>example.mkv</CODE></EM>
mplayer -aid 1 -sid 1 <EM =
class=3Dreplaceable><CODE>example.mkv</CODE></EM>
</PRE>
      <P>To see which ones are available: </P><PRE =
class=3Dscreen>mplayer -vo null -ao null -frames 0 -v <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> | grep sid
mplayer -vo null -ao null -frames 0 -v <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> | grep aid
</PRE>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536935></A><A=20
      name=3Did2536937></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I'm trying to play a random stream off the internet but it =
fails.=20
    </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Try playing the stream with the <TT =
class=3Doption>-playlist</TT> option.=20
      </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536952></A><A=20
      name=3Did2536954></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I downloaded a movie off a P2P network and it doesn't work! =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Your file is most probably broken or a fake file. If you got it =
from a=20
      friend, and he says it works, try comparing <SPAN=20
      class=3Dapplication>md5sum</SPAN> hashes. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2536973></A><A=20
      name=3Did2536975></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I'm having trouble getting my subtitles to display, help!! =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Make sure you have installed fonts properly. Run through the =
steps in=20
      the <A title=3D"2.4.&nbsp;Fonts and OSD"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fonts-osd">Fonts=20
      and OSD</A> part of the installation section again. If you are =
using=20
      TrueType fonts, verify that you have the <CODE=20
      class=3Dsystemitem>FreeType</CODE> library installed. Other things =
include=20
      checking your subtitles in a text editor or with other players. =
Also try=20
      converting them to another format. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537007></A><A=20
      name=3Did2537009></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Why doesn't <SPAN class=3Dapplication>MPlayer</SPAN> work on =
Fedora Core?=20
      </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>There is a bad interaction on Fedora between exec-shield, =
prelink, and=20
      any applications which use Windows DLLs (such as <SPAN=20
      class=3Dapplication>MPlayer</SPAN>). </P>
      <P>The problem is that exec-shield randomizes the load addresses =
of all=20
      the system libraries. This randomization happens at prelink time =
(once=20
      every two weeks). </P>
      <P>When <SPAN class=3Dapplication>MPlayer</SPAN> tries to load a =
Windows DLL=20
      it wants to put it at a specific address (0x400000). If an =
important=20
      system library happens to be there already, <SPAN=20
      class=3Dapplication>MPlayer</SPAN> will crash. (A typical symptom =
would be a=20
      segmentation fault when trying to play Windows Media 9 files.) =
</P>
      <P>If you run into this problem you have two options: </P>
      <DIV class=3Ditemizedlist>
      <UL type=3Ddisc>
        <LI>
        <P>Wait two weeks. It might start working again. </P>
        <LI>
        <P>Relink all the binaries on the system with different prelink =
options.=20
        Here are step by step instructions: </P>
        <DIV class=3Dprocedure>
        <OL type=3D1>
          <LI>
          <P>Edit <TT class=3Dfilename>/etc/syconfig/prelink</TT> and =
change </P><PRE class=3Dprogramlisting>PRELINK_OPTS=3D-mR</PRE>
          <P>to </P><PRE class=3Dprogramlisting>PRELINK_OPTS=3D"-mR =
--no-exec-shield"</PRE>
          <P></P>
          <LI>
          <P><SPAN><STRONG class=3Dcommand>touch=20
          /var/lib/misc/prelink.force</STRONG></SPAN> </P>
          <LI>
          <P><SPAN><STRONG =
class=3Dcommand>/etc/cron.daily/prelink</STRONG></SPAN>=20
          (This relinks all the applications, and it takes quite a =
while.) </P>
          <LI>
          <P><SPAN><STRONG class=3Dcommand>execstack -s <EM=20
          =
class=3Dreplaceable><CODE>/path/to/</CODE></EM>mplayer</STRONG></SPAN>=20
          (This turns off exec-shield for the <SPAN=20
          class=3Dapplication>MPlayer</SPAN> binary.)=20
      </P></LI></OL></DIV></LI></UL></DIV>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537158></A><A=20
      name=3Did2537160></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P><SPAN class=3Dapplication>MPlayer</SPAN> dies with </P><PRE =
class=3Dscreen>MPlayer interrupted by signal 4 in module: =
decode_video</PRE>
      <P></P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Don't use <SPAN class=3Dapplication>MPlayer</SPAN> on a CPU =
different=20
      from the one it was compiled on or recompile with runtime CPU =
detection=20
      (<SPAN><STRONG class=3Dcommand>./configure=20
      --enable-runtime-cpudetection</STRONG></SPAN>). </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537196></A><A=20
      name=3Did2537198></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>When I try to grab from my tuner, it works, but colors are =
strange.=20
      It's OK with other applications. </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Your card probably reports some colorspaces as supported when =
in fact=20
      it does not support them. Try with YUY2 instead of the default =
YV12 (see=20
      the <A title=3D"10.1.&nbsp;TV input"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-input">TV</A>=20
      section). </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537219></A><A=20
      name=3Did2537221></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I get very strange percentage values (way too big) while =
playing files=20
      on my notebook. </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>It's an effect of the power management / power saving system of =
your=20
      notebook (BIOS, not kernel). Plug the external power connector in =
<SPAN=20
      class=3Dbold><STRONG>before</STRONG></SPAN> you power on your =
notebook. You=20
      can also try whether <A=20
      =
href=3D"http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html=
"=20
      target=3D_top>cpufreq</A> (a SpeedStep interface for Linux) helps =
you.=20
    </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537249></A><A=20
      name=3Did2537251></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>The audio/video gets totally out of sync when I run <SPAN=20
      class=3Dapplication>MPlayer</SPAN> as <CODE =
class=3Dsystemitem>root</CODE> on=20
      my notebook. It works normal when i run it as a user. =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>This is again a power management effect (see above). Plug the =
external=20
      power connector in <SPAN =
class=3Dbold><STRONG>before</STRONG></SPAN> you=20
      power on your notebook or use the <TT class=3Doption>-nortc</TT> =
option.=20
    </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537289></A><A=20
      name=3Did2537291></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>While playing a movie it suddenly gets jerky and I get the =
following=20
      message: </P><PRE class=3Dscreen>Badly interleaved AVI file =
detected - switching to -ni mode...</PRE>
      <P></P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Badly interleaved files and <TT class=3Doption>-cache</TT> =
don't work=20
      well together. Try <TT class=3Doption>-nocache</TT>. =
</P></TD></TR>
  <TR class=3Dqandadiv>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <H3 class=3Dtitle><A name=3Dfaq-driver></A>5.5. Video/audio driver =
problems=20
      (vo/ao)</H3></TD></TR>
  <TR class=3Dtoc>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <DL>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537331">When=20
        I go into fullscreen mode I just get black borders around the =
image and=20
        no real scaling to fullscreen mode. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537383">I've=20
        just installed MPlayer. When I want to open a video file it =
causes a=20
        fatal error: Error opening/initializing the selected video_out =
(-vo)=20
        device. How can I solve my problem? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537451">I=20
        have problems with [your window manager] and fullscreen =
xv/xmga/sdl/x11=20
        modes ... </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537480">Audio=20
        goes out of sync playing an AVI file. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537508">My=20
        computer plays MS DivX AVIs with resolutions ~ 640x300 and =
stereo MP3=20
        sound too slow. When I use the -nosound option, everything is OK =
(but=20
        quiet). </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537528">How=20
        can I use dmix with MPlayer? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537563">I=20
        have no sound when playing a video and get error messages =
similar to=20
        this one: AO: [oss] 44100Hz 2ch Signed 16-bit (Little-Endian)=20
        audio_setup: Can't open audio device /dev/dsp: Device or =
resource busy=20
        couldn't open/init audio device -&gt; NOSOUND Audio: no sound!!! =
Start=20
        playing... </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537608">When=20
        starting MPlayer under KDE I just get a black screen and nothing =

        happens. After about one minute the video starts playing. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537647">I=20
        have A/V sync problems. Some of my AVIs play fine, but some play =
with=20
        double speed! </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537669">When=20
        I play this movie I get video-audio desync and/or MPlayer =
crashes with=20
        the following message: DEMUXER: Too many (945 in 8390980 bytes) =
video=20
        packets in the buffer! </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537770">How=20
        can I get rid of A/V desynchronization while seeking through =
RealMedia=20
        streams? </A></DT></DL></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537331></A><A=20
      name=3Did2537333></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>When I go into fullscreen mode I just get black borders around =
the=20
      image and no real scaling to fullscreen mode. </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Your video output driver does not support scaling in hardware =
and since=20
      scaling in software can be incredibly slow <SPAN=20
      class=3Dapplication>MPlayer</SPAN> does not automatically enable =
it. Most=20
      likely you are using the <CODE class=3Dsystemitem>x11</CODE> =
instead of the=20
      <CODE class=3Dsystemitem>xv</CODE> video output driver. Try adding =
<TT=20
      class=3Doption>-vo xv</TT> to the command line or read the <A=20
      title=3D"Chapter&nbsp;8.&nbsp;Video output devices"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
video">video=20
      section</A> to find out about alternative video output drivers. =
The <TT=20
      class=3Doption>-zoom</TT> option explicitly enables software =
scaling.=20
  </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537383></A><A=20
      name=3Did2537385></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I've just installed <SPAN class=3Dapplication>MPlayer</SPAN>. =
When I want=20
      to open a video file it causes a fatal error: </P><PRE =
class=3Dscreen>Error opening/initializing the selected video_out (-vo) =
device.</PRE>
      <P>How can I solve my problem? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Just change your video output device. Issue the following =
command to=20
      get a list of available video output drivers: </P><PRE =
class=3Dscreen>mplayer -vo help</PRE>
      <P>After you've chosen the correct video output driver, add it to =
your=20
      configuration file. Add </P><PRE class=3Dprogramlisting>vo =3D <EM =
class=3Dreplaceable><CODE>selected_vo</CODE></EM>
</PRE>
      <P>to <TT class=3Dfilename>~/.mplayer/config</TT> and/or </P><PRE =
class=3Dprogramlisting>vo_driver =3D <EM =
class=3Dreplaceable><CODE>selected_vo</CODE></EM>
</PRE>
      <P>to <TT class=3Dfilename>~/.mplayer/gui.conf</TT>. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537451></A><A=20
      name=3Did2537453></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I have problems with <EM class=3Dreplaceable><CODE>[your window =

      manager]</CODE></EM> and fullscreen xv/xmga/sdl/x11 modes ... =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Read the <A title=3D"Appendix&nbsp;A.&nbsp;How to report bugs"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports">bug=20
      reporting guidelines</A> and send us a proper bug report. Also try =

      experimenting with the <TT class=3Doption>-fstype</TT> option. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537480></A><A=20
      name=3Did2537482></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Audio goes out of sync playing an AVI file. </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Try the <TT class=3Doption>-bps</TT> or <TT =
class=3Doption>-nobps</TT>=20
      option. If it does not improve, read the <A=20
      title=3D"Appendix&nbsp;A.&nbsp;How to report bugs"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports">bug=20
      reporting guidelines</A> and upload the file to FTP. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537508></A><A=20
      name=3Did2537511></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>My computer plays MS DivX AVIs with resolutions ~ 640x300 and =
stereo=20
      MP3 sound too slow. When I use the <TT =
class=3Doption>-nosound</TT> option,=20
      everything is OK (but quiet). </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Your machine is too slow or your sound card driver is broken. =
Consult=20
      the documentation to see if you can improve performance. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537528></A><A=20
      name=3Did2537530></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I use <SPAN class=3Dapplication>dmix</SPAN> with <SPAN=20
      class=3Dapplication>MPlayer</SPAN>? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>After setting up your <A=20
      href=3D"http://alsa.opensrc.org/index.php?page=3DDmixPlugin"=20
      target=3D_top>asoundrc</A> you have to use <TT class=3Doption>-ao=20
      alsa:device=3Ddmix</TT>. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537563></A><A=20
      name=3Did2537565></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I have no sound when playing a video and get error messages =
similar to=20
      this one: </P><PRE class=3Dscreen>AO: [oss] 44100Hz 2ch Signed =
16-bit (Little-Endian)
audio_setup: Can't open audio device /dev/dsp: Device or resource busy
couldn't open/init audio device -&gt; NOSOUND
Audio: no sound!!!
Start playing...
</PRE>
      <P></P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Are you running KDE or GNOME with the aRts or ESD sound daemon? =
Try=20
      disabling the sound daemon or use the <TT class=3Doption>-ao =
arts</TT> or=20
      <TT class=3Doption>-ao esd</TT> option to make <SPAN=20
      class=3Dapplication>MPlayer</SPAN> use aRts or ESD. You might also =
be=20
      running ALSA without OSS emulation, try loading the ALSA OSS =
kernel=20
      modules or add <TT class=3Doption>-ao alsa</TT> to your command =
line to=20
      directly use the ALSA audio output driver. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537608></A><A=20
      name=3Did2537610></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>When starting <SPAN class=3Dapplication>MPlayer</SPAN> under =
KDE I just=20
      get a black screen and nothing happens. After about one minute the =
video=20
      starts playing. </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>The KDE aRts sound daemon is blocking the sound device. Either =
wait=20
      until the video starts or disable the aRts daemon in control =
center. If=20
      you want to use aRts sound, specify audio output via our native =
aRts audio=20
      driver (<TT class=3Doption>-ao arts</TT>). If it fails or isn't =
compiled in,=20
      try SDL (<TT class=3Doption>-ao sdl</TT>) and make sure your SDL =
can handle=20
      aRts sound. Yet another option is to start <SPAN=20
      class=3Dapplication>MPlayer</SPAN> with artsdsp. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537647></A><A=20
      name=3Did2537649></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I have A/V sync problems. Some of my AVIs play fine, but some =
play with=20
      double speed! </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>You have a buggy sound card/driver. Most likely it's fixed at =
44100Hz,=20
      and you try to play a file which has 22050Hz audio. Try the <CODE=20
      class=3Dsystemitem>resample</CODE> audio filter. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537669></A><A=20
      name=3Did2537671></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>When I play this movie I get video-audio desync and/or <SPAN=20
      class=3Dapplication>MPlayer</SPAN> crashes with the following =
message: </P><PRE class=3Dscreen>DEMUXER: Too many (945 in 8390980 =
bytes) video packets in the buffer!
</PRE>
      <P></P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>This can have multiple reasons. </P>
      <DIV class=3Ditemizedlist>
      <UL type=3Ddisc>
        <LI>
        <P>Your CPU <SPAN class=3Demphasis><EM>and/or</EM></SPAN> video =
card <SPAN=20
        class=3Demphasis><EM>and/or</EM></SPAN> bus is too slow. <SPAN=20
        class=3Dapplication>MPlayer</SPAN> displays a message if this is =
the case=20
        (and the dropped frames counter goes up fast). </P>
        <LI>
        <P>If it is an AVI, maybe it has bad interleaving, try the <TT=20
        class=3Doption>-ni</TT> option to work around this. Or it may =
have a bad=20
        header, in this case <TT class=3Doption>-nobps</TT> and/or <TT=20
        class=3Doption>-mc 0</TT> can help. </P>
        <LI>
        <P>Many FLV files will only play correctly with <TT=20
        class=3Doption>-correct-pts</TT>. Unfortunately <SPAN=20
        class=3Dapplication>MEncoder</SPAN> does not have this option, =
but you can=20
        try setting <TT class=3Doption>-fps</TT> to the correct value =
manually if=20
        you know it. </P>
        <LI>
        <P>Your sound driver is buggy. See the <A=20
        title=3D"Chapter&nbsp;9.&nbsp;Audio output devices"=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
audio">audio=20
        section</A>. </P></LI></UL></DIV>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537770></A><A=20
      name=3Did2537772></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I get rid of A/V desynchronization while seeking =
through=20
      RealMedia streams? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P><TT class=3Doption>-mc 0.1</TT> can help. </P></TD></TR>
  <TR class=3Dqandadiv>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <H3 class=3Dtitle><A name=3Dfaq-dvd></A>5.6. DVD =
playback</H3></TD></TR>
  <TR class=3Dtoc>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <DL>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537800">What=20
        about DVD navigation/menus? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537847">I=20
        can't watch any recent DVDs from Sony Pictures/BMG. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537876">What=20
        about subtitles? Can MPlayer display them? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537901">How=20
        can I set the region code of my DVD-drive? I don't have Windows! =
</A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537921">I=20
        can't play a DVD, MPlayer hangs or outputs "Encrypted VOB file!" =
errors.=20
        </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537937">Do=20
        I need to be (setuid) root to be able to play a DVD? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537959">Is=20
        it possible to play/encode only selected chapters? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2537976">My=20
        DVD playback is sluggish! </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538007">I=20
        copied a DVD using vobcopy. How do I play/encode it from my hard =
disk?=20
        </A></DT></DL></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537800></A><A=20
      name=3Did2537802></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>What about DVD navigation/menus? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P><SPAN class=3Dapplication>MPlayer</SPAN> does not support DVD =
menus due=20
      to serious architectural limitations that prevent proper handling =
of still=20
      images and interactive content. If you want to have fancy menus, =
you will=20
      have to use another player like <SPAN =
class=3Dapplication>xine</SPAN>, <SPAN=20
      class=3Dapplication>vlc</SPAN> or <SPAN =
class=3Dapplication>Ogle</SPAN>. If=20
      you want to see DVD navigation in <SPAN =
class=3Dapplication>MPlayer</SPAN>=20
      you will have to implement it yourself, but be aware that it is a =
major=20
      undertaking. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537847></A><A=20
      name=3Did2537849></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I can't watch any recent DVDs from Sony Pictures/BMG. =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>This is normal; you've been ripped off and sold an =
intentionally=20
      defective disk. The only way to play these DVDs is to circumvent =
the bad=20
      blocks of the disk by using DVDnav instead of mpdvdkit2. You can =
do so by=20
      compiling <SPAN class=3Dapplication>MPlayer</SPAN> with DVDnav =
support and=20
      then replacing dvd:// by dvdnav:// on the command line. DVDnav is =
so far=20
      mutually exclusive with mpdvdkit2, so make sure you pass <TT=20
      class=3Doption>--disable-mpdvdkit</TT> to the configure script. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537876></A><A=20
      name=3Did2537878></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>What about subtitles? Can <SPAN =
class=3Dapplication>MPlayer</SPAN>=20
      display them? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Yes. See the <A title=3D"4.2.&nbsp;DVD playback"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dvd">DVD=20
      chapter</A>. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537901></A><A=20
      name=3Did2537904></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I set the region code of my DVD-drive? I don't have =
Windows!=20
      </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Use the <A href=3D"http://linvdr.org/projects/regionset/"=20
      target=3D_top>regionset tool</A>. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537921></A><A=20
      name=3Did2537923></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I can't play a DVD, MPlayer hangs or outputs "Encrypted VOB =
file!"=20
      errors. </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>CSS decryption code does not work with some DVD drives unless =
you set=20
      the region code appropriately. See the answer to the previous =
question.=20
      </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537937></A><A=20
      name=3Did2537939></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Do I need to be (setuid) root to be able to play a DVD? =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>No. However you must have the proper rights on the DVD device =
entry (in=20
      <TT class=3Dfilename>/dev/</TT>). </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537959></A><A=20
      name=3Did2537961></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Is it possible to play/encode only selected chapters? =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Yes, try the <TT class=3Doption>-chapter</TT> option. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2537976></A><A=20
      name=3Did2537978></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>My DVD playback is sluggish! </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Use the <TT class=3Doption>-cache</TT> option (described in the =
man page)=20
      and try enabling DMA for the DVD drive with the <SPAN><STRONG=20
      class=3Dcommand>hdparm</STRONG></SPAN> tool (described in the <A=20
      title=3D"4.1.&nbsp;CD/DVD drives"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
drives">CD=20
      chapter</A>). </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538007></A><A=20
      name=3Did2538009></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I copied a DVD using vobcopy. How do I play/encode it from my =
hard=20
      disk? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Use the <TT class=3Doption>-dvd-device</TT> option to refer to =
the=20
      directory that contains the files: </P><PRE class=3Dscreen>mplayer =
dvd://1 -dvd-device <EM =
class=3Dreplaceable><CODE>/path/to/directory</CODE></EM>
</PRE>
      <P></P></TD></TR>
  <TR class=3Dqandadiv>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <H3 class=3Dtitle><A name=3Dfaq-features></A>5.7. Feature =
requests</H3></TD></TR>
  <TR class=3Dtoc>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <DL>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538046">If=20
        MPlayer is paused and I try to seek or press any key at all, =
MPlayer=20
        ceases to be paused. I would like to be able to seek in the =
paused=20
        movie. </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538074">I'd=20
        like to seek +/- 1 frame instead of 10 seconds. =
</A></DT></DL></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538046></A><A=20
      name=3Did2538048></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>If <SPAN class=3Dapplication>MPlayer</SPAN> is paused and I try =
to seek=20
      or press any key at all, <SPAN class=3Dapplication>MPlayer</SPAN> =
ceases to=20
      be paused. I would like to be able to seek in the paused movie. =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>This is very tricky to implement without losing A/V =
synchronization.=20
      All attempts have failed so far, but patches are welcome. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538074></A><A=20
      name=3Did2538076></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I'd like to seek +/- 1 frame instead of 10 seconds. =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>You can step forward one frame by pressing <SPAN=20
      class=3Dkeycap><B>.</B></SPAN>. If the movie was not paused it =
will be=20
      paused afterwards (see the man page for details). Stepping =
backwards is=20
      unlikely to be implemented anytime soon. </P></TD></TR>
  <TR class=3Dqandadiv>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <H3 class=3Dtitle><A name=3Dfaq-encoding></A>5.8. =
Encoding</H3></TD></TR>
  <TR class=3Dtoc>
    <TD vAlign=3Dtop align=3Dleft colSpan=3D2>
      <DL>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538110">How=20
        can I encode? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538132">How=20
        can I dump a full DVD title into a file? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538170">How=20
        can I create (S)VCDs automatically? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538199">How=20
        can I create (S)VCDs? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538231">How=20
        can I join two video files? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538289">How=20
        can I fix AVI files with a broken index or bad interleaving? =
</A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538328">How=20
        can I fix the aspect ratio of an AVI file? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538367">How=20
        can I backup and encode a VOB file with a broken beginning? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538428">I=20
        can't encode DVD subtitles into the AVI! </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538445">How=20
        can I encode only selected chapters from a DVD? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538466">I'm=20
        trying to work with 2GB+ files on a VFAT file system. Does it =
work? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538479">What=20
        is the meaning of the numbers on the status line during the =
encoding=20
        process? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538623">Why=20
        is the recommended bitrate printed by MEncoder negative? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538644">I=20
        can't encode an ASF file to AVI/MPEG-4 (DivX) because it uses =
1000 fps.=20
        </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538662">How=20
        can I put subtitles in the output file? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538689">How=20
        do I encode only sound from a music video? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538757">Why=20
        do third-party players fail to play MPEG-4 movies encoded by =
MEncoder=20
        versions later than 1.0pre7? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538872">How=20
        can I encode an audio only file? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538899">How=20
        can I play subtitles embedded in AVI? </A>
        <DT>Q: <A=20
        =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
id2538934">MPlayer=20
        won't... </A></DT></DL></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538110></A><A=20
      name=3Did2538112></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I encode? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Read the <A title=3D"Chapter&nbsp;13.&nbsp;Basic usage of =
MEncoder"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mencoder"><SPAN=20
      class=3Dapplication>MEncoder</SPAN></A> section. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538132></A><A=20
      name=3Did2538134></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I dump a full DVD title into a file? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Once you have selected your title, and made sure it plays fine =
with=20
      <SPAN class=3Dapplication>MPlayer</SPAN>, use the option <TT=20
      class=3Doption>-dumpstream</TT>. For example: </P><PRE =
class=3Dscreen>mplayer dvd://5 -dumpstream -dumpfile <EM =
class=3Dreplaceable><CODE>dvd_dump.vob</CODE></EM>
</PRE>
      <P>will dump the 5th title of the DVD into the file <EM=20
      class=3Dreplaceable><CODE>dvd_dump.vob</CODE></EM> </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538170></A><A=20
      name=3Did2538172></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I create (S)VCDs automatically? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Try the <TT class=3Dfilename>mencvcd</TT> script from the <TT=20
      class=3Dfilename>TOOLS</TT> subdirectory. With it you can encode =
DVDs or=20
      other movies to VCD or SVCD format and even burn them directly to =
CD.=20
    </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538199></A><A=20
      name=3Did2538202></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I create (S)VCDs? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Newer versions of <SPAN class=3Dapplication>MEncoder</SPAN> can =
directly=20
      generate MPEG-2 files that can be used as a base to create a VCD =
or SVCD=20
      and are likely to be playable out of the box on all platforms (for =

      example, to share a video from a digital camcorder with your=20
      computer-illiterate friends). Please read <A=20
      title=3D"14.8.&nbsp;Using MEncoder to create =
VCD/SVCD/DVD-compliant files"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd">Using=20
      MEncoder to create VCD/SVCD/DVD-compliant files</A> for more =
details.=20
    </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538231></A><A=20
      name=3Did2538233></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I join two video files? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>MPEG files can be concatenated into a single file with luck. =
For AVI=20
      files, you can use <SPAN class=3Dapplication>MEncoder</SPAN>'s =
multiple file=20
      support like this: </P><PRE class=3Dscreen>mencoder -ovc copy -oac =
copy -o <EM class=3Dreplaceable><CODE>out.avi</CODE></EM> <EM =
class=3Dreplaceable><CODE>file1.avi</CODE></EM> <EM =
class=3Dreplaceable><CODE>file2.avi</CODE></EM>
</PRE>
      <P>This will only work if the files are of the same resolution and =
use the=20
      same codec. You can also try <A =
href=3D"http://fixounet.free.fr/avidemux/"=20
      target=3D_top>avidemux</A> and <SPAN =
class=3Dapplication>avimerge</SPAN> (part=20
      of the <A href=3D"http://www.transcoding.org/" =
target=3D_top>transcode</A>=20
      tool set). </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538289></A><A=20
      name=3Did2538291></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I fix AVI files with a broken index or bad =
interleaving?=20
  </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>To avoid having to use <TT class=3Doption>-idx</TT> to be able =
to seek in=20
      AVI files with a broken index or <TT class=3Doption>-ni</TT> to =
play AVI=20
      files with bad interleaving, use the command </P><PRE =
class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.avi</CODE></EM> -idx -ovc copy -oac copy =
-o <EM class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
      <P>to copy the video and audio streams into a new AVI file while=20
      regenerating the index and correctly interleaving the data. Of =
course this=20
      cannot fix possible bugs in the video and/or audio streams. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538328></A><A=20
      name=3Did2538331></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I fix the aspect ratio of an AVI file? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>You can do such a thing thanks to <SPAN=20
      class=3Dapplication>MEncoder</SPAN>'s <TT=20
      class=3Doption>-force-avi-aspect</TT> option, which overrides the =
aspect=20
      stored in the AVI OpenDML vprp header option. For example: =
</P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.avi</CODE></EM> -ovc copy -oac copy -o =
<EM class=3Dreplaceable><CODE>output.avi</CODE></EM> -force-avi-aspect =
4/3
</PRE>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538367></A><A=20
      name=3Did2538369></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I backup and encode a VOB file with a broken beginning? =

  </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>The main problem when you want to encode a VOB file which is =
corrupted=20
      <SUP>[<A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ftn.fn-corrupted-files-or-copy-protection"=20
      name=3Dfn-corrupted-files-or-copy-protection>1</A>]</SUP> is that =
it will be=20
      hard to get an encode with perfect A/V sync. One workaround is to =
just=20
      shave off the corrupted part and encode just the clean part. First =
you=20
      need to find where the clean part starts: </P><PRE =
class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>input.vob</CODE></EM> -sb <EM =
class=3Dreplaceable><CODE>nb_of_bytes_to_skip</CODE></EM>
</PRE>
      <P>Then you can create a new file which contains just the clean =
part: </P><PRE class=3Dscreen>dd if=3D<EM =
class=3Dreplaceable><CODE>input.vob</CODE></EM> of=3D<EM =
class=3Dreplaceable><CODE>output_cut.vob</CODE></EM> skip=3D1 ibs=3D<EM =
class=3Dreplaceable><CODE>nb_of_bytes_to_skip</CODE></EM>
</PRE>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538428></A><A=20
      name=3Did2538430></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I can't encode DVD subtitles into the AVI! </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>You have to properly specify the <TT class=3Doption>-sid</TT> =
option.=20
    </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538445></A><A=20
      name=3Did2538447></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I encode only selected chapters from a DVD? =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Use the <TT class=3Doption>-chapter</TT> option correctly, =
like: <TT=20
      class=3Doption>-chapter 5-7</TT>. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538466></A><A=20
      name=3Did2538468></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I'm trying to work with 2GB+ files on a VFAT file system. Does =
it work?=20
      </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>No, VFAT doesn't support 2GB+ files. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538479></A><A=20
      name=3Did2538481></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>What is the meaning of the numbers on the status line during =
the=20
      encoding process? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Example: </P><PRE class=3Dscreen>Pos: 264.5s   6612f ( 2%)  =
7.12fps Trem: 576min 2856mb  A-V:0.065 [2126:192]
</PRE>
      <P></P>
      <DIV class=3Dvariablelist>
      <DL>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>Pos: =
264.5s</CODE></SPAN>
        <DD>
        <P>time position in the encoded stream</P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>6612f</CODE></SPAN>
        <DD>
        <P>number of video frames encoded</P>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>( =
2%)</CODE></SPAN>
        <DD>
        <P>portion of the input stream encoded</P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>7.12fps</CODE></SPAN>
        <DD>
        <P>encoding speed</P>
        <DT><SPAN class=3Dterm><CODE class=3Dsystemitem>Trem: =
576min</CODE></SPAN>
        <DD>
        <P>estimated remaining encoding time</P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>2856mb</CODE></SPAN>
        <DD>
        <P>estimated size of the final encode</P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>A-V:0.065</CODE></SPAN>
        <DD>
        <P>current delay between audio and video streams</P>
        <DT><SPAN class=3Dterm><CODE =
class=3Dsystemitem>[2126:192]</CODE></SPAN>
        <DD>
        <P>average video bitrate (in kb/s) and average audio bitrate (in =
kb/s)=20
        </P></DD></DL></DIV>
      <P></P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538623></A><A=20
      name=3Did2538625></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Why is the recommended bitrate printed by <SPAN=20
      class=3Dapplication>MEncoder</SPAN> negative? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Because the bitrate you encoded the audio with is too large to =
fit the=20
      movie on any CD. Check if you have libmp3lame installed properly.=20
  </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538644></A><A=20
      name=3Did2538646></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>I can't encode an ASF file to AVI/MPEG-4 (DivX) because it uses =
1000=20
      fps. </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Since ASF uses variable framerate but AVI uses a fixed one, you =
have to=20
      set it by hand with the <TT class=3Doption>-ofps</TT> option. =
</P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538662></A><A=20
      name=3Did2538664></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I put subtitles in the output file? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Just pass the <TT class=3Doption>-sub &lt;filename&gt;</TT> (or =
<TT=20
      class=3Doption>-sid</TT>, respectively) option to <SPAN=20
      class=3Dapplication>MEncoder</SPAN>. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538689></A><A=20
      name=3Did2538691></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How do I encode only sound from a music video? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>It's not possible directly, but you can try this (note the =
<SPAN=20
      class=3Dbold><STRONG>&amp;</STRONG></SPAN> at the end of =
<SPAN><STRONG=20
      class=3Dcommand>mplayer</STRONG></SPAN> command): </P><PRE =
class=3Dscreen>mkfifo <EM class=3Dreplaceable><CODE>encode</CODE></EM>
mplayer -ao pcm -aofile <EM class=3Dreplaceable><CODE>encode</CODE></EM> =
dvd://1 &amp;
lame <EM class=3Dreplaceable><CODE>your_opts</CODE></EM> <EM =
class=3Dreplaceable><CODE>encode</CODE></EM> <EM =
class=3Dreplaceable><CODE>music.mp3</CODE></EM>
rm <EM class=3Dreplaceable><CODE>encode</CODE></EM>
</PRE>
      <P>This allows you to use any encoder, not only <SPAN=20
      class=3Dapplication>LAME</SPAN>, just replace <SPAN><STRONG=20
      class=3Dcommand>lame</STRONG></SPAN> with your favorite audio =
encoder in the=20
      above command. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538757></A><A=20
      name=3Did2538759></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Why do third-party players fail to play MPEG-4 movies encoded =
by <SPAN=20
      class=3Dapplication>MEncoder</SPAN> versions later than 1.0pre7? =
</P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P><CODE class=3Dsystemitem>libavcodec</CODE>, the native MPEG-4 =
encoding=20
      library usually shipped with <SPAN =
class=3Dapplication>MEncoder</SPAN>, used=20
      to set the FourCC to 'DIVX' when encoding MPEG-4 videos (the =
FourCC is an=20
      AVI tag to identify the software used to encode and the intended =
software=20
      to use for decoding the video). This led many people to think that =
<CODE=20
      class=3Dsystemitem>libavcodec</CODE> was a DivX encoding library, =
when in=20
      fact it is a completely different MPEG-4 encoding library which =
implements=20
      the MPEG-4 standard much better than DivX does. Therefore, the new =
default=20
      FourCC used by <CODE class=3Dsystemitem>libavcodec</CODE> is =
'FMP4', but you=20
      may override this behavior using <SPAN =
class=3Dapplication>MEncoder</SPAN>'s=20
      <TT class=3Doption>-ffourcc</TT> option. You may also change the =
FourCC of=20
      existing files in the same way: </P><PRE class=3Dscreen>mencoder =
<EM class=3Dreplaceable><CODE>input.avi</CODE></EM> -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM> -ffourcc XVID
</PRE>
      <P>Note that this will set the FourCC to XVID rather than DIVX. =
This is=20
      recommended as DIVX FourCC means DivX4, which is a very basic =
MPEG-4=20
      codec, whereas DX50 and XVID both mean full MPEG-4 (ASP). =
Therefore, if=20
      you change the FourCC to DIVX, some bad software or hardware =
players may=20
      choke on some advanced features that <CODE=20
      class=3Dsystemitem>libavcodec</CODE> supports, but DivX doesn't; =
on the=20
      other hand <CODE class=3Dsystemitem>Xvid</CODE> is closer to <CODE =

      class=3Dsystemitem>libavcodec</CODE> in terms of functionality, =
and is=20
      supported by all decent players. </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538872></A><A=20
      name=3Did2538874></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I encode an audio only file? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Use <TT class=3Dfilename>aconvert</TT> from the <TT=20
      class=3Dfilename>TOOLS</TT> subdirectory in the MPlayer source =
tree.=20
  </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538899></A><A=20
      name=3Did2538902></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>How can I play subtitles embedded in AVI? </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Use <TT class=3Dfilename>avisubdump.c</TT> from the <TT=20
      class=3Dfilename>TOOLS</TT> subdirectory or read <A=20
      href=3D"http://xlife.zuavra.net/curse/0012/" target=3D_top>this =
document about=20
      extracting/demultiplexing subtitles embedded in OpenDML AVI =
files</A>.=20
    </P></TD></TR>
  <TR class=3Dquestion>
    <TD vAlign=3Dtop align=3Dleft><A name=3Did2538934></A><A=20
      name=3Did2538936></A><B>Q:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>MPlayer won't... </P></TD></TR>
  <TR class=3Danswer>
    <TD vAlign=3Dtop align=3Dleft><B>A:</B></TD>
    <TD vAlign=3Dtop align=3Dleft>
      <P>Have a look at the <TT class=3Dfilename>TOOLS</TT> subdirectory =
for a=20
      collection of random scripts and hacks. <TT=20
      class=3Dfilename>TOOLS/README</TT> contains documentation.=20
</P></TD></TR></TBODY></TABLE></DIV>
<DIV class=3Dfootnotes><BR>
<HR align=3Dleft width=3D100>

<DIV class=3Dfootnote>
<P><SUP>[<A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fn-corrupted-files-or-copy-protection"=20
name=3Dftn.fn-corrupted-files-or-copy-protection>1</A>] </SUP>To some =
extent, some=20
forms of copy protection used in DVDs can be assumed to be content =
corruption.=20
</P></DIV></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A=20
name=3Dcontainers></A>Chapter&nbsp;6.&nbsp;Containers</H2></DIV></DIV></D=
IV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
video-formats">6.1.=20
  Video formats</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mpg-vob-dat">6.1.1.=20
    MPEG files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
avi">6.1.2.=20
    AVI files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
asf-wmv">6.1.3.=20
    ASF/WMV files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mov">6.1.4.=20
    QuickTime/MOV files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vivo">6.1.5.=20
    VIVO files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fli">6.1.6.=20
    FLI files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
realmedia">6.1.7.=20
    RealMedia (RM) files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
nuppelvideo">6.1.8.=20
    NuppelVideo files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
yuv4mpeg">6.1.9.=20
    yuv4mpeg files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
film">6.1.10.=20
    FILM files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
roq">6.1.11.=20
    RoQ files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ogg">6.1.12.=20
    OGG/OGM files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
sdp">6.1.13.=20
    SDP files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
pva">6.1.14.=20
    PVA files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
nsv">6.1.15.=20
    NSV files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
matroska">6.1.16.=20
    Matroska files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
nut">6.1.17.=20
    NUT files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
gif">6.1.18.=20
    GIF files</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
audio-formats">6.2.=20
  Audio formats</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mp3">6.2.1.=20
    MP3 files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ogg-vorbis">6.2.2.=20
    OGG/OGM files (Vorbis)</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
cdda">6.2.3.=20
    CD audio</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
xmms">6.2.4.=20
    XMMS</A></SPAN></DT></DL></DD></DL></DIV>
<P>It is important to clarify a common mistake. When people see a file =
with a=20
<TT class=3Dfilename>.AVI</TT> extension, they immediately conclude that =
it is not=20
an MPEG file. That is not true. At least not entirely. Contrary to =
popular=20
belief such a file <SPAN class=3Demphasis><EM>can</EM></SPAN> contain =
MPEG-1=20
video. </P>
<P>You see, a <SPAN class=3Dbold><STRONG>codec</STRONG></SPAN> is not =
the same as=20
a <SPAN class=3Dbold><STRONG>container format</STRONG></SPAN>. Examples =
of video=20
<SPAN class=3Dbold><STRONG>codecs</STRONG></SPAN> are: MPEG-1, MPEG-2, =
MPEG-4=20
(DivX), Indeo5, 3ivx. Examples of container <SPAN=20
class=3Dbold><STRONG>formats</STRONG></SPAN> are: MPG, AVI, ASF. </P>
<P>In theory, you can put an OpenDivX video and MP3 audio into an <SPAN=20
class=3Dbold><STRONG>MPG container</STRONG></SPAN>. However, most =
players will not=20
play it, since they expect MPEG-1 video and MP2 audio (unlike <SPAN=20
class=3Dbold><STRONG>AVI</STRONG></SPAN>, <SPAN=20
class=3Dbold><STRONG>MPG</STRONG></SPAN> does not have the necessary =
fields to=20
describe its video and audio streams). Or you might put MPEG-1 video =
into an AVI=20
file. <A href=3D"http://ffmpeg.org/" target=3D_top>FFmpeg</A> and <A=20
title=3D"Chapter&nbsp;13.&nbsp;Basic usage of MEncoder"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mencoder"><SPAN=20
class=3Dapplication>MEncoder</SPAN></A> can create these files. </P>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dvideo-formats></A>6.1.&nbsp;Video=20
formats</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dmpg-vob-dat></A>6.1.1.&nbsp;MPEG=20
files</H3></DIV></DIV></DIV>
<P>MPEG files come in different guises: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>MPG: This is the most <SPAN =
class=3Dbold><STRONG>basic</STRONG></SPAN> form=20
  of the MPEG file formats. It contains MPEG-1 video, and MP2 (MPEG-1 =
layer 2)=20
  or rarely MP1 audio. </P>
  <LI>
  <P>DAT: This is the very same format as MPG with a different =
extension. It is=20
  used on <SPAN class=3Dbold><STRONG>Video CDs</STRONG></SPAN>. Due to =
the way=20
  VCDs are created and Linux is designed, the DAT files cannot be played =
nor=20
  copied from VCDs as regular files. You have to use <TT=20
  class=3Doption>vcd://</TT> to play a Video CD. </P>
  <LI>
  <P>VOB: This is the MPEG file format on <SPAN=20
  class=3Dbold><STRONG>DVDs</STRONG></SPAN>. It is the same as MPG, plus =
the=20
  capability to contain subtitles or non-MPEG (AC-3) audio. It contains =
encoded=20
  MPEG-2 video and usually AC-3 audio, but DTS, MP2 and uncompressed =
LPCM are=20
  allowed, too. <SPAN class=3Dbold><STRONG>Read the <A=20
  title=3D"4.2.&nbsp;DVD playback"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dvd">DVD</A>=20
  section</STRONG></SPAN>! </P>
  <LI>
  <P>TY: This is a TiVo MPEG stream. It contains MPEG PES data for audio =
and=20
  video streams, as well as extra information like closed captions. The=20
  container is not an MPEG program stream, but a closed format created =
by TiVo.=20
  For more information on TiVo stream format, please refer to <A=20
  href=3D"http://dvd-create.sourceforge.net/tystudio/tystream.shtml"=20
  target=3D_top>the TyStudio page</A>. </P></LI></UL></DIV>
<P>Series of frames form independent groups in MPEG files. This means =
that you=20
can cut/join an MPEG file with standard file tools (like <SPAN><STRONG=20
class=3Dcommand>dd</STRONG></SPAN>, <SPAN><STRONG=20
class=3Dcommand>cut</STRONG></SPAN>), and it remains completely =
functional. </P>
<P>One important feature of MPGs is that they have a field to describe =
the=20
aspect ratio of the video stream within. For example SVCDs have 480x480=20
resolution video, and in the header that field is set to 4:3, so that it =
is=20
played at 640x480. AVI files often lack this field, so they have to be =
rescaled=20
during encoding or played with the <TT class=3Doption>-aspect</TT> =
option.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Davi></A>6.1.2.&nbsp;AVI =
files</H3></DIV></DIV></DIV>
<P>Designed by Microsoft, <SPAN class=3Dbold><STRONG>AVI (Audio Video=20
Interleaved)</STRONG></SPAN> is a widespread multipurpose format =
currently used=20
mostly for MPEG-4 (DivX and DivX4) video. It has many known drawbacks =
and=20
shortcomings (for example in streaming). It supports one video stream =
and 0 to=20
99 audio streams and can be as big as 2GB, but there exists an extension =

allowing bigger files called <SPAN =
class=3Dbold><STRONG>OpenDML</STRONG></SPAN>.=20
Microsoft currently strongly discourages its use and encourages ASF/WMV. =
Not=20
that anybody cares. </P>
<P>There is a hack that allows AVI files to contain an Ogg Vorbis audio =
stream,=20
but makes them incompatible with standard AVI. <SPAN=20
class=3Dapplication>MPlayer</SPAN> supports playing these files. Seeking =
is also=20
implemented but severely hampered by badly encoded files with confusing =
headers.=20
Unfortunately the only encoder currently capable of creating these =
files, <SPAN=20
class=3Dapplication>NanDub</SPAN>, has this problem. </P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>DV cameras create raw DV streams that DV grabbing utilities convert =
to two=20
different types of AVI files. The AVI will then contain either separate =
audio=20
and video streams that <SPAN class=3Dapplication>MPlayer</SPAN> can play =
or the=20
raw DV stream for which support is under development. </P></DIV>
<P>There are two kinds of AVI files: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Interleaved:</STRONG></SPAN> Audio and =
video=20
  content is interleaved. This is the standard usage. Recommended and =
mostly=20
  used. Some tools create interleaved AVIs with bad sync. <SPAN=20
  class=3Dapplication>MPlayer</SPAN> detects these as interleaved, and =
this=20
  climaxes in loss of A/V sync, probably at seeking. These files should =
be=20
  played as non-interleaved (with the <TT class=3Doption>-ni</TT> =
option). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Non-interleaved:</STRONG></SPAN> First =
comes the=20
  whole video stream, then the whole audio stream. It thus needs a lot =
of=20
  seeking, making playing from network or CD-ROM difficult. =
</P></LI></UL></DIV>
<P></P>
<P><SPAN class=3Dapplication>MPlayer</SPAN> supports two kinds of =
timings for AVI=20
files: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>bps-based:</STRONG></SPAN> It is based =
on the=20
  bitrate/samplerate of the video/audio stream. This method is used by =
most=20
  players, including <A href=3D"http://avifile.sf.net/" =
target=3D_top>avifile</A>=20
  and <SPAN class=3Dapplication>Windows Media Player</SPAN>. Files with =
broken=20
  headers, and files created with VBR audio but not VBR-compliant =
encoder will=20
  result in A/V desync with this method (mostly at seeking). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>interleaving-based:</STRONG></SPAN> It =
does not=20
  use the bitrate value of the header, instead it uses the relative =
position of=20
  interleaved audio and video chunks, making badly encoded files with =
VBR audio=20
  playable. </P></LI></UL></DIV>
<P></P>
<P>Any audio and video codec is allowed, but note that VBR audio is not =
well=20
supported by most players. The file format makes it possible to use VBR =
audio,=20
but most players expect CBR audio, thus they fail with VBR. VBR is =
uncommon and=20
Microsoft's AVI specs only describe CBR audio. I also noticed that most =
AVI=20
encoders/multiplexers create bad files when using VBR audio. There are =
only two=20
known exceptions: <SPAN class=3Dapplication>NanDub</SPAN> and <A=20
title=3D"Chapter&nbsp;13.&nbsp;Basic usage of MEncoder"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mencoder"><SPAN=20
class=3Dapplication>MEncoder</SPAN></A>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dasf-wmv></A>6.1.3.&nbsp;ASF/WMV=20
files</H3></DIV></DIV></DIV>
<P>ASF (Active Streaming Format) comes from Microsoft. They developed =
two=20
variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (<SPAN =

class=3Dapplication>Windows Media Player</SPAN> and <SPAN=20
class=3Dapplication>Windows Media Encoder</SPAN>) and is very secret. =
v2.0 is=20
published and patented :). Of course they differ, there is no =
compatibility at=20
all (it is just another legal game). <SPAN =
class=3Dapplication>MPlayer</SPAN>=20
supports only v1.0, as nobody has ever seen v2.0 files :). Note that ASF =
files=20
nowadays come with the extension <TT class=3Dfilename>.WMA</TT> or <TT=20
class=3Dfilename>.WMV</TT>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dmov></A>6.1.4.&nbsp;QuickTime/MOV=20
files</H3></DIV></DIV></DIV>
<P>These formats were designed by Apple and can contain any codec, CBR =
or VBR.=20
They usually have a <TT class=3Dfilename>.QT</TT> or <TT =
class=3Dfilename>.MOV</TT>=20
extension. Note that since the MPEG-4 group chose QuickTime as the =
recommended=20
file format for MPEG-4, their MOV files come with a <TT =
class=3Dfilename>.MPG</TT>=20
or <TT class=3Dfilename>.MP4</TT> extension (Interestingly the video and =
audio=20
streams in these files are real MPG and AAC files. You can even extract =
them=20
with the <TT class=3Doption>-dumpvideo</TT> and <TT =
class=3Doption>-dumpaudio</TT>=20
options.). </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dvivo></A>6.1.5.&nbsp;VIVO =
files</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> happily demuxes VIVO file =
formats. The=20
biggest disadvantage of the format is that it has no index block, nor a =
fixed=20
packet size or sync bytes and most files lack even keyframes, so forget =
seeking!=20
</P>
<P>The video codec of VIVO/1.0 files is standard <SPAN=20
class=3Dbold><STRONG>h.263</STRONG></SPAN>. The video codec of VIVO/2.0 =
files is a=20
modified, nonstandard <SPAN =
class=3Dbold><STRONG>h.263v2</STRONG></SPAN>. The=20
audio is the same, it may be <SPAN class=3Dbold><STRONG>g.723=20
(standard)</STRONG></SPAN>, or <SPAN class=3Dbold><STRONG>Vivo=20
Siren</STRONG></SPAN>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dfli></A>6.1.6.&nbsp;FLI =
files</H3></DIV></DIV></DIV>
<P><SPAN class=3Dbold><STRONG>FLI</STRONG></SPAN> is a very old file =
format used=20
by Autodesk Animator, but it is a common file format for short =
animations on the=20
net. <SPAN class=3Dapplication>MPlayer</SPAN> demuxes and decodes FLI =
movies and=20
is even able to seek within them (useful when looping with the <TT=20
class=3Doption>-loop</TT> option). FLI files do not have keyframes, so =
the picture=20
will be messy for a short time after seeking. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Drealmedia></A>6.1.7.&nbsp;RealMedia (RM)=20
files</H3></DIV></DIV></DIV>
<P>Yes, <SPAN class=3Dapplication>MPlayer</SPAN> can read (demux) =
RealMedia (<TT=20
class=3Dfilename>.rm</TT>) files. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dnuppelvideo></A>6.1.8.&nbsp;NuppelVideo=20
files</H3></DIV></DIV></DIV>
<P>NuppelVideo is a TV grabber tool (AFAIK:). <SPAN=20
class=3Dapplication>MPlayer</SPAN> can read its <TT =
class=3Dfilename>.NUV</TT> files=20
(only NuppelVideo 5.0). Those files can contain uncompressed YV12, =
YV12+RTJpeg=20
compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed frames. =
<SPAN=20
class=3Dapplication>MPlayer</SPAN> decodes (and also <SPAN=20
class=3Dbold><STRONG>encodes</STRONG></SPAN> them with <SPAN=20
class=3Dapplication>MEncoder</SPAN> to MPEG-4 (DivX)/etc!) them all. =
Seeking=20
works. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dyuv4mpeg></A>6.1.9.&nbsp;yuv4mpeg=20
files</H3></DIV></DIV></DIV>
<P><A href=3D"http://mjpeg.sf.net/" target=3D_top>yuv4mpeg / =
yuv4mpeg2</A> is a file=20
format used by the <A href=3D"http://mjpeg.sf.net/" =
target=3D_top>mjpegtools=20
programs</A>. You can grab, produce, filter or encode video in this =
format using=20
these tools. The file format is really a sequence of uncompressed YUV =
4:2:0=20
images. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dfilm></A>6.1.10.&nbsp;FILM =
files</H3></DIV></DIV></DIV>
<P>This format is used on old Sega Saturn CD-ROM games. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Droq></A>6.1.11.&nbsp;RoQ =
files</H3></DIV></DIV></DIV>
<P>RoQ files are multimedia files used in some ID games such as Quake =
III and=20
Return to Castle Wolfenstein. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dogg></A>6.1.12.&nbsp;OGG/OGM=20
files</H3></DIV></DIV></DIV>
<P>This is a new fileformat from <A href=3D"http://www.xiph.org/"=20
target=3D_top>Xiphophorus</A>. It can contain any video or audio codec, =
CBR or=20
VBR. You'll need <CODE class=3Dsystemitem>libogg</CODE> and <CODE=20
class=3Dsystemitem>libvorbis</CODE> installed before compiling <SPAN=20
class=3Dapplication>MPlayer</SPAN> to be able to play it. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dsdp></A>6.1.13.&nbsp;SDP =
files</H3></DIV></DIV></DIV>
<P><A href=3D"ftp://ftp.rfc-editor.org/in-notes/rfc2327.txt" =
target=3D_top>SDP</A>=20
is an IETF standard format for describing video and/or audio RTP =
streams. (The=20
"<A href=3D"http://www.live555.com/mplayer/" target=3D_top>LIVE555 =
Streaming=20
Media</A>" are required.) </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dpva></A>6.1.14.&nbsp;PVA =
files</H3></DIV></DIV></DIV>
<P>PVA is an MPEG-like format used by DVB TV boards' software (e.g.: =
<SPAN=20
class=3Dapplication>MultiDec</SPAN>, <SPAN =
class=3Dapplication>WinTV</SPAN> under=20
Windows). </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dnsv></A>6.1.15.&nbsp;NSV =
files</H3></DIV></DIV></DIV>
<P>NSV (NullSoft Video) is the file format used by the <SPAN=20
class=3Dapplication>Winamp</SPAN> player to stream audio and video. =
Video is VP3,=20
VP5 or VP6, audio is MP3, AAC or VLB. The audio only version of NSV has =
the <TT=20
class=3Dfilename>.nsa</TT> extension. <SPAN =
class=3Dapplication>MPlayer</SPAN> can=20
play both NSV streams and files. Please note that most files from the <A =

href=3D"http://www.winamp.com/" target=3D_top>Winamp site</A> use VLB =
audio, that=20
can't be decoded yet. Moreover streams from that site need an extra=20
depacketization layer that still has to be implemented (those files are=20
unplayable anyway because they use VLB audio). </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dmatroska></A>6.1.16.&nbsp;Matroska=20
files</H3></DIV></DIV></DIV>
<P>Matroska is an open container format. Read more on the <A=20
href=3D"http://www.matroska.org/" target=3D_top>official site</A>. =
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dnut></A>6.1.17.&nbsp;NUT =
files</H3></DIV></DIV></DIV>
<P>NUT is the container format developed by <SPAN=20
class=3Dapplication>MPlayer</SPAN> and <SPAN =
class=3Dapplication>FFmpeg</SPAN>=20
folks. Both projects support it. Read more on the <A =
href=3D"http://www.nut.hu/"=20
target=3D_top>official site</A>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dgif></A>6.1.18.&nbsp;GIF =
files</H3></DIV></DIV></DIV>
<P>The <SPAN class=3Dbold><STRONG>GIF</STRONG></SPAN> format is a common =
format=20
for web graphics. There are two versions of the GIF spec, GIF87a and =
GIF89a. The=20
main difference is that GIF89a allows for animation. <SPAN=20
class=3Dapplication>MPlayer</SPAN> supports both formats through use of =
<CODE=20
class=3Dsystemitem>libungif</CODE> or another libgif-compatible library. =

Non-animated GIFs will be displayed as single frame videos. (Use the <TT =

class=3Doption>-loop</TT> and <TT class=3Doption>-fixed-vo</TT> options =
to display=20
these longer.) </P>
<P><SPAN class=3Dapplication>MPlayer</SPAN> currently does not support =
seeking in=20
GIF files. GIF files do not necessarily have a fixed frame size, nor a =
fixed=20
framerate. Rather, each frame is of independent size and is supposed to =
be=20
positioned in a certain place on a field of fixed-size. The framerate is =

controlled by an optional block before each frame that specifies the =
next=20
frame's delay in centiseconds. </P>
<P>Standard GIF files contain 24-bit RGB frames with at most an 8-bit =
indexed=20
palette. These frames are usually LZW-compressed, although some GIF =
encoders=20
produce uncompressed frames to avoid patent issues with LZW compression. =
</P>
<P>If your distribution does not come with <CODE=20
class=3Dsystemitem>libungif</CODE>, download a copy from the <A=20
href=3D"http://sourceforge.net/projects/libungif" target=3D_top>libungif =

homepage</A>. For detailed technical information, have a look at the <A=20
href=3D"http://www.w3.org/Graphics/GIF/spec-gif89a.txt" =
target=3D_top>GIF89a=20
specification</A>. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Daudio-formats></A>6.2.&nbsp;Audio=20
formats</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> is a <SPAN=20
class=3Dbold><STRONG>movie</STRONG></SPAN> and not a <SPAN=20
class=3Dbold><STRONG>media</STRONG></SPAN> player, although it can play =
some audio=20
file formats (they are listed in the sections below). This is not a =
recommended=20
usage of <SPAN class=3Dapplication>MPlayer</SPAN>, you better use <A=20
href=3D"http://www.xmms.org/" target=3D_top>XMMS</A>. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dmp3></A>6.2.1.&nbsp;MP3 =
files</H3></DIV></DIV></DIV>
<P>You may have problems playing certain MP3 files that <SPAN=20
class=3Dapplication>MPlayer</SPAN> will misdetect as MPEGs and play =
incorrectly or=20
not at all. This cannot be fixed without dropping support for certain =
broken=20
MPEG files and thus will remain like this for the foreseeable future. =
The <TT=20
class=3Doption>-demuxer</TT> flag described in the man page may help you =
in these=20
cases. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dogg-vorbis></A>6.2.2.&nbsp;OGG/OGM files=20
(Vorbis)</H3></DIV></DIV></DIV>
<P>Requires properly installed <CODE class=3Dsystemitem>libogg</CODE> =
and <CODE=20
class=3Dsystemitem>libvorbis</CODE>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dcdda></A>6.2.3.&nbsp;CD =
audio</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> can use <SPAN=20
class=3Dapplication>cdparanoia</SPAN> to play CDDA (Audio CD). The scope =
of this=20
section does not contain enumerating <SPAN =
class=3Dapplication>cdparanoia</SPAN>'s=20
features. </P>
<P>See the man page's <TT class=3Doption>-cdda</TT> option which can be =
used to=20
pass options to <SPAN class=3Dapplication>cdparanoia</SPAN>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dxmms></A>6.2.4.&nbsp;XMMS</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> can use <SPAN=20
class=3Dapplication>XMMS</SPAN> input plugins to play many file formats. =
There are=20
plugins for SNES game tunes, SID tunes (from Commodore 64), many Amiga =
formats,=20
.xm, .it, VQF, musepack, Bonk, shorten and many others. You can find =
them at the=20
<A href=3D"http://www.xmms.org/plugins.php?category=3Dinput" =
target=3D_top>XMMS input=20
plugin page</A>. </P>
<P>For this feature you need to have <SPAN =
class=3Dapplication>XMMS</SPAN> and=20
compile <SPAN class=3Dapplication>MPlayer</SPAN> with <TT=20
class=3Dfilename>./configure --enable-xmms</TT>. If that does not work, =
you might=20
need to set the <SPAN class=3Dapplication>XMMS</SPAN> plugin and library =
path=20
explicitly by way of the <TT class=3Doption>--with-xmmsplugindir</TT> =
and <TT=20
class=3Doption>--with-xmmslibdir</TT> options. </P></DIV></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A=20
name=3Dcodecs></A>Chapter&nbsp;7.&nbsp;Codecs</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
video-codecs">7.1.=20
  Video codecs</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ffmpeg">7.1.1.=20
    FFmpeg/libavcodec</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
xvid">7.1.2.=20
    Xvid</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264">7.1.3.=20
    <CODE class=3Dsystemitem>x264</CODE></A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264-whatis">7.1.3.1.=20
      What is <CODE class=3Dsystemitem>x264</CODE>?</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-h264-whatis">7.1.3.2.=20
      What is H.264?</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264-playback">7.1.3.3.=20
      How can I play H.264 videos with <SPAN=20
      class=3Dapplication>MPlayer</SPAN>?</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264-encode">7.1.3.4.=20
      How can I encode videos using <SPAN =
class=3Dapplication>MEncoder</SPAN> and=20
      <CODE =
class=3Dsystemitem>x264</CODE>?</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
audio-codecs">7.2.=20
  Audio codecs</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
swac3">7.2.1.=20
    Software AC-3 decoding</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
hwac3">7.2.2.=20
    Hardware AC-3 decoding</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
libmad">7.2.3.=20
    <CODE class=3Dsystemitem>libmad</CODE> support</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
hwmpa">7.2.4.=20
    Hardware MPEG audio codec</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aac">7.2.5.=20
    AAC codec</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
amr">7.2.6.=20
    AMR codecs</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-importing">7.3.=20
  Win32 codecs importing HOWTO</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vfw-codecs">7.3.1.=20
    VFW codecs</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dshow-codecs">7.3.2.=20
    DirectShow codecs</A></SPAN></DT></DL></DD></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dvideo-codecs></A>7.1.&nbsp;Video=20
codecs</H2></DIV></DIV></DIV>
<P>The <A =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/codecs-status.html"=20
target=3D_top>codec status table</A> is a complete list of all supported =
codecs,=20
regenerated daily. Some binary codecs for use with MPlayer are available =
in the=20
<A href=3D"http://www.mplayerhq.hu/design7/dload.html#binary_codecs"=20
target=3D_top>download section</A> of our homepage. </P>
<P>The most important ones above all: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>MPEG-1</STRONG></SPAN> (<SPAN=20
  class=3Dbold><STRONG>VCD</STRONG></SPAN>) and <SPAN=20
  class=3Dbold><STRONG>MPEG-2</STRONG></SPAN> (<SPAN=20
  class=3Dbold><STRONG>DVD</STRONG></SPAN>) video </P>
  <LI>
  <P>native decoders for <SPAN class=3Dbold><STRONG>all DivX variants, =
3ivX, M$=20
  MPEG-4</STRONG></SPAN> v1, v2 and other MPEG-4 variants </P>
  <LI>
  <P>native decoder for <SPAN class=3Dbold><STRONG>Windows Media Video=20
  7/8</STRONG></SPAN> (<SPAN =
class=3Dbold><STRONG>WMV1/WMV2</STRONG></SPAN>), and=20
  Win32 DLL decoder for <SPAN class=3Dbold><STRONG>Windows Media Video=20
  9</STRONG></SPAN> (<SPAN class=3Dbold><STRONG>WMV3</STRONG></SPAN>), =
both used=20
  in <TT class=3Dfilename>.wmv</TT> files </P>
  <LI>
  <P>native <SPAN class=3Dbold><STRONG>Sorenson 1 (SVQ1)</STRONG></SPAN> =
decoder=20
  </P>
  <LI>
  <P>native <SPAN class=3Dbold><STRONG>Sorenson 3 (SVQ3)</STRONG></SPAN> =
decoder=20
  </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>3ivx</STRONG></SPAN> v1, v2 decoder </P>
  <LI>
  <P>Cinepak and <SPAN class=3Dbold><STRONG>Intel Indeo</STRONG></SPAN> =
codecs=20
  (3.1,3.2,4.1,5.0) </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>MJPEG</STRONG></SPAN>, AVID, VCR2, ASV2 =
and other=20
  hardware formats </P>
  <LI>
  <P>VIVO 1.0, 2.0, I263 and other <SPAN=20
  class=3Dbold><STRONG>H.263(+)</STRONG></SPAN> variants </P>
  <LI>
  <P>FLI/FLC </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>RealVideo 1.0 &amp; 2.0</STRONG></SPAN> =
from <CODE=20
  class=3Dsystemitem>libavcodec</CODE>, and <SPAN =
class=3Dbold><STRONG>RealVideo 3.0=20
  &amp; 4.0</STRONG></SPAN> codecs using RealPlayer libraries </P>
  <LI>
  <P>native decoder for HuffYUV </P>
  <LI>
  <P>Various old simple RLE-like formats </P></LI></UL></DIV>
<P>If you have a Win32 codec not listed here which is not supported yet, =
please=20
read the <A title=3D"7.3.&nbsp;Win32 codecs importing HOWTO"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-importing">codec=20
importing HOWTO</A> and help us add support for it. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dffmpeg></A>7.1.1.&nbsp;FFmpeg/libavcodec</H3></DIV></DIV></DIV>
<P><A href=3D"http://ffmpeg.org/" target=3D_top>FFmpeg</A> contains =
<CODE=20
class=3Dsystemitem>libavcodec</CODE>, the leading open source video and =
audio=20
codec library. It is capable of decoding most multimedia formats, =
usually at=20
higher speeds than the alternatives, and aims to add support for the =
rest of=20
them eventually. It is the default decoder for the majority of codecs =
that <SPAN=20
class=3Dapplication>MPlayer</SPAN> supports. Encoding is also possible =
for some=20
formats and supported in <SPAN class=3Dapplication>MEncoder</SPAN>. </P>
<P>For a complete list of supported <A=20
href=3D"http://ffmpeg.org/ffmpeg-doc.html#SEC19" target=3D_top>video</A> =
and <A=20
href=3D"http://ffmpeg.org/ffmpeg-doc.html#SEC20" target=3D_top>audio</A> =
codecs=20
please visit the FFmpeg homepage. </P>
<P><SPAN class=3Dapplication>MPlayer</SPAN> contains <CODE=20
class=3Dsystemitem>libavcodec</CODE>. Just run <TT =
class=3Dfilename>./configure</TT>=20
and compile. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dxvid></A>7.1.2.&nbsp;Xvid</H3></DIV></DIV></DIV>
<P><A href=3D"http://www.xvid.org/" target=3D_top>Xvid</A> is a free =
software MPEG-4=20
ASP compliant video codec, which features two pass encoding and full =
MPEG-4 ASP=20
support, making it a lot more efficient than the well-known DivX codec. =
It=20
yields very good video quality and good performance due to CPU =
optimizations for=20
most modern processors. </P>
<P>It began as a forked development of the OpenDivX codec. This happened =
when=20
ProjectMayo changed OpenDivX to closed source DivX4, and the =
non-ProjectMayo=20
people working on OpenDivX got angry, then started Xvid. So both =
projects have=20
the same origin. </P>
<P>Note that Xvid is not necessary to decode Xvid-encoded video. <CODE=20
class=3Dsystemitem>libavcodec</CODE> is used by default as it offers =
better speed.=20
</P>
<DIV class=3Dprocedure><A name=3Did2545449></A>
<P class=3Dtitle><B>Installing <CODE =
class=3Dsystemitem>Xvid</CODE></B></P>
<P>Like most open source software, it is available in two flavors: <A=20
href=3D"http://www.xvid.org/downloads.html" target=3D_top>official =
releases</A> and=20
the CVS version. The CVS version is usually stable enough to use, as =
most of the=20
time it features fixes for bugs that exist in releases. Here is what to =
do to=20
make <CODE class=3Dsystemitem>Xvid</CODE> CVS work with <SPAN=20
class=3Dapplication>MEncoder</SPAN> (you need at least <SPAN=20
class=3Dapplication>autoconf</SPAN> 2.50, <SPAN =
class=3Dapplication>automake</SPAN>=20
and <SPAN class=3Dapplication>libtool</SPAN>): </P>
<OL type=3D1>
  <LI>
  <P></P><PRE class=3Dscreen>cvs -z3 =
-d:pserver:anonymous@cvs.xvid.org:/xvid login</PRE>
  <P></P>
  <LI>
  <P></P><PRE class=3Dscreen>cvs -z3 =
-d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcore</PRE>
  <P></P>
  <LI>
  <P></P><PRE class=3Dscreen>cd xvidcore/build/generic</PRE>
  <P></P>
  <LI>
  <P></P><PRE class=3Dscreen>./bootstrap.sh</PRE>
  <P></P>
  <LI>
  <P></P><PRE class=3Dscreen>./configure</PRE>
  <P>You may have to add some options (examine the output of =
<SPAN><STRONG=20
  class=3Dcommand>./configure --help</STRONG></SPAN>). </P>
  <LI>
  <P></P><PRE class=3Dscreen>make &amp;&amp; make install</PRE>
  <P></P>
  <LI>
  <P>If you specified <TT class=3Doption>--enable-divxcompat</TT>, copy =
<TT=20
  class=3Dfilename>../../src/divx4.h</TT> to <TT=20
  class=3Dfilename>/usr/local/include/</TT>. </P>
  <LI>
  <P>Recompile <SPAN class=3Dapplication>MPlayer</SPAN> with <TT=20
  class=3Doption>--with-xvidlibdir=3D<EM=20
  class=3Dreplaceable><CODE>/path/to/</CODE></EM>libxvidcore.a</TT> <TT=20
  class=3Doption>--with-xvidincdir=3D<EM=20
  class=3Dreplaceable><CODE>/path/to/</CODE></EM>xvid.h</TT>.=20
</P></LI></OL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dcodec-x264></A>7.1.3.&nbsp;<CODE=20
class=3Dsystemitem>x264</CODE></H3></DIV></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A name=3Dcodec-x264-whatis></A>7.1.3.1.&nbsp;What is =
<CODE=20
class=3Dsystemitem>x264</CODE>?</H4></DIV></DIV></DIV>
<P><A href=3D"http://developers.videolan.org/x264.html" =
target=3D_top><CODE=20
class=3Dsystemitem>x264</CODE></A> is a library for creating H.264 video =
streams.=20
It is not 100% complete, but currently it has at least some kind of =
support for=20
most of the H.264 features which impact quality. There are also many =
advanced=20
features in the H.264 specification which have nothing to do with video =
quality=20
per se; many of these are not yet implemented in <CODE=20
class=3Dsystemitem>x264</CODE>. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>Encoder features</B></P>
<UL type=3Ddisc>
  <LI>
  <P>CAVLC/CABAC</P>
  <LI>
  <P>Multi-references</P>
  <LI>
  <P>Intra: all macroblock types (16x16, 8x8, and 4x4 with all =
predictions) </P>
  <LI>
  <P>Inter P: all partitions (from 16x16 down to 4x4) </P>
  <LI>
  <P>Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT) =
</P>
  <LI>
  <P>Ratecontrol: constant quantizer, constant bitrate, single or =
multipass ABR,=20
  optional VBV </P>
  <LI>
  <P>Scene cut detection</P>
  <LI>
  <P>Adaptive B-frame placement</P>
  <LI>
  <P>B-frames as references / arbitrary frame order </P>
  <LI>
  <P>8x8 and 4x4 adaptive spatial transform</P>
  <LI>
  <P>Lossless mode</P>
  <LI>
  <P>Custom quantization matrices</P>
  <LI>
  <P>Parallel encoding of multiple slices</P>
  <LI>
  <P>Interlacing</P></LI></UL></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A name=3Dcodec-h264-whatis></A>7.1.3.2.&nbsp;What is=20
H.264?</H4></DIV></DIV></DIV>
<P>H.264 is one name for a new digital video codec jointly developed by =
the ITU=20
and MPEG. It can also be correctly referred to by the cumbersome names =
of=20
"ISO/IEC 14496-10" or "MPEG-4 Part 10". More frequently, it is referred =
to as=20
"MPEG-4 AVC" or just "AVC". </P>
<P>Whatever you call it, H.264 may be worth trying because it can =
typically=20
match the quality of MPEG-4 ASP with 5%-30% less bitrate. Actual results =
will=20
depend on both the source material and the encoder. The gains from using =
H.264=20
do not come for free: Decoding H.264 streams seems to have steep CPU and =
memory=20
requirements. For instance, on a 1733 MHz Athlon, a DVD-resolution =
1500kbps=20
H.264 video requires around 35% CPU to decode. By comparison, decoding a =

DVD-resolution 1500kbps MPEG-4 ASP stream requires around 10% CPU. This =
means=20
that decoding high-definition streams is almost out of the question for =
most=20
users. It also means that even a decent DVD rip may sometimes stutter on =

processors slower than 2.0 GHz or so. </P>
<P>At least with <CODE class=3Dsystemitem>x264</CODE>, encoding =
requirements are=20
not much worse than what you are used to with MPEG-4 ASP. For instance, =
on a=20
1733 MHz Athlon a typical DVD encode would run at 5-15fps. </P>
<P>This document is not intended to explain the details of H.264, but if =
you are=20
interested in a brief overview, you may want to read <A=20
href=3D"http://www.cdt.luth.se/~peppar/kurs/smd151/spie04-h264OverviewPap=
er.pdf"=20
target=3D_top>The H.264/AVC Advanced Video Coding Standard: Overview and =

Introduction to the Fidelity Range Extensions</A>. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A name=3Dcodec-x264-playback></A>7.1.3.3.&nbsp;How =
can I play=20
H.264 videos with <SPAN =
class=3Dapplication>MPlayer</SPAN>?</H4></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> uses <CODE=20
class=3Dsystemitem>libavcodec</CODE>'s H.264 decoder. <CODE=20
class=3Dsystemitem>libavcodec</CODE> has had at least minimally usable =
H.264=20
decoding since around July 2004, however major changes and improvements =
have=20
been implemented since that time, both in terms of more functionalities=20
supported and in terms of improved CPU usage. Just to be certain, it is =
always a=20
good idea to use a recent Subversion checkout. </P>
<P>If you want a quick and easy way to know whether there have been =
recent=20
changes to <CODE class=3Dsystemitem>libavcodec</CODE>'s H.264 decoding, =
you might=20
keep an eye on <A=20
href=3D"http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/h264.c?view=3Dlog=
"=20
target=3D_top>FFmpeg Subversion repository's web interface</A>. =
</P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A name=3Dcodec-x264-encode></A>7.1.3.4.&nbsp;How can =
I encode=20
videos using <SPAN class=3Dapplication>MEncoder</SPAN> and <CODE=20
class=3Dsystemitem>x264</CODE>?</H4></DIV></DIV></DIV>
<P>If you have the subversion client installed, the latest x264 sources =
can be=20
gotten with this command: </P><PRE class=3Dscreen>svn co =
svn://svn.videolan.org/x264/trunk x264</PRE>
<P><SPAN class=3Dapplication>MPlayer</SPAN> sources are updated whenever =
an <CODE=20
class=3Dsystemitem>x264</CODE> API change occurs, so it is always =
suggested to use=20
<SPAN class=3Dapplication>MPlayer</SPAN> from Subversion as well. =
Perhaps this=20
situation will change when and if an <CODE =
class=3Dsystemitem>x264</CODE>=20
"release" occurs. Meanwhile, <CODE class=3Dsystemitem>x264</CODE> should =
be=20
considered very unstable, in the sense that its programming interface is =
subject=20
to change. </P>
<P><CODE class=3Dsystemitem>x264</CODE> is built and installed in the =
standard=20
way: </P><PRE class=3Dscreen>./configure &amp;&amp; make &amp;&amp; sudo =
make install</PRE>
<P>This installs libx264.a in /usr/local/lib and x264.h is placed in=20
/usr/local/include. With the <CODE class=3Dsystemitem>x264</CODE> =
library and=20
header placed in the standard locations, building <SPAN=20
class=3Dapplication>MPlayer</SPAN> with <CODE =
class=3Dsystemitem>x264</CODE> support=20
is easy. Just run the standard: </P><PRE class=3Dscreen>./configure =
&amp;&amp; make &amp;&amp; sudo make install</PRE>
<P>The <TT class=3Dfilename>./configure</TT> script will autodetect that =
you have=20
satisfied the requirements for <CODE class=3Dsystemitem>x264</CODE>.=20
</P></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Daudio-codecs></A>7.2.&nbsp;Audio=20
codecs</H2></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>The most important audio codecs above all:</B></P>
<UL type=3Ddisc>
  <LI>
  <P>MPEG layer 1/2/3 (MP1/2/3) audio (<SPAN=20
  class=3Dbold><STRONG>native</STRONG></SPAN> code, with MMX/SSE/3DNow!=20
  optimization) </P>
  <LI>
  <P>Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) (<SPAN=20
  class=3Dbold><STRONG>native</STRONG></SPAN> code, with <A=20
  title=3D7.1.1.&nbsp;FFmpeg/libavcodec=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ffmpeg"><CODE=20
  class=3Dsystemitem>libavcodec</CODE></A>) </P>
  <LI>
  <P>Windows Media Audio 9 (WMAv3) (using DMO DLL) </P>
  <LI>
  <P>AC-3 Dolby audio (<SPAN class=3Dbold><STRONG>native</STRONG></SPAN> =
code,=20
  with MMX/SSE/3DNow! optimization) </P>
  <LI>
  <P>AC-3 passing through sound card hardware </P>
  <LI>
  <P>AAC </P>
  <LI>
  <P>Ogg Vorbis audio codec (<SPAN =
class=3Dbold><STRONG>native</STRONG></SPAN>=20
  library) </P>
  <LI>
  <P>RealAudio: DNET (low bitrate AC-3), Cook, Sipro and ATRAC3 </P>
  <LI>
  <P>QuickTime: Qualcomm and QDesign audio codecs </P>
  <LI>
  <P>VIVO audio (g723, Vivo Siren) </P>
  <LI>
  <P>Voxware audio (using DirectShow DLL) </P>
  <LI>
  <P>alaw and ulaw, various gsm, adpcm and pcm formats and other simple =
old=20
  audio codecs </P>
  <LI>
  <P>Adaptive Multi-Rate (AMR) speech codecs </P></LI></UL></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dswac3></A>7.2.1.&nbsp;Software AC-3=20
decoding</H3></DIV></DIV></DIV>
<P>This is the default decoder used for files with AC-3 audio. </P>
<P>The AC-3 decoder can create audio output mixes for 2, 4, or 6 =
speakers. When=20
configured for 6 speakers, this decoder provides separate output of all =
the AC-3=20
channels to the sound driver, allowing for full "surround sound" =
experience=20
without the external AC-3 decoder required to use the hwac3 codec. </P>
<P>Use the <TT class=3Doption>-channels</TT> option to select the number =
of output=20
channels. Use <TT class=3Doption>-channels 2</TT> for a stereo downmix. =
For a 4=20
channel downmix (Left Front, Right Front, Left Surround and Right =
Surround=20
outputs), use <TT class=3Doption>-channels 4</TT>. In this case, any =
center=20
channel will be mixed equally to the front channels. <TT =
class=3Doption>-channels=20
6</TT> will output all the AC-3 channels as they are encoded - in the =
order=20
Left, Right, Left Surround, Right Surround, Center and LFE. </P>
<P>The default number of output channels is 2. </P>
<P>To use more than 2 output channels, you will need to use OSS, and =
have a=20
sound card that supports the appropriate number of output channels via =
the=20
SNDCTL_DSP_CHANNELS ioctl. An example of a suitable driver is emu10k1 =
(used by=20
Soundblaster Live! cards) from August 2001 or newer (ALSA CVS is also =
supposed=20
to work). </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dhwac3></A>7.2.2.&nbsp;Hardware AC-3=20
decoding</H3></DIV></DIV></DIV>
<P>You need an AC-3 capable sound card, with digital out (S/PDIF). The =
card's=20
driver must properly support the AFMT_AC3 format (C-Media does). Connect =
your=20
AC-3 decoder to the S/PDIF output, and use the <TT class=3Doption>-ac =
hwac3</TT>=20
option. It is experimental but known to work with C-Media cards and =
Soundblaster=20
Live! + ALSA (but not OSS) drivers and DXR3/Hollywood+ MPEG decoder =
cards.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dlibmad></A>7.2.3.&nbsp;<CODE=20
class=3Dsystemitem>libmad</CODE> support</H3></DIV></DIV></DIV>
<P><A href=3D"http://www.underbit.com/products/mad/" target=3D_top><CODE =

class=3Dsystemitem>libmad</CODE></A> is a multiplatform, integer =
(internally 24bit=20
PCM) only MPEG audio decoding library. It does not handle broken files =
well, and=20
it sometimes has problems with seeking, but it may perform better on =
FPU-less=20
(such as <A title=3D12.1.3.&nbsp;ARM=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
arm">ARM</A>)=20
platform than <CODE class=3Dsystemitem>mp3lib</CODE>. </P>
<P>If you have a proper installation of <CODE =
class=3Dsystemitem>libmad</CODE>,=20
<TT class=3Dfilename>./configure</TT> will notice and support for MPEG =
audio=20
decoding via <CODE class=3Dsystemitem>libmad</CODE> will be built =
automatically.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dhwmpa></A>7.2.4.&nbsp;Hardware MPEG audio=20
codec</H3></DIV></DIV></DIV>
<P>This codec (selected by <TT class=3Doption>-ac hwmpa</TT>) passes =
through MPEG=20
audio packets to hardware decoders, such as the ones found in =
full-featured DVB=20
cards and DXR2 adapters. Don't use it in combination with any other =
audio output=20
device (such as OSS and ALSA) that isn't able to decode it (you will =
hear only=20
white noise). </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Daac></A>7.2.5.&nbsp;AAC =
codec</H3></DIV></DIV></DIV>
<P>AAC (Advanced Audio Coding) is an audio codec sometimes found in MOV =
and MP4=20
files. An open source decoder called FAAD is available from <A=20
href=3D"http://www.audiocoding.com/" =
target=3D_top>http://www.audiocoding.com/</A>.=20
<SPAN class=3Dapplication>MPlayer</SPAN> includes a CVS snapshot of =
libfaad 2.1=20
beta, so you do not need to get it separately. </P>
<P>If you use gcc 3.2 which fails to compile our internal FAAD or want =
to use=20
the external library for some other reason, download the library from =
the <A=20
href=3D"http://www.audiocoding.com/modules/mydownloads/" =
target=3D_top>download=20
page</A> and pass <TT class=3Doption>--enable-faad-external</TT> to <TT=20
class=3Dfilename>./configure</TT>. You do not need all of faad2 to =
decode AAC=20
files, libfaad is enough. Build it like this: </P><PRE class=3Dscreen>cd =
faad2/
sh bootstrap
./configure
cd libfaad
make
make install
</PRE>
<P>Binaries are not available from audiocoding.com, but you can =
(apt-)get Debian=20
packages from <A href=3D"http://www.debian-multimedia.org/" =
target=3D_top>Christian=20
Marillat's homepage</A>, Mandrake/Mandriva RPMs from the <A=20
href=3D"http://plf.zarb.org/" target=3D_top>P.L.F</A> and Fedora RPMs =
from <A=20
href=3D"http://rpm.livna.org/" target=3D_top>Livna</A>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Damr></A>7.2.6.&nbsp;AMR =
codecs</H3></DIV></DIV></DIV>
<P>Adaptive Multi-Rate speech codec is used in third generation (3G) =
mobile=20
phones. Reference implementation is available from <A=20
href=3D"http://www.3gpp.org/" target=3D_top>The 3rd Generation =
Partnership=20
Project</A> (free for private use). To enable support, download and =
install=20
support libraries for <A href=3D"http://www.penguin.cz/~utx/amr"=20
target=3D_top>AMR-NB and AMR-WB</A> following the instructions on that =
page.=20
Recompile MPlayer afterwards. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dcodec-importing></A>7.3.&nbsp;Win32=20
codecs importing HOWTO</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dvfw-codecs></A>7.3.1.&nbsp;VFW=20
codecs</H3></DIV></DIV></DIV>
<P>VFW (Video for Windows) is the old Video API for Windows. Its codecs =
have the=20
<TT class=3Dfilename>.DLL</TT> or (rarely) <TT =
class=3Dfilename>.DRV</TT> extension.=20
If <SPAN class=3Dapplication>MPlayer</SPAN> fails at playing your AVI =
with this=20
kind of message: </P><PRE class=3Dscreen>UNKNOWN video codec: HFYU =
(0x55594648)</PRE>
<P>It means your AVI is encoded with a codec which has the HFYU fourcc =
(HFYU =3D=20
HuffYUV codec, DIV3 =3D DivX Low Motion, etc.). Now that you know this, =
you have=20
to find out which DLL Windows loads in order to play this file. In our =
case, the=20
<TT class=3Dfilename>system.ini</TT> contains this information in a line =
that=20
reads: </P><PRE class=3Dprogramlisting>VIDC.HFYU=3Dhuffyuv.dll</PRE>
<P></P>
<P>So you need the <TT class=3Dfilename>huffyuv.dll</TT> file. Note that =
the audio=20
codecs are specified by the MSACM prefix: </P><PRE =
class=3Dprogramlisting>msacm.l3acm=3DL3codeca.acm</PRE>
<P></P>
<P>This is the MP3 codec. Now that you have all the necessary =
information=20
(fourcc, codec file, sample AVI), submit your codec support request by =
mail, and=20
upload these files to the FTP site: <CODE=20
class=3Dsystemitem>ftp://upload.mplayerhq.hu/MPlayer/incoming/<EM=20
class=3Dreplaceable><CODE>&lt;codecname&gt;</CODE></EM>/</CODE> </P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>On Windows NT/2000/XP search for this info in the registry, e.g. =
search for=20
"VIDC.HFYU". To find out how to do this, look at the old DirectShow =
method=20
below. </P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Ddshow-codecs></A>7.3.2.&nbsp;DirectShow=20
codecs</H3></DIV></DIV></DIV>
<P>DirectShow is the newer Video API, which is even worse than its =
predecessor.=20
Things are harder with DirectShow, since </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><TT class=3Dfilename>system.ini</TT> does not contain the needed =
information,=20
  instead it is stored in the registry and </P>
  <LI>
  <P>we need the GUID of the codec. </P></LI></UL></DIV>
<P></P>
<DIV class=3Dprocedure><A name=3Did2546662></A>
<P class=3Dtitle><B>New Method:</B></P>
<P>Using <SPAN class=3Dapplication>Microsoft GraphEdit</SPAN> (fast) =
</P>
<OL type=3D1>
  <LI>
  <P>Get <SPAN class=3Dapplication>GraphEdit</SPAN> from either DirectX =
SDK or <A=20
  href=3D"http://doom9.net/" target=3D_top>doom9</A>. </P>
  <LI>
  <P>Start <SPAN><STRONG class=3Dcommand>graphedit.exe</STRONG></SPAN>. =
</P>
  <LI>
  <P>From the menu select <SPAN class=3Dguimenu>Graph</SPAN> =E2=86=92 =
<SPAN=20
  class=3Dguisubmenu>Insert Filters</SPAN>. </P>
  <LI>
  <P>Expand item <CODE class=3Dsystemitem>DirectShow Filters</CODE>. =
</P>
  <LI>
  <P>Select the right codec name and expand item. </P>
  <LI>
  <P>In the entry <CODE class=3Dsystemitem>DisplayName</CODE> look at =
the text in=20
  winged brackets after the backslash and write it down (five =
dash-delimited=20
  blocks, the GUID). </P>
  <LI>
  <P>The codec binary is the file specified in the <CODE=20
  class=3Dsystemitem>Filename</CODE> entry. </P></LI></OL></DIV>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>If there is no <CODE class=3Dsystemitem>Filename</CODE> and <CODE=20
class=3Dsystemitem>DisplayName</CODE> contains something like <CODE=20
class=3Dsystemitem>device:dmo</CODE>, then it is a DMO-Codec. </P></DIV>
<DIV class=3Dprocedure><A name=3Did2546804></A>
<P class=3Dtitle><B>Old Method:</B></P>
<P>Take a deep breath and start searching the registry... </P>
<OL type=3D1>
  <LI>
  <P>Start <SPAN><STRONG class=3Dcommand>regedit</STRONG></SPAN>. </P>
  <LI>
  <P>Press <SPAN class=3Dkeycap><B>Ctrl</B></SPAN>-<SPAN=20
  class=3Dkeycap><B>F</B></SPAN>, disable the first two checkboxes, and =
enable the=20
  third. Type in the fourcc of the codec (e.g. <STRONG=20
  class=3Duserinput><CODE>TM20</CODE></STRONG>). </P>
  <LI>
  <P>You should see a field which contains the path and the filename =
(e.g. <TT=20
  class=3Dfilename>C:\WINDOWS\SYSTEM\TM20DEC.AX</TT>). </P>
  <LI>
  <P>Now that you have the file, we need the GUID. Try searching again, =
but now=20
  search for the codec's name, not the fourcc. Its name can be acquired =
when=20
  Media Player is playing the file, by checking <SPAN =
class=3Dguimenu>File</SPAN>=20
  =E2=86=92 <SPAN class=3Dguisubmenu>Properties</SPAN> =E2=86=92 <SPAN=20
  class=3Dguimenuitem>Advanced</SPAN>. If not, you are out of luck. Try =
guessing=20
  (e.g. search for TrueMotion). </P>
  <LI>
  <P>If the GUID is found you should see a <SPAN=20
  class=3Dguilabel>FriendlyName</SPAN> and a <SPAN =
class=3Dguilabel>CLSID</SPAN>=20
  field. Write down the 16 byte CLSID, this is the GUID we need.=20
</P></LI></OL></DIV>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>If searching fails, try enabling all the checkboxes. You may have =
false hits,=20
but you may get lucky... </P></DIV>
<P>Now that you have all the necessary information (fourcc, GUID, codec =
file,=20
sample AVI), submit your codec support request by mail, and upload these =
files=20
to the FTP site: <CODE=20
class=3Dsystemitem>ftp://upload.mplayerhq.hu/MPlayer/incoming/<EM=20
class=3Dreplaceable><CODE>&lt;codecname&gt;</CODE></EM>/</CODE> </P>
<P>If you want to add a codec yourself, read <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/codecs.conf.txt"=20
target=3D_top>DOCS/tech/codecs.conf.txt</A>. </P></DIV></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Dvideo></A>Chapter&nbsp;8.&nbsp;Video output=20
devices</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mtrr">8.1.=20
  Setting up MTRR</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
xv">8.2.=20
  Xv</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tdfx">8.2.1.=20
    3dfx cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
s3">8.2.2.=20
    S3 cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
nvidia">8.2.3.=20
    nVidia cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ati">8.2.4.=20
    ATI cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
neomagic">8.2.5.=20
    NeoMagic cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
trident">8.2.6.=20
    Trident cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
kyro">8.2.7.=20
    Kyro/PowerVR cards</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dga">8.3.=20
  DGA</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
sdl">8.4.=20
  SDL</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
svgalib">8.5.=20
  SVGAlib</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fbdev">8.6.=20
  Framebuffer output (FBdev)</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mga_vid">8.7.=20
  Matrox framebuffer (mga_vid)</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tdfxfb">8.8.=20
  3Dfx YUV support</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tdfx_vid">8.9.=20
  tdfx_vid</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
opengl">8.10.=20
  OpenGL output</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aalib">8.11.=20
  AAlib =E2=80=93 text mode displaying</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
caca">8.12.=20
  <CODE class=3Dsystemitem>libcaca</CODE> =E2=80=93 Color ASCII Art =
library </A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vesa">8.13.=20
  VESA - output to VESA BIOS</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
x11">8.14.=20
  X11</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix">8.15.=20
  VIDIX</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-ati">8.15.1.=20
    ATI cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-mga">8.15.2.=20
    Matrox cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-trident">8.15.3.=20
    Trident cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-3dlabs">8.15.4.=20
    3DLabs cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-nvidia">8.15.5.=20
    nVidia cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-sis">8.15.6.=20
    SiS cards</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
directfb">8.16.=20
  DirectFB</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dfbmga">8.17.=20
  DirectFB/Matrox (dfbmga)</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mpeg_decoders">8.18.=20
  MPEG decoders</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dvb">8.18.1.=20
    DVB output and input</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dxr2">8.18.2.=20
    DXR2</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dxr3">8.18.3.=20
    DXR3/Hollywood+</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
other">8.19.=20
  Other visualization hardware</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
zr">8.19.1.=20
    Zr</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
blinkenlights">8.19.2.=20
    Blinkenlights</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout">8.20.=20
  TV-out support</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout-mga-g400">8.20.1.=20
    Matrox G400 cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-out_matrox_g450">8.20.2.=20
    Matrox G450/G550 cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout-ati">8.20.3.=20
    ATI cards</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout-nvidia">8.20.4.=20
    nVidia</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tvout-neomagic">8.20.5.=20
    NeoMagic</A></SPAN></DT></DL></DD></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dmtrr></A>8.1.&nbsp;Setting up=20
MTRR</H2></DIV></DIV></DIV>
<P>It is VERY recommended to check if the MTRR registers are set up =
properly,=20
because they can give a big performance boost. </P>
<P>Do a <SPAN><STRONG class=3Dcommand>cat /proc/mtrr</STRONG></SPAN>: =
</P><PRE class=3Dscreen><CODE class=3Dprompt>--($:~)--</CODE> cat =
/proc/mtrr
reg00: base=3D0xe4000000 (3648MB), size=3D  16MB: write-combining, =
count=3D9
reg01: base=3D0xd8000000 (3456MB), size=3D 128MB: write-combining, =
count=3D1</PRE>
<P></P>
<P>It's right, shows my Matrox G400 with 16MB memory. I did this from =
XFree=20
4.x.x, which sets up MTRR registers automatically. </P>
<P>If nothing worked, you have to do it manually. First, you have to =
find the=20
base address. You have 3 ways to find it: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>from X11 startup messages, for example: </P><PRE =
class=3Dscreen>(--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ =
0xd8000000, 0xd4000000
(--) SVGA: Linear framebuffer at 0xD8000000</PRE>
  <P></P>
  <LI>
  <P>from <TT class=3Dfilename>/proc/pci</TT> (use <SPAN><STRONG=20
  class=3Dcommand>lspci -v</STRONG></SPAN> command): </P><PRE =
class=3Dscreen>01:00.0 VGA compatible controller: Matrox Graphics, Inc.: =
Unknown device 0525
Memory at d8000000 (32-bit, prefetchable)</PRE>
  <P></P>
  <LI>
  <P>from mga_vid kernel driver messages (use <SPAN><STRONG=20
  class=3Dcommand>dmesg</STRONG></SPAN>): </P><PRE =
class=3Dscreen>mga_mem_base =3D d8000000</PRE>
  <P></P></LI></OL></DIV>
<P></P>
<P>Then let's find the memory size. This is very easy, just convert =
video RAM=20
size to hexadecimal, or use this table: </P>
<DIV class=3Dinformaltable>
<TABLE border=3D0>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <TBODY>
  <TR>
    <TD>1 MB</TD>
    <TD>0x100000</TD></TR>
  <TR>
    <TD>2 MB</TD>
    <TD>0x200000</TD></TR>
  <TR>
    <TD>4 MB</TD>
    <TD>0x400000</TD></TR>
  <TR>
    <TD>8 MB</TD>
    <TD>0x800000</TD></TR>
  <TR>
    <TD>16 MB</TD>
    <TD>0x1000000</TD></TR>
  <TR>
    <TD>32 MB</TD>
    <TD>0x2000000</TD></TR></TBODY></TABLE></DIV>
<P></P>
<P>You know base address and memory size, let's setup MTRR registers! =
For=20
example, for the Matrox card above (<CODE =
class=3Dliteral>base=3D0xd8000000</CODE>)=20
with 32MB ram (<CODE class=3Dliteral>size=3D0x2000000</CODE>) just =
execute: </P><PRE class=3Dscreen>echo "base=3D0xd8000000 =
size=3D0x2000000 type=3Dwrite-combining" &gt; /proc/mtrr
</PRE>
<P></P>
<P>Not all CPUs have MTRRs. For example older K6-2 (around 266MHz, =
stepping 0)=20
CPUs don't have MTRRs, but stepping 12 does (execute <SPAN><STRONG=20
class=3Dcommand>cat /proc/cpuinfo</STRONG></SPAN> to check it). =
</P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dxv></A>8.2.&nbsp;Xv</H2></DIV></DIV></DIV>
<P>Under XFree86 4.0.2 or newer, you can use your card's hardware YUV =
routines=20
using the XVideo extension. This is what the option <TT =
class=3Doption>-vo xv</TT>=20
uses. Also, this driver supports adjusting brightness/contrast/hue/etc. =
(unless=20
you use the old, slow DirectShow DivX codec, which supports it =
everywhere), see=20
the man page. </P>
<P>In order to make this work, be sure to check the following: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>You have to use XFree86 4.0.2 or newer (former versions don't have =
XVideo)=20
  </P>
  <LI>
  <P>Your card actually supports hardware acceleration (modern cards do) =
</P>
  <LI>
  <P>X loads the XVideo extension, it's something like this: </P><PRE =
class=3Dprogramlisting>(II) Loading extension XVideo</PRE>
  <P>in <TT class=3Dfilename>/var/log/XFree86.0.log</TT> </P>
  <DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
  <H3 class=3Dtitle>Note</H3>
  <P>This loads only the XFree86's extension. In a good install, this is =
always=20
  loaded, and doesn't mean that the <SPAN=20
  class=3Dbold><STRONG>card's</STRONG></SPAN> XVideo support is loaded! =
</P></DIV>
  <P></P>
  <LI>
  <P>Your card has Xv support under Linux. To check, try <SPAN><STRONG=20
  class=3Dcommand>xvinfo</STRONG></SPAN>, it is the part of the XFree86=20
  distribution. It should display a long text, similar to this: </P><PRE =
class=3Dscreen>X-Video Extension version 2.2
screen #0
  Adaptor #0: "Savage Streams Engine"
    number of ports: 1
    port base: 43
    operations supported: PutImage
    supported visuals:
      depth 16, visualID 0x22
      depth 16, visualID 0x23
    number of attributes: 5
(...)
    Number of image formats: 7
      id: 0x32595559 (YUY2)
        guid: 59555932-0000-0010-8000-00aa00389b71
        bits per pixel: 16
        number of planes: 1
        type: YUV (packed)
      id: 0x32315659 (YV12)
        guid: 59563132-0000-0010-8000-00aa00389b71
        bits per pixel: 12
        number of planes: 3
        type: YUV (planar)
(...etc...)</PRE>
  <P>It must support YUY2 packed, and YV12 planar pixel formats to be =
usable=20
  with <SPAN class=3Dapplication>MPlayer</SPAN>. </P>
  <LI>
  <P>And finally, check if <SPAN class=3Dapplication>MPlayer</SPAN> was =
compiled=20
  with 'xv' support. Do a <SPAN><STRONG class=3Dcommand>mplayer -vo help =
| grep xv=20
  </STRONG></SPAN>. If 'xv' support was built a line similar to this =
should=20
  appear: </P><PRE class=3Dscreen>  xv      X11/Xv</PRE>
  <P></P></LI></OL></DIV>
<P></P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dtdfx></A>8.2.1.&nbsp;3dfx =
cards</H3></DIV></DIV></DIV>
<P>Older 3dfx drivers were known to have problems with XVideo =
acceleration, it=20
didn't support YUY2 or YV12 colorspaces. Verify that you have XFree86 =
version=20
4.2.0 or later, it can handle YV12 and YUY2 while previous versions, =
including=20
4.1.0, <SPAN class=3Dbold><STRONG>crash with YV12</STRONG></SPAN>. If =
you=20
experience strange effects using <TT class=3Doption>-vo xv</TT>, try SDL =
(it has=20
XVideo, too) and see if it helps. Check the <A title=3D8.4.&nbsp;SDL=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
sdl">SDL</A>=20
section for details. </P>
<P><SPAN class=3Dbold><STRONG>OR</STRONG></SPAN>, try the NEW <TT =
class=3Doption>-vo=20
tdfxfb</TT> driver! See the <A title=3D"8.8.&nbsp;3Dfx YUV support"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tdfxfb">tdfxfb</A>=20
section. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Ds3></A>8.2.2.&nbsp;S3 =
cards</H3></DIV></DIV></DIV>
<P>S3 Savage3D's should work fine, but for Savage4, use XFree86 version =
4.0.3 or=20
greater (in case of image problems, try 16bpp). As for S3 Virge: there =
is xv=20
support, but the card itself is very slow, so you better sell it. </P>
<P>There is now a native framebuffer driver for S3 Virge cards similiar =
to=20
tdfxfb. Set up your framebuffer (e.g. append "<TT =
class=3Doption>vga=3D792=20
video=3Dvesa:mtrr</TT>" to your kernel comand line) and use <TT =
class=3Doption>-vo=20
s3fb</TT> (<TT class=3Doption>-vf yuy2</TT> and <TT =
class=3Doption>-dr</TT> will=20
also help). </P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>It's currently unclear which Savage models lack YV12 support, and =
convert by=20
driver (slow). If you suspect your card, get a newer driver, or ask =
politely on=20
the MPlayer-users mailing list for an MMX/3DNow! enabled driver.=20
</P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dnvidia></A>8.2.3.&nbsp;nVidia=20
cards</H3></DIV></DIV></DIV>
<P>nVidia isn't always a very good choice under Linux ... XFree86's =
open-source=20
driver supports most of these cards, but for some cases, you'll have to =
use the=20
binary closed-source nVidia driver, available at <A=20
href=3D"http://www.nvidia.com/object/linux.html" target=3D_top>nVidia's =
web=20
site</A>. You'll always need this driver if you want 3D acceleration, =
too. </P>
<P>Riva128 cards don't have XVideo support with XFree86's nVidia driver =
:(=20
Complain to nVidia. </P>
<P>However, <SPAN class=3Dapplication>MPlayer</SPAN> contains a <A=20
title=3D8.15.&nbsp;VIDIX=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix">VIDIX</A>=20
driver for most nVidia cards. Currently it is in beta stage, and has =
some=20
drawbacks. For more information, see <A title=3D"8.15.5.&nbsp;nVidia =
cards"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-nvidia">nVidia=20
VIDIX</A> section. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dati></A>8.2.4.&nbsp;ATI =
cards</H3></DIV></DIV></DIV>
<P>The <A href=3D"http://gatos.sf.net/" target=3D_top>GATOS driver</A> =
(which you=20
should use, unless you have Rage128 or Radeon) has VSYNC enabled by =
default. It=20
means that decoding speed (!) is synced to the monitor's refresh rate. =
If=20
playing seems to be slow, try disabling VSYNC somehow, or set refresh =
rate to a=20
n*(fps of the movie) Hz. </P>
<P>Radeon VE - if you need X, use XFree86 4.2.0 or greater for this =
card. No TV=20
out support. Of course with <SPAN class=3Dapplication>MPlayer</SPAN> you =
can=20
happily get <SPAN class=3Dbold><STRONG>accelerated</STRONG></SPAN> =
display, with=20
or without <SPAN class=3Dbold><STRONG>TV output</STRONG></SPAN>, and no =
libraries=20
or X are needed. Read the <A title=3D8.15.&nbsp;VIDIX=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix">VIDIX</A>=20
section. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dneomagic></A>8.2.5.&nbsp;NeoMagic=20
cards</H3></DIV></DIV></DIV>
<P>These cards can be found in many laptops. You must use XFree86 4.3.0 =
or=20
above, or else use Stefan Seyfried's <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/"=20
target=3D_top>Xv-capable drivers</A>. Just choose the one that applies =
to your=20
version of XFree86. </P>
<P>XFree86 4.3.0 includes Xv support, yet Bohdan Horst sent a small <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/contrib/NeoMagic-driver/neo_drive=
r.patch"=20
target=3D_top>patch</A> against the XFree86 sources that speeds up =
framebuffer=20
operations (so XVideo) up to four times. The patch has been included in =
XFree86=20
CVS and should be in the next release after 4.3.0. </P>
<P>To allow playback of DVD sized content change your XF86Config like =
this: </P><PRE class=3Dprogramlisting>Section "Device"
    [...]
    Driver "neomagic"
    <SPAN class=3Demphasis><EM>Option "OverlayMem" "829440"</EM></SPAN>
    [...]
EndSection</PRE>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dtrident></A>8.2.6.&nbsp;Trident=20
cards</H3></DIV></DIV></DIV>
<P>If you want to use Xv with a Trident card, provided that it doesn't =
work with=20
4.1.0, install XFree 4.2.0. 4.2.0 adds support for fullscreen Xv support =
with=20
the Cyberblade XP card. </P>
<P>Alternatively, <SPAN class=3Dapplication>MPlayer</SPAN> contains a <A =

title=3D8.15.&nbsp;VIDIX=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix">VIDIX</A>=20
driver for the Cyberblade/i1 card. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dkyro></A>8.2.7.&nbsp;Kyro/PowerVR=20
cards</H3></DIV></DIV></DIV>
<P>If you want to use Xv with a Kyro based card (for example Hercules =
Prophet=20
4000XT), you should download the drivers from the <A=20
href=3D"http://www.powervr.com/" target=3D_top>PowerVR site</A>. =
</P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Ddga></A>8.3.&nbsp;DGA</H2></DIV></DIV></DIV>
<P><B>PREAMBLE.&nbsp;</B> This document tries to explain in some words =
what DGA=20
is in general and what the DGA video output driver for <SPAN=20
class=3Dapplication>MPlayer</SPAN> can do (and what it can't). </P>
<P><B>WHAT IS DGA.&nbsp;</B> <ACRONYM class=3Dacronym>DGA</ACRONYM> is =
short for=20
<SPAN class=3Demphasis><EM>Direct Graphics Access</EM></SPAN> and is a =
means for a=20
program to bypass the X server and directly modifying the framebuffer =
memory.=20
Technically spoken this happens by mapping the framebuffer memory into =
the=20
memory range of your process. This is allowed by the kernel only if you =
have=20
superuser privileges. You can get these either by logging in as <CODE=20
class=3Dsystemitem>root</CODE> or by setting the SUID bit on the <SPAN=20
class=3Dapplication>MPlayer</SPAN> executable (<SPAN =
class=3Dbold><STRONG>not=20
recommended</STRONG></SPAN>). </P>
<P>There are two versions of DGA: DGA1 is used by XFree 3.x.x and DGA2 =
was=20
introduced with XFree 4.0.1. </P>
<P>DGA1 provides only direct framebuffer access as described above. For=20
switching the resolution of the video signal you have to rely on the =
XVidMode=20
extension. </P>
<P>DGA2 incorporates the features of XVidMode extension and also allows=20
switching the depth of the display. So you may, although basically =
running a 32=20
bit depth X server, switch to a depth of 15 bits and vice versa. </P>
<P>However DGA has some drawbacks. It seems it is somewhat dependent on =
the=20
graphics chip you use and on the implementation of the X server's video =
driver=20
that controls this chip. So it does not work on every system... </P>
<P><B>INSTALLING DGA SUPPORT FOR MPLAYER.&nbsp;</B> First make sure X =
loads the=20
DGA extension, see in <TT class=3Dfilename>/var/log/XFree86.0.log</TT>: =
</P><PRE class=3Dprogramlisting>(II) Loading extension XFree86-DGA</PRE>
<P>See, XFree86 4.0.x or greater is <SPAN class=3Dbold><STRONG>highly=20
recommended</STRONG></SPAN>! <SPAN class=3Dapplication>MPlayer</SPAN>'s =
DGA driver=20
is autodetected by <TT class=3Dfilename>./configure</TT>, or you can =
force it with=20
<TT class=3Doption>--enable-dga</TT>. </P>
<P>If the driver couldn't switch to a smaller resolution, experiment =
with=20
options <TT class=3Doption>-vm</TT> (only with X 3.3.x), <TT=20
class=3Doption>-fs</TT>, <TT class=3Doption>-bpp</TT>, <TT =
class=3Doption>-zoom</TT>=20
to find a video mode that the movie fits in. There is no converter right =
now :(=20
</P>
<P>Become <CODE class=3Dsystemitem>root</CODE>. DGA needs root access to =
be able=20
to write directly video memory. If you want to run it as user, then =
install=20
<SPAN class=3Dapplication>MPlayer</SPAN> SUID root: </P><PRE =
class=3Dscreen>chown root <EM =
class=3Dreplaceable><CODE>/usr/local/bin/mplayer</CODE></EM>
chmod 750 <EM =
class=3Dreplaceable><CODE>/usr/local/bin/mplayer</CODE></EM>
chmod +s <EM =
class=3Dreplaceable><CODE>/usr/local/bin/mplayer</CODE></EM>
</PRE>
<P>Now it works as a simple user, too. </P>
<DIV class=3Dcaution style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Security risk</H3>
<P>This is a <SPAN class=3Dbold><STRONG>big</STRONG></SPAN> security =
risk! <SPAN=20
class=3Dbold><STRONG>Never</STRONG></SPAN> do this on a server or on a =
computer=20
that can be accessed by other people because they can gain root =
privileges=20
through SUID root <SPAN class=3Dapplication>MPlayer</SPAN>. </P></DIV>
<P>Now use <TT class=3Doption>-vo dga</TT> option, and there you go! =
(hope so:)=20
You should also try if the <TT class=3Doption>-vo sdl:driver=3Ddga</TT> =
option works=20
for you! It's much faster! </P>
<P><A name=3Ddga-modelines></A><B>RESOLUTION SWITCHING.&nbsp;</B> The =
DGA driver=20
allows for switching the resolution of the output signal. This avoids =
the need=20
for doing (slow) software scaling and at the same time provides a =
fullscreen=20
image. Ideally it would switch to the exact resolution (except for =
honoring=20
aspect ratio) of the video data, but the X server only allows switching =
to=20
resolutions predefined in <TT class=3Dfilename>/etc/X11/XF86Config</TT> =
(<TT=20
class=3Dfilename>/etc/X11/XF86Config-4</TT> for XFree 4.X.X =
respectively). Those=20
are defined by so-called modelines and depend on the capabilities of =
your video=20
hardware. The X server scans this config file on startup and disables =
the=20
modelines not suitable for your hardware. You can find out which modes =
survive=20
with the X11 log file. It can be found at: <TT=20
class=3Dfilename>/var/log/XFree86.0.log</TT>. </P>
<P>These entries are known to work fine with a Riva128 chip, using the =
nv.o X=20
server driver module. </P><PRE class=3Dprogramlisting>Section "Modes"
  Identifier "Modes[0]"
  Modeline "800x600"  40     800 840 968 1056  600 601 605 628
  Modeline "712x600"  35.0   712 740 850 900   400 410 412 425
  Modeline "640x480"  25.175 640 664 760 800   480 491 493 525
  Modeline "400x300"  20     400 416 480 528   300 301 303 314 =
Doublescan
  Modeline "352x288"  25.10  352 368 416 432   288 296 290 310
  Modeline "352x240"  15.750 352 368 416 432   240 244 246 262 =
Doublescan
  Modeline "320x240"  12.588 320 336 384 400   240 245 246 262 =
Doublescan
EndSection
</PRE>
<P><B>DGA &amp; MPLAYER.&nbsp;</B> DGA is used in two places with <SPAN=20
class=3Dapplication>MPlayer</SPAN>: The SDL driver can be made to make =
use of it=20
(<TT class=3Doption>-vo sdl:driver=3Ddga</TT>) and within the DGA driver =
(<TT=20
class=3Doption>-vo dga</TT>). The above said is true for both; in the =
following=20
sections I'll explain how the DGA driver for <SPAN=20
class=3Dapplication>MPlayer</SPAN> works. </P>
<P><B>FEATURES.&nbsp;</B> The DGA driver is invoked by specifying <TT=20
class=3Doption>-vo dga</TT> at the command line. The default behavior is =
to switch=20
to a resolution matching the original resolution of the video as close =
as=20
possible. It deliberately ignores the <TT class=3Doption>-vm</TT> and =
<TT=20
class=3Doption>-fs</TT> options (enabling of video mode switching and =
fullscreen)=20
- it always tries to cover as much area of your screen as possible by =
switching=20
the video mode, thus refraining from using additional cycles of your CPU =
to=20
scale the image. If you don't like the mode it chooses you may force it =
to=20
choose the mode matching closest the resolution you specify by <TT=20
class=3Doption>-x</TT> and <TT class=3Doption>-y</TT>. By providing the =
<TT=20
class=3Doption>-v</TT> option, the DGA driver will print, among a lot of =
other=20
things, a list of all resolutions supported by your current <TT=20
class=3Dfilename>XF86Config</TT> file. Having DGA2 you may also force it =
to use a=20
certain depth by using the <TT class=3Doption>-bpp</TT> option. Valid =
depths are=20
15, 16, 24 and 32. It depends on your hardware whether these depths are =
natively=20
supported or if a (possibly slow) conversion has to be done. </P>
<P>If you should be lucky enough to have enough offscreen memory left to =
put a=20
whole image there, the DGA driver will use double buffering, which =
results in=20
much smoother movie playback. It will tell you whether double buffering =
is=20
enabled or not. </P>
<P>Double buffering means that the next frame of your video is being =
drawn in=20
some offscreen memory while the current frame is being displayed. When =
the next=20
frame is ready, the graphics chip is just told the location in memory of =
the new=20
frame and simply fetches the data to be displayed from there. In the =
meantime=20
the other buffer in memory will be filled again with new video data. =
</P>
<P>Double buffering may be switched on by using the option <TT=20
class=3Doption>-double</TT> and may be disabled with <TT=20
class=3Doption>-nodouble</TT>. Current default option is to disable =
double=20
buffering. When using the DGA driver, onscreen display (OSD) only works =
with=20
double buffering enabled. However, enabling double buffering may result =
in a big=20
speed penalty (on my K6-II+ 525 it used an additional 20% of CPU time!)=20
depending on the implementation of DGA for your hardware. </P>
<P><B>SPEED ISSUES.&nbsp;</B> Generally spoken, DGA framebuffer access =
should be=20
at least as fast as using the X11 driver with the additional benefit of =
getting=20
a fullscreen image. The percentage speed values printed by <SPAN=20
class=3Dapplication>MPlayer</SPAN> have to be interpreted with some =
care, as for=20
example, with the X11 driver they do not include the time used by the X =
server=20
needed for the actual drawing. Hook a terminal to a serial line of your =
box and=20
start <SPAN><STRONG class=3Dcommand>top</STRONG></SPAN> to see what is =
really=20
going on in your box. </P>
<P>Generally spoken, the speedup done by using DGA against 'normal' use =
of X11=20
highly depends on your graphics card and how well the X server module =
for it is=20
optimized. </P>
<P>If you have a slow system, better use 15 or 16 bit depth since they =
require=20
only half the memory bandwidth of a 32 bit display. </P>
<P>Using a depth of 24 bit is a good idea even if your card natively =
just=20
supports 32 bit depth since it transfers 25% less data compared to the =
32/32=20
mode. </P>
<P>I've seen some AVI files be played back on a Pentium MMX 266. AMD =
K6-2 CPUs=20
might work at 400 MHZ and above. </P>
<P><B>KNOWN BUGS.&nbsp;</B> Well, according to some developers of XFree, =
DGA is=20
quite a beast. They tell you better not to use it. Its implementation is =
not=20
always flawless with every chipset driver for XFree out there. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>With XFree 4.0.3 and <TT class=3Dfilename>nv.o</TT> there is a bug =
resulting=20
  in strange colors. </P>
  <LI>
  <P>ATI driver requires to switch mode back more than once after =
finishing=20
  using of DGA. </P>
  <LI>
  <P>Some drivers simply fail to switch back to normal resolution (use =
<SPAN=20
  class=3Dkeycap><B>Ctrl</B></SPAN>-<SPAN =
class=3Dkeycap><B>Alt</B></SPAN>-<SPAN=20
  class=3Dkeycap><B>Keypad +</B></SPAN> and <SPAN=20
  class=3Dkeycap><B>Ctrl</B></SPAN>-<SPAN =
class=3Dkeycap><B>Alt</B></SPAN>-<SPAN=20
  class=3Dkeycap><B>Keypad -</B></SPAN> to switch back manually). </P>
  <LI>
  <P>Some drivers simply display strange colors. </P>
  <LI>
  <P>Some drivers lie about the amount of memory they map into the =
process's=20
  address space, thus vo_dga won't use double buffering (SIS?). </P>
  <LI>
  <P>Some drivers seem to fail to report even a single valid mode. In =
this case=20
  the DGA driver will crash telling you about a nonsense mode of =
100000x100000=20
  or something like that. </P>
  <LI>
  <P>OSD only works with double buffering enabled (else it flickers).=20
</P></LI></UL></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dsdl></A>8.4.&nbsp;SDL</H2></DIV></DIV></DIV>
<P><ACRONYM class=3Dacronym>SDL</ACRONYM> (Simple Directmedia Layer) is =
basically=20
a unified video/audio interface. Programs that use it know only about =
SDL, and=20
not about what video or audio driver does SDL actually use. For example =
a Doom=20
port using SDL can run on svgalib, aalib, X, fbdev, and others, you only =
have to=20
specify the (for example) video driver to use with the <CODE=20
class=3Denvar>SDL_VIDEODRIVER</CODE> environment variable. Well, in =
theory. </P>
<P>With <SPAN class=3Dapplication>MPlayer</SPAN>, we used its X11 =
driver's=20
software scaler ability for cards/drivers that doesn't support XVideo, =
until we=20
made our own (faster, nicer) software scaler. Also we used its aalib =
output, but=20
now we have ours which is more comfortable. Its DGA mode was better than =
ours,=20
until recently. Get it now? :) </P>
<P>It also helps with some buggy drivers/cards if the video is jerky =
(not slow=20
system problem), or audio is lagging. </P>
<P>SDL video output supports displaying subtitles under the movie, on =
the (if=20
present) black bar. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dsvgalib></A>8.5.&nbsp;SVGAlib</H2></DIV></DIV></DIV>
<P><B>INSTALLATION.&nbsp;</B> You'll have to install svgalib and its =
development=20
package in order for <SPAN class=3Dapplication>MPlayer</SPAN> build its =
SVGAlib=20
driver (autodetected, but can be forced), and don't forget to edit <TT=20
class=3Dfilename>/etc/vga/libvga.config</TT> to suit your card and =
monitor. </P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>Be sure not to use the <TT class=3Doption>-fs</TT> switch, since it =
toggles the=20
usage of the software scaler, and it's slow. If you really need it, use =
the <TT=20
class=3Doption>-sws 4</TT> option which will produce bad quality, but is =
somewhat=20
faster. </P></DIV>
<P><B>EGA (4BPP) SUPPORT.&nbsp;</B> SVGAlib incorporates EGAlib, and =
<SPAN=20
class=3Dapplication>MPlayer</SPAN> has the possibility to display any =
movie in 16=20
colors, thus usable in the following sets: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>EGA card with EGA monitor: 320x200x4bpp, 640x200x4bpp, 640x350x4bpp =
</P>
  <LI>
  <P>EGA card with CGA monitor: 320x200x4bpp, 640x200x4bpp =
</P></LI></UL></DIV>
<P>The bpp (bits per pixel) value must be set to 4 by hand: <TT=20
class=3Doption>-bpp 4</TT> </P>
<P>The movie probably must be scaled down to fit in EGA mode: </P><PRE =
class=3Dscreen>-vf scale=3D640:350</PRE>
<P>or </P><PRE class=3Dscreen>-vf scale=3D320:200</PRE>
<P></P>
<P>For that we need fast but bad quality scaling routine: </P><PRE =
class=3Dscreen>-sws 4</PRE>
<P></P>
<P>Maybe automatic aspect correction has to be shut off: </P><PRE =
class=3Dscreen>-noaspect</PRE>
<P></P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>According to my experience the best image quality on EGA screens can =
be=20
achieved by decreasing the brightness a bit: <TT class=3Doption>-vf =
eq=3D-20:0</TT>.=20
I also needed to lower the audio samplerate on my box, because the sound =
was=20
broken on 44kHz: <TT class=3Doption>-srate 22050</TT>. </P></DIV>
<P>You can turn on OSD and subtitles only with the <TT =
class=3Doption>expand</TT>=20
filter, see the man page for exact parameters. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dfbdev></A>8.6.&nbsp;Framebuffer=20
output (FBdev)</H2></DIV></DIV></DIV>
<P>Whether to build the FBdev target is autodetected during <TT=20
class=3Dfilename>./configure</TT>. Read the framebuffer documentation in =
the=20
kernel sources (<TT class=3Dfilename>Documentation/fb/*</TT>) for more=20
information. </P>
<P>If your card doesn't support VBE 2.0 standard (older ISA/PCI cards, =
such as=20
S3 Trio64), only VBE 1.2 (or older?): Well, VESAfb is still available, =
but=20
you'll have to load SciTech Display Doctor (formerly UniVBE) before =
booting=20
Linux. Use a DOS boot disk or whatever. And don't forget to register =
your UniVBE=20
;)) </P>
<P>The FBdev output takes some additional parameters above the others: =
</P>
<DIV class=3Dvariablelist>
<DL>
  <DT><SPAN class=3Dterm><TT class=3Doption>-fb</TT></SPAN>
  <DD>
  <P>specify the framebuffer device to use (default: <TT=20
  class=3Dfilename>/dev/fb0</TT>) </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-fbmode</TT></SPAN>
  <DD>
  <P>mode name to use (according to <TT =
class=3Dfilename>/etc/fb.modes</TT>) </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-fbmodeconfig</TT></SPAN>
  <DD>
  <P>config file of modes (default: <TT =
class=3Dfilename>/etc/fb.modes</TT>) </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-monitor-hfreq</TT>, =
</SPAN><SPAN=20
  class=3Dterm><TT class=3Doption>-monitor-vfreq</TT>, </SPAN><SPAN =
class=3Dterm><TT=20
  class=3Doption>-monitor-dotclock</TT></SPAN>
  <DD>
  <P><SPAN class=3Dbold><STRONG>important</STRONG></SPAN> values, see =
<TT=20
  class=3Dfilename>example.conf</TT> </P></DD></DL></DIV>
<P>If you want to change to a specific mode, then use </P><PRE =
class=3Dscreen>mplayer -vm -fbmode <EM =
class=3Dreplaceable><CODE>name_of_mode</CODE></EM> <EM =
class=3Dreplaceable><CODE>filename</CODE></EM>
</PRE>
<P></P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><TT class=3Doption>-vm</TT> alone will choose the most suitable =
mode from <TT=20
  class=3Dfilename>/etc/fb.modes</TT>. Can be used together with <TT=20
  class=3Doption>-x</TT> and <TT class=3Doption>-y</TT> options too. The =
<TT=20
  class=3Doption>-flip</TT> option is supported only if the movie's =
pixel format=20
  matches the video mode's pixel format. Pay attention to the bpp value, =
fbdev=20
  driver tries to use the current, or if you specify the <TT=20
  class=3Doption>-bpp</TT> option, then that. </P>
  <LI>
  <P><TT class=3Doption>-zoom</TT> option isn't supported (use <TT=20
  class=3Doption>-vf scale</TT>). You can't use 8bpp (or less) modes. =
</P>
  <LI>
  <P>You possibly want to turn the cursor off: </P><PRE =
class=3Dscreen>echo -e '\033[?25l'</PRE>
  <P>or </P><PRE class=3Dscreen>setterm -cursor off</PRE>
  <P>and the screen saver: </P><PRE class=3Dscreen>setterm -blank =
0</PRE>
  <P>To turn the cursor back on: </P><PRE class=3Dscreen>echo -e =
'\033[?25h'</PRE>
  <P>or </P><PRE class=3Dscreen>setterm -cursor on</PRE>
  <P></P></LI></UL></DIV>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>FBdev video mode changing <SPAN class=3Demphasis><EM>does not =
work</EM></SPAN>=20
with the VESA framebuffer, and don't ask for it, since it's not an <SPAN =

class=3Dapplication>MPlayer</SPAN> limitation. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dmga_vid></A>8.7.&nbsp;Matrox=20
framebuffer (mga_vid)</H2></DIV></DIV></DIV>
<P><CODE class=3Dsystemitem>mga_vid</CODE> is a combination of a video =
output=20
driver and a Linux kernel module that utilitizes the Matrox =
G200/G400/G450/G550=20
video scaler/overlay unit to perform YUV-&gt;RGB colorspace conversion =
and=20
arbitrary video scaling. <CODE class=3Dsystemitem>mga_vid</CODE> has =
hardware=20
VSYNC support with triple buffering. It works on both a framebuffer =
console and=20
under X, but only with Linux 2.4.x. </P>
<P>For a Linux 2.6.x version of this driver check out <A=20
href=3D"http://attila.kinali.ch/mga/"=20
target=3D_top>http://attila.kinali.ch/mga/</A>. </P>
<DIV class=3Dprocedure><A name=3Did2550676></A>
<P class=3Dtitle><B>Installation:</B></P>
<OL type=3D1>
  <LI>
  <P>To use it, you first have to compile <TT =
class=3Dfilename>mga_vid.o</TT>:=20
</P><PRE class=3Dscreen>cd drivers
make</PRE>
  <P></P>
  <LI>
  <P>Then run (as <CODE class=3Dsystemitem>root</CODE>) </P><PRE =
class=3Dscreen>make install</PRE>
  <P>which should install the module and create the device node for you. =
Load=20
  the driver with </P><PRE class=3Dscreen>insmod mga_vid.o</PRE>
  <P></P>
  <LI>
  <P>You should verify the memory size detection using the <SPAN><STRONG =

  class=3Dcommand>dmesg</STRONG></SPAN> command. If it's bad, use the =
<TT=20
  class=3Doption>mga_ram_size</TT> option (<SPAN><STRONG =
class=3Dcommand>rmmod=20
  mga_vid</STRONG></SPAN> first), specify card's memory size in MB: =
</P><PRE class=3Dscreen>insmod mga_vid.o mga_ram_size=3D16</PRE>
  <P></P>
  <LI>
  <P>To make it load/unload automatically when needed, first insert the=20
  following line at the end of <TT =
class=3Dfilename>/etc/modules.conf</TT>: </P><PRE =
class=3Dprogramlisting>alias char-major-178 mga_vid</PRE>
  <P></P>
  <LI>
  <P>Now you have to (re)compile <SPAN =
class=3Dapplication>MPlayer</SPAN>,=20
  <SPAN><STRONG class=3Dcommand>./configure</STRONG></SPAN> will detect =
<TT=20
  class=3Dfilename>/dev/mga_vid</TT> and build the 'mga' driver. Using =
it from=20
  <SPAN class=3Dapplication>MPlayer</SPAN> goes by <TT =
class=3Doption>-vo mga</TT>=20
  if you have matroxfb console, or <TT class=3Doption>-vo xmga</TT> =
under XFree86=20
  3.x.x or 4.x.x. </P></LI></OL></DIV>
<P>The mga_vid driver cooperates with Xv. </P>
<P>The <TT class=3Dfilename>/dev/mga_vid</TT> device file can be read =
for some=20
info, for example by </P><PRE class=3Dscreen>cat /dev/mga_vid</PRE>
<P>and can be written for brightness change: </P><PRE =
class=3Dscreen>echo "brightness=3D120" &gt; /dev/mga_vid</PRE>
<P></P>
<P>There is a test application called <SPAN><STRONG=20
class=3Dcommand>mga_vid_test</STRONG></SPAN> in the same directory. It =
should draw=20
256x256 images on the screen if all is working well. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dtdfxfb></A>8.8.&nbsp;3Dfx YUV=20
support</H2></DIV></DIV></DIV>
<P>This driver uses the kernel's tdfx framebuffer driver to play movies =
with YUV=20
acceleration. You'll need a kernel with tdfxfb support, and recompile =
with </P><PRE class=3Dscreen>./configure --enable-tdfxfb</PRE>
<P></P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dtdfx_vid></A>8.9.&nbsp;tdfx_vid</H2></DIV></DIV></DIV>
<P>This is a combination of a Linux kernel module and a video output =
driver,=20
similar to <A title=3D"8.7.&nbsp;Matrox framebuffer (mga_vid)"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mga_vid">mga_vid</A>.=20
You'll need a 2.4.x kernel with the <CODE =
class=3Dsystemitem>agpgart</CODE> driver=20
since <CODE class=3Dsystemitem>tdfx_vid</CODE> uses AGP. Pass <TT=20
class=3Doption>--enable-tdfxfb</TT> to <SPAN><STRONG=20
class=3Dcommand>configure</STRONG></SPAN> to build the video output =
driver and=20
build the kernel module with the following instructions. </P>
<DIV class=3Dprocedure><A name=3Did2550940></A>
<P class=3Dtitle><B>Installing the tdfx_vid.o kernel module:</B></P>
<OL type=3D1>
  <LI>
  <P>Compile <TT class=3Dfilename>tdfx_vid.o</TT>: </P><PRE =
class=3Dscreen>cd drivers
make</PRE>
  <P></P>
  <LI>
  <P>Then run (as <CODE class=3Dsystemitem>root</CODE>) </P><PRE =
class=3Dscreen>make install</PRE>
  <P>which should install the module and create the device node for you. =
Load=20
  the driver with </P><PRE class=3Dscreen>insmod tdfx_vid.o</PRE>
  <P></P>
  <LI>
  <P>To make it load/unload automatically when needed, first insert the=20
  following line at the end of <TT =
class=3Dfilename>/etc/modules.conf</TT>: </P><PRE =
class=3Dprogramlisting>alias char-major-178 tdfx_vid</PRE>
  <P></P></LI></OL></DIV>
<P>There is a test application called <SPAN><STRONG=20
class=3Dcommand>tdfx_vid_test</STRONG></SPAN> in the same directory. It =
should=20
print out some useful information if all is working well. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dopengl></A>8.10.&nbsp;OpenGL=20
output</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> supports displaying movies =
using=20
OpenGL, but if your platform/driver supports xv as should be the case on =
a PC=20
with Linux, use xv instead, OpenGL performance is considerably worse. If =
you=20
have an X11 implementation without xv support, OpenGL is a viable =
alternative.=20
</P>
<P>Unfortunately not all drivers support this feature. The Utah-GLX =
drivers (for=20
XFree86 3.3.6) support it for all cards. See <A =
href=3D"http://utah-glx.sf.net/"=20
target=3D_top>http://utah-glx.sf.net/</A> for details about how to =
install it.=20
</P>
<P>XFree86(DRI) 4.0.3 or later supports OpenGL with Matrox and Radeon =
cards,=20
4.2.0 or later supports Rage128. See <A href=3D"http://dri.sf.net/"=20
target=3D_top>http://dri.sf.net/</A> for download and installation =
instructions.=20
</P>
<P>A hint from one of our users: the GL video output can be used to get =
vsynced=20
TV output. You'll have to set an environment variable (at least on =
nVidia): </P>
<P><SPAN><STRONG class=3Dcommand>export =
__GL_SYNC_TO_VBLANK=3D1</STRONG></SPAN>=20
</P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Daalib></A>8.11.&nbsp;AAlib =E2=80=93 text=20
mode displaying</H2></DIV></DIV></DIV>
<P>AAlib is a library for displaying graphics in text mode, using =
powerful ASCII=20
renderer. There are <SPAN class=3Demphasis><EM>lots</EM></SPAN> of =
programs=20
already supporting it, like Doom, Quake, etc. <SPAN=20
class=3Dapplication>MPlayer</SPAN> contains a very usable driver for it. =
If <TT=20
class=3Dfilename>./configure</TT> detects aalib installed, the aalib =
libvo driver=20
will be built. </P>
<P>You can use some keys in the AA Window to change rendering options: =
</P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Key</TH>
    <TH>Action</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD><SPAN class=3Dkeycap><B>1</B></SPAN></TD>
    <TD>decrease contrast </TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>2</B></SPAN></TD>
    <TD>increase contrast </TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>3</B></SPAN></TD>
    <TD>decrease brightness </TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>4</B></SPAN></TD>
    <TD>increase brightness </TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>5</B></SPAN></TD>
    <TD>switch fast rendering on/off </TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>6</B></SPAN></TD>
    <TD>set dithering mode (none, error distribution, Floyd Steinberg) =
</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>7</B></SPAN></TD>
    <TD>invert image </TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>8</B></SPAN></TD>
    <TD>toggles between aa and <SPAN class=3Dapplication>MPlayer</SPAN> =
control=20
    </TD></TR></TBODY></TABLE></DIV>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>The following command line options can be =
used:</B></P>
<DL>
  <DT><SPAN class=3Dterm><TT class=3Doption>-aaosdcolor=3D<EM=20
  class=3Dreplaceable><CODE>V</CODE></EM></TT></SPAN>
  <DD>
  <P>change OSD color </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-aasubcolor=3D<EM=20
  class=3Dreplaceable><CODE>V</CODE></EM></TT></SPAN>
  <DD>
  <P>Change subtitle color </P>
  <P>where <EM class=3Dreplaceable><CODE>V</CODE></EM> can be: <CODE=20
  class=3Dliteral>0</CODE> (normal), <CODE class=3Dliteral>1</CODE> =
(dark), <CODE=20
  class=3Dliteral>2</CODE> (bold), <CODE class=3Dliteral>3</CODE> (bold =
font), <CODE=20
  class=3Dliteral>4</CODE> (reverse), <CODE class=3Dliteral>5</CODE> =
(special).=20
  </P></DD></DL></DIV>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>AAlib itself provides a large sum of options. Here =
are some=20
important:</B></P>
<DL>
  <DT><SPAN class=3Dterm><TT class=3Doption>-aadriver</TT></SPAN>
  <DD>
  <P>Set recommended aa driver (X11, curses, Linux). </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-aaextended</TT></SPAN>
  <DD>
  <P>Use all 256 characters. </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-aaeight</TT></SPAN>
  <DD>
  <P>Use eight bit ASCII. </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-aahelp</TT></SPAN>
  <DD>
  <P>Prints out all aalib options. </P></DD></DL></DIV>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>The rendering is very CPU intensive, especially when using AA-on-X =
(using=20
aalib on X), and it's least CPU intensive on standard, non-framebuffer =
console.=20
Use SVGATextMode to set up a big textmode, then enjoy! (secondary head =
Hercules=20
cards rock :)) (but IMHO you can use <TT class=3Doption>-vf 1bpp</TT> =
option to=20
get graphics on hgafb:) </P></DIV>
<P>Use the <TT class=3Doption>-framedrop</TT> option if your computer =
isn't fast=20
enough to render all frames! </P>
<P>Playing on terminal you'll get better speed and quality using the =
Linux=20
driver, not curses (<TT class=3Doption>-aadriver linux</TT>). But =
therefore you=20
need write access on <TT class=3Dfilename>/dev/vcsa<EM=20
class=3Dreplaceable><CODE>&lt;terminal&gt;</CODE></EM></TT>! That isn't=20
autodetected by aalib, but vo_aa tries to find the best mode. See <A=20
href=3D"http://aa-project.sf.net/tune"=20
target=3D_top>http://aa-project.sf.net/tune</A> for further tuning =
issues.=20
</P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A name=3Dcaca></A>8.12.&nbsp; =
<CODE=20
class=3Dsystemitem>libcaca</CODE> =E2=80=93 Color ASCII Art library=20
</H2></DIV></DIV></DIV>
<P>The <A href=3D"http://sam.zoy.org/projects/libcaca/" =
target=3D_top><CODE=20
class=3Dsystemitem>libcaca</CODE></A> library is a graphics library that =
outputs=20
text instead of pixels, so that it can work on older video cards or text =

terminals. It is not unlike the famous <CODE =
class=3Dsystemitem>AAlib</CODE>=20
library. <CODE class=3Dsystemitem>libcaca</CODE> needs a terminal to =
work, thus it=20
should work on all Unix systems (including Mac OS X) using either the =
<CODE=20
class=3Dsystemitem>slang</CODE> library or the <CODE=20
class=3Dsystemitem>ncurses</CODE> library, on DOS using the <CODE=20
class=3Dsystemitem>conio.h</CODE> library, and on Windows systems using =
either=20
<CODE class=3Dsystemitem>slang</CODE> or <CODE =
class=3Dsystemitem>ncurses</CODE>=20
(through Cygwin emulation) or <CODE class=3Dsystemitem>conio.h</CODE>. =
If <TT=20
class=3Dfilename>./configure</TT> detects <CODE =
class=3Dsystemitem>libcaca</CODE>,=20
the caca libvo driver will be built. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>The differences with <CODE =
class=3Dsystemitem>AAlib</CODE> are=20
the following:</B></P>
<UL type=3Ddisc>
  <LI>
  <P>16 available colors for character output (256 color pairs) </P>
  <LI>
  <P>color image dithering </P></LI></UL></DIV>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>But <CODE class=3Dsystemitem>libcaca</CODE> also has =
the=20
following limitations:</B></P>
<UL type=3Ddisc>
  <LI>
  <P>no support for brightness, contrast, gamma </P></LI></UL></DIV>
<P>You can use some keys in the caca window to change rendering options: =
</P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Key</TH>
    <TH>Action</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD><SPAN class=3Dkeycap><B>d</B></SPAN></TD>
    <TD>Toggle <CODE class=3Dsystemitem>libcaca</CODE> dithering =
methods. </TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>a</B></SPAN></TD>
    <TD>Toggle <CODE class=3Dsystemitem>libcaca</CODE> antialiasing. =
</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>b</B></SPAN></TD>
    <TD>Toggle <CODE class=3Dsystemitem>libcaca</CODE> background.=20
</TD></TR></TBODY></TABLE></DIV>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B><CODE class=3Dsystemitem>libcaca</CODE> will also =
look for=20
certain environment variables:</B></P>
<DL>
  <DT><SPAN class=3Dterm><TT class=3Doption>CACA_DRIVER</TT></SPAN>
  <DD>
  <P>Set recommended caca driver. e.g. ncurses, slang, x11. </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>CACA_GEOMETRY (X11 =
only)</TT></SPAN>
  <DD>
  <P>Specifies the number of rows and columns. e.g. 128x50. </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>CACA_FONT (X11 =
only)</TT></SPAN>
  <DD>
  <P>Specifies the font to use. e.g. fixed, nexus. </P></DD></DL></DIV>
<P>Use the <TT class=3Doption>-framedrop</TT> option if your computer is =
not fast=20
enough to render all frames. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dvesa></A>8.13.&nbsp;VESA - output to=20
VESA BIOS</H2></DIV></DIV></DIV>
<P>This driver was designed and introduced as a <SPAN =
class=3Dbold><STRONG>generic=20
driver</STRONG></SPAN> for any video card which has VESA VBE 2.0 =
compatible=20
BIOS. Another advantage of this driver is that it tries to force TV =
output on.=20
<EM class=3Dcitetitle>VESA BIOS EXTENSION (VBE) Version 3.0 Date: =
September 16,=20
1998</EM> (Page 70) says: </P>
<DIV class=3Dblockquote>
<BLOCKQUOTE class=3Dblockquote>
  <P><B>Dual-Controller Designs.&nbsp;</B> VBE 3.0 supports the =
dual-controller=20
  design by assuming that since both controllers are typically provided =
by the=20
  same OEM, under control of a single BIOS ROM on the same graphics =
card, it is=20
  possible to hide the fact that two controllers are indeed present from =
the=20
  application. This has the limitation of preventing simultaneous use of =
the=20
  independent controllers, but allows applications released before VBE =
3.0 to=20
  operate normally. The VBE Function 00h (Return Controller Information) =
returns=20
  the combined information of both controllers, including the combined =
list of=20
  available modes. When the application selects a mode, the appropriate=20
  controller is activated. Each of the remaining VBE functions then =
operates on=20
  the active controller. </P></BLOCKQUOTE></DIV>
<P>So you have chances to get working TV-out by using this driver. (I =
guess that=20
TV-out frequently is standalone head or standalone output at least.) =
</P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>ADVANTAGES</B></P>
<UL type=3Ddisc compact>
  <LI>
  <P>You have chances to watch movies <SPAN class=3Dbold><STRONG>if =
Linux even=20
  doesn't know</STRONG></SPAN> your video hardware. </P>
  <LI>
  <P>You don't need to have installed any graphics' related things on =
your Linux=20
  (like X11 (AKA XFree86), fbdev and so on). This driver can be run from =
<SPAN=20
  class=3Dbold><STRONG>text-mode</STRONG></SPAN>. </P>
  <LI>
  <P>You have chances to get <SPAN class=3Dbold><STRONG>working=20
  TV-out</STRONG></SPAN>. (It's known at least for ATI's cards). </P>
  <LI>
  <P>This driver calls <CODE class=3Dfunction>int 10h</CODE> handler =
thus it's not=20
  an emulator - it calls <SPAN class=3Dbold><STRONG>real</STRONG></SPAN> =
things of=20
  <SPAN class=3Demphasis><EM>real</EM></SPAN> BIOS in <SPAN=20
  class=3Demphasis><EM>real-mode</EM></SPAN> (actually in vm86 mode). =
</P>
  <LI>
  <P>You can use VIDIX with it, thus getting accelerated video display =
<SPAN=20
  class=3Dbold><STRONG>and</STRONG></SPAN> TV output at the same time!=20
  (Recommended for ATI cards.) </P>
  <LI>
  <P>If you have VESA VBE 3.0+, and you had specified <TT=20
  class=3Doption>monitor-hfreq, monitor-vfreq, monitor-dotclock</TT> =
somewhere=20
  (config file, or command line) you will get the highest possible =
refresh rate.=20
  (Using General Timing Formula). To enable this feature you have to =
specify=20
  <SPAN class=3Dbold><STRONG>all</STRONG></SPAN> your monitor options.=20
</P></LI></UL></DIV>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>DISADVANTAGES</B></P>
<UL type=3Ddisc compact>
  <LI>
  <P>It works only on <SPAN class=3Dbold><STRONG>x86 =
systems</STRONG></SPAN>. </P>
  <LI>
  <P>It can be used only by <CODE class=3Dsystemitem>root</CODE>. </P>
  <LI>
  <P>Currently it's available only for <SPAN=20
  class=3Dbold><STRONG>Linux</STRONG></SPAN>. </P></LI></UL></DIV>
<DIV class=3Dimportant style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: =
0.5in">
<H3 class=3Dtitle>Important</H3>
<P>Don't use this driver with <SPAN class=3Dbold><STRONG>GCC =
2.96</STRONG></SPAN>!=20
It won't work! </P></DIV>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>COMMAND LINE OPTIONS AVAILABLE FOR VESA</B></P>
<DL>
  <DT><SPAN class=3Dterm><TT class=3Doption>-vo vesa:<EM=20
  class=3Dreplaceable><CODE>opts</CODE></EM></TT></SPAN>
  <DD>
  <P>currently recognized: <CODE class=3Dliteral>dga</CODE> to force dga =
mode and=20
  <CODE class=3Dliteral>nodga</CODE> to disable dga mode. In dga mode =
you can=20
  enable double buffering via the <TT class=3Doption>-double</TT> =
option. Note:=20
  you may omit these parameters to enable <SPAN=20
  class=3Dbold><STRONG>autodetection</STRONG></SPAN> of dga mode.=20
</P></DD></DL></DIV>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>KNOWN PROBLEMS AND WORKAROUNDS</B></P>
<UL type=3Ddisc compact>
  <LI>
  <P>If you have installed <SPAN =
class=3Dbold><STRONG>NLS</STRONG></SPAN> font on=20
  your Linux box and run VESA driver from text-mode then after =
terminating <SPAN=20
  class=3Dapplication>MPlayer</SPAN> you will have <SPAN =
class=3Dbold><STRONG>ROM=20
  font</STRONG></SPAN> loaded instead of national. You can load national =
font=20
  again by using <SPAN><STRONG =
class=3Dcommand>setsysfont</STRONG></SPAN> utility=20
  from the Mandrake/Mandriva distribution for example. (<SPAN=20
  class=3Dbold><STRONG>Hint</STRONG></SPAN>: The same utility is used =
for=20
  localization of fbdev). </P>
  <LI>
  <P>Some <SPAN class=3Dbold><STRONG>Linux graphics =
drivers</STRONG></SPAN> don't=20
  update active <SPAN class=3Dbold><STRONG>BIOS mode</STRONG></SPAN> in =
DOS=20
  memory. So if you have such problem - always use VESA driver only from =
<SPAN=20
  class=3Dbold><STRONG>text-mode</STRONG></SPAN>. Otherwise text-mode =
(#03) will=20
  be activated anyway and you will need restart your computer. </P>
  <LI>
  <P>Often after terminating VESA driver you get <SPAN=20
  class=3Dbold><STRONG>black</STRONG></SPAN> screen. To return your =
screen to=20
  original state - simply switch to other console (by pressing <SPAN=20
  class=3Dkeycap><B>Alt</B></SPAN>-<SPAN =
class=3Dkeycap><B>F&lt;x&gt;</B></SPAN>)=20
  then switch to your previous console by the same way. </P>
  <LI>
  <P>To get <SPAN class=3Dbold><STRONG>working TV-out</STRONG></SPAN> =
you need=20
  have plugged TV-connector in before booting your PC since video BIOS=20
  initializes itself only once during POST procedure. =
</P></LI></UL></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dx11></A>8.14.&nbsp;X11</H2></DIV></DIV></DIV>
<P>Avoid if possible. Outputs to X11 (uses shared memory extension), =
with no=20
hardware acceleration at all. Supports (MMX/3DNow/SSE accelerated, but =
still=20
slow) software scaling, use the options <TT class=3Doption>-fs =
-zoom</TT>. Most=20
cards have hardware scaling support, use the <TT class=3Doption>-vo =
xv</TT> output=20
for them, or <TT class=3Doption>-vo xmga</TT> for Matrox cards. </P>
<P>The problem is that most cards' driver doesn't support hardware =
acceleration=20
on the second head/TV. In those cases, you see green/blue colored window =
instead=20
of the movie. This is where this driver comes in handy, but you need =
powerful=20
CPU to use software scaling. Don't use the SDL driver's software =
output+scaler,=20
it has worse image quality! </P>
<P>Software scaling is very slow, you better try changing video modes =
instead.=20
It's very simple. See the <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
dga-modelines">DGA=20
section's modelines</A>, and insert them into your <TT=20
class=3Dfilename>XF86Config</TT>. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc compact>
  <LI>
  <P>If you have XFree86 4.x.x: use the <TT class=3Doption>-vm</TT> =
option. It=20
  will change to a resolution your movie fits in. If it doesn't: </P>
  <LI>
  <P>With XFree86 3.x.x: you have to cycle through available resolutions =
with=20
  the <SPAN class=3Dkeycap><B>Ctrl</B></SPAN>-<SPAN=20
  class=3Dkeycap><B>Alt</B></SPAN>-<SPAN class=3Dkeycap><B>Keypad =
+</B></SPAN> and=20
  <SPAN class=3Dkeycap><B>Ctrl</B></SPAN>-<SPAN=20
  class=3Dkeycap><B>Alt</B></SPAN>-<SPAN class=3Dkeycap><B>Keypad =
-</B></SPAN> keys.=20
  </P></LI></UL></DIV>
<P></P>
<P>If you can't find the modes you inserted, browse XFree86's output. =
Some=20
drivers can't use low pixelclocks that are needed for low resolution =
video=20
modes. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dvidix></A>8.15.&nbsp;VIDIX</H2></DIV></DIV></DIV>
<P><B>PREAMBLE.&nbsp;</B> <ACRONYM class=3Dacronym>VIDIX</ACRONYM> is =
the=20
abbreviation for <SPAN class=3Dbold><STRONG>VID</STRONG></SPAN>eo <SPAN=20
class=3Dbold><STRONG>I</STRONG></SPAN>nterface for *ni<SPAN=20
class=3Dbold><STRONG>X</STRONG></SPAN>. VIDIX was designed and =
introduced as an=20
interface for fast user-space drivers providing such video performance =
as=20
mga_vid does for Matrox cards. It's also very portable. </P>
<P>This interface was designed as an attempt to fit existing video =
acceleration=20
interfaces (known as mga_vid, rage128_vid, radeon_vid, pm3_vid) into a =
fixed=20
scheme. It provides a high level interface to chips which are known as =
BES=20
(BackEnd scalers) or OV (Video Overlays). It doesn't provide low level =
interface=20
to things which are known as graphics servers. (I don't want to compete =
with X11=20
team in graphics mode switching). I.e. main goal of this interface is to =

maximize the speed of video playback. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>USAGE</B></P>
<UL type=3Ddisc compact>
  <LI>
  <P>You can use standalone video output driver: <TT class=3Doption>-vo=20
  xvidix</TT>. This driver was developed as X11's front end to VIDIX =
technology.=20
  It requires X server and can work only under X server. Note that, as =
it=20
  directly accesses the hardware and circumvents the X driver, pixmaps =
cached in=20
  the graphics card's memory may be corrupted. You can prevent this by =
limiting=20
  the amount of video memory used by X with the XF86Config option =
"VideoRam" in=20
  the device section. You should set this to the amount of memory =
installed on=20
  your card minus 4MB. If you have less than 8MB of video ram, you can =
use the=20
  option "XaaNoPixmapCache" in the screen section instead. </P>
  <LI>
  <P>There is a console VIDIX driver: <TT class=3Doption>-vo =
cvidix</TT>. This=20
  requires a working and initialized framebuffer for most cards (or else =
you'll=20
  just mess up the screen), and you'll have a similar effect as with <TT =

  class=3Doption>-vo mga</TT> or <TT class=3Doption>-vo fbdev</TT>. =
nVidia cards=20
  however are able to output truly graphical video on a real text =
console. See=20
  the <A title=3D"8.15.5.&nbsp;nVidia cards"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix-nvidia">nvidia_vid</A>=20
  section for more information. To get rid of text on the borders and =
the=20
  blinking cursor, try something like </P><PRE class=3Dscreen>setterm =
-cursor off &gt; /dev/tty9</PRE>
  <P>(assuming <CODE class=3Dsystemitem>tty9</CODE> is unused so far) =
and then=20
  switch to <CODE class=3Dsystemitem>tty9</CODE>. On the other hand, <TT =

  class=3Doption>-colorkey 0</TT> should give you a video running in the =

  "background", though this depends on the colorkey functionality to =
work right.=20
  </P>
  <LI>
  <P>You can use VIDIX subdevice which was applied to several video =
output=20
  drivers, such as: <TT class=3Doption>-vo vesa:vidix</TT> (<SPAN=20
  class=3Dbold><STRONG>Linux only</STRONG></SPAN>) and <TT =
class=3Doption>-vo=20
  fbdev:vidix</TT>. </P></LI></UL></DIV>
<P>Indeed it doesn't matter which video output driver is used with <SPAN =

class=3Dbold><STRONG>VIDIX</STRONG></SPAN>. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>REQUIREMENTS</B></P>
<UL type=3Ddisc compact>
  <LI>
  <P>Video card should be in graphics mode (except nVidia cards with the =
<TT=20
  class=3Doption>-vo cvidix</TT> output driver). </P>
  <LI>
  <P><SPAN class=3Dapplication>MPlayer</SPAN>'s video output driver =
should know=20
  active video mode and be able to tell to VIDIX subdevice some video=20
  characteristics of server. </P></LI></UL></DIV>
<P><B>USAGE METHODS.&nbsp;</B> When VIDIX is used as <SPAN=20
class=3Dbold><STRONG>subdevice</STRONG></SPAN> (<TT class=3Doption>-vo=20
vesa:vidix</TT>) then video mode configuration is performed by video =
output=20
device (<SPAN class=3Dbold><STRONG>vo_server</STRONG></SPAN> in short). =
Therefore=20
you can pass into command line of <SPAN =
class=3Dapplication>MPlayer</SPAN> the=20
same keys as for vo_server. In addition it understands <TT=20
class=3Doption>-double</TT> key as globally visible parameter. (I =
recommend using=20
this key with VIDIX at least for ATI's card). As for <TT =
class=3Doption>-vo=20
xvidix</TT>, currently it recognizes the following options: <TT =
class=3Doption>-fs=20
-zoom -x -y -double</TT>. </P>
<P>Also you can specify VIDIX's driver directly as third subargument in =
command=20
line: </P><PRE class=3Dscreen>mplayer -vo xvidix:mga_vid.so -fs -zoom =
-double <EM class=3Dreplaceable><CODE>file.avi</CODE></EM>
</PRE>
<P>or </P><PRE class=3Dscreen>mplayer -vo vesa:vidix:radeon_vid.so -fs =
-zoom -double -bpp 32 <EM class=3Dreplaceable><CODE>file.avi</CODE></EM>
</PRE>
<P>But it's dangerous, and you shouldn't do that. In this case given =
driver will=20
be forced and result is unpredictable (it may <SPAN=20
class=3Dbold><STRONG>freeze</STRONG></SPAN> your computer). You should =
do that=20
ONLY if you are absolutely sure it will work, and <SPAN=20
class=3Dapplication>MPlayer</SPAN> doesn't do it automatically. Please =
tell about=20
it to the developers. The right way is to use VIDIX without arguments to =
enable=20
driver autodetection. </P>
<P>Since VIDIX requires direct hardware access you can either run it as =
root or=20
set the SUID bit on the <SPAN class=3Dapplication>MPlayer</SPAN> binary =
(<SPAN=20
class=3Dbold><STRONG>Warning: This is a security risk!</STRONG></SPAN>). =

Alternatively, you can use a special kernel module, like this: </P>
<DIV class=3Dprocedure>
<OL type=3D1>
  <LI>
  <P>Download the <A href=3D"http://www.arava.co.il/matan/svgalib/"=20
  target=3D_top>development version</A> of svgalib (for example 1.9.17), =
<SPAN=20
  class=3Dbold><STRONG>OR</STRONG></SPAN> download a version made by =
Alex=20
  especially for usage with <SPAN class=3Dapplication>MPlayer</SPAN> (it =
doesn't=20
  need the svgalib source to compile) from <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/contrib/svgalib/svgalib_helper-1.=
9.17-mplayer.tar.bz2"=20
  target=3D_top>here</A>. </P>
  <LI>
  <P>Compile the module in the <TT class=3Dfilename>svgalib_helper</TT> =
directory=20
  (it can be found inside the <TT =
class=3Dfilename>svgalib-1.9.17/kernel/</TT>=20
  directory if you've downloaded the source from the svgalib site) and =
insmod=20
  it. </P>
  <LI>
  <P>To create the necessary devices in the <TT =
class=3Dfilename>/dev</TT>=20
  directory, do a </P><PRE class=3Dscreen>make device</PRE>
  <P>in the <TT class=3Dfilename>svgalib_helper</TT> dir, as root. </P>
  <LI>
  <P>Move the <TT class=3Dfilename>svgalib_helper</TT> directory to the =
<TT=20
  class=3Dfilename>vidix</TT> subdirectory of the <SPAN=20
  class=3Dapplication>MPlayer</SPAN> source tree. </P>
  <LI>
  <P>Remove the comment before the CFLAGS line containing the =
"svgalib_helper"=20
  string from <TT class=3Dfilename>vidix/Makefile</TT>. </P>
  <LI>
  <P>Recompile. </P></LI></OL></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dvidix-ati></A>8.15.1.&nbsp;ATI=20
cards</H3></DIV></DIV></DIV>
<P>Currently most ATI cards are supported natively, from Mach64 to the =
newest=20
Radeons. </P>
<P>There are two compiled binaries: <TT class=3Dfilename>radeon_vid</TT> =
for=20
Radeon and <TT class=3Dfilename>rage128_vid</TT> for Rage 128 cards. You =
may force=20
one or let the VIDIX system autoprobe all available drivers. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dvidix-mga></A>8.15.2.&nbsp;Matrox=20
cards</H3></DIV></DIV></DIV>
<P>Matrox G200, G400, G450 and G550 have been reported to work. </P>
<P>The driver supports video equalizers and should be nearly as fast as =
the <A=20
title=3D"8.7.&nbsp;Matrox framebuffer (mga_vid)"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mga_vid">Matrox=20
framebuffer</A> </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dvidix-trident></A>8.15.3.&nbsp;Trident=20
cards</H3></DIV></DIV></DIV>
<P>There is a driver available for the Trident Cyberblade/i1 chipset, =
which can=20
be found on VIA Epia motherboards. </P>
<P>The driver was written and is maintained by <A=20
href=3D"http://www.blackfiveservices.co.uk/EPIAVidix.shtml" =
target=3D_top>Alastair=20
M. Robinson</A>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dvidix-3dlabs></A>8.15.4.&nbsp;3DLabs=20
cards</H3></DIV></DIV></DIV>
<P>Although there is a driver for the 3DLabs GLINT R3 and Permedia3 =
chips, no=20
one has tested it, so reports are welcome. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dvidix-nvidia></A>8.15.5.&nbsp;nVidia=20
cards</H3></DIV></DIV></DIV>
<P>An unique feature of the nvidia_vid driver is its ability to display =
video on=20
<SPAN class=3Dbold><STRONG>plain, pure, text-only =
console</STRONG></SPAN> - with=20
no framebuffer or X magic whatsoever. For this purpose, we'll have to =
use the=20
<TT class=3Doption>cvidix</TT> video output, as the following example =
shows: </P><PRE class=3Dscreen>mplayer -vo cvidix <EM =
class=3Dreplaceable><CODE>example.avi</CODE></EM></PRE>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dvidix-sis></A>8.15.6.&nbsp;SiS=20
cards</H3></DIV></DIV></DIV>
<P>This is very experimental code, just like nvidia_vid. </P>
<P>It's been tested on SiS 650/651/740 (the most common chipsets used in =
the SiS=20
versions of the "Shuttle XPC" barebones boxes out there) </P>
<P>Reports awaited! </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Ddirectfb></A>8.16.&nbsp;DirectFB</H2></DIV></DIV></DIV>
<DIV class=3Dblockquote>
<BLOCKQUOTE class=3Dblockquote>
  <P>"DirectFB is a graphics library which was designed with embedded =
systems in=20
  mind. It offers maximum hardware accelerated performance at a minimum =
of=20
  resource usage and overhead." - quoted from <A =
href=3D"http://www.directfb.org/"=20
  target=3D_top>http://www.directfb.org/</A> </P></BLOCKQUOTE></DIV>
<P>I'll exclude DirectFB features from this section.</P>
<P>Though <SPAN class=3Dapplication>MPlayer</SPAN> is not supported as a =
"video=20
provider" in DirectFB, this output driver will enable video playback =
through=20
DirectFB. It will - of course - be accelerated, on my Matrox G400 =
DirectFB's=20
speed was the same as XVideo. </P>
<P>Always try to use the newest version of DirectFB. You can use =
DirectFB=20
options on the command line, using the <TT class=3Doption>-dfbopts</TT> =
option.=20
Layer selection can be done by the subdevice method, e.g.: <TT =
class=3Doption>-vo=20
directfb:2</TT> (layer -1 is default: autodetect) </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Ddfbmga></A>8.17.&nbsp;DirectFB/Matrox =
(dfbmga)</H2></DIV></DIV></DIV>
<P>Please read the <A title=3D8.16.&nbsp;DirectFB=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
directfb">main=20
DirectFB</A> section for general information. </P>
<P>This video output driver will enable CRTC2 (on the second head) on =
Matrox=20
G400/G450/G550 cards, displaying video <SPAN=20
class=3Dbold><STRONG>independent</STRONG></SPAN> of the first head. </P>
<P>Ville Syrjala's has a <A=20
href=3D"http://www.sci.fi/~syrjala/directfb/Matrox_TV-out_README.txt"=20
target=3D_top>README</A> and a <A=20
href=3D"http://www.sci.fi/~syrjala/directfb/matrox-tv-out-howto"=20
target=3D_top>HOWTO</A> on his homepage that explain how to make =
DirectFB TV=20
output run on Matrox cards. </P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>the first DirectFB version with which we could get this working was =
0.9.17=20
(it's buggy, needs that <CODE class=3Dsystemitem>surfacemanager</CODE> =
patch from=20
the URL above). Porting the CRTC2 code to <A=20
title=3D"8.7.&nbsp;Matrox framebuffer (mga_vid)"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mga_vid">mga_vid</A>=20
has been planned for years, <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/patches.txt"=20
target=3D_top>patches</A> are welcome. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dmpeg_decoders></A>8.18.&nbsp;MPEG=20
decoders</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Ddvb></A>8.18.1.&nbsp;DVB output and=20
input</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> supports cards with the =
Siemens DVB=20
chipset from vendors like Siemens, Technotrend, Galaxis or Hauppauge. =
The latest=20
DVB drivers are available from the <A href=3D"http://www.linuxtv.org/"=20
target=3D_top>Linux TV site</A>. If you want to do software transcoding =
you should=20
have at least a 1GHz CPU. </P>
<P>Configure should detect your DVB card. If it did not, force detection =
with=20
</P><PRE class=3Dscreen>./configure --enable-dvb</PRE>
<P>If you have ost headers at a non-standard path, set the path with =
</P><PRE class=3Dscreen>./configure --with-extraincdir=3D<EM =
class=3Dreplaceable><CODE>DVB source directory</CODE></EM>/ost/include
</PRE>
<P>Then compile and install as usual.</P>
<P><B>USAGE.&nbsp;</B> Hardware decoding of streams containing MPEG-1/2 =
video=20
and/or MPEG audio can be done with this command: </P><PRE =
class=3Dscreen>mplayer -ao mpegpes -vo mpegpes <EM =
class=3Dreplaceable><CODE>file.mpg|vob</CODE></EM>
</PRE>
<P></P>
<P>Decoding of any other type of video stream requires transcoding to =
MPEG-1,=20
thus it's slow and may not be worth the trouble, especially if your =
computer is=20
slow. It can be achieved using a command like this: </P><PRE =
class=3Dscreen>mplayer -ao mpegpes -vo mpegpes <EM =
class=3Dreplaceable><CODE>yourfile.ext</CODE></EM>
mplayer -ao mpegpes -vo mpegpes -vf expand <EM =
class=3Dreplaceable><CODE>yourfile.ext</CODE></EM>
</PRE>
<P>Note that DVB cards only support heights 288 and 576 for PAL or 240 =
and 480=20
for NTSC. You <SPAN class=3Dbold><STRONG>must</STRONG></SPAN> rescale =
for other=20
heights by adding <TT class=3Doption>scale=3Dwidth:height</TT> with the =
width and=20
height you want to the <TT class=3Doption>-vf</TT> option. DVB cards =
accept=20
various widths, like 720, 704, 640, 512, 480, 352 etc. and do hardware =
scaling=20
in horizontal direction, so you do not need to scale horizontally in =
most cases.=20
For a 512x384 (aspect 4:3) MPEG-4 (DivX) try: </P><PRE =
class=3Dscreen>mplayer -ao mpegpes -vo mpegpes -vf scale=3D512:576</PRE>
<P></P>
<P>If you have a widescreen movie and you do not want to scale it to =
full=20
height, you can use the <TT class=3Doption>expand=3Dw:h</TT> filter to =
add black=20
bands. To view a 640x384 MPEG-4 (DivX), try: </P><PRE =
class=3Dscreen>mplayer -ao mpegpes -vo mpegpes -vf expand=3D640:576 <EM =
class=3Dreplaceable><CODE>file.avi</CODE></EM>
</PRE>
<P></P>
<P>If your CPU is too slow for a full size 720x576 MPEG-4 (DivX), try=20
downscaling: </P><PRE class=3Dscreen>mplayer -ao mpegpes -vo mpegpes -vf =
scale=3D352:576 <EM class=3Dreplaceable><CODE>file.avi</CODE></EM>
</PRE>
<P></P>
<P>If speed does not improve, try vertical downscaling, too: </P><PRE =
class=3Dscreen>mplayer -ao mpegpes -vo mpegpes -vf scale=3D352:288 <EM =
class=3Dreplaceable><CODE>file.avi</CODE></EM>
</PRE>
<P></P>
<P>For OSD and subtitles use the OSD feature of the expand filter. So, =
instead=20
of <TT class=3Doption>expand=3Dw:h</TT> or <TT =
class=3Doption>expand=3Dw:h:x:y</TT>, use=20
<TT class=3Doption>expand=3Dw:h:x:y:1</TT> (the 5th parameter <TT=20
class=3Doption>:1</TT> at the end will enable OSD rendering). You may =
want to move=20
the image up a bit to get a bigger black zone for subtitles. You may =
also want=20
to move subtitles up, if they are outside your TV screen, use the <TT=20
class=3Doption>-subpos &lt;0-100&gt;</TT> option to adjust this (<TT=20
class=3Doption>-subpos 80</TT> is a good choice). </P>
<P>In order to play non-25fps movies on a PAL TV or with a slow CPU, add =
the <TT=20
class=3Doption>-framedrop</TT> option. </P>
<P>To keep the aspect ratio of MPEG-4 (DivX) files and get the optimal =
scaling=20
parameters (hardware horizontal scaling and software vertical scaling =
while=20
keeping the right aspect ratio), use the new dvbscale filter: </P><PRE =
class=3Dscreen>for a  4:3 TV: -vf =
dvbscale,scale=3D-1:0,expand=3D-1:576:-1:-1:1
for a 16:9 TV: -vf dvbscale=3D1024,scale=3D-1:0,expand=3D-1:576:-1:-1:1
</PRE>
<P></P>
<P><B>Digital TV (DVB input module).&nbsp;</B>You can use your DVB card =
for=20
watching Digital TV.</P>
<P>You should have the programs <SPAN><STRONG =
class=3Dcommand>scan</STRONG></SPAN>=20
and <SPAN><STRONG class=3Dcommand>szap/tzap/czap/azap</STRONG></SPAN> =
installed;=20
they are all included in the drivers package. </P>
<P>Verify that your drivers are working properly with a program such as =
<A=20
href=3D"http://sf.net/projects/dvbtools/" target=3D_top><SPAN><STRONG=20
class=3Dcommand>dvbstream</STRONG></SPAN></A> (that is the base of the =
DVB input=20
module). </P>
<P>Now you should compile a <TT =
class=3Dfilename>~/.mplayer/channels.conf</TT>=20
file, with the syntax accepted by <SPAN><STRONG=20
class=3Dcommand>szap/tzap/czap/azap</STRONG></SPAN>, or have =
<SPAN><STRONG=20
class=3Dcommand>scan</STRONG></SPAN> compile it for you. </P>
<P>If you have more than one card type (e.g. Satellitar, Terrestrial, =
Cable and=20
ATSC) you can save your channels files as <TT=20
class=3Dfilename>~/.mplayer/channels.conf.sat</TT>, <TT=20
class=3Dfilename>~/.mplayer/channels.conf.ter</TT>, <TT=20
class=3Dfilename>~/.mplayer/channels.conf.cbl</TT>, and <TT=20
class=3Dfilename>~/.mplayer/channels.conf.atsc</TT>, respectively, so as =
to=20
implicitly hint <SPAN class=3Dapplication>MPlayer</SPAN> to use these =
files rather=20
than <TT class=3Dfilename>~/.mplayer/channels.conf</TT>, and you only =
need to=20
specify which card to use. </P>
<P>Make sure that you have have <SPAN =
class=3Demphasis><EM>only</EM></SPAN> Free=20
to Air channels in your <TT class=3Dfilename>channels.conf</TT> file, or =
<SPAN=20
class=3Dapplication>MPlayer</SPAN> will try to skip to the next visible =
one, but=20
it may take long if there are many consecutive encrypted channels. </P>
<P>In your audio and video fields you can use an extended syntax: <TT=20
class=3Doption>...:pid[+pid]:...</TT> (for a maximum of 6 pids each); in =
this case=20
<SPAN class=3Dapplication>MPlayer</SPAN> will include in the stream all =
the=20
indicated pids, plus pid 0 (that contains the PAT). You are encouraged =
to=20
include in each row the PMT pid for the corresponding channel (if you =
know it).=20
You can also specify 8192, this will select all pids on this frequency =
and you=20
can then switch between the programs with TAB. This might need more =
bandwidth,=20
though cheap cards always transfer all channels at least to the kernel =
so it=20
does not make much of a difference for these. Other possible uses are: =
televideo=20
pid, second audio track, etc. </P>
<P>If <SPAN class=3Dapplication>MPlayer</SPAN> complains frequently =
about </P><PRE class=3Dscreen>Too many video/audio packets in the =
buffer</PRE>
<P>or if you notice a growing desynchronization between audio and video =
try to=20
use the libavformat MPEG-TS demuxer by adding <TT =
class=3Doption>-demuxer lavf=20
-lavfdopts probesize=3D128</TT> to your command line. </P>
<P>To show the first of the channels present in your list, run </P><PRE =
class=3Dscreen>mplayer dvb://</PRE>
<P></P>
<P>If you want to watch a specific channel, such as R1, run </P><PRE =
class=3Dscreen>mplayer dvb://<EM =
class=3Dreplaceable><CODE>R1</CODE></EM></PRE>
<P></P>
<P>If you have more than one card you also need to specify the number of =
the=20
card where the channel is visible (e.g. 2) with the syntax: </P><PRE =
class=3Dscreen>mplayer dvb://<EM =
class=3Dreplaceable><CODE>2@R1</CODE></EM></PRE>
<P></P>
<P>To change channels press the <SPAN class=3Dkeycap><B>h</B></SPAN> =
(next) and=20
<SPAN class=3Dkeycap><B>k</B></SPAN> (previous) keys, or use the <A=20
title=3D"2.4.3.&nbsp;OSD menu"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
osdmenu">OSD=20
menu</A>. </P>
<P>If your <TT class=3Dfilename>~/.mplayer/menu.conf</TT> contains a =
<CODE=20
class=3Dliteral>&lt;dvbsel&gt;</CODE> entry, such as the one in the =
example file=20
<TT class=3Dfilename>etc/dvb-menu.conf</TT> (that you can use to =
overwrite <TT=20
class=3Dfilename>~/.mplayer/menu.conf</TT>), the main menu will show a =
sub-menu=20
entry that will permit you to choose one of the channels present in your =
<TT=20
class=3Dfilename>channels.conf</TT>, possibly preceded by a menu with =
the list of=20
cards available if more than one is usable by <SPAN=20
class=3Dapplication>MPlayer</SPAN>. </P>
<P>If you want to save a program to disk you can use </P><PRE =
class=3Dscreen>mplayer -dumpfile <EM =
class=3Dreplaceable><CODE>r1.ts</CODE></EM> -dumpstream dvb://<EM =
class=3Dreplaceable><CODE>R1</CODE></EM>
</PRE>
<P></P>
<P>If you want to record it in a different format (re-encoding it) =
instead you=20
can run a command such as </P><PRE class=3Dscreen>mencoder -o <EM =
class=3Dreplaceable><CODE>r1.avi</CODE></EM> -ovc xvid -xvidencopts =
bitrate=3D800 \
    -oac mp3lame -lameopts cbr:br=3D128 -pp=3Dci dvb://<EM =
class=3Dreplaceable><CODE>R1</CODE></EM>
</PRE>
<P></P>
<P>Read the man page for a list of options that you can pass to the DVB =
input=20
module. </P>
<P><B>FUTURE.&nbsp;</B> If you have questions or want to hear feature=20
announcements and take part in discussions on this subject, join our <A=20
href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dvb"=20
target=3D_top>MPlayer-DVB</A> mailing list. Please remember that the =
list language=20
is English. </P>
<P>In the future you may expect the ability to display OSD and subtitles =
using=20
the native OSD feature of DVB cards, as well as more fluent playback of=20
non-25fps movies and realtime transcoding between MPEG-2 and MPEG-4 =
(partial=20
decompression). </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Ddxr2></A>8.18.2.&nbsp;DXR2</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> supports hardware =
accelerated playback=20
with the Creative DXR2 card. </P>
<P>First of all you will need properly installed DXR2 drivers. You can =
find the=20
drivers and installation instructions at the <A =
href=3D"http://dxr2.sf.net/"=20
target=3D_top>DXR2 Resource Center</A> site. </P>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>USAGE</B></P>
<DL>
  <DT><SPAN class=3Dterm><TT class=3Doption>-vo dxr2</TT></SPAN>
  <DD>
  <P>Enable TV output.</P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-vo dxr2:x11</TT> or <TT=20
  class=3Doption>-vo dxr2:xv</TT></SPAN>
  <DD>
  <P>Enable Overlay output in X11.</P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-dxr2=20
  &lt;option1:option2:...&gt;</TT></SPAN>
  <DD>
  <P>This option is used to control the DXR2 driver. =
</P></DD></DL></DIV>
<P>The overlay chipset used on the DXR2 is of pretty bad quality but the =
default=20
settings should work for everybody. The OSD may be usable with the =
overlay (not=20
on TV) by drawing it in the colorkey. With the default colorkey settings =
you may=20
get variable results, usually you will see the colorkey around the =
characters or=20
some other funny effect. But if you properly adjust the colorkey =
settings you=20
should be able to get acceptable results. </P>
<P>Please see the man page for available options.</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Ddxr3></A>8.18.3.&nbsp;DXR3/Hollywood+</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> supports hardware =
accelerated playback=20
with the Creative DXR3 and Sigma Designs Hollywood Plus cards. These =
cards both=20
use the em8300 MPEG decoder chip from Sigma Designs. </P>
<P>First of all you will need properly installed DXR3/H+ drivers, =
version 0.12.0=20
or later. You can find the drivers and installation instructions at the =
<A=20
href=3D"http://dxr3.sf.net/" target=3D_top>DXR3 &amp; Hollywood Plus for =
Linux</A>=20
site. <TT class=3Dfilename>configure</TT> should detect your card =
automatically,=20
compilation should go without problems. </P>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>USAGE</B></P>
<DL>
  <DT><SPAN class=3Dterm><TT class=3Doption>-vo =
dxr3:prebuf:sync:norm=3Dx:<EM=20
  class=3Dreplaceable><CODE>device</CODE></EM></TT></SPAN>
  <DD>
  <P><TT class=3Doption>overlay</TT> activates the overlay instead of =
TVOut. It=20
  requires that you have a properly configured overlay setup to work =
right. The=20
  easiest way to configure the overlay is to first run autocal. Then run =
mplayer=20
  with dxr3 output and without overlay turned on, run dxr3view. In =
dxr3view you=20
  can tweak the overlay settings and see the effects in realtime, =
perhaps this=20
  feature will be supported by the <SPAN =
class=3Dapplication>MPlayer</SPAN> GUI in=20
  the future. When overlay is properly set up you will no longer need to =
use=20
  dxr3view. <TT class=3Doption>prebuf</TT> turns on prebuffering. =
Prebuffering is=20
  a feature of the em8300 chip that enables it to hold more than one =
frame of=20
  video at a time. This means that when you are running with =
prebuffering <SPAN=20
  class=3Dapplication>MPlayer</SPAN> will try to keep the video buffer =
filled with=20
  data at all times. If you are on a slow machine <SPAN=20
  class=3Dapplication>MPlayer</SPAN> will probably use close to, or =
precisely 100%=20
  of CPU. This is especially common if you play pure MPEG streams (like =
DVDs,=20
  SVCDs a.s.o.) since <SPAN class=3Dapplication>MPlayer</SPAN> will not =
have to=20
  reencode it to MPEG it will fill the buffer very fast. With =
prebuffering video=20
  playback is <SPAN class=3Dbold><STRONG>much</STRONG></SPAN> less =
sensitive to=20
  other programs hogging the CPU, it will not drop frames unless =
applications=20
  hog the CPU for a long time. When running without prebuffering the =
em8300 is=20
  much more sensitive to CPU load, so it is highly suggested that you =
turn on=20
  <SPAN class=3Dapplication>MPlayer</SPAN>'s <TT =
class=3Doption>-framedrop</TT>=20
  option to avoid further loss of sync. <TT class=3Doption>sync</TT> =
will turn on=20
  the new sync-engine. This is currently an experimental feature. With =
the sync=20
  feature turned on the em8300's internal clock will be monitored at all =
times,=20
  if it starts to deviate from <SPAN =
class=3Dapplication>MPlayer</SPAN>'s clock it=20
  will be reset causing the em8300 to drop any frames that are lagging =
behind.=20
  <TT class=3Doption>norm=3Dx</TT> will set the TV norm of the DXR3 card =
without the=20
  need for external tools like em8300setup. Valid norms are 5 =3D NTSC, =
4 =3D=20
  PAL-60, 3 =3D PAL. Special norms are 2 (auto-adjust using PAL/PAL-60) =
and 1=20
  (auto-adjust using PAL/NTSC) because they decide which norm to use by =
looking=20
  at the frame rate of the movie. norm =3D 0 (default) does not change =
the current=20
  norm. <TT class=3Doption><EM =
class=3Dreplaceable><CODE>device</CODE></EM></TT> =3D=20
  device number to use if you have more than one em8300 card. Any of =
these=20
  options may be left out. <TT class=3Doption>:prebuf:sync</TT> seems to =
work=20
  great when playing MPEG-4 (DivX) movies. People have reported problems =
using=20
  the prebuf option when playing MPEG-1/2 files. You might want to try =
running=20
  without any options first, if you have sync problems, or DVD subtitle=20
  problems, give <TT class=3Doption>:sync</TT> a try. </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-ao oss:/dev/em8300_ma-<EM=20
  class=3Dreplaceable><CODE>X</CODE></EM></TT></SPAN>
  <DD>
  <P>For audio output, where <EM class=3Dreplaceable><CODE>X</CODE></EM> =
is the=20
  device number (0 if one card). </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-af resample=3D<EM=20
  class=3Dreplaceable><CODE>xxxxx</CODE></EM></TT></SPAN>
  <DD>
  <P>The em8300 cannot play back samplerates lower than 44100Hz. If the =
sample=20
  rate is below 44100Hz select either 44100Hz or 48000Hz depending on =
which one=20
  matches closest. I.e. if the movie uses 22050Hz use 44100Hz as 44100 / =
2 =3D=20
  22050, if it is 24000Hz use 48000Hz as 48000 / 2 =3D 24000 and so on. =
This does=20
  not work with digital audio output (<TT class=3Doption>-ac =
hwac3</TT>). </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-vf lavc</TT></SPAN>
  <DD>
  <P>To watch non-MPEG content on the em8300 (i.e. MPEG-4 (DivX) or =
RealVideo)=20
  you have to specify an MPEG-1 video filter such as <CODE=20
  class=3Dsystemitem>libavcodec</CODE> (lavc). See the man page for =
further info=20
  about <TT class=3Doption>-vf lavc</TT>. Currently there is no way of =
setting the=20
  fps of the em8300 which means that it is fixed to 30000/1001 fps. =
Because of=20
  this it is highly recommended that you use <TT class=3Doption>-vf =
lavc=3D<EM=20
  class=3Dreplaceable><CODE>quality</CODE></EM>:25</TT> especially if =
you are=20
  using prebuffering. Then why 25 and not 30000/1001? Well, the thing is =
that=20
  when you use 30000/1001 the picture becomes a bit jumpy. The reason =
for this=20
  is unknown to us. If you set it to somewhere between 25 and 27 the =
picture=20
  becomes stable. For now all we can do is accept this for a fact. </P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-vf =
expand=3D-1:-1:-1:-1:1</TT></SPAN>
  <DD>
  <P>Although the DXR3 driver can put some OSD onto the MPEG-1/2/4 =
video, it has=20
  much lower quality than <SPAN class=3Dapplication>MPlayer</SPAN>'s =
traditional=20
  OSD, and has several refresh problems as well. The command line above =
will=20
  firstly convert the input video to MPEG-4 (this is mandatory, sorry), =
then=20
  apply an expand filter which won't expand anything (-1: default), but =
apply=20
  the normal OSD onto the picture (that's what the "1" at the end does). =
</P>
  <DT><SPAN class=3Dterm><TT class=3Doption>-ac hwac3</TT></SPAN>
  <DD>
  <P>The em8300 supports playing back AC-3 audio (surround sound) =
through the=20
  digital audio output of the card. See the <TT class=3Doption>-ao =
oss</TT> option=20
  above, it must be used to specify the DXR3's output instead of a sound =
card.=20
  </P></DD></DL></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dother></A>8.19.&nbsp;Other=20
visualization hardware</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dzr></A>8.19.1.&nbsp;Zr</H3></DIV></DIV></DIV>
<P>This is a display-driver (<TT class=3Doption>-vo zr</TT>) for a =
number of MJPEG=20
capture/playback cards (tested for DC10+ and Buz, and it should work for =
the=20
LML33, the DC10). The driver works by encoding the frame to JPEG and =
then=20
sending it to the card. For the JPEG encoding <CODE=20
class=3Dsystemitem>libavcodec</CODE> is used, and required. With the =
special <SPAN=20
class=3Demphasis><EM>cinerama</EM></SPAN> mode, you can watch movies in =
true wide=20
screen provided that you have two beamers and two MJPEG cards. Depending =
on=20
resolution and quality settings, this driver may require a lot of CPU =
power,=20
remember to specify <TT class=3Doption>-framedrop</TT> if your machine =
is too=20
slow. Note: My AMD K6-2 350MHz is (with <TT =
class=3Doption>-framedrop</TT>) quite=20
adequate for watching VCD sized material and downscaled movies. </P>
<P>This driver talks to the kernel driver available at <A=20
href=3D"http://mjpeg.sf.net/" target=3D_top>http://mjpeg.sf.net/</A>, so =
you must=20
get it working first. The presence of an MJPEG card is autodetected by =
the <TT=20
class=3Dfilename>configure</TT> script, if autodetection fails, force =
detection=20
with </P><PRE class=3Dscreen>./configure --enable-zr</PRE>
<P></P>
<P>The output can be controlled by several options, a long description =
of the=20
options can be found in the man page, a short list of options can be =
viewed by=20
running </P><PRE class=3Dscreen>mplayer -zrhelp</PRE>
<P></P>
<P>Things like scaling and the OSD (on screen display) are not handled =
by this=20
driver but can be done using the video filters. For example, suppose =
that you=20
have a movie with a resolution of 512x272 and you want to view it =
fullscreen on=20
your DC10+. There are three main possibilities, you may scale the movie =
to a=20
width of 768, 384 or 192. For performance and quality reasons, I would =
choose to=20
scale the movie to 384x204 using the fast bilinear software scaler. The =
command=20
line is </P><PRE class=3Dscreen>mplayer -vo zr -sws 0 -vf =
scale=3D384:204 <EM class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P>
<P>Cropping can be done by the <TT class=3Doption>crop</TT> filter and =
by this=20
driver itself. Suppose that a movie is too wide for display on your Buz =
and that=20
you want to use <TT class=3Doption>-zrcrop</TT> to make the movie less =
wide, then=20
you would issue the following command </P><PRE class=3Dscreen>mplayer =
-vo zr -zrcrop 720x320+80+0 <EM =
class=3Dreplaceable><CODE>benhur.avi</CODE></EM>
</PRE>
<P></P>
<P>if you want to use the <TT class=3Doption>crop</TT> filter, you would =
do </P><PRE class=3Dscreen>mplayer -vo zr -vf crop=3D720:320:80:0 <EM =
class=3Dreplaceable><CODE>benhur.avi</CODE></EM>
</PRE>
<P></P>
<P>Extra occurrences of <TT class=3Doption>-zrcrop</TT> invoke <SPAN=20
class=3Demphasis><EM>cinerama</EM></SPAN> mode, i.e. you can distribute =
the movie=20
over several TV's or beamers to create a larger screen. Suppose you have =
two=20
beamers. The left one is connected to your Buz at <TT=20
class=3Dfilename>/dev/video1</TT> and the right one is connected to your =
DC10+ at=20
<TT class=3Dfilename>/dev/video0</TT>. The movie has a resolution of =
704x288.=20
Suppose also that you want the right beamer in black and white and that =
the left=20
beamer should have JPEG frames at quality 10, then you would issue the =
following=20
command </P><PRE class=3Dscreen>mplayer -vo zr -zrdev /dev/video0 =
-zrcrop 352x288+352+0 -zrxdoff 0 -zrbw \
    -zrcrop 352x288+0+0 -zrdev /dev/video1 -zrquality 10 \
	<EM class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P>
<P>You see that the options appearing before the second <TT=20
class=3Doption>-zrcrop</TT> only apply to the DC10+ and that the options =
after the=20
second <TT class=3Doption>-zrcrop</TT> apply to the Buz. The maximum =
number of=20
MJPEG cards participating in <SPAN =
class=3Demphasis><EM>cinerama</EM></SPAN> is=20
four, so you can build a 2x2 vidiwall. </P>
<P>Finally an important remark: Do not start or stop XawTV on the =
playback=20
device during playback, it will crash your computer. It is, however, =
fine to=20
<SPAN class=3Dbold><STRONG>FIRST</STRONG></SPAN> start XawTV, <SPAN=20
class=3Dbold><STRONG>THEN</STRONG></SPAN> start <SPAN=20
class=3Dapplication>MPlayer</SPAN>, wait for <SPAN=20
class=3Dapplication>MPlayer</SPAN> to finish and <SPAN=20
class=3Dbold><STRONG>THEN</STRONG></SPAN> stop XawTV. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dblinkenlights></A>8.19.2.&nbsp;Blinkenlights</H3></DIV></DIV></DIV=
>
<P>This driver is capable of playback using the Blinkenlights UDP =
protocol. If=20
you don't know what <A href=3D"http://www.blinkenlights.de/"=20
target=3D_top>Blinkenlights</A> or its successor <A=20
href=3D"http://www.blinkenlights.de/arcade/" target=3D_top>Arcade</A> =
are, find it=20
out. Although this is most probably the least used video output driver, =
without=20
a doubt it is the coolest <SPAN class=3Dapplication>MPlayer</SPAN> has =
to offer.=20
Just watch some of the <A =
href=3D"http://www.blinkenlights.de/video.en.html"=20
target=3D_top>Blinkenlights documentation videos</A>. On the Arcade =
video you can=20
see the Blinkenlights output driver in action at 00:07:50. =
</P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dtvout></A>8.20.&nbsp;TV-out=20
support</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dtvout-mga-g400></A>8.20.1.&nbsp;Matrox G400=20
cards</H3></DIV></DIV></DIV>
<P>Under Linux you have two methods to get G400 TV out working: </P>
<DIV class=3Dimportant style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: =
0.5in">
<H3 class=3Dtitle>Important</H3>
<P>for Matrox G450/G550 TV-out instructions, please see the next =
section!=20
</P></DIV>
<DIV class=3Dvariablelist>
<DL>
  <DT><SPAN class=3Dterm>XFree86</SPAN>
  <DD>
  <P>Using the driver and the HAL module, available from the <A=20
  href=3D"http://www.matrox.com/" target=3D_top>Matrox site</A>. This =
will give you=20
  X on the TV. </P>
  <P><SPAN class=3Dbold><STRONG>This method doesn't give you accelerated =

  playback</STRONG></SPAN> as under Windows! The second head has only =
YUV=20
  framebuffer, the <SPAN class=3Demphasis><EM>BES</EM></SPAN> (Back End =
Scaler,=20
  the YUV scaler on G200/G400/G450/G550 cards) doesn't work on it! The =
windows=20
  driver somehow workarounds this, probably by using the 3D engine to =
zoom, and=20
  the YUV framebuffer to display the zoomed image. If you really want to =
use X,=20
  use the <TT class=3Doption>-vo x11 -fs -zoom</TT> options, but it will =
be <SPAN=20
  class=3Dbold><STRONG>SLOW</STRONG></SPAN>, and has <SPAN=20
  class=3Dbold><STRONG>Macrovision</STRONG></SPAN> copy protection =
enabled (you=20
  can "workaround" Macrovision using this <A=20
  href=3D"http://avifile.sf.net/mgamacro.pl" target=3D_top>perl =
script</A>). </P>
  <DT><SPAN class=3Dterm>Framebuffer</SPAN>
  <DD>
  <P>Using the <SPAN class=3Dbold><STRONG>matroxfb =
modules</STRONG></SPAN> in the=20
  2.4 kernels. 2.2 kernels don't have the TVout feature in them, thus =
unusable=20
  for this. You have to enable ALL matroxfb-specific feature during =
compilation=20
  (except MultiHead), and compile them into <SPAN=20
  class=3Dbold><STRONG>modules</STRONG></SPAN>! You'll also need I2C =
enabled. </P>
  <DIV class=3Dprocedure>
  <OL type=3D1>
    <LI>
    <P>Enter <TT class=3Dfilename>TVout</TT> and type <SPAN><STRONG=20
    class=3Dcommand>./compile.sh</STRONG></SPAN>. Install <TT=20
    class=3Dfilename>TVout/matroxset/matroxset</TT> somewhere into your =
<CODE=20
    class=3Denvar>PATH</CODE>. </P>
    <LI>
    <P>If you don't have <SPAN><STRONG =
class=3Dcommand>fbset</STRONG></SPAN>=20
    installed, put <TT class=3Dfilename>TVout/fbset/fbset</TT> somewhere =
into your=20
    <CODE class=3Denvar>PATH</CODE>. </P>
    <LI>
    <P>If you don't have <SPAN><STRONG =
class=3Dcommand>con2fb</STRONG></SPAN>=20
    installed, put <TT class=3Dfilename>TVout/con2fb/con2fb</TT> =
somewhere into=20
    your <CODE class=3Denvar>PATH</CODE>. </P>
    <LI>
    <P>Then enter into the <TT class=3Dfilename>TVout/</TT> directory in =
the <SPAN=20
    class=3Dapplication>MPlayer</SPAN> source, and execute <TT=20
    class=3Dfilename>./modules</TT> as root. Your text-mode console will =
enter=20
    into framebuffer mode (no way back!). </P>
    <LI>
    <P>Next, EDIT and run the <TT class=3Dfilename>./matroxtv</TT> =
script. This=20
    will present you to a very simple menu. Press <SPAN=20
    class=3Dkeycap><B>2</B></SPAN> and <SPAN =
class=3Dkeycap><B>Enter</B></SPAN>. Now=20
    you should have the same picture on your monitor, and TV. If the TV =
(PAL by=20
    default) picture has some weird stripes on it, the script wasn't =
able to set=20
    the resolution correctly (to 640x512 by default). Try other =
resolutions from=20
    the menu and/or experiment with fbset. </P>
    <LI>
    <P>Yoh. Next task is to make the cursor on tty1 (or whatever) to =
disappear,=20
    and turn off screen blanking. Execute the following commands: =
</P><PRE class=3Dscreen>echo -e '\033[?25l'
setterm -blank 0</PRE>
    <P>or </P><PRE class=3Dscreen>setterm -cursor off
setterm -blank 0</PRE>
    <P>You possibly want to put the above into a script, and also clear =
the=20
    screen. To turn the cursor back: </P><PRE class=3Dscreen>echo -e =
'\033[?25h'</PRE>
    <P>or </P><PRE class=3Dscreen>setterm -cursor on</PRE>
    <P></P>
    <LI>
    <P>Yeah kewl. Start movie playing with </P><PRE =
class=3Dscreen>mplayer -vo mga -fs -screenw 640 -screenh 512 <EM =
class=3Dreplaceable><CODE>filename</CODE></EM></PRE>
    <P>(If you use X, now change to matroxfb with for example <SPAN=20
    class=3Dkeycap><B>Ctrl</B></SPAN>-<SPAN =
class=3Dkeycap><B>Alt</B></SPAN>-<SPAN=20
    class=3Dkeycap><B>F1</B></SPAN>.) Change <CODE =
class=3Dliteral>640</CODE> and=20
    <CODE class=3Dliteral>512</CODE> if you set the resolution to =
other... </P>
    <LI>
    <P><SPAN class=3Dbold><STRONG>Enjoy the ultra-fast ultra-featured =
Matrox TV=20
    output (better than Xv)!</STRONG></SPAN> =
</P></LI></OL></DIV></DD></DL></DIV>
<P><B>Building a Matrox TV-out cable.&nbsp;</B> No one takes any =
responsibility,=20
nor guarantee for any damage caused by this documentation. </P>
<P><B>Cable for G400.&nbsp;</B> The CRTC2 connector's fourth pin is the=20
composite video signal. The ground are the sixth, seventh and eighth =
pins. (info=20
contributed from Bal=C3=A1zs R=C3=A1cz) </P>
<P><B>Cable for G450.&nbsp;</B> The CRTC2 connector's first pin is the =
composite=20
video signal. The ground are the fifth, sixth, seventh, and fifteenth =
(5, 6, 7,=20
15) pins. (info contributed from Bal=C3=A1zs Kerekes) </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dtv-out_matrox_g450></A>8.20.2.&nbsp;Matrox =
G450/G550=20
cards</H3></DIV></DIV></DIV>
<P>TV output support for these cards has only been recently introduced, =
and is=20
not yet in the mainstream kernel. Currently the <SPAN=20
class=3Dbold><STRONG>mga_vid</STRONG></SPAN> module can't be used AFAIK, =
because=20
the G450/G550 driver works only in one configuration: the first CRTC =
chip (with=20
much more features) on the first display (on monitor), and the second =
CRTC (no=20
<SPAN class=3Dbold><STRONG>BES</STRONG></SPAN> - for explanation on BES, =
please=20
see the G400 section above) on TV. So you can only use <SPAN=20
class=3Dapplication>MPlayer</SPAN>'s <SPAN =
class=3Demphasis><EM>fbdev</EM></SPAN>=20
output driver at the present. </P>
<P>The first CRTC can't be routed to the second head currently. The =
author of=20
the kernel matroxfb driver - Petr Vandrovec - will maybe make support =
for this,=20
by displaying the first CRTC's output onto both of the heads at once, as =

currently recommended for G400, see the section above. </P>
<P>The necessary kernel patch and the detailed HOWTO is downloadable =
from <A=20
href=3D"http://www.bglug.ca/matrox_tvout/"=20
target=3D_top>http://www.bglug.ca/matrox_tvout/</A> </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dtvout-ati></A>8.20.3.&nbsp;ATI=20
cards</H3></DIV></DIV></DIV>
<P><B>PREAMBLE.&nbsp;</B> Currently ATI doesn't want to support any of =
its=20
TV-out chips under Linux, because of their licensed Macrovision =
technology. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>ATI CARDS TV-OUT STATUS ON LINUX</B></P>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>ATI Mach64</STRONG></SPAN>: supported by =
<A=20
  href=3D"http://gatos.sf.net/" target=3D_top>GATOS</A>. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>ASIC Radeon VIVO</STRONG></SPAN>: =
supported by <A=20
  href=3D"http://gatos.sf.net/" target=3D_top>GATOS</A>. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Radeon</STRONG></SPAN> and <SPAN=20
  class=3Dbold><STRONG>Rage128</STRONG></SPAN>: supported by <SPAN=20
  class=3Dapplication>MPlayer</SPAN>! Check <A=20
  title=3D"8.13.&nbsp;VESA - output to VESA BIOS"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vesa">VESA=20
  driver</A> and <A title=3D8.15.&nbsp;VIDIX=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix">VIDIX</A>=20
  sections. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Rage Mobility P/M, Radeon, Rage 128, =
Mobility=20
  M3/M4</STRONG></SPAN>: supported by <A=20
  =
href=3D"http://www.stud.uni-hamburg.de/users/lennart/projects/atitvout/" =

  target=3D_top>atitvout</A>. </P></LI></UL></DIV>
<P>On other cards, just use the <A title=3D"8.13.&nbsp;VESA - output to =
VESA BIOS"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vesa">VESA</A>=20
driver, without VIDIX. Powerful CPU is needed, though. </P>
<P>Only thing you need to do - <SPAN class=3Dbold><STRONG>Have the TV =
connector=20
plugged in before booting your PC</STRONG></SPAN> since video BIOS =
initializes=20
itself only once during POST procedure. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dtvout-nvidia></A>8.20.4.&nbsp;nVidia</H3></DIV></DIV></DIV>
<P>First, you MUST download the closed-source drivers from <A=20
href=3D"http://nvidia.com/" target=3D_top>http://nvidia.com/</A>. I will =
not=20
describe the installation and configuration process because it does not =
cover=20
the scope of this documentation. </P>
<P>After XFree86, XVideo, and 3D acceleration is properly working, edit =
your=20
card's Device section in the <TT class=3Dfilename>XF86Config</TT> file, =
according=20
to the following example (adapt for your card/TV): </P><PRE =
class=3Dprogramlisting>Section "Device"
        Identifier      "GeForce"
        VendorName      "ASUS"
        BoardName       "nVidia GeForce2/MX 400"
        Driver          "nvidia"
        #Option         "NvAGP" "1"
        Option          "NoLogo"
        Option          "CursorShadow"  "on"

        Option          "TwinView"
        Option          "TwinViewOrientation" "Clone"
        Option          "MetaModes" "1024x768,640x480"
        Option          "ConnectedMonitor" "CRT, TV"
        Option          "TVStandard" "PAL-B"
        Option          "TVOutFormat" "Composite"
EndSection
</PRE>
<P></P>
<P>Of course the important thing is the TwinView part. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dtvout-neomagic></A>8.20.5.&nbsp;NeoMagic</H3></DIV></DIV></DIV>
<P>The NeoMagic chip is found in a variety of laptops, some of them are =
equipped=20
with a simple analog TV encoder, some have a more advanced one. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Analog encoder chip</STRONG></SPAN>: It =
has been=20
  reported that reliable TV out can be obtained by using <TT =
class=3Doption>-vo=20
  fbdev</TT> or <TT class=3Doption>-vo fbdev2</TT>. You need to have =
vesafb=20
  compiled in your kernel and pass the following parameters on the =
kernel=20
  command line: <TT class=3Doption>append=3D"video=3Dvesafb:ywrap,mtrr" =
vga=3D791</TT>.=20
  You should start <SPAN class=3Dapplication>X</SPAN>, then switch to =
console mode=20
  with e.g. <SPAN class=3Dkeycap><B>Ctrl</B></SPAN>-<SPAN=20
  class=3Dkeycap><B>Alt</B></SPAN>-<SPAN =
class=3Dkeycap><B>F1</B></SPAN>. If you=20
  fail to start <SPAN class=3Dapplication>X</SPAN> before running <SPAN=20
  class=3Dapplication>MPlayer</SPAN> from the console, the video becomes =
slow and=20
  choppy (explanations are welcome). Login to your console, then =
initiate the=20
  following command: </P><PRE class=3Dscreen>clear; mplayer -vo fbdev =
-zoom -cache 8192 dvd://</PRE>
  <P>Now you should see the movie running in console mode filling up =
about half=20
  your laptop's LCD screen. To switch to TV hit <SPAN=20
  class=3Dkeycap><B>Fn</B></SPAN>-<SPAN class=3Dkeycap><B>F5</B></SPAN> =
three times.=20
  Tested on a Tecra 8000, 2.6.15 kernel with vesafb, ALSA v1.0.10. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Chrontel 70xx encoder =
chip</STRONG></SPAN>: Found=20
  in IBM Thinkpad 390E and possibly other Thinkpads or notebooks. </P>
  <P>You must use <TT class=3Doption>-vo vesa:neotv_pal</TT> for PAL or =
<TT=20
  class=3Doption>-vo vesa:neotv_ntsc</TT> for NTSC. It will provide TV =
output=20
  function in the following 16 bpp and 8 bpp modes: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>NTSC 320x240, 640x480 and maybe 800x600 too.</P>
    <LI>
    <P>PAL 320x240, 400x300, 640x480, 800x600.</P></LI></UL></DIV>
  <P>Mode 512x384 is not supported in BIOS. You must scale the image to =
a=20
  different resolution to activate TV out. If you can see an image on =
the screen=20
  in 640x480 or in 800x600 but not in 320x240 or other smaller =
resolution you=20
  need to replace two tables in <TT class=3Dfilename>vbelib.c</TT>. See =
the=20
  vbeSetTV function for details. Please contact the author in this case. =
</P>
  <P>Known issues: VESA-only, no other controls such as brightness, =
contrast,=20
  blacklevel, flickfilter are implemented. </P></LI></UL></DIV>
<P></P></DIV></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Daudio></A>Chapter&nbsp;9.&nbsp;Audio output=20
devices</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
sync">9.1.=20
  Audio/Video synchronization</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
troubleshooting">9.2.=20
  Troubleshooting</A></SPAN></DT></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dsync></A>9.1.&nbsp;Audio/Video=20
synchronization</H2></DIV></DIV></DIV>
<P>Linux sound card drivers have compatibility problems. This is because =
<SPAN=20
class=3Dapplication>MPlayer</SPAN> relies on an in-built feature of =
<SPAN=20
class=3Demphasis><EM>properly</EM></SPAN> coded sound drivers that =
enable them to=20
maintain correct audio/video sync. Regrettably, some driver authors =
don't take=20
the care to code this feature since it is not needed for playing MP3s or =
sound=20
effects. </P>
<P>Other media players like <A href=3D"http://avifile.sf.net/"=20
target=3D_top>aviplay</A> or <A href=3D"http://xinehq.de/" =
target=3D_top>xine</A>=20
possibly work out-of-the-box with these drivers because they use =
"simple"=20
methods with internal timing. Measuring showed that their methods are =
not as=20
efficient as <SPAN class=3Dapplication>MPlayer</SPAN>'s. </P>
<P>Using <SPAN class=3Dapplication>MPlayer</SPAN> with a properly =
written audio=20
driver will never result in A/V desyncs related to the audio, except =
only with=20
very badly created files (check the man page for workarounds). </P>
<P>If you happen to have a bad audio driver, try the <TT=20
class=3Doption>-autosync</TT> option, it should sort out your problems. =
See the=20
man page for detailed information. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dtroubleshooting></A>9.2.&nbsp;Troubleshooting</H2></DIV></DIV></DI=
V>
<P>Some notes:</P>
<P>If you have ALSA version 0.5, then you almost always have to use <TT=20
class=3Doption>-ao alsa5</TT>, since ALSA 0.5 has buggy OSS emulation =
code, and=20
will <SPAN class=3Dbold><STRONG>crash <SPAN=20
class=3Dapplication>MPlayer</SPAN></STRONG></SPAN> with a message like =
this: </P><PRE class=3Dscreen>DEMUXER: Too many (945 in 8390980 bytes) =
video packets in the buffer!
</PRE>
<P></P>
<P>If the sound clicks when playing from CD-ROM, turn on IRQ unmasking =
as=20
described in the <A title=3D"4.1.&nbsp;CD/DVD drives"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
drives">CD-ROM</A>=20
section. </P></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A =
name=3Dtv></A>Chapter&nbsp;10.&nbsp;TV</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-input">10.1.=20
  TV input</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-compilation">10.1.1.=20
    Compilation</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-tips">10.1.2.=20
    Usage tips</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
tv-examples">10.1.3.=20
    Examples</A></SPAN></DT></DL></DD></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dtv-input></A>10.1.&nbsp;TV=20
input</H2></DIV></DIV></DIV>
<P>This section is about how to enable <SPAN=20
class=3Dbold><STRONG>watching/grabbing from V4L compatible TV=20
tuner</STRONG></SPAN>. See the man page for a description of TV options =
and=20
keyboard controls. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dtv-compilation></A>10.1.1.&nbsp;Compilation</H3></DIV></DIV></DIV>=

<DIV class=3Dprocedure>
<OL type=3D1>
  <LI>
  <P>First, you have to recompile. <TT class=3Dfilename>./configure</TT> =
will=20
  autodetect kernel headers of v4l stuff and the existence of <TT=20
  class=3Dfilename>/dev/video*</TT> entries. If they exist, TV support =
will be=20
  built (see the output of <TT class=3Dfilename>./configure</TT>). </P>
  <LI>
  <P>Make sure your tuner works with another TV software in Linux, for =
example=20
  <SPAN class=3Dapplication>XawTV</SPAN>. </P></LI></OL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dtv-tips></A>10.1.2.&nbsp;Usage=20
tips</H3></DIV></DIV></DIV>
<P>The full listing of the options is available on the manual page. Here =
are=20
just a few tips: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>Use the <TT class=3Doption>channels</TT> option. An example: =
</P><PRE class=3Dscreen>-tv channels=3D26-MTV1,23-TV2</PRE>
  <P>Explanation: Using this option, only the 26 and 23 channels will be =
usable,=20
  and there will be a nice OSD text upon channel switching, displaying =
the=20
  channel's name. Spaces in the channel name must be replaced by the "_" =

  character. </P>
  <LI>
  <P>Choose some sane image dimensions. The dimensions of the resulting =
image=20
  should be divisible by 16. </P>
  <LI>
  <P>If you capture the video with the vertical resolution higher than =
half of=20
  the full resolution (i.e. 288 for PAL or 240 for NTSC), then the =
'frames' you=20
  get will really be interleaved pairs of fields. Depending on what you =
want to=20
  do with the video you may leave it in this form, destructively =
deinterlace, or=20
  break the pairs apart into individual fields. </P>
  <P>Otherwise you'll get a movie which is distorted during fast-motion =
scenes=20
  and the bitrate controller will be probably even unable to retain the=20
  specified bitrate as the interlacing artifacts produce high amount of =
detail=20
  and thus consume lot of bandwidth. You can enable deinterlacing with =
<TT=20
  class=3Doption>-vf pp=3DDEINT_TYPE</TT>. Usually <TT =
class=3Doption>pp=3Dlb</TT> does=20
  a good job, but it can be matter of personal preference. See other=20
  deinterlacing algorithms in the manual and give it a try. </P>
  <LI>
  <P>Crop out the dead space. When you capture the video, the areas at =
the edges=20
  are usually black or contain some noise. These again consume lots of=20
  unnecessary bandwidth. More precisely it's not the black areas =
themselves but=20
  the sharp transitions between the black and the brighter video image =
which do=20
  but that's not important for now. Before you start capturing, adjust =
the=20
  arguments of the <TT class=3Doption>crop</TT> option so that all the =
crap at the=20
  margins is cropped out. Again, don't forget to keep the resulting =
dimensions=20
  sane. </P>
  <LI>
  <P>Watch out for CPU load. It shouldn't cross the 90% boundary for =
most of the=20
  time. If you have a large capture buffer, <SPAN=20
  class=3Dapplication>MEncoder</SPAN> can survive an overload for few =
seconds but=20
  nothing more. It's better to turn off the 3D OpenGL screensavers and =
similar=20
  stuff. </P>
  <LI>
  <P>Don't mess with the system clock. <SPAN =
class=3Dapplication>MEncoder</SPAN>=20
  uses the system clock for doing A/V sync. If you adjust the system =
clock=20
  (especially backwards in time), <SPAN =
class=3Dapplication>MEncoder</SPAN> gets=20
  confused and you will lose frames. This is an important issue if you =
are=20
  hooked to a network and run some time synchronization software like =
NTP. You=20
  have to turn NTP off during the capture process if you want to capture =

  reliably. </P>
  <LI>
  <P>Don't change the <TT class=3Doption>outfmt</TT> unless you know =
what you are=20
  doing or your card/driver really doesn't support the default (YV12=20
  colorspace). In the older versions of <SPAN =
class=3Dapplication>MPlayer</SPAN>/=20
  <SPAN class=3Dapplication>MEncoder</SPAN> it was necessary to specify =
the output=20
  format. This issue should be fixed in the current releases and <TT=20
  class=3Doption>outfmt</TT> isn't required anymore, and the default =
suits the=20
  most purposes. For example, if you are capturing into DivX using <CODE =

  class=3Dsystemitem>libavcodec</CODE> and specify <TT=20
  class=3Doption>outfmt=3DRGB24</TT> in order to increase the quality of =
the=20
  captured images, the captured image will be actually later converted =
back into=20
  YV12 so the only thing you achieve is a massive waste of CPU power. =
</P>
  <LI>
  <P>To specify the I420 colorspace (<TT =
class=3Doption>outfmt=3Di420</TT>), you=20
  have to add an option <TT class=3Doption>-vc rawi420</TT> due to a =
fourcc=20
  conflict with an Intel Indeo video codec. </P>
  <LI>
  <P>There are several ways of capturing audio. You can grab the sound =
either=20
  using your sound card via an external cable connection between video =
card and=20
  line-in, or using the built-in ADC in the bt878 chip. In the latter =
case, you=20
  have to load the <SPAN class=3Dbold><STRONG>btaudio</STRONG></SPAN> =
driver. Read=20
  the <TT class=3Dfilename>linux/Documentation/sound/btaudio</TT> file =
(in the=20
  kernel tree, not <SPAN class=3Dapplication>MPlayer</SPAN>'s) for some=20
  instructions on using this driver. </P>
  <LI>
  <P>If <SPAN class=3Dapplication>MEncoder</SPAN> cannot open the audio =
device,=20
  make sure that it is really available. There can be some trouble with =
the=20
  sound servers like aRts (KDE) or ESD (GNOME). If you have a full =
duplex sound=20
  card (almost any decent card supports it today), and you are using =
KDE, try to=20
  check the "full duplex" option in the sound server preference menu.=20
</P></LI></UL></DIV>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dtv-examples></A>10.1.3.&nbsp;Examples</H3></DIV></DIV></DIV>
<DIV class=3Dinformalexample>
<P>Dummy output, to AAlib :) </P><PRE class=3Dscreen>mplayer -tv =
driver=3Ddummy:width=3D640:height=3D480 -vo aa tv://</PRE>
<P></P></DIV>
<DIV class=3Dinformalexample>
<P>Input from standard V4L: </P><PRE class=3Dscreen>mplayer -tv =
driver=3Dv4l:width=3D640:height=3D480:outfmt=3Di420 -vc rawi420 -vo xv =
tv://
</PRE>
<P></P></DIV>
<DIV class=3Dinformalexample>
<P>A more sophisticated example. This makes <SPAN=20
class=3Dapplication>MEncoder</SPAN> capture the full PAL image, crop the =
margins,=20
and deinterlace the picture using a linear blend algorithm. Audio is =
compressed=20
with a constant bitrate of 64kbps, using LAME codec. This setup is =
suitable for=20
capturing movies. </P><PRE class=3Dscreen>mencoder -tv =
driver=3Dv4l:width=3D768:height=3D576 -oac mp3lame -lameopts =
cbr:br=3D64\
    -ovc lavc -lavcopts vcodec=3Dmpeg4:vbitrate=3D900 \
    -vf crop=3D720:544:24:16,pp=3Dlb -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM> tv://
</PRE>
<P></P></DIV>
<DIV class=3Dinformalexample>
<P>This will additionally rescale the image to 384x288 and compresses =
the video=20
with the bitrate of 350kbps in high quality mode. The vqmax option =
looses the=20
quantizer and allows the video compressor to actually reach so low =
bitrate even=20
at the expense of the quality. This can be used for capturing long TV =
series,=20
where the video quality isn't so important. </P><PRE =
class=3Dscreen>mencoder -tv driver=3Dv4l:width=3D768:height=3D576 \
    -ovc lavc -lavcopts =
vcodec=3Dmpeg4:vbitrate=3D350:vhq:vqmax=3D31:keyint=3D300 \
    -oac mp3lame -lameopts cbr:br=3D48 -sws 1 -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>\
    -vf crop=3D720:540:24:18,pp=3Dlb,scale=3D384:288 tv://
</PRE>
<P>It's also possible to specify smaller image dimensions in the <TT=20
class=3Doption>-tv</TT> option and omit the software scaling but this =
approach=20
uses the maximum available information and is a little more resistant to =
noise.=20
The bt8x8 chips can do the pixel averaging only in the horizontal =
direction due=20
to a hardware limitation. </P></DIV></DIV></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A=20
name=3Dradio></A>Chapter&nbsp;11.&nbsp;Radio</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio-input">11.1.=20
  Radio input</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio-compilation">11.1.1.=20
    Compilation</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio-tips">11.1.2.=20
    Usage tips</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
radio-examples">11.1.3.=20
    Examples</A></SPAN></DT></DL></DD></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dradio-input></A>11.1.&nbsp;Radio=20
input</H2></DIV></DIV></DIV>
<P>This section is about how to enable listening to radio from a =
V4L-compatible=20
radio tuner. See the man page for a description of radio options and =
keyboard=20
controls. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dradio-compilation></A>11.1.1.&nbsp;Compilation</H3></DIV></DIV></D=
IV>
<DIV class=3Dprocedure>
<OL type=3D1>
  <LI>
  <P>First, you have to recompile <SPAN =
class=3Dapplication>MPlayer</SPAN> using=20
  <TT class=3Dfilename>./configure</TT> with <TT =
class=3Doption>--enable-radio</TT>=20
  and (if you want capture support) <TT=20
  class=3Doption>--enable-radio-capture</TT>. </P>
  <LI>
  <P>Make sure your tuner works with another radio software in Linux, =
for=20
  example <SPAN class=3Dapplication>XawTV</SPAN>. =
</P></LI></OL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dradio-tips></A>11.1.2.&nbsp;Usage=20
tips</H3></DIV></DIV></DIV>
<P>The full listing of the options is available in the manual page. Here =
are=20
just a few tips: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>Use the <TT class=3Doption>channels</TT> option. An example: =
</P><PRE class=3Dscreen>-radio =
channels=3D104.4-Sibir,103.9-Maximum</PRE>
  <P>Explanation: With this option, only the 104.4 and 103.9 radio =
stations will=20
  be usable. There will be a nice OSD text upon channel switching, =
displaying=20
  the channel's name. Spaces in the channel name must be replaced by the =
"_"=20
  character. </P>
  <LI>
  <P>There are several ways of capturing audio. You can grab the sound =
either=20
  using your sound card via an external cable connection between video =
card and=20
  line-in, or using the built-in ADC in the saa7134 chip. In the latter =
case,=20
  you have to load the <CODE class=3Dsystemitem>saa7134-alsa</CODE> or =
<CODE=20
  class=3Dsystemitem>saa7134-oss</CODE> driver. </P>
  <LI>
  <P><SPAN class=3Dapplication>MEncoder</SPAN> cannot be used for audio =
capture,=20
  because it requires a video stream to work. So your can either use =
<SPAN=20
  class=3Dapplication>arecord</SPAN> from ALSA project or use <TT =
class=3Doption>-ao=20
  pcm:file=3Dfile.wav</TT>. In the latter case you will not hear any =
sound (unless=20
  you are using a line-in cable and have switched line-in mute off).=20
</P></LI></UL></DIV>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dradio-examples></A>11.1.3.&nbsp;Examples</H3></DIV></DIV></DIV>
<DIV class=3Dinformalexample>
<P>Input from standard V4L (using line-in cable, capture switched off): =
</P><PRE class=3Dscreen>mplayer radio://104.4</PRE>
<P></P></DIV>
<DIV class=3Dinformalexample>
<P>Input from standard V4L (using line-in cable, capture switched off, =
V4Lv1=20
interface): </P><PRE class=3Dscreen>mplayer -radio driver=3Dv4l =
radio://104.4</PRE>
<P></P></DIV>
<DIV class=3Dinformalexample>
<P>Playing second channel from channel list: </P><PRE =
class=3Dscreen>mplayer -radio channels=3D104.4=3DSibir,103.9=3DMaximm =
radio://2</PRE>
<P></P></DIV>
<DIV class=3Dinformalexample>
<P>Passing sound over the PCI bus from the radio card's internal ADC. In =
this=20
example the tuner is used as a second sound card (ALSA device hw:1,0). =
For=20
saa7134-based cards either the <CODE =
class=3Dsystemitem>saa7134-alsa</CODE> or=20
<CODE class=3Dsystemitem>saa7134-oss</CODE> module must be loaded. =
</P><PRE class=3Dscreen>mplayer -rawaudio rate=3D32000 radio://2/capture =
\
    -radio =
adevice=3Dhw=3D1.0:arate=3D32000:channels=3D104.4=3DSibir,103.9=3DMaximm
</PRE>
<P></P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>When using ALSA device names colons must be replaced by equal signs, =
commas=20
by periods. </P></DIV>
<P></P></DIV></DIV></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A=20
name=3Dports></A>Chapter&nbsp;12.&nbsp;Ports</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
linux">12.1.=20
  Linux</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
debian">12.1.1.=20
    Debian packaging</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
rpm">12.1.2.=20
    RPM packaging</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
arm">12.1.3.=20
    ARM</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bsd">12.2.=20
  *BSD</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
freebsd">12.2.1.=20
    FreeBSD</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
openbsd">12.2.2.=20
    OpenBSD</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
darwin">12.2.3.=20
    Darwin</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
unix">12.3.=20
  Commercial Unix</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
solaris">12.3.1.=20
    Solaris</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
irix">12.3.2.=20
    IRIX</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
hp-ux">12.3.3.=20
    HP-UX</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aix">12.3.4.=20
    AIX</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
windows">12.4.=20
  Windows</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
cygwin">12.4.1.=20
    <SPAN class=3Dapplication>Cygwin</SPAN></A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
mingw">12.4.2.=20
    <SPAN class=3Dapplication>MinGW</SPAN></A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
macos">12.5.=20
  Mac OS</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
osx_gui">12.5.1.=20
    MPlayer OS X GUI</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
exotic_platforms">12.6.=20
  Exotic Platforms</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
qnx">12.6.1.=20
    QNX</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
amiga">12.6.2.=20
    Amiga/MorphOS (GeekGadgets)</A></SPAN></DT></DL></DD></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dlinux></A>12.1.&nbsp;Linux</H2></DIV></DIV></DIV>
<P>The main development platform is Linux on x86, although <SPAN=20
class=3Dapplication>MPlayer</SPAN> works on many other Linux ports. =
Binary=20
packages of <SPAN class=3Dapplication>MPlayer</SPAN> are available from =
several=20
sources. However, <SPAN class=3Dbold><STRONG>none of these packages are=20
supported</STRONG></SPAN>. Report problems to the authors, not to us. =
</P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Ddebian></A>12.1.1.&nbsp;Debian=20
packaging</H3></DIV></DIV></DIV>
<P>To build a Debian package, run the following command in the <SPAN=20
class=3Dapplication>MPlayer</SPAN> source directory: </P><PRE =
class=3Dscreen>fakeroot debian/rules binary</PRE>
<P>If you want to pass custom options to configure, you can set up the =
<CODE=20
class=3Denvar>DEB_BUILD_OPTIONS</CODE> environment variable. For =
instance, if you=20
want GUI and OSD menu support you would use: </P><PRE =
class=3Dscreen>DEB_BUILD_OPTIONS=3D"--enable-gui --enable-menu" fakeroot =
debian/rules binary</PRE>
<P>You can also pass some variables to the Makefile. For example, if you =
want to=20
compile with gcc 3.4 even if it's not the default compiler: </P><PRE =
class=3Dscreen>CC=3Dgcc-3.4 DEB_BUILD_OPTIONS=3D"--enable-gui" fakeroot =
debian/rules binary</PRE>
<P>To clean up the source tree run the following command: </P><PRE =
class=3Dscreen>fakeroot debian/rules clean</PRE>
<P>As root you can then install the <TT class=3Dfilename>.deb</TT> =
package as=20
usual: </P><PRE class=3Dscreen>dpkg -i ../mplayer_<EM =
class=3Dreplaceable><CODE>version</CODE></EM>.deb</PRE>
<P></P>
<P>Christian Marillat has been making unofficial Debian packages of =
<SPAN=20
class=3Dapplication>MPlayer</SPAN>, <SPAN =
class=3Dapplication>MEncoder</SPAN> and=20
our binary codec packages for a while, you can (apt-)get them from <A=20
href=3D"http://www.debian-multimedia.org/" target=3D_top>his =
homepage</A>.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Drpm></A>12.1.2.&nbsp;RPM=20
packaging</H3></DIV></DIV></DIV>
<P>Dominik Mierzejewski maintains the official RPM packages of <SPAN=20
class=3Dapplication>MPlayer</SPAN> for Fedora Core. They are available =
from <A=20
href=3D"http://rpm.livna.org/" target=3D_top>Livna repository</A>. </P>
<P>Mandrake/Mandriva RPM packages are available from the <A=20
href=3D"http://plf.zarb.org/" target=3D_top>P.L.F.</A>. SuSE used to =
include a=20
crippled version of <SPAN class=3Dapplication>MPlayer</SPAN> in their=20
distribution. They have removed it in their latest releases. You can get =
working=20
RPMs from <A href=3D"http://packman.links2linux.de/?action=3D128"=20
target=3D_top>links2linux.de</A>. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Darm></A>12.1.3.&nbsp;ARM</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> works on Linux PDAs with ARM =
CPU e.g.=20
Sharp Zaurus, Compaq Ipaq. The easiest way to obtain <SPAN=20
class=3Dapplication>MPlayer</SPAN> is to get it from one of the <A=20
href=3D"http://www.openzaurus.org/" target=3D_top>OpenZaurus</A> package =
feeds. If=20
you want to compile it yourself, you should look at the <A=20
href=3D"http://openzaurus.bkbits.net:8080/buildroot/src/packages/mplayer?=
nav=3Dindex.html%7Csrc/.%7Csrc/packages"=20
target=3D_top>mplayer</A> and the <A=20
href=3D"http://openzaurus.bkbits.net:8080/buildroot/src/packages/libavcod=
ec?nav=3Dindex.html%7Csrc/.%7Csrc/packages"=20
target=3D_top>libavcodec</A> directory in the OpenZaurus distribution =
buildroot.=20
These always have the latest Makefile and patches used for building a =
SVN <SPAN=20
class=3Dapplication>MPlayer</SPAN>. If you need a GUI frontend, you can =
use=20
xmms-embedded. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dbsd></A>12.2.&nbsp;*BSD</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> runs on all known BSD =
flavors. There=20
are ports/pkgsrc/fink/etc versions of <SPAN =
class=3Dapplication>MPlayer</SPAN>=20
available that are probably easier to use than our raw sources. </P>
<P>To build <SPAN class=3Dapplication>MPlayer</SPAN> you will need GNU =
make (gmake=20
- native BSD make will not work) and a recent version of binutils. </P>
<P>If <SPAN class=3Dapplication>MPlayer</SPAN> complains about not =
finding <TT=20
class=3Dfilename>/dev/cdrom</TT> or <TT class=3Dfilename>/dev/dvd</TT>, =
create an=20
appropriate symbolic link: </P><PRE class=3Dscreen>ln -s /dev/<EM =
class=3Dreplaceable><CODE>your_cdrom_device</CODE></EM> /dev/cdrom</PRE>
<P></P>
<P>To use Win32 DLLs with <SPAN class=3Dapplication>MPlayer</SPAN> you =
will need=20
to re-compile the kernel with "<CODE class=3Denvar>option =
USER_LDT</CODE>" (unless=20
you run FreeBSD-CURRENT, where this is the default). </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dfreebsd></A>12.2.1.&nbsp;FreeBSD</H3></DIV></DIV></DIV>
<P>If your CPU has SSE, recompile your kernel with "<CODE =
class=3Denvar>options=20
CPU_ENABLE_SSE</CODE>" (FreeBSD-STABLE or kernel patches required). =
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dopenbsd></A>12.2.2.&nbsp;OpenBSD</H3></DIV></DIV></DIV>
<P>Due to limitations in different versions of gas (relocation vs MMX), =
you will=20
need to compile in two steps: First make sure that the non-native as is =
first in=20
your <CODE class=3Denvar>$PATH</CODE> and do a <SPAN><STRONG =
class=3Dcommand>gmake=20
-k</STRONG></SPAN>, then make sure that the native version is used and =
do=20
<SPAN><STRONG class=3Dcommand>gmake</STRONG></SPAN>. </P>
<P>As of OpenBSD 3.4 the hack above is no longer needed. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Ddarwin></A>12.2.3.&nbsp;Darwin</H3></DIV></DIV></DIV>
<P>See the <A title=3D"12.5.&nbsp;Mac OS"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
macos">Mac=20
OS</A> section. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dunix></A>12.3.&nbsp;Commercial=20
Unix</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> has been ported to a number =
of=20
commercial Unix variants. Since the development environments on these =
systems=20
tend to be different from those found on free Unixes, you may have to =
make some=20
manual adjustments to make the build work. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dsolaris></A>12.3.1.&nbsp;Solaris</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> should work on Solaris 2.6 =
or newer.=20
Use the SUN audio driver with the <TT class=3Doption>-ao sun</TT> option =
for=20
sound. </P>
<P>On <SPAN class=3Dbold><STRONG>UltraSPARCs</STRONG></SPAN>, <SPAN=20
class=3Dapplication>MPlayer</SPAN> takes advantage of their <SPAN=20
class=3Dbold><STRONG>VIS</STRONG></SPAN> extensions (equivalent to MMX), =
currently=20
only in <CODE class=3Dsystemitem>libmpeg2</CODE>, <CODE=20
class=3Dsystemitem>libvo</CODE> and <CODE =
class=3Dsystemitem>libavcodec</CODE>, but=20
not in <CODE class=3Dsystemitem>mp3lib</CODE>. You can watch a VOB file =
on a=20
400MHz CPU. You'll need <A =
href=3D"http://www.sun.com/sparc/vis/mediaLib.html"=20
target=3D_top><CODE class=3Dsystemitem>mLib</CODE></A> installed. </P>
<P><SPAN class=3Dbold><STRONG>Caveat:</STRONG></SPAN></P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>mediaLib</STRONG></SPAN> is <SPAN=20
  class=3Dbold><STRONG>currently disabled</STRONG></SPAN> by default in =
<SPAN=20
  class=3Dapplication>MPlayer</SPAN> because of brokenness. SPARC users =
who build=20
  MPlayer with mediaLib support have reported a thick, green-tint on =
video=20
  encoded and decoded with libavcodec. You may enable it if you wish =
with: </P><PRE class=3Dscreen>./configure --enable-mlib</PRE>
  <P>You do this at your own risk. x86 users should <SPAN=20
  class=3Dbold><STRONG>never</STRONG></SPAN> use mediaLib, as this will =
result in=20
  very poor MPlayer performance. </P></LI></UL></DIV>
<P>To build the package you will need GNU <SPAN =
class=3Dapplication>make</SPAN>=20
(<TT class=3Dfilename>gmake</TT>, <TT =
class=3Dfilename>/opt/sfw/gmake</TT>), native=20
Solaris make will not work. Typical error you get when building with =
Solaris'=20
make instead of GNU make: </P><PRE class=3Dscreen>% /usr/ccs/bin/make
make: Fatal error in reader: Makefile, line 25: Unexpected end of line =
seen
</PRE>
<P></P>
<P>On Solaris SPARC, you need the GNU C/C++ Compiler; it does not matter =
if GNU=20
C/C++ compiler is configured with or without the GNU assembler. </P>
<P>On Solaris x86, you need the GNU assembler and the GNU C/C++ =
compiler,=20
configured to use the GNU assembler! The <SPAN =
class=3Dapplication>MPlayer</SPAN>=20
code on the x86 platform makes heavy use of MMX, SSE and 3DNOW! =
instructions=20
that cannot be compiled using Sun's assembler <TT=20
class=3Dfilename>/usr/ccs/bin/as</TT>. </P>
<P>The <TT class=3Dfilename>configure</TT> script tries to find out, =
which=20
assembler program is used by your "gcc" command (in case the =
autodetection=20
fails, use the <TT class=3Doption>--as=3D<EM=20
class=3Dreplaceable><CODE>/wherever/you/have/installed/gnu-as</CODE></EM>=
</TT>=20
option to tell the <TT class=3Dfilename>configure</TT> script where it =
can find=20
GNU "as" on your system). </P>
<P>Solutions to common problems:</P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>Error message from <TT class=3Dfilename>configure</TT> on a Solaris =
x86=20
  system using GCC without GNU assembler: </P><PRE class=3Dscreen>% =
configure
...
Checking assembler (/usr/ccs/bin/as) ... , failed
Please upgrade(downgrade) binutils to 2.10.1...</PRE>
  <P>(Solution: Install and use a gcc configured with <TT=20
  class=3Doption>--with-as=3Dgas</TT>) </P>
  <P>Typical error you get when building with a GNU C compiler that does =
not use=20
  GNU as: </P><PRE class=3Dscreen>% gmake
...
gcc -c -Iloader -Ilibvo -O4 -march=3Di686 -mcpu=3Di686 -pipe -ffast-math
     -fomit-frame-pointer  -I/usr/local/include   -o mplayer.o mplayer.c
Assembler: mplayer.c
"(stdin)", line 3567 : Illegal mnemonic
"(stdin)", line 3567 : Syntax error
... more "Illegal mnemonic" and "Syntax error" errors ...
</PRE>
  <P></P>
  <LI>
  <P><SPAN class=3Dapplication>MPlayer</SPAN> may segfault when decoding =
and=20
  encoding video that uses the win32codecs: </P><PRE class=3Dscreen>...
Trying to force audio codec driver family acm...
Opening audio decoder: [acm] Win32/ACM decoders
sysi86(SI86DSCR): Invalid argument
Couldn't install fs segment, expect segfault


MPlayer interrupted by signal 11 in module: init_audio_codec
...</PRE>
  <P>This is because of a change to sysi86() in Solaris 10 and =
pre-Solaris=20
  Nevada b31 releases. This has been fixed in Solaris Nevada b32; =
however, Sun=20
  has yet to backport the fix to Solaris 10. The MPlayer Project has =
made Sun=20
  aware of the problem and a patch is currently in progress for Solaris =
10. More=20
  information about this bug can be found at: <A=20
  =
href=3D"http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=3D6308=
413"=20
  =
target=3D_top>http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=3D=
6308413</A>.=20
  </P>
  <LI>
  <P>Due to bugs in Solaris 8, you may not be able to play DVD discs =
larger than=20
  4 GB: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>The sd(7D) driver on Solaris 8 x86 has a bug when accessing a =
disk block=20
    &gt;4GB on a device using a logical blocksize !=3D DEV_BSIZE (i.e. =
CD-ROM and=20
    DVD media). Due to a 32Bit int overflow, a disk address modulo 4GB =
is=20
    accessed (<A=20
    href=3D"http://groups.yahoo.com/group/solarisonintel/message/22516"=20
    =
target=3D_top>http://groups.yahoo.com/group/solarisonintel/message/22516<=
/A>).=20
    This problem does not exist in the SPARC version of Solaris 8. </P>
    <LI>
    <P>A similar bug is present in the hsfs(7FS) filesystem code (AKA =
ISO9660),=20
    hsfs may not not support partitions/disks larger than 4GB, all data =
is=20
    accessed modulo 4GB (<A=20
    href=3D"http://groups.yahoo.com/group/solarisonintel/message/22592"=20
    =
target=3D_top>http://groups.yahoo.com/group/solarisonintel/message/22592<=
/A>).=20
    The hsfs problem can be fixed by installing patch 109764-04 (sparc) =
/=20
    109765-04 (x86). </P></LI></UL></DIV></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dirix></A>12.3.2.&nbsp;IRIX</H3></DIV></DIV></DIV>
<P>You can either try to install the GNU install program, and (if you =
did not=20
put it in your global path) then point to the location with: </P><PRE =
class=3Dscreen>./configure --with-install=3D<EM =
class=3Dreplaceable><CODE>/path/and/name/of/install</CODE></EM>
</PRE>
<P></P>
<P>Or you can use the default install delivered with IRIX 6.5 in which =
case you=20
will have to edit the <TT class=3Dfilename>Makefile</TT> by hand a =
little bit.=20
Change the line: </P><PRE class=3Dprogramlisting>$(INSTALL) -c -m 644 =
DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1
</PRE>
<P>to: </P><PRE class=3Dprogramlisting>$(INSTALL) -m 644 mplayer.1 =
$(MANDIR)/man1/
</PRE>
<P>and then go on with building and installing. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dhp-ux></A>12.3.3.&nbsp;HP-UX</H3></DIV></DIV></DIV>
<P>Joe Page hosts a detailed HP-UX <SPAN =
class=3Dapplication>MPlayer</SPAN> <A=20
href=3D"http://users.rcn.com/joepage/mplayer_on_hpux11.htm" =
target=3D_top>HOWTO</A>=20
by Martin Gansser on his homepage. With these instructions the build =
should work=20
out of the box. The following information is taken from this HOWTO. </P>
<P>You need GCC 3.4.0 or later, GNU make 3.80 or later and SDL 1.2.7 or =
later.=20
HP cc will not produce a working program, prior GCC versions are buggy. =
For=20
OpenGL functionality you need to install Mesa and the gl and gl2 video =
output=20
drivers should work, speed may be very bad, depending on the CPU speed, =
though.=20
A good replacement for the rather poor native HP-UX sound system is GNU =
esound.=20
</P>
<P>Create the DVD device scan the SCSI bus with: </P><PRE =
class=3Dscreen># ioscan -fn

Class          I            H/W   Path          Driver    S/W State    =
H/W Type        Description
...
ext_bus 1    8/16/5      c720  CLAIMED INTERFACE  Built-in SCSI
target  3    8/16/5.2    tgt   CLAIMED DEVICE
disk    4    8/16/5.<SPAN class=3Dbold><STRONG>2</STRONG></SPAN>.<SPAN =
class=3Dbold><STRONG>0</STRONG></SPAN>  sdisk CLAIMED DEVICE     <SPAN =
class=3Dbold><STRONG>PIONEER DVD-ROM DVD-305</STRONG></SPAN>
                         /dev/dsk/c1t2d0 <SPAN =
class=3Dbold><STRONG>/dev/rdsk/c1t2d0</STRONG></SPAN>
target  4    8/16/5.7    tgt   CLAIMED DEVICE
ctl     <SPAN class=3Dbold><STRONG>1</STRONG></SPAN>    8/16/5.7.0  sctl =
 CLAIMED DEVICE     Initiator
                         /dev/rscsi/c1t7d0 /dev/rscsi/c1t7l0 =
/dev/scsi/c1t7l0
...
</PRE>
<P>The screen output shows a Pioneer DVD-ROM at SCSI address 2. The card =

instance for hardware path 8/16 is 1. </P>
<P>Create a link from the raw device to the DVD device. </P><PRE =
class=3Dscreen>ln -s /dev/rdsk/c<EM class=3Dreplaceable><CODE>&lt;SCSI =
bus instance&gt;</CODE></EM>t<EM class=3Dreplaceable><CODE>&lt;SCSI =
target ID&gt;</CODE></EM>d<EM =
class=3Dreplaceable><CODE>&lt;LUN&gt;</CODE></EM> /dev/<EM =
class=3Dreplaceable><CODE>&lt;device&gt;</CODE></EM>
</PRE>
<P>Example: </P><PRE class=3Dscreen>ln -s /dev/rdsk/c1t2d0 =
/dev/dvd</PRE>
<P></P>
<P>Below are solutions for some common problems: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>Crash at Start with the following error message: </P><PRE =
class=3Dscreen>/usr/lib/dld.sl: Unresolved symbol: finite (code) from =
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/../../../libGL.sl</PRE>
  <P></P>
  <P>This means that the function <CODE =
class=3Dsystemitem>.finite().</CODE> is=20
  not available in the standard HP-UX math library. Instead there is =
<CODE=20
  class=3Dsystemitem>.isfinite().</CODE>. Solution: Use the latest Mesa =
depot=20
  file. </P>
  <LI>
  <P>Crash at playback with the following error message: </P><PRE =
class=3Dscreen>/usr/lib/dld.sl: Unresolved symbol: sem_init (code) from =
/usr/local/lib/libSDL-1.2.sl.0</PRE>
  <P></P>
  <P>Solution: Use the extralibdir option of configure <TT=20
  class=3Doption>--with-extralibdir=3D"/usr/lib -lrt"</TT> </P>
  <LI>
  <P>MPlayer segfaults with a message like this: </P><PRE =
class=3Dscreen>Pid 10166 received a SIGSEGV for stack growth failure.
Possible causes: insufficient memory or swap space, or stack size =
exceeded maxssiz.
Segmentation fault</PRE>
  <P></P>
  <P>Solution: The HP-UX kernel has a default stack size of 8MB(?) per=20
  process.(11.0 and newer 10.20 patches let you increase <CODE=20
  class=3Dsystemitem>maxssiz</CODE> up to 350MB for 32-bit programs). =
You need to=20
  extend <CODE class=3Dsystemitem>maxssiz</CODE> and recompile the =
kernel (and=20
  reboot). You can use SAM to do this. (While at it, check out the <CODE =

  class=3Dsystemitem>maxdsiz</CODE> parameter for the maximum amount of =
data a=20
  program can use. It depends on your applications, if the default of =
64MB is=20
  enough or not.) </P></LI></UL></DIV>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Daix></A>12.3.4.&nbsp;AIX</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> builds successfully on AIX =
5.1, 5.2,=20
and 5.3, using GCC 3.3 or greater. Building <SPAN=20
class=3Dapplication>MPlayer</SPAN> on AIX 4.3.3 and below is untested. =
It is=20
highly recommended that you build <SPAN =
class=3Dapplication>MPlayer</SPAN> using=20
GCC 3.4 or greater, or if you are building on POWER5, GCC 4.0 is =
required. </P>
<P>Ensure that you are using GNU make (<TT=20
class=3Dfilename>/opt/freeware/bin/gmake</TT>) to build <SPAN=20
class=3Dapplication>MPlayer</SPAN>, as you will encounter problems if =
you use <TT=20
class=3Dfilename>/usr/ccs/bin/make</TT>. </P>
<P>CPU detection is still a work in progress. The following =
architectures have=20
been tested: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>604e</P>
  <LI>
  <P>POWER3</P>
  <LI>
  <P>POWER4</P></LI></UL></DIV>
<P>The following architectures are untested, but should still work: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>POWER</P>
  <LI>
  <P>POWER2</P>
  <LI>
  <P>POWER5</P></LI></UL></DIV>
<P></P>
<P>Sound via the Ultimedia Services is not supported, as Ultimedia was =
dropped=20
in AIX 5.1; therefore, the only option is to use the AIX Open Sound =
System (OSS)=20
drivers from 4Front Technologies at <A =
href=3D"http://www.opensound.com/aix.html"=20
target=3D_top>http://www.opensound.com/aix.html</A>. 4Front Technologies =
freely=20
provides OSS drivers for AIX 5.1 for non-commercial use; however, there =
are=20
currently no sound output drivers for AIX 5.2 or 5.3. This means <SPAN=20
class=3Dbold><STRONG>AIX 5.2 and 5.3 are not capable of MPlayer audio =
output,=20
presently.</STRONG></SPAN> </P>
<P>Solutions to common problems:</P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>If you encounter this error message from <TT=20
  class=3Dfilename>./configure</TT>: </P><PRE class=3Dscreen>$ =
./configure
...
Checking for iconv program ... no
No working iconv program found, use
--charset=3DUS-ASCII to continue anyway.
Messages in the GTK-2 interface will be broken then.</PRE>
  <P>This is because AIX uses non-standard character set names; =
therefore,=20
  converting MPlayer output to another character set is currently not =
supported.=20
  The solution is to use: </P><PRE class=3Dscreen>$ ./configure =
--charset=3Dnoconv</PRE>
  <P></P></LI></UL></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dwindows></A>12.4.&nbsp;Windows</H2></DIV></DIV></DIV>
<P>Yes, <SPAN class=3Dapplication>MPlayer</SPAN> runs on Windows under =
<A=20
href=3D"http://www.cygwin.com/" target=3D_top><SPAN=20
class=3Dapplication>Cygwin</SPAN></A> and <A =
href=3D"http://www.mingw.org/"=20
target=3D_top><SPAN class=3Dapplication>MinGW</SPAN></A>. It does not =
have an=20
official GUI yet, but the command line version is completely functional. =
You=20
should check out the <A=20
href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-cygwin/"=20
target=3D_top>MPlayer-cygwin</A> mailing list for help and latest =
information.=20
Official Windows binaries can be found on the <A=20
href=3D"http://www.mplayerhq.hu/design7/dload.html" =
target=3D_top>download page</A>.=20
Installer packages and simple GUI frontends are available from external =
sources,=20
we have collected then in the Windows section of our <A=20
href=3D"http://www.mplayerhq.hu/design7/projects.html#windows"=20
target=3D_top>projects page</A>. </P>
<P>If you wish to avoid using the command line, a simple trick is to put =
a=20
shortcut on your desktop that contains something like the following in =
the=20
execute section: </P><PRE class=3Dscreen><EM =
class=3Dreplaceable><CODE>c:\path\to\</CODE></EM>mplayer.exe %1</PRE>
<P>This will make <SPAN class=3Dapplication>MPlayer</SPAN> play any =
movie that is=20
dropped on the shortcut. Add <TT class=3Doption>-fs</TT> for fullscreen =
mode. </P>
<P>Best results are achieved with the native DirectX video output driver =
(<TT=20
class=3Doption>-vo directx</TT>). Alternatives are OpenGL and SDL, but =
OpenGL=20
performance varies greatly between systems and SDL is known to distort =
video or=20
crash on some systems. If the image is distorted, try turning off =
hardware=20
acceleration with <TT class=3Doption>-vo directx:noaccel</TT>. Download =
<A=20
href=3D"http://www.mplayerhq.hu/MPlayer/releases/win32/contrib/dx7headers=
.tgz"=20
target=3D_top>DirectX 7 header files</A> to compile the DirectX video =
output=20
driver. Furthermore you need to have DirectX 7 or later installed for =
the=20
DirectX video output driver to work. </P>
<P><A title=3D8.15.&nbsp;VIDIX=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
vidix">VIDIX</A>=20
now works under Windows as <TT class=3Doption>-vo winvidix</TT>, =
although it is=20
still experimental and needs a bit of manual setup. Download <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/dhahe=
lper.sys"=20
target=3D_top>dhahelper.sys</A> or <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/releases/win32/dhahelperwin/withm=
trr/dhahelper.sys"=20
target=3D_top>dhahelper.sys (with MTRR support)</A> and copy it to the =
<TT=20
class=3Dfilename>vidix/dhahelperwin</TT> directory in your <SPAN=20
class=3Dapplication>MPlayer</SPAN> source tree. Open a console and =
change to that=20
directory. Then type </P><PRE class=3Dscreen>gcc -o dhasetup.exe =
dhasetup.c</PRE>
<P>and execute </P><PRE class=3Dscreen>dhasetup.exe install</PRE>
<P>as Administrator. After that you will have to reboot. When you are =
done, copy=20
the <CODE class=3Dsystemitem>.so</CODE> files from <TT=20
class=3Dfilename>vidix/drivers</TT> to the <TT =
class=3Dfilename>mplayer/vidix</TT>=20
directory relative to your <TT class=3Dfilename>mplayer.exe</TT>. </P>
<P>For best results <SPAN class=3Dapplication>MPlayer</SPAN> should use =
a=20
colorspace that your video card supports in hardware. Unfortunately many =
Windows=20
graphics drivers wrongly report some colorspaces as supported in =
hardware. To=20
find out which, try </P><PRE class=3Dscreen>mplayer -benchmark -nosound =
-frames 100 -vf format=3D<EM =
class=3Dreplaceable><CODE>colorspace</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie</CODE></EM>
</PRE>
<P>where <EM class=3Dreplaceable><CODE>colorspace</CODE></EM> can be any =

colorspace printed by the <TT class=3Doption>-vf =
format=3Dfmt=3Dhelp</TT> option. If=20
you find a colorspace your card handles particularly bad <TT =
class=3Doption>-vf=20
noformat=3D<EM class=3Dreplaceable><CODE>colorspace</CODE></EM></TT> =
will keep it=20
from being used. Add this to your config file to permanently keep it =
from being=20
used. </P>
<P>There are special codec packages for Windows available on our <A=20
href=3D"http://www.mplayerhq.hu/design7/dload.html" =
target=3D_top>download page</A>=20
to allow playing formats for which there is no native support yet. Put =
the=20
codecs somewhere in your path or pass <TT =
class=3Doption>--codecsdir=3D<EM=20
class=3Dreplaceable><CODE>c:/path/to/your/codecs</CODE></EM></TT> =
(alternatively=20
<TT class=3Doption>--codecsdir=3D<EM=20
class=3Dreplaceable><CODE>/path/to/your/codecs</CODE></EM></TT> only on =
<SPAN=20
class=3Dapplication>Cygwin</SPAN>) to <TT =
class=3Dfilename>configure</TT>. We have=20
had some reports that Real DLLs need to be writable by the user running =
<SPAN=20
class=3Dapplication>MPlayer</SPAN>, but only on some systems (NT4). Try =
making=20
them writable if you have problems. </P>
<P>You can play VCDs by playing the <TT class=3Dfilename>.DAT</TT> or =
<TT=20
class=3Dfilename>.MPG</TT> files that Windows exposes on VCDs. It works =
like this=20
(adjust for the drive letter of your CD-ROM): </P><PRE =
class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>d:/mpegav/avseq01.dat</CODE></EM></PRE>
<P>DVDs also work, adjust <TT class=3Doption>-dvd-device</TT> for the =
drive letter=20
of your DVD-ROM: </P><PRE class=3Dscreen>mplayer dvd://<EM =
class=3Dreplaceable><CODE>&lt;title&gt;</CODE></EM> -dvd-device <EM =
class=3Dreplaceable><CODE>d</CODE></EM>:
</PRE>
<P>The <SPAN class=3Dapplication>Cygwin</SPAN>/<SPAN=20
class=3Dapplication>MinGW</SPAN> console is rather slow. Redirecting =
output or=20
using the <TT class=3Doption>-quiet</TT> option has been reported to =
improve=20
performance on some systems. Direct rendering (<TT =
class=3Doption>-dr</TT>) may=20
also help. If playback is jerky, try <TT class=3Doption>-autosync =
100</TT>. If=20
some of these options help you, you may want to put them in your config =
file.=20
</P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>On Windows the runtime CPU detection disables SSE support because of=20
recurring and hard-to-trace SSE-related crashes. If you wish to have SSE =
support=20
under Windows, you will have to compile without runtime CPU-detection. =
</P>
<P>If you have a Pentium 4 and are experiencing a crash using the =
RealPlayer=20
codecs, you may need to disable hyperthreading support. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dcygwin></A>12.4.1.&nbsp;<SPAN=20
class=3Dapplication>Cygwin</SPAN></H3></DIV></DIV></DIV>
<P>You need to run <SPAN class=3Dapplication>Cygwin</SPAN> 1.5.0 or =
later in order=20
to compile <SPAN class=3Dapplication>MPlayer</SPAN>. </P>
<P>DirectX header files need to be extracted to <TT=20
class=3Dfilename>/usr/include/</TT> or <TT=20
class=3Dfilename>/usr/local/include/</TT>. </P>
<P>Instructions and files for making SDL run under <SPAN=20
class=3Dapplication>Cygwin</SPAN> can be found on the <A=20
href=3D"http://www.libsdl.org/extras/win32/cygwin/" target=3D_top>libsdl =
site</A>.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dmingw></A>12.4.2.&nbsp;<SPAN=20
class=3Dapplication>MinGW</SPAN></H3></DIV></DIV></DIV>
<P>Installing a version of <SPAN class=3Dapplication>MinGW</SPAN> that =
could=20
compile <SPAN class=3Dapplication>MPlayer</SPAN> used to be quite =
tricky, but it=20
works out of the box now. Just install <SPAN =
class=3Dapplication>MinGW</SPAN>=20
3.1.0 or later and MSYS 1.0.9 or later and tell the MSYS postinstall =
that <SPAN=20
class=3Dapplication>MinGW</SPAN> is installed. </P>
<P>Extract DirectX header files to <TT =
class=3Dfilename>/mingw/include/</TT>. </P>
<P>MOV compressed header support requires <A =
href=3D"http://www.gzip.org/zlib/"=20
target=3D_top>zlib</A>, which <SPAN class=3Dapplication>MinGW</SPAN> =
does not=20
provide by default. Configure it with <TT =
class=3Doption>--prefix=3D/mingw</TT> and=20
install it before compiling <SPAN class=3Dapplication>MPlayer</SPAN>. =
</P>
<P>Complete instructions for building <SPAN =
class=3Dapplication>MPlayer</SPAN> and=20
necessary libraries can be found in the <A=20
href=3D"http://mplayerhq.hu/MPlayer/releases/win32/contrib/MPlayer-MinGW-=
Howto.txt"=20
target=3D_top>MPlayer MinGW HOWTO</A>. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dmacos></A>12.5.&nbsp;Mac=20
OS</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> does not work on Mac OS =
versions=20
before 10, but should compile out-of-the-box on Mac OS X 10.2 and up. =
The=20
preferred compiler is the Apple version of GCC 3.x or later. You can get =
the=20
basic compilation environment by installing Apple's <A=20
href=3D"http://developer.apple.com/tools/download/" =
target=3D_top>Xcode</A>. If you=20
have Mac OS X 10.3.9 or later and QuickTime 7 you can use the <TT=20
class=3Doption>macosx</TT> video output driver. </P>
<P>Unfortunately, this basic environment will not allow you to take =
advantage of=20
all the nice features of <SPAN class=3Dapplication>MPlayer</SPAN>. For =
instance,=20
in order to have OSD support compiled in, you will need to have <CODE=20
class=3Dsystemitem>fontconfig</CODE> and <CODE =
class=3Dsystemitem>freetype</CODE>=20
libraries installed on your machine. Contrary to other Unixes such as =
most Linux=20
and BSD variants, OS X does not have a package system that comes with =
the=20
system. </P>
<P>There are at least two to choose from: <A =
href=3D"http://fink.sourceforge.net/"=20
target=3D_top>Fink</A> and <A href=3D"http://www.macports.org/"=20
target=3D_top>MacPorts</A>. Both of them provide about the same service =
(i.e. a=20
lot of packages to choose from, dependency resolution, the ability to =
simply=20
add/update/remove packages, etc...). Fink offers both precompiled binary =

packages or building everything from source, whereas MacPorts only =
offers=20
building from source. The author of this guide chose MacPorts for the =
simple=20
fact that its basic setup was more lightweight. Later examples will be =
based on=20
MacPorts. </P>
<P>For instance, to compile <SPAN class=3Dapplication>MPlayer</SPAN> =
with OSD=20
support: </P><PRE class=3Dscreen>sudo port install pkgconfig</PRE>
<P>This will install <SPAN class=3Dapplication>pkg-config</SPAN>, which =
is a=20
system for managing library compile/link flags. <SPAN=20
class=3Dapplication>MPlayer</SPAN>'s <CODE =
class=3Dsystemitem>configure</CODE>=20
script uses it to properly detect libraries. Then you can install <SPAN=20
class=3Dapplication>fontconfig</SPAN> in a similar way: </P><PRE =
class=3Dscreen>sudo port install fontconfig</PRE>
<P>Then you can proceed with launching <SPAN =
class=3Dapplication>MPlayer</SPAN>'s=20
<CODE class=3Dsystemitem>configure</CODE> script (note the <CODE=20
class=3Dsystemitem>PKG_CONFIG_PATH</CODE> and <CODE =
class=3Dsystemitem>PATH</CODE>=20
environment variables so that <CODE class=3Dsystemitem>configure</CODE> =
finds the=20
libraries installed with MacPorts): </P><PRE =
class=3Dscreen>PKG_CONFIG_PATH=3D/opt/local/lib/pkgconfig/ =
PATH=3D$PATH:/opt/local/bin/ ./configure
</PRE>
<P></P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dosx_gui></A>12.5.1.&nbsp;MPlayer OS X=20
GUI</H3></DIV></DIV></DIV>
<P>You can get a native GUI for <SPAN class=3Dapplication>MPlayer</SPAN> =
together=20
with precompiled <SPAN class=3Dapplication>MPlayer</SPAN> binaries for =
Mac OS X=20
from the <A href=3D"http://mplayerosx.sf.net/" =
target=3D_top>MPlayerOSX</A> project,=20
but be warned: that project is not active anymore. </P>
<P>Fortunately, <SPAN class=3Dapplication>MPlayerOSX</SPAN> has been =
taken over by=20
a member of the <SPAN class=3Dapplication>MPlayer</SPAN> team. Preview =
releases=20
are available from our <A href=3D"http://mplayerhq.hu/dload.html"=20
target=3D_top>download page</A> and an official release should arrive =
soon. </P>
<P>In order to build <SPAN class=3Dapplication>MPlayerOSX</SPAN> from =
source=20
yourself, you need the <CODE class=3Dsystemitem>mplayerosx</CODE>, the =
<CODE=20
class=3Dsystemitem>main</CODE> and a copy of the <CODE=20
class=3Dsystemitem>main</CODE> SVN module named <CODE=20
class=3Dsystemitem>main_noaltivec</CODE>. <CODE =
class=3Dsystemitem>mplayerosx</CODE>=20
is the GUI frontend, <CODE class=3Dsystemitem>main</CODE> is MPlayer and =
<CODE=20
class=3Dsystemitem>main_noaltivec</CODE> is MPlayer built without =
AltiVec support.=20
</P>
<P>To check out SVN modules use: </P><PRE class=3Dscreen>svn checkout =
svn://svn.mplayerhq.hu/mplayerosx/trunk/ mplayerosx
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk/ main
</PRE>
<P></P>
<P>In order to build <SPAN class=3Dapplication>MPlayerOSX</SPAN> you =
will need to=20
set up something like this: </P><PRE =
class=3Dscreen>MPlayer_source_directory
   |
   |---&gt;main           (MPlayer Subversion source)
   |
   |---&gt;main_noaltivec (MPlayer Subversion source configured with =
--disable-altivec)
   |
   \---&gt;mplayerosx     (MPlayer OS X Subversion source)
</PRE>
<P>You first need to build main and main_noaltivec. </P>
<P>To begin with, in order to ensure maximum backwards compatibility, =
set an=20
environment variable: </P><PRE class=3Dscreen>export =
MACOSX_DEPLOYMENT_TARGET=3D10.3</PRE>
<P></P>
<P>Then, configure: </P>
<P>If you configure for a G4 or later CPU with AltiVec support, do as =
follows:=20
</P><PRE class=3Dscreen>./configure --disable-gl --disable-x11
</PRE>
<P>If you configure for a G3-powered machine without AltiVec, use: =
</P><PRE class=3Dscreen>./configure --disable-gl --disable-x11 =
--disable-altivec
</PRE>
<P>You may need to edit <TT class=3Dfilename>config.mak</TT> and change =
<CODE=20
class=3Dsystemitem>-mcpu</CODE> and <CODE =
class=3Dsystemitem>-mtune</CODE> from=20
<CODE class=3Dsystemitem>74XX</CODE> to <CODE =
class=3Dsystemitem>G3</CODE>. </P>
<P>Continue with </P><PRE class=3Dscreen>make</PRE>
<P>then go to the mplayerosx directory and type </P><PRE =
class=3Dscreen>make dist</PRE>
<P>This will create a compressed <CODE class=3Dsystemitem>.dmg</CODE> =
archive with=20
the ready to use binary. </P>
<P>You can also use the <SPAN class=3Dapplication>Xcode</SPAN> 2.1 =
project; the=20
old project for <SPAN class=3Dapplication>Xcode</SPAN> 1.x does not work =
anymore.=20
</P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dexotic_platforms></A>12.6.&nbsp;Exotic =
Platforms</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MPlayer</SPAN> runs on a number of exotic =
platforms,=20
but most of the platform-specific changes from those systems have not =
been=20
merged back into the main source tree. For build instructions you should =
refer=20
to the system-specific documentation. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dqnx></A>12.6.1.&nbsp;QNX</H3></DIV></DIV></DIV>
<P>You'll need to download and install SDL for QNX. Then run <SPAN=20
class=3Dapplication>MPlayer</SPAN> with <TT class=3Doption>-vo=20
sdl:driver=3Dphoton</TT> and <TT class=3Doption>-ao sdl:nto</TT> =
options, it should=20
be fast. </P>
<P>The <TT class=3Doption>-vo x11</TT> output will be even slower than =
on Linux,=20
since QNX has only X <SPAN class=3Demphasis><EM>emulation</EM></SPAN> =
which is=20
very slow. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Damiga></A>12.6.2.&nbsp;Amiga/MorphOS=20
(GeekGadgets)</H3></DIV></DIV></DIV>
<P>The people over at <A href=3D"http://www.amigasoft.net/"=20
target=3D_top>http://www.amigasoft.net/</A> make current <SPAN=20
class=3Dapplication>MPlayer</SPAN> and <SPAN =
class=3Dapplication>MEncoder</SPAN>=20
packages. </P>
<P>Nicholas Det at Genesi has done a big and powerful port of <SPAN=20
class=3Dapplication>MPlayer </SPAN>for MorphOS. Sadly it's based on the =
0.90=20
series. </P>
<P>Get if from <A href=3D"http://www.morphzone.org/" =
target=3D_top>MorphZone</A>:=20
</P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><A=20
  =
href=3D"http://www.morphzone.org/modules/mydownloads/singlefile.php?lid=3D=
90"=20
  target=3D_top><SPAN class=3Dapplication>MPlayer</SPAN> 0.91 binary</A> =
</P>
  <LI>
  <P><A=20
  =
href=3D"http://www.morphzone.org/modules/mydownloads/singlefile.php?lid=3D=
91"=20
  target=3D_top><SPAN class=3Dapplication>MPlayer</SPAN> 0.91 source</A> =
</P>
  <LI>
  <P><A=20
  =
href=3D"http://www.morphzone.org/modules/mydownloads/singlefile.php?lid=3D=
92"=20
  target=3D_top><SPAN class=3Dapplication>MEncoder</SPAN> 1.0pre3 =
binary</A>=20
  </P></LI></UL></DIV>
<P></P></DIV></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Dmencoder></A>Chapter&nbsp;13.&nbsp;Basic =
usage of <SPAN=20
class=3Dapplication>MEncoder</SPAN></H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-selecting-codec">13.1.=20
  Selecting codecs and container formats</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-selecting-input">13.2.=20
  Selecting input file or device</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-mpeg4">13.3.=20
  Encoding two pass MPEG-4 ("DivX")</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-handheld-psp">13.4.=20
  Encoding to Sony PSP video format</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-mpeg">13.5.=20
  Encoding to MPEG format</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-rescale">13.6.=20
  Rescaling movies</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-streamcopy">13.7.=20
  Stream copying</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-images">13.8.=20
  Encoding from multiple input image files (JPEG, PNG, TGA, =
etc.)</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-extractsub">13.9.=20
  Extracting DVD subtitles to VOBsub file</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aspect">13.10.=20
  Preserving aspect ratio</A></SPAN></DT></DL></DIV>
<P>For the complete list of available <SPAN =
class=3Dapplication>MEncoder</SPAN>=20
options and examples, please see the man page. For a series of hands-on =
examples=20
and detailed guides on using several encoding parameters, read the <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/encoding-tips.txt"=20
target=3D_top>encoding-tips</A> that were collected from several mailing =
list=20
threads on MPlayer-users. Search the archives <A=20
href=3D"http://lists.mplayerhq.hu/pipermail/mencoder-users/" =
target=3D_top>here</A>=20
and especially for older things also <A=20
href=3D"http://lists.mplayerhq.hu/pipermail/mplayer-users/" =
target=3D_top>here</A>=20
for a wealth of discussions about all aspects of and problems related to =

encoding with <SPAN class=3Dapplication>MEncoder</SPAN>. </P>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-selecting-codec></A>13.1.&nbsp;Selecting codecs and =
container=20
formats</H2></DIV></DIV></DIV>
<P>Audio and video codecs for encoding are selected with the <TT=20
class=3Doption>-oac</TT> and <TT class=3Doption>-ovc</TT> options, =
respectively.=20
Type for instance: </P><PRE class=3Dscreen>mencoder -ovc help</PRE>
<P>to list all video codecs supported by the version of <SPAN=20
class=3Dapplication>MEncoder</SPAN> on your machine. The following =
choices are=20
available: </P>
<P>Audio Codecs: </P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Audio codec name</TH>
    <TH>Description</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>mp3lame</TD>
    <TD>encode to VBR, ABR or CBR MP3 with LAME</TD></TR>
  <TR>
    <TD>lavc</TD>
    <TD>use one of <A title=3D"14.3.2.&nbsp;libavcodec's audio codecs"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec-audio-codecs"><CODE=20
      class=3Dsystemitem>libavcodec</CODE>'s audio codecs</A></TD></TR>
  <TR>
    <TD>faac</TD>
    <TD>FAAC AAC audio encoder</TD></TR>
  <TR>
    <TD>toolame</TD>
    <TD>MPEG Audio Layer 2 encoder</TD></TR>
  <TR>
    <TD>twolame</TD>
    <TD>MPEG Audio Layer 2 encoder based on tooLAME</TD></TR>
  <TR>
    <TD>pcm</TD>
    <TD>uncompressed PCM audio</TD></TR>
  <TR>
    <TD>copy</TD>
    <TD>do not reencode, just copy compressed =
frames</TD></TR></TBODY></TABLE></DIV>
<P></P>
<P>Video codecs: </P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Video codec name</TH>
    <TH>Description</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>lavc</TD>
    <TD>use one of <A title=3D"14.3.1.&nbsp;libavcodec's video codecs"=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec-video-codecs"><CODE=20
      class=3Dsystemitem>libavcodec</CODE>'s video codecs</A></TD></TR>
  <TR>
    <TD>xvid</TD>
    <TD>Xvid, MPEG-4 Advanced Simple Profile (ASP) codec</TD></TR>
  <TR>
    <TD>x264</TD>
    <TD>x264, MPEG-4 Advanced Video Coding (AVC), AKA H.264 =
codec</TD></TR>
  <TR>
    <TD>nuv</TD>
    <TD>nuppel video, used by some realtime applications</TD></TR>
  <TR>
    <TD>raw</TD>
    <TD>uncompressed video frames</TD></TR>
  <TR>
    <TD>copy</TD>
    <TD>do not reencode, just copy compressed frames</TD></TR>
  <TR>
    <TD>frameno</TD>
    <TD>used for 3-pass encoding (not =
recommended)</TD></TR></TBODY></TABLE></DIV>
<P></P>
<P>Output container formats are selected with the <TT =
class=3Doption>-of</TT>=20
option. Type: </P><PRE class=3Dscreen>mencoder -of help</PRE>
<P>to list all containers supported by the version of <SPAN=20
class=3Dapplication>MEncoder</SPAN> on your machine. The following =
choices are=20
available: </P>
<P>Container formats: </P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Container format name</TH>
    <TH>Description</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>lavf</TD>
    <TD>one of the containers supported by <CODE=20
      class=3Dsystemitem>libavformat</CODE></TD></TR>
  <TR>
    <TD>avi</TD>
    <TD>Audio-Video Interleaved</TD></TR>
  <TR>
    <TD>mpeg</TD>
    <TD>MPEG-1 and MPEG-2 PS</TD></TR>
  <TR>
    <TD>rawvideo</TD>
    <TD>raw video stream (no muxing - one video stream only)</TD></TR>
  <TR>
    <TD>rawaudio</TD>
    <TD>raw audio stream (no muxing - one audio stream=20
only)</TD></TR></TBODY></TABLE></DIV>
<P>The AVI container is the native container format for <SPAN=20
class=3Dapplication>MEncoder</SPAN>, which means that it's the one that =
is best=20
handled, and the one for which <SPAN class=3Dapplication>MEncoder</SPAN> =
was=20
designed. As noted above, other container formats are usable, but you =
may=20
experience problems when using them. </P>
<P><CODE class=3Dsystemitem>libavformat</CODE> containers: </P>
<P>If you selected <CODE class=3Dsystemitem>libavformat</CODE> to do the =
muxing of=20
the output file (by using the <TT class=3Doption>-of lavf</TT>), the =
appropriate=20
container format will be determined by the file extension of the output =
file.=20
You may force a particular container format with <CODE=20
class=3Dsystemitem>libavformat</CODE>'s <TT class=3Doption>format</TT> =
option. </P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH><CODE class=3Dsystemitem>libavformat</CODE> container name</TH>
    <TH>Description</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>mpg</TD>
    <TD>MPEG-1 and MPEG-2 PS</TD></TR>
  <TR>
    <TD>asf</TD>
    <TD>Advanced Streaming Format</TD></TR>
  <TR>
    <TD>avi</TD>
    <TD>Audio-Video Interleaved</TD></TR>
  <TR>
    <TD>wav</TD>
    <TD>Waveform Audio</TD></TR>
  <TR>
    <TD>swf</TD>
    <TD>Macromedia Flash</TD></TR>
  <TR>
    <TD>flv</TD>
    <TD>Macromedia Flash video</TD></TR>
  <TR>
    <TD>rm</TD>
    <TD>RealMedia</TD></TR>
  <TR>
    <TD>au</TD>
    <TD>SUN AU</TD></TR>
  <TR>
    <TD>nut</TD>
    <TD>NUT open container (experimental and not yet =
spec-compliant)</TD></TR>
  <TR>
    <TD>mov</TD>
    <TD>QuickTime</TD></TR>
  <TR>
    <TD>mp4</TD>
    <TD>MPEG-4 format</TD></TR>
  <TR>
    <TD>dv</TD>
    <TD>Sony Digital Video container</TD></TR></TBODY></TABLE></DIV>
<P>As you can see, <CODE class=3Dsystemitem>libavformat</CODE> allows =
<SPAN=20
class=3Dapplication>MEncoder</SPAN> to mux into a considerable variety =
of=20
containers. Unfortunately, as <SPAN class=3Dapplication>MEncoder</SPAN> =
was not=20
designed from the beginning to support container formats other than AVI, =
your=20
should really be paranoid about the resulting file. Please check to be =
sure that=20
the audio/video synchronization is OK and that the file can be played =
correctly=20
by players other than <SPAN class=3Dapplication>MPlayer</SPAN>. </P>
<DIV class=3Dexample><A name=3Dencode_to_macromedia_flash_format></A>
<P class=3Dtitle><B>Example&nbsp;13.1.&nbsp;encode to Macromedia Flash=20
format</B></P>
<DIV class=3Dexample-contents>
<P>Creating a Macromedia Flash video suitable for playback in a web =
browser with=20
the Macromedia Flash plugin: </P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.avi</CODE></EM> -o <EM =
class=3Dreplaceable><CODE>output.flv</CODE></EM> -of lavf \
    -oac mp3lame -lameopts abr:br=3D56 -srate 22050 -ovc lavc \
    -lavcopts =
vcodec=3Dflv:vbitrate=3D500:mbd=3D2:mv0:trell:v4mv:cbp:last_pred=3D3
</PRE>
<P></P></DIV></DIV><BR class=3Dexample-break></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-selecting-input></A>13.2.&nbsp;Selecting input file or=20
device</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN> can encode from files or =
directly=20
from a DVD or VCD disc. Simply include the filename on the command line =
to=20
encode from a file, or <TT class=3Doption>dvd://</TT><EM=20
class=3Dreplaceable><CODE>titlenumber</CODE></EM> or <TT=20
class=3Doption>vcd://</TT><EM =
class=3Dreplaceable><CODE>tracknumber</CODE></EM> to=20
encode from a DVD title or VCD track. If you have already copied a DVD =
to your=20
hard drive (you can use a tool such as <SPAN =
class=3Dapplication>dvdbackup</SPAN>,=20
available on most systems), and wish to encode from the copy, you should =
still=20
use the <TT class=3Doption>dvd://</TT> syntax, along with <TT=20
class=3Doption>-dvd-device</TT> followed by the path to the copied DVD =
root. The=20
<TT class=3Doption>-dvd-device</TT> and <TT =
class=3Doption>-cdrom-device</TT>=20
options can also be used to override the paths to the device nodes for =
reading=20
directly from disc, if the defaults of <TT =
class=3Dfilename>/dev/dvd</TT> and <TT=20
class=3Dfilename>/dev/cdrom</TT> do not work on your system. </P>
<P>When encoding from DVD, it is often desirable to select a chapter or =
range of=20
chapters to encode. You can use the <TT class=3Doption>-chapter</TT> =
option for=20
this purpose. For example, <TT class=3Doption>-chapter</TT> <EM=20
class=3Dreplaceable><CODE>1-4</CODE></EM> will only encode chapters 1 =
through 4=20
from the DVD. This is especially useful if you will be making a 1400 MB =
encode=20
targetted for two CDs, since you can ensure the split occurs exactly at =
a=20
chapter boundary rather than in the middle of a scene. </P>
<P>If you have a supported TV capture card, you can also encode from the =
TV-in=20
device. Use <TT class=3Doption>tv://</TT><EM=20
class=3Dreplaceable><CODE>channelnumber</CODE></EM> as the filename, and =
<TT=20
class=3Doption>-tv</TT> to configure various capture settings. DVB input =
works=20
similarly. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-mpeg4></A>13.3.&nbsp;Encoding two pass MPEG-4=20
("DivX")</H2></DIV></DIV></DIV>
<P>The name comes from the fact that this method encodes the file <SPAN=20
class=3Demphasis><EM>twice</EM></SPAN>. The first encoding (dubbed pass) =
creates=20
some temporary files (<TT class=3Dfilename>*.log</TT>) with a size of =
few=20
megabytes, do not delete them yet (you can delete the AVI or rather just =
not=20
create any video by redirecting it into <TT =
class=3Dfilename>/dev/null</TT>). In=20
the second pass, the two pass output file is created, using the bitrate =
data=20
from the temporary files. The resulting file will have much better image =

quality. If this is the first time you heard about this, you should =
consult some=20
guides available on the net. </P>
<DIV class=3Dexample><A name=3Dcopy_audio_track></A>
<P class=3Dtitle><B>Example&nbsp;13.2.&nbsp;copy audio track</B></P>
<DIV class=3Dexample-contents>
<P>Two pass encode of the second track a DVD to an MPEG-4 ("DivX") AVI =
while=20
copying the audio track. </P><PRE class=3Dscreen>mencoder dvd://2 -ovc =
lavc -lavcopts vcodec=3Dmpeg4:vpass=3D1 -oac copy -o /dev/null
mencoder dvd://2 -ovc lavc -lavcopts =
vcodec=3Dmpeg4:mbd=3D2:trell:vpass=3D2 \
    -oac copy -o <EM class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV></DIV><BR class=3Dexample-break>
<DIV class=3Dexample><A name=3Dencode_audio_track></A>
<P class=3Dtitle><B>Example&nbsp;13.3.&nbsp;encode audio track</B></P>
<DIV class=3Dexample-contents>
<P>Two pass encode of a DVD to an MPEG-4 ("DivX") AVI while encoding the =
audio=20
track to MP3. Be careful using this method as it may lead to audio/video =
desync=20
in some cases. </P><PRE class=3Dscreen>mencoder dvd://2 -ovc lavc =
-lavcopts vcodec=3Dmpeg4:vpass=3D1 \
    -oac mp3lame -lameopts vbr=3D3 -o /dev/null
mencoder dvd://2 -ovc lavc -lavcopts =
vcodec=3Dmpeg4:mbd=3D2:trell:vpass=3D2 \
    -oac mp3lame -lameopts vbr=3D3 -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV></DIV><BR class=3Dexample-break></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-handheld-psp></A>13.4.&nbsp;Encoding to Sony PSP video=20
format</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN> supports encoding to Sony =
PSP's video=20
format, but, depending on the revision of the PSP software, the =
constraints may=20
differ. You should be safe if you respect the following constraints: =
</P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Bitrate</STRONG></SPAN>: it should not =
exceed=20
  1500kbps, however, past versions supported pretty much any bitrate as =
long as=20
  the header claimed it was not too high. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Dimensions</STRONG></SPAN>: the width =
and height=20
  of the PSP video should be multiples of 16, and the product width * =
height=20
  must be &lt;=3D 64000. Under some circumstances, it may be possible =
for the PSP=20
  to play higher resolutions. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Audio</STRONG></SPAN>: its samplerate =
should be=20
  24kHz for MPEG-4 videos, and 48kHz for H.264. </P></LI></UL></DIV>
<P></P>
<DIV class=3Dexample><A name=3Dencode_for_psp></A>
<P class=3Dtitle><B>Example&nbsp;13.4.&nbsp;encode for PSP</B></P>
<DIV class=3Dexample-contents>
<P></P><PRE class=3Dscreen>mencoder -ofps 30000/1001 -af =
lavcresample=3D24000 -vf harddup -of lavf \
    -oac lavc -ovc lavc -lavcopts =
aglobal=3D1:vglobal=3D1:vcodec=3Dmpeg4:acodec=3Daac \
    -lavfopts format=3Dpsp \
    <EM class=3Dreplaceable><CODE>input.video</CODE></EM> -o <EM =
class=3Dreplaceable><CODE>output.psp</CODE></EM>
</PRE>
<P>Note that you can set the title of the video with <TT =
class=3Doption>-info=20
name=3D<EM class=3Dreplaceable><CODE>MovieTitle</CODE></EM></TT>.=20
</P></DIV></DIV><BR class=3Dexample-break></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-mpeg></A>13.5.&nbsp;Encoding to MPEG=20
format</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN> can create MPEG (MPEG-PS) =
format=20
output files. Usually, when you are using MPEG-1 or MPEG-2 video, it is =
because=20
you are encoding for a constrained format such as SVCD, VCD, or DVD. The =

specific requirements for these formats are explained in the <A=20
title=3D"14.8.&nbsp;Using MEncoder to create VCD/SVCD/DVD-compliant =
files"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd">VCD=20
and DVD creation guide</A> section. </P>
<P>To change <SPAN class=3Dapplication>MEncoder</SPAN>'s output file =
format, use=20
the <TT class=3Doption>-of mpeg</TT> option. </P>
<DIV class=3Dinformalexample>
<P>Example: </P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.avi</CODE></EM> -of mpeg -ovc lavc =
-lavcopts vcodec=3Dmpeg1video \
    -oac copy <EM class=3Dreplaceable><CODE>other_options</CODE></EM> -o =
<EM class=3Dreplaceable><CODE>output.mpg</CODE></EM>
</PRE>
<P>Creating an MPEG-1 file suitable to be played on systems with minimal =

multimedia support, such as default Windows installs: </P><PRE =
class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.avi</CODE></EM> -of mpeg -mpegopts =
format=3Dmpeg1:tsaf:muxrate=3D2000 \
    -o <EM class=3Dreplaceable><CODE>output.mpg</CODE></EM> -oac lavc =
-lavcoptc acodec=3Dmp2:abitrate=3D224 -ovc lavc \
    -lavcopts =
vcodec=3Dmpeg1video:vbitrate=3D1152:keyint=3D15:mbd=3D2:aspect=3D4/3
</PRE>
<P>Same, but using <CODE class=3Dsystemitem>libavformat</CODE> MPEG =
muxer: </P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.avi</CODE></EM> -o <EM =
class=3Dreplaceable><CODE>VCD.mpg</CODE></EM> -ofps 25 -vf =
scale=3D352:288,harddup -of lavf \
    -lavfopts format=3Dmpg -oac lavc -lavcopts =
acodec=3Dmp2:abitrate=3D224 -ovc lavc \
    -lavcopts =
vcodec=3Dmpeg1video:vrc_buf_size=3D327:keyint=3D15:vrc_maxrate=3D1152:vbi=
trate=3D1152:vmax_b_frames=3D0
</PRE>
<P></P></DIV>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Hint:</H3>
<P>If for some reason the video quality of the second pass did not =
satisfy you,=20
you may re-run your video encode with a different target bitrate, =
provided that=20
you saved the statistics file of the previous pass. This is possible =
because the=20
statistics file's primary goal is to record the complexity of each =
frame, which=20
doesn't depend heavily on bitrate. You should note, though, that you'll =
get the=20
best results if all passes are run with target bitrates that do not =
differ very=20
much. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-rescale></A>13.6.&nbsp;Rescaling =
movies</H2></DIV></DIV></DIV>
<P>Often the need to resize movie images' size emerges. Its reasons can =
be many:=20
decreasing file size, network bandwidth, etc. Most people even do =
rescaling when=20
converting DVDs or SVCDs to DivX AVI. If you wish to rescale, read the =
<A=20
title=3D"13.10.&nbsp;Preserving aspect ratio"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
aspect">Preserving=20
aspect ratio</A> section. </P>
<P>The scaling process is handled by the <CODE =
class=3Dliteral>scale</CODE> video=20
filter: <TT class=3Doption>-vf scale=3D<EM=20
class=3Dreplaceable><CODE>width</CODE></EM>:<EM=20
class=3Dreplaceable><CODE>height</CODE></EM></TT>. Its quality can be =
set with the=20
<TT class=3Doption>-sws</TT> option. If it is not specified, <SPAN=20
class=3Dapplication>MEncoder</SPAN> will use 2: bicubic. </P>
<P>Usage: </P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.mpg</CODE></EM> -ovc lavc -lavcopts =
vcodec=3Dmpeg4:mbd=3D2:trell \
    -vf scale=3D640:480 -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-streamcopy></A>13.7.&nbsp;Stream =
copying</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN> can handle input streams in =
two ways:=20
<SPAN class=3Dbold><STRONG>encode</STRONG></SPAN> or <SPAN=20
class=3Dbold><STRONG>copy</STRONG></SPAN> them. This section is about =
<SPAN=20
class=3Dbold><STRONG>copying</STRONG></SPAN>. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Video stream</STRONG></SPAN> (option <TT =

  class=3Doption>-ovc copy</TT>): nice stuff can be done :) Like, =
putting (not=20
  converting!) FLI or VIVO or MPEG-1 video into an AVI file! Of course =
only=20
  <SPAN class=3Dapplication>MPlayer</SPAN> can play such files :) And it =
probably=20
  has no real life value at all. Rationally: video stream copying can be =
useful=20
  for example when only the audio stream has to be encoded (like, =
uncompressed=20
  PCM to MP3). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Audio stream</STRONG></SPAN> (option <TT =

  class=3Doption>-oac copy</TT>): straightforward. It is possible to =
take an=20
  external audio file (MP3, WAV) and mux it into the output stream. Use =
the <TT=20
  class=3Doption>-audiofile <EM =
class=3Dreplaceable><CODE>filename</CODE></EM></TT>=20
  option for this. </P></LI></UL></DIV>
<P>Using <TT class=3Doption>-oac copy</TT> to copy from one container =
format to=20
another may require the use of <TT class=3Doption>-fafmttag</TT> to keep =
the audio=20
format tag of the original file. For example, if you are converting an =
NSV file=20
with AAC audio to an AVI container, the audio format tag will be =
incorrect and=20
it will have to be changed. For a list of audio format tags, check <TT=20
class=3Dfilename>codecs.conf</TT>. </P>
<P>Example: </P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.nsv</CODE></EM> -oac copy -fafmttag =
0x706D \
    -ovc lavc -lavcopts vcodec=3Dmpeg4:mbd=3D2:trell -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-enc-images></A>13.8.&nbsp;Encoding from multiple input =
image=20
files (JPEG, PNG, TGA, etc.)</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN> is capable of creating =
movies from=20
one or more JPEG, PNG, TGA, or other image files. With simple framecopy =
it can=20
create MJPEG (Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) =
files. </P>
<DIV class=3Dorderedlist>
<P class=3Dtitle><B>Explanation of the process:</B></P>
<OL type=3D1>
  <LI>
  <P><SPAN class=3Dapplication>MEncoder</SPAN> <SPAN=20
  class=3Demphasis><EM>decodes</EM></SPAN> the input image(s) with <CODE =

  class=3Dsystemitem>libjpeg</CODE> (when decoding PNGs, it will use =
<CODE=20
  class=3Dsystemitem>libpng</CODE>). </P>
  <LI>
  <P><SPAN class=3Dapplication>MEncoder</SPAN> then feeds the decoded =
image to the=20
  chosen video compressor (DivX4, Xvid, FFmpeg msmpeg4, etc.).=20
</P></LI></OL></DIV>
<P><B>Examples.&nbsp;</B> The explanation of the <TT =
class=3Doption>-mf</TT>=20
option is in the man page. </P>
<DIV class=3Dinformalexample>
<P>Creating an MPEG-4 file from all the JPEG files in the current =
directory:=20
</P><PRE class=3Dscreen>mencoder mf://*.jpg -mf =
w=3D800:h=3D600:fps=3D25:type=3Djpg -ovc lavc \
    -lavcopts vcodec=3Dmpeg4:mbd=3D2:trell -oac copy -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV>
<P></P>
<DIV class=3Dinformalexample>
<P>Creating an MPEG-4 file from some JPEG files in the current =
directory: </P><PRE class=3Dscreen>mencoder mf://<EM =
class=3Dreplaceable><CODE>frame001.jpg,frame002.jpg</CODE></EM> -mf =
w=3D800:h=3D600:fps=3D25:type=3Djpg \
    -ovc lavc -lavcopts vcodec=3Dmpeg4:mbd=3D2:trell -oac copy -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV>
<P></P>
<DIV class=3Dinformalexample>
<P>Creating an MPEG-4 file from explicit list of JPEG files (list.txt in =
current=20
directory contains the list of files to use as source, one per line): =
</P><PRE class=3Dscreen>mencoder mf://<EM =
class=3Dreplaceable><CODE>@list.txt</CODE></EM> -mf =
w=3D800:h=3D600:fps=3D25:type=3Djpg \=20
    -ovc lavc -lavcopts vcodec=3Dmpeg4:mbd=3D2:trell -oac copy -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV>
<P>You can mix different types of images, regardless of the method you =
use =E2=80=94=20
individual filenames, wildcard or file with list =E2=80=94 provided of =
course they have=20
the same dimensions. So you can e.g. take title frame from PNG file, and =
then=20
put a slideshow of your JPEG photos. </P>
<DIV class=3Dinformalexample>
<P>Creating a Motion JPEG (MJPEG) file from all the JPEG files in the =
current=20
directory: </P><PRE class=3Dscreen>mencoder mf://*.jpg -mf =
w=3D800:h=3D600:fps=3D25:type=3Djpg -ovc copy -oac copy -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV>
<P></P>
<DIV class=3Dinformalexample>
<P>Creating an uncompressed file from all the PNG files in the current=20
directory: </P><PRE class=3Dscreen>mencoder mf://*.png -mf =
w=3D800:h=3D600:fps=3D25:type=3Dpng -ovc raw -oac copy -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM>
</PRE>
<P></P></DIV>
<P></P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note</H3>
<P>Width must be integer multiple of 4, it is a limitation of the RAW =
RGB AVI=20
format. </P></DIV>
<P></P>
<DIV class=3Dinformalexample>
<P>Creating a Motion PNG (MPNG) file from all the PNG files in the =
current=20
directory: </P><PRE class=3Dscreen>mencoder mf://*.png -mf =
w=3D800:h=3D600:fps=3D25:type=3Dpng -ovc copy -oac copy -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM></PRE>
<P></P></DIV>
<P></P>
<DIV class=3Dinformalexample>
<P>Creating a Motion TGA (MTGA) file from all the TGA files in the =
current=20
directory: </P><PRE class=3Dscreen>mencoder mf://*.tga -mf =
w=3D800:h=3D600:fps=3D25:type=3Dtga -ovc copy -oac copy -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM></PRE>
<P></P></DIV>
<P></P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-extractsub></A>13.9.&nbsp;Extracting DVD subtitles to =
VOBsub=20
file</H2></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN> is capable of extracting =
subtitles=20
from a DVD into VOBsub formatted files. They consist of a pair of files =
ending=20
in <TT class=3Dfilename>.idx</TT> and <TT class=3Dfilename>.sub</TT> and =
are usually=20
packaged in a single <TT class=3Dfilename>.rar</TT> archive. <SPAN=20
class=3Dapplication>MPlayer</SPAN> can play these with the <TT=20
class=3Doption>-vobsub</TT> and <TT class=3Doption>-vobsubid</TT> =
options. </P>
<P>You specify the basename (i.e without the <TT =
class=3Dfilename>.idx</TT> or <TT=20
class=3Dfilename>.sub</TT> extension) of the output files with <TT=20
class=3Doption>-vobsubout</TT> and the index for this subtitle in the =
resulting=20
files with <TT class=3Doption>-vobsuboutindex</TT>. </P>
<P>If the input is not from a DVD you should use <TT =
class=3Doption>-ifo</TT> to=20
indicate the <TT class=3Dfilename>.ifo</TT> file needed to construct the =
resulting=20
<TT class=3Dfilename>.idx</TT> file. </P>
<P>If the input is not from a DVD and you do not have the <TT=20
class=3Dfilename>.ifo</TT> file you will need to use the <TT=20
class=3Doption>-vobsubid</TT> option to let it know what language id to =
put in the=20
<TT class=3Dfilename>.idx</TT> file. </P>
<P>Each run will append the running subtitle if the <TT =
class=3Dfilename>.idx</TT>=20
and <TT class=3Dfilename>.sub</TT> files already exist. So you should =
remove any=20
before starting. </P>
<DIV class=3Dexample><A=20
name=3Dcopying_two_subtitles_from_a_dvd_while_doing_two_pass_encoding></A=
>
<P class=3Dtitle><B>Example&nbsp;13.5.&nbsp;Copying two subtitles from a =
DVD while=20
doing two pass encoding</B></P>
<DIV class=3Dexample-contents><PRE class=3Dscreen>rm <EM =
class=3Dreplaceable><CODE>subtitles.idx</CODE></EM> <EM =
class=3Dreplaceable><CODE>subtitles.sub</CODE></EM>
mencoder dvd://1 -oac copy -ovc lavc -lavcopts vcodec=3Dmpeg4:vpass=3D1 =
\
    -vobsubout <EM class=3Dreplaceable><CODE>subtitles</CODE></EM> =
-vobsuboutindex 0 -sid 2
mencoder dvd://1 -oac copy -ovc lavc -lavcopts =
vcodec=3Dmpeg4:mbd=3D2:trell:vpass=3D2 \
    -vobsubout <EM class=3Dreplaceable><CODE>subtitles</CODE></EM> =
-vobsuboutindex 1 -sid 5</PRE></DIV></DIV><BR=20
class=3Dexample-break>
<DIV class=3Dexample><A =
name=3Dcopying_a_french_subtitle_from_an_mpeg_file></A>
<P class=3Dtitle><B>Example&nbsp;13.6.&nbsp;Copying a French subtitle =
from an MPEG=20
file</B></P>
<DIV class=3Dexample-contents><PRE class=3Dscreen>rm <EM =
class=3Dreplaceable><CODE>subtitles.idx</CODE></EM> <EM =
class=3Dreplaceable><CODE>subtitles.sub</CODE></EM>
mencoder <EM class=3Dreplaceable><CODE>movie.mpg</CODE></EM> -ifo <EM =
class=3Dreplaceable><CODE>movie.ifo</CODE></EM> -vobsubout <EM =
class=3Dreplaceable><CODE>subtitles</CODE></EM> -vobsuboutindex 0 \
    -vobsuboutid fr -sid 1 -nosound -ovc copy
</PRE></DIV></DIV><BR class=3Dexample-break></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Daspect></A>13.10.&nbsp;Preserving=20
aspect ratio</H2></DIV></DIV></DIV>
<P>DVDs and SVCDs (i.e. MPEG-1/2) files contain an aspect ratio value, =
which=20
describes how the player should scale the video stream, so humans will =
not have=20
egg heads (ex.: 480x480 + 4:3 =3D 640x480). However when encoding to AVI =
(DivX)=20
files, you have to be aware that AVI headers do not store this value. =
Rescaling=20
the movie is disgusting and time consuming, there has to be a better =
way! </P>
<P>There is</P>
<P>MPEG-4 has a unique feature: the video stream can contain its needed =
aspect=20
ratio. Yes, just like MPEG-1/2 (DVD, SVCD) and H.263 files. Regretfully, =
there=20
are few video players apart from <SPAN =
class=3Dapplication>MPlayer</SPAN> that=20
support this MPEG-4 attribute. </P>
<P>This feature can be used only with <A =
title=3D7.1.1.&nbsp;FFmpeg/libavcodec=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ffmpeg"><CODE=20
class=3Dsystemitem>libavcodec</CODE></A>'s <CODE =
class=3Dsystemitem>mpeg4</CODE>=20
codec. Keep in mind: although <SPAN class=3Dapplication>MPlayer</SPAN> =
will=20
correctly play the created file, other players may use the wrong aspect =
ratio.=20
</P>
<P>You seriously should crop the black bands over and below the movie =
image. See=20
the man page for the usage of the <CODE =
class=3Dsystemitem>cropdetect</CODE> and=20
<CODE class=3Dsystemitem>crop</CODE> filters. </P>
<P>Usage </P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>sample-svcd.mpg</CODE></EM> -vf =
crop=3D714:548:0:14 -oac copy -ovc lavc \
    -lavcopts vcodec=3Dmpeg4:mbd=3D2:trell:autoaspect -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM></PRE>
<P></P></DIV></DIV>
<DIV class=3Dchapter lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A =
name=3Dencoding-guide></A>Chapter&nbsp;14.&nbsp;Encoding with=20
<SPAN class=3Dapplication>MEncoder</SPAN></H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4">14.1.=20
  Making a high quality MPEG-4 ("DivX") rip of a DVD movie</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-preparing-encode">14.1.1.=20
    Preparing to encode: Identifying source material and =
framerate</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-preparing-encode-fps">14.1.1.1.=20
      Identifying source framerate</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-preparing-encode-material">14.1.1.2.=20
      Identifying source material</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-2pass">14.1.2.=20
    Constant quantizer vs. multipass</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-constraints">14.1.3.=20
    Constraints for efficient encoding</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-crop">14.1.4.=20
    Cropping and Scaling</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-resolution-bitrate">14.1.5.=20
    Choosing resolution and bitrate</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-resolution-bitrate-compute">14.1.5.1.=20
      Computing the resolution</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-filtering">14.1.6.=20
    Filtering</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-interlacing">14.1.7.=20
    Interlacing and Telecine</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-encoding-interlaced">14.1.8.=20
    Encoding interlaced video</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-av-sync">14.1.9.=20
    Notes on Audio/Video synchronization</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-codec">14.1.10.=20
    Choosing the video codec</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-audio">14.1.11.=20
    Audio</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing">14.1.12.=20
    Muxing</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing-filter-issues">14.1.12.1.=20
      Improving muxing and A/V sync reliability</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing-avi-limitations">14.1.12.2.=20
      Limitations of the AVI container</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing-matroska">14.1.12.3.=20
      Muxing into the Matroska container</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine">14.2.=20
  How to deal with telecine and interlacing within NTSC DVDs</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-intro">14.2.1.=20
    Introduction</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident">14.2.2.=20
    How to tell what type of video you have</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-progressive">14.2.2.1.=20
      Progressive</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-telecined">14.2.2.2.=20
      Telecined</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-interlaced">14.2.2.3.=20
      Interlaced</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-mixedpt">14.2.2.4.=20
      Mixed progressive and telecine</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-ident-mixedpi">14.2.2.5.=20
      Mixed progressive and interlaced</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode">14.2.3.=20
    How to encode each category</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-progressive">14.2.3.1.=20
      Progressive</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-telecined">14.2.3.2.=20
      Telecined</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-interlaced">14.2.3.3.=20
      Interlaced</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-mixedpt">14.2.3.4.=20
      Mixed progressive and telecine</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-mixedpi">14.2.3.5.=20
      Mixed progressive and interlaced</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-footnotes">14.2.4.=20
    Footnotes</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec">14.3.=20
  Encoding with the <CODE class=3Dsystemitem>libavcodec</CODE> codec=20
  family</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec-video-codecs">14.3.1.=20
    <CODE class=3Dsystemitem>libavcodec</CODE>'s video codecs</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec-audio-codecs">14.3.2.=20
    <CODE class=3Dsystemitem>libavcodec</CODE>'s audio codecs</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-libavcodec-audio-codecs-pcmadpcm">14.3.2.1.=20
      PCM/ADPCM format supplementary table</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-lavc-encoding-options">14.3.3.=20
    Encoding options of libavcodec</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-mpeg4-lavc-example-settings">14.3.4.=20
    Encoding setting examples</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
custommatrices">14.3.5.=20
    Custom inter/intra matrices</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-example">14.3.6.=20
    Example</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid">14.4.=20
  Encoding with the <CODE class=3Dsystemitem>Xvid</CODE> =
codec</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-intro">14.4.1.=20
    What options should I use to get the best results?</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-encoding-options">14.4.2.=20
    Encoding options of <CODE class=3Dsystemitem>Xvid</CODE></A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-encoding-profiles">14.4.3.=20
    Encoding profiles</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-example-settings">14.4.4.=20
    Encoding setting examples</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264">14.5.=20
  Encoding with the <CODE class=3Dsystemitem>x264</CODE> =
codec</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options">14.5.1.=20
    Encoding options of x264</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-intro">14.5.1.1.=20
      Introduction</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-speedvquality">14.5.1.2.=20
      Options which primarily affect speed and quality</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-misc-preferences">14.5.1.3.=20
      Options pertaining to miscellaneous =
preferences</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-example-settings">14.5.2.=20
    Encoding setting examples</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-video-for-windows">14.6.=20
  Encoding with the <CODE class=3Dsystemitem>Video For Windows</CODE> =
codec family=20
  </A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-enc-vfw-video-codecs">14.6.1.=20
    Video for Windows supported codecs</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-video-for-windows-bitrate-settings">14.6.2.=20
    Using vfw2menc to create a codec settings file.</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7">14.7.=20
  Using <SPAN class=3Dapplication>MEncoder</SPAN> to create <SPAN=20
  class=3Dapplication>QuickTime</SPAN>-compatible files</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-why-use-it">14.7.1.=20
    Why would one want to produce <SPAN=20
    class=3Dapplication>QuickTime</SPAN>-compatible Files?</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-constraints">14.7.2.=20
    <SPAN class=3Dapplication>QuickTime</SPAN> 7 limitations</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-crop">14.7.3.=20
    Cropping</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-scale">14.7.4.=20
    Scaling</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-avsync">14.7.5.=20
    A/V sync</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-bitrate">14.7.6.=20
    Bitrate</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-example">14.7.7.=20
    Encoding example</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-remux">14.7.8.=20
    Remuxing as MP4</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-metadata">14.7.9.=20
    Adding metadata tags</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd">14.8.=20
  Using <SPAN class=3Dapplication>MEncoder</SPAN> to create =
VCD/SVCD/DVD-compliant=20
  files</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-constraints">14.8.1.=20
    Format Constraints</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-constraints-resolution">14.8.1.1.=20
      Format Constraints</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-constraints-gop">14.8.1.2.=20
      GOP Size Constraints</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-constraints-bitrate">14.8.1.3.=20
      Bitrate Constraints</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-output">14.8.2.=20
    Output Options</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-output-aspect">14.8.2.1.=20
      Aspect Ratio</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-a-v-sync">14.8.2.2.=20
      Maintaining A/V sync</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-output-srate">14.8.2.3.=20
      Sample Rate Conversion</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc">14.8.3.=20
    Using libavcodec for VCD/SVCD/DVD Encoding</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc-intro">14.8.3.1.=20
      Introduction</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc-options">14.8.3.2.=20
      lavcopts</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc-examples">14.8.3.3.=20
      Examples</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-lavc-advanced">14.8.3.4.=20
      Advanced Options</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-audio">14.8.4.=20
    Encoding Audio</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-audio-toolame">14.8.4.1.=20
      toolame</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-audio-twolame">14.8.4.2.=20
      twolame</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-audio-lavc">14.8.4.3.=20
      libavcodec</A></SPAN></DT></DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all">14.8.5.=20
    Putting it all Together</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-pal-dvd">14.8.5.1.=20
      PAL DVD</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-ntsc-dvd">14.8.5.2.=20
      NTSC DVD</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-pal-ac3-copy">14.8.5.3.=20
      PAL AVI Containing AC-3 Audio to DVD</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-ntsc-ac3-copy">14.8.5.4.=20
      NTSC AVI Containing AC-3 Audio to DVD</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-pal-svcd">14.8.5.5.=20
      PAL SVCD</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-ntsc-svcd">14.8.5.6.=20
      NTSC SVCD</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-pal-vcd">14.8.5.7.=20
      PAL VCD</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-vcd-dvd-all-ntsc-vcd">14.8.5.8.=20
      NTSC VCD</A></SPAN></DT></DL></DD></DL></DD></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-dvd-mpeg4></A>14.1.&nbsp;Making a high quality MPEG-4 =
("DivX")=20
rip of a DVD movie</H2></DIV></DIV></DIV>
<P>One frequently asked question is "How do I make the highest quality =
rip for a=20
given size?". Another question is "How do I make the highest quality DVD =
rip=20
possible? I do not care about file size, I just want the best quality." =
</P>
<P>The latter question is perhaps at least somewhat wrongly posed. After =
all, if=20
you do not care about file size, why not simply copy the entire MPEG-2 =
video=20
stream from the the DVD? Sure, your AVI will end up being 5GB, give or =
take, but=20
if you want the best quality and do not care about size, this is =
certainly your=20
best option. </P>
<P>In fact, the reason you want to transcode a DVD into MPEG-4 is =
specifically=20
because you <SPAN class=3Dbold><STRONG>do</STRONG></SPAN> care about =
file size.=20
</P>
<P>It is difficult to offer a cookbook recipe on how to create a very =
high=20
quality DVD rip. There are several factors to consider, and you should=20
understand these details or else you are likely to end up disappointed =
with your=20
results. Below we will investigate some of these issues, and then have a =
look at=20
an example. We assume you are using <CODE =
class=3Dsystemitem>libavcodec</CODE> to=20
encode the video, although the theory applies to other codecs as well. =
</P>
<P>If this seems to be too much for you, you should probably use one of =
the many=20
fine frontends that are listed in the <A=20
href=3D"http://www.mplayerhq.hu/design7/projects.html#mencoder_frontends"=
=20
target=3D_top>MEncoder section</A> of our related projects page. That =
way, you=20
should be able to achieve high quality rips without too much thinking, =
because=20
most of those tools are designed to take clever decisions for you. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-preparing-encode></A>14.1.1.&nbsp;Preparing =
to encode:=20
Identifying source material and framerate</H3></DIV></DIV></DIV>
<P>Before you even think about encoding a movie, you need to take =
several=20
preliminary steps. </P>
<P>The first and most important step before you encode should be =
determining=20
what type of content you are dealing with. If your source material comes =
from=20
DVD or broadcast/cable/satellite TV, it will be stored in one of two =
formats:=20
NTSC for North America and Japan, PAL for Europe, etc. It is important =
to=20
realize, however, that this is just the formatting for presentation on a =

television, and often does <SPAN =
class=3Dbold><STRONG>not</STRONG></SPAN>=20
correspond to the original format of the movie. Experience shows that =
NTSC=20
material is a lot more difficult to encode, because there more elements =
to=20
identify in the source. In order to produce a suitable encode, you need =
to know=20
the original format. Failure to take this into account will result in =
various=20
flaws in your encode, including ugly combing (interlacing) artifacts and =

duplicated or even lost frames. Besides being ugly, the artifacts also =
harm=20
coding efficiency: You will get worse quality per unit bitrate. </P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-preparing-encode-fps></A>14.1.1.1.&nbsp;Identi=
fying=20
source framerate</H4></DIV></DIV></DIV>
<P>Here is a list of common types of source material, where you are =
likely to=20
find them, and their properties: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Standard Film</STRONG></SPAN>: Produced =
for=20
  theatrical display at 24fps. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>PAL video</STRONG></SPAN>: Recorded with =
a PAL=20
  video camera at 50 fields per second. A field consists of just the =
odd- or=20
  even-numbered lines of a frame. Television was designed to refresh =
these in=20
  alternation as a cheap form of analog compression. The human eye =
supposedly=20
  compensates for this, but once you understand interlacing you will =
learn to=20
  see it on TV too and never enjoy TV again. Two fields do <SPAN=20
  class=3Dbold><STRONG>not</STRONG></SPAN> make a complete frame, =
because they are=20
  captured 1/50 of a second apart in time, and thus they do not line up =
unless=20
  there is no motion. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>NTSC Video</STRONG></SPAN>: Recorded =
with an NTSC=20
  video camera at 60000/1001 fields per second, or 60 fields per second =
in the=20
  pre-color era. Otherwise similar to PAL. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Animation</STRONG></SPAN>: Usually drawn =
at 24fps,=20
  but also comes in mixed-framerate varieties. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Computer Graphics (CG)</STRONG></SPAN>: =
Can be any=20
  framerate, but some are more common than others; 24 and 30 frames per =
second=20
  are typical for NTSC, and 25fps is typical for PAL. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Old Film</STRONG></SPAN>: Various lower=20
  framerates. </P></LI></UL></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-preparing-encode-material></A>14.1.1.2.&nbsp;I=
dentifying=20
source material</H4></DIV></DIV></DIV>
<P>Movies consisting of frames are referred to as progressive, while =
those=20
consisting of independent fields are called either interlaced or video - =
though=20
this latter term is ambiguous. </P>
<P>To further complicate matters, some movies will be a mix of several =
of the=20
above. </P>
<P>The most important distinction to make between all of these formats =
is that=20
some are frame-based, while others are field-based. <SPAN=20
class=3Dbold><STRONG>Whenever</STRONG></SPAN> a movie is prepared for =
display on=20
television (including DVD), it is converted to a field-based format. The =
various=20
methods by which this can be done are collectively referred to as =
"telecine", of=20
which the infamous NTSC "3:2 pulldown" is one variety. Unless the =
original=20
material was also field-based (and the same fieldrate), you are getting =
the=20
movie in a format other than the original. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>There are several common types of pulldown:</B></P>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>PAL 2:2 pulldown</STRONG></SPAN>: The =
nicest of=20
  them all. Each frame is shown for the duration of two fields, by =
extracting=20
  the even and odd lines and showing them in alternation. If the =
original=20
  material is 24fps, this process speeds up the movie by 4%. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>PAL 2:2:2:2:2:2:2:2:2:2:2:3=20
  pulldown</STRONG></SPAN>: Every 12th frame is shown for the duration =
of three=20
  fields, instead of just two. This avoids the 4% speedup issue, but =
makes the=20
  process much more difficult to reverse. It is usually seen in musical=20
  productions where adjusting the speed by 4% would seriously damage the =
musical=20
  score. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>NTSC 3:2 telecine</STRONG></SPAN>: =
Frames are=20
  shown alternately for the duration of 3 fields or 2 fields. This gives =
a=20
  fieldrate 2.5 times the original framerate. The result is also slowed =
down=20
  very slightly from 60 fields per second to 60000/1001 fields per =
second to=20
  maintain NTSC fieldrate. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>NTSC 2:2 pulldown</STRONG></SPAN>: Used =
for=20
  showing 30fps material on NTSC. Nice, just like 2:2 PAL pulldown.=20
</P></LI></UL></DIV>
<P>There are also methods for converting between NTSC and PAL video, but =
such=20
topics are beyond the scope of this guide. If you encounter such a movie =
and=20
want to encode it, your best bet is to find a copy in the original =
format.=20
Conversion between these two formats is highly destructive and cannot be =

reversed cleanly, so your encode will greatly suffer if it is made from =
a=20
converted source. </P>
<P>When video is stored on DVD, consecutive pairs of fields are grouped =
as a=20
frame, even though they are not intended to be shown at the same moment =
in time.=20
The MPEG-2 standard used on DVD and digital TV provides a way both to =
encode the=20
original progressive frames and to store the number of fields for which =
a frame=20
should be shown in the header of that frame. If this method has been =
used, the=20
movie will often be described as "soft-telecined", since the process =
only=20
directs the DVD player to apply pulldown to the movie rather than =
altering the=20
movie itself. This case is highly preferable since it can easily be =
reversed=20
(actually ignored) by the encoder, and since it preserves maximal =
quality.=20
However, many DVD and broadcast production studios do not use proper =
encoding=20
techniques but instead produce movies with "hard telecine", where fields =
are=20
actually duplicated in the encoded MPEG-2. </P>
<P>The procedures for dealing with these cases will be covered <A=20
title=3D"14.2.&nbsp;How to deal with telecine and interlacing within =
NTSC DVDs"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine">later=20
in this guide</A>. For now, we leave you with some guides to identifying =
which=20
type of material you are dealing with: </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>NTSC regions:</B></P>
<UL type=3Ddisc>
  <LI>
  <P>If <SPAN class=3Dapplication>MPlayer</SPAN> prints that the =
framerate has=20
  changed to 24000/1001 when watching your movie, and never changes =
back, it is=20
  almost certainly progressive content that has been "soft telecined". =
</P>
  <LI>
  <P>If <SPAN class=3Dapplication>MPlayer</SPAN> shows the framerate =
switching=20
  back and forth between 24000/1001 and 30000/1001, and you see =
"combing" at=20
  times, then there are several possibilities. The 24000/1001 fps =
segments are=20
  almost certainly progressive content, "soft telecined", but the =
30000/1001 fps=20
  parts could be either hard-telecined 24000/1001 fps content or =
60000/1001=20
  fields per second NTSC video. Use the same guidelines as the following =
two=20
  cases to determine which. </P>
  <LI>
  <P>If <SPAN class=3Dapplication>MPlayer</SPAN> never shows the =
framerate=20
  changing, and every single frame with motion appears combed, your =
movie is=20
  NTSC video at 60000/1001 fields per second. </P>
  <LI>
  <P>If <SPAN class=3Dapplication>MPlayer</SPAN> never shows the =
framerate=20
  changing, and two frames out of every five appear combed, your movie =
is "hard=20
  telecined" 24000/1001fps content. </P></LI></UL></DIV>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>PAL regions:</B></P>
<UL type=3Ddisc>
  <LI>
  <P>If you never see any combing, your movie is 2:2 pulldown. </P>
  <LI>
  <P>If you see combing alternating in and out every half second, then =
your=20
  movie is 2:2:2:2:2:2:2:2:2:2:2:3 pulldown. </P>
  <LI>
  <P>If you always see combing during motion, then your movie is PAL =
video at 50=20
  fields per second. </P></LI></UL></DIV>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Hint:</H3>
<P><SPAN class=3Dapplication>MPlayer</SPAN> can slow down movie playback =
with the=20
-speed option or play it frame-by-frame. Try using <TT =
class=3Doption>-speed</TT>=20
0.2 to watch the movie very slowly or press the "<SPAN=20
class=3Dkeycap><B>.</B></SPAN>" key repeatedly to play one frame at a =
time and=20
identify the pattern, if you cannot see it at full speed. =
</P></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-dvd-mpeg4-2pass></A>14.1.2.&nbsp;Constant=20
quantizer vs. multipass</H3></DIV></DIV></DIV>
<P>It is possible to encode your movie at a wide range of qualities. =
With modern=20
video encoders and a bit of pre-codec compression (downscaling and =
denoising),=20
it is possible to achieve very good quality at 700 MB, for a 90-110 =
minute=20
widescreen movie. Furthermore, all but the longest movies can be encoded =
with=20
near-perfect quality at 1400 MB. </P>
<P>There are three approaches to encoding the video: constant bitrate =
(CBR),=20
constant quantizer, and multipass (ABR, or average bitrate). </P>
<P>The complexity of the frames of a movie, and thus the number of bits =
required=20
to compress them, can vary greatly from one scene to another. Modern =
video=20
encoders can adjust to these needs as they go and vary the bitrate. In =
simple=20
modes such as CBR, however, the encoders do not know the bitrate needs =
of future=20
scenes and so cannot exceed the requested average bitrate for long =
stretches of=20
time. More advanced modes, such as multipass encode, can take into =
account the=20
statistics from previous passes; this fixes the problem mentioned above. =
</P>
<DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
<H3 class=3Dtitle>Note:</H3>
<P>Most codecs which support ABR encode only support two pass encode =
while some=20
others such as <CODE class=3Dsystemitem>x264</CODE>, <CODE=20
class=3Dsystemitem>Xvid</CODE> and <CODE =
class=3Dsystemitem>libavcodec</CODE>=20
support multipass, which slightly improves quality at each pass, yet =
this=20
improvement is no longer measurable nor noticeable after the 4th or so =
pass.=20
Therefore, in this section, two pass and multipass will be used =
interchangeably.=20
</P></DIV>
<P>In each of these modes, the video codec (such as <CODE=20
class=3Dsystemitem>libavcodec</CODE>) breaks the video frame into 16x16 =
pixel=20
macroblocks and then applies a quantizer to each macroblock. The lower =
the=20
quantizer, the better the quality and higher the bitrate. The method the =
movie=20
encoder uses to determine which quantizer to use for a given macroblock =
varies=20
and is highly tunable. (This is an extreme over-simplification of the =
actual=20
process, but the basic concept is useful to understand.) </P>
<P>When you specify a constant bitrate, the video codec will encode the =
video,=20
discarding detail as much as necessary and as little as possible in =
order to=20
remain lower than the given bitrate. If you truly do not care about file =
size,=20
you could as well use CBR and specify a bitrate of infinity. (In =
practice, this=20
means a value high enough so that it poses no limit, like 10000Kbit.) =
With no=20
real restriction on bitrate, the result is that the codec will use the =
lowest=20
possible quantizer for each macroblock (as specified by <TT=20
class=3Doption>vqmin</TT> for <CODE =
class=3Dsystemitem>libavcodec</CODE>, which is 2=20
by default). As soon as you specify a low enough bitrate that the codec =
is=20
forced to use a higher quantizer, then you are almost certainly ruining =
the=20
quality of your video. In order to avoid that, you should probably =
downscale=20
your video, according to the method described later on in this guide. In =

general, you should avoid CBR altogether if you care about quality. </P>
<P>With constant quantizer, the codec uses the same quantizer, as =
specified by=20
the <TT class=3Doption>vqscale</TT> option (for <CODE=20
class=3Dsystemitem>libavcodec</CODE>), on every macroblock. If you want =
the=20
highest quality rip possible, again ignoring bitrate, you can use <TT=20
class=3Doption>vqscale=3D2</TT>. This will yield the same bitrate and =
PSNR (peak=20
signal-to-noise ratio) as CBR with <TT =
class=3Doption>vbitrate</TT>=3Dinfinity and=20
the default <TT class=3Doption>vqmin</TT> of 2. </P>
<P>The problem with constant quantizing is that it uses the given =
quantizer=20
whether the macroblock needs it or not. That is, it might be possible to =
use a=20
higher quantizer on a macroblock without sacrificing visual quality. Why =
waste=20
the bits on an unnecessarily low quantizer? Your CPU has as many cycles =
as there=20
is time, but there is only so many bits on your hard disk. </P>
<P>With a two pass encode, the first pass will rip the movie as though =
it were=20
CBR, but it will keep a log of properties for each frame. This data is =
then used=20
during the second pass in order to make intelligent decisions about =
which=20
quantizers to use. During fast action or high detail scenes, higher =
quantizers=20
will likely be used, and during slow moving or low detail scenes, lower=20
quantizers will be used. Normally, the amount of motion is much more =
important=20
than the amount of detail. </P>
<P>If you use <TT class=3Doption>vqscale=3D2</TT>, then you are wasting =
bits. If you=20
use <TT class=3Doption>vqscale=3D3</TT>, then you are not getting the =
highest=20
quality rip. Suppose you rip a DVD at <TT =
class=3Doption>vqscale=3D3</TT>, and the=20
result is 1800Kbit. If you do a two pass encode with <TT=20
class=3Doption>vbitrate=3D1800</TT>, the resulting video will have <SPAN =

class=3Dbold><STRONG>higher quality</STRONG></SPAN> for the <SPAN=20
class=3Dbold><STRONG>same bitrate</STRONG></SPAN>. </P>
<P>Since you are now convinced that two pass is the way to go, the real =
question=20
now is what bitrate to use? The answer is that there is no single =
answer.=20
Ideally you want to choose a bitrate that yields the best balance =
between=20
quality and file size. This is going to vary depending on the source =
video. </P>
<P>If size does not matter, a good starting point for a very high =
quality rip is=20
about 2000Kbit plus or minus 200Kbit. For fast action or high detail =
source=20
video, or if you just have a very critical eye, you might decide on 2400 =
or=20
2600. For some DVDs, you might not notice a difference at 1400Kbit. It =
is a good=20
idea to experiment with scenes at different bitrates to get a feel. </P>
<P>If you aim at a certain size, you will have to somehow calculate the =
bitrate.=20
But before that, you need to know how much space you should reserve for =
the=20
audio track(s), so you should <A title=3D14.1.11.&nbsp;Audio=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-audio">rip=20
those</A> first. You can compute the bitrate with the following =
equation: <CODE=20
class=3Dsystemitem>bitrate =3D (target_size_in_Mbytes - =
sound_size_in_Mbytes) * 1024=20
* 1024 / length_in_secs * 8 / 1000</CODE> For instance, to squeeze a =
two-hour=20
movie onto a 702MB CD, with 60MB of audio track, the video bitrate will =
have to=20
be: <CODE class=3Dsystemitem>(702 - 60) * 1024 * 1024 / (120*60) * 8 / =
1000 =3D=20
740kbps</CODE> </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-constraints></A>14.1.3.&nbsp;Constraints for =
efficient=20
encoding</H3></DIV></DIV></DIV>
<P>Due to the nature of MPEG-type compression, there are various =
constraints you=20
should follow for maximal quality. MPEG splits the video up into 16x16 =
squares=20
called macroblocks, each composed of 4 8x8 blocks of luma (intensity)=20
information and two half-resolution 8x8 chroma (color) blocks (one for =
red-cyan=20
axis and the other for the blue-yellow axis). Even if your movie width =
and=20
height are not multiples of 16, the encoder will use enough 16x16 =
macroblocks to=20
cover the whole picture area, and the extra space will go to waste. So =
in the=20
interests of maximizing quality at a fixed filesize, it is a bad idea to =
use=20
dimensions that are not multiples of 16. </P>
<P>Most DVDs also have some degree of black borders at the edges. =
Leaving these=20
in place will hurt quality <SPAN class=3Dbold><STRONG>a =
lot</STRONG></SPAN> in=20
several ways. </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>MPEG-type compression is highly dependent on frequency domain=20
  transformations, in particular the Discrete Cosine Transform (DCT), =
which is=20
  similar to the Fourier transform. This sort of encoding is efficient =
for=20
  representing patterns and smooth transitions, but it has a hard time =
with=20
  sharp edges. In order to encode them it must use many more bits, or =
else an=20
  artifact known as ringing will appear. </P>
  <P>The frequency transform (DCT) takes place separately on each =
macroblock=20
  (actually each block), so this problem only applies when the sharp =
edge is=20
  inside a block. If your black borders begin exactly at multiple-of-16 =
pixel=20
  boundaries, this is not a problem. However, the black borders on DVDs =
rarely=20
  come nicely aligned, so in practice you will always need to crop to =
avoid this=20
  penalty. </P></LI></OL></DIV>
<P>In addition to frequency domain transforms, MPEG-type compression =
uses motion=20
vectors to represent the change from one frame to the next. Motion =
vectors=20
naturally work much less efficiently for new content coming in from the =
edges of=20
the picture, because it is not present in the previous frame. As long as =
the=20
picture extends all the way to the edge of the encoded region, motion =
vectors=20
have no problem with content moving out the edges of the picture. =
However, in=20
the presence of black borders, there can be trouble: </P>
<DIV class=3Dorderedlist>
<OL type=3D1 start=3D2>
  <LI>
  <P>For each macroblock, MPEG-type compression stores a vector =
identifying=20
  which part of the previous frame should be copied into this macroblock =
as a=20
  base for predicting the next frame. Only the remaining differences =
need to be=20
  encoded. If a macroblock spans the edge of the picture and contains =
part of=20
  the black border, then motion vectors from other parts of the picture =
will=20
  overwrite the black border. This means that lots of bits must be spent =
either=20
  re-blackening the border that was overwritten, or (more likely) a =
motion=20
  vector will not be used at all and all the changes in this macroblock =
will=20
  have to be coded explicitly. Either way, encoding efficiency is =
greatly=20
  reduced. </P>
  <P>Again, this problem only applies if black borders do not line up on =

  multiple-of-16 boundaries. </P>
  <LI>
  <P>Finally, suppose we have a macroblock in the interior of the =
picture, and=20
  an object is moving into this block from near the edge of the image. =
MPEG-type=20
  coding cannot say "copy the part that is inside the picture but not =
the black=20
  border." So the black border will get copied inside too, and lots of =
bits will=20
  have to be spent encoding the part of the picture that is supposed to =
be=20
  there. </P>
  <P>If the picture runs all the way to the edge of the encoded area, =
MPEG has=20
  special optimizations to repeatedly copy the pixels at the edge of the =
picture=20
  when a motion vector comes from outside the encoded area. This feature =
becomes=20
  useless when the movie has black borders. Unlike problems 1 and 2, =
aligning=20
  the borders at multiples of 16 does not help here. </P>
  <LI>
  <P>Despite the borders being entirely black and never changing, there =
is at=20
  least a minimal amount of overhead involved in having more =
macroblocks.=20
  </P></LI></OL></DIV>
<P>For all of these reasons, it is recommended to fully crop black =
borders.=20
Further, if there is an area of noise/distortion at the edge of the =
picture,=20
cropping this will improve encoding efficiency as well. Videophile =
purists who=20
want to preserve the original as close as possible may object to this =
cropping,=20
but unless you plan to encode at constant quantizer, the quality you =
gain from=20
cropping will considerably exceed the amount of information lost at the =
edges.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-dvd-mpeg4-crop></A>14.1.4.&nbsp;Cropping and=20
Scaling</H3></DIV></DIV></DIV>
<P>Recall from the previous section that the final picture size you =
encode=20
should be a multiple of 16 (in both width and height). This can be =
achieved by=20
cropping, scaling, or a combination of both. </P>
<P>When cropping, there are a few guidelines that must be followed to =
avoid=20
damaging your movie. The normal YUV format, 4:2:0, stores chroma (color) =

information subsampled, i.e. chroma is only sampled half as often in =
each=20
direction as luma (intensity) information. Observe this diagram, where L =

indicates luma sampling points and C chroma. </P>
<DIV class=3Dinformaltable>
<TABLE width=3D"40%" border=3D1>
  <COLGROUP>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle></COLGROUP>
  <TBODY>
  <TR>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD></TR>
  <TR>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD></TR>
  <TR>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD></TR>
  <TR>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD></TR>
  <TR>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD></TR>
  <TR>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD></TR></TBODY></TABLE></DIV>
<P>As you can see, rows and columns of the image naturally come in =
pairs. Thus=20
your crop offsets and dimensions <SPAN =
class=3Demphasis><EM>must</EM></SPAN> be=20
even numbers. If they are not, the chroma will no longer line up =
correctly with=20
the luma. In theory, it is possible to crop with odd offsets, but it =
requires=20
resampling the chroma which is potentially a lossy operation and not =
supported=20
by the crop filter. </P>
<P>Further, interlaced video is sampled as follows: </P>
<DIV class=3Dinformaltable>
<TABLE width=3D"80%" border=3D1>
  <COLGROUP>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle></COLGROUP>
  <TBODY>
  <TR>
    <TD align=3Dmiddle colSpan=3D8>Top field</TD>
    <TD align=3Dmiddle colSpan=3D8>Bottom field</TD></TR>
  <TR>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR>
  <TR>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR>
  <TR>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD></TR>
  <TR>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR>
  <TR>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD></TR>
  <TR>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD></TR>
  <TR>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR>
  <TR>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR>
  <TR>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD></TR>
  <TR>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR>
  <TR>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD>
    <TD align=3Dmiddle colSpan=3D2>C</TD></TR>
  <TR>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD>
    <TD align=3Dmiddle>L</TD></TR></TBODY></TABLE></DIV>
<P>As you can see, the pattern does not repeat until after 4 lines. So =
for=20
interlaced video, your y-offset and height for cropping must be =
multiples of 4.=20
</P>
<P>Native DVD resolution is 720x480 for NTSC, and 720x576 for PAL, but =
there is=20
an aspect flag that specifies whether it is full-screen (4:3) or =
wide-screen=20
(16:9). Many (if not most) widescreen DVDs are not strictly 16:9, and =
will be=20
either 1.85:1 or 2.35:1 (cinescope). This means that there will be black =
bands=20
in the video that will need to be cropped out. </P>
<P><SPAN class=3Dapplication>MPlayer</SPAN> provides a crop detection =
filter that=20
will determine the crop rectangle (<TT class=3Doption>-vf =
cropdetect</TT>). Run=20
<SPAN class=3Dapplication>MPlayer</SPAN> with <TT class=3Doption>-vf =
cropdetect</TT>=20
and it will print out the crop settings to remove the borders. You =
should let=20
the movie run long enough that the whole picture area is used, in order =
to get=20
accurate crop values. </P>
<P>Then, test the values you get with <SPAN =
class=3Dapplication>MPlayer</SPAN>,=20
using the command line which was printed by <TT =
class=3Doption>cropdetect</TT>,=20
and adjust the rectangle as needed. The <TT =
class=3Doption>rectangle</TT> filter=20
can help by allowing you to interactively position the crop rectangle =
over your=20
movie. Remember to follow the above divisibility guidelines so that you =
do not=20
misalign the chroma planes. </P>
<P>In certain cases, scaling may be undesirable. Scaling in the vertical =

direction is difficult with interlaced video, and if you wish to =
preserve the=20
interlacing, you should usually refrain from scaling. If you will not be =
scaling=20
but you still want to use multiple-of-16 dimensions, you will have to =
overcrop.=20
Do not undercrop, since black borders are very bad for encoding! </P>
<P>Because MPEG-4 uses 16x16 macroblocks, you will want to make sure =
that each=20
dimension of the video you are encoding is a multiple of 16 or else you =
will be=20
degrading quality, especially at lower bitrates. You can do this by =
rounding the=20
width and height of the crop rectangle down to the nearest multiple of =
16. As=20
stated earlier, when cropping, you will want to increase the Y offset by =
half=20
the difference of the old and the new height so that the resulting video =
is=20
taken from the center of the frame. And because of the way DVD video is =
sampled,=20
make sure the offset is an even number. (In fact, as a rule, never use =
odd=20
values for any parameter when you are cropping and scaling video.) If =
you are=20
not comfortable throwing a few extra pixels away, you might prefer =
instead to=20
scale the video instead. We will look at this in our example below. You =
can=20
actually let the <TT class=3Doption>cropdetect</TT> filter do all of the =
above for=20
you, as it has an optional <TT class=3Doption>round</TT> parameter that =
is equal=20
to 16 by default. </P>
<P>Also, be careful about "half black" pixels at the edges. Make sure =
you crop=20
these out too, or else you will be wasting bits there that are better =
spent=20
elsewhere. </P>
<P>After all is said and done, you will probably end up with video whose =
pixels=20
are not quite 1.85:1 or 2.35:1, but rather something close to that. You =
could=20
calculate the new aspect ratio manually, but <SPAN=20
class=3Dapplication>MEncoder</SPAN> offers an option for <CODE=20
class=3Dsystemitem>libavcodec</CODE> called <TT =
class=3Doption>autoaspect</TT> that=20
will do this for you. Absolutely do not scale this video up in order to =
square=20
the pixels unless you like to waste your hard disk space. Scaling should =
be done=20
on playback, and the player will use the aspect stored in the AVI to =
determine=20
the correct resolution. Unfortunately, not all players enforce this =
auto-scaling=20
information, therefore you may still want to rescale. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-resolution-bitrate></A>14.1.5.&nbsp;Choosing =
resolution=20
and bitrate</H3></DIV></DIV></DIV>
<P>If you will not be encoding in constant quantizer mode, you need to =
select a=20
bitrate. The concept of bitrate is quite simple. It is the (average) =
number of=20
bits that will be consumed to store your movie, per second. Normally =
bitrate is=20
measured in kilobits (1000 bits) per second. The size of your movie on =
disk is=20
the bitrate times the length of the movie in time, plus a small amount =
of=20
"overhead" (see the section on <A=20
title=3D"14.1.12.2.&nbsp;Limitations of the AVI container"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing-avi-limitations">the=20
AVI container</A> for instance). Other parameters such as scaling, =
cropping,=20
etc. will <SPAN class=3Dbold><STRONG>not</STRONG></SPAN> alter the file =
size=20
unless you change the bitrate as well!. </P>
<P>Bitrate does <SPAN class=3Dbold><STRONG>not</STRONG></SPAN> scale=20
proportionally to resolution. That is to say, a 320x240 file at 200 =
kbit/sec=20
will not be the same quality as the same movie at 640x480 and 800 =
kbit/sec!=20
There are two reasons for this: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Perceptual</STRONG></SPAN>: You notice =
MPEG=20
  artifacts more if they are scaled up bigger! Artifacts appear on the =
scale of=20
  blocks (8x8). Your eye will not see errors in 4800 small blocks as =
easily as=20
  it sees errors in 1200 large blocks (assuming you will be scaling both =
to=20
  fullscreen). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Theoretical</STRONG></SPAN>: When you =
scale down=20
  an image but still use the same size (8x8) blocks for the frequency =
space=20
  transform, you move more data to the high frequency bands. Roughly =
speaking,=20
  each pixel contains more of the detail than it did before. So even =
though your=20
  scaled-down picture contains 1/4 the information in the spacial =
directions, it=20
  could still contain a large portion of the information in the =
frequency domain=20
  (assuming that the high frequencies were underutilized in the original =
640x480=20
  image). </P></LI></OL></DIV>
<P></P>
<P>Past guides have recommended choosing a bitrate and resolution based =
on a=20
"bits per pixel" approach, but this is usually not valid due to the =
above=20
reasons. A better estimate seems to be that bitrates scale proportional =
to the=20
square root of resolution, so that 320x240 and 400 kbit/sec would be =
comparable=20
to 640x480 at 800 kbit/sec. However this has not been verified with =
theoretical=20
or empirical rigor. Further, given that movies vary greatly with regard =
to=20
noise, detail, degree of motion, etc., it is futile to make general=20
recommendations for bits per length-of-diagonal (the analog of bits per =
pixel,=20
using the square root). </P>
<P>So far we have discussed the difficulty of choosing a bitrate and =
resolution.=20
</P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-resolution-bitrate-compute></A>14.1.5.1.&nbsp;=
Computing=20
the resolution</H4></DIV></DIV></DIV>
<P>The following steps will guide you in computing the resolution of =
your encode=20
without distorting the video too much, by taking into account several =
types of=20
information about the source video. First, you should compute the =
encoded aspect=20
ratio: <CODE class=3Dsystemitem>ARc =3D (Wc x (ARa / PRdvd )) / =
Hc</CODE> </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>where:</B></P>
<UL type=3Ddisc>
  <LI>
  <P>Wc and Hc are the width and height of the cropped video, </P>
  <LI>
  <P>ARa is the displayed aspect ratio, which usually is 4/3 or 16/9, =
</P>
  <LI>
  <P>PRdvd is the pixel ratio of the DVD which is equal to =
1.25=3D(720/576) for=20
  PAL DVDs and 1.5=3D(720/480) for NTSC DVDs, </P></LI></UL></DIV>
<P></P>
<P>Then, you can compute the X and Y resolution, according to a certain=20
Compression Quality (CQ) factor: <CODE class=3Dsystemitem>ResY =3D =
INT(SQRT(=20
1000*Bitrate/25/ARc/CQ )/16) * 16</CODE> and <CODE =
class=3Dsystemitem>ResX =3D INT(=20
ResY * ARc / 16) * 16</CODE> </P>
<P>Okay, but what is the CQ? The CQ represents the number of bits per =
pixel and=20
per frame of the encode. Roughly speaking, the greater the CQ, the less =
the=20
likelihood to see encoding artifacts. However, if you have a target size =
for=20
your movie (1 or 2 CDs for instance), there is a limited total number of =
bits=20
that you can spend; therefore it is necessary to find a good tradeoff =
between=20
compressibility and quality. </P>
<P>The CQ depends on the bitrate, the video codec efficiency and the =
movie=20
resolution. In order to raise the CQ, typically you would downscale the =
movie=20
given that the bitrate is computed in function of the target size and =
the length=20
of the movie, which are constant. With MPEG-4 ASP codecs such as <CODE=20
class=3Dsystemitem>Xvid</CODE> and <CODE =
class=3Dsystemitem>libavcodec</CODE>, a CQ=20
below 0.18 usually results in a pretty blocky picture, because there are =
not=20
enough bits to code the information of each macroblock. (MPEG4, like =
many other=20
codecs, groups pixels by blocks of several pixels to compress the image; =
if=20
there are not enough bits, the edges of those blocks are visible.) It is =

therefore wise to take a CQ ranging from 0.20 to 0.22 for a 1 CD rip, =
and=20
0.26-0.28 for 2 CDs rip with standard encoding options. More advanced =
encoding=20
options such as those listed here for <A=20
title=3D"14.3.4.&nbsp;Encoding setting examples"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-mpeg4-lavc-example-settings"><CODE=20
class=3Dsystemitem>libavcodec</CODE></A> and <A=20
title=3D"14.4.4.&nbsp;Encoding setting examples"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-xvid-example-settings"><CODE=20
class=3Dsystemitem>Xvid</CODE></A> should make it possible to get the =
same quality=20
with CQ ranging from 0.18 to 0.20 for a 1 CD rip, and 0.24 to 0.26 for a =
2 CD=20
rip. With MPEG-4 AVC codecs such as <CODE =
class=3Dsystemitem>x264</CODE>, you can=20
use a CQ ranging from 0.14 to 0.16 with standard encoding options, and =
should be=20
able to go as low as 0.10 to 0.12 with <A=20
title=3D"14.5.2.&nbsp;Encoding setting examples"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-example-settings"><CODE=20
class=3Dsystemitem>x264</CODE>'s advanced encoding settings</A>. </P>
<P>Please take note that the CQ is just an indicative figure, as =
depending on=20
the encoded content, a CQ of 0.18 may look just fine for a Bergman, =
contrary to=20
a movie such as The Matrix, which contains many high-motion scenes. On =
the other=20
hand, it is worthless to raise CQ higher than 0.30 as you would be =
wasting bits=20
without any noticeable quality gain. Also note that as mentioned earlier =
in this=20
guide, low resolution videos need a bigger CQ (compared to, for =
instance, DVD=20
resolution) to look good. </P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-filtering></A>14.1.6.&nbsp;Filtering</H3></DIV=
></DIV></DIV>
<P>Learning how to use <SPAN class=3Dapplication>MEncoder</SPAN>'s video =
filters=20
is essential to producing good encodes. All video processing is =
performed=20
through the filters -- cropping, scaling, color adjustment, noise =
removal,=20
sharpening, deinterlacing, telecine, inverse telecine, and deblocking, =
just to=20
name a few. Along with the vast number of supported input formats, the =
variety=20
of filters available in <SPAN class=3Dapplication>MEncoder</SPAN> is one =
of its=20
main advantages over other similar programs. </P>
<P>Filters are loaded in a chain using the -vf option: </P><PRE =
class=3Dscreen>-vf filter1=3Doptions,filter2=3Doptions,...</PRE>
<P>Most filters take several numeric options separated by colons, but =
the syntax=20
for options varies from filter to filter, so read the man page for =
details on=20
the filters you wish to use. </P>
<P>Filters operate on the video in the order they are loaded. For =
example, the=20
following chain: </P><PRE class=3Dscreen>-vf =
crop=3D688:464:12:4,scale=3D640:464</PRE>
<P>will first crop the 688x464 region of the picture with upper-left =
corner at=20
(12,4), and then scale the result down to 640x464. </P>
<P>Certain filters need to be loaded at or near the beginning of the =
filter=20
chain, in order to take advantage of information from the video decoder =
that=20
will be lost or invalidated by other filters. The principal examples are =
<TT=20
class=3Doption>pp</TT> (postprocessing, only when it is performing =
deblock or=20
dering operations), <TT class=3Doption>spp</TT> (another postprocessor =
to remove=20
MPEG artifacts), <TT class=3Doption>pullup</TT> (inverse telecine), and =
<TT=20
class=3Doption>softpulldown</TT> (for converting soft telecine to hard =
telecine).=20
</P>
<P>In general, you want to do as little filtering as possible to the =
movie in=20
order to remain close to the original DVD source. Cropping is often =
necessary=20
(as described above), but avoid to scale the video. Although scaling =
down is=20
sometimes preferred to using higher quantizers, we want to avoid both =
these=20
things: remember that we decided from the start to trade bits for =
quality. </P>
<P>Also, do not adjust gamma, contrast, brightness, etc. What looks good =
on your=20
display may not look good on others. These adjustments should be done on =

playback only. </P>
<P>One thing you might want to do, however, is pass the video through a =
very=20
light denoise filter, such as <TT class=3Doption>-vf =
hqdn3d=3D2:1:2</TT>. Again, it=20
is a matter of putting those bits to better use: why waste them encoding =
noise=20
when you can just add that noise back in during playback? Increasing the =

parameters for <TT class=3Doption>hqdn3d</TT> will further improve=20
compressibility, but if you increase the values too much, you risk =
degrading the=20
image visibily. The suggested values above (<TT =
class=3Doption>2:1:2</TT>) are=20
quite conservative; you should feel free to experiment with higher =
values and=20
observe the results for yourself. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-interlacing></A>14.1.7.&nbsp;Interlacing and=20
Telecine</H3></DIV></DIV></DIV>
<P>Almost all movies are shot at 24 fps. Because NTSC is 30000/1001 fps, =
some=20
processing must be done to this 24 fps video to make it run at the =
correct NTSC=20
framerate. The process is called 3:2 pulldown, commonly referred to as =
telecine=20
(because pulldown is often applied during the telecine process), and, =
naively=20
described, it works by slowing the film down to 24000/1001 fps, and =
repeating=20
every fourth frame. </P>
<P>No special processing, however, is done to the video for PAL DVDs, =
which run=20
at 25 fps. (Technically, PAL can be telecined, called 2:2 pulldown, but =
this=20
does not become an issue in practice.) The 24 fps film is simply played =
back at=20
25 fps. The result is that the movie runs slightly faster, but unless =
you are an=20
alien, you probably will not notice the difference. Most PAL DVDs have=20
pitch-corrected audio, so when they are played back at 25 fps things =
will sound=20
right, even though the audio track (and hence the whole movie) has a =
running=20
time that is 4% less than NTSC DVDs. </P>
<P>Because the video in a PAL DVD has not been altered, you need not =
worry much=20
about framerate. The source is 25 fps, and your rip will be 25 fps. =
However, if=20
you are ripping an NTSC DVD movie, you may need to apply inverse =
telecine. </P>
<P>For movies shot at 24 fps, the video on the NTSC DVD is either =
telecined=20
30000/1001, or else it is progressive 24000/1001 fps and intended to be=20
telecined on-the-fly by a DVD player. On the other hand, TV series are =
usually=20
only interlaced, not telecined. This is not a hard rule: some TV series =
are=20
interlaced (such as Buffy the Vampire Slayer) whereas some are a mixture =
of=20
progressive and interlaced (such as Angel, or 24). </P>
<P>It is highly recommended that you read the section on <A=20
title=3D"14.2.&nbsp;How to deal with telecine and interlacing within =
NTSC DVDs"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine">How=20
to deal with telecine and interlacing in NTSC DVDs</A> to learn how to =
handle=20
the different possibilities. </P>
<P>However, if you are mostly just ripping movies, likely you are either =
dealing=20
with 24 fps progressive or telecined video, in which case you can use =
the <TT=20
class=3Doption>pullup</TT> filter <TT class=3Doption>-vf =
pullup,softskip</TT>.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-encoding-interlaced></A>14.1.8.&nbsp;Encoding =

interlaced video</H3></DIV></DIV></DIV>
<P>If the movie you want to encode is interlaced (NTSC video or PAL =
video), you=20
will need to choose whether you want to deinterlace or not. While =
deinterlacing=20
will make your movie usable on progressive scan displays such a computer =

monitors and projectors, it comes at a cost: The fieldrate of 50 or =
60000/1001=20
fields per second is halved to 25 or 30000/1001 frames per second, and =
roughly=20
half of the information in your movie will be lost during scenes with=20
significant motion. </P>
<P>Therefore, if you are encoding for high quality archival purposes, it =
is=20
recommended not to deinterlace. You can always deinterlace the movie at =
playback=20
time when displaying it on progressive scan devices. The power of =
currently=20
available computers forces players to use a deinterlacing filter, which =
results=20
in a slight degradation in image quality. But future players will be =
able to=20
mimic the interlaced display of a TV, deinterlacing to full fieldrate =
and=20
interpolating 50 or 60000/1001 entire frames per second from the =
interlaced=20
video. </P>
<P>Special care must be taken when working with interlaced video: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>Crop height and y-offset must be multiples of 4. </P>
  <LI>
  <P>Any vertical scaling must be performed in interlaced mode. </P>
  <LI>
  <P>Postprocessing and denoising filters may not work as expected =
unless you=20
  take special care to operate them a field at a time, and they may =
damage the=20
  video if used incorrectly. </P></LI></OL></DIV>
<P>With these things in mind, here is our first example: </P><PRE =
class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>capture.avi</CODE></EM> -mc 0 -oac lavc -ovc =
lavc -lavcopts \
    =
vcodec=3Dmpeg2video:vbitrate=3D6000:ilme:ildct:acodec=3Dmp2:abitrate=3D22=
4
</PRE>
<P>Note the <TT class=3Doption>ilme</TT> and <TT =
class=3Doption>ildct</TT> options.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-dvd-mpeg4-av-sync></A>14.1.9.&nbsp;Notes on=20
Audio/Video synchronization</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN>'s audio/video =
synchronization=20
algorithms were designed with the intention of recovering files with =
broken=20
sync. However, in some cases they can cause unnecessary skipping and =
duplication=20
of frames, and possibly slight A/V desync, when used with proper input =
(of=20
course, A/V sync issues apply only if you process or copy the audio =
track while=20
transcoding the video, which is strongly encouraged). Therefore, you may =
have to=20
switch to basic A/V sync with the <TT class=3Doption>-mc 0</TT> option, =
or put=20
this in your <CODE class=3Dsystemitem>~/.mplayer/mencoder</CODE> config =
file, as=20
long as you are only working with good sources (DVD, TV capture, high =
quality=20
MPEG-4 rips, etc) and not broken ASF/RM/MOV files. </P>
<P>If you want to further guard against strange frame skips and =
duplication, you=20
can use both <TT class=3Doption>-mc 0</TT> and <TT =
class=3Doption>-noskip</TT>. This=20
will prevent <SPAN class=3Demphasis><EM>all</EM></SPAN> A/V sync, and =
copy frames=20
one-to-one, so you cannot use it if you will be using any filters that=20
unpredictably add or drop frames, or if your input file has variable =
framerate!=20
Therefore, using <TT class=3Doption>-noskip</TT> is not in general =
recommended.=20
</P>
<P>The so-called "three-pass" audio encoding which <SPAN=20
class=3Dapplication>MEncoder</SPAN> supports has been reported to cause =
A/V=20
desync. This will definitely happen if it is used in conjunction with =
certain=20
filters, therefore, it is now recommended <SPAN=20
class=3Demphasis><EM>not</EM></SPAN> to use three-pass audio mode. This =
feature is=20
only left for compatibility purposes and for expert users who understand =
when it=20
is safe to use and when it is not. If you have never heard of three-pass =
mode=20
before, forget that we even mentioned it! </P>
<P>There have also been reports of A/V desync when encoding from stdin =
with=20
<SPAN class=3Dapplication>MEncoder</SPAN>. Do not do this! Always use a =
file or=20
CD/DVD/etc device as input. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-dvd-mpeg4-codec></A>14.1.10.&nbsp;Choosing the=20
video codec</H3></DIV></DIV></DIV>
<P>Which video codec is best to choose depends on several factors, like =
size,=20
quality, streamability, usability and popularity, some of which widely =
depend on=20
personal taste and technical constraints. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Compression efficiency</STRONG></SPAN>: =
It is=20
  quite easy to understand that most newer-generation codecs are made to =

  increase quality and compression. Therefore, the authors of this guide =
and=20
  many other people suggest that you cannot go wrong <SUP>[<A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ftn.fn-menc-feat-dvd-mpeg4-codec-cpu"=20
  name=3Dfn-menc-feat-dvd-mpeg4-codec-cpu>2</A>]</SUP> when choosing =
MPEG-4 AVC=20
  codecs like <CODE class=3Dsystemitem>x264</CODE> instead of MPEG-4 ASP =
codecs=20
  such as <CODE class=3Dsystemitem>libavcodec</CODE> MPEG-4 or <CODE=20
  class=3Dsystemitem>Xvid</CODE>. (Advanced codec developers may be =
interested in=20
  reading Michael Niedermayer's opinion on "<A=20
  href=3D"http://guru.multimedia.cx/?p=3D10" target=3D_top>why MPEG4-ASP =
sucks</A>".)=20
  Likewise, you should get better quality using MPEG-4 ASP than you =
would with=20
  MPEG-2 codecs. </P>
  <P>However, newer codecs which are in heavy development can suffer =
from bugs=20
  which have not yet been noticed and which can ruin an encode. This is =
simply=20
  the tradeoff for using bleeding-edge technology. </P>
  <P>What is more, beginning to use a new codec requires that you spend =
some=20
  time becoming familiar with its options, so that you know what to =
adjust to=20
  achieve a desired picture quality. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Hardware compatibility</STRONG></SPAN>: =
It usually=20
  takes a long time for standalone video players to begin to include =
support for=20
  the latest video codecs. As a result, most only support MPEG-1 (like =
VCD, XVCD=20
  and KVCD), MPEG-2 (like DVD, SVCD and KVCD) and MPEG-4 ASP (like DivX, =
<CODE=20
  class=3Dsystemitem>libavcodec</CODE>'s LMP4 and <CODE=20
  class=3Dsystemitem>Xvid</CODE>) (Beware: Usually, not all MPEG-4 ASP =
features=20
  are supported). Please refer to the technical specs of your player (if =
they=20
  are available), or google around for more information. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Best quality per encoding =
time</STRONG></SPAN>:=20
  Codecs that have been around for some time (such as <CODE=20
  class=3Dsystemitem>libavcodec</CODE> MPEG-4 and <CODE=20
  class=3Dsystemitem>Xvid</CODE>) are usually heavily optimized with all =
kinds of=20
  smart algorithms and SIMD assembly code. That is why they tend to =
yield the=20
  best quality per encoding time ratio. However, they may have some very =

  advanced options that, if enabled, will make the encode really slow =
for=20
  marginal gains. </P>
  <P>If you are after blazing speed you should stick around the default =
settings=20
  of the video codec (although you should still try the other options =
which are=20
  mentioned in other sections of this guide). </P>
  <P>You may also consider choosing a codec which can do multi-threaded=20
  processing, though this is only useful for users of machines with =
several=20
  CPUs. <CODE class=3Dsystemitem>libavcodec</CODE> MPEG-4 does allow =
that, but=20
  speed gains are limited, and there is a slight negative effect on =
picture=20
  quality. <CODE class=3Dsystemitem>Xvid</CODE>'s multi-threaded =
encoding,=20
  activated by the <TT class=3Doption>threads</TT> option, can be used =
to boost=20
  encoding speed =E2=80=94 by about 40-60% in typical cases =E2=80=94 =
with little if any picture=20
  degradation. <CODE class=3Dsystemitem>x264</CODE> also allows =
multi-threaded=20
  encoding, which currently speeds up encoding by 94% per CPU core while =

  lowering PSNR between 0.005dB and 0.01dB on a typical setup. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Personal taste</STRONG></SPAN>: This is =
where it=20
  gets almost irrational: For the same reason that some hung on to =
DivX&nbsp;3=20
  for years when newer codecs were already doing wonders, some folks =
will prefer=20
  <CODE class=3Dsystemitem>Xvid</CODE> or <CODE =
class=3Dsystemitem>libavcodec</CODE>=20
  MPEG-4 over <CODE class=3Dsystemitem>x264</CODE>. </P>
  <P>You should make your own judgement; do not take advice from people =
who=20
  swear by one codec. Take a few sample clips from raw sources and =
compare=20
  different encoding options and codecs to find one that suits you best. =
The=20
  best codec is the one you master, and the one that looks best to your =
eyes on=20
  your display <SUP>[<A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ftn.fn-menc-feat-dvd-mpeg4-codec-playback"=20
  name=3Dfn-menc-feat-dvd-mpeg4-codec-playback>3</A>]</SUP>! =
</P></LI></UL></DIV>
<P>Please refer to the section <A=20
title=3D"13.1.&nbsp;Selecting codecs and container formats"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-selecting-codec">selecting=20
codecs and container formats</A> to get a list of supported codecs. =
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-audio></A>14.1.11.&nbsp;Audio</H3></DIV></DIV>=
</DIV>
<P>Audio is a much simpler problem to solve: if you care about quality, =
just=20
leave it as is. Even AC-3 5.1 streams are at most 448Kbit/s, and they =
are worth=20
every bit. You might be tempted to transcode the audio to high quality =
Vorbis,=20
but just because you do not have an A/V receiver for AC-3 pass-through =
today=20
does not mean you will not have one tomorrow. Future-proof your DVD rips =
by=20
preserving the AC-3 stream. You can keep the AC-3 stream either by =
copying it=20
directly into the video stream <A=20
title=3D'13.3.&nbsp;Encoding two pass MPEG-4 ("DivX")'=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-mpeg4">during=20
the encoding</A>. You can also extract the AC-3 stream in order to mux =
it into=20
containers such as NUT or Matroska. </P><PRE class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>source_file.vob</CODE></EM> -aid 129 =
-dumpaudio -dumpfile <EM class=3Dreplaceable><CODE>sound.ac3</CODE></EM>
</PRE>
<P>will dump into the file <EM =
class=3Dreplaceable><CODE>sound.ac3</CODE></EM> the=20
audio track number 129 from the file <EM=20
class=3Dreplaceable><CODE>source_file.vob</CODE></EM> (NB: DVD VOB files =
usually=20
use a different audio numbering, which means that the VOB audio track =
129 is the=20
2nd audio track of the file). </P>
<P>But sometimes you truly have no choice but to further compress the =
sound so=20
that more bits can be spent on the video. Most people choose to compress =
audio=20
with either MP3 or Vorbis audio codecs. While the latter is a very=20
space-efficient codec, MP3 is better supported by hardware players, =
although=20
this trend is changing. </P>
<P>Do <SPAN class=3Demphasis><EM>not</EM></SPAN> use <TT=20
class=3Doption>-nosound</TT> when encoding a file with audio, even if =
you will be=20
encoding and muxing audio separately later. Though it may work in ideal =
cases,=20
using <TT class=3Doption>-nosound</TT> is likely to hide some problems =
in your=20
encoding command line setting. In other words, having a soundtrack =
during your=20
encode assures you that, provided you do not see messages such as =
=E2=80=9C<SPAN=20
class=3Dquote>Too many audio packets in the buffer</SPAN>=E2=80=9D, you =
will be able to=20
get proper sync. </P>
<P>You need to have <SPAN class=3Dapplication>MEncoder</SPAN> process =
the sound.=20
You can for example copy the orignal soundtrack during the encode with =
<TT=20
class=3Doption>-oac copy</TT> or convert it to a "light" 4 kHz mono WAV =
PCM with=20
<TT class=3Doption>-oac pcm -channels 1 -srate 4000</TT>. Otherwise, in =
some=20
cases, it will generate a video file that will not sync with the audio. =
Such=20
cases are when the number of video frames in the source file does not =
match up=20
to the total length of audio frames or whenever there are=20
discontinuities/splices where there are missing or extra audio frames. =
The=20
correct way to handle this kind of problem is to insert silence or cut =
audio at=20
these points. However <SPAN class=3Dapplication>MPlayer</SPAN> cannot do =
that, so=20
if you demux the AC-3 audio and encode it with a separate app (or dump =
it to PCM=20
with <SPAN class=3Dapplication>MPlayer</SPAN>), the splices will be left =
incorrect=20
and the only way to correct them is to drop/dup video frames at the =
splice. As=20
long as <SPAN class=3Dapplication>MEncoder</SPAN> sees the audio when it =
is=20
encoding the video, it can do this dropping/duping (which is usually OK =
since it=20
takes place at full black/scenechange), but if <SPAN=20
class=3Dapplication>MEncoder</SPAN> cannot see the audio, it will just =
process all=20
frames as-is and they will not fit the final audio stream when you for =
example=20
merge your audio and video track into a Matroska file. </P>
<P>First of all, you will have to convert the DVD sound into a WAV file =
that the=20
audio codec can use as input. For example: </P><PRE =
class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>source_file.vob</CODE></EM> -ao pcm:file=3D<EM =
class=3Dreplaceable><CODE>destination_sound.wav</CODE></EM> \
    -vc dummy -aid 1 -vo null
</PRE>
<P>will dump the second audio track from the file <EM=20
class=3Dreplaceable><CODE>source_file.vob</CODE></EM> into the file <EM=20
class=3Dreplaceable><CODE>destination_sound.wav</CODE></EM>. You may =
want to=20
normalize the sound before encoding, as DVD audio tracks are commonly =
recorded=20
at low volumes. You can use the tool <SPAN =
class=3Dapplication>normalize</SPAN>=20
for instance, which is available in most distributions. If you are using =

Windows, a tool such as <SPAN class=3Dapplication>BeSweet</SPAN> can do =
the same=20
job. You will compress in either Vorbis or MP3. For example: </P><PRE =
class=3Dscreen>oggenc -q1 <EM =
class=3Dreplaceable><CODE>destination_sound.wav</CODE></EM></PRE>
<P>will encode <EM =
class=3Dreplaceable><CODE>destination_sound.wav</CODE></EM>=20
with the encoding quality 1, which is roughly equivalent to 80Kb/s, and =
is the=20
minimum quality at which you should encode if you care about quality. =
Please=20
note that <SPAN class=3Dapplication>MEncoder</SPAN> currently cannot mux =
Vorbis=20
audio tracks into the output file because it only supports AVI and MPEG=20
containers as an output, each of which may lead to audio/video playback=20
synchronization problems with some players when the AVI file contain VBR =
audio=20
streams such as Vorbis. Do not worry, this document will show you how =
you can do=20
that with third party programs. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-muxing></A>14.1.12.&nbsp;Muxing</H3></DIV></DI=
V></DIV>
<P>Now that you have encoded your video, you will most likely want to =
mux it=20
with one or more audio tracks into a movie container, such as AVI, MPEG, =

Matroska or NUT. <SPAN class=3Dapplication>MEncoder</SPAN> is currently =
only able=20
to natively output audio and video into MPEG and AVI container formats. =
for=20
example: </P><PRE class=3Dscreen>mencoder -oac copy -ovc copy  -o <EM =
class=3Dreplaceable><CODE>output_movie.avi</CODE></EM> \
    -audiofile <EM class=3Dreplaceable><CODE>input_audio.mp2</CODE></EM> =
<EM class=3Dreplaceable><CODE>input_video.avi</CODE></EM>
</PRE>
<P>This would merge the video file <EM=20
class=3Dreplaceable><CODE>input_video.avi</CODE></EM> and the audio file =
<EM=20
class=3Dreplaceable><CODE>input_audio.mp2</CODE></EM> into the AVI file =
<EM=20
class=3Dreplaceable><CODE>output_movie.avi</CODE></EM>. This command =
works with=20
MPEG-1 layer I, II and III (more commonly known as MP3) audio, WAV and a =
few=20
other audio formats too. </P>
<P><SPAN class=3Dapplication>MEncoder</SPAN> features experimental =
support for=20
<CODE class=3Dsystemitem>libavformat</CODE>, which is a library from the =
FFmpeg=20
project that supports muxing and demuxing a variety of containers. For =
example:=20
</P><PRE class=3Dscreen>mencoder -oac copy -ovc copy -o <EM =
class=3Dreplaceable><CODE>output_movie.asf</CODE></EM> -audiofile <EM =
class=3Dreplaceable><CODE>input_audio.mp2</CODE></EM> \
    <EM class=3Dreplaceable><CODE>input_video.avi</CODE></EM> -of lavf =
-lavfopts format=3Dasf
</PRE>
<P>This will do the same thing as the previous example, except that the =
output=20
container will be ASF. Please note that this support is highly =
experimental (but=20
getting better every day), and will only work if you compiled <SPAN=20
class=3Dapplication>MPlayer</SPAN> with the support for <CODE=20
class=3Dsystemitem>libavformat</CODE> enabled (which means that a =
pre-packaged=20
binary version will not work in most cases). </P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-muxing-filter-issues></A>14.1.12.1.&nbsp;Impro=
ving=20
muxing and A/V sync reliability</H4></DIV></DIV></DIV>
<P>You may experience some serious A/V sync problems while trying to mux =
your=20
video and some audio tracks, where no matter how you adjust the audio =
delay, you=20
will never get proper sync. That may happen when you use some video =
filters that=20
will drop or duplicate some frames, like the inverse telecine filters. =
It is=20
strongly encouraged to append the <TT class=3Doption>harddup</TT> video =
filter at=20
the end of the filter chain to avoid this kind of problem. </P>
<P>Without <TT class=3Doption>harddup</TT>, if <SPAN=20
class=3Dapplication>MEncoder</SPAN> wants to duplicate a frame, it =
relies on the=20
muxer to put a mark on the container so that the last frame will be =
displayed=20
again to maintain sync while writing no actual frame. With <TT=20
class=3Doption>harddup</TT>, <SPAN class=3Dapplication>MEncoder</SPAN> =
will instead=20
just push the last frame displayed again into the filter chain. This =
means that=20
the encoder receives the <SPAN class=3Demphasis><EM>exact</EM></SPAN> =
same frame=20
twice, and compresses it. This will result in a slightly bigger file, =
but will=20
not cause problems when demuxing or remuxing into other container =
formats. </P>
<P>You may also have no choice but to use <TT =
class=3Doption>harddup</TT> with=20
container formats that are not too tightly linked with <SPAN=20
class=3Dapplication>MEncoder</SPAN> such as the ones supported through =
<CODE=20
class=3Dsystemitem>libavformat</CODE>, which may not support frame =
duplication at=20
the container level. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-muxing-avi-limitations></A>14.1.12.2.&nbsp;Lim=
itations=20
of the AVI container</H4></DIV></DIV></DIV>
<P>Although it is the most widely-supported container format after =
MPEG-1, AVI=20
also has some major drawbacks. Perhaps the most obvious is the overhead. =
For=20
each chunk of the AVI file, 24 bytes are wasted on headers and index. =
This=20
translates into a little over 5 MB per hour, or 1-2.5% overhead for a =
700 MB=20
movie. This may not seem like much, but it could mean the difference =
between=20
being able to use 700 kbit/sec video or 714 kbit/sec, and every bit of =
quality=20
counts. </P>
<P>In addition this gross inefficiency, AVI also has the following major =

limitations: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>Only fixed-fps content can be stored. This is particularly limiting =
if the=20
  original material you want to encode is mixed content, for example a =
mix of=20
  NTSC video and film material. Actually there are hacks that can be =
used to=20
  store mixed-framerate content in AVI, but they increase the (already =
huge)=20
  overhead fivefold or more and so are not practical. </P>
  <LI>
  <P>Audio in AVI files must be either constant-bitrate (CBR) or=20
  constant-framesize (i.e. all frames decode to the same number of =
samples).=20
  Unfortunately, the most efficient codec, Vorbis, does not meet either =
of these=20
  requirements. Therefore, if you plan to store your movie in AVI, you =
will have=20
  to use a less efficient codec such as MP3 or AC-3. =
</P></LI></OL></DIV>
<P>Having said all that, <SPAN class=3Dapplication>MEncoder</SPAN> does =
not=20
currently support variable-fps output or Vorbis encoding. Therefore, you =
may not=20
see these as limitations if <SPAN class=3Dapplication>MEncoder</SPAN> is =
the only=20
tool you will be using to produce your encodes. However, it is possible =
to use=20
<SPAN class=3Dapplication>MEncoder</SPAN> only for video encoding, and =
then use=20
external tools to encode audio and mux it into another container format. =

</P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-muxing-matroska></A>14.1.12.3.&nbsp;Muxing =
into the=20
Matroska container</H4></DIV></DIV></DIV>
<P>Matroska is a free, open standard container format, aiming to offer a =
lot of=20
advanced features, which older containers like AVI cannot handle. For =
example,=20
Matroska supports variable bitrate audio content (VBR), variable =
framerates=20
(VFR), chapters, file attachments, error detection code (EDC) and modern =
A/V=20
Codecs like "Advanced Audio Coding" (AAC), "Vorbis" or "MPEG-4 AVC" =
(H.264),=20
next to nothing handled by AVI. </P>
<P>The tools required to create Matroska files are collectively called =
<SPAN=20
class=3Dapplication>mkvtoolnix</SPAN>, and are available for most Unix =
platforms=20
as well as <SPAN class=3Dapplication>Windows</SPAN>. Because Matroska is =
an open=20
standard you may find other tools that suit you better, but since =
mkvtoolnix is=20
the most common, and is supported by the Matroska team itself, we will =
only=20
cover its usage. </P>
<P>Probably the easiest way to get started with Matroska is to use <SPAN =

class=3Dapplication>MMG</SPAN>, the graphical frontend shipped with =
<SPAN=20
class=3Dapplication>mkvtoolnix</SPAN>, and follow the <A=20
href=3D"http://www.bunkus.org/videotools/mkvtoolnix/doc/mkvmerge-gui.html=
"=20
target=3D_top>guide to mkvmerge GUI (mmg)</A> </P>
<P>You may also mux audio and video files using the command line: =
</P><PRE class=3Dscreen>mkvmerge -o <EM =
class=3Dreplaceable><CODE>output.mkv</CODE></EM> <EM =
class=3Dreplaceable><CODE>input_video.avi</CODE></EM> <EM =
class=3Dreplaceable><CODE>input_audio1.mp3</CODE></EM> <EM =
class=3Dreplaceable><CODE>input_audio2.ac3</CODE></EM>
</PRE>
<P>This would merge the video file <EM=20
class=3Dreplaceable><CODE>input_video.avi</CODE></EM> and the two audio =
files <EM=20
class=3Dreplaceable><CODE>input_audio1.mp3</CODE></EM> and <EM=20
class=3Dreplaceable><CODE>input_audio2.ac3</CODE></EM> into the Matroska =
file <EM=20
class=3Dreplaceable><CODE>output.mkv</CODE></EM>. Matroska, as mentioned =
earlier,=20
is able to do much more than that, like multiple audio tracks (including =

fine-tuning of audio/video synchronization), chapters, subtitles, =
splitting,=20
etc... Please refer to the documentation of those applications for more =
details.=20
</P></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-telecine></A>14.2.&nbsp;How to deal with telecine and =
interlacing=20
within NTSC DVDs</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-intro></A>14.2.1.&nbsp;Introduction</H3></DIV><=
/DIV></DIV>
<P><B>What is telecine?&nbsp;</B> If you do not understand much of what =
is=20
written in this document, read the <A=20
href=3D"http://en.wikipedia.org/wiki/Telecine" target=3D_top>Wikipedia =
entry on=20
telecine</A>. It is an understandable and reasonably comprehensive =
description=20
of what telecine is. </P>
<P><B>A note about the numbers.&nbsp;</B> Many documents, including the =
guide=20
linked above, refer to the fields per second value of NTSC video as =
59.94 and=20
the corresponding frames per second values as 29.97 (for telecined and=20
interlaced) and 23.976 (for progressive). For simplicity, some documents =
even=20
round these numbers to 60, 30, and 24. </P>
<P>Strictly speaking, all those numbers are approximations. Black and =
white NTSC=20
video was exactly 60 fields per second, but 60000/1001 was later chosen =
to=20
accomodate color data while remaining compatible with contemporary black =
and=20
white televisions. Digital NTSC video (such as on a DVD) is also =
60000/1001=20
fields per second. From this, interlaced and telecined video are derived =
to be=20
30000/1001 frames per second; progressive video is 24000/1001 frames per =
second.=20
</P>
<P>Older versions of the <SPAN class=3Dapplication>MEncoder</SPAN> =
documentation=20
and many archived mailing list posts refer to 59.94, 29.97, and 23.976. =
All=20
<SPAN class=3Dapplication>MEncoder</SPAN> documentation has been updated =
to use=20
the fractional values, and you should use them too. </P>
<P><TT class=3Doption>-ofps 23.976</TT> is incorrect. <TT =
class=3Doption>-ofps=20
24000/1001</TT> should be used instead. </P>
<P><B>How telecine is used.&nbsp;</B> All video intended to be displayed =
on an=20
NTSC television set must be 60000/1001 fields per second. Made-for-TV =
movies and=20
shows are often filmed directly at 60000/1001 fields per second, but the =

majority of cinema is filmed at 24 or 24000/1001 frames per second. When =

cinematic movie DVDs are mastered, the video is then converted for =
television=20
using a process called telecine. </P>
<P>On a DVD, the video is never actually stored as 60000/1001 fields per =
second.=20
For video that was originally 60000/1001, each pair of fields is =
combined to=20
form a frame, resulting in 30000/1001 frames per second. Hardware DVD =
players=20
then read a flag embedded in the video stream to determine whether the =
odd- or=20
even-numbered lines should form the first field. </P>
<P>Usually, 24000/1001 frames per second content stays as it is when =
encoded for=20
a DVD, and the DVD player must perform telecining on-the-fly. Sometimes, =

however, the video is telecined <SPAN =
class=3Demphasis><EM>before</EM></SPAN>=20
being stored on the DVD; even though it was originally 24000/1001 frames =
per=20
second, it becomes 60000/1001 fields per second. When it is stored on =
the DVD,=20
pairs of fields are combined to form 30000/1001 frames per second. </P>
<P>When looking at individual frames formed from 60000/1001 fields per =
second=20
video, telecined or otherwise, interlacing is clearly visible wherever =
there is=20
any motion, because one field (say, the even-numbered lines) represents =
a moment=20
in time 1/(60000/1001) seconds later than the other. Playing interlaced =
video on=20
a computer looks ugly both because the monitor is higher resolution and =
because=20
the video is shown frame-after-frame instead of field-after-field. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>Notes:</B></P>
<UL type=3Ddisc>
  <LI>
  <P>This section only applies to NTSC DVDs, and not PAL. </P>
  <LI>
  <P>The example <SPAN class=3Dapplication>MEncoder</SPAN> lines =
throughout the=20
  document are <SPAN class=3Dbold><STRONG>not</STRONG></SPAN> intended =
for actual=20
  use. They are simply the bare minimum required to encode the =
pertaining video=20
  category. How to make good DVD rips or fine-tune <CODE=20
  class=3Dsystemitem>libavcodec</CODE> for maximal quality is not within =
the scope=20
  of this document. </P>
  <LI>
  <P>There are a couple footnotes specific to this guide, linked like =
this: <A=20
  title=3D14.2.4.&nbsp;Footnotes=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-footnotes">[1]</A>=20
  </P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-telecine-ident></A>14.2.2.&nbsp;How to tell=20
what type of video you have</H3></DIV></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-ident-progressive></A>14.2.2.1.&nbsp;Progressiv=
e</H4></DIV></DIV></DIV>
<P>Progressive video was originally filmed at 24000/1001 fps, and stored =
on the=20
DVD without alteration. </P>
<P>When you play a progressive DVD in <SPAN =
class=3Dapplication>MPlayer</SPAN>,=20
<SPAN class=3Dapplication>MPlayer</SPAN> will print the following line =
as soon as=20
the movie begins to play: </P><PRE class=3Dscreen>demux_mpg: 24000/1001 =
fps progressive NTSC content detected, switching framerate.
</PRE>
<P>From this point forward, demux_mpg should never say it finds =
"30000/1001 fps=20
NTSC content." </P>
<P>When you watch progressive video, you should never see any =
interlacing.=20
Beware, however, because sometimes there is a tiny bit of telecine mixed =
in=20
where you would not expect. I have encountered TV show DVDs that have =
one second=20
of telecine at every scene change, or at seemingly random places. I once =
watched=20
a DVD that had a progressive first half, and the second half was =
telecined. If=20
you want to be <SPAN class=3Demphasis><EM>really</EM></SPAN> thorough, =
you can=20
scan the entire movie: </P><PRE class=3Dscreen>mplayer dvd://1 -nosound =
-vo null -benchmark</PRE>
<P>Using <TT class=3Doption>-benchmark</TT> makes <SPAN=20
class=3Dapplication>MPlayer</SPAN> play the movie as quickly as it =
possibly can;=20
still, depending on your hardware, it can take a while. Every time =
demux_mpg=20
reports a framerate change, the line immediately above will show you the =
time at=20
which the change occurred. </P>
<P>Sometimes progressive video on DVDs is referred to as "soft-telecine" =
because=20
it is intended to be telecined by the DVD player. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-ident-telecined></A>14.2.2.2.&nbsp;Telecined</H=
4></DIV></DIV></DIV>
<P>Telecined video was originally filmed at 24000/1001, but was =
telecined <SPAN=20
class=3Demphasis><EM>before</EM></SPAN> it was written to the DVD. </P>
<P><SPAN class=3Dapplication>MPlayer</SPAN> does not (ever) report any =
framerate=20
changes when it plays telecined video. </P>
<P>Watching a telecined video, you will see interlacing artifacts that =
seem to=20
"blink": they repeatedly appear and disappear. You can look closely at =
this by=20
</P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI><PRE class=3Dscreen>mplayer dvd://1</PRE>
  <LI>
  <P>Seek to a part with motion. </P>
  <LI>
  <P>Use the <SPAN class=3Dkeycap><B>.</B></SPAN> key to step forward =
one frame at=20
  a time. </P>
  <LI>
  <P>Look at the pattern of interlaced-looking and progressive-looking =
frames.=20
  If the pattern you see is PPPII,PPPII,PPPII,... then the video is =
telecined.=20
  If you see some other pattern, then the video may have been telecined =
using=20
  some non-standard method; <SPAN class=3Dapplication>MEncoder</SPAN> =
cannot=20
  losslessly convert non-standard telecine to progressive. If you do not =
see any=20
  pattern at all, then it is most likely interlaced. =
</P></LI></OL></DIV>
<P></P>
<P>Sometimes telecined video on DVDs is referred to as "hard-telecine". =
Since=20
hard-telecine is already 60000/1001 fields per second, the DVD player =
plays the=20
video without any manipulation. </P>
<P>Another way to tell if your source is telecined or not is to play the =
source=20
with the <TT class=3Doption>-vf pullup</TT> and <TT =
class=3Doption>-v</TT> command=20
line options to see how <TT class=3Doption>pullup</TT> matches frames. =
If the=20
source is telecined, you should see on the console a 3:2 pattern with =
<CODE=20
class=3Dsystemitem>0+.1.+2</CODE> and <CODE =
class=3Dsystemitem>0++1</CODE>=20
alternating. This technique has the advantage that you do not need to =
watch the=20
source to identify it, which could be useful if you wish to automate the =

encoding procedure, or to carry out said procedure remotely via a slow=20
connection. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-ident-interlaced></A>14.2.2.3.&nbsp;Interlaced<=
/H4></DIV></DIV></DIV>
<P>Interlaced video was originally filmed at 60000/1001 fields per =
second, and=20
stored on the DVD as 30000/1001 frames per second. The interlacing =
effect (often=20
called "combing") is a result of combining pairs of fields into frames. =
Each=20
field is supposed to be 1/(60000/1001) seconds apart, and when they are=20
displayed simultaneously the difference is apparent. </P>
<P>As with telecined video, <SPAN class=3Dapplication>MPlayer</SPAN> =
should not=20
ever report any framerate changes when playing interlaced content. </P>
<P>When you view an interlaced video closely by frame-stepping with the =
<SPAN=20
class=3Dkeycap><B>.</B></SPAN> key, you will see that every single frame =
is=20
interlaced. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-ident-mixedpt></A>14.2.2.4.&nbsp;Mixed =
progressive and=20
telecine</H4></DIV></DIV></DIV>
<P>All of a "mixed progressive and telecine" video was originally =
24000/1001=20
frames per second, but some parts of it ended up being telecined. </P>
<P>When <SPAN class=3Dapplication>MPlayer</SPAN> plays this category, it =
will=20
(often repeatedly) switch back and forth between "30000/1001 fps NTSC" =
and=20
"24000/1001 fps progressive NTSC". Watch the bottom of <SPAN=20
class=3Dapplication>MPlayer</SPAN>'s output to see these messages. </P>
<P>You should check the "30000/1001 fps NTSC" sections to make sure they =
are=20
actually telecine, and not just interlaced. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-ident-mixedpi></A>14.2.2.5.&nbsp;Mixed =
progressive and=20
interlaced</H4></DIV></DIV></DIV>
<P>In "mixed progressive and interlaced" content, progressive and =
interlaced=20
video have been spliced together. </P>
<P>This category looks just like "mixed progressive and telecine", until =
you=20
examine the 30000/1001 fps sections and see that they do not have the =
telecine=20
pattern. </P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-telecine-encode></A>14.2.3.&nbsp;How to encode=20
each category</H3></DIV></DIV></DIV>
<P>As I mentioned in the beginning, example <SPAN=20
class=3Dapplication>MEncoder</SPAN> lines below are <SPAN=20
class=3Dbold><STRONG>not</STRONG></SPAN> meant to actually be used; they =
only=20
demonstrate the minimum parameters to properly encode each category. =
</P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-encode-progressive></A>14.2.3.1.&nbsp;Progressi=
ve</H4></DIV></DIV></DIV>
<P>Progressive video requires no special filtering to encode. The only =
parameter=20
you need to be sure to use is <TT class=3Doption>-ofps 24000/1001</TT>. =
Otherwise,=20
<SPAN class=3Dapplication>MEncoder</SPAN> will try to encode at =
30000/1001 fps and=20
will duplicate frames. </P>
<P></P><PRE class=3Dscreen>mencoder dvd://1 -oac copy -ovc lavc -ofps =
24000/1001</PRE>
<P></P>
<P>It is often the case, however, that a video that looks progressive =
actually=20
has very short parts of telecine mixed in. Unless you are sure, it is =
safest to=20
treat the video as <A title=3D"14.2.3.4.&nbsp;Mixed progressive and =
telecine"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-mixedpt">mixed=20
progressive and telecine</A>. The performance loss is small <A=20
title=3D14.2.4.&nbsp;Footnotes=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-footnotes">[3]</A>.=20
</P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-encode-telecined></A>14.2.3.2.&nbsp;Telecined</=
H4></DIV></DIV></DIV>
<P>Telecine can be reversed to retrieve the original 24000/1001 content, =
using a=20
process called inverse-telecine. <SPAN =
class=3Dapplication>MPlayer</SPAN> contains=20
several filters to accomplish this; the best filter, <TT=20
class=3Doption>pullup</TT>, is described in the <A=20
title=3D"14.2.3.4.&nbsp;Mixed progressive and telecine"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-encode-mixedpt">mixed=20
progressive and telecine</A> section. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-encode-interlaced></A>14.2.3.3.&nbsp;Interlaced=
</H4></DIV></DIV></DIV>
<P>For most practical cases it is not possible to retrieve a complete=20
progressive video from interlaced content. The only way to do so without =
losing=20
half of the vertical resolution is to double the framerate and try to =
"guess"=20
what ought to make up the corresponding lines for each field (this has =
drawbacks=20
- see method 3). </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>Encode the video in interlaced form. Normally, interlacing wreaks =
havoc=20
  with the encoder's ability to compress well, but <CODE=20
  class=3Dsystemitem>libavcodec</CODE> has two parameters specifically =
for dealing=20
  with storing interlaced video a bit better: <TT =
class=3Doption>ildct</TT> and=20
  <TT class=3Doption>ilme</TT>. Also, using <TT =
class=3Doption>mbd=3D2</TT> is=20
  strongly recommended <A title=3D14.2.4.&nbsp;Footnotes=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-footnotes">[2]=20
  </A>because it will encode macroblocks as non-interlaced in places =
where there=20
  is no motion. Note that <TT class=3Doption>-ofps</TT> is NOT needed =
here. </P><PRE class=3Dscreen>mencoder dvd://1 -oac copy -ovc lavc =
-lavcopts ildct:ilme:mbd=3D2</PRE>
  <P></P>
  <LI>
  <P>Use a deinterlacing filter before encoding. There are several of =
these=20
  filters available to choose from, each with its own advantages and=20
  disadvantages. Consult <TT class=3Doption>mplayer -pphelp</TT> and <TT =

  class=3Doption>mplayer -vf help</TT> to see what is available (grep =
for=20
  "deint"), read Michael's Niedermayer <A=20
  href=3D"http://guru.multimedia.cx/deinterlacing-filters/"=20
  target=3D_top>Deinterlacing filters comparison</A>, and search the <A=20
  href=3D"http://www.mplayerhq.hu/design7/mailing_lists.html" =
target=3D_top>MPlayer=20
  mailing lists</A> to find many discussions about the various filters. =
Again,=20
  the framerate is not changing, so no <TT class=3Doption>-ofps</TT>. =
Also,=20
  deinterlacing should be done after cropping <A =
title=3D14.2.4.&nbsp;Footnotes=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-footnotes">[1]</A>=20
  and before scaling. </P><PRE class=3Dscreen>mencoder dvd://1 -oac copy =
-vf yadif -ovc lavc</PRE>
  <P></P>
  <LI>
  <P>Unfortunately, this option is buggy with <SPAN=20
  class=3Dapplication>MEncoder</SPAN>; it ought to work well with <SPAN=20
  class=3Dapplication>MEncoder G2</SPAN>, but that is not here yet. You =
might=20
  experience crahes. Anyway, the purpose of <TT class=3Doption>-vf =
tfields</TT> is=20
  to create a full frame out of each field, which makes the framerate=20
  60000/1001. The advantage of this approach is that no data is ever =
lost;=20
  however, since each frame comes from only one field, the missing lines =
have to=20
  be interpolated somehow. There are no very good methods of generating =
the=20
  missing data, and so the result will look a bit similar to when using =
some=20
  deinterlacing filters. Generating the missing lines creates other =
issues, as=20
  well, simply because the amount of data doubles. So, higher encoding =
bitrates=20
  are required to maintain quality, and more CPU power is used for both =
encoding=20
  and decoding. tfields has several different options for how to create =
the=20
  missing lines of each frame. If you use this method, then Reference =
the=20
  manual, and chose whichever option looks best for your material. Note =
that=20
  when using <TT class=3Doption>tfields</TT> you <SPAN =
class=3Dbold><STRONG>have=20
  to</STRONG></SPAN> specify both <TT class=3Doption>-fps</TT> and <TT=20
  class=3Doption>-ofps</TT> to be twice the framerate of your original =
source.=20
</P><PRE class=3Dscreen>mencoder dvd://1 -oac copy -vf tfields=3D2 -ovc =
lavc \
    -fps 60000/1001 -ofps 60000/1001</PRE>
  <P></P>
  <LI>
  <P>If you plan on downscaling dramatically, you can extract and encode =
only=20
  one of the two fields. Of course, you will lose half the vertical =
resolution,=20
  but if you plan on downscaling to at most 1/2 of the original, the =
loss will=20
  not matter much. The result will be a progressive 30000/1001 frames =
per second=20
  file. The procedure is to use <TT class=3Doption>-vf field</TT>, then =
crop <A=20
  title=3D14.2.4.&nbsp;Footnotes=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-footnotes">[1]</A>=20
  and scale appropriately. Remember that you will have to adjust the =
scale to=20
  compensate for the vertical resolution being halved. </P><PRE =
class=3Dscreen>mencoder dvd://1 -oac copy -vf field=3D0 -ovc lavc</PRE>
  <P></P></LI></OL></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-encode-mixedpt></A>14.2.3.4.&nbsp;Mixed =
progressive and=20
telecine</H4></DIV></DIV></DIV>
<P>In order to turn mixed progressive and telecine video into entirely=20
progressive video, the telecined parts have to be inverse-telecined. =
There are=20
three ways to accomplish this, described below. Note that you should =
<SPAN=20
class=3Dbold><STRONG>always</STRONG></SPAN> inverse-telecine before any =
rescaling;=20
unless you really know what you are doing, inverse-telecine before =
cropping, too=20
<A title=3D14.2.4.&nbsp;Footnotes=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine-footnotes">[1]</A>.=20
<TT class=3Doption>-ofps 24000/1001</TT> is needed here because the =
output video=20
will be 24000/1001 frames per second. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><TT class=3Doption>-vf pullup</TT> is designed to inverse-telecine =
telecined=20
  material while leaving progressive data alone. In order to work =
properly, <TT=20
  class=3Doption>pullup</TT> <SPAN =
class=3Dbold><STRONG>must</STRONG></SPAN> be=20
  followed by the <TT class=3Doption>softskip</TT> filter or else <SPAN=20
  class=3Dapplication>MEncoder</SPAN> will crash. <TT =
class=3Doption>pullup</TT> is,=20
  however, the cleanest and most accurate method available for encoding =
both=20
  telecine and "mixed progressive and telecine". </P><PRE =
class=3Dscreen>mencoder dvd://1 -oac copy -vf pullup,softskip=20
    -ovc lavc -ofps 24000/1001</PRE>
  <P></P>
  <LI>
  <P>An older method is to, rather than inverse-telecine the telecined =
parts,=20
  telecine the non-telecined parts and then inverse-telecine the whole =
video.=20
  Sound confusing? softpulldown is a filter that goes through a video =
and makes=20
  the entire file telecined. If we follow softpulldown with either <TT=20
  class=3Doption>detc</TT> or <TT class=3Doption>ivtc</TT>, the final =
result will be=20
  entirely progressive. <TT class=3Doption>-ofps 24000/1001</TT> is =
needed. </P><PRE class=3Dscreen>mencoder dvd://1 -oac copy -vf =
softpulldown,ivtc=3D1 -ovc lavc -ofps 24000/1001
  </PRE>
  <P></P>
  <LI>
  <P>I have not used <TT class=3Doption>-vf filmdint</TT> myself, but =
here is what=20
  D Richard Felker III has to say: </P>
  <DIV class=3Dblockquote>
  <BLOCKQUOTE class=3Dblockquote>
    <P>It is OK, but IMO it tries to deinterlace rather than doing =
inverse=20
    telecine too often (much like settop DVD players &amp; progressive =
TVs)=20
    which gives ugly flickering and other artifacts. If you are going to =
use it,=20
    you at least need to spend some time tuning the options and watching =
the=20
    output first to make sure it is not messing up. =
</P></BLOCKQUOTE></DIV>
  <P></P></LI></UL></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-encode-mixedpi></A>14.2.3.5.&nbsp;Mixed =
progressive and=20
interlaced</H4></DIV></DIV></DIV>
<P>There are two options for dealing with this category, each of which =
is a=20
compromise. You should decide based on the duration/location of each =
type. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>Treat it as progressive. The interlaced parts will look interlaced, =
and=20
  some of the interlaced fields will have to be dropped, resulting in a =
bit of=20
  uneven jumpiness. You can use a postprocessing filter if you want to, =
but it=20
  may slightly degrade the progressive parts. </P>
  <P>This option should definitely not be used if you want to eventually =
display=20
  the video on an interlaced device (with a TV card, for example). If =
you have=20
  interlaced frames in a 24000/1001 frames per second video, they will =
be=20
  telecined along with the progressive frames. Half of the interlaced =
"frames"=20
  will be displayed for three fields' duration (3/(60000/1001) seconds), =

  resulting in a flicking "jump back in time" effect that looks quite =
bad. If=20
  you even attempt this, you <SPAN =
class=3Dbold><STRONG>must</STRONG></SPAN> use a=20
  deinterlacing filter like <TT class=3Doption>lb</TT> or <TT=20
  class=3Doption>l5</TT>. </P>
  <P>It may also be a bad idea for progressive display, too. It will =
drop pairs=20
  of consecutive interlaced fields, resulting in a discontinuity that =
can be=20
  more visible than with the second method, which shows some progressive =
frames=20
  twice. 30000/1001 frames per second interlaced video is already a bit =
choppy=20
  because it really should be shown at 60000/1001 fields per second, so =
the=20
  duplicate frames do not stand out as much. </P>
  <P>Either way, it is best to consider your content and how you intend =
to=20
  display it. If your video is 90% progressive and you never intend to =
show it=20
  on a TV, you should favor a progressive approach. If it is only half=20
  progressive, you probably want to encode it as if it is all =
interlaced. </P>
  <LI>
  <P>Treat it as interlaced. Some frames of the progressive parts will =
need to=20
  be duplicated, resulting in uneven jumpiness. Again, deinterlacing =
filters may=20
  slightly degrade the progressive parts. =
</P></LI></UL></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-telecine-footnotes></A>14.2.4.&nbsp;Footnotes</H3></DIV>=
</DIV></DIV>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P><B>About cropping:&nbsp;</B> Video data on DVDs are stored in a =
format=20
  called YUV 4:2:0. In YUV video, luma ("brightness") and chroma =
("color") are=20
  stored separately. Because the human eye is somewhat less sensitive to =
color=20
  than it is to brightness, in a YUV 4:2:0 picture there is only one =
chroma=20
  pixel for every four luma pixels. In a progressive picture, each =
square of=20
  four luma pixels (two on each side) has one common chroma pixel. You =
must crop=20
  progressive YUV 4:2:0 to even resolutions, and use even offsets. For =
example,=20
  <TT class=3Doption>crop=3D716:380:2:26</TT> is OK but <TT=20
  class=3Doption>crop=3D716:380:3:26 </TT>is not. </P>
  <P>When you are dealing with interlaced YUV 4:2:0, the situation is a =
bit more=20
  complicated. Instead of every four luma pixels in the <SPAN=20
  class=3Demphasis><EM>frame</EM></SPAN> sharing a chroma pixel, every =
four luma=20
  pixels in each <SPAN class=3Demphasis><EM>field</EM></SPAN> share a =
chroma=20
  pixel. When fields are interlaced to form a frame, each scanline is =
one pixel=20
  high. Now, instead of all four luma pixels being in a square, there =
are two=20
  pixels side-by-side, and the other two pixels are side-by-side two =
scanlines=20
  down. The two luma pixels in the intermediate scanline are from the =
other=20
  field, and so share a different chroma pixel with two luma pixels two=20
  scanlines away. All this confusion makes it necessary to have vertical =
crop=20
  dimensions and offsets be multiples of four. Horizontal can stay even. =
</P>
  <P>For telecined video, I recommend that cropping take place after =
inverse=20
  telecining. Once the video is progressive you only need to crop by =
even=20
  numbers. If you really want to gain the slight speedup that cropping =
first may=20
  offer, you must crop vertically by multiples of four or else the=20
  inverse-telecine filter will not have proper data. </P>
  <P>For interlaced (not telecined) video, you must always crop =
vertically by=20
  multiples of four unless you use <TT class=3Doption>-vf field</TT> =
before=20
  cropping. </P>
  <LI>
  <P><B>About encoding parameters and quality:&nbsp;</B> Just because I=20
  recommend <TT class=3Doption>mbd=3D2</TT> here does not mean it should =
not be used=20
  elsewhere. Along with <TT class=3Doption>trell</TT>, <TT =
class=3Doption>mbd=3D2</TT>=20
  is one of the two <CODE class=3Dsystemitem>libavcodec</CODE> options =
that=20
  increases quality the most, and you should always use at least those =
two=20
  unless the drop in encoding speed is prohibitive (e.g. realtime =
encoding).=20
  There are many other options to <CODE =
class=3Dsystemitem>libavcodec</CODE> that=20
  increase encoding quality (and decrease encoding speed) but that is =
beyond the=20
  scope of this document. </P>
  <LI>
  <P><B>About the performance of pullup:&nbsp;</B> It is safe to use <TT =

  class=3Doption>pullup</TT> (along with <TT class=3Doption>softskip =
</TT>) on=20
  progressive video, and is usually a good idea unless the source has =
been=20
  definitively verified to be entirely progressive. The performace loss =
is small=20
  for most cases. On a bare-minimum encode, <TT =
class=3Doption>pullup</TT> causes=20
  <SPAN class=3Dapplication>MEncoder</SPAN> to be 50% slower. Adding =
sound=20
  processing and advanced <TT class=3Doption>lavcopts </TT>overshadows =
that=20
  difference, bringing the performance decrease of using <TT=20
  class=3Doption>pullup</TT> down to 2%. =
</P></LI></OL></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-enc-libavcodec></A>14.3.&nbsp;Encoding with the <CODE=20
class=3Dsystemitem>libavcodec</CODE> codec family</H2></DIV></DIV></DIV>
<P><A title=3D7.1.1.&nbsp;FFmpeg/libavcodec=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ffmpeg"><CODE=20
class=3Dsystemitem>libavcodec</CODE></A> provides simple encoding to a =
lot of=20
interesting video and audio formats. You can encode to the following =
codecs=20
(more or less up to date): </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-enc-libavcodec-video-codecs></A>14.3.1.&nbsp;<CODE=20
class=3Dsystemitem>libavcodec</CODE>'s video =
codecs</H3></DIV></DIV></DIV>
<P></P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Video codec name</TH>
    <TH>Description</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>mjpeg</TD>
    <TD>Motion JPEG</TD></TR>
  <TR>
    <TD>ljpeg</TD>
    <TD>lossless JPEG</TD></TR>
  <TR>
    <TD>jpegls</TD>
    <TD>JPEG LS</TD></TR>
  <TR>
    <TD>targa</TD>
    <TD>Targa image</TD></TR>
  <TR>
    <TD>gif</TD>
    <TD>GIF image</TD></TR>
  <TR>
    <TD>bmp</TD>
    <TD>BMP image</TD></TR>
  <TR>
    <TD>png</TD>
    <TD>PNG image</TD></TR>
  <TR>
    <TD>h261</TD>
    <TD>H.261</TD></TR>
  <TR>
    <TD>h263</TD>
    <TD>H.263 </TD></TR>
  <TR>
    <TD>h263p</TD>
    <TD>H.263+</TD></TR>
  <TR>
    <TD>mpeg4</TD>
    <TD>ISO standard MPEG-4 (DivX, Xvid compatible)</TD></TR>
  <TR>
    <TD>msmpeg4</TD>
    <TD>pre-standard MPEG-4 variant by MS, v3 (AKA DivX3)</TD></TR>
  <TR>
    <TD>msmpeg4v2</TD>
    <TD>pre-standard MPEG-4 by MS, v2 (used in old ASF files)</TD></TR>
  <TR>
    <TD>wmv1</TD>
    <TD>Windows Media Video, version 1 (AKA WMV7)</TD></TR>
  <TR>
    <TD>wmv2</TD>
    <TD>Windows Media Video, version 2 (AKA WMV8)</TD></TR>
  <TR>
    <TD>rv10</TD>
    <TD>RealVideo 1.0</TD></TR>
  <TR>
    <TD>rv20</TD>
    <TD>RealVideo 2.0</TD></TR>
  <TR>
    <TD>mpeg1video</TD>
    <TD>MPEG-1 video</TD></TR>
  <TR>
    <TD>mpeg2video</TD>
    <TD>MPEG-2 video</TD></TR>
  <TR>
    <TD>huffyuv</TD>
    <TD>lossless compression</TD></TR>
  <TR>
    <TD>ffvhuff</TD>
    <TD>FFmpeg modified huffyuv lossless</TD></TR>
  <TR>
    <TD>asv1</TD>
    <TD>ASUS Video v1</TD></TR>
  <TR>
    <TD>asv2</TD>
    <TD>ASUS Video v2</TD></TR>
  <TR>
    <TD>ffv1</TD>
    <TD>FFmpeg's lossless video codec</TD></TR>
  <TR>
    <TD>svq1</TD>
    <TD>Sorenson video 1</TD></TR>
  <TR>
    <TD>flv</TD>
    <TD>Sorenson H.263 used in Flash Video</TD></TR>
  <TR>
    <TD>flashsv</TD>
    <TD>Flash Screen Video</TD></TR>
  <TR>
    <TD>dvvideo</TD>
    <TD>Sony Digital Video</TD></TR>
  <TR>
    <TD>snow</TD>
    <TD>FFmpeg's experimental wavelet-based codec</TD></TR>
  <TR>
    <TD>zbmv</TD>
    <TD>Zip Blocks Motion Video</TD></TR></TBODY></TABLE></DIV>
<P>The first column contains the codec names that should be passed after =
the=20
<CODE class=3Dliteral>vcodec</CODE> config, like: <TT =
class=3Doption>-lavcopts=20
vcodec=3Dmsmpeg4</TT> </P>
<DIV class=3Dinformalexample>
<P>An example with MJPEG compression: </P><PRE class=3Dscreen>mencoder =
dvd://2 -o <EM class=3Dreplaceable><CODE>title2.avi</CODE></EM> -ovc =
lavc -lavcopts vcodec=3Dmjpeg -oac copy
</PRE>
<P></P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-enc-libavcodec-audio-codecs></A>14.3.2.&nbsp;<CODE=20
class=3Dsystemitem>libavcodec</CODE>'s audio =
codecs</H3></DIV></DIV></DIV>
<P></P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Audio codec name</TH>
    <TH>Description</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>ac3</TD>
    <TD>Dolby Digital (AC-3)</TD></TR>
  <TR>
    <TD>adpcm_*</TD>
    <TD>Adaptive PCM formats - see supplementary table</TD></TR>
  <TR>
    <TD>flac</TD>
    <TD>Free Lossless Audio Codec (FLAC)</TD></TR>
  <TR>
    <TD>g726</TD>
    <TD>G.726 ADPCM</TD></TR>
  <TR>
    <TD>libamr_nb</TD>
    <TD>3GPP Adaptive Multi-Rate (AMR) narrow-band</TD></TR>
  <TR>
    <TD>libamr_wb</TD>
    <TD>3GPP Adaptive Multi-Rate (AMR) wide-band</TD></TR>
  <TR>
    <TD>libfaac</TD>
    <TD>Advanced Audio Coding (AAC) - using FAAC</TD></TR>
  <TR>
    <TD>libgsm</TD>
    <TD>ETSI GSM 06.10 full rate</TD></TR>
  <TR>
    <TD>libgsm_ms</TD>
    <TD>Microsoft GSM</TD></TR>
  <TR>
    <TD>libmp3lame</TD>
    <TD>MPEG-1 audio layer 3 (MP3) - using LAME</TD></TR>
  <TR>
    <TD>mp2</TD>
    <TD>MPEG-1 audio layer 2 (MP2)</TD></TR>
  <TR>
    <TD>pcm_*</TD>
    <TD>PCM formats - see supplementary table</TD></TR>
  <TR>
    <TD>roq_dpcm</TD>
    <TD>Id Software RoQ DPCM</TD></TR>
  <TR>
    <TD>sonic</TD>
    <TD>experimental FFmpeg lossy codec</TD></TR>
  <TR>
    <TD>sonicls</TD>
    <TD>experimental FFmpeg lossless codec</TD></TR>
  <TR>
    <TD>vorbis</TD>
    <TD>Vorbis</TD></TR>
  <TR>
    <TD>wmav1</TD>
    <TD>Windows Media Audio v1</TD></TR>
  <TR>
    <TD>wmav2</TD>
    <TD>Windows Media Audio v2</TD></TR></TBODY></TABLE></DIV>
<P>The first column contains the codec names that should be passed after =
the=20
<CODE class=3Dliteral>acodec</CODE> option, like: <TT =
class=3Doption>-lavcopts=20
acodec=3Dac3</TT> </P>
<DIV class=3Dinformalexample>
<P>An example with AC-3 compression: </P><PRE class=3Dscreen>mencoder =
dvd://2 -o <EM class=3Dreplaceable><CODE>title2.avi</CODE></EM> -oac =
lavc -lavcopts acodec=3Dac3 -ovc copy
</PRE>
<P></P></DIV>
<P>Contrary to <CODE class=3Dsystemitem>libavcodec</CODE>'s video =
codecs, its=20
audio codecs do not make a wise usage of the bits they are given as they =
lack=20
some minimal psychoacoustic model (if at all) which most other codec=20
implementations feature. However, note that all these audio codecs are =
very fast=20
and work out-of-the-box everywhere <SPAN =
class=3Dapplication>MEncoder</SPAN> has=20
been compiled with <CODE class=3Dsystemitem>libavcodec</CODE> (which is =
the case=20
most of time), and do not depend on external libraries. </P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-enc-libavcodec-audio-codecs-pcmadpcm></A>14.3.2.1.&nbsp;=
PCM/ADPCM=20
format supplementary table</H4></DIV></DIV></DIV>
<P></P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>PCM/ADPCM codec name</TH>
    <TH>Description</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>pcm_s32le</TD>
    <TD>signed 32-bit little-endian</TD></TR>
  <TR>
    <TD>pcm_s32be</TD>
    <TD>signed 32-bit big-endian</TD></TR>
  <TR>
    <TD>pcm_u32le</TD>
    <TD>unsigned 32-bit little-endian</TD></TR>
  <TR>
    <TD>pcm_u32be</TD>
    <TD>unsigned 32-bit big-endian</TD></TR>
  <TR>
    <TD>pcm_s24le</TD>
    <TD>signed 24-bit little-endian</TD></TR>
  <TR>
    <TD>pcm_s24be</TD>
    <TD>signed 24-bit big-endian</TD></TR>
  <TR>
    <TD>pcm_u24le</TD>
    <TD>unsigned 24-bit little-endian</TD></TR>
  <TR>
    <TD>pcm_u24be</TD>
    <TD>unsigned 24-bit big-endian</TD></TR>
  <TR>
    <TD>pcm_s16le</TD>
    <TD>signed 16-bit little-endian</TD></TR>
  <TR>
    <TD>pcm_s16be</TD>
    <TD>signed 16-bit big-endian</TD></TR>
  <TR>
    <TD>pcm_u16le</TD>
    <TD>unsigned 16-bit little-endian</TD></TR>
  <TR>
    <TD>pcm_u16be</TD>
    <TD>unsigned 16-bit big-endian</TD></TR>
  <TR>
    <TD>pcm_s8</TD>
    <TD>signed 8-bit</TD></TR>
  <TR>
    <TD>pcm_u8</TD>
    <TD>unsigned 8-bit</TD></TR>
  <TR>
    <TD>pcm_alaw</TD>
    <TD>G.711 A-LAW </TD></TR>
  <TR>
    <TD>pcm_mulaw</TD>
    <TD>G.711 =CE=BC-LAW</TD></TR>
  <TR>
    <TD>pcm_s24daud</TD>
    <TD>signed 24-bit D-Cinema Audio format</TD></TR>
  <TR>
    <TD>pcm_zork</TD>
    <TD>Activision Zork Nemesis</TD></TR>
  <TR>
    <TD>adpcm_ima_qt</TD>
    <TD>Apple QuickTime</TD></TR>
  <TR>
    <TD>adpcm_ima_wav</TD>
    <TD>Microsoft/IBM WAVE</TD></TR>
  <TR>
    <TD>adpcm_ima_dk3</TD>
    <TD>Duck DK3</TD></TR>
  <TR>
    <TD>adpcm_ima_dk4</TD>
    <TD>Duck DK4</TD></TR>
  <TR>
    <TD>adpcm_ima_ws</TD>
    <TD>Westwood Studios</TD></TR>
  <TR>
    <TD>adpcm_ima_smjpeg</TD>
    <TD>SDL Motion JPEG</TD></TR>
  <TR>
    <TD>adpcm_ms</TD>
    <TD>Microsoft</TD></TR>
  <TR>
    <TD>adpcm_4xm</TD>
    <TD>4X Technologies</TD></TR>
  <TR>
    <TD>adpcm_xa</TD>
    <TD>Phillips Yellow Book CD-ROM eXtended Architecture</TD></TR>
  <TR>
    <TD>adpcm_ea</TD>
    <TD>Electronic Arts</TD></TR>
  <TR>
    <TD>adpcm_ct</TD>
    <TD>Creative 16-&gt;4-bit</TD></TR>
  <TR>
    <TD>adpcm_swf</TD>
    <TD>Adobe Shockwave Flash</TD></TR>
  <TR>
    <TD>adpcm_yamaha</TD>
    <TD>Yamaha</TD></TR>
  <TR>
    <TD>adpcm_sbpro_4</TD>
    <TD>Creative VOC SoundBlaster Pro 8-&gt;4-bit</TD></TR>
  <TR>
    <TD>adpcm_sbpro_3</TD>
    <TD>Creative VOC SoundBlaster Pro 8-&gt;2.6-bit</TD></TR>
  <TR>
    <TD>adpcm_sbpro_2</TD>
    <TD>Creative VOC SoundBlaster Pro 8-&gt;2-bit</TD></TR>
  <TR>
    <TD>adpcm_thp</TD>
    <TD>Nintendo GameCube FMV THP</TD></TR>
  <TR>
    <TD>adpcm_adx</TD>
    <TD>Sega/CRI ADX</TD></TR></TBODY></TABLE></DIV>
<P></P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-lavc-encoding-options></A>14.3.3.&nbsp;Encodin=
g options=20
of libavcodec</H3></DIV></DIV></DIV>
<P>Ideally, you would probably want to be able to just tell the encoder =
to=20
switch into "high quality" mode and move on. That would probably be =
nice, but=20
unfortunately hard to implement as different encoding options yield =
different=20
quality results depending on the source material. That is because =
compression=20
depends on the visual properties of the video in question. For example, =
anime=20
and live action have very different properties and thus require =
different=20
options to obtain optimum encoding. The good news is that some options =
should=20
never be left out, like <TT class=3Doption>mbd=3D2</TT>, <TT=20
class=3Doption>trell</TT>, and <TT class=3Doption>v4mv</TT>. See below =
for a=20
detailed description of common encoding options. </P>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>Options to adjust:</B></P>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vmax_b_frames</STRONG></SPAN>: 1 or 2 is =
good,=20
  depending on the movie. Note that if you need to have your encode be =
decodable=20
  by DivX5, you need to activate closed GOP support, using <CODE=20
  class=3Dsystemitem>libavcodec</CODE>'s <TT class=3Doption>cgop</TT> =
option, but=20
  you need to deactivate scene detection, which is not a good idea as it =
will=20
  hurt encode efficiency a bit. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vb_strategy=3D1</STRONG></SPAN>: helps =
in=20
  high-motion scenes. On some videos, vmax_b_frames may hurt quality, =
but=20
  vmax_b_frames=3D2 along with vb_strategy=3D1 helps. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>dia</STRONG></SPAN>: motion search =
range. Bigger=20
  is better and slower. Negative values are a completely different =
scale. Good=20
  values are -1 for a fast encode, or 2-4 for slower. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>predia</STRONG></SPAN>: motion search =
pre-pass.=20
  Not as important as dia. Good values are 1 (default) to 4. Requires =
preme=3D2 to=20
  really be useful. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>cmp, subcmp, precmp</STRONG></SPAN>: =
Comparison=20
  function for motion estimation. Experiment with values of 0 (default), =
2=20
  (hadamard), 3 (dct), and 6 (rate distortion). 0 is fastest, and =
sufficient for=20
  precmp. For cmp and subcmp, 2 is good for anime, and 3 is good for =
live=20
  action. 6 may or may not be slightly better, but is slow. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>last_pred</STRONG></SPAN>: Number of =
motion=20
  predictors to take from the previous frame. 1-3 or so help at little =
speed=20
  cost. Higher values are slow for no extra gain. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>cbp, mv0</STRONG></SPAN>: Controls the =
selection=20
  of macroblocks. Small speed cost for small quality gain. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>qprd</STRONG></SPAN>: adaptive =
quantization based=20
  on the macroblock's complexity. May help or hurt depending on the =
video and=20
  other options. This can cause artifacts unless you set vqmax to some=20
  reasonably small value (6 is good, maybe as low as 4); vqmin=3D1 =
should also=20
  help. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>qns</STRONG></SPAN>: very slow, =
especially when=20
  combined with qprd. This option will make the encoder minimize noise =
due to=20
  compression artifacts instead of making the encoded video strictly =
match the=20
  source. Do not use this unless you have already tweaked everything =
else as far=20
  as it will go and the results still are not good enough. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vqcomp</STRONG></SPAN>: Tweak =
ratecontrol. What=20
  values are good depends on the movie. You can safely leave this alone =
if you=20
  want. Reducing vqcomp puts more bits on low-complexity scenes, =
increasing it=20
  puts them on high-complexity scenes (default: 0.5, range: 0-1. =
recommended=20
  range: 0.5-0.7). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vlelim, vcelim</STRONG></SPAN>: Sets the =
single=20
  coefficient elimination threshold for luminance and chroma planes. =
These are=20
  encoded separately in all MPEG-like algorithms. The idea behind these =
options=20
  is to use some good heuristics to determine when the change in a block =
is less=20
  than the threshold you specify, and in such a case, to just encode the =
block=20
  as "no change". This saves bits and perhaps speeds up encoding. =
vlelim=3D-4 and=20
  vcelim=3D9 seem to be good for live movies, but seem not to help with =
anime;=20
  when encoding animation, you should probably leave them unchanged. =
</P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>qpel</STRONG></SPAN>: Quarter pixel =
motion=20
  estimation. MPEG-4 uses half pixel precision for its motion search by =
default,=20
  therefore this option comes with an overhead as more information will =
be=20
  stored in the encoded file. The compression gain/loss depends on the =
movie,=20
  but it is usually not very effective on anime. qpel always incurs a=20
  significant cost in CPU decode time (+25% in practice). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>psnr</STRONG></SPAN>: does not affect =
the actual=20
  encoding, but writes a log file giving the type/size/quality of each =
frame,=20
  and prints a summary of PSNR (Peak Signal to Noise Ratio) at the end.=20
</P></LI></UL></DIV>
<DIV class=3Ditemizedlist>
<P class=3Dtitle><B>Options not recommended to play with:</B></P>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vme</STRONG></SPAN>: The default is =
best. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>lumi_mask, dark_mask</STRONG></SPAN>: =
Psychovisual=20
  adaptive quantization. You do not want to play with those options if =
you care=20
  about quality. Reasonable values may be effective in your case, but be =
warned=20
  this is very subjective. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>scplx_mask</STRONG></SPAN>: Tries to =
prevent=20
  blocky artifacts, but postprocessing is better. =
</P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-mpeg4-lavc-example-settings></A>14.3.4.&nbsp;Encoding =
setting=20
examples</H3></DIV></DIV></DIV>
<P>The following settings are examples of different encoding option =
combinations=20
that affect the speed vs quality tradeoff at the same target bitrate. =
</P>
<P>All the encoding settings were tested on a 720x448 @30000/1001 fps =
video=20
sample, the target bitrate was 900kbps, and the machine was an AMD-64 =
3400+ at=20
2400 MHz in 64 bits mode. Each encoding setting features the measured =
encoding=20
speed (in frames per second) and the PSNR loss (in dB) compared to the =
"very=20
high quality" setting. Please understand that depending on your source, =
your=20
machine type and development advancements, you may get very different =
results.=20
</P>
<P></P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Description</TH>
    <TH>Encoding options</TH>
    <TH>speed (in fps)</TH>
    <TH>Relative PSNR loss (in dB)</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>Very high quality</TD>
    <TD><TT=20
      =
class=3Doption>vcodec=3Dmpeg4:mbd=3D2:mv0:trell:v4mv:cbp:last_pred=3D3:pr=
edia=3D2:dia=3D2:vmax_b_frames=3D2:vb_strategy=3D1:precmp=3D2:cmp=3D2:sub=
cmp=3D2:preme=3D2:qns=3D2</TT></TD>
    <TD>6fps</TD>
    <TD>0dB</TD></TR>
  <TR>
    <TD>High quality</TD>
    <TD><TT=20
      =
class=3Doption>vcodec=3Dmpeg4:mbd=3D2:trell:v4mv:last_pred=3D2:dia=3D-1:v=
max_b_frames=3D2:vb_strategy=3D1:cmp=3D3:subcmp=3D3:precmp=3D0:vqcomp=3D0=
.6:turbo</TT></TD>
    <TD>15fps</TD>
    <TD>-0.5dB</TD></TR>
  <TR>
    <TD>Fast</TD>
    <TD><TT =
class=3Doption>vcodec=3Dmpeg4:mbd=3D2:trell:v4mv:turbo</TT></TD>
    <TD>42fps</TD>
    <TD>-0.74dB</TD></TR>
  <TR>
    <TD>Realtime</TD>
    <TD><TT class=3Doption>vcodec=3Dmpeg4:mbd=3D2:turbo</TT></TD>
    <TD>54fps</TD>
    <TD>-1.21dB</TD></TR></TBODY></TABLE></DIV>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dcustommatrices></A>14.3.5.&nbsp;Custom =
inter/intra=20
matrices</H3></DIV></DIV></DIV>
<P>With this feature of <A title=3D7.1.1.&nbsp;FFmpeg/libavcodec=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ffmpeg"><CODE=20
class=3Dsystemitem>libavcodec</CODE></A> you are able to set custom =
inter=20
(I-frames/keyframes) and intra (P-frames/predicted frames) matrices. It =
is=20
supported by many of the codecs: <CODE =
class=3Dsystemitem>mpeg1video</CODE> and=20
<CODE class=3Dsystemitem>mpeg2video</CODE> are reported as working. </P>
<P>A typical usage of this feature is to set the matrices preferred by =
the <A=20
href=3D"http://www.kvcd.net/" target=3D_top>KVCD</A> specifications. =
</P>
<P>The <SPAN class=3Dbold><STRONG>KVCD "Notch" Quantization=20
Matrix:</STRONG></SPAN> </P>
<P>Intra: </P><PRE class=3Dscreen> 8  9 12 22 26 27 29 34
 9 10 14 26 27 29 34 37
12 14 18 27 29 34 37 38
22 26 27 31 36 37 38 40
26 27 29 36 39 38 40 48
27 29 34 37 38 40 48 58
29 34 37 38 40 48 58 69
34 37 38 40 48 58 69 79
</PRE>
<P>Inter: </P><PRE class=3Dscreen>16 18 20 22 24 26 28 30
18 20 22 24 26 28 30 32
20 22 24 26 28 30 32 34
22 24 26 30 32 32 34 36
24 26 28 32 34 34 36 38
26 28 30 32 34 36 38 40
28 30 32 34 36 38 42 42
30 32 34 36 38 40 42 44
</PRE>
<P></P>
<P>Usage: </P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.avi</CODE></EM> -o <EM =
class=3Dreplaceable><CODE>output.avi</CODE></EM> -oac copy -ovc lavc \
    -lavcopts inter_matrix=3D...:intra_matrix=3D...
</PRE>
<P></P>
<P></P><PRE class=3Dscreen>mencoder <EM =
class=3Dreplaceable><CODE>input.avi</CODE></EM> -ovc lavc -lavcopts \
vcodec=3Dmpeg2video:intra_matrix=3D8,9,12,22,26,27,29,34,9,10,14,26,27,29=
,34,37,\
12,14,18,27,29,34,37,38,22,26,27,31,36,37,38,40,26,27,29,36,39,38,40,48,2=
7,\
29,34,37,38,40,48,58,29,34,37,38,40,48,58,69,34,37,38,40,48,58,69,79\
:inter_matrix=3D16,18,20,22,24,26,28,30,18,20,22,24,26,28,30,32,20,22,24,=
26,\
28,30,32,34,22,24,26,30,32,32,34,36,24,26,28,32,34,34,36,38,26,28,30,32,3=
4,\
36,38,40,28,30,32,34,36,38,42,42,30,32,34,36,38,40,42,44 -oac copy -o =
svcd.mpg
</PRE>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-dvd-mpeg4-example></A>14.3.6.&nbsp;Example</H3></DIV></D=
IV></DIV>
<P>So, you have just bought your shiny new copy of Harry Potter and the =
Chamber=20
of Secrets (widescreen edition, of course), and you want to rip this DVD =
so that=20
you can add it to your Home Theatre PC. This is a region 1 DVD, so it is =
NTSC.=20
The example below will still apply to PAL, except you will omit <TT=20
class=3Doption>-ofps 24000/1001</TT> (because the output framerate is =
the same as=20
the input framerate), and of course the crop dimensions will be =
different. </P>
<P>After running <TT class=3Doption>mplayer dvd://1</TT>, we follow the =
process=20
detailed in the section <A=20
title=3D"14.2.&nbsp;How to deal with telecine and interlacing within =
NTSC DVDs"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine">How=20
to deal with telecine and interlacing in NTSC DVDs</A> and discover that =
it is=20
24000/1001 fps progressive video, which means that we need not use an =
inverse=20
telecine filter, such as <TT class=3Doption>pullup</TT> or <TT=20
class=3Doption>filmdint</TT>. </P>
<P><A name=3Dmenc-feat-dvd-mpeg4-example-crop></A>Next, we want to =
determine the=20
appropriate crop rectangle, so we use the cropdetect filter: </P><PRE =
class=3Dscreen>mplayer dvd://1 -vf cropdetect</PRE>
<P>Make sure you seek to a fully filled frame (such as a bright scene, =
past the=20
opening credits and logos), and you will see in <SPAN=20
class=3Dapplication>MPlayer</SPAN>'s console output: </P><PRE =
class=3Dscreen>crop area: X: 0..719  Y: 57..419  (-vf =
crop=3D720:362:0:58)</PRE>
<P>We then play the movie back with this filter to test its correctness: =
</P><PRE class=3Dscreen>mplayer dvd://1 -vf crop=3D720:362:0:58</PRE>
<P>And we see that it looks perfectly fine. Next, we ensure the width =
and height=20
are a multiple of 16. The width is fine, however the height is not. =
Since we did=20
not fail 7th grade math, we know that the nearest multiple of 16 lower =
than 362=20
is 352. </P>
<P>We could just use <TT class=3Doption>crop=3D720:352:0:58</TT>, but it =
would be=20
nice to take a little off the top and a little off the bottom so that we =
retain=20
the center. We have shrunk the height by 10 pixels, but we do not want =
to=20
increase the y-offset by 5-pixels since that is an odd number and will =
adversely=20
affect quality. Instead, we will increase the y-offset by 4 pixels: =
</P><PRE class=3Dscreen>mplayer dvd://1 -vf crop=3D720:352:0:62</PRE>
<P>Another reason to shave pixels from both the top and the bottom is =
that we=20
ensure we have eliminated any half-black pixels if they exist. Note that =
if your=20
video is telecined, make sure the <TT class=3Doption>pullup</TT> filter =
(or=20
whichever inverse telecine filter you decide to use) appears in the =
filter chain=20
before you crop. If it is interlaced, deinterlace before cropping. (If =
you=20
choose to preserve the interlaced video, then make sure your vertical =
crop=20
offset is a multiple of 4.) </P>
<P>If you are really concerned about losing those 10 pixels, you might =
prefer=20
instead to scale the dimensions down to the nearest multiple of 16. The =
filter=20
chain would look like: </P><PRE class=3Dscreen>-vf =
crop=3D720:362:0:58,scale=3D720:352</PRE>
<P>Scaling the video down like this will mean that some small amount of =
detail=20
is lost, though it probably will not be perceptible. Scaling up will =
result in=20
lower quality (unless you increase the bitrate). Cropping discards those =
pixels=20
altogether. It is a tradeoff that you will want to consider for each=20
circumstance. For example, if the DVD video was made for television, you =
might=20
want to avoid vertical scaling, since the line sampling corresponds to =
the way=20
the content was originally recorded. </P>
<P>On inspection, we see that our movie has a fair bit of action and =
high=20
amounts of detail, so we pick 2400Kbit for our bitrate. </P>
<P>We are now ready to do the two pass encode. Pass one: </P><PRE =
class=3Dscreen>mencoder dvd://1 -ofps 24000/1001 -oac copy -o <EM =
class=3Dreplaceable><CODE>Harry_Potter_2.avi</CODE></EM> -ovc lavc \
    -lavcopts =
vcodec=3Dmpeg4:vbitrate=3D2400:v4mv:mbd=3D2:trell:cmp=3D3:subcmp=3D3:auto=
aspect:vpass=3D1 \
    -vf pullup,softskip,crop=3D720:352:0:62,hqdn3d=3D2:1:2
</PRE>
<P>And pass two is the same, except that we specify <TT=20
class=3Doption>vpass=3D2</TT>: </P><PRE class=3Dscreen>mencoder dvd://1 =
-ofps 24000/1001 -oac copy -o <EM =
class=3Dreplaceable><CODE>Harry_Potter_2.avi</CODE></EM> -ovc lavc \
    -lavcopts =
vcodec=3Dmpeg4:vbitrate=3D2400:v4mv:mbd=3D2:trell:cmp=3D3:subcmp=3D3:auto=
aspect:vpass=3D2 \
    -vf pullup,softskip,crop=3D720:352:0:62,hqdn3d=3D2:1:2
</PRE>
<P></P>
<P>The options <TT class=3Doption>v4mv:mbd=3D2:trell</TT> will greatly =
increase the=20
quality at the expense of encoding time. There is little reason to leave =
these=20
options out when the primary goal is quality. The options <TT=20
class=3Doption>cmp=3D3:subcmp=3D3</TT> select a comparison function that =
yields higher=20
quality than the defaults. You might try experimenting with this =
parameter=20
(refer to the man page for the possible values) as different functions =
can have=20
a large impact on quality depending on the source material. For example, =
if you=20
find <CODE class=3Dsystemitem>libavcodec</CODE> produces too much blocky =

artifacting, you could try selecting the experimental NSSE as comparison =

function via <TT class=3Doption>*cmp=3D10</TT>. </P>
<P>For this movie, the resulting AVI will be 138 minutes long and nearly =
3GB.=20
And because you said that file size does not matter, this is a perfectly =

acceptable size. However, if you had wanted it smaller, you could try a =
lower=20
bitrate. Increasing bitrates have diminishing returns, so while we might =
clearly=20
see an improvement from 1800Kbit to 2000Kbit, it might not be so =
noticeable=20
above 2000Kbit. Feel free to experiment until you are happy. </P>
<P>Because we passed the source video through a denoise filter, you may =
want to=20
add some of it back during playback. This, along with the <TT=20
class=3Doption>spp</TT> post-processing filter, drastically improves the =

perception of quality and helps eliminate blocky artifacts in the video. =
With=20
<SPAN class=3Dapplication>MPlayer</SPAN>'s <TT class=3Doption>autoq</TT> =
option, you=20
can vary the amount of post-processing done by the spp filter depending =
on=20
available CPU. Also, at this point, you may want to apply gamma and/or =
color=20
correction to best suit your display. For example: </P><PRE =
class=3Dscreen>mplayer <EM =
class=3Dreplaceable><CODE>Harry_Potter_2.avi</CODE></EM> -vf =
spp,noise=3D9ah:5ah,eq2=3D1.2 -autoq 3
</PRE>
<P></P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-xvid></A>14.4.&nbsp;Encoding with the <CODE=20
class=3Dsystemitem>Xvid</CODE> codec</H2></DIV></DIV></DIV>
<P><CODE class=3Dsystemitem>Xvid</CODE> is a free library for encoding =
MPEG-4 ASP=20
video streams. Before starting to encode, you need to <A =
title=3D7.1.2.&nbsp;Xvid=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
xvid">set=20
up <SPAN class=3Dapplication>MEncoder</SPAN> to support it</A>. </P>
<P>This guide mainly aims at featuring the same kind of information as =
x264's=20
encoding guide. Therefore, please begin by reading <A=20
title=3D14.5.1.1.&nbsp;Introduction=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-intro">the=20
first part</A> of that guide. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dmenc-feat-xvid-intro></A>14.4.1.&nbsp;What =
options=20
should I use to get the best results?</H3></DIV></DIV></DIV>
<P>Please begin by reviewing the <CODE class=3Dsystemitem>Xvid</CODE> =
section of=20
<SPAN class=3Dapplication>MPlayer</SPAN>'s man page. This section is =
intended to=20
be a supplement to the man page. </P>
<P>The Xvid default settings are already a good tradeoff between speed =
and=20
quality, therefore you can safely stick to them if the following section =
puzzles=20
you. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-xvid-encoding-options></A>14.4.2.&nbsp;Encoding options =
of <CODE=20
class=3Dsystemitem>Xvid</CODE></H3></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vhq</STRONG></SPAN> This setting affects =
the=20
  macroblock decision algorithm, where the higher the setting, the wiser =
the=20
  decision. The default setting may be safely used for every encode, =
while=20
  higher settings always help PSNR but are significantly slower. Please =
note=20
  that a better PSNR does not necessarily mean that the picture will =
look=20
  better, but tells you that it is closer to the original. Turning it =
off will=20
  noticeably speed up encoding; if speed is critical for you, the =
tradeoff may=20
  be worth it. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>bvhq</STRONG></SPAN> This does the same =
job as=20
  vhq, but does it on B-frames. It has a negligible impact on speed, and =

  slightly improves quality (around +0.1dB PSNR). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>max_bframes</STRONG></SPAN> A higher =
number of=20
  consecutive allowed B-frames usually improves compressibility, =
although it may=20
  also lead to more blocking artifacts. The default setting is a good =
tradeoff=20
  between compressibility and quality, but you may increase it up to 3 =
if you=20
  are bitrate-starved. You may also decrease it to 1 or 0 if you are =
aiming at=20
  perfect quality, though in that case you should make sure your target =
bitrate=20
  is high enough to ensure that the encoder does not have to increase =
quantizers=20
  to reach it. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>bf_threshold</STRONG></SPAN> This =
controls the=20
  B-frame sensitivity of the encoder, where a higher value leads to more =

  B-frames being used (and vice versa). This setting is to be used =
together with=20
  <TT class=3Doption>max_bframes</TT>; if you are bitrate-starved, you =
should=20
  increase both <TT class=3Doption>max_bframes</TT> and <TT=20
  class=3Doption>bf_threshold</TT>, while you may increase <TT=20
  class=3Doption>max_bframes</TT> and reduce <TT =
class=3Doption>bf_threshold</TT> so=20
  that the encoder may use more B-frames in places that only <SPAN=20
  class=3Dbold><STRONG>really</STRONG></SPAN> need them. A low number of =
<TT=20
  class=3Doption>max_bframes</TT> and a high value of <TT=20
  class=3Doption>bf_threshold</TT> is probably not a wise choice as it =
will force=20
  the encoder to put B-frames in places that would not benefit from =
them,=20
  therefore reducing visual quality. However, if you need to be =
compatible with=20
  standalone players that only support old DivX profiles (which only =
supports up=20
  to 1 consecutive B-frame), this would be your only way to increase=20
  compressibility through using B-frames. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>trellis</STRONG></SPAN> Optimizes the =
quantization=20
  process to get an optimal tradeoff between PSNR and bitrate, which =
allows=20
  significant bit saving. These bits will in return be spent elsewhere =
on the=20
  video, raising overall visual quality. You should always leave it on =
as its=20
  impact on quality is huge. Even if you are looking for speed, do not =
disable=20
  it until you have turned down <TT class=3Doption>vhq</TT> and all =
other more=20
  CPU-hungry options to the minimum. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>hq_ac</STRONG></SPAN> Activates a better =

  coefficient cost estimation method, which slightly reduces filesize by =
around=20
  0.15 to 0.19% (which corresponds to less than 0.01dB PSNR increase), =
while=20
  having a negligible impact on speed. It is therefore recommended to =
always=20
  leave it on. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>cartoon</STRONG></SPAN> Designed to =
better encode=20
  cartoon content, and has no impact on speed as it just tunes the mode =
decision=20
  heuristics for this type of content. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>me_quality</STRONG></SPAN> This setting =
is to=20
  control the precision of the motion estimation. The higher <TT=20
  class=3Doption>me_quality</TT>, the more precise the estimation of the =
original=20
  motion will be, and the better the resulting clip will capture the =
original=20
  motion. </P>
  <P>The default setting is best in all cases; thus it is not =
recommended to=20
  turn it down unless you are really looking for speed, as all the bits =
saved by=20
  a good motion estimation would be spent elsewhere, raising overall =
quality.=20
  Therefore, do not go any lower than 5, and even that only as a last =
resort.=20
  </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>chroma_me</STRONG></SPAN> Improves =
motion=20
  estimation by also taking the chroma (color) information into account, =
whereas=20
  <TT class=3Doption>me_quality</TT> alone only uses luma (grayscale). =
This slows=20
  down encoding by 5-10% but improves visual quality quite a bit by =
reducing=20
  blocking effects and reduces filesize by around 1.3%. If you are =
looking for=20
  speed, you should disable this option before starting to consider =
reducing <TT=20
  class=3Doption>me_quality</TT>. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>chroma_opt</STRONG></SPAN> Is intended =
to increase=20
  chroma image quality around pure white/black edges, rather than =
improving=20
  compression. This can help to reduce the "red stairs" effect. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>lumi_mask</STRONG></SPAN> Tries to give =
less=20
  bitrate to part of the picture that the human eye cannot see very =
well, which=20
  should allow the encoder to spend the saved bits on more important =
parts of=20
  the picture. The quality of the encode yielded by this option highly =
depends=20
  on personal preferences and on the type and monitor settings used to =
watch it=20
  (typically, it will not look as good if it is bright or if it is a TFT =

  monitor). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>qpel</STRONG></SPAN> Raise the number of =
candidate=20
  motion vectors by increasing the precision of the motion estimation =
from=20
  halfpel to quarterpel. The idea is to find better motion vectors which =
will in=20
  return reduce bitrate (hence increasing quality). However, motion =
vectors with=20
  quarterpel precision require a few extra bits to code, but the =
candidate=20
  vectors do not always give (much) better results. Quite often, the =
codec still=20
  spends bits on the extra precision, but little or no extra quality is =
gained=20
  in return. Unfortunately, there is no way to foresee the possible =
gains of <TT=20
  class=3Doption>qpel</TT>, so you need to actually encode with and =
without it to=20
  know for sure. </P>
  <P><TT class=3Doption>qpel</TT> can be almost double encoding time, =
and requires=20
  as much as 25% more processing power to decode. It is not supported by =
all=20
  standalone players. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>gmc</STRONG></SPAN> Tries to save bits =
on panning=20
  scenes by using a single motion vector for the whole frame. This =
almost always=20
  raises PSNR, but significantly slows down encoding (as well as =
decoding).=20
  Therefore, you should only use it when you have turned <TT=20
  class=3Doption>vhq</TT> to the maximum. <CODE =
class=3Dsystemitem>Xvid</CODE>'s GMC=20
  is more sophisticated than DivX's, but is only supported by few =
standalone=20
  players. </P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-xvid-encoding-profiles></A>14.4.3.&nbsp;Encoding=20
profiles</H3></DIV></DIV></DIV>
<P>Xvid supports encoding profiles through the <TT =
class=3Doption>profile</TT>=20
option, which are used to impose restrictions on the properties of the =
Xvid=20
video stream such that it will be playable on anything which supports =
the chosen=20
profile. The restrictions relate to resolutions, bitrates and certain =
MPEG-4=20
features. The following table shows what each profile supports. </P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle>
  <COL align=3Dmiddle></COLGROUP>
  <TBODY>
  <TR>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle colSpan=3D4>Simple</TD>
    <TD align=3Dmiddle colSpan=3D6>Advanced Simple</TD>
    <TD align=3Dmiddle colSpan=3D6>DivX</TD></TR>
  <TR>
    <TD align=3Dmiddle>Profile name</TD>
    <TD align=3Dmiddle>0</TD>
    <TD align=3Dmiddle>1</TD>
    <TD align=3Dmiddle>2</TD>
    <TD align=3Dmiddle>3</TD>
    <TD align=3Dmiddle>0</TD>
    <TD align=3Dmiddle>1</TD>
    <TD align=3Dmiddle>2</TD>
    <TD align=3Dmiddle>3</TD>
    <TD align=3Dmiddle>4</TD>
    <TD align=3Dmiddle>5</TD>
    <TD align=3Dmiddle>Handheld</TD>
    <TD align=3Dmiddle>Portable NTSC</TD>
    <TD align=3Dmiddle>Portable PAL</TD>
    <TD align=3Dmiddle>Home Theater NTSC</TD>
    <TD align=3Dmiddle>Home Theater PAL</TD>
    <TD align=3Dmiddle>HDTV</TD></TR>
  <TR>
    <TD align=3Dmiddle>Width [pixels]</TD>
    <TD align=3Dmiddle>176</TD>
    <TD align=3Dmiddle>176</TD>
    <TD align=3Dmiddle>352</TD>
    <TD align=3Dmiddle>352</TD>
    <TD align=3Dmiddle>176</TD>
    <TD align=3Dmiddle>176</TD>
    <TD align=3Dmiddle>352</TD>
    <TD align=3Dmiddle>352</TD>
    <TD align=3Dmiddle>352</TD>
    <TD align=3Dmiddle>720</TD>
    <TD align=3Dmiddle>176</TD>
    <TD align=3Dmiddle>352</TD>
    <TD align=3Dmiddle>352</TD>
    <TD align=3Dmiddle>720</TD>
    <TD align=3Dmiddle>720</TD>
    <TD align=3Dmiddle>1280</TD></TR>
  <TR>
    <TD align=3Dmiddle>Height [pixels]</TD>
    <TD align=3Dmiddle>144</TD>
    <TD align=3Dmiddle>144</TD>
    <TD align=3Dmiddle>288</TD>
    <TD align=3Dmiddle>288</TD>
    <TD align=3Dmiddle>144</TD>
    <TD align=3Dmiddle>144</TD>
    <TD align=3Dmiddle>288</TD>
    <TD align=3Dmiddle>288</TD>
    <TD align=3Dmiddle>576</TD>
    <TD align=3Dmiddle>576</TD>
    <TD align=3Dmiddle>144</TD>
    <TD align=3Dmiddle>240</TD>
    <TD align=3Dmiddle>288</TD>
    <TD align=3Dmiddle>480</TD>
    <TD align=3Dmiddle>576</TD>
    <TD align=3Dmiddle>720</TD></TR>
  <TR>
    <TD align=3Dmiddle>Frame rate [fps]</TD>
    <TD align=3Dmiddle>15</TD>
    <TD align=3Dmiddle>15</TD>
    <TD align=3Dmiddle>15</TD>
    <TD align=3Dmiddle>15</TD>
    <TD align=3Dmiddle>30</TD>
    <TD align=3Dmiddle>30</TD>
    <TD align=3Dmiddle>15</TD>
    <TD align=3Dmiddle>30</TD>
    <TD align=3Dmiddle>30</TD>
    <TD align=3Dmiddle>30</TD>
    <TD align=3Dmiddle>15</TD>
    <TD align=3Dmiddle>30</TD>
    <TD align=3Dmiddle>25</TD>
    <TD align=3Dmiddle>30</TD>
    <TD align=3Dmiddle>25</TD>
    <TD align=3Dmiddle>30</TD></TR>
  <TR>
    <TD align=3Dmiddle>Max average bitrate [kbps]</TD>
    <TD align=3Dmiddle>64</TD>
    <TD align=3Dmiddle>64</TD>
    <TD align=3Dmiddle>128</TD>
    <TD align=3Dmiddle>384</TD>
    <TD align=3Dmiddle>128</TD>
    <TD align=3Dmiddle>128</TD>
    <TD align=3Dmiddle>384</TD>
    <TD align=3Dmiddle>768</TD>
    <TD align=3Dmiddle>3000</TD>
    <TD align=3Dmiddle>8000</TD>
    <TD align=3Dmiddle>537.6</TD>
    <TD align=3Dmiddle>4854</TD>
    <TD align=3Dmiddle>4854</TD>
    <TD align=3Dmiddle>4854</TD>
    <TD align=3Dmiddle>4854</TD>
    <TD align=3Dmiddle>9708.4</TD></TR>
  <TR>
    <TD align=3Dmiddle>Peak average bitrate over 3 secs [kbps]</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>800</TD>
    <TD align=3Dmiddle>8000</TD>
    <TD align=3Dmiddle>8000</TD>
    <TD align=3Dmiddle>8000</TD>
    <TD align=3Dmiddle>8000</TD>
    <TD align=3Dmiddle>16000</TD></TR>
  <TR>
    <TD align=3Dmiddle>Max. B-frames</TD>
    <TD align=3Dmiddle>0</TD>
    <TD align=3Dmiddle>0</TD>
    <TD align=3Dmiddle>0</TD>
    <TD align=3Dmiddle>0</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>0</TD>
    <TD align=3Dmiddle>1</TD>
    <TD align=3Dmiddle>1</TD>
    <TD align=3Dmiddle>1</TD>
    <TD align=3Dmiddle>1</TD>
    <TD align=3Dmiddle>2</TD></TR>
  <TR>
    <TD align=3Dmiddle>MPEG quantization</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR>
  <TR>
    <TD align=3Dmiddle>Adaptive quantization</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD></TR>
  <TR>
    <TD align=3Dmiddle>Interlaced encoding</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD></TR>
  <TR>
    <TD align=3Dmiddle>Quaterpixel</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR>
  <TR>
    <TD align=3Dmiddle>Global motion compensation</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>X</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD>
    <TD align=3Dmiddle>&nbsp;</TD></TR></TBODY></TABLE></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-xvid-example-settings></A>14.4.4.&nbsp;Encoding setting =

examples</H3></DIV></DIV></DIV>
<P>The following settings are examples of different encoding option =
combinations=20
that affect the speed vs quality tradeoff at the same target bitrate. =
</P>
<P>All the encoding settings were tested on a 720x448 @30000/1001 fps =
video=20
sample, the target bitrate was 900kbps, and the machine was an AMD-64 =
3400+ at=20
2400 MHz in 64 bits mode. Each encoding setting features the measured =
encoding=20
speed (in frames per second) and the PSNR loss (in dB) compared to the =
"very=20
high quality" setting. Please understand that depending on your source, =
your=20
machine type and development advancements, you may get very different =
results.=20
</P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Description</TH>
    <TH>Encoding options</TH>
    <TH>speed (in fps)</TH>
    <TH>Relative PSNR loss (in dB)</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>Very high quality</TD>
    <TD><TT =
class=3Doption>chroma_opt:vhq=3D4:bvhq=3D1:quant_type=3Dmpeg</TT></TD>
    <TD>16fps</TD>
    <TD>0dB</TD></TR>
  <TR>
    <TD>High quality</TD>
    <TD><TT =
class=3Doption>vhq=3D2:bvhq=3D1:chroma_opt:quant_type=3Dmpeg</TT></TD>
    <TD>18fps</TD>
    <TD>-0.1dB</TD></TR>
  <TR>
    <TD>Fast</TD>
    <TD><TT class=3Doption>turbo:vhq=3D0</TT></TD>
    <TD>28fps</TD>
    <TD>-0.69dB</TD></TR>
  <TR>
    <TD>Realtime</TD>
    <TD><TT=20
    =
class=3Doption>turbo:nochroma_me:notrellis:max_bframes=3D0:vhq=3D0</TT></=
TD>
    <TD>38fps</TD>
    <TD>-1.48dB</TD></TR></TBODY></TABLE></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-x264></A>14.5.&nbsp;Encoding with the <CODE=20
class=3Dsystemitem>x264</CODE> codec</H2></DIV></DIV></DIV>
<P><CODE class=3Dsystemitem>x264</CODE> is a free library for encoding =
H.264/AVC=20
video streams. Before starting to encode, you need to <A=20
title=3D"7.1.3.4.&nbsp;How can I encode videos using MEncoder and x264?" =

href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
codec-x264-encode">set=20
up <SPAN class=3Dapplication>MEncoder</SPAN> to support it</A>. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-x264-encoding-options></A>14.5.1.&nbsp;Encoding options =
of=20
x264</H3></DIV></DIV></DIV>
<P>Please begin by reviewing the <CODE class=3Dsystemitem>x264</CODE> =
section of=20
<SPAN class=3Dapplication>MPlayer</SPAN>'s man page. This section is =
intended to=20
be a supplement to the man page. Here you will find quick hints about =
which=20
options are most likely to interest most people. The man page is more =
terse, but=20
also more exhaustive, and it sometimes offers much better technical =
detail. </P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-x264-encoding-options-intro></A>14.5.1.1.&nbsp;Introduct=
ion</H4></DIV></DIV></DIV>
<P>This guide considers two major categories of encoding options: </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P>Options which mainly trade off encoding time vs. quality </P>
  <LI>
  <P>Options which may be useful for fulfilling various personal =
preferences and=20
  special requirements </P></LI></OL></DIV>
<P>Ultimately, only you can decide which options are best for your =
purposes. The=20
decision for the first class of options is the simplest: you only have =
to decide=20
whether you think the quality differences justify the speed differences. =
For the=20
second class of options, preferences may be far more subjective, and =
more=20
factors may be involved. Note that some of the "personal preferences and =
special=20
requirements" options can still have large impacts on speed or quality, =
but that=20
is not what they are primarily useful for. A couple of the "personal =
preference"=20
options may even cause changes that look better to some people, but look =
worse=20
to others. </P>
<P>Before continuing, you need to understand that this guide uses only =
one=20
quality metric: global PSNR. For a brief explanation of what PSNR is, =
see <A=20
href=3D"http://en.wikipedia.org/wiki/PSNR" target=3D_top>the Wikipedia =
article on=20
PSNR</A>. Global PSNR is the last PSNR number reported when you include =
the <TT=20
class=3Doption>psnr</TT> option in <TT class=3Doption>x264encopts</TT>. =
Any time you=20
read a claim about PSNR, one of the assumptions behind the claim is that =
equal=20
bitrates are used. </P>
<P>Nearly all of this guide's comments assume you are using two pass. =
When=20
comparing options, there are two major reasons for using two pass =
encoding.=20
First, using two pass often gains around 1dB PSNR, which is a very big=20
difference. Secondly, testing options by doing direct quality =
comparisons with=20
one pass encodes introduces a major confounding factor: bitrate often =
varies=20
significantly with each encode. It is not always easy to tell whether =
quality=20
changes are due mainly to changed options, or if they mostly reflect =
essentially=20
random differences in the achieved bitrate. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-x264-encoding-options-speedvquality></A>14.5.1.2.&nbsp;O=
ptions=20
which primarily affect speed and quality</H4></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>subq</STRONG></SPAN>: Of the options =
which allow=20
  you to trade off speed for quality, <TT class=3Doption>subq</TT> and =
<TT=20
  class=3Doption>frameref</TT> (see below) are usually by far the most =
important.=20
  If you are interested in tweaking either speed or quality, these are =
the first=20
  options you should consider. On the speed dimension, the <TT=20
  class=3Doption>frameref</TT> and <TT class=3Doption>subq</TT> options =
interact=20
  with each other fairly strongly. Experience shows that, with one =
reference=20
  frame, <TT class=3Doption>subq=3D5</TT> (the default setting) takes =
about 35% more=20
  time than <TT class=3Doption>subq=3D1</TT>. With 6 reference frames, =
the penalty=20
  grows to over 60%. <TT class=3Doption>subq</TT>'s effect on PSNR seems =
fairly=20
  constant regardless of the number of reference frames. Typically, <TT=20
  class=3Doption>subq=3D5</TT> achieves 0.2-0.5 dB higher global PSNR in =
comparison=20
  <TT class=3Doption>subq=3D1</TT>. This is usually enough to be =
visible. </P>
  <P><TT class=3Doption>subq=3D6</TT> is slower and yields better =
quality at a=20
  reasonable cost. In comparison to <TT class=3Doption>subq=3D5</TT>, it =
usually=20
  gains 0.1-0.4 dB global PSNR with speed costs varying from 25%-100%. =
Unlike=20
  other levels of <TT class=3Doption>subq</TT>, the behavior of <TT=20
  class=3Doption>subq=3D6</TT> does not depend much on <TT=20
  class=3Doption>frameref</TT> and <TT class=3Doption>me</TT>. Instead, =
the=20
  effectiveness of <TT class=3Doption>subq=3D6 </TT>depends mostly upon =
the number=20
  of B-frames used. In normal usage, this means <TT =
class=3Doption>subq=3D6</TT> has=20
  a large impact on both speed and quality in complex, high motion =
scenes, but=20
  it may not have much effect in low-motion scenes. Note that it is =
still=20
  recommended to always set <TT class=3Doption>bframes</TT> to something =
other=20
  than zero (see below). </P>
  <P><TT class=3Doption>subq=3D7</TT> is the slowest, highest quality =
mode. In=20
  comparison to <TT class=3Doption>subq=3D6</TT>, it usually gains =
0.01-0.05 dB=20
  global PSNR with speed costs varying from 15%-33%. Since the tradeoff =
encoding=20
  time vs. quality is quite low, you should only use it if you are after =
every=20
  bit saving and if encoding time is not an issue. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>frameref</STRONG></SPAN>: <TT=20
  class=3Doption>frameref</TT> is set to 1 by default, but this should =
not be=20
  taken to imply that it is reasonable to set it to 1. Merely raising =
<TT=20
  class=3Doption>frameref</TT> to 2 gains around 0.15dB PSNR with a =
5-10% speed=20
  penalty; this seems like a good tradeoff. <TT =
class=3Doption>frameref=3D3</TT>=20
  gains around 0.25dB PSNR over <TT class=3Doption>frameref=3D1</TT>, =
which should=20
  be a visible difference. <TT class=3Doption>frameref=3D3</TT> is =
around 15% slower=20
  than <TT class=3Doption>frameref=3D1</TT>. Unfortunately, diminishing =
returns set=20
  in rapidly. <TT class=3Doption>frameref=3D6</TT> can be expected to =
gain only=20
  0.05-0.1 dB over <TT class=3Doption>frameref=3D3</TT> at an additional =
15% speed=20
  penalty. Above <TT class=3Doption>frameref=3D6</TT>, the quality gains =
are usually=20
  very small (although you should keep in mind throughout this whole =
discussion=20
  that it can vary quite a lot depending on your source). In a fairly =
typical=20
  case, <TT class=3Doption>frameref=3D12</TT> will improve global PSNR =
by a tiny=20
  0.02dB over <TT class=3Doption>frameref=3D6</TT>, at a speed cost of =
15%-20%. At=20
  such high <TT class=3Doption>frameref</TT> values, the only really =
good thing=20
  that can be said is that increasing it even further will almost =
certainly=20
  never <SPAN class=3Dbold><STRONG>harm</STRONG></SPAN> PSNR, but the =
additional=20
  quality benefits are barely even measurable, let alone perceptible. =
</P>
  <DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
  <H3 class=3Dtitle>Note:</H3>
  <P>Raising <TT class=3Doption>frameref</TT> to unnecessarily high =
values <SPAN=20
  class=3Dbold><STRONG>can</STRONG></SPAN> and <SPAN =
class=3Dbold><STRONG>usually=20
  does</STRONG></SPAN> hurt coding efficiency if you turn CABAC off. =
With CABAC=20
  on (the default behavior), the possibility of setting <TT=20
  class=3Doption>frameref</TT> "too high" currently seems too remote to =
even worry=20
  about, and in the future, optimizations may remove the possibility =
altogether.=20
  </P></DIV>
  <P>If you care about speed, a reasonable compromise is to use low <TT=20
  class=3Doption>subq</TT> and <TT class=3Doption>frameref</TT> values =
on the first=20
  pass, and then raise them on the second pass. Typically, this has a =
negligible=20
  negative effect on the final quality: You will probably lose well =
under 0.1dB=20
  PSNR, which should be much too small of a difference to see. However,=20
  different values of <TT class=3Doption>frameref</TT> can occasionally =
affect=20
  frametype decision. Most likely, these are rare outlying cases, but if =
you=20
  want to be pretty sure, consider whether your video has either =
fullscreen=20
  repetitive flashing patterns or very large temporary occlusions which =
might=20
  force an I-frame. Adjust the first-pass <TT =
class=3Doption>frameref</TT> so it=20
  is large enough to contain the duration of the flashing cycle (or =
occlusion).=20
  For example, if the scene flashes back and forth between two images =
over a=20
  duration of three frames, set the first pass <TT =
class=3Doption>frameref</TT> to=20
  3 or higher. This issue is probably extremely rare in live action =
video=20
  material, but it does sometimes come up in video game captures. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>me</STRONG></SPAN>: This option is for =
choosing=20
  the motion estimation search method. Altering this option provides a=20
  straightforward quality-vs-speed tradeoff. <TT =
class=3Doption>me=3Ddia</TT> is=20
  only a few percent faster than the default search, at a cost of under =
0.1dB=20
  global PSNR. The default setting (<TT class=3Doption>me=3Dhex</TT>) is =
a=20
  reasonable tradeoff between speed and quality. <TT =
class=3Doption>me=3Dumh</TT>=20
  gains a little under 0.1dB global PSNR, with a speed penalty that =
varies=20
  depending on <TT class=3Doption>frameref</TT>. At high values of <TT=20
  class=3Doption>frameref</TT> (e.g. 12 or so), <TT =
class=3Doption>me=3Dumh</TT> is=20
  about 40% slower than the default <TT class=3Doption>me=3Dhex</TT>. =
With <TT=20
  class=3Doption>frameref=3D3</TT>, the speed penalty incurred drops to =
25%-30%.=20
</P>
  <P><TT class=3Doption>me=3Desa</TT> uses an exhaustive search that is =
too slow for=20
  practical use. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>partitions=3Dall</STRONG></SPAN>: This =
option=20
  enables the use of 8x4, 4x8 and 4x4 subpartitions in predicted =
macroblocks (in=20
  addition to the default partitions). Enabling it results in a fairly=20
  consistent 10%-15% loss of speed. This option is rather useless in =
source=20
  containing only low motion, however in some high-motion source, =
particularly=20
  source with lots of small moving objects, gains of about 0.1dB can be=20
  expected. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>bframes</STRONG></SPAN>: If you are used =
to=20
  encoding with other codecs, you may have found that B-frames are not =
always=20
  useful. In H.264, this has changed: there are new techniques and block =
types=20
  that are possible in B-frames. Usually, even a naive B-frame choice =
algorithm=20
  can have a significant PSNR benefit. It is interesting to note that =
using=20
  B-frames usually speeds up the second pass somewhat, and may also =
speed up a=20
  single pass encode if adaptive B-frame decision is turned off. </P>
  <P>With adaptive B-frame decision turned off (<TT=20
  class=3Doption>x264encopts</TT>'s <TT class=3Doption>nob_adapt</TT>), =
the optimal=20
  value for this setting is usually no more than <TT=20
  class=3Doption>bframes=3D1</TT>, or else high-motion scenes can =
suffer. With=20
  adaptive B-frame decision on (the default behavior), it is safe to use =
higher=20
  values; the encoder will reduce the use of B-frames in scenes where =
they would=20
  hurt compression. The encoder rarely chooses to use more than 3 or 4 =
B-frames;=20
  setting this option any higher will have little effect. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>b_adapt</STRONG></SPAN>: Note: This is =
on by=20
  default. </P>
  <P>With this option enabled, the encoder will use a reasonably fast =
decision=20
  process to reduce the number of B-frames used in scenes that might not =
benefit=20
  from them as much. You can use <TT class=3Doption>b_bias</TT> to tweak =
how=20
  B-frame-happy the encoder is. The speed penalty of adaptive B-frames =
is=20
  currently rather modest, but so is the potential quality gain. It =
usually does=20
  not hurt, however. Note that this only affects speed and frametype =
decision on=20
  the first pass. <TT class=3Doption>b_adapt</TT> and <TT =
class=3Doption>b_bias</TT>=20
  have no effect on subsequent passes. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>b_pyramid</STRONG></SPAN>: You might as =
well=20
  enable this option if you are using &gt;=3D2 B-frames; as the man page =
says, you=20
  get a little quality improvement at no speed cost. Note that these =
videos=20
  cannot be read by libavcodec-based decoders older than about March 5, =
2005.=20
  </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>weight_b</STRONG></SPAN>: In typical =
cases, there=20
  is not much gain with this option. However, in crossfades or =
fade-to-black=20
  scenes, weighted prediction gives rather large bitrate savings. In =
MPEG-4 ASP,=20
  a fade-to-black is usually best coded as a series of expensive =
I-frames; using=20
  weighted prediction in B-frames makes it possible to turn at least =
some of=20
  these into much smaller B-frames. Encoding time cost is minimal, as no =
extra=20
  decisions need to be made. Also, contrary to what some people seem to =
guess,=20
  the decoder CPU requirements are not much affected by weighted =
prediction, all=20
  else being equal. </P>
  <P>Unfortunately, the current adaptive B-frame decision algorithm has =
a strong=20
  tendency to avoid B-frames during fades. Until this changes, it may be =
a good=20
  idea to add <TT class=3Doption>nob_adapt</TT> to your x264encopts, if =
you expect=20
  fades to have a large effect in your particular video clip. </P>
  <LI>
  <P><A =
name=3Dmenc-feat-x264-encoding-options-speedvquality-threads></A><SPAN=20
  class=3Dbold><STRONG>threads</STRONG></SPAN>: This option allows to =
spawn=20
  threads to encode in parallel on multiple CPUs. You can manually =
select the=20
  number of threads to be created or, better, set <TT=20
  class=3Doption>threads=3Dauto</TT> and let <CODE =
class=3Dsystemitem>x264</CODE>=20
  detect how many CPUs are available and pick an appropriate number of =
threads.=20
  If you have a multi-processor machine, you should really consider =
using it as=20
  it can to increase encoding speed linearly with the number of CPU =
cores (about=20
  94% per CPU core), with very little quality reduction (about 0.005dB =
for dual=20
  processor, about 0.01dB for a quad processor machine).=20
</P></LI></UL></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-x264-encoding-options-misc-preferences></A>14.5.1.3.&nbs=
p;Options=20
pertaining to miscellaneous preferences</H4></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Two pass encoding</STRONG></SPAN>: =
Above, it was=20
  suggested to always use two pass encoding, but there are still reasons =
for not=20
  using it. For instance, if you are capturing live TV and encoding in =
realtime,=20
  you are forced to use single-pass. Also, one pass is obviously faster =
than two=20
  passes; if you use the exact same set of options on both passes, two =
pass=20
  encoding is almost twice as slow. </P>
  <P>Still, there are very good reasons for using two pass encoding. For =
one=20
  thing, single pass ratecontrol is not psychic, and it often makes =
unreasonable=20
  choices because it cannot see the big picture. For example, suppose =
you have a=20
  two minute long video consisting of two distinct halves. The first =
half is a=20
  very high-motion scene lasting 60 seconds which, in isolation, =
requires about=20
  2500kbps in order to look decent. Immediately following it is a much =
less=20
  demanding 60-second scene that looks good at 300kbps. Suppose you ask =
for=20
  1400kbps on the theory that this is enough to accomodate both scenes. =
Single=20
  pass ratecontrol will make a couple of "mistakes" in such a case. =
First of=20
  all, it will target 1400kbps in both segments. The first segment may =
end up=20
  heavily overquantized, causing it to look unacceptably and =
unreasonably=20
  blocky. The second segment will be heavily underquantized; it may look =

  perfect, but the bitrate cost of that perfection will be completely=20
  unreasonable. What is even harder to avoid is the problem at the =
transition=20
  between the two scenes. The first seconds of the low motion half will =
be=20
  hugely over-quantized, because the ratecontrol is still expecting the =
kind of=20
  bitrate requirements it met in the first half of the video. This =
"error=20
  period" of heavily over-quantized low motion will look jarringly bad, =
and will=20
  actually use less than the 300kbps it would have taken to make it look =
decent.=20
  There are ways to mitigate the pitfalls of single-pass encoding, but =
they may=20
  tend to increase bitrate misprediction. </P>
  <P>Multipass ratecontrol can offer huge advantages over a single pass. =
Using=20
  the statistics gathered from the first pass encode, the encoder can =
estimate,=20
  with reasonable accuracy, the "cost" (in bits) of encoding any given =
frame, at=20
  any given quantizer. This allows for a much more rational, better =
planned=20
  allocation of bits between the expensive (high-motion) and cheap =
(low-motion)=20
  scenes. See <TT class=3Doption>qcomp</TT> below for some ideas on how =
to tweak=20
  this allocation to your liking. </P>
  <P>Moreover, two passes need not take twice as long as one pass. You =
can tweak=20
  the options in the first pass for higher speed and lower quality. If =
you=20
  choose your options well, you can get a very fast first pass. The =
resulting=20
  quality in the second pass will be slightly lower because size =
prediction is=20
  less accurate, but the quality difference is normally much too small =
to be=20
  visible. Try, for example, adding <TT =
class=3Doption>subq=3D1:frameref=3D1</TT> to=20
  the first pass <TT class=3Doption>x264encopts</TT>. Then, on the =
second pass,=20
  use slower, higher-quality options: <TT=20
  class=3Doption>subq=3D6:frameref=3D15:partitions=3Dall:me=3Dumh</TT> =
</P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Three pass encoding</STRONG></SPAN>? =
x264 offers=20
  the ability to make an arbitrary number of consecutive passes. If you =
specify=20
  <TT class=3Doption>pass=3D1</TT> on the first pass, then use <TT=20
  class=3Doption>pass=3D3</TT> on a subsequent pass, the subsequent pass =
will both=20
  read the statistics from the previous pass, and write its own =
statistics. An=20
  additional pass following this one will have a very good base from =
which to=20
  make highly accurate predictions of framesizes at a chosen quantizer. =
In=20
  practice, the overall quality gain from this is usually close to zero, =
and=20
  quite possibly a third pass will result in slightly worse global PSNR =
than the=20
  pass before it. In typical usage, three passes help if you get either =
bad=20
  bitrate prediction or bad looking scene transitions when using only =
two=20
  passes. This is somewhat likely to happen on extremely short clips. =
There are=20
  also a few special cases in which three (or more) passes are handy for =

  advanced users, but for brevity, this guide omits discussing those =
special=20
  cases. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>qcomp</STRONG></SPAN>: <TT =
class=3Doption>qcomp</TT>=20
  trades off the number of bits allocated to "expensive" high-motion =
versus=20
  "cheap" low-motion frames. At one extreme, <TT =
class=3Doption>qcomp=3D0</TT> aims=20
  for true constant bitrate. Typically this would make high-motion =
scenes look=20
  completely awful, while low-motion scenes would probably look =
absolutely=20
  perfect, but would also use many times more bitrate than they would =
need in=20
  order to look merely excellent. At the other extreme, <TT=20
  class=3Doption>qcomp=3D1</TT> achieves nearly constant quantization =
parameter=20
  (QP). Constant QP does not look bad, but most people think it is more=20
  reasonable to shave some bitrate off of the extremely expensive scenes =
(where=20
  the loss of quality is not as noticeable) and reallocate it to the =
scenes that=20
  are easier to encode at excellent quality. <TT =
class=3Doption>qcomp</TT> is set=20
  to 0.6 by default, which may be slightly low for many peoples' taste =
(0.7-0.8=20
  are also commonly used). </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>keyint</STRONG></SPAN>: <TT=20
  class=3Doption>keyint</TT> is solely for trading off file seekability =
against=20
  coding efficiency. By default, <TT class=3Doption>keyint</TT> is set =
to 250. In=20
  25fps material, this guarantees the ability to seek to within 10 =
seconds=20
  precision. If you think it would be important and useful to be able to =
seek=20
  within 5 seconds of precision, set <TT =
class=3Doption>keyint=3D125</TT>; this will=20
  hurt quality/bitrate slightly. If you care only about quality and not =
about=20
  seekability, you can set it to much higher values (understanding that =
there=20
  are diminishing returns which may become vanishingly low, or even =
zero). The=20
  video stream will still have seekable points as long as there are some =
scene=20
  changes. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>deblock</STRONG></SPAN>: This topic is =
going to be=20
  a bit controversial. </P>
  <P>H.264 defines a simple deblocking procedure on I-blocks that uses =
pre-set=20
  strengths and thresholds depending on the QP of the block in question. =
By=20
  default, high QP blocks are filtered heavily, and low QP blocks are =
not=20
  deblocked at all. The pre-set strengths defined by the standard are=20
  well-chosen and the odds are very good that they are PSNR-optimal for =
whatever=20
  video you are trying to encode. The <TT class=3Doption>deblock</TT> =
allow you to=20
  specify offsets to the preset deblocking thresholds. </P>
  <P>Many people seem to think it is a good idea to lower the deblocking =
filter=20
  strength by large amounts (say, -3). This is however almost never a =
good idea,=20
  and in most cases, people who are doing this do not understand very =
well how=20
  deblocking works by default. </P>
  <P>The first and most important thing to know about the in-loop =
deblocking=20
  filter is that the default thresholds are almost always PSNR-optimal. =
In the=20
  rare cases that they are not optimal, the ideal offset is plus or =
minus 1.=20
  Adjusting deblocking parameters by a larger amount is almost =
guaranteed to=20
  hurt PSNR. Strengthening the filter will smear more details; weakening =
the=20
  filter will increase the appearance of blockiness. </P>
  <P>It is definitely a bad idea to lower the deblocking thresholds if =
your=20
  source is mainly low in spacial complexity (i.e., not a lot of detail =
or=20
  noise). The in-loop filter does a rather excellent job of concealing =
the=20
  artifacts that occur. If the source is high in spacial complexity, =
however,=20
  artifacts are less noticeable. This is because the ringing tends to =
look like=20
  detail or noise. Human visual perception easily notices when detail is =

  removed, but it does not so easily notice when the noise is wrongly=20
  represented. When it comes to subjective quality, noise and detail are =

  somewhat interchangeable. By lowering the deblocking filter strength, =
you are=20
  most likely increasing error by adding ringing artifacts, but the eye =
does not=20
  notice because it confuses the artifacts with detail. </P>
  <P>This <SPAN class=3Dbold><STRONG>still</STRONG></SPAN> does not =
justify=20
  lowering the deblocking filter strength, however. You can generally =
get better=20
  quality noise from postprocessing. If your H.264 encodes look too =
blurry or=20
  smeared, try playing with <TT class=3Doption>-vf noise</TT> when you =
play your=20
  encoded movie. <TT class=3Doption>-vf noise=3D8a:4a</TT> should =
conceal most mild=20
  artifacting. It will almost certainly look better than the results you =
would=20
  have gotten just by fiddling with the deblocking filter.=20
</P></LI></UL></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-x264-example-settings></A>14.5.2.&nbsp;Encoding setting =

examples</H3></DIV></DIV></DIV>
<P>The following settings are examples of different encoding option =
combinations=20
that affect the speed vs quality tradeoff at the same target bitrate. =
</P>
<P>All the encoding settings were tested on a 720x448 @30000/1001 fps =
video=20
sample, the target bitrate was 900kbps, and the machine was an AMD-64 =
3400+ at=20
2400 MHz in 64 bits mode. Each encoding setting features the measured =
encoding=20
speed (in frames per second) and the PSNR loss (in dB) compared to the =
"very=20
high quality" setting. Please understand that depending on your source, =
your=20
machine type and development advancements, you may get very different =
results.=20
</P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Description</TH>
    <TH>Encoding options</TH>
    <TH>speed (in fps)</TH>
    <TH>Relative PSNR loss (in dB)</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>Very high quality</TD>
    <TD><TT=20
      =
class=3Doption>subq=3D6:partitions=3Dall:8x8dct:me=3Dumh:frameref=3D5:bfr=
ames=3D3:b_pyramid:weight_b</TT></TD>
    <TD>6fps</TD>
    <TD>0dB</TD></TR>
  <TR>
    <TD>High quality</TD>
    <TD><TT=20
      =
class=3Doption>subq=3D5:8x8dct:frameref=3D2:bframes=3D3:b_pyramid:weight_=
b</TT></TD>
    <TD>13fps</TD>
    <TD>-0.89dB</TD></TR>
  <TR>
    <TD>Fast</TD>
    <TD><TT =
class=3Doption>subq=3D4:bframes=3D2:b_pyramid:weight_b</TT></TD>
    <TD>17fps</TD>
    <TD>-1.48dB</TD></TR></TBODY></TABLE></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-video-for-windows></A>14.6.&nbsp; Encoding with the =
<CODE=20
class=3Dsystemitem>Video For Windows</CODE> codec family =
</H2></DIV></DIV></DIV>
<P>Video for Windows provides simple encoding by means of binary video =
codecs.=20
You can encode with the following codecs (if you have more, please tell =
us!)=20
</P>
<P>Note that support for this is very experimental and some codecs may =
not work=20
correctly. Some codecs will only work in certain colorspaces, try <TT=20
class=3Doption>-vf format=3Dbgr24</TT> and <TT class=3Doption>-vf =
format=3Dyuy2</TT> if=20
a codec fails or gives wrong output. </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-enc-vfw-video-codecs></A>14.6.1.&nbsp;Video=20
for Windows supported codecs</H3></DIV></DIV></DIV>
<P></P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Video codec file name</TH>
    <TH>Description (FourCC)</TH>
    <TH>md5sum</TH>
    <TH>Comment</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>aslcodec_vfw.dll</TD>
    <TD>Alparysoft lossless codec vfw (ASLC)</TD>
    <TD>608af234a6ea4d90cdc7246af5f3f29a</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>avimszh.dll</TD>
    <TD>AVImszh (MSZH)</TD>
    <TD>253118fe1eedea04a95ed6e5f4c28878</TD>
    <TD>needs <TT class=3Doption>-vf format</TT></TD></TR>
  <TR>
    <TD>avizlib.dll</TD>
    <TD>AVIzlib (ZLIB)</TD>
    <TD>2f1cc76bbcf6d77d40d0e23392fa8eda</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>divx.dll</TD>
    <TD>DivX4Windows-VFW</TD>
    <TD>acf35b2fc004a89c829531555d73f1e6</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>huffyuv.dll</TD>
    <TD>HuffYUV (lossless) (HFYU)</TD>
    <TD>b74695b50230be4a6ef2c4293a58ac3b</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>iccvid.dll</TD>
    <TD>Cinepak Video (cvid)</TD>
    <TD>cb3b7ee47ba7dbb3d23d34e274895133</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>icmw_32.dll</TD>
    <TD>Motion Wavelets (MWV1)</TD>
    <TD>c9618a8fc73ce219ba918e3e09e227f2</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>jp2avi.dll</TD>
    <TD>ImagePower MJPEG2000 (IPJ2)</TD>
    <TD>d860a11766da0d0ea064672c6833768b</TD>
    <TD><TT class=3Doption>-vf flip</TT></TD></TR>
  <TR>
    <TD>m3jp2k32.dll</TD>
    <TD>Morgan MJPEG2000 (MJ2C)</TD>
    <TD>f3c174edcbaef7cb947d6357cdfde7ff</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>m3jpeg32.dll</TD>
    <TD>Morgan Motion JPEG Codec (MJPG)</TD>
    <TD>1cd13fff5960aa2aae43790242c323b1</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>mpg4c32.dll</TD>
    <TD>Microsoft MPEG-4 v1/v2</TD>
    <TD>b5791ea23f33010d37ab8314681f1256</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>tsccvid.dll</TD>
    <TD>TechSmith Camtasia Screen Codec (TSCC)</TD>
    <TD>8230d8560c41d444f249802a2700d1d5</TD>
    <TD>shareware error on windows</TD></TR>
  <TR>
    <TD>vp31vfw.dll</TD>
    <TD>On2 Open Source VP3 Codec (VP31)</TD>
    <TD>845f3590ea489e2e45e876ab107ee7d2</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>vp4vfw.dll</TD>
    <TD>On2 VP4 Personal Codec (VP40)</TD>
    <TD>fc5480a482ccc594c2898dcc4188b58f</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>vp6vfw.dll</TD>
    <TD>On2 VP6 Personal Codec (VP60)</TD>
    <TD>04d635a364243013898fd09484f913fb</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>vp7vfw.dll</TD>
    <TD>On2 VP7 Personal Codec (VP70)</TD>
    <TD>cb4cc3d4ea7c94a35f1d81c3d750bc8d</TD>
    <TD>wrong FourCC?</TD></TR>
  <TR>
    <TD>ViVD2.dll</TD>
    <TD>SoftMedia ViVD V2 codec VfW (GXVE)</TD>
    <TD>a7b4bf5cac630bb9262c3f80d8a773a1</TD>
    <TD>&nbsp;</TD></TR>
  <TR>
    <TD>msulvc06.DLL</TD>
    <TD>MSU Lossless codec (MSUD)</TD>
    <TD>294bf9288f2f127bb86f00bfcc9ccdda</TD>
    <TD>Decodable by <SPAN class=3Dapplication>Window Media =
Player</SPAN>, not=20
      <SPAN class=3Dapplication>MPlayer</SPAN> (yet). </TD></TR>
  <TR>
    <TD>camcodec.dll</TD>
    <TD>CamStudio lossless video codec (CSCD)</TD>
    <TD>0efe97ce08bb0e40162ab15ef3b45615</TD>
    <TD>sf.net/projects/camstudio</TD></TR></TBODY></TABLE></DIV>
<P>The first column contains the codec names that should be passed after =
the=20
<CODE class=3Dliteral>codec</CODE> parameter, like: <TT =
class=3Doption>-xvfwopts=20
codec=3Ddivx.dll</TT> The FourCC code used by each codec is given in the =

parentheses. </P>
<DIV class=3Dinformalexample>
<P>An example to convert an ISO DVD trailer to a VP6 flash video file =
using=20
compdata bitrate settings: </P><PRE class=3Dscreen>mencoder -dvd-device =
<EM class=3Dreplaceable><CODE>zeiram.iso</CODE></EM> dvd://7 -o <EM =
class=3Dreplaceable><CODE>trailer.flv</CODE></EM> \
-ovc vfw -xvfwopts codec=3Dvp6vfw.dll:compdata=3Donepass.mcf -oac =
mp3lame \
-lameopts cbr:br=3D64 -af lavcresample=3D22050 -vf =
yadif,scale=3D320:240,flip \
-of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames
</PRE>
<P></P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-video-for-windows-bitrate-settings></A>14.6.2.&nbsp;Usin=
g=20
vfw2menc to create a codec settings file.</H3></DIV></DIV></DIV>
<P>To encode with the Video for Windows codecs, you will need to set =
bitrate and=20
other options. This is known to work on x86 on both *NIX and Windows. =
</P>
<P>First you must build the <SPAN class=3Dapplication>vfw2menc</SPAN> =
program. It=20
is located in the <TT class=3Dfilename>TOOLS</TT> subdirectory of the =
MPlayer=20
source tree. To build on Linux, this can be done using <SPAN=20
class=3Dapplication>Wine</SPAN>: </P><PRE class=3Dscreen>winegcc =
vfw2menc.c -o vfw2menc -lwinmm -lole32</PRE>
<P>To build on Windows in <SPAN class=3Dapplication>MinGW</SPAN> or =
<SPAN=20
class=3Dapplication>Cygwin</SPAN> use: </P><PRE class=3Dscreen>gcc =
vfw2menc.c -o vfw2menc.exe -lwinmm -lole32</PRE>
<P>To build on <SPAN class=3Dapplication>MSVC</SPAN> you will need =
getopt. Getopt=20
can be found in the original <SPAN class=3Dapplication>vfw2menc</SPAN> =
archive=20
available at: The <A href=3D"http://oss.netfarm.it/mplayer-win32.php"=20
target=3D_top>MPlayer on win32</A> project. </P>
<DIV class=3Dinformalexample>
<P>Below is an example with the VP6 codec. </P><PRE =
class=3Dscreen>vfw2menc -f VP62 -d vp6vfw.dll -s firstpass.mcf
</PRE>
<P>This will open the VP6 codec dialog window. Repeat this step for the =
second=20
pass and use <TT class=3Doption>-s <EM=20
class=3Dreplaceable><CODE>secondpass.mcf</CODE></EM></TT>. </P></DIV>
<P>Windows users can use <TT class=3Doption>-xvfwopts=20
codec=3Dvp6vfw.dll:compdata=3Ddialog</TT> to have the codec dialog =
display before=20
encoding starts. </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-quicktime-7></A>14.7.&nbsp;Using <SPAN=20
class=3Dapplication>MEncoder</SPAN> to create <SPAN=20
class=3Dapplication>QuickTime</SPAN>-compatible =
files</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-quicktime-7-why-use-it></A>14.7.1.&nbsp;Why=20
would one want to produce <SPAN =
class=3Dapplication>QuickTime</SPAN>-compatible=20
Files?</H3></DIV></DIV></DIV>
<P>There are several reasons why producing <SPAN=20
class=3Dapplication>QuickTime</SPAN>-compatible files can be desirable. =
</P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>You want any computer illiterate to be able to watch your encode on =
any=20
  major platform (Windows, Mac OS X, Unices =E2=80=A6). </P>
  <LI>
  <P><SPAN class=3Dapplication>QuickTime</SPAN> is able to take =
advantage of more=20
  hardware and software acceleration features of Mac OS X than=20
  platform-independent players like <SPAN =
class=3Dapplication>MPlayer</SPAN> or=20
  <SPAN class=3Dapplication>VLC</SPAN>. That means that your encodes =
have a chance=20
  to be played smoothly by older G4-powered machines. </P>
  <LI>
  <P><SPAN class=3Dapplication>QuickTime</SPAN> 7 supports the =
next-generation=20
  codec H.264, which yields significantly better picture quality than =
previous=20
  codec generations (MPEG-2, MPEG-4 =E2=80=A6). =
</P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-quicktime-7-constraints></A>14.7.2.&nbsp;<SPAN=20
class=3Dapplication>QuickTime</SPAN> 7 =
limitations</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>QuickTime</SPAN> 7 supports H.264 video and =
AAC=20
audio, but it does not support them muxed in the AVI container format. =
However,=20
you can use <SPAN class=3Dapplication>MEncoder</SPAN> to encode the =
video and=20
audio, and then use an external program such as <SPAN=20
class=3Dapplication>mp4creator</SPAN> (part of the <A=20
href=3D"http://mpeg4ip.sourceforge.net/" target=3D_top>MPEG4IP =
suite</A>) to remux=20
the video and audio tracks into an MP4 container. </P>
<P><SPAN class=3Dapplication>QuickTime</SPAN>'s support for H.264 is =
limited, so=20
you will need to drop some advanced features. If you encode your video =
with=20
features that <SPAN class=3Dapplication>QuickTime</SPAN> 7 does not =
support, <SPAN=20
class=3Dapplication>QuickTime</SPAN>-based players will show you a =
pretty white=20
screen instead of your expected video. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>B-frames</STRONG></SPAN>: <SPAN=20
  class=3Dapplication>QuickTime</SPAN> 7 supports a maximum of 1 =
B-frame, i.e. <TT=20
  class=3Doption>-x264encopts bframes=3D1</TT>. This means that <TT=20
  class=3Doption>b_pyramid</TT> and <TT class=3Doption>weight_b</TT> =
will have no=20
  effect, since they require <TT class=3Doption>bframes</TT> to be =
greater than 1.=20
  </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Macroblocks</STRONG></SPAN>: <SPAN=20
  class=3Dapplication>QuickTime</SPAN> 7 does not support 8x8 DCT =
macroblocks.=20
  This option (<TT class=3Doption>8x8dct</TT>) is off by default, so =
just be sure=20
  not to explicitly enable it. This also means that the <TT=20
  class=3Doption>i8x8</TT> option will have no effect, since it requires =
<TT=20
  class=3Doption>8x8dct</TT>. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>Aspect ratio</STRONG></SPAN>: <SPAN=20
  class=3Dapplication>QuickTime</SPAN> 7 does not support SAR (sample =
aspect=20
  ratio) information in MPEG-4 files; it assumes that SAR=3D1. Read <A=20
  title=3D14.7.4.&nbsp;Scaling=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-quicktime-7-scale">the=20
  section on scaling</A> for a workaround. </P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-quicktime-7-crop></A>14.7.3.&nbsp;Cropping</H3></DIV></D=
IV></DIV>
<P>Suppose you want to rip your freshly bought copy of "The Chronicles =
of=20
Narnia". Your DVD is region 1, which means it is NTSC. The example below =
would=20
still apply to PAL, except you would omit <TT class=3Doption>-ofps =
24000/1001</TT>=20
and use slightly different <TT class=3Doption>crop</TT> and <TT=20
class=3Doption>scale</TT> dimensions. </P>
<P>After running <TT class=3Doption>mplayer dvd://1</TT>, you follow the =
process=20
detailed in the section <A=20
title=3D"14.2.&nbsp;How to deal with telecine and interlacing within =
NTSC DVDs"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-telecine">How=20
to deal with telecine and interlacing in NTSC DVDs</A> and discover that =
it is=20
24000/1001 fps progressive video. This simplifies the process somewhat, =
since=20
you do not need to use an inverse telecine filter such as <TT=20
class=3Doption>pullup</TT> or a deinterlacing filter such as <TT=20
class=3Doption>yadif</TT>. </P>
<P>Next, you need to crop out the black bars from the top and bottom of =
the=20
video, as detailed in <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-example-crop">this</A>=20
previous section. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-quicktime-7-scale></A>14.7.4.&nbsp;Scaling</H3></DIV></D=
IV></DIV>
<P>The next step is truly heartbreaking. <SPAN=20
class=3Dapplication>QuickTime</SPAN> 7 does not support MPEG-4 videos =
with a=20
sample aspect ratio other than 1, so you will need to upscale (which =
wastes a=20
lot of disk space) or downscale (which loses some details of the source) =
the=20
video to square pixels. Either way you do it, this is highly =
inefficient, but=20
simply cannot be avoided if you want your video to be playable by <SPAN=20
class=3Dapplication>QuickTime</SPAN> 7. <SPAN =
class=3Dapplication>MEncoder</SPAN>=20
can apply the appropriate upscaling or downscaling by specifying =
respectively=20
<TT class=3Doption>-vf scale=3D-10:-1</TT> or <TT class=3Doption>-vf=20
scale=3D-1:-10</TT>. This will scale your video to the correct width for =
the=20
cropped height, rounded to the closest multiple of 16 for optimal =
compression.=20
Remember that if you are cropping, you should crop first, then scale: =
</P><PRE class=3Dscreen>-vf crop=3D720:352:0:62,scale=3D-10:-1</PRE>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-quicktime-7-avsync></A>14.7.5.&nbsp;A/V=20
sync</H3></DIV></DIV></DIV>
<P>Because you will be remuxing into a different container, you should =
always=20
use the <TT class=3Doption>harddup</TT> option to ensure that duplicated =
frames=20
are actually duplicated in the video output. Without this option, <SPAN=20
class=3Dapplication>MEncoder</SPAN> will simply put a marker in the =
video stream=20
that a frame was duplicated, and rely on the client software to show the =
same=20
frame twice. Unfortunately, this "soft duplication" does not survive =
remuxing,=20
so the audio would slowly lose sync with the video. </P>
<P>The final filter chain looks like this: </P><PRE class=3Dscreen>-vf =
crop=3D720:352:0:62,scale=3D-10:-1,harddup</PRE>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dmenc-feat-quicktime-7-bitrate></A>14.7.6.&nbsp;Bitrate</H3></DIV><=
/DIV></DIV>
<P>As always, the selection of bitrate is a matter of the technical =
properties=20
of the source, as explained <A=20
title=3D"14.1.5.&nbsp;Choosing resolution and bitrate"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-resolution-bitrate">here</A>,=20
as well as a matter of taste. This movie has a fair bit of action and =
lots of=20
detail, but H.264 video looks good at much lower bitrates than XviD or =
other=20
MPEG-4 codecs. After much experimentation, the author of this guide =
chose to=20
encode this movie at 900kbps, and thought that it looked very good. You =
may=20
decrease bitrate if you need to save more space, or increase it if you =
need to=20
improve quality. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-quicktime-7-example></A>14.7.7.&nbsp;Encoding=20
example</H3></DIV></DIV></DIV>
<P>You are now ready to encode the video. Since you care about quality, =
of=20
course you will be doing a two-pass encode. To shave off some encoding =
time, you=20
can specify the <TT class=3Doption>turbo</TT> option on the first pass; =
this=20
reduces <TT class=3Doption>subq</TT> and <TT =
class=3Doption>frameref</TT> to 1. To=20
save some disk space, you can use the <TT class=3Doption>ss</TT> option =
to strip=20
off the first few seconds of the video. (I found that this particular =
movie has=20
32 seconds of credits and logos.) <TT class=3Doption>bframes</TT> can be =
0 or 1.=20
The other options are documented in <A=20
title=3D"14.5.1.2.&nbsp;Options which primarily affect speed and =
quality"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-speedvquality">Encoding=20
with the <CODE class=3Dsystemitem>x264</CODE> codec</A> and the man =
page. </P><PRE class=3Dscreen>mencoder dvd://1 -o /dev/null -ss 32 -ovc =
x264 \
-x264encopts pass=3D1:turbo:bitrate=3D900:bframes=3D1:\
me=3Dumh:partitions=3Dall:trellis=3D1:qp_step=3D4:qcomp=3D0.7:direct_pred=
=3Dauto:keyint=3D300 \
-vf crop=3D720:352:0:62,scale=3D-10:-1,harddup \
-oac faac -faacopts br=3D192:mpeg=3D4:object=3D2 -channels 2 -srate =
48000 \
-ofps 24000/1001</PRE>
<P>If you have a multi-processor machine, don't miss the opportunity to=20
dramatically speed-up encoding by enabling <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-x264-encoding-options-speedvquality-threads"><CODE=20
class=3Dsystemitem>x264</CODE>'s multi-threading mode</A> by adding <TT=20
class=3Doption>threads=3Dauto</TT> to your <TT =
class=3Doption>x264encopts</TT>=20
command-line. </P>
<P>The second pass is the same, except that you specify the output file =
and set=20
<TT class=3Doption>pass=3D2</TT>. </P><PRE class=3Dscreen>mencoder =
dvd://1 <SPAN class=3Dbold><STRONG>-o narnia.avi</STRONG></SPAN> -ss 32 =
-ovc x264 \
-x264encopts <SPAN =
class=3Dbold><STRONG>pass=3D2</STRONG></SPAN>:turbo:bitrate=3D900:framere=
f=3D5:bframes=3D1:\
me=3Dumh:partitions=3Dall:trellis=3D1:qp_step=3D4:qcomp=3D0.7:direct_pred=
=3Dauto:keyint=3D300 \
-vf crop=3D720:352:0:62,scale=3D-10:-1,harddup \
-oac faac -faacopts br=3D192:mpeg=3D4:object=3D2 -channels 2 -srate =
48000 \
-ofps 24000/1001</PRE>
<P></P>
<P>The resulting AVI should play perfectly in <SPAN=20
class=3Dapplication>MPlayer</SPAN>, but of course <SPAN=20
class=3Dapplication>QuickTime</SPAN> can not play it because it does not =
support=20
H.264 muxed in AVI. So the next step is to remux the video into an MP4=20
container. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-quicktime-7-remux></A>14.7.8.&nbsp;Remuxing as=20
MP4</H3></DIV></DIV></DIV>
<P>There are several ways to remux AVI files to MP4. You can use <SPAN=20
class=3Dapplication>mp4creator</SPAN>, which is part of the <A=20
href=3D"http://mpeg4ip.sourceforge.net/" target=3D_top>MPEG4IP =
suite</A>. </P>
<P>First, demux the AVI into separate audio and video streams using =
<SPAN=20
class=3Dapplication>MPlayer</SPAN>. </P><PRE class=3Dscreen>mplayer =
narnia.avi -dumpaudio -dumpfile narnia.aac
mplayer narnia.avi -dumpvideo -dumpfile narnia.h264</PRE>
<P>The filenames are important; <SPAN =
class=3Dapplication>mp4creator</SPAN>=20
requires that AAC audio streams be named <CODE =
class=3Dsystemitem>.aac</CODE> and=20
H.264 video streams be named <CODE class=3Dsystemitem>.h264</CODE>. </P>
<P>Now use <SPAN class=3Dapplication>mp4creator</SPAN> to create a new =
MP4 file=20
out of the audio and video streams. </P><PRE class=3Dscreen>mp4creator =
-create=3Dnarnia.aac narnia.mp4
mp4creator -create=3Dnarnia.h264 -rate=3D23.976 narnia.mp4</PRE>
<P>Unlike the encoding step, you must specify the framerate as a decimal =
(such=20
as 23.976), not a fraction (such as 24000/1001). </P>
<P>This <CODE class=3Dsystemitem>narnia.mp4</CODE> file should now be =
playable=20
with any <SPAN class=3Dapplication>QuickTime</SPAN> 7 application, such =
as <SPAN=20
class=3Dapplication>QuickTime Player</SPAN> or <SPAN=20
class=3Dapplication>iTunes</SPAN>. If you are planning to view the video =
in a web=20
browser with the <SPAN class=3Dapplication>QuickTime</SPAN> plugin, you =
should=20
also hint the movie so that the <SPAN =
class=3Dapplication>QuickTime</SPAN> plugin=20
can start playing it while it is still downloading. <SPAN=20
class=3Dapplication>mp4creator</SPAN> can create these hint tracks: =
</P><PRE class=3Dscreen>mp4creator -hint=3D1 narnia.mp4
mp4creator -hint=3D2 narnia.mp4
mp4creator -optimize narnia.mp4</PRE>
<P>You can check the final result to ensure that the hint tracks were =
created=20
successfully: </P><PRE class=3Dscreen>mp4creator -list narnia.mp4</PRE>
<P>You should see a list of tracks: 1 audio, 1 video, and 2 hint tracks. =
</P><PRE class=3Dscreen>Track   Type    Info
1       audio   MPEG-4 AAC LC, 8548.714 secs, 190 kbps, 48000 Hz
2       video   H264 Main@5.1, 8549.132 secs, 899 kbps, 848x352 @ =
23.976001 fps
3       hint    Payload mpeg4-generic for track 1
4       hint    Payload H264 for track 2
</PRE>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-quicktime-7-metadata></A>14.7.9.&nbsp;Adding=20
metadata tags</H3></DIV></DIV></DIV>
<P>If you want to add tags to your video that show up in iTunes, you can =
use <A=20
href=3D"http://atomicparsley.sourceforge.net/" =
target=3D_top>AtomicParsley</A>. </P><PRE class=3Dscreen>AtomicParsley =
narnia.mp4 --metaEnema --title "The Chronicles of Narnia" --year 2005 =
--stik Movie --freefree --overWrite</PRE>
<P>The <TT class=3Doption>--metaEnema</TT> option removes any existing =
metadata=20
(<SPAN class=3Dapplication>mp4creator</SPAN> inserts its name in the =
"encoding=20
tool" tag), and <TT class=3Doption>--freefree</TT> reclaims the space =
from the=20
deleted metadata. The <TT class=3Doption>--stik</TT> option sets the =
type of video=20
(such as Movie or TV Show), which iTunes uses to group related video =
files. The=20
<TT class=3Doption>--overWrite</TT> option overwrites the original file; =
without=20
it, <SPAN class=3Dapplication>AtomicParsley</SPAN> creates a new =
auto-named file=20
in the same directory and leaves the original file untouched. =
</P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dmenc-feat-vcd-dvd></A>14.8.&nbsp;Using <SPAN=20
class=3Dapplication>MEncoder</SPAN> to create VCD/SVCD/DVD-compliant=20
files</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-constraints></A>14.8.1.&nbsp;Format=20
Constraints</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN> is capable of creating VCD, =
SCVD and=20
DVD format MPEG files using the <CODE =
class=3Dsystemitem>libavcodec</CODE>=20
library. These files can then be used in conjunction with <A=20
href=3D"http://www.gnu.org/software/vcdimager/vcdimager.html"=20
target=3D_top>vcdimager</A> or <A =
href=3D"http://dvdauthor.sourceforge.net/"=20
target=3D_top>dvdauthor</A> to create discs that will play on a standard =
set-top=20
player. </P>
<P>The DVD, SVCD, and VCD formats are subject to heavy constraints. Only =
a small=20
selection of encoded picture sizes and aspect ratios are available. If =
your=20
movie does not already meet these requirements, you may have to scale, =
crop or=20
add black borders to the picture to make it compliant. </P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-constraints-resolution></A>14.8.1.1.&nbsp;Format=
=20
Constraints</H4></DIV></DIV></DIV>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL>
  <COL>
  <COL>
  <COL>
  <COL>
  <COL>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Format</TH>
    <TH>Resolution</TH>
    <TH>V. Codec</TH>
    <TH>V. Bitrate</TH>
    <TH>Sample Rate</TH>
    <TH>A. Codec</TH>
    <TH>A. Bitrate</TH>
    <TH>FPS</TH>
    <TH>Aspect</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD>NTSC DVD</TD>
    <TD>720x480, 704x480, 352x480, 352x240</TD>
    <TD>MPEG-2</TD>
    <TD>9800 kbps</TD>
    <TD>48000 Hz</TD>
    <TD>AC-3,PCM</TD>
    <TD>1536 kbps (max)</TD>
    <TD>30000/1001, 24000/1001</TD>
    <TD>4:3, 16:9 (only for 720x480)</TD></TR>
  <TR>
    <TD>NTSC DVD</TD>
    <TD>352x240<SUP>[<A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ftn.fn-rare-resolutions"=20
      name=3Dfn-rare-resolutions>a</A>]</SUP></TD>
    <TD>MPEG-1</TD>
    <TD>1856 kbps</TD>
    <TD>48000 Hz</TD>
    <TD>AC-3,PCM</TD>
    <TD>1536 kbps (max)</TD>
    <TD>30000/1001, 24000/1001</TD>
    <TD>4:3, 16:9</TD></TR>
  <TR>
    <TD>NTSC SVCD</TD>
    <TD>480x480</TD>
    <TD>MPEG-2</TD>
    <TD>2600 kbps</TD>
    <TD>44100 Hz</TD>
    <TD>MP2</TD>
    <TD>384 kbps (max)</TD>
    <TD>30000/1001</TD>
    <TD>4:3</TD></TR>
  <TR>
    <TD>NTSC VCD</TD>
    <TD>352x240</TD>
    <TD>MPEG-1</TD>
    <TD>1150 kbps</TD>
    <TD>44100 Hz</TD>
    <TD>MP2</TD>
    <TD>224 kbps</TD>
    <TD>24000/1001, 30000/1001</TD>
    <TD>4:3</TD></TR>
  <TR>
    <TD>PAL DVD</TD>
    <TD>720x576, 704x576, 352x576, 352x288</TD>
    <TD>MPEG-2</TD>
    <TD>9800 kbps</TD>
    <TD>48000 Hz</TD>
    <TD>MP2,AC-3,PCM</TD>
    <TD>1536 kbps (max)</TD>
    <TD>25</TD>
    <TD>4:3, 16:9 (only for 720x576)</TD></TR>
  <TR>
    <TD>PAL DVD</TD>
    <TD>352x288<SUP>[<A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
ftn.fn-rare-resolutions">a</A>]</SUP></TD>
    <TD>MPEG-1</TD>
    <TD>1856 kbps</TD>
    <TD>48000 Hz</TD>
    <TD>MP2,AC-3,PCM</TD>
    <TD>1536 kbps (max)</TD>
    <TD>25</TD>
    <TD>4:3, 16:9</TD></TR>
  <TR>
    <TD>PAL SVCD</TD>
    <TD>480x576</TD>
    <TD>MPEG-2</TD>
    <TD>2600 kbps</TD>
    <TD>44100 Hz</TD>
    <TD>MP2</TD>
    <TD>384 kbps (max)</TD>
    <TD>25</TD>
    <TD>4:3</TD></TR>
  <TR>
    <TD>PAL VCD</TD>
    <TD>352x288</TD>
    <TD>MPEG-1</TD>
    <TD>1152 kbps</TD>
    <TD>44100 Hz</TD>
    <TD>MP2</TD>
    <TD>224 kbps</TD>
    <TD>25</TD>
    <TD>4:3</TD></TR></TBODY>
  <TBODY class=3Dfootnotes>
  <TR>
    <TD colSpan=3D9>
      <DIV class=3Dfootnote>
      <P><SUP>[<A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fn-rare-resolutions"=20
      name=3Dftn.fn-rare-resolutions>a</A>] </SUP>These resolutions are =
rarely=20
      used for DVDs because they are fairly low=20
quality.</P></DIV></TD></TR></TBODY></TABLE></DIV>
<P>If your movie has 2.35:1 aspect (most recent action movies), you will =
have to=20
add black borders or crop the movie down to 16:9 to make a DVD or VCD. =
If you=20
add black borders, try to align them at 16-pixel boundaries in order to =
minimize=20
the impact on encoding performance. Thankfully DVD has sufficiently =
excessive=20
bitrate that you do not have to worry too much about encoding =
efficiency, but=20
SVCD and VCD are highly bitrate-starved and require effort to obtain =
acceptable=20
quality. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-constraints-gop></A>14.8.1.2.&nbsp;GOP=20
Size Constraints</H4></DIV></DIV></DIV>
<P>DVD, VCD, and SVCD also constrain you to relatively low GOP (Group of =

Pictures) sizes. For 30 fps material the largest allowed GOP size is 18. =
For 25=20
or 24 fps, the maximum is 15. The GOP size is set using the <TT=20
class=3Doption>keyint</TT> option. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-constraints-bitrate></A>14.8.1.3.&nbsp;Bitrate=20
Constraints</H4></DIV></DIV></DIV>
<P>VCD video is required to be CBR at 1152 kbps. This highly limiting =
constraint=20
also comes along with an extremly low vbv buffer size of 327 kilobits. =
SVCD=20
allows varying video bitrates up to 2500 kbps, and a somewhat less =
restrictive=20
vbv buffer size of 917 kilobits is allowed. DVD video bitrates may range =

anywhere up to 9800 kbps (though typical bitrates are about half that), =
and the=20
vbv buffer size is 1835 kilobits. </P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-output></A>14.8.2.&nbsp;Output=20
Options</H3></DIV></DIV></DIV>
<P><SPAN class=3Dapplication>MEncoder</SPAN> has options to control the =
output=20
format. Using these options we can instruct it to create the correct =
type of=20
file. </P>
<P>The options for VCD and SVCD are called xvcd and xsvcd, because they =
are=20
extended formats. They are not strictly compliant, mainly because the =
output=20
does not contain scan offsets. If you need to generate an SVCD image, =
you should=20
pass the output file to <A=20
href=3D"http://www.gnu.org/software/vcdimager/vcdimager.html"=20
target=3D_top>vcdimager</A>. </P>
<P>VCD: </P><PRE class=3Dscreen>-of mpeg -mpegopts format=3Dxvcd</PRE>
<P></P>
<P>SVCD: </P><PRE class=3Dscreen>-of mpeg -mpegopts format=3Dxsvcd</PRE>
<P></P>
<P>DVD (with timestamps on every frame, if possible): </P><PRE =
class=3Dscreen>-of mpeg -mpegopts format=3Ddvd:tsaf</PRE>
<P></P>
<P>DVD with NTSC Pullup: </P><PRE class=3Dscreen>-of mpeg -mpegopts =
format=3Ddvd:tsaf:telecine -ofps 24000/1001</PRE>
<P>This allows 24000/1001 fps progressive content to be encoded at =
30000/1001=20
fps whilst maintaing DVD-compliance. </P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-output-aspect></A>14.8.2.1.&nbsp;Aspect=20
Ratio</H4></DIV></DIV></DIV>
<P>The aspect argument of <TT class=3Doption>-lavcopts</TT> is used to =
encode the=20
aspect ratio of the file. During playback the aspect ratio is used to =
restore=20
the video to the correct size. </P>
<P>16:9 or "Widescreen" </P><PRE class=3Dscreen>-lavcopts =
aspect=3D16/9</PRE>
<P></P>
<P>4:3 or "Fullscreen" </P><PRE class=3Dscreen>-lavcopts =
aspect=3D4/3</PRE>
<P></P>
<P>2.35:1 or "Cinemascope" NTSC </P><PRE class=3Dscreen>-vf =
scale=3D720:368,expand=3D720:480 -lavcopts aspect=3D16/9</PRE>
<P>To calculate the correct scaling size, use the expanded NTSC width of =

854/2.35 =3D 368 </P>
<P>2.35:1 or "Cinemascope" PAL </P><PRE class=3Dscreen>-vf =
scale=3D720:432,expand=3D720:576 -lavcopts aspect=3D16/9</PRE>
<P>To calculate the correct scaling size, use the expanded PAL width of=20
1024/2.35 =3D 432 </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-a-v-sync></A>14.8.2.2.&nbsp;Maintaining A/V=20
sync</H4></DIV></DIV></DIV>
<P>In order to maintain audio/video synchronization throughout the =
encode, <SPAN=20
class=3Dapplication>MEncoder</SPAN> has to drop or duplicate frames. =
This works=20
rather well when muxing into an AVI file, but is almost guaranteed to =
fail to=20
maintain A/V sync with other muxers such as MPEG. This is why it is =
necessary to=20
append the <TT class=3Doption>harddup</TT> video filter at the end of =
the filter=20
chain to avoid this kind of problem. You can find more technical =
information=20
about <TT class=3Doption>harddup</TT> in the section <A=20
title=3D"14.1.12.1.&nbsp;Improving muxing and A/V sync reliability"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
menc-feat-dvd-mpeg4-muxing-filter-issues">Improving=20
muxing and A/V sync reliability</A> or in the manual page. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-output-srate></A>14.8.2.3.&nbsp;Sample=20
Rate Conversion</H4></DIV></DIV></DIV>
<P>If the audio sample rate in the original file is not the same as =
required by=20
the target format, sample rate conversion is required. This is achieved =
using=20
the <TT class=3Doption>-srate</TT> option and the <TT class=3Doption>-af =

lavcresample</TT> audio filter together. </P>
<P>DVD: </P><PRE class=3Dscreen>-srate 48000 -af =
lavcresample=3D48000</PRE>
<P></P>
<P>VCD and SVCD: </P><PRE class=3Dscreen>-srate 44100 -af =
lavcresample=3D44100</PRE>
<P></P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-lavc></A>14.8.3.&nbsp;Using libavcodec=20
for VCD/SVCD/DVD Encoding</H3></DIV></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-lavc-intro></A>14.8.3.1.&nbsp;Introduction</H4><=
/DIV></DIV></DIV>
<P><CODE class=3Dsystemitem>libavcodec</CODE> can be used to create =
VCD/SVCD/DVD=20
compliant video by using the appropriate options. </P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-lavc-options></A>14.8.3.2.&nbsp;lavcopts</H4></D=
IV></DIV></DIV>
<P>This is a list of fields in <TT class=3Doption>-lavcopts</TT> that =
you may be=20
required to change in order to make a complaint movie for VCD, SVCD, or =
DVD:=20
</P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>acodec</STRONG></SPAN>: <TT =
class=3Doption>mp2</TT>=20
  for VCD, SVCD, or PAL DVD; <TT class=3Doption>ac3</TT> is most =
commonly used for=20
  DVD. PCM audio may also be used for DVD, but this is mostly a big =
waste of=20
  space. Note that MP3 audio is not compliant for any of these formats, =
but=20
  players often have no problem playing it anyway. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>abitrate</STRONG></SPAN>: 224 for VCD; =
up to 384=20
  for SVCD; up to 1536 for DVD, but commonly used values range from 192 =
kbps for=20
  stereo to 384 kbps for 5.1 channel sound. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vcodec</STRONG></SPAN>: <TT=20
  class=3Doption>mpeg1video</TT> for VCD; <TT =
class=3Doption>mpeg2video</TT> for=20
  SVCD; <TT class=3Doption>mpeg2video</TT> is usually used for DVD but =
you may=20
  also use <TT class=3Doption>mpeg1video</TT> for CIF resolutions. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>keyint</STRONG></SPAN>: Used to set the =
GOP size.=20
  18 for 30fps material, or 15 for 25/24 fps material. Commercial =
producers seem=20
  to prefer keyframe intervals of 12. It is possible to make this much =
larger=20
  and still retain compatibility with most players. A <TT=20
  class=3Doption>keyint</TT> of 25 should never cause any problems. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vrc_buf_size</STRONG></SPAN>: 327 for =
VCD, 917 for=20
  SVCD, and 1835 for DVD. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vrc_minrate</STRONG></SPAN>: 1152, for =
VCD. May be=20
  left alone for SVCD and DVD. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vrc_maxrate</STRONG></SPAN>: 1152 for =
VCD; 2500=20
  for SVCD; 9800 for DVD. For SVCD and DVD, you might wish to use lower =
values=20
  depending on your own personal preferences and requirements. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vbitrate</STRONG></SPAN>: 1152 for VCD; =
up to 2500=20
  for SVCD; up to 9800 for DVD. For the latter two formats, vbitrate =
should be=20
  set based on personal preference. For instance, if you insist on =
fitting 20 or=20
  so hours on a DVD, you could use vbitrate=3D400. The resulting video =
quality=20
  would probably be quite bad. If you are trying to squeeze out the =
maximum=20
  possible quality on a DVD, use vbitrate=3D9800, but be warned that =
this could=20
  constrain you to less than an hour of video on a single-layer DVD. =
</P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>vstrict</STRONG></SPAN>: <TT=20
  class=3Doption>vstrict</TT>=3D0 should be used to create DVDs. Without =
this=20
  option, <SPAN class=3Dapplication>MEncoder</SPAN> creates a stream =
that cannot=20
  be correctly decoded by some standalone DVD players. =
</P></LI></UL></DIV></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-lavc-examples></A>14.8.3.3.&nbsp;Examples</H4></=
DIV></DIV></DIV>
<P>This is a typical minimum set of <TT class=3Doption>-lavcopts</TT> =
for encoding=20
video: </P>
<P>VCD: </P><PRE class=3Dscreen>-lavcopts =
vcodec=3Dmpeg1video:vrc_buf_size=3D327:vrc_minrate=3D1152:\
vrc_maxrate=3D1152:vbitrate=3D1152:keyint=3D15:acodec=3Dmp2
</PRE>
<P></P>
<P>SVCD: </P><PRE class=3Dscreen>-lavcopts =
vcodec=3Dmpeg2video:vrc_buf_size=3D917:vrc_maxrate=3D2500:vbitrate=3D1800=
:\
keyint=3D15:acodec=3Dmp2
</PRE>
<P></P>
<P>DVD: </P><PRE class=3Dscreen>-lavcopts =
vcodec=3Dmpeg2video:vrc_buf_size=3D1835:vrc_maxrate=3D9800:vbitrate=3D500=
0:\
keyint=3D15:vstrict=3D0:acodec=3Dac3
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-lavc-advanced></A>14.8.3.4.&nbsp;Advanced=20
Options</H4></DIV></DIV></DIV>
<P>For higher quality encoding, you may also wish to add =
quality-enhancing=20
options to lavcopts, such as <TT class=3Doption>trell</TT>, <TT=20
class=3Doption>mbd=3D2</TT>, and others. Note that <TT =
class=3Doption>qpel</TT> and=20
<TT class=3Doption>v4mv</TT>, while often useful with MPEG-4, are not =
usable with=20
MPEG-1 or MPEG-2. Also, if you are trying to make a very high quality =
DVD=20
encode, it may be useful to add <TT class=3Doption>dc=3D10</TT> to =
lavcopts. Doing=20
so may help reduce the appearance of blocks in flat-colored areas. =
Putting it=20
all together, this is an example of a set of lavcopts for a higher =
quality DVD:=20
</P>
<P></P><PRE class=3Dscreen>-lavcopts =
vcodec=3Dmpeg2video:vrc_buf_size=3D1835:vrc_maxrate=3D9800:vbitrate=3D800=
0:\
keyint=3D15:trell:mbd=3D2:precmp=3D2:subcmp=3D2:cmp=3D2:dia=3D-10:predia=3D=
-10:cbp:mv0:\
vqmin=3D1:lmin=3D1:dc=3D10:vstrict=3D0
</PRE>
<P></P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-audio></A>14.8.4.&nbsp;Encoding=20
Audio</H3></DIV></DIV></DIV>
<P>VCD and SVCD support MPEG-1 layer II audio, using one of <CODE=20
class=3Dsystemitem>toolame</CODE>, <CODE =
class=3Dsystemitem>twolame</CODE>, or <CODE=20
class=3Dsystemitem>libavcodec</CODE>'s MP2 encoder. The libavcodec MP2 =
is far from=20
being as good as the other two libraries, however it should always be =
available=20
to use. VCD only supports constant bitrate audio (CBR) whereas SVCD =
supports=20
variable bitrate (VBR), too. Be careful when using VBR because some bad=20
standalone players might not support it too well. </P>
<P>For DVD audio, <CODE class=3Dsystemitem>libavcodec</CODE>'s AC-3 =
codec is used.=20
</P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-audio-toolame></A>14.8.4.1.&nbsp;toolame</H4></D=
IV></DIV></DIV>
<P>For VCD and SVCD: </P><PRE class=3Dscreen>-oac toolame -toolameopts =
br=3D224</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-audio-twolame></A>14.8.4.2.&nbsp;twolame</H4></D=
IV></DIV></DIV>
<P>For VCD and SVCD: </P><PRE class=3Dscreen>-oac twolame -twolameopts =
br=3D224</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-audio-lavc></A>14.8.4.3.&nbsp;libavcodec</H4></D=
IV></DIV></DIV>
<P>For DVD with 2 channel sound: </P><PRE class=3Dscreen>-oac lavc =
-lavcopts acodec=3Dac3:abitrate=3D192</PRE>
<P></P>
<P>For DVD with 5.1 channel sound: </P><PRE class=3Dscreen>-channels 6 =
-oac lavc -lavcopts acodec=3Dac3:abitrate=3D384</PRE>
<P></P>
<P>For VCD and SVCD: </P><PRE class=3Dscreen>-oac lavc -lavcopts =
acodec=3Dmp2:abitrate=3D224</PRE>
<P></P></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-all></A>14.8.5.&nbsp;Putting it all=20
Together</H3></DIV></DIV></DIV>
<P>This section shows some complete commands for creating VCD/SVCD/DVD =
compliant=20
videos. </P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-all-pal-dvd></A>14.8.5.1.&nbsp;PAL=20
DVD</H4></DIV></DIV></DIV>
<P></P><PRE class=3Dscreen>mencoder -oac lavc -ovc lavc -of mpeg =
-mpegopts format=3Ddvd:tsaf \
  -vf scale=3D720:576,harddup -srate 48000 -af lavcresample=3D48000 \
  -lavcopts =
vcodec=3Dmpeg2video:vrc_buf_size=3D1835:vrc_maxrate=3D9800:vbitrate=3D500=
0:\
keyint=3D15:vstrict=3D0:acodec=3Dac3:abitrate=3D192:aspect=3D16/9 -ofps =
25 \
  -o <EM class=3Dreplaceable><CODE>movie.mpg</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-all-ntsc-dvd></A>14.8.5.2.&nbsp;NTSC=20
DVD</H4></DIV></DIV></DIV>
<P></P><PRE class=3Dscreen>mencoder -oac lavc -ovc lavc -of mpeg =
-mpegopts format=3Ddvd:tsaf \
  -vf scale=3D720:480,harddup -srate 48000 -af lavcresample=3D48000 \
  -lavcopts =
vcodec=3Dmpeg2video:vrc_buf_size=3D1835:vrc_maxrate=3D9800:vbitrate=3D500=
0:\
keyint=3D18:vstrict=3D0:acodec=3Dac3:abitrate=3D192:aspect=3D16/9 -ofps =
30000/1001 \
  -o <EM class=3Dreplaceable><CODE>movie.mpg</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-all-pal-ac3-copy></A>14.8.5.3.&nbsp;PAL AVI =
Containing=20
AC-3 Audio to DVD</H4></DIV></DIV></DIV>
<P>If the source already has AC-3 audio, use -oac copy instead of =
re-encoding=20
it. </P><PRE class=3Dscreen>mencoder -oac copy -ovc lavc -of mpeg =
-mpegopts format=3Ddvd:tsaf \
  -vf scale=3D720:576,harddup -ofps 25 \
  -lavcopts =
vcodec=3Dmpeg2video:vrc_buf_size=3D1835:vrc_maxrate=3D9800:vbitrate=3D500=
0:\
keyint=3D15:vstrict=3D0:aspect=3D16/9 -o <EM =
class=3Dreplaceable><CODE>movie.mpg</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A=20
name=3Dmenc-feat-vcd-dvd-all-ntsc-ac3-copy></A>14.8.5.4.&nbsp;NTSC AVI =
Containing=20
AC-3 Audio to DVD</H4></DIV></DIV></DIV>
<P>If the source already has AC-3 audio, and is NTSC @ 24000/1001 fps: =
</P><PRE class=3Dscreen>mencoder -oac copy -ovc lavc -of mpeg -mpegopts =
format=3Ddvd:tsaf:telecine \
  -vf scale=3D720:480,harddup -lavcopts =
vcodec=3Dmpeg2video:vrc_buf_size=3D1835:\
  =
vrc_maxrate=3D9800:vbitrate=3D5000:keyint=3D15:vstrict=3D0:aspect=3D16/9 =
-ofps 24000/1001 \
  -o <EM class=3Dreplaceable><CODE>movie.mpg</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-all-pal-svcd></A>14.8.5.5.&nbsp;PAL=20
SVCD</H4></DIV></DIV></DIV>
<P></P><PRE class=3Dscreen>mencoder -oac lavc -ovc lavc -of mpeg =
-mpegopts format=3Dxsvcd -vf \
    scale=3D480:576,harddup -srate 44100 -af lavcresample=3D44100 =
-lavcopts \
    =
vcodec=3Dmpeg2video:mbd=3D2:keyint=3D15:vrc_buf_size=3D917:vrc_minrate=3D=
600:\
vbitrate=3D2500:vrc_maxrate=3D2500:acodec=3Dmp2:abitrate=3D224 -ofps 25 =
\
    -o <EM class=3Dreplaceable><CODE>movie.mpg</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie.avi</CODE></EM>
  </PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-all-ntsc-svcd></A>14.8.5.6.&nbsp;NTSC=20
SVCD</H4></DIV></DIV></DIV>
<P></P><PRE class=3Dscreen>mencoder -oac lavc -ovc lavc -of mpeg =
-mpegopts format=3Dxsvcd  -vf \
    scale=3D480:480,harddup -srate 44100 -af lavcresample=3D44100 =
-lavcopts \
    =
vcodec=3Dmpeg2video:mbd=3D2:keyint=3D18:vrc_buf_size=3D917:vrc_minrate=3D=
600:\
vbitrate=3D2500:vrc_maxrate=3D2500:acodec=3Dmp2:abitrate=3D224 -ofps =
30000/1001 \
    -o <EM class=3Dreplaceable><CODE>movie.mpg</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-all-pal-vcd></A>14.8.5.7.&nbsp;PAL=20
VCD</H4></DIV></DIV></DIV>
<P></P><PRE class=3Dscreen>mencoder -oac lavc -ovc lavc -of mpeg =
-mpegopts format=3Dxvcd -vf \
    scale=3D352:288,harddup -srate 44100 -af lavcresample=3D44100 =
-lavcopts \
    =
vcodec=3Dmpeg1video:keyint=3D15:vrc_buf_size=3D327:vrc_minrate=3D1152:\
vbitrate=3D1152:vrc_maxrate=3D1152:acodec=3Dmp2:abitrate=3D224 -ofps 25 =
\
    -o <EM class=3Dreplaceable><CODE>movie.mpg</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A =
name=3Dmenc-feat-vcd-dvd-all-ntsc-vcd></A>14.8.5.8.&nbsp;NTSC=20
VCD</H4></DIV></DIV></DIV>
<P></P><PRE class=3Dscreen>mencoder -oac lavc -ovc lavc -of mpeg =
-mpegopts format=3Dxvcd -vf \
    scale=3D352:240,harddup -srate 44100 -af lavcresample=3D44100 =
-lavcopts \
    =
vcodec=3Dmpeg1video:keyint=3D18:vrc_buf_size=3D327:vrc_minrate=3D1152:\
vbitrate=3D1152:vrc_maxrate=3D1152:acodec=3Dmp2:abitrate=3D224 -ofps =
30000/1001 \
    -o <EM class=3Dreplaceable><CODE>movie.mpg</CODE></EM> <EM =
class=3Dreplaceable><CODE>movie.avi</CODE></EM>
</PRE>
<P></P></DIV></DIV></DIV>
<DIV class=3Dfootnotes><BR>
<HR align=3Dleft width=3D100>

<DIV class=3Dfootnote>
<P><SUP>[<A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fn-menc-feat-dvd-mpeg4-codec-cpu"=20
name=3Dftn.fn-menc-feat-dvd-mpeg4-codec-cpu>2</A>] </SUP>Be careful, =
however:=20
Decoding DVD-resolution MPEG-4 AVC videos requires a fast machine (i.e. =
a=20
Pentium 4 over 1.5GHz or a Pentium M over 1GHz). </P></DIV>
<DIV class=3Dfootnote>
<P><SUP>[<A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
fn-menc-feat-dvd-mpeg4-codec-playback"=20
name=3Dftn.fn-menc-feat-dvd-mpeg4-codec-playback>3</A>] </SUP>The same =
encode may=20
not look the same on someone else's monitor or when played back by a =
different=20
decoder, so future-proof your encodes by playing them back on different =
setups.=20
</P></DIV></DIV></DIV>
<DIV class=3Dappendix lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Dbugreports></A>Appendix&nbsp;A.&nbsp;How to =
report=20
bugs</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_security">A.1.=20
  Report security releated bugs</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_fix">A.2.=20
  How to fix bugs</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_regression_test">A.3.=20
  How to do regression testing using Subversion</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_report">A.4.=20
  How to report bugs</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_where">A.5.=20
  Where to report bugs</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_what">A.6.=20
  What to report</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_system">A.6.1.=20
    System Information</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_hardware">A.6.2.=20
    Hardware and drivers</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_configure">A.6.3.=20
    Configure problems</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_compilation">A.6.4.=20
    Compilation problems</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_playback">A.6.5.=20
    Playback problems</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_crash">A.6.6.=20
    Crashes</A></SPAN>
    <DD>
    <DL>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_debug">A.6.6.1.=20
      How to conserve information about a reproducible crash</A></SPAN>
      <DT><SPAN class=3Dsect3><A=20
      =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_core">A.6.6.2.=20
      How to extract meaningful information from a core=20
    dump</A></SPAN></DT></DL></DD></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugreports_advusers">A.7.=20
  I know what I am doing...</A></SPAN></DT></DL></DIV>
<P>Good bug reports are a very valuable contribution to the development =
of any=20
software project. But just like writing good software, good problem =
reports=20
involve some work. Please realize that most developers are extremely =
busy and=20
receive obscene amounts of email. So while your feedback is crucial in =
improving=20
<SPAN class=3Dapplication>MPlayer</SPAN> and very much appreciated, =
please=20
understand that you have to provide <SPAN =
class=3Dbold><STRONG>all</STRONG></SPAN>=20
of the information we request and follow the instructions in this =
document=20
closely. </P>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dbugreports_security></A>A.1.&nbsp;Report security releated=20
bugs</H2></DIV></DIV></DIV>
<P>In case you have found an exploitable bug and you would like to do =
the right=20
thing and let us fix it before you disclose it, we would be happy to get =
your=20
security advisory at <A href=3D"mailto:security@mplayerhq.hu"=20
target=3D_top>security@mplayerhq.hu</A>. Please add [SECURITY] or =
[ADVISORY] in=20
the subject. Be sure that your report contains complete and detailed =
analysis of=20
the bug. Sending a fix is highly appreciated. Please don't delay your =
report to=20
write proof-of-concept exploit, you can send that one with another mail. =

</P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dbugreports_fix></A>A.2.&nbsp;How to=20
fix bugs</H2></DIV></DIV></DIV>
<P>If you feel have the necessary skills you are invited to have a go at =
fixing=20
the bug yourself. Or maybe you already did that? Please read <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/tech/patches.txt" =
target=3D_top>this=20
short document</A> to find out how to get your code included in <SPAN=20
class=3Dapplication>MPlayer</SPAN>. The people on the <A=20
href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng"=20
target=3D_top>MPlayer-dev-eng</A> mailing list will assist you if you =
have=20
questions. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dbugreports_regression_test></A>A.3.&nbsp;How to do regression =
testing using=20
Subversion</H2></DIV></DIV></DIV>
<P>A problem that can happen sometimes is 'it used to work before, now =
it=20
doesn't anymore...'. Here is a step by step procedure to try to pinpoint =
when=20
the problem occurred. This is <SPAN =
class=3Dbold><STRONG>not</STRONG></SPAN> for=20
casual users. </P>
<P>First, you'd need to fetch MPlayer's source tree from Subversion.=20
Instructions can be found in the <A=20
href=3D"http://www.mplayerhq.hu/design7/dload.html#svn" =
target=3D_top>Subversion=20
section of the download page</A>. </P>
<P>You will have now in the mplayer/ directory an image of the =
Subversion tree,=20
on the client side. Now update this image to the date you want: </P><PRE =
class=3Dscreen>cd mplayer/
svn update -r {"2004-08-23"}
</PRE>
<P>The date format is YYYY-MM-DD HH:MM:SS. Using this date format ensure =
that=20
you will be able to extract patches according to the date at which they =
were=20
committed, as in the <A=20
href=3D"http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/"=20
target=3D_top>MPlayer-cvslog archive</A>. </P>
<P>Now proceed as for a normal update: </P><PRE =
class=3Dscreen>./configure
make
</PRE>
<P></P>
<P>If any non-programmer reads this, the fastest method to get at the =
point=20
where the problem occurred is to use a binary search =E2=80=94 that is, =
search the date=20
of the breakage by repeatedly dividing the search interval in half. For =
example,=20
if the problem occurred in 2003, start at mid-year, then ask "Is the =
problem=20
already here?". If yes, go back to the first of April; if not, go to the =
first=20
of October, and so on. </P>
<P>If you have lot of free hard disk space (a full compile currently =
takes 100=20
MB, and around 300-350 MB if debugging symbols are enabled), copy the =
oldest=20
known working version before updating it; this will save time if you =
need to go=20
back. (It is usually necessary to run 'make distclean' before =
recompiling an=20
earlier version, so if you do not make a backup copy of your original =
source=20
tree, you will have to recompile everything in it when you come back to =
the=20
present.) </P>
<P>When you have found the day where the problem happened, continue the =
search=20
using the mplayer-cvslog archive (sorted by date) and a more precise svn =
update=20
including hour, minute and second: </P><PRE class=3Dscreen>svn update -r =
{"2004-08-23 15:17:25"}
</PRE>
<P>This will allow you to easily find the exact patch that did it. </P>
<P>If you find the patch that is the cause of the problem, you have =
almost won;=20
report about it to the <A href=3D"http://bugzilla.mplayerhq.hu/"=20
target=3D_top>MPlayer Bugzilla</A> or subscribe to <A=20
href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-users"=20
target=3D_top>MPlayer-users</A> and post it there. There is a chance =
that the=20
author will jump in to suggest a fix. You may also look hard at the =
patch until=20
it is coerced to reveal where the bug is :-). </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dbugreports_report></A>A.4.&nbsp;How=20
to report bugs</H2></DIV></DIV></DIV>
<P>First of all please try the latest Subversion version of <SPAN=20
class=3Dapplication>MPlayer</SPAN> as your bug might already be fixed =
there.=20
Development moves extremely fast, most problems in official releases are =

reported within days or even hours, so please use <SPAN =
class=3Dbold><STRONG>only=20
Subversion</STRONG></SPAN> to report bugs. This includes binary packages =
of=20
<SPAN class=3Dapplication>MPlayer</SPAN>. Subversion instructions can be =
found at=20
the bottom of <A href=3D"http://www.mplayerhq.hu/dload.html" =
target=3D_top>this=20
page</A> or in the README. If this did not help please refer to the list =
of <A=20
title=3D"Appendix&nbsp;B.&nbsp;Known bugs"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs">known=20
bugs</A> and the rest of the documentation. If your problem is not known =
or not=20
solvable by our instructions, then please report the bug. </P>
<P>Please do not send bug reports privately to individual developers. =
This is=20
community work and thus there might be several people interested in it.=20
Sometimes other users already experienced your troubles and know how to=20
circumvent a problem even if it is a bug in <SPAN=20
class=3Dapplication>MPlayer</SPAN> code. </P>
<P>Please describe your problem in as much detail as possible. Do a =
little=20
detective work to narrow down the circumstances under which the problem =
occurs.=20
Does the bug only show up in certain situations? Is it specific to =
certain files=20
or file types? Does it occur with only one codec or is it codec =
independent? Can=20
you reproduce it with all output drivers? The more information you =
provide the=20
better are our chances at fixing your problem. Please do not forget to =
also=20
include the valuable information requested below, we will be unable to =
properly=20
diagnose your problem otherwise. </P>
<P>An excellent and well written guide to asking questions in public =
forums is=20
<A href=3D"http://www.catb.org/~esr/faqs/smart-questions.html" =
target=3D_top>How To=20
Ask Questions The Smart Way</A> by <A href=3D"http://www.catb.org/~esr/" =

target=3D_top>Eric S. Raymond</A>. There is another called <A=20
href=3D"http://www.chiark.greenend.org.uk/~sgtatham/bugs.html" =
target=3D_top>How to=20
Report Bugs Effectively</A> by <A=20
href=3D"http://www.chiark.greenend.org.uk/~sgtatham/" =
target=3D_top>Simon=20
Tatham</A>. If you follow these guidelines you should be able to get =
help. But=20
please understand that we all follow the mailing lists voluntarily in =
our free=20
time. We are very busy and cannot guarantee that you will get a solution =
for=20
your problem or even an answer. </P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dbugreports_where></A>A.5.&nbsp;Where=20
to report bugs</H2></DIV></DIV></DIV>
<P>Subscribe to the MPlayer-users mailing list: <A=20
href=3D"http://lists.mplayerhq.hu/mailman/listinfo/mplayer-users"=20
target=3D_top>http://lists.mplayerhq.hu/mailman/listinfo/mplayer-users</A=
> and=20
send your bug report to <A href=3D"mailto:mplayer-users@mplayerhq.hu"=20
target=3D_top>mailto:mplayer-users@mplayerhq.hu</A> where you can =
discuss it. </P>
<P>If you prefer, you can use our brand-new <A=20
href=3D"http://bugzilla.mplayerhq.hu/" target=3D_top>Bugzilla</A> =
instead. </P>
<P>The language of this list is <SPAN=20
class=3Dbold><STRONG>English</STRONG></SPAN>. Please follow the standard =
<A=20
href=3D"http://www.ietf.org/rfc/rfc1855.txt" target=3D_top>Netiquette =
Guidelines</A>=20
and <SPAN class=3Dbold><STRONG>do not send HTML mail</STRONG></SPAN> to =
any of our=20
mailing lists. You will only get ignored or banned. If you do not know =
what HTML=20
mail is or why it is evil, read this <A =
href=3D"http://expita.com/nomime.html"=20
target=3D_top>fine document</A>. It explains all the details and has =
instructions=20
for turning HTML off. Also note that we will not individually CC =
(carbon-copy)=20
people so it is a good idea to subscribe to actually receive your =
answer.=20
</P></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dbugreports_what></A>A.6.&nbsp;What=20
to report</H2></DIV></DIV></DIV>
<P>You may need to include log, configuration or sample files in your =
bug=20
report. If some of them are quite big then it is better to upload them =
to our <A=20
href=3D"ftp://upload.mplayerhq.hu/MPlayer/incoming/" target=3D_top>FTP =
server</A> in=20
a compressed format (gzip and bzip2 preferred) and include only the path =
and=20
file name in your bug report. Our mailing lists have a message size =
limit of=20
80k, if you have something bigger you have to compress or upload it. =
</P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbugreports_system></A>A.6.1.&nbsp;System=20
Information</H3></DIV></DIV></DIV>
<P></P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>Your Linux distribution or operating system and version e.g.: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>Red Hat 7.1</P>
    <LI>
    <P>Slackware 7.0 + devel packs from 7.1 ...</P></LI></UL></DIV>
  <P></P>
  <LI>
  <P>kernel version: </P><PRE class=3Dscreen>uname -a</PRE>
  <P></P>
  <LI>
  <P>libc version: </P><PRE class=3Dscreen>ls -l /lib/libc[.-]*</PRE>
  <P></P>
  <LI>
  <P>gcc and ld versions: </P><PRE class=3Dscreen>gcc -v
ld -v</PRE>
  <P></P>
  <LI>
  <P>binutils version: </P><PRE class=3Dscreen>as --version</PRE>
  <P></P>
  <LI>
  <P>If you have problems with fullscreen mode: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>Window manager type and version</P></LI></UL></DIV>
  <P></P>
  <LI>
  <P>If you have problems with XVIDIX: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>X colour depth: </P><PRE class=3Dscreen>xdpyinfo | grep "depth of =
root"</PRE>
    <P></P></LI></UL></DIV>
  <P></P>
  <LI>
  <P>If only the GUI is buggy: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>GTK version</P>
    <LI>
    <P>GLIB version</P>
    <LI>
    <P>GUI situation in which the bug occurs</P></LI></UL></DIV>
  <P></P></LI></UL></DIV>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbugreports_hardware></A>A.6.2.&nbsp;Hardware =
and=20
drivers</H3></DIV></DIV></DIV>
<P></P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>CPU info (this works on Linux only): </P><PRE class=3Dscreen>cat =
/proc/cpuinfo</PRE>
  <P></P>
  <LI>
  <P>Video card manufacturer and model, e.g.: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>ASUS V3800U chip: nVidia TNT2 Ultra pro 32MB SDRAM</P>
    <LI>
    <P>Matrox G400 DH 32MB SGRAM</P></LI></UL></DIV>
  <P></P>
  <LI>
  <P>Video driver type &amp; version, e.g.: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>X built-in driver</P>
    <LI>
    <P>nVidia 0.9.623</P>
    <LI>
    <P>Utah-GLX CVS 2001-02-17</P>
    <LI>
    <P>DRI from X 4.0.3</P></LI></UL></DIV>
  <P></P>
  <LI>
  <P>Sound card type &amp; driver, e.g.: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P>Creative SBLive! Gold with OSS driver from oss.creative.com</P>
    <LI>
    <P>Creative SB16 with kernel OSS drivers</P>
    <LI>
    <P>GUS PnP with ALSA OSS emulation</P></LI></UL></DIV>
  <P></P>
  <LI>
  <P>If in doubt include <SPAN><STRONG class=3Dcommand>lspci =
-vv</STRONG></SPAN>=20
  output on Linux systems. </P></LI></UL></DIV>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dbugreports_configure></A>A.6.3.&nbsp;Configure=20
problems</H3></DIV></DIV></DIV>
<P>If you get errors while running <SPAN><STRONG=20
class=3Dcommand>./configure</STRONG></SPAN>, or autodetection of =
something fails,=20
read <TT class=3Dfilename>configure.log</TT>. You may find the answer =
there, for=20
example multiple versions of the same library mixed on your system, or =
you=20
forgot to install the development package (those with the -dev suffix). =
If you=20
think there is a bug, include <TT class=3Dfilename>configure.log</TT> in =
your bug=20
report. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dbugreports_compilation></A>A.6.4.&nbsp;Compilation=20
problems</H3></DIV></DIV></DIV>
<P>Please include these files: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>config.h</P>
  <LI>
  <P>config.mak</P></LI></UL></DIV>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbugreports_playback></A>A.6.5.&nbsp;Playback =

problems</H3></DIV></DIV></DIV>
<P>Please include the output of <SPAN class=3Dapplication>MPlayer</SPAN> =
at=20
verbosity level 1, but remember to <SPAN class=3Dbold><STRONG>not =
truncate the=20
output</STRONG></SPAN> when you paste it into your mail. The developers =
need all=20
of the messages to properly diagnose a problem. You can direct the =
output into a=20
file like this: </P><PRE class=3Dscreen>mplayer -v <EM =
class=3Dreplaceable><CODE>options</CODE></EM> <EM =
class=3Dreplaceable><CODE>filename</CODE></EM> &gt; mplayer.log =
2&gt;&amp;1
</PRE>
<P></P>
<P>If your problem is specific to one or more files, then please upload =
the=20
offender(s) to: <A href=3D"ftp://upload.mplayerhq.hu/MPlayer/incoming/"=20
target=3D_top>ftp://upload.mplayerhq.hu/MPlayer/incoming/</A> </P>
<P>Also upload a small text file having the same base name as your file =
with a=20
.txt extension. Describe the problem you are having with the particular =
file=20
there and include your email address as well as the output of <SPAN=20
class=3Dapplication>MPlayer</SPAN> at verbosity level 1. Usually the =
first 1-5 MB=20
of a file are enough to reproduce the problem, but to be sure we ask you =
to:=20
</P><PRE class=3Dscreen>dd if=3D<EM =
class=3Dreplaceable><CODE>yourfile</CODE></EM> of=3D<EM =
class=3Dreplaceable><CODE>smallfile</CODE></EM> bs=3D1024k count=3D5
</PRE>
<P>It will take the first five megabytes of '<SPAN=20
class=3Dbold><STRONG>your-file</STRONG></SPAN>' and write it to '<SPAN=20
class=3Dbold><STRONG>small-file</STRONG></SPAN>'. Then try again on this =
small=20
file and if the bug still shows up your sample is sufficient for us. =
Please=20
<SPAN class=3Dbold><STRONG>do not ever</STRONG></SPAN> send such files =
via mail!=20
Upload it, and send only the path/filename of the file on the =
FTP-server. If the=20
file is accessible on the net, then sending the <SPAN=20
class=3Dbold><STRONG>exact</STRONG></SPAN> URL is sufficient. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dbugreports_crash></A>A.6.6.&nbsp;Crashes</H3></DIV></DIV></DIV>
<P>You have to run <SPAN class=3Dapplication>MPlayer</SPAN> inside =
<SPAN><STRONG=20
class=3Dcommand>gdb</STRONG></SPAN> and send us the complete output or =
if you have=20
a <TT class=3Dfilename>core</TT> dump of the crash you can extract =
useful=20
information from the Core file. Here's how: </P>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A name=3Dbugreports_debug></A>A.6.6.1.&nbsp;How to =
conserve=20
information about a reproducible crash</H4></DIV></DIV></DIV>
<P>Recompile <SPAN class=3Dapplication>MPlayer</SPAN> with debugging =
code enabled:=20
</P><PRE class=3Dscreen>./configure --enable-debug=3D3
make
</PRE>
<P>and then run <SPAN class=3Dapplication>MPlayer</SPAN> within gdb =
using: </P><PRE class=3Dscreen>gdb ./mplayer</PRE>
<P>You are now within gdb. Type: </P><PRE class=3Dscreen>run -v <EM =
class=3Dreplaceable><CODE>options-to-mplayer</CODE></EM> <EM =
class=3Dreplaceable><CODE>filename</CODE></EM>
</PRE>
<P>and reproduce your crash. As soon as you did it, gdb will return you =
to the=20
command line prompt where you have to enter </P><PRE class=3Dscreen>bt
disass $pc-32 $pc+32
info all-registers
</PRE>
<P></P></DIV>
<DIV class=3Dsect3 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H4 class=3Dtitle><A name=3Dbugreports_core></A>A.6.6.2.&nbsp;How to =
extract=20
meaningful information from a core dump</H4></DIV></DIV></DIV>
<P>Create the following command file: </P><PRE class=3Dscreen>bt
disass $pc-32 $pc+32
info all-registers
</PRE>
<P>Then simply execute this command: </P><PRE class=3Dscreen>gdb mplayer =
--core=3Dcore -batch --command=3Dcommand_file &gt; mplayer.bug
</PRE>
<P></P></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dbugreports_advusers></A>A.7.&nbsp;I=20
know what I am doing...</H2></DIV></DIV></DIV>
<P>If you created a proper bug report following the steps above and you =
are=20
confident it is a bug in <SPAN class=3Dapplication>MPlayer</SPAN>, not a =
compiler=20
problem or broken file, you have already read the documentation and you =
could=20
not find a solution, your sound drivers are OK, then you might want to =
subscribe=20
to the MPlayer-advusers list and send your bug report there to get a =
better and=20
faster answer. </P>
<P>Please be advised that if you post newbie questions or questions =
answered in=20
the manual there, you will be ignored or flamed instead of getting an=20
appropriate answer. So do not flame us and subscribe to -advusers only =
if you=20
really know what you are doing and feel like being an advanced <SPAN=20
class=3Dapplication>MPlayer</SPAN> user or developer. If you meet these =
criteria=20
it should not be difficult to find out how to subscribe... =
</P></DIV></DIV>
<DIV class=3Dappendix lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Dbugs></A>Appendix&nbsp;B.&nbsp;Known=20
bugs</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-special">B.1.=20
  Special system/CPU-specific bugs/problems</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-audio">B.2.=20
  Various A-V sync and other audio problems</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-delay-all">B.2.1.=20
    General audio delay or jerky sound (exists with all or many=20
files)</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-delay-specific">B.2.2.=20
    Audio delay/de-sync specific to one or a few files</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-nosound">B.2.3.=20
    No sound at all</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-nopicture">B.2.4.=20
    No picture at all (just plain grey/green window)</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
bugs-video">B.2.5.=20
    Video-out problems</A></SPAN></DT></DL></DD></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dbugs-special></A>B.1.&nbsp;Special=20
system/CPU-specific bugs/problems</H2></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>SIGILL (signal 4) on P3 using 2.2.x kernels:</P>
  <P>Problem: kernel 2.2.x doesn't have proper (working) SSE support</P>
  <P>Solution: upgrade kernel to 2.4.x</P>
  <P>Workaround: <SPAN><STRONG class=3Dcommand>./configure=20
  --disable-sse</STRONG></SPAN></P>
  <LI>
  <P>General SIGILL (signal 4):</P>
  <P>Problem: you compiled and run <SPAN =
class=3Dapplication>MPlayer</SPAN> on=20
  different machines (for example compiled on P3 and running on Celeron) =
</P>
  <P>Solution: compile <SPAN class=3Dapplication>MPlayer</SPAN> on the =
same=20
  machine where you will use it! </P>
  <P>Workaround: You can forget all this by configuring with the <TT=20
  class=3Doption>--enable-runtime-cpudetection</TT> option or you can =
disable=20
  particular CPU instruction sets with more specific options (like <TT=20
  class=3Doption>--disable-mmx</TT>, <TT =
class=3Doption>--disable-3dnow</TT>, etc).=20
  </P>
  <LI>
  <P>Crashes when dumping streams:</P>
  <P>Problem: core dump</P>
  <P>Solution: Don't panic. Make sure you know where your towel=20
is.</P></LI></UL></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dbugs-audio></A>B.2.&nbsp;Various A-V=20
sync and other audio problems</H2></DIV></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbugs-delay-all></A>B.2.1.&nbsp;General audio =
delay or=20
jerky sound (exists with all or many files)</H3></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>most common: buggy audio driver! - try to use different drivers, =
try ALSA=20
  OSS emulation with <TT class=3Doption>-ao oss</TT>, also try <TT=20
  class=3Doption>-ao sdl</TT>, sometimes it helps. If your file plays =
fine with=20
  <TT class=3Doption>-nosound</TT>, then you can be sure it's sound card =
(driver)=20
  problem. </P>
  <LI>
  <P>audio buffer problems (buffer size badly detected)</P>
  <P>Workaround: <SPAN class=3Dapplication>MPlayer</SPAN>'s <TT=20
  class=3Doption>-abs</TT> option </P>
  <LI>
  <P>samplerate problems - maybe your card doesn't support the =
samplerate used=20
  in your files - try the resampling filter (<TT class=3Doption>-af=20
  resample=3D...</TT>) </P>
  <LI>
  <P>slow machine (CPU or VGA)</P>
  <P>try with <TT class=3Doption>-vo null</TT>, if it plays well, then =
you have=20
  slow VGA card/driver </P>
  <P>Workaround: buy a faster card or read this documentation about how =
to speed=20
  up </P>
  <P>Also try <TT =
class=3Doption>-framedrop</TT></P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbugs-delay-specific></A>B.2.2.&nbsp;Audio =
delay/de-sync=20
specific to one or a few files</H3></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>bad file</P>
  <P>Workaround: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Dcircle>
    <LI>
    <P><TT class=3Doption>-ni</TT> or <TT class=3Doption>-nobps</TT> =
option (for=20
    non-interleaved or bad files) </P>
    <P>and/or</P>
    <LI>
    <P><TT class=3Doption>-mc 0</TT> (required for files with badly =
interleaved=20
    VBR audio) </P>
    <P>and/or</P>
    <LI>
    <P><TT class=3Doption>-delay</TT> or <SPAN =
class=3Dkeycap><B>+</B></SPAN>/<SPAN=20
    class=3Dkeycap><B>-</B></SPAN> keys at runtime to adjust delay=20
  </P></LI></UL></DIV>
  <P>If none of these help, please upload the file, we'll check (and =
fix). </P>
  <LI>
  <P>your sound card doesn't support 48kHz playback</P>
  <P>Workaround: buy a better sound card... or try to decrease fps by =
10% (use=20
  <TT class=3Doption>-fps 27</TT> for a 30fps movie) or use the resample =
filter=20
  </P>
  <LI>
  <P>slow machine (if A-V is not around 0, and the last number in the =
status=20
  line increasing) </P>
  <P>Workaround: <TT =
class=3Doption>-framedrop</TT></P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbugs-nosound></A>B.2.3.&nbsp;No sound at=20
all</H3></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>your file uses an unsupported audio codec</P>
  <P>Solution: read the documentation and help us adding support for it=20
</P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbugs-nopicture></A>B.2.4.&nbsp;No picture at =
all (just=20
plain grey/green window)</H3></DIV></DIV></DIV>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>your file uses an unsupported video codec</P>
  <P>Solution: read the documentation and help us adding support for it =
</P>
  <LI>
  <P>auto-selected codec can't decode the file, try to select another =
using <TT=20
  class=3Doption>-vc</TT> or <TT class=3Doption>-vfm</TT> options=20
</P></LI></UL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dbugs-video></A>B.2.5.&nbsp;Video-out=20
problems</H3></DIV></DIV></DIV>
<P>First note that the options <TT class=3Doption>-fs</TT>, <TT=20
class=3Doption>-vm</TT> and <TT class=3Doption>-zoom</TT> are not =
supported by all=20
drivers. Plus, not all drivers support scaling/zooming in hardware. </P>
<P><B>OSD/sub flickering.&nbsp;</B> </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>x11 driver: sorry, it can't be fixed now</P>
  <LI>
  <P>xv driver: use <TT class=3Doption>-double</TT> =
option</P></LI></UL></DIV>
<P></P>
<P><B>Green image using mga_vid (<TT class=3Doption>-vo mga</TT> / <TT=20
class=3Doption>-vo xmga</TT>).&nbsp;</B> </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>mga_vid misdetected your card's RAM amount, reload it using <TT=20
  class=3Doption>mga_ram_size</TT> option. </P></LI></UL></DIV>
<P></P></DIV></DIV></DIV>
<DIV class=3Dappendix lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A name=3Dskin></A>Appendix&nbsp;C.&nbsp;<SPAN=20
class=3Dapplication>MPlayer</SPAN> skin format</H2></DIV></DIV></DIV>
<DIV class=3Dtoc>
<DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview">C.1.=20
  Overview</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview-directories">C.1.1.=20
    Directories</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview-formats">C.1.2.=20
    Image formats</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview-components">C.1.3.=20
    Skin components</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-files">C.1.4.=20
    Files</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file">C.2.=20
  The skin file</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-main">C.2.1.=20
    Main window and playbar</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-subwindow">C.2.2.=20
    Subwindow</A></SPAN>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-menu">C.2.3.=20
    Skin menu</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-fonts">C.3.=20
  Fonts</A></SPAN>
  <DD>
  <DL>
    <DT><SPAN class=3Dsect2><A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-fonts-symbols">C.3.1.=20
    Symbols</A></SPAN></DT></DL>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-gui">C.4.=20
  GUI messages</A></SPAN>
  <DT><SPAN class=3Dsect1><A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-quality">C.5.=20
  Creating quality skins</A></SPAN></DT></DL></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dskin-overview></A>C.1.&nbsp;Overview</H2></DIV></DIV></DIV>
<P>It does not really have anything to do with the skin format, but you =
should=20
know that <SPAN class=3Dapplication>MPlayer</SPAN> has <SPAN=20
class=3Dbold><STRONG>no</STRONG></SPAN> builtin skin, so <SPAN=20
class=3Dbold><STRONG>at least one skin must be installed in order to be =
able to=20
use the GUI.</STRONG></SPAN> </P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dskin-overview-directories></A>C.1.1.&nbsp;Directories</H3></DIV></=
DIV></DIV>
<P>The directories searched for skins are (in order): </P>
<DIV class=3Dorderedlist>
<OL type=3D1>
  <LI>
  <P><TT class=3Dfilename>$(DATADIR)/skins/</TT> </P>
  <LI>
  <P><TT class=3Dfilename>$(PREFIX)/share/mplayer/skins/</TT> </P>
  <LI>
  <P><TT class=3Dfilename>~/.mplayer/skins/</TT> </P></LI></OL></DIV>
<P></P>
<P>Note that the first path may vary according to the way <SPAN=20
class=3Dapplication>MPlayer</SPAN> was configured (see the <TT=20
class=3Doption>--prefix</TT> and <TT class=3Doption>--datadir</TT> =
arguments of the=20
<SPAN><STRONG class=3Dcommand>configure</STRONG></SPAN> script). </P>
<P>Every skin is installed into its own directory under one of the =
directories=20
listed above, for example: </P><PRE =
class=3Dscreen>$(PREFIX)/share/mplayer/skins/default/</PRE>
<P></P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dskin-overview-formats></A>C.1.2.&nbsp;Image=20
formats</H3></DIV></DIV></DIV>
<P>Images must be truecolor (24 or 32 bpp) PNGs.</P>
<P>In the main window and in the playbar (see below) you can use images =
with=20
`transparency': Regions filled with the color #FF00FF (magenta) are =
fully=20
transparent when viewed by <SPAN class=3Dapplication>MPlayer</SPAN>. =
This means=20
that you can even have shaped windows if your X server has the XShape =
extension.=20
</P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dskin-overview-components></A>C.1.3.&nbsp;Skin=20
components</H3></DIV></DIV></DIV>
<P>Skins are quite free-format (unlike the fixed-format skins of <SPAN=20
class=3Dapplication>Winamp</SPAN>/<SPAN class=3Dapplication>XMMS</SPAN>, =
for=20
example), so it is up to you to create something great. </P>
<P>Currently there are four windows to be decorated: the <A=20
title=3D"C.2.1.&nbsp;Main window and playbar"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-main">main=20
window</A>, the <A title=3DC.2.2.&nbsp;Subwindow=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-subwindow">subwindow</A>,=20
the <A title=3D"C.2.1.&nbsp;Main window and playbar"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-main">playbar</A>,=20
and the <A title=3D"C.2.3.&nbsp;Skin menu"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-menu">skin=20
menu</A> (which can be activated by a right click). </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>The <SPAN class=3Dbold><STRONG>main window</STRONG></SPAN> and/or =
the <SPAN=20
  class=3Dbold><STRONG>playbar</STRONG></SPAN> is where you can control =
<SPAN=20
  class=3Dapplication>MPlayer</SPAN>. The background of the window is an =
image.=20
  Various items can (and must) be placed in the window: <SPAN=20
  class=3Demphasis><EM>buttons</EM></SPAN>, <SPAN=20
  class=3Demphasis><EM>potmeters</EM></SPAN> (sliders) and <SPAN=20
  class=3Demphasis><EM>labels</EM></SPAN>. For every item, you must =
specify its=20
  position and size. </P>
  <P>A <SPAN class=3Dbold><STRONG>button</STRONG></SPAN> has three =
states=20
  (pressed, released, disabled), thus its image must be divided into =
three parts=20
  vertically. See the <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-button">button</A>=20
  item for details. </P>
  <P>A <SPAN class=3Dbold><STRONG>potmeter</STRONG></SPAN> (mainly used =
for the=20
  seek bar and volume/balance control) can have any number of phases by =
dividing=20
  its image into different parts below each other. See <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-hpotmeter">hpotmeter</A>=20
  and <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-potmeter">potmeter</A>=20
  for details. </P>
  <P><SPAN class=3Dbold><STRONG>Labels</STRONG></SPAN> are a bit =
special: The=20
  characters needed to draw them are taken from an image file, and the=20
  characters in the image are described by a <A title=3DC.3.&nbsp;Fonts=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-fonts">font=20
  description file</A>. The latter is a plain text file which specifies =
the x,y=20
  position and size of each character in the image (the image file and =
its font=20
  description file form a font <SPAN =
class=3Demphasis><EM>together</EM></SPAN>).=20
  See <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-dlabel">dlabel</A>=20
  and <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-slabel">slabel</A>=20
  for details. </P>
  <DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
  <H3 class=3Dtitle>Note</H3>
  <P>All images can have full transparency as described in the section =
about <A=20
  title=3D"C.1.2.&nbsp;Image formats"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-overview-formats">image=20
  formats</A>. If the X server doesn't support the XShape extension, the =
parts=20
  marked transparent will be black. If you'd like to use this feature, =
the width=20
  of the main window's background image must be dividable by 8. =
</P></DIV>
  <LI>
  <P>The <SPAN class=3Dbold><STRONG>subwindow</STRONG></SPAN> is where =
the movie=20
  appears. It can display a specified image if there is no movie loaded =
(it is=20
  quite boring to have an empty window :-)) <SPAN=20
  class=3Dbold><STRONG>Note:</STRONG></SPAN> transparency is <SPAN=20
  class=3Dbold><STRONG>not allowed</STRONG></SPAN> here. </P>
  <LI>
  <P>The <SPAN class=3Dbold><STRONG>skin menu</STRONG></SPAN> is just a =
way to=20
  control <SPAN class=3Dapplication>MPlayer</SPAN> by means of menu =
entries. Two=20
  images are required for the menu: one of them is the base image that =
shows the=20
  menu in its normal state, the other one is used to display the =
selected=20
  entries. When you pop up the menu, the first image is shown. If you =
move the=20
  mouse over the menu entries, the currently selected entry is copied =
from the=20
  second image over the menu entry below the mouse pointer (the second =
image is=20
  never shown as a whole). </P>
  <P>A menu entry is defined by its position and size in the image (see =
the=20
  section about the <A title=3D"C.2.3.&nbsp;Skin menu"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file-menu">skin=20
  menu</A> for details). </P></LI></UL></DIV>
<P></P>
<P>There is an important thing not mentioned yet: For buttons, potmeters =
and=20
menu entries to work, <SPAN class=3Dapplication>MPlayer</SPAN> must know =
what to=20
do if they are clicked. This is done by <A title=3D"C.4.&nbsp;GUI =
messages"=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-gui">messages</A>=20
(events). For these items you must define the messages to be generated =
when they=20
are clicked. </P></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A =
name=3Dskin-files></A>C.1.4.&nbsp;Files</H3></DIV></DIV></DIV>
<P>You need the following files to build a skin: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>The configuration file named <A title=3D"C.2.&nbsp;The skin file"=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-file">skin</A>=20
  tells <SPAN class=3Dapplication>MPlayer</SPAN> how to put different =
parts of the=20
  skin together and what to do if you click somewhere in the window. =
</P>
  <LI>
  <P>The background image for the main window. </P>
  <LI>
  <P>Images for the items in the main window (including one or more font =

  description files needed to draw labels). </P>
  <LI>
  <P>The image to be displayed in the subwindow (optional). </P>
  <LI>
  <P>Two images for the skin menu (they are needed only if you want to =
create a=20
  menu). </P></LI></UL></DIV>
<P>With the exception of the skin configuration file, you can name the =
other=20
files whatever you want (but note that font description files must have =
a <TT=20
class=3Dfilename>.fnt</TT> extension). </P></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dskin-file></A>C.2.&nbsp;The skin=20
file</H2></DIV></DIV></DIV>
<P>As mentioned above, this is the skin configuration file. It is line =
oriented;=20
comment lines start with a '<CODE class=3Dliteral>;</CODE>' character at =
the=20
beginning of the line (only spaces and tabs are allowed before the =
'<CODE=20
class=3Dliteral>;</CODE>'). </P>
<P>The file is made up of sections. Each section describes the skin for =
an=20
application and has the following form: </P><PRE =
class=3Dprogramlisting>section =3D <EM class=3Dreplaceable><CODE>section =
name</CODE></EM>
.
.
.
end
</PRE>
<P></P>
<P>Currently there is only one application, so you need only one =
section: its=20
name is <SPAN class=3Dbold><STRONG>movieplayer</STRONG></SPAN>. </P>
<P>Within this section each window is described by a block of the =
following=20
form: </P><PRE class=3Dprogramlisting>window =3D <EM =
class=3Dreplaceable><CODE>window name</CODE></EM>
.
.
.
end
</PRE>
<P></P>
<P>where <EM class=3Dreplaceable><CODE>window name</CODE></EM> can be =
one of these=20
strings: </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG>main</STRONG></SPAN> - for the main =
window </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>sub</STRONG></SPAN> - for the subwindow =
</P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>menu</STRONG></SPAN> - for the skin menu =
</P>
  <LI>
  <P><SPAN class=3Dbold><STRONG>playbar</STRONG></SPAN> - playbar=20
</P></LI></UL></DIV>
<P></P>
<P>(The sub and menu blocks are optional - you do not need to create a =
menu or=20
decorate the subwindow.) </P>
<P>Within a window block, you can define each item for the window by a =
line in=20
this form: </P><PRE class=3Dprogramlisting>item =3D parameter</PRE>
<P>Where <CODE class=3Dliteral>item</CODE> is a string that identifies =
the type of=20
the GUI item, <CODE class=3Dliteral>parameter</CODE> is a numeric or =
textual value=20
(or a list of values separated by commas). </P>
<P>Putting the above together, the whole file looks something like this: =
</P><PRE class=3Dprogramlisting>section =3D movieplayer
  window =3D main
  ; ... items for main window ...
  end

  window =3D sub
  ; ... items for subwindow ...
  end

  window =3D menu
  ; ... items for menu ...
  end

  window =3D playbar
  ; ... items for playbar ...
  end
end
</PRE>
<P></P>
<P>The name of an image file must be given without leading directories - =
images=20
are searched for in the <TT class=3Dfilename>skins</TT> directory. You =
may (but=20
you need not) specify the extension of the file. If the file does not =
exist,=20
<SPAN class=3Dapplication>MPlayer</SPAN> tries to load the file <TT=20
class=3Dfilename>&lt;filename&gt;.&lt;ext&gt;</TT>, where <CODE=20
class=3Dliteral>png</CODE> and <CODE class=3Dliteral>PNG</CODE> are =
tried for <TT=20
class=3Dfilename>&lt;ext&gt;</TT> (in this order). The first matching =
file will be=20
used. </P>
<P>Here is an example to make this clear. Suppose that you have an image =
called=20
<TT class=3Dfilename>main.png</TT> that you use for the main window: =
</P><PRE class=3Dprogramlisting>base =3D main, -1, -1</PRE>
<P><SPAN class=3Dapplication>MPlayer</SPAN> tries to load <TT=20
class=3Dfilename>main</TT>, <TT class=3Dfilename>main.png</TT>, <TT=20
class=3Dfilename>main.PNG</TT> files. </P>
<P>Finally some words about positioning. The main window and the =
subwindow can=20
be placed in the different corners of the screen by giving <CODE=20
class=3Dliteral>X</CODE> and <CODE class=3Dliteral>Y</CODE> coordinates. =
<CODE=20
class=3Dliteral>0</CODE> is top or left, <CODE class=3Dliteral>-1</CODE> =
is center=20
and <CODE class=3Dliteral>-2</CODE> is right or bottom, as shown in this =

illustration: </P>
<DIV class=3Dinformalfigure><PRE class=3Dscreen>(0, 0)----(-1, =
0)----(-2, 0)
  |          |          |
  |          |          |
(0,-1)----(-1,-1)----(-2,-1)
  |          |          |
  |          |          |
(0,-2)----(-1,-2)----(-2,-2)
</PRE></DIV>
<P></P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dskin-file-main></A>C.2.1.&nbsp;Main window =
and=20
playbar</H3></DIV></DIV></DIV>
<P>Below is the list of entries that can be used in the '<CODE=20
class=3Dliteral>window =3D main</CODE>' ... '<CODE =
class=3Dliteral>end</CODE>', and=20
the '<CODE class=3Dliteral>window =3D playbar</CODE>' ... '<CODE=20
class=3Dliteral>end</CODE>' blocks. </P>
<DIV class=3Dvariablelist>
<DL>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-main-base></A>base =3D=20
  image, X, Y </CODE></SPAN>
  <DD>
  <P>Lets you specify the background image to be used for the main =
window. The=20
  window will appear at the given <CODE class=3Dliteral>X,Y</CODE> =
position on the=20
  screen The window will have the size of the image. </P>
  <DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
  <H3 class=3Dtitle>Note</H3>
  <P>These coordinates do not currently work for the display window. =
</P></DIV>
  <DIV class=3Dwarning style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: =
0.5in">
  <H3 class=3Dtitle>Warning</H3>
  <P>Transparent regions in the image (colored #FF00FF) appear black on =
X=20
  servers without the XShape extension. The image's width must be =
dividable by=20
  8.</P></DIV>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-button></A>button =3D=20
  image, X, Y, width, height, message </CODE></SPAN>
  <DD>
  <P>Place a button of <CODE class=3Dliteral>width</CODE> * <CODE=20
  class=3Dliteral>height</CODE> size at position <CODE =
class=3Dliteral>X,Y</CODE>.=20
  The specified <CODE class=3Dliteral>message</CODE> is generated when =
the button=20
  is clicked. The image given by <CODE class=3Dliteral>image</CODE> must =
have=20
  three parts below each other (according to the possible states of the =
button),=20
  like this: </P>
  <DIV class=3Dinformalfigure><PRE class=3Dscreen>+------------+
|  pressed   |
+------------+
|  released  |
+------------+
|  disabled  |
+------------+</PRE></DIV>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A=20
  name=3Dskin-decoration></A>decoration =3D enable|disable =
</CODE></SPAN>
  <DD>
  <P>Enable or disable window manager decoration of the main window. =
Default is=20
  <SPAN class=3Dbold><STRONG>disable</STRONG></SPAN>. </P>
  <DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
  <H3 class=3Dtitle>Note</H3>
  <P>This doesn't work for the display window, there is no need to. =
</P></DIV>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-hpotmeter></A>hpotmeter=20
  =3D button, bwidth, bheight, phases, numphases, default, X, Y, width, =
height,=20
  message </CODE></SPAN>
  <DD>
  <P></P>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-vpotmeter></A>vpotmeter=20
  =3D button, bwidth, bheight, phases, numphases, default, X, Y, width, =
height,=20
  message </CODE></SPAN>
  <DD>
  <P>Place a horizontal (hpotmeter) or vertical (vpotmeter) potmeter of =
<CODE=20
  class=3Dliteral>width</CODE> * <CODE class=3Dliteral>height</CODE> =
size at=20
  position <CODE class=3Dliteral>X,Y</CODE>. The image can be divided =
into=20
  different parts for the different phases of the potmeter (for example, =
you can=20
  have a pot for volume control that turns from green to red while its =
value=20
  changes from the minimum to the maximum.). <CODE=20
  class=3Dliteral>hpotmeter</CODE> can have a button that can be dragged =

  horizontally. The parameters are: </P>
  <DIV class=3Ditemizedlist>
  <UL type=3Ddisc>
    <LI>
    <P><CODE class=3Dliteral>button</CODE> - the image to be used for =
the button=20
    (must have three parts below each other, like in case of <A=20
    =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-button">button</A>)=20
    </P>
    <LI>
    <P><CODE class=3Dliteral>bwidth</CODE>, <CODE =
class=3Dliteral>bheight</CODE> -=20
    size of the button </P>
    <LI>
    <P><CODE class=3Dliteral>phases</CODE> - the image to be used for =
the=20
    different phases of the hpotmeter. A special value of <CODE=20
    class=3Dliteral>NULL</CODE> can be used if you want no such image. =
The image=20
    must be divided into <CODE class=3Dliteral>numphases</CODE> parts =
vertically=20
    like this: </P>
    <DIV class=3Dinformalfigure><PRE class=3Dscreen>+------------+
|  phase #1  |
+------------+
|  phase #2  |
+------------+
     ...
+------------+
|  phase #n  |
+------------+</PRE></DIV>
    <P></P>
    <LI>
    <P><CODE class=3Dliteral>numphases</CODE> - number of phases stored =
in the=20
    <CODE class=3Dliteral>phases</CODE> image </P>
    <LI>
    <P><CODE class=3Dliteral>default</CODE> - default value for =
hpotmeter (in the=20
    range <CODE class=3Dliteral>0</CODE> to <CODE =
class=3Dliteral>100</CODE>) </P>
    <LI>
    <P><CODE class=3Dliteral>X</CODE>, <CODE class=3Dliteral>Y</CODE> - =
position for=20
    the hpotmeter </P>
    <LI>
    <P><CODE class=3Dliteral>width</CODE>, <CODE =
class=3Dliteral>height</CODE> -=20
    width and height of the <CODE class=3Dliteral>hpotmeter</CODE> </P>
    <LI>
    <P><CODE class=3Dliteral>message</CODE> - the message to be =
generated when the=20
    value of <CODE class=3Dliteral>hpotmeter</CODE> is changed =
</P></LI></UL></DIV>
  <P></P>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-potmeter></A>potmeter =3D=20
  phases, numphases, default, X, Y, width, height, message =
</CODE></SPAN>
  <DD>
  <P>A <CODE class=3Dliteral>hpotmeter</CODE> without a button. (I guess =
it is=20
  meant to be turned around, but it reacts to horizontal dragging only.) =
For the=20
  description of the parameters see <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-hpotmeter">hpotmeter</A>.=20
  <CODE class=3Dliteral>phases</CODE> can be <CODE =
class=3Dliteral>NULL</CODE>, but=20
  it is quite useless, since you cannot see where the <CODE=20
  class=3Dliteral>potmeter</CODE> is set. </P>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-font></A>font =3D=20
  fontfile, fontid </CODE></SPAN>
  <DD>
  <P>Defines a font. <CODE class=3Dliteral>fontfile</CODE> is the name =
of a font=20
  description file with a <TT class=3Dfilename>.fnt</TT> extension (do =
not specify=20
  the extension here). <CODE class=3Dliteral>fontid</CODE> is used to =
refer to the=20
  font (see <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-dlabel">dlabel</A>=20
  and <A=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-slabel">slabel</A>).=20
  Up to 25 fonts can be defined. </P>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-slabel></A>slabel =3D X,=20
  Y, fontid, "text" </CODE></SPAN>
  <DD>
  <P>Place a static label at the position <CODE =
class=3Dliteral>X,Y</CODE>. <CODE=20
  class=3Dliteral>text</CODE> is displayed using the font identified by =
<CODE=20
  class=3Dliteral>fontid</CODE>. The text is just a raw string (<CODE=20
  class=3Dliteral>$x</CODE> variables do not work) that must be enclosed =
between=20
  double quotes (but the " character cannot be part of the text). The =
label is=20
  displayed using the font identified by <CODE =
class=3Dliteral>fontid</CODE>. </P>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-dlabel></A>dlabel =3D X,=20
  Y, length, align, fontid, "text" </CODE></SPAN>
  <DD>
  <P>Place a dynamic label at the position <CODE =
class=3Dliteral>X,Y</CODE>. The=20
  label is called dynamic because its text is refreshed periodically. =
The=20
  maximum length of the label is given by <CODE =
class=3Dliteral>length</CODE> (its=20
  height is the height of a character). If the text to be displayed is =
wider=20
  than that, it will be scrolled, otherwise it is aligned within the =
specified=20
  space by the value of the <CODE class=3Dliteral>align</CODE> =
parameter: <CODE=20
  class=3Dliteral>0</CODE> is for right, <CODE class=3Dliteral>1</CODE> =
is for=20
  center, <CODE class=3Dliteral>2</CODE> is for left. </P>
  <P>The text to be displayed is given by <CODE =
class=3Dliteral>text</CODE>: It=20
  must be written between double quotes (but the " character cannot be =
part of=20
  the text). The label is displayed using the font identified by <CODE=20
  class=3Dliteral>fontid</CODE>. You can use the following variables in =
the text:=20
  </P>
  <DIV class=3Dinformaltable>
  <TABLE border=3D1>
    <COLGROUP>
    <COL>
    <COL></COLGROUP>
    <THEAD>
    <TR>
      <TH>Variable</TH>
      <TH>Meaning</TH></TR></THEAD>
    <TBODY>
    <TR>
      <TD>$1</TD>
      <TD>play time in <SPAN class=3Demphasis><EM>hh:mm:ss</EM></SPAN>=20
    format</TD></TR>
    <TR>
      <TD>$2</TD>
      <TD>play time in <SPAN class=3Demphasis><EM>mmmm:ss</EM></SPAN>=20
    format</TD></TR>
    <TR>
      <TD>$3</TD>
      <TD>play time in <SPAN class=3Demphasis><EM>hh</EM></SPAN> format=20
      (hours)</TD></TR>
    <TR>
      <TD>$4</TD>
      <TD>play time in <SPAN class=3Demphasis><EM>mm</EM></SPAN> format=20
      (minutes)</TD></TR>
    <TR>
      <TD>$5</TD>
      <TD>play time in <SPAN class=3Demphasis><EM>ss</EM></SPAN> format=20
      (seconds)</TD></TR>
    <TR>
      <TD>$6</TD>
      <TD>movie length in <SPAN =
class=3Demphasis><EM>hh:mm:ss</EM></SPAN>=20
      format</TD></TR>
    <TR>
      <TD>$7</TD>
      <TD>movie length in <SPAN class=3Demphasis><EM>mmmm:ss</EM></SPAN> =

      format</TD></TR>
    <TR>
      <TD>$8</TD>
      <TD>play time in <SPAN class=3Demphasis><EM>h:mm:ss</EM></SPAN>=20
    format</TD></TR>
    <TR>
      <TD>$v</TD>
      <TD>volume in <SPAN class=3Demphasis><EM>xxx.xx</EM></SPAN>% =
format</TD></TR>
    <TR>
      <TD>$V</TD>
      <TD>volume in <SPAN class=3Demphasis><EM>xxx.xx</EM></SPAN> =
format</TD></TR>
    <TR>
      <TD>$b</TD>
      <TD>balance in <SPAN class=3Demphasis><EM>xxx.xx</EM></SPAN>% =
format</TD></TR>
    <TR>
      <TD>$B</TD>
      <TD>balance in <SPAN class=3Demphasis><EM>xxx.xx</EM></SPAN> =
format</TD></TR>
    <TR>
      <TD>$$</TD>
      <TD>the $ character</TD></TR>
    <TR>
      <TD>$a</TD>
      <TD>a character according to the audio type (none: <CODE=20
        class=3Dliteral>n</CODE>, mono: <CODE class=3Dliteral>m</CODE>, =
stereo:=20
        <CODE class=3Dliteral>t</CODE>)</TD></TR>
    <TR>
      <TD>$t</TD>
      <TD>track number (in playlist)</TD></TR>
    <TR>
      <TD>$o</TD>
      <TD>filename</TD></TR>
    <TR>
      <TD>$f</TD>
      <TD>filename in lower case</TD></TR>
    <TR>
      <TD>$F</TD>
      <TD>filename in upper case</TD></TR>
    <TR>
      <TD>$T</TD>
      <TD>a character according to the stream type (file: <CODE=20
        class=3Dliteral>f</CODE>, Video CD: <CODE =
class=3Dliteral>v</CODE>, DVD:=20
        <CODE class=3Dliteral>d</CODE>, URL: <CODE =
class=3Dliteral>u</CODE>) </TD></TR>
    <TR>
      <TD>$p</TD>
      <TD>the <SPAN class=3Dkeycap><B>p</B></SPAN> character (if a movie =
is=20
        playing and the font has the <SPAN =
class=3Dkeycap><B>p</B></SPAN>=20
        character)</TD></TR>
    <TR>
      <TD>$s</TD>
      <TD>the <SPAN class=3Dkeycap><B>s</B></SPAN> character (if the =
movie is=20
        stopped and the font has the <SPAN =
class=3Dkeycap><B>s</B></SPAN>=20
        character)</TD></TR>
    <TR>
      <TD>$e</TD>
      <TD>the <SPAN class=3Dkeycap><B>e</B></SPAN> character (if =
playback is=20
        paused and the font has the <SPAN class=3Dkeycap><B>e</B></SPAN> =

      character)</TD></TR>
    <TR>
      <TD>$x</TD>
      <TD>movie width</TD></TR>
    <TR>
      <TD>$y</TD>
      <TD>movie height</TD></TR>
    <TR>
      <TD>$C</TD>
      <TD>name of the codec used</TD></TR></TBODY></TABLE></DIV>
  <DIV class=3Dnote style=3D"MARGIN-LEFT: 0.5in; MARGIN-RIGHT: 0.5in">
  <H3 class=3Dtitle>Note</H3>
  <P>The <CODE class=3Dliteral>$a, $T, $p, $s</CODE> and <CODE=20
  class=3Dliteral>$e</CODE> variables all return characters that should =
be=20
  displayed as special symbols (for example, <SPAN =
class=3Dkeycap><B>e</B></SPAN>=20
  is for the pause symbol that usually looks something like ||). You =
should have=20
  a font for normal characters and a different font for symbols. See the =
section=20
  about <A title=3DC.3.1.&nbsp;Symbols=20
  =
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-fonts-symbols">symbols</A>=20
  for more information. </P></DIV></DD></DL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dskin-file-subwindow></A>C.2.2.&nbsp;Subwindow</H3></DIV></DIV></DI=
V>
<P>The following entries can be used in the '<CODE =
class=3Dliteral>window =3D=20
sub</CODE>' . . . '<CODE class=3Dliteral>end</CODE>' block. </P>
<DIV class=3Dvariablelist>
<DL>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-sub-base></A>base =3D=20
  image, X, Y, width, height </CODE></SPAN>
  <DD>
  <P>The image to be displayed in the window. The window will appear at =
the=20
  given <CODE class=3Dliteral>X,Y</CODE> position on the screen (<CODE=20
  class=3Dliteral>0,0</CODE> is the top left corner). You can specify =
<CODE=20
  class=3Dliteral>-1</CODE> for center and <CODE =
class=3Dliteral>-2</CODE> for right=20
  (<CODE class=3Dliteral>X</CODE>) and bottom (<CODE =
class=3Dliteral>Y</CODE>). The=20
  window will be as large as the image. <CODE =
class=3Dliteral>width</CODE> and=20
  <CODE class=3Dliteral>height</CODE> denote the size of the window; =
they are=20
  optional (if they are missing, the window is the same size as the =
image). </P>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A=20
  name=3Dskin-background></A>background =3D R, G, B </CODE></SPAN>
  <DD>
  <P>Lets you set the background color. It is useful if the image is =
smaller=20
  than the window. <CODE class=3Dliteral>R</CODE>, <CODE =
class=3Dliteral>G</CODE>=20
  and <CODE class=3Dliteral>B</CODE> specifies the red, green and blue =
component=20
  of the color (each of them is a decimal number from 0 to 255).=20
</P></DD></DL></DIV></DIV>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A name=3Dskin-file-menu></A>C.2.3.&nbsp;Skin=20
menu</H3></DIV></DIV></DIV>
<P>As mentioned earlier, the menu is displayed using two images. Normal =
menu=20
entries are taken from the image specified by the <CODE=20
class=3Dliteral>base</CODE> item, while the currently selected entry is =
taken from=20
the image specified by the <CODE class=3Dliteral>selected</CODE> item. =
You must=20
define the position and size of each menu entry through the menu item. =
</P>
<P>The following entries can be used in the '<CODE =
class=3Dliteral>window =3D=20
menu</CODE>'. . .'<CODE class=3Dliteral>end</CODE>' block. </P>
<DIV class=3Dvariablelist>
<DL>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-menu-base></A>base =3D=20
  image </CODE></SPAN>
  <DD>
  <P>The image for normal menu entries. </P>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-selected></A>selected =3D=20
  image </CODE></SPAN>
  <DD>
  <P>The image showing the menu with all entries selected. </P>
  <DT><SPAN class=3Dterm><CODE class=3Dliteral><A =
name=3Dskin-menu></A>menu =3D X, Y,=20
  width, height, message </CODE></SPAN>
  <DD>
  <P>Defines the <CODE class=3Dliteral>X,Y</CODE> position and the size =
of a menu=20
  entry in the image. <CODE class=3Dliteral>message</CODE> is the =
message to be=20
  generated when the mouse button is released over the entry.=20
</P></DD></DL></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A=20
name=3Dskin-fonts></A>C.3.&nbsp;Fonts</H2></DIV></DIV></DIV>
<P>As mentioned in the section about the parts of a skin, a font is =
defined by=20
an image and a description file. You can place the characters anywhere =
in the=20
image, but make sure that their position and size is given in the =
description=20
file exactly. </P>
<P>The font description file (with <TT class=3Dfilename>.fnt</TT> =
extension) can=20
have comment lines starting with '<CODE class=3Dliteral>;</CODE>'. The =
file must=20
have a line in the form <A name=3Dskin-font-image></A></P><PRE =
class=3Dprogramlisting>image =3D <EM =
class=3Dreplaceable><CODE>image</CODE></EM></PRE>
<P>Where <CODE class=3Dliteral><EM=20
class=3Dreplaceable><CODE>image</CODE></EM></CODE> is the name of the =
image file=20
to be used for the font (you do not have to specify the extension). <A=20
name=3Dskin-font-char></A></P><PRE class=3Dprogramlisting>"char" =3D X, =
Y, width, height</PRE>
<P>Here <CODE class=3Dliteral>X</CODE> and <CODE =
class=3Dliteral>Y</CODE> specify=20
the position of the <CODE class=3Dliteral>char</CODE> character in the =
image=20
(<CODE class=3Dliteral>0,0</CODE> is the upper left corner). <CODE=20
class=3Dliteral>width</CODE> and <CODE class=3Dliteral>height</CODE> are =
the=20
dimensions of the character in pixels. </P>
<P>This example defines the A, B, C characters using <TT=20
class=3Dfilename>font.png</TT>. </P><PRE class=3Dprogramlisting>; Can be =
"font" instead of "font.png".
image =3D font.png

; Three characters are enough for demonstration purposes :-)
"A" =3D  0,0, 7,13
"B" =3D  7,0, 7,13
"C" =3D 14,0, 7,13
</PRE>
<P></P>
<DIV class=3Dsect2 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H3 class=3Dtitle><A=20
name=3Dskin-fonts-symbols></A>C.3.1.&nbsp;Symbols</H3></DIV></DIV></DIV>
<P>Some characters have special meanings when returned by some of the =
variables=20
used in <A=20
href=3D"http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/MPlayer.html#=
skin-dlabel">dlabel</A>.=20
These characters are meant to be shown as symbols so that things like a =
nice DVD=20
logo can be displayed instead of the character '<CODE =
class=3Dliteral>d</CODE>'=20
for a DVD stream. </P>
<P>The following table lists all the characters that can be used to =
display=20
symbols (and thus require a different font). </P>
<DIV class=3Dinformaltable>
<TABLE border=3D1>
  <COLGROUP>
  <COL>
  <COL></COLGROUP>
  <THEAD>
  <TR>
    <TH>Character</TH>
    <TH>Symbol</TH></TR></THEAD>
  <TBODY>
  <TR>
    <TD><SPAN class=3Dkeycap><B>p</B></SPAN></TD>
    <TD>play</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>s</B></SPAN></TD>
    <TD>stop</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>e</B></SPAN></TD>
    <TD>pause</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>n</B></SPAN></TD>
    <TD>no sound</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>m</B></SPAN></TD>
    <TD>mono sound</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>t</B></SPAN></TD>
    <TD>stereo sound</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>f</B></SPAN></TD>
    <TD>stream is a file</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>v</B></SPAN></TD>
    <TD>stream is a Video CD</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>d</B></SPAN></TD>
    <TD>stream is a DVD</TD></TR>
  <TR>
    <TD><SPAN class=3Dkeycap><B>u</B></SPAN></TD>
    <TD>stream is a URL</TD></TR></TBODY></TABLE></DIV></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dskin-gui></A>C.4.&nbsp;GUI=20
messages</H2></DIV></DIV></DIV>
<P>These are the messages that can be generated by buttons, potmeters =
and menu=20
entries. </P>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>Playback control:</B></P>
<DL>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evNext</STRONG></SPAN></SPAN>
  <DD>
  <P>Jump to next track in the playlist. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evPause</STRONG></SPAN></SPAN>
  <DD>
  <P>Forms a switch together with <CODE=20
  class=3Dliteral>evPlaySwitchToPause</CODE>. They can be used to have a =
common=20
  play/pause button. Both messages should be assigned to buttons =
displayed at=20
  the very same position in the window. This message pauses playing and =
the=20
  image for the <CODE class=3Dliteral>evPlaySwitchToPause</CODE> button =
is=20
  displayed (to indicate that the button can be pressed to continue =
playing).=20
  </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evPlay</STRONG></SPAN></SPAN>
  <DD>
  <P>Start playing. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evPlaySwitchToPause</STRONG></SPAN></SPAN>
  <DD>
  <P>The opposite of <CODE class=3Dliteral>evPauseSwitchToPlay</CODE>. =
This=20
  message starts playing and the image for the <CODE=20
  class=3Dliteral>evPauseSwitchToPlay</CODE> button is displayed (to =
indicate that=20
  the button can be pressed to pause playing). </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evPrev</STRONG></SPAN></SPAN>
  <DD>
  <P>Jump to previous track in the playlist. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evStop</STRONG></SPAN></SPAN>
  <DD>
  <P>Stop playing. </P></DD></DL></DIV>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>Seeking:</B></P>
<DL>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evBackward10sec</STRONG></SPAN></SPAN>
  <DD>
  <P>Seek backward 10 seconds. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evBackward1min</STRONG></SPAN></SPAN>
  <DD>
  <P>Seek backward 1 minute. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evBackward10min</STRONG></SPAN></SPAN>
  <DD>
  <P>Seek backward 10 minutes. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evForward10sec</STRONG></SPAN></SPAN>
  <DD>
  <P>Seek forward 10 seconds. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evForward1min</STRONG></SPAN></SPAN>
  <DD>
  <P>Seek forward 1 minute. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evForward10min</STRONG></SPAN></SPAN>
  <DD>
  <P>Seek forward 10 minutes. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evSetMoviePosition</STRONG></SPAN></SPAN>
  <DD>
  <P>Seek to position (can be used by a potmeter; the relative value =
(0-100%) of=20
  the potmeter is used). </P></DD></DL></DIV>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>Video control:</B></P>
<DL>
  <DT><SPAN class=3Dterm><SPAN=20
class=3Dbold><STRONG>evHalfSize</STRONG></SPAN></SPAN>
  <DD>
  <P>Set the movie window to half size. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evDoubleSize</STRONG></SPAN></SPAN>
  <DD>
  <P>Set the movie window to double size. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evFullScreen</STRONG></SPAN></SPAN>
  <DD>
  <P>Switch fullscreen mode on/off. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evNormalSize</STRONG></SPAN></SPAN>
  <DD>
  <P>Set the movie window to its normal size. </P></DD></DL></DIV>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>Audio control:</B></P>
<DL>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evDecAudioBufDelay</STRONG></SPAN></SPAN>
  <DD>
  <P>Decrease audio buffer delay. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evDecBalance</STRONG></SPAN></SPAN>
  <DD>
  <P>Decrease balance. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evDecVolume</STRONG></SPAN></SPAN>
  <DD>
  <P>Decrease volume. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evIncAudioBufDelay</STRONG></SPAN></SPAN>
  <DD>
  <P>Increase audio buffer delay. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evIncBalance</STRONG></SPAN></SPAN>
  <DD>
  <P>Increase balance. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evIncVolume</STRONG></SPAN></SPAN>
  <DD>
  <P>Increase volume. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evMute</STRONG></SPAN></SPAN>
  <DD>
  <P>Mute/unmute the sound. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evSetBalance</STRONG></SPAN></SPAN>
  <DD>
  <P>Set balance (can be used by a potmeter; the relative value (0-100%) =
of the=20
  potmeter is used). </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evSetVolume</STRONG></SPAN></SPAN>
  <DD>
  <P>Set volume (can be used by a potmeter; the relative value (0-100%) =
of the=20
  potmeter is used). </P></DD></DL></DIV>
<DIV class=3Dvariablelist>
<P class=3Dtitle><B>Miscellaneous:</B></P>
<DL>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evAbout</STRONG></SPAN></SPAN>
  <DD>
  <P>Open the about window. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evDropSubtitle</STRONG></SPAN></SPAN>
  <DD>
  <P>Disables the currently used subtitle. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evEqualizer</STRONG></SPAN></SPAN>
  <DD>
  <P>Turn the equalizer on/off. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evExit</STRONG></SPAN></SPAN>
  <DD>
  <P>Quit the program. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evIconify</STRONG></SPAN></SPAN>
  <DD>
  <P>Iconify the window. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evLoad</STRONG></SPAN></SPAN>
  <DD>
  <P>Load a file (by opening a file browser window, where you can choose =
a=20
  file). </P>
  <DT><SPAN class=3Dterm><SPAN=20
class=3Dbold><STRONG>evLoadPlay</STRONG></SPAN></SPAN>
  <DD>
  <P>Does the same as <CODE class=3Dliteral>evLoad</CODE>, but it =
automatically=20
  starts playing after the file is loaded. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evLoadSubtitle</STRONG></SPAN></SPAN>
  <DD>
  <P>Loads a subtitle file (with the fileselector) </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evLoadAudioFile</STRONG></SPAN></SPAN>
  <DD>
  <P>Loads an audio file (with the fileselector) </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evNone</STRONG></SPAN></SPAN>
  <DD>
  <P>Empty message, it has no effect (except maybe in Subversion =
versions :-)).=20
  </P>
  <DT><SPAN class=3Dterm><SPAN=20
class=3Dbold><STRONG>evPlaylist</STRONG></SPAN></SPAN>
  <DD>
  <P>Open/close the playlist window. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evPlayDVD</STRONG></SPAN></SPAN>
  <DD>
  <P>Tries to open the disc in the given DVD-ROM drive. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evPlayVCD</STRONG></SPAN></SPAN>
  <DD>
  <P>Tries to open the disc in the given CD-ROM drive. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evPreferences</STRONG></SPAN></SPAN>
  <DD>
  <P>Open the preferences window. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evSetAspect</STRONG></SPAN></SPAN>
  <DD>
  <P>Sets displayed image aspect. </P>
  <DT><SPAN class=3Dterm><SPAN =
class=3Dbold><STRONG>evSetURL</STRONG></SPAN></SPAN>
  <DD>
  <P>Displays the URL dialog window. </P>
  <DT><SPAN class=3Dterm><SPAN=20
  class=3Dbold><STRONG>evSkinBrowser</STRONG></SPAN></SPAN>
  <DD>
  <P>Open the skin browser window. </P></DD></DL></DIV></DIV>
<DIV class=3Dsect1 lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle style=3D"CLEAR: both"><A =
name=3Dskin-quality></A>C.5.&nbsp;Creating=20
quality skins</H2></DIV></DIV></DIV>
<P>So you have read up on creating skins for the <SPAN=20
class=3Dapplication>MPlayer</SPAN> GUI, done your best with the <SPAN=20
class=3Dapplication>Gimp</SPAN> and wish to submit your skin to us? Read =
on for=20
some guidelines to avoid common mistakes and produce a high quality =
skin. </P>
<P>We want skins that we add to our repository to conform to certain =
quality=20
standards. There are also a number of things that you can do to make our =
lives=20
easier. </P>
<P>As an example you can look at the <CODE =
class=3Dsystemitem>Blue</CODE> skin, it=20
satisfies all the criteria listed below since version 1.5. </P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P>Each skin should come with a <TT class=3Dfilename>README</TT> file =
that=20
  contains information about you, the author, copyright and license =
notices and=20
  anything else you wish to add. If you wish to have a changelog, this =
file is a=20
  good place. </P>
  <LI>
  <P>There should be a file <TT class=3Dfilename>VERSION</TT> with =
nothing more=20
  than the version number of the skin on a single line (e.g. 1.0). </P>
  <LI>
  <P>Horizontal and vertical controls (sliders like volume or position) =
should=20
  have the center of the knob properly centered on the middle of the =
slider. It=20
  should be possible to move the knob to both ends of the slider, but =
not past=20
  it. </P>
  <LI>
  <P>Skin elements should have the right sizes declared in the skin =
file. If=20
  this is not the case you can click outside of e.g. a button and still =
trigger=20
  it or click inside its area and not trigger it. </P>
  <LI>
  <P>The <TT class=3Dfilename>skin</TT> file should be prettyprinted and =
not=20
  contain tabs. Prettyprinted means that the numbers should line up =
neatly in=20
  columns. </P></LI></UL></DIV></DIV></DIV>
<DIV class=3Dappendix lang=3Den>
<DIV class=3Dtitlepage>
<DIV>
<DIV>
<H2 class=3Dtitle><A=20
name=3Dhistory></A>Appendix&nbsp;D.&nbsp;History</H2></DIV></DIV></DIV>
<DIV class=3Dblockquote>
<BLOCKQUOTE class=3Dblockquote>
  <P>This began a year ago... I have tried lots of players under Linux =
(<SPAN=20
  class=3Dapplication>mtv</SPAN>, <SPAN class=3Dapplication>xmps</SPAN>, =
<SPAN=20
  class=3Dapplication>dvdview</SPAN>, <SPAN =
class=3Dapplication>livid/oms</SPAN>,=20
  <SPAN class=3Dapplication>videolan</SPAN>, <SPAN =
class=3Dapplication>xine</SPAN>,=20
  <SPAN class=3Dapplication>xanim</SPAN>, <SPAN =
class=3Dapplication>avifile</SPAN>,=20
  <SPAN class=3Dapplication>xmmp</SPAN>) but they all have some problem. =
Mostly=20
  with special files or with audio/video sync. Most of them are unable =
to play=20
  both MPEG-1, MPEG-2 and AVI (DivX) files. Many players have image =
quality or=20
  speed problems too. So I've decided to write/modify one...=20
</P></BLOCKQUOTE></DIV>
<P>A'rpi, 2001</P>
<DIV class=3Ditemizedlist>
<UL type=3Ddisc>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN =
class=3Dapplication>mpg12play</SPAN>=20
  v0.1-v0.3</STRONG></SPAN>: Sep 22-25, 2000 </P>
  <P>The first try, hacked together in a half hour! I've used libmpeg3 =
from <A=20
  href=3D"http://www.heroinewarrior.com/"=20
  target=3D_top>http://www.heroinewarrior.com/</A> up to the version =
0.3, but=20
  there were image quality and speed problems with it. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN =
class=3Dapplication>mpg12play</SPAN>=20
  v0.5-v0.87</STRONG></SPAN>: Sep 28-Oct 20, 2000 </P>
  <P>MPEG codec replaced with DVDview by Dirk Farin, it was a great =
stuff, but=20
  it was slow and was written in C++ (A'rpi hates C++!!!) </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN =
class=3Dapplication>mpg12play</SPAN>=20
  v0.9-v0.95pre5</STRONG></SPAN>: Oct 21-Nov 2, 2000 </P>
  <P>MPEG codec was libmpeg2 (mpeg2dec) by Aaron Holtzman and Michel =
Lespinasse.=20
  It's great, optimized very fast C code with perfect image quality and =
100%=20
  MPEG standard conformance. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =

  v0.3-v0.9</STRONG></SPAN>: Nov 18-Dec 4, 2000 </P>
  <P>It was a pack of two programs: mpg12play v0.95pre6 and my new =
simple AVI=20
  player 'avip' based on avifile's Win32 DLL loader. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =

  v0.10</STRONG></SPAN>: Jan 1, 2001 </P>
  <P>The MPEG and AVI player in a single binary! </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
v0.11pre=20
  series</STRONG></SPAN>: </P>
  <P>Some new developers joined and since 0.11 the <SPAN=20
  class=3Dapplication>MPlayer</SPAN> project is a team-work! Added ASF =
file=20
  support, and OpenDivX (see <A href=3D"http://www.projectmayo.com/"=20
  target=3D_top>http://www.projectmayo.com/</A>) en/decoding. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
v0.17a "The=20
  IdegCounter"</STRONG></SPAN>: Apr 27, 2001 </P>
  <P>The release version of the 0.11pre after 4 months of heavy =
development! Try=20
  it, and be amazed! Thousands of new features added... and of course =
old code=20
  was improved too, bugs removed etc. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
0.18 "The=20
  BugCounter"</STRONG></SPAN>: Jul 9, 2001 </P>
  <P>2 months since 0.17 and here's a new release.. Completed ASF =
support, more=20
  subtitle formats, introduced libao (similar to libvo but to audio), =
even more=20
  stable than ever, and so on. It's a MUST! </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
0.50 "The=20
  Faszom(C)ounter"</STRONG></SPAN>: Oct 8, 2001 </P>
  <P>Hmm. Release again. Tons of new features, beta GUI version, bugs =
fixed, new=20
  vo and ao drivers, ported to many systems, including opensource DivX =
codecs=20
  and much more. Try it! </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
0.60 "The=20
  RTFMCounter"</STRONG></SPAN>: Jan 3, 2002 </P>
  <P>MOV/VIVO/RM/FLI/NUV fileformats support, native CRAM, Cinepak, =
ADPCM=20
  codecs, and support for XAnim's binary codecs; DVD subtitles support, =
first=20
  release of <SPAN class=3Dapplication>MEncoder</SPAN>, TV grabbing, =
cache,=20
  liba52, countless fixes. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
0.90pre10=20
  "The BirthdayCounter"</STRONG></SPAN> Nov 11, 2002 </P>
  <P>Although this is not a release, I am going to mention it because it =
came=20
  out 2 years after <SPAN class=3Dapplication>MPlayer</SPAN> v0.01. =
Happy=20
  birthday, <SPAN class=3Dapplication>MPlayer</SPAN>! </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
0.90rc1=20
  "The CodecCounter"</STRONG></SPAN> Dec 7, 2002 </P>
  <P>Again not a release, but after adding Sorenson 3 (QuickTime) and =
Windows=20
  Media 9 support, <SPAN class=3Dapplication>MPlayer</SPAN> is the =
world's first=20
  movie player with support for all known video formats! </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
0.90 "The=20
  CounterCounter"</STRONG></SPAN> Apr 6, 2003 </P>
  <P>After more than 1 year, we finally concluded that the code was =
indeed=20
  stable again, and ready to be published as a release. Unfortunately we =
forgot=20
  even to increase the version number, and other annoying bugs went in, =
so get=20
  ready for... </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =

  0.91</STRONG></SPAN> Aug 13, 2003 </P>
  <P>The above mentioned and lot of other bugs have been fixed. This is =
the=20
  latest stable version. </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =
1.0pre1=20
  "Development on the beach"</STRONG></SPAN> Sep 1, 2003 </P>
  <P>Although this is not a stable release, I am going to mention it =
because it=20
  is the first pre version of the 1.0 series of <SPAN=20
  class=3Dapplication>MPlayer</SPAN> and it is intended to help the =
<SPAN=20
  class=3Demphasis><EM>big bug hunting party</EM></SPAN>. This is a huge =
step=20
  forward! </P>
  <LI>
  <P><SPAN class=3Dbold><STRONG><SPAN class=3Dapplication>MPlayer</SPAN> =

  1.0</STRONG></SPAN> date yet unknown=20
</P></LI></UL></DIV></DIV></DIV></BODY></HTML>

------=_NextPart_000_0000_01C7E347.798AC830
Content-Type: text/css;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.mplayerhq.hu/MPlayer/DOCS/HTML-single/en/default.css

BODY {
	FONT-SIZE: 14px; BACKGROUND: white; COLOR: black; FONT-FAMILY: Arial, =
Helvetica, sans-serif
}
DIV.table TABLE {
	BORDER-RIGHT: #333366 1px solid; BORDER-TOP: #333366 1px solid; =
BACKGROUND: #333366; BORDER-LEFT: #333366 1px solid; BORDER-BOTTOM: =
#333366 1px solid; BORDER-COLLAPSE: separate; border-spacing: 1px
}
DIV.informaltable TABLE {
	BORDER-RIGHT: #333366 1px solid; BORDER-TOP: #333366 1px solid; =
BACKGROUND: #333366; BORDER-LEFT: #333366 1px solid; BORDER-BOTTOM: =
#333366 1px solid; BORDER-COLLAPSE: separate; border-spacing: 1px
}
DIV.table TH {
	BORDER-RIGHT: 0px; PADDING-RIGHT: 2px; BORDER-TOP: 0px; PADDING-LEFT: =
2px; BACKGROUND: #4488cc; PADDING-BOTTOM: 2px; BORDER-LEFT: 0px; COLOR: =
white; PADDING-TOP: 2px; BORDER-BOTTOM: 0px
}
DIV.informaltable TH {
	BORDER-RIGHT: 0px; PADDING-RIGHT: 2px; BORDER-TOP: 0px; PADDING-LEFT: =
2px; BACKGROUND: #4488cc; PADDING-BOTTOM: 2px; BORDER-LEFT: 0px; COLOR: =
white; PADDING-TOP: 2px; BORDER-BOTTOM: 0px
}
DIV.table TD {
	BORDER-RIGHT: 0px; PADDING-RIGHT: 2px; BORDER-TOP: 0px; PADDING-LEFT: =
2px; BACKGROUND: #fffff8; PADDING-BOTTOM: 2px; BORDER-LEFT: 0px; =
PADDING-TOP: 2px; BORDER-BOTTOM: 0px
}
DIV.informaltable TD {
	BORDER-RIGHT: 0px; PADDING-RIGHT: 2px; BORDER-TOP: 0px; PADDING-LEFT: =
2px; BACKGROUND: #fffff8; PADDING-BOTTOM: 2px; BORDER-LEFT: 0px; =
PADDING-TOP: 2px; BORDER-BOTTOM: 0px
}
PRE.screen {
	PADDING-RIGHT: 4px; PADDING-LEFT: 4px; BACKGROUND: #e0e0e0; =
PADDING-BOTTOM: 4px; PADDING-TOP: 4px
}
PRE.programlisting {
	PADDING-RIGHT: 4px; PADDING-LEFT: 4px; BACKGROUND: #e0e8f0; =
PADDING-BOTTOM: 4px; PADDING-TOP: 4px
}
SPAN.keycap {
	BORDER-RIGHT: #aaa 1px solid; BORDER-TOP: #aaa 1px solid; BACKGROUND: =
#ddd; BORDER-LEFT: #aaa 1px solid; BORDER-BOTTOM: #aaa 1px solid; =
FONT-FAMILY: Arial, Helvetica, sans-serif; WHITE-SPACE: nowrap
}
SPAN.guimenu {
	BACKGROUND: #dddddd
}
SPAN.guisubmenu {
	BACKGROUND: #dddddd
}
SPAN.guimenuitem {
	BACKGROUND: #dddddd
}
TT.filename {
	COLOR: maroon; WHITE-SPACE: nowrap
}
TT.option {
	COLOR: #066; WHITE-SPACE: nowrap
}
DIV.example {
	PADDING-LEFT: 0.5em; BORDER-LEFT: black 2px solid
}
DIV.important .title {
	COLOR: #c00
}
DIV.caution .title {
	COLOR: #c00
}
DIV.warning .title {
	COLOR: #c00
}

------=_NextPart_000_0000_01C7E347.798AC830--
