[Mplayer-cvslog] CVS: main/DOCS/xml/en Makefile,NONE,1.1 audio.xml,NONE,1.1 bugreports.xml,NONE,1.1 bugs.xml,NONE,1.1 cd-dvd.xml,NONE,1.1 codecs.xml,NONE,1.1 documentation.tex,NONE,1.1 documentation.xml,NONE,1.1 edl.xml,NONE,1.1 faq.xml,NONE,1.1 features.xml,NONE,1.1 formats.xml,NONE,1.1 history.xml,NONE,1.1 install.xml,NONE,1.1 mail-lists.xml,NONE,1.1 mencoder.xml,NONE,1.1 patches.xml,NONE,1.1 ports.xml,NONE,1.1 skin.xml,NONE,1.1 tvinput.xml,NONE,1.1 usage.xml,NONE,1.1 users-vs-dev.xml,NONE,1.1 video.xml,NONE,1.1
Nico
nicolas at mplayerhq.hu
Mon Mar 24 00:33:31 CET 2003
- Previous message: [Mplayer-cvslog] CVS: main/DOCS/xml BUGS,NONE,1.1 default.css,NONE,1.1 gen-html.xsl.sh,NONE,1.1 html-common.xsl,NONE,1.1 ldp.dsl,NONE,1.1 Makefile,NONE,1.1 Makefile.inc,NONE,1.1 README,NONE,1.1 README.maintainers,NONE,1.1
- Next message: [Mplayer-cvslog] CVS: main/DOCS/xml/xsl ldp-html-chunk.xsl,NONE,1.1 ldp-html-common.xsl,NONE,1.1 ldp-html.xsl,NONE,1.1ldp-print.xsl,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/DOCS/xml/en
In directory mail:/var/tmp.root/cvs-serv2023/main/DOCS/xml/en
Added Files:
Makefile audio.xml bugreports.xml bugs.xml cd-dvd.xml
codecs.xml documentation.tex documentation.xml edl.xml faq.xml
features.xml formats.xml history.xml install.xml
mail-lists.xml mencoder.xml patches.xml ports.xml skin.xml
tvinput.xml usage.xml users-vs-dev.xml video.xml
Log Message:
XML version of MPlayer's doc
--- NEW FILE ---
include ../Makefile.inc
# Set if you are using your own HTML stylesheet...
#HTML_STYLESHEET = mystyle.css
# Dependency information.
$(HTMLDIR)/index.html: $(wildcard *.xml)
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<sect2 id="audio-dev">
<title>Audio output devices</title>
<sect3 id="sync">
<title>Audio/Video synchronisation</title>
<para>
<application>MPlayer</application>'s audio interface is called
<emphasis>libao2</emphasis>. It currently contains these drivers:
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row><entry>Driver</entry><entry>Comment</entry></row>
</thead>
<tbody>
<row><entry>oss</entry><entry>
OSS (ioctl) driver (supports hardware AC3 passthrough)
[...1105 lines suppressed...]
<literal>1.0</literal>, sound will be unchanged, if you set it to
<literal>-1.0</literal>, left and right channels will be swapped.
</para>
</sect4>
<sect4 id="volnorm">
<title>Volume normalizer</title>
<para>
This plugin maximizes the volume without distorting the sound.
</para>
<para>
Usage:
<screen>mplayer <replaceable>media.avi</replaceable> -aop list=volnorm</screen>
</para>
</sect4>
</sect3>
</sect2>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<appendix id="bugreports">
<title>How to report bugs</title>
<para>
Good bug reports are a very valuable contribution to the development of any
software project. But just like writing good software, good problem reports
involve some work. Please realize that most developers are extremely busy and
receive obscene amounts of email. So while your feedback is crucial in improving
MPlayer and very much appreciated, please understand that you have to provide
<emphasis role="bold">all</emphasis> of the information we request and follow
the instructions in this document closely.
</para>
<sect1 id="bugreports_fix">
<title>How to fix bugs</title>
<para>
If you feel have the necessary skills you are invited to have a go at fixing the
bug yourself. Or maybe you already did that? Please read
<ulink url="../../tech/patches.txt">this short document</ulink> to find out how to
get your code included in MPlayer. The people on the
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng">mplayer-dev-eng</ulink>
mailing list will assist you if you have questions.
</para>
</sect1>
<sect1 id="bugreports_report">
<title>How to report bugs</title>
<para>
First of all please try the latest CVS version of MPlayer as your bug might
already be fixed there. Development moves extremely fast, most problems in
official releases are reported within days or even hours, so please use
<emphasis role="bold">only CVS</emphasis> to report bugs. This includes
binary packages of MPlayer. CVS instructions can be found at the bottom of
<ulink url="http://www.mplayerhq.hu/homepage/dload.html">this page</ulink> or in
the README. If this did not help please refer to the list of
<link linkend="bugs">known bugs</link> and the rest of the documentation. If your
problem is not known or not solvable by our instructions, then please report the bug.
</para>
<para>
Please do not send bug reports privately to individual developers. This is
community work and thus there might be several people interested in it. Sometimes
other users already experienced your troubles and know how to circumvent a problem
even if it is a bug in MPlayer code.
</para>
<para>
Please describe your problem in as much detail as possible. Do a little detective
work to narrow down the circumstances under which the problem occurs. Does the bug
only show up in certain situations? Is it specific to certain files or file types?
Does it occur with only one codec or is it codec independent? Can you reproduce it
with all output drivers? The more information you provide the better are our
chances at fixing your problem. Please do not forget to also include the valuable
information requested below, we will be unable to properly diagnose your problem
otherwise.
</para>
<para>
An excellent and well written guide to asking questions in public forums is
<ulink url="http://www.tuxedo.org/~esr/faqs/smart-questions.html">How To Ask
Questions The Smart Way</ulink> by <ulink url="http://www.tuxedo.org/~esr/">Eric S. Raymond</ulink>.
There is another called
<ulink url="http://www.chiark.greenend.org.uk/~sgtatham/bugs.html">How to Report
Bugs Effectively</ulink> by <ulink url="http://www.chiark.greenend.org.uk/~sgtatham/">Simon Tatham</ulink>.
If you follow these guidelines you should be able to get help. But please
understand that we all follow the mailing lists voluntarily in our free time. We
are very busy and cannot guarantee that you will get a solution for your problem
or even an answer.
</para>
</sect1>
<sect1 id="bugreports_where">
<title>Where to report bugs</title>
<para>
Subscribe to the mplayer-users mailing list:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-users"/>
and send your bug report to:
<ulink url="mailto:mplayer-users at mplayerhq.hu"/>
</para>
<para>
The language of this list is English. Please follow the standard
<ulink url="http://www.ietf.org/rfc/rfc1855.txt">Netiquette Guidelines</ulink> and
do not send HTML mail to any of our mailing lists. You will only get ignored or
banned. If you do not know what HTML mail is or why it is evil, read this
<ulink url="http://expita.com/nomime.html">fine document</ulink>. It explains all
the details and has instructions for turning HTML off. Also note that we will not
individually CC (carbon-copy) people so it is a good idea to subscribe to actually
receive your answer.
</para>
</sect1>
<sect1 id="bugreports_what">
<title>What to report</title>
<para>
You may need to include log, configuration or sample files in your bug report.
If some of them are quite big then it is better to upload them to our
<ulink url="ftp://mplayerhq.hu/MPlayer/incoming/">FTP server</ulink> in a
compressed format (gzip and bzip2 preferred) and include only the path and file
name in your bug report. Our mailing lists have a message size limit of 80k, if
you have something bigger you have to compress or upload it.
</para>
<sect2 id="bugreports_system">
<title>System Information</title>
<para>
<itemizedlist>
<listitem><para>
Your Linux distribution or operating system and version e.g.:
<itemizedlist>
<listitem><para>Red Hat 7.1</para></listitem>
<listitem><para>Slackware 7.0 + devel packs from 7.1 ...</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
kernel version:
<screen>uname -a</screen>
</para></listitem>
<listitem><para>
libc version:
<screen>ls -l /lib/libc[.-]*</screen>
</para></listitem>
<listitem><para>
gcc and ld versions:
<screen>
gcc -v
ld -v
</screen>
</para></listitem>
<listitem><para>
If you have problems with fullscreen mode:
<itemizedlist>
<listitem><para>Window manager type and version</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
If you have problems with XVIDIX:
<itemizedlist>
<listitem><para>X colour depth:
<screen>xdpyinfo | grep "depth of root"</screen>
</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
If only the GUI is buggy:
<itemizedlist>
<listitem><para>GTK version</para></listitem>
<listitem><para>GLIB version</para></listitem>
<listitem><para>libpng version</para></listitem>
<listitem><para>GUI situation in which the bug occurs</para></listitem>
</itemizedlist>
</para></listitem>
</itemizedlist>
</para>
</sect2>
<sect2 id="bugreports_hardware">
<title>Hardware and drivers</title>
<para>
<itemizedlist>
<listitem><para>
CPU info (this works on Linux only):
<screen>cat /proc/cpuinfo</screen>
</para></listitem>
<listitem><para>
Video card manufacturer and model, e.g.:
<itemizedlist>
<listitem><para>ASUS V3800U chip: nVidia TNT2 Ultra pro 32MB SDRAM</para></listitem>
<listitem><para>Matrox G400 DH 32MB SGRAM</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
Video driver type & version, e.g.:
<itemizedlist>
<listitem><para>X built-in driver</para></listitem>
<listitem><para>nVidia 0.9.623</para></listitem>
<listitem><para>Utah-GLX CVS 2001-02-17</para></listitem>
<listitem><para>DRI from X 4.0.3</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
Sound card type & driver, e.g.:
<itemizedlist>
<listitem><para>Creative SBLive! Gold with OSS driver from oss.creative.com</para></listitem>
<listitem><para>Creative SB16 with kernel OSS drivers</para></listitem>
<listitem><para>GUS PnP with ALSA OSS emulation</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
If in doubt include <command>lspci -vv</command> output on Linux systems.
</para></listitem>
</itemizedlist>
</para>
</sect2>
<sect2 id="bugreports_configure">
<title>Configure problems</title>
<para>
If you get errors while running <command>./configure</command>, or autodetection
of something fails, read <filename>configure.log</filename>. You may find the
answer there, for example multiple versions of the same library mixed on your
system, or you forgot to install the development package (those with the -dev
suffix). If you think there is a bug, include <filename>configure.log</filename>
in your bug report.
</para>
</sect2>
<sect2 id="bugreports_conpilation">
<title>Compilation problems</title>
<para>
Please include these files:
<itemizedlist>
<listitem><para>config.h</para></listitem>
<listitem><para>config.mak</para></listitem>
</itemizedlist>
Only if compilation fails below one of these directories, include these files:
<itemizedlist>
<listitem><para>Gui/config.mak</para></listitem>
<listitem><para>libvo/config.mak</para></listitem>
<listitem><para>libao2/config.mak</para></listitem>
</itemizedlist>
</para>
</sect2>
<sect2 id="bugreports_playback">
<title>Playback problems</title>
<para>
Please include the output of <application>MPlayer</application> at verbosity level
1, but remember to <emphasis role="bold">not truncate the output</emphasis> when
you paste it into your mail. The developers need all of the messages to properly
diagnose a problem. You can direct the output into a file like this:
<screen>mplayer -v <replaceable>options</replaceable> <replaceable>filename</replaceable> > mplayer.log 2>&1</screen>
</para>
<para>
If your problem is specific to one or more files, then please upload the offender(s) to:
<ulink url="ftp://mplayerhq.hu/MPlayer/incoming/"/>
</para>
<para>
Also upload a small text file having the same base name as your file with a .txt
extension. Describe the problem you are having with the particular file there and
include your email address as well as the output of MPlayer at verbosity level 1.
Usually the first 1-5 MB of a file are enough to reproduce the problem, but to be
sure we ask you to:
<screen>dd if=<replaceable>yourfile</replaceable> of=<replaceable>smallfile</replaceable> bs=1024k count=5</screen>
It will take the first five megabytes of '<emphasis role="bold">your-file</emphasis>'
and write it to '<emphasis role="bold">small-file</emphasis>'. Then try again on
this small file and if the bug still shows up your sample is sufficient for us.
Please <emphasis role="bold">do not ever</emphasis> send such files via mail!
Upload it, and send only the path/filename of the file on the FTP-server. If the
file is accessible on the net, then sending the <emphasis role="bold">exact</emphasis>
URL is sufficient.
</para>
</sect2>
<sect2 id="bugreports_crash">
<title>Crashes</title>
<para>
You have to run <application>MPlayer</application> inside <command>gdb</command>
and send us the complete output or if you have a <filename>core</filename> dump of
the crash you can extract useful information from the Core file. Here's how:
</para>
<sect3 id="bugreports_debug">
<title>How to conserve information about a reproducible crash</title>
<para>
Recompile MPlayer with debugging code enabled:
<screen>
./configure --enable-debug=3
make
</screen>
and then run MPlayer within gdb using:
<screen>gdb ./mplayer</screen>
You are now within gdb. Type:
<screen>run -v <replaceable>options-to-mplayer</replaceable> <replaceable>filename</replaceable></screen>
and reproduce your crash. As soon as you did it, gdb will return you to the command
line prompt where you have to enter
<screen>
bt
disass $pc-32 $pc+32
info all-registers
</screen>
</para>
</sect3>
<sect3 id="bugreports_core">
<title>How to extract meaningful information from a core dump</title>
<para>
Please create the following command file:
<screen>
bt
disass $pc-32 $pc+32
info all-registers
</screen>
Then simply execute the following on your command line:
<screen>gdb mplayer --core=core -batch --command=<replaceable>command_file</replaceable> > mplayer.bug</screen>
</para>
</sect3>
</sect2>
</sect1>
<sect1 id="bugreports_advusers">
<title>I know what I am doing...</title>
<para>
If you created a proper bug report following the steps above and you are confident
it is a bug in MPlayer, not a compiler problem or broken file, you have already
read the documentation and you could not find a solution, your sound drivers are
OK, then you might want to subscribe to the mplayer-advusers list and send your
bug report there to get a better and faster answer.
</para>
<para>
Please be advised that if you post newbie questions or questions answered in the
manual there, you will be ignored or flamed instead of getting an appropriate answer.
So do not flame us and subscribe to -advusers only if you really know what you are
doing and feel like being an advanced MPlayer user or developer. If you meet these
criteria it should not be difficult to find out how to subscribe...
</para>
</sect1>
</appendix>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<appendix id="bugs">
<title>Known bugs</title>
<sect1 id="bugs-special">
<title>Special system/CPU-specific bugs/problems</title>
<itemizedlist>
<listitem>
<para>SIGILL (signal 4) on P3 using 2.2.x kernels:</para>
<para>Problem: kernel 2.2.x doesn't have proper (working) SSE support</para>
<para>Solution: upgrade kernel to 2.4.x</para>
<para>Workaround: <command>./configure --disable-sse</command></para>
</listitem>
<listitem>
<para>General SIGILL (signal 4):</para>
<para>Problem: you compiled and run mplayer in different machines
(for example compiled on P3 and running on Celeron)</para>
<para>Solution: compile MPlayer on the same machine where you will use it!</para>
<para>Workaround: <command>./configure --disable-sse</command> etc. options</para>
</listitem>
<listitem>
<para>"Internal buffer inconsistency" during MEncoder run:</para>
<para>Problem: known problem when lame < 3.90 was compiled with gcc 2.96 or 3.x.</para>
<para>Solution: use lame >=3.90.</para>
<para>Workaround: compile lame with gcc 2.95.x and remove any already installed
lame packages, they may have been compiled with gcc 2.96.</para>
</listitem>
<listitem>
<para>Messed up MP2/MP3 sound on PPC:</para>
<para>Problem: known GCC miscompilation bug on PPC platforms, no fix yet.</para>
<para>Workaround: use FFmpeg's (slow) MP1/MP2/MP3 decoder (<option>-ac ffmpeg</option>)</para>
</listitem>
<listitem>
<para>sig11 in libmpeg2, when scaling+encoding:</para>
<para>Problem: known GCC 2.95.2 MMX bug, upgrade to 2.95.3.</para>
</listitem>
</itemizedlist>
</sect1>
<sect1 id="bugs-audio">
<title>Various A-V sync and other audio problems</title>
<sect2 id="bugs-delay-all">
<title>General audio delay or jerky sound (exists with all or many files)</title>
<itemizedlist>
<listitem><para>
most common: buggy audio driver! - try to use different drivers, try ALSA 0.9 OSS
emulation with <option>-ao oss</option>, also try <option>-ao sdl</option>,
sometimes it helps. If your file plays fine with -nosound, then you can be sure
it's sound card (driver) problem.
</para></listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>audio buffer problems (buffer size badly detected)</para>
<para>Workaround: mplayer <option>-abs</option> option</para>
</listitem>
</itemizedlist>
<itemizedlist>
<listitem><para>
samplerate problems - maybe your card doesn't support the samplerate used in your
files - try the resampling plugin (<option>-aop</option>)
</para></listitem>
</itemizedlist>
<itemizedlist>
<listitem>
<para>slow machine (CPU or VGA)</para>
<para>try with <option>-vo null</option>, if it plays well, then you have slow
VGA card/driver</para>
<para>Workaround: buy a faster card or read this documentation about how to
speed up</para>
<para>Also try <option>-framedrop</option></para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="bugs-delay-specific">
<title>Audio delay/de-sync specific to one or a few files</title>
<itemizedlist>
<listitem>
<para>bad file</para>
<para>
Workaround:
<itemizedlist>
<listitem>
<para><option>-ni</option> or <option>-nobps</option> option (for
non-interleaved or bad files)</para>
<para>and/or</para>
</listitem>
<listitem>
<para><option>-mc 0</option>(required for files with badly
interleaved VBR audio)</para>
<para>and/or</para>
</listitem>
<listitem>
<para><option>-delay</option> or <keycap>+</keycap>/<keycap>-</keycap>
keys at runtime to adjust delay</para>
</listitem>
</itemizedlist>
If none of these help, please upload the file, we'll check (and fix).
</para>
</listitem>
<listitem>
<para>your sound card doesn't support 48kHz playback</para>
<para>Workaround: buy a better sound card... or try to decrease fps by 10% (use
<option>-fps 27</option> for a 30fps movie) or use the resampler plugin</para>
</listitem>
<listitem>
<para>slow machine(if A-V is not around 0, and the last number in the status
line increasing)</para>
<para>Workaround: <option>-framedrop</option></para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="bugs-nosound">
<title>No sound at all</title>
<itemizedlist>
<listitem>
<para>your file uses an unsupported audio codec</para>
<para>read the documentation and help us adding support for it</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="bugs-nopicture">
<title>No picture at all (just plain grey/green window)</title>
<itemizedlist>
<listitem>
<para>your file uses an unsupported video codec</para>
<para>Workaround: read the documentation and help us adding support for it</para>
</listitem>
<listitem>
<para>
auto-selected codec can't decode the file, try to select another using
<option>-vc</option> or <option>-vfm</option> options
</para>
</listitem>
<listitem>
<para>
you try to play DivX 3.x file with OpenDivX decoder or XviD
(<option>-vc odivx</option>) - install Divx4Linux and recompile player
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="bugs-video">
<title>Video-out problems</title>
<para>
First note: options <option>-fs -vm</option> and <option>-zoom</option> are just
recommendations, not (yet) supported by all drivers. So it isn't a bug if it
doesn't work. Only a few driver supports scaling/zooming, don't expect this from
x11 or dga.
</para>
<formalpara>
<title>OSD/sub flickering</title>
<para>
<itemizedlist>
<listitem><para>x11 driver: sorry, it can't be fixed now</para></listitem>
<listitem><para>xv driver: use <option>-double</option> option</para></listitem>
</itemizedlist>
</para>
</formalpara>
<formalpara>
<title>Green image using mga_vid (<option>-vo mga</option> / <option>-vo xmga</option>)</title>
<para>
<itemizedlist>
<listitem><para>mga_vid misdetected your card's RAM amount, reload it using
<option>mga_ram_size</option> option
</para></listitem>
</itemizedlist>
</para>
</formalpara>
</sect2>
</sect1>
</appendix>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<chapter id="cd-dvd">
<title>CD/DVD usage</title>
<sect1 id="drives">
<title>CD/DVD drives</title>
<para>
Linux documentation excerpt:
</para>
<para>
Modern CD-ROM drives can attain very high head speeds, yet some CD-ROM drives
are capable of running at reduced speeds. There are several reasons that might
make you consider changing the speed of a CD-ROM drive:
</para>
<itemizedlist>
<listitem><para>
There have been reports of read errors at high speeds, especially
with badly pressed CD-ROMs. Reducing the speed can prevent data loss under
these circumstances.
</para></listitem>
<listitem><para>
Many CD-ROM drives are annoyingly loud, a lower speed may reduce the noise.
</para></listitem>
</itemizedlist>
<para>
You can reduce the speed of IDE CD-ROM drives with <command>hdparm</command> or a
program called <command>setcd</command>. It works like this:
<screen>hdparm -E [speed] [cdrom device]</screen>
<screen>setcd -x [speed] [cdrom device]</screen>
</para>
<para>
You can also try
<screen>echo current_speed:4 > /proc/ide/[cdrom device]/settings</screen>
but you will need root privileges. The following command may also help:
<screen>echo file_readahead:2000000 > /proc/ide/[cdrom device]/settings</screen>
</para>
<para>
This sets prefetched file reading to 2MB, which helps with scratched CD-ROMs.
If you set it to too high, the drive will continuously spin up and down, and
will dramatically decrease the performance.
It is recommended that you also tune your CD-ROM drive with <command>hdparm</command>:
<screen>hdparm -d1 -a8 -u1 <replaceable>cdrom device</replaceable></screen>
</para>
<para>
This enables DMA access, read-ahead, and IRQ unmasking (read the <command>hdparm</command>
man page for a detailed explanation).
</para>
<para>
Please refer to "<filename>/proc/ide/[cdrom device]/settings"</filename>
for fine-tuning your CD-ROM.
</para>
<para>
SCSI drives do not have a uniform way of setting these parameters (Do you know one?
Tell us!) There is a tool that works for
<ulink url="http://das.ist.org/~georg/">Plextor SCSI drives</ulink>.
</para>
<para>FreeBSD:</para>
<para>Speed: <command>cdcontrol [-f device] speed [speed]</command></para>
<para>DMA: <command>sysctl hw.ata.atapi_dma=1</command></para>
</sect1>
<sect1 id="dvd">
<title>DVD playback</title>
<para>
For the complete list of available options, please read the man page.
The Syntax for a standard Digital Versatile Disc (DVD) is as follows:
<screen>mplayer -dvd <track> [-dvd-device <device>]</screen>
</para>
<para>
Example:
<screen>mplayer -dvd 1 -dvd-device /dev/hdc</screen>
</para>
<para>
The default DVD device is <filename>/dev/dvd</filename>. If your setup
differs, make a symlink or specify the correct device on the command
line with the <option>-dvd-device</option> option.
</para>
<formalpara>
<title>New-style DVD support (mpdvdkit2)</title>
<para>
<application>MPlayer</application> uses <systemitem>libdvdread</systemitem> and
<systemitem>libdvdcss</systemitem> for DVD decryption and playback. These two
libraries are contained in the <filename class="directory">libmpdvdkit2/</filename>
subdirectory of the MPlayer source tree, you do not have to install them separately.
We opted for this solution because we had to fix a <systemitem>libdvdread</systemitem>
bug and apply a patch which adds
<emphasis role="bold">cracked CSS keys caching support</emphasis> to
<systemitem>libdvdcss</systemitem> This results in a large speed increase because the
keys do not have to be cracked every time before playing.
</para>
</formalpara>
<para>
<application>MPlayer</application> can also use system-wide <systemitem>libdvdread</systemitem>
and <systemitem>libdvdcss</systemitem> libraries, but this solution is
<emphasis role="bold">not</emphasis> recommended, as it can result in bugs,
library incompatibilities and slower speed.
</para>
<formalpara>
<title>DVD Navigation support (dvdnav)</title>
<para>
Support for DVD navigation via <systemitem>dvdnav</systemitem> was being worked
on, but it was never finished properly and it is currently unmaintained. Who
knows, it might even compile.
</para>
</formalpara>
<formalpara>
<title>Old-style DVD support - OPTIONAL</title>
<para>
Useful if you want to play encoded VOBs from <emphasis role="bold">hard disk</emphasis>.
Compile and install <emphasis role="bold">libcss</emphasis> 0.0.1 (not newer) for this
(If MPlayer fails to detect it, use the <option>-csslib /path/to/libcss.so</option>
option). To use it, you need to be root, use a suid root MPlayer binary or let
MPlayer call the suid-root fibmap_mplayer wrapper program.
</para>
</formalpara>
<formalpara>
<title>DVD structure</title>
<para>
DVD disks have 2048 bytes per sector with ECC/CRC. They usually have an UDF
filesystem on a single track, containing various files (small .IFO and .BUK
files and big (1GB) .VOB files). They are real files and can be copied/played
from the mounted filesystem of an unencrypted DVD.
</para>
</formalpara>
<para>
The .IFO files contain the movie navigation information (chapter/title/angle
map, language table, etc) and are needed to read and interpret the .VOB content
(movie). The .BUK files are backups of them. They use
<emphasis role="bold">sectors</emphasis> everywhere, so you need to use raw
addressing of sectors of the disc to implement DVD navigation or decrypt the
content.
</para>
<para>
The whole old-style DVD support with <systemitem>libcss</systemitem> therefore
needs a mounted DVD filesystem and raw sector-based access to the device.
Unfortunately you must (under Linux) be root to get the sector address of a
file. You have the following choices:
<itemizedlist>
<listitem><para>
Be root or use a suid-root <application>MPlayer</application> binary.
</para></listitem>
<listitem><para>
Let <application>MPlayer</application> call the suid-root fibmap_mplayer
wrapper program to access the DVD (used in the old-style DVD playback over
<systemitem>libcss</systemitem>).
</para></listitem>
<listitem><para>
Don't use the kernel's filesystem driver at all and reimplement it in
userspace. <systemitem>libdvdread</systemitem> 0.9.x and <systemitem>libmpdvdkit</systemitem>
do this (new-style DVD support). The kernel UDF filesystem driver is not
needed as they already have their own builtin UDF filesystem driver.
Also the DVD does not have to be mounted as only the raw sector-based
access is used.
</para></listitem>
</itemizedlist>
</para>
<para>
Sometimes <filename>/dev/dvd</filename> cannot be read by users, so the
<systemitem>libdvdread</systemitem> authors implemented an emulation layer
which transfers sector addresses to filenames+offsets, to emulate raw
access on top of a mounted filesystem or even on a hard disk.
</para>
<para>
<systemitem>libdvdread</systemitem> even accepts the mountpoint instead of
the device name for raw access and checks <filename>/proc/mounts</filename>
to get the device name. It was developed for Solaris, where device names
are dynamically allocated.
</para>
<para>
The default DVD device is <filename>/dev/dvd</filename>. If your setup differs,
make a symlink, or specify the correct device on the command line with the
<option>-dvd-device</option> option.
</para>
<formalpara>
<title>DVD authentication</title>
<para>
The authentication and decryption method of the new-style DVD support is done
using a patched <systemitem>libdvdcss</systemitem> (see above). The method can
be specified through the environment variable <envar>DVDCSS_METHOD</envar>,
which can be set to key, disk or title.
</para>
</formalpara>
<para>
If nothing is specified it tries the following methods (default: key,
title request):
</para>
<orderedlist>
<listitem><para>
<emphasis role="bold">bus key</emphasis>: This key is negotiated during
authentication (a long mix of ioctls and various key exchanges, crypto
stuff) and is used to encrypt the title and disk keys before sending them
over the unprotected bus (to prevent eavesdropping). The bus key is needed
to get and predecrypt the crypted disk key.
</para></listitem>
<listitem><para>
<emphasis role="bold">cached key</emphasis>: <application>MPlayer</application>
looks for already cracked title keys which are stored in the
<filename class="directory">~/.mplayer/DVDKeys</filename> directory (fast ;).
</para></listitem>
<listitem><para>
<emphasis role="bold">key</emphasis>: If no cached key is available,
<application>MPlayer</application> tries to decrypt the disk key with a set
of included player keys.
</para></listitem>
<listitem><para>
<emphasis role="bold">disk</emphasis>: If the key method fails
(e.g. no included player keys), <application>MPlayer</application>
will crack the disk key using a brute force algorithm. This process
is CPU intensive and requires 64 MB of memory (16M 32Bit entries hash
table) to store temporary data. This method should always work (slow).
</para></listitem>
<listitem><para>
<emphasis role="bold">title request</emphasis>: With the disk key
<application>MPlayer</application> requests the crypted title keys,
which are inside <emphasis>hidden sectors</emphasis> using <systemitem>ioctl()</systemitem>.
The region protection of RPC-2 drives is performed in this step and may fail on such drives.
If it succeeds, the title keys will be decrypted with the bus and disk key.
</para></listitem>
<listitem><para>
<emphasis role="bold">title</emphasis>: This method is used if the title
request failed and does not rely on any key exchange with the DVD drive.
It uses a crypto attack to guess the title key directly (by finding a
repeating pattern in the decrypted VOB content and guessing that the
plain text corresponding to the first encrypted bytes is a continuation
of that pattern). The method is also known as "known plaintext attack"
or "DeCSSPlus". In rare cases this may fail because there is not
enough encrypted data on the disk to perform a statistical attack or because
the key changes in the middle of a title. This method is the only way to
decrypt a DVD stored on a hard disk or a DVD with the wrong region on an
RPC2 drive (slow).
</para></listitem>
</orderedlist>
<para>
RPC-1 DVD drives only protect region settings through software. RPC-2 drives
have a hardware protection that allows 5 changes only. It might be
needed/recommended to upgrade the firmware to RPC-1 if you have a RPC-2 DVD
drive. Firmware upgrades can be found on this
<ulink url="http://www.firmware-flash.com">firmware page</ulink>. If there is
no firmware upgrade available for your device, use the
<ulink url="http://www.linuxtv.org/download/dvd/dvd_disc_20000215.tar.gz">regionset tool</ulink>
to set the region code of your DVD drive (under Linux).
<emphasis role="bold">Warning</emphasis>: You can only set the region 5 times.
</para>
</sect1>
<sect1 id="vcd">
<title>VCD playback</title>
<para>
For the complete list of available options, please read the man page. The Syntax for a
standard Video CD (VCD) is as follows:
<screen>mplayer -vcd <track> [-cdrom-device <device>]</screen>
Example:
<screen>mplayer -vcd 2 -cdrom-device /dev/hdc</screen>
The default VCD device is <filename>/dev/cdrom</filename>. If your setup
differs, make a symlink or specify the correct device on the command line
with the <option>-cdrom-device</option> option.
</para>
<note><para>
At least Plextor and some Toshiba SCSI CD-ROM drives have horrible performance
reading VCDs. This is because the the CDROMREADRAW <systemitem>ioctl</systemitem>
is not fully implemented for these drives. If you have some knowledge of SCSI
programming, please <ulink url="../../tech/patches.txt">help us</ulink>
implement generic SCSI support for VCDs.
</para></note>
<para>
In the meantime you can extract data from VCDs with
<ulink url="http://140.132.1.204/OS/Linux/packages/X/viewers/readvcd/">readvcd</ulink>
and play the resulting file with <application>MPlayer</application>.
</para>
<formalpara>
<title>VCD structure</title>
<para>VCD disks consist of one or more tracks:</para>
</formalpara>
<itemizedlist>
<listitem><para>
The first track is a small 2048 bytes/sector data track with an iso9660
filesystem, usually containing Windows VCD player programs and maybe other
information (images, text, etc).
</para></listitem>
<listitem><para>
The second and other tracks are raw 2324 bytes/sector MPEG (movie)
tracks, containing one MPEG PS data packet per sector instead of a
filesystem. Similar to audio CD tracks, these tracks <emphasis role="bold">cannot
be mounted</emphasis> (Did you ever mount an audio CD to play it?).
As most movies are inside this track, you should try <option>-vcd 2</option> first.
</para></listitem>
<listitem><para>
There exist VCD disks without the first track (single track and no filesystem
at all). They are still playable, but cannot be mounted.
</para></listitem>
</itemizedlist>
<formalpara>
<title>About .DAT files</title>
<para>
The ~600 MB file visible on the first track of the mounted VCD is not a real
file! It is a so called ISO gateway, created to allow Windows to handle such
tracks (Windows does not allow raw device access to applications at all).
Under Linux you cannot copy or play such files (they contain garbage). Under
Windows it is possible as its iso9660 driver emulates the raw reading of
tracks in this file. To play a .DAT file you need the kernel driver which can
be found in the Linux version of PowerDVD. It has a modified iso9660 filesystem
(<filename>vcdfs/isofs-2.4.X.o</filename>) driver, which is able to emulate the
raw tracks through this shadow .DAT file. If you mount the disc using their
driver, you can copy and even play .DAT files with mplayer. But it will not
work with the standard iso9660 driver of the Linux kernel! Use the
<option>-vcd</option> option instead. Alternatives for VCD copying are the
new <ulink url="http://www.elis.rug.ac.be/~ronsse/cdfs/">cdfs</ulink> kernel
driver (not part of the official kernel) that shows CD sessions as image files and
<ulink url="http://cdrdao.sourceforge.net/">cdrdao</ulink>, a bit-by-bit
CD grabbing/copying application.
</para>
</formalpara>
</sect1>
</chapter>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="codecs">
<title>Supported codecs</title>
<sect2 id="video-codecs">
<title>Video codecs</title>
<para>
See the <ulink url="http://www.mplayerhq.hu/DOCS/codecs-status.html">codec status table</ulink>
for the complete, daily generated list. Quite a few codecs are available for
download from our homepage. Grab them from our
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/">codecs page</ulink>.
</para>
<para>
The most important ones above all:
</para>
<itemizedlist>
<listitem><simpara>
<emphasis role="bold">MPEG1</emphasis> (<emphasis role="bold">VCD</emphasis>) and
<emphasis role="bold">MPEG2</emphasis> (<emphasis role="bold">DVD</emphasis>) video
</simpara></listitem>
<listitem><simpara>
native decoders for <emphasis role="bold">DivX ;-), OpenDivX (DivX4),
DivX 5.01, 3ivX, M$ MPEG4</emphasis> v1, v2 and other MPEG4 variants
</simpara></listitem>
<listitem><simpara>
native decoder for <emphasis role="bold">Windows Media Video 7/8</emphasis>
(<emphasis role="bold">WMV1/WMV2</emphasis>), and Win32 DLL decoder
for <emphasis role="bold">Windows Media Video 9</emphasis>
(<emphasis role="bold">WMV3</emphasis>), both used in <filename>.wmv</filename>
files
</simpara></listitem>
<listitem><simpara>
native <emphasis role="bold">Sorenson 1 (SVQ1)</emphasis> decoder
</simpara></listitem>
<listitem><simpara>
Win32/QT <emphasis role="bold">Sorenson 3 (SVQ3)</emphasis> decoder
</simpara></listitem>
<listitem><simpara>
<emphasis role="bold">3ivx</emphasis> v1, v2 decoder
</simpara></listitem>
<listitem><simpara>
Cinepak and <emphasis role="bold">Intel Indeo</emphasis> codecs (3.1,3.2,4.1,5.0)
</simpara></listitem>
<listitem><simpara>
<emphasis role="bold">MJPEG</emphasis>, AVID, VCR2, ASV2 and other hardware
formats
</simpara></listitem>
<listitem><simpara>
VIVO 1.0, 2.0, I263 and other <emphasis role="bold">h263(+)</emphasis> variants
</simpara></listitem>
<listitem><simpara>
FLI/FLC
</simpara></listitem>
<listitem><simpara>
<emphasis role="bold">RealVideo 1.0</emphasis> from libavcodec, and
<emphasis role="bold">RealVideo 2.0, 3.0</emphasis> and
<emphasis role="bold">4.0</emphasis> codecs using RealPlayer libraries
</simpara></listitem>
<listitem><simpara>
native decoder for HuffYUV
</simpara></listitem>
<listitem><simpara>
Various old simple RLE-like formats
</simpara></listitem>
</itemizedlist>
<para>
If you have a Win32 codec not listed here which is not supported yet,
please read the <link linkend="win32-codecs">codec importing HOWTO</link>
and help us add support for it.
</para>
<sect3 id="divx4-5">
<title>DivX4/DivX5</title>
<para>
This section contains information about the DivX4 codec of
<ulink url="http://www.projectmayo.com">Project Mayo</ulink>.
Their first available alpha version was OpenDivX 4.0 alpha 47 and 48.
Support for this was included in <application>MPlayer</application> in the
past, and built by default. We also used its postprocessing code to
optionally enhance visual quality of MPEG1/2 movies. Now we use our own,
for all file types.
</para>
<para>
The new generation of this codec is called DivX4 and can even decode
movies made with the infamous DivX codec! In addition it is much faster
than the native Win32 DivX DLLs but slower than <systemitem
class="library">libavcodec</systemitem>. Hence its usage as a decoder is
<emphasis role="bold">DISCOURAGED</emphasis>. However, it is useful for
encoding. One disadvantage of this codec is that it is not available under an
Open Source license.
</para>
<para>
DivX4 works in two modes:
<variablelist>
<varlistentry><term><option>-vc odivx</option></term>
<listitem><simpara>
Uses the codec in OpenDivX fashion. In this case it produces YV12 images
in its own buffer, and <application>MPlayer</application> does colorspace
conversion via libvo. (<emphasis role="bold">Fast, recommended!</emphasis>)
</simpara></listitem>
</varlistentry>
<varlistentry><term><option>-vc divx4</option></term>
<listitem><simpara>
Uses the colorspace conversion of the codec. In this mode you can use
YUY2/UYVY, too. (<emphasis role="bold">SLOW</emphasis>)
</simpara></listitem>
</varlistentry>
</variablelist>
</para>
<para>
The <option>-vc odivx</option> method is usually faster, due to the fact
that it transfers image data in YV12 (planar YUV 4:2:0) format, thus
requiring much less bandwidth on the bus. For packed YUV modes (YUY2, UYVY)
use the <option>-vc divx4</option> method. For RGB modes the speed is the
same, differing at best according to your current color depth.
<note>
<para>
If your <option>-vo</option> driver supports direct rendering, then <option>-vc
divx4</option> may be faster, or even the fastest solution.
</para>
<para>
The Divx4/5 binary codec library can be downloaded from
<ulink url="http://avifile.sourceforge.net">avifile</ulink> or
<ulink url="http://www.divx.com">divx.com</ulink>
Unpack it, run <filename>./install.sh</filename> as root and do not forget adding
<filename class="directory">/usr/local/lib</filename> to your
<filename>/etc/ld.so.conf</filename> and running <command>ldconfig</command>.
</para>
<para>
Get the CVS version of the OLD OpenDivx core library like this:
</para>
<procedure>
<step><para>
<screen>cvs -d:pserver:anonymous at cvs.projectmayo.com:/cvsroot login</screen>
</para></step>
<step><para>
<screen>cvs -d:pserver:anonymous at cvs.projectmayo.com:/cvsroot co divxcore</screen>
</para></step>
<step><para>
This core library is split into a decore and encore library that have to be
compiled separately. For the decore Library, simply type
<screen>
cd divxcore/decore/build/linux
make
cp libdivxdecore.so /usr/local/lib
ln -s /usr/local/lib/libdivxdecore.so /usr/local/lib/libdivxdecore.so.0
cp ../../src/decore.h /usr/local/include
</screen>
</para></step>
<step><para>
Alas, for the encore library there is no Linux Makefile available, and the
MMX optimized code only works on Windows. You can still compile it, though,
by using this
<ulink url="ftp://ftp.mplayerhq.hu/MPlayer/contrib/divx-mf/Makefile">Makefile</ulink>.
<screen>
cd ../../../encore/build
mkdir linux
cd linux
cp path/Makefile .
make
cp libdivxencore.so /usr/local/lib
ln -s /usr/local/lib/libdivxdecore.so /usr/local/lib/libdivxdecore.so.0
cp ../../src/encore.h /usr/local/include
</screen>
</para></step>
</procedure>
<para>
<application>MPlayer</application> autodetects DivX4/DivX5 if it is
properly installed, just compile as usual. If it does not detect it, you
did not install or configure it correctly.
</para>
</note>
</para>
</sect3>
<sect3 id="ffmpeg" xreflabel="FFmpeg DivX/libavcodec">
<title>FFmpeg DivX/libavcodec</title>
<para>
<ulink url="http://ffmpeg.sourceforge.net">FFmpeg</ulink> contains an
<emphasis role="bold">open source</emphasis> codec package, which is capable
of decoding streams encoded with H263/MJPEG/RV10/DivX3/DivX4/DivX5/MP41/MP42/WMV1/WMV2/HuffYUV
video, or WMA (Windows Media Audio) audio codecs. Not only some of them can be
encoded with, but it also offers higher speed than the Win32 codecs or the
DivX.com DivX4/5 library!
</para>
<para>
It contains a lot of nice codecs, especially important are the MPEG4 variants:
DivX3, DivX4, DivX5, Windows Media Video 7 (WMV1). Also a very interesting one
is the WMA decoder.
</para>
<para>
If you use an <application>MPlayer</application> release you have libavcodec
right in the package, just build as usual. If you use
<application>MPlayer</application> from CVS you have to extract libavcodec from
the FFmpeg CVS tree as FFmpeg releases <emphasis role="bold">don't</emphasis>
work with <application>MPlayer</application>. In order to achieve this do:
</para>
<procedure>
<step><para>
<screen>cvs -d:pserver:anonymous at cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg login</screen>
</para></step>
<step><para>
<screen>cvs -d:pserver:anonymous at cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg co ffmpeg</screen>
</para></step>
<step><para>
Move the <filename>libavcodec</filename> directory from the FFmpeg
sources to the root of the <application>MPlayer</application> CVS tree.
It should look like this:
<filename>main/libavcodec</filename>
</para><para>
Symlinking is <emphasis role="bold">not</emphasis> enough, you have to
copy/move it!
</para></step>
<step><para>
Compile. <filename>configure</filename> should detect problems before
compilation.
</para></step>
</procedure>
<note>
<para>
<application>MPlayer</application> from CVS does contain a
<filename>libavcodec</filename> subdirectory, but it does
<emphasis role="bold">not</emphasis> contain the source for libavcodec!
You must follow the steps above to obtain the source for this library.
</para>
</note>
<para>
With FFmpeg and my Matrox G400, I can view even the highest resolution DivX
movies without dropped frames on my K6/2 500.
</para>
</sect3>
<sect3 id="xanim">
<title>XAnim codecs</title>
<note>
<para>
Be advised that the XAnim binary codecs are packaged with a piece of text
claiming to be a legally binding software license which, besides other
restrictions, forbids the user to use the codecs in conjunction with any
program other than <application>XAnim</application>. However, the XAnim
author has yet to bring legal action against anyone for codec-related issues.
</para>
</note>
<formalpara>
<title>INSTALLATION AND USAGE</title>
<para>
<application>MPlayer</application> is capable of employing the XAnim codecs
for decoding. Follow the instructions to enable them:
</para>
</formalpara>
<procedure>
<step><para>
Download the codecs you wish to use from the
<ulink url="http://xanim.va.pubnix.com">XAnim site</ulink>.
The 3ivx codec is not there, but at the
<ulink url="http://www.3ivx.com">3ivx site</ulink>.
</para></step>
<step><para>
Use the <option>--with-xanimlibdir</option> option to tell
<filename>configure</filename> where
to find the XAnim codecs. By default, it looks for them at
<filename class="directory">/usr/local/lib/xanim/mods</filename>,
<filename class="directory">/usr/lib/xanim/mods</filename> and
<filename class="directory">/usr/lib/xanim</filename>.
Alternatively you can set the environment variable
<envar>XANIM_MOD_DIR</envar> to the directory of the XAnim codecs.
</para></step>
<step><para>
Rename/symlink the files, cutting out the architecture stuff, so they
will have filenames like these: <filename>vid_cvid.xa</filename>,
<filename>vid_h263.xa</filename>, <filename>vid_iv50.xa</filename>
</para></step>
</procedure>
<para>
XAnim is video codec family <systemitem>xanim</systemitem>, so you may want
to use the <option>-vfm xanim</option> option to tell <application>MPlayer</application>
to use them if possible.
</para>
<para>
Tested codecs include: <emphasis role="bold">Indeo 3.2, 4.1, 5.0, CVID, 3ivX,
h263.</emphasis>
</para>
</sect3>
<sect3 id="vivo-video">
<title>VIVO video</title>
<para>
<application>MPlayer</application> can play Vivo (1.0 and 2.0) videos. The
most suitable codec for 1.0 files is FFmpeg's H263 decoder, you can use it
with the <option>-vc ffh263</option> option. For 2.0 files, use the
Win32 DLL through the <option>-vc vivo</option> option. If you do not supply
command line options <application>MPlayer</application> selects the best codec
automatically.
</para>
</sect3>
<sect3 id="mpeg12">
<title>MPEG 1/2 video</title>
<para>
MPEG1 and MPEG2 are decoded by the multiplatform native <systemitem
class="library">libmpeg2</systemitem> library, whose source code is
included in <application>MPlayer</application>. We handle buggy MPEG 1/2
video files by catching <systemitem>Signal 11</systemitem>
(<systemitem>segmentation fault</systemitem>), and quickly
reinitializing the codec, continuing exactly from where the failure
occurred. This recovery technique has no measurable speed penalty.
</para>
</sect3>
<sect3 id="msvideo1">
<title>MS Video1</title>
<para>
This is a very old and very bad codec from Microsoft. In the past it was
decoded with the <filename>msvidc32.dll</filename> Win32 codec, now we have
our own open source implementation
(by <ulink url="mailto:melanson at pcisys.net">Mike Melanson</ulink>).
</para>
</sect3>
<sect3 id="cinepak-cvid">
<title>Cinepak CVID</title>
<para>
<application>MPlayer</application> uses its own open source, multiplatform
Cinepak decoder (by <ulink url="mailto:timf at csse.monash.edu.au">Dr. Tim Ferguson</ulink>)
by default. It supports YUV outputs, so that hardware
scaling is possible if the video output driver permits it.
</para>
</sect3>
<sect3 id="realvideo">
<title>RealVideo</title>
<para>
<application>MPlayer</application> supports decoding all versions of
RealVideo:
<itemizedlist>
<listitem><simpara>
RealVideo 1.0 (fourcc RV10) - en/decoding supported by
<systemitem class="library">libavcodec</systemitem>
</simpara></listitem>
<listitem><simpara>
RealVideo 2.0, 3.0, 4.0 (fourcc RV20, RV30, RV40) - decoding supported by
<emphasis role="bold">RealPlayer libraries</emphasis>
</simpara></listitem>
</itemizedlist>
</para>
<para>
It is recommended to download and install <application>RealPlayer8</application>
or <application>RealONE</application>, because <application>MPlayer</application>
can use their libraries to decode files with RealVideo 2.0 - 4.0 video. The
<application>MPlayer</application> <filename>configure</filename> script should
detect the <application>RealPlayer</application> libraries in the standard
locations of a full installation. If it does not, tell <filename>configure</filename>
where to look with the <option>--with-reallibdir</option> option.
</para>
<note><para>
<application>RealPlayer</application> libraries currently
<emphasis role="bold">only work with Linux, FreeBSD, NetBSD and Cygwin on the x86,
Alpha and PowerPC (Linux/Alpha and Linux/PowerPC have been tested) platforms</emphasis>.
</para></note>
</sect3>
<sect3 id="xvid">
<title>XViD</title>
<para>
<ulink url="http://www.xvid.org">XViD</ulink> is a forked development of the
OpenDivX codec. It happened when ProjectMayo changed OpenDivX to closed source
DivX4 (now DivX5), and the non-ProjectMayo people working on OpenDivX got angry,
then started XViD. So both projects have the same origin.
<itemizedlist>
<title>ADVANTAGES</title>
<listitem><simpara>
open source
</simpara></listitem>
<listitem><simpara>
its API is compatible with DivX4 so adding support for it is easy
</simpara></listitem>
<listitem><simpara>
2-pass encoding support
</simpara></listitem>
<listitem><simpara>
nice encoding quality, higher speed than DivX4 (you can optimize it for
your box while compiling)
</simpara></listitem>
</itemizedlist>
<itemizedlist>
<title>DISADVANTAGES</title>
<listitem><simpara>
currently it does not properly <emphasis role="bold">decode</emphasis> all
DivX/DivX4 files (no problem as <link linkend="ffmpeg">libavcodec</link>
can play them)
</simpara></listitem>
<listitem><simpara>
you have to choose between DivX4 <emphasis role="bold">or</emphasis> XViD
support at compiletime
</simpara></listitem>
<listitem><simpara>
under development
</simpara></listitem>
</itemizedlist>
</para>
<procedure>
<title>INSTALLING XVID CVS</title>
<para>
It is currently available only from CVS. Here are the download and
installation instructions:
</para>
<step><para>
<screen>cvs -z3 -d:pserver:anonymous at cvs.xvid.org:/xvid login</screen>
</para></step>
<step><para>
<screen>cvs -z3 -d:pserver:anonymous at cvs.xvid.org:/xvid co xvidcore</screen>
</para></step>
<step><para>
<screen>cd xvidcore/build/generic</screen>
</para></step>
<step><para>
Edit <filename>MakeFile</filename> for your architecture (probably
<filename>Makefile.linuxx86</filename>) to fit your needs.
</para></step>
<step><para>
<screen>make -f Makefile.linux</screen>
</para></step>
<step><para>
Copy <filename>divx4.h</filename> and <filename>xvid.h</filename> from
<filename class="directory">/usr/local/include/</filename>.
</para></step>
<step><para>
Get <filename>encore2.h</filename> and <filename>decore.h</filename> from
the DivX4Linux package, and copy them to
<filename class="directory">/usr/local/include/</filename>.
</para></step>
<step><para>
Recompile <application>MPlayer</application> with
<option>--with-xvidcore=<replaceable>/path/to/libxvidcore.a</replaceable></option>.
</para></step>
</procedure>
</sect3>
<sect3 id="sorenson">
<title>Sorenson</title>
<para>
Sorenson is a video codec developed by Sorenson Media and licensed to Apple who
distribute it with their <application>QuickTime Player</application>. We are
currently able to decode all version of Sorenson video files with the following
decoders.
</para>
<itemizedlist>
<listitem><simpara>
Sorenson 1 (fourcc <emphasis>SVQ1</emphasis>) - decoding supported by
<emphasis role="bold">native codecs</emphasis>. Actually there are two
(nearly equal) decoders for SVQ1: one is built in <application>MPlayer</application>,
the other in libavcodec. You can invoke each of them with the <option>-vc svq1</option>
and <option>-vc ffsvq1</option> options respectively. Some files may work
with one of them, and not with the other, so test both decoders. The decoder
was written (reverse engineered) by the <ulink url="http://www.xinehq.de">xine</ulink>
authors.
</simpara></listitem>
<listitem><simpara>
Sorenson 3 (fourcc <emphasis>SVQ3</emphasis>) - decoding supported by
<emphasis role="bold">Win32 QuickTime libraries</emphasis>
</simpara></listitem>
</itemizedlist>
<procedure>
<title>INSTALLING XVID CVS</title>
<note><para>currently only 32bit Intel platforms are supported.</para></note>
<step><para>download MPlayer CVS</para></step>
<step><para>compile MPlayer with:
<screen>$ ./configure --enable-qtx-codecs</screen>
</para></step>
<step><para>download QuickTime DLL pack from
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/"/>
</para></step>
<step><para>extract QuickTime DLL pack to your Win32 codecs directory
(default: <filename class="directory">/usr/lib/win32</filename>)
</para></step>
</procedure>
</sect3>
</sect2>
<!-- ********** -->
<sect2 id="audio-codecs">
<title>Audio codecs</title>
<itemizedlist>
<title>The most important audio codecs above all:</title>
<listitem><simpara>
MPEG layer 2 (MP2), and layer 3 (MP3) audio (<emphasis role="bold">native</emphasis>
code, with MMX/SSE/3DNow! optimization)
</simpara></listitem>
<listitem><simpara>
MPEG layer 1 audio (<emphasis role="bold">native</emphasis> code, with libavcodec)
</simpara></listitem>
<listitem><simpara>
Windows Media Audio v1, v2 (<emphasis role="bold">native</emphasis> code, with
libavcodec)
</simpara></listitem>
<listitem><simpara>
Windows Media Audio 9 (WMAv3) (using DMO DLL)
</simpara></listitem>
<listitem><simpara>
AC3 Dolby audio (<emphasis role="bold">native</emphasis> code, with
MMX/SSE/3DNow! optimization)
</simpara></listitem>
<listitem><simpara>
AC3 passing through soundcard hardware
</simpara></listitem>
<listitem><simpara>
Ogg Vorbis audio codec (<emphasis role="bold">native</emphasis> library)
</simpara></listitem>
<listitem><simpara>
RealAudio: DNET (low bitrate AC3), Cook, Sipro and ATRAC3
</simpara></listitem>
<listitem><simpara>
QuickTime: Qualcomm and QDesign audio codecs
</simpara></listitem>
<listitem><simpara>
VIVO audio (g723, Vivo Siren)
</simpara></listitem>
<listitem><simpara>
Voxware audio (using DirectShow DLL)
</simpara></listitem>
<listitem><simpara>
alaw and ulaw, various gsm, adpcm and pcm formats and other simple old
audio codecs
</simpara></listitem>
</itemizedlist>
<sect3 id="swac3">
<title>Software AC3 decoding</title>
<para>
This is the default decoder used for files with AC3 audio.
</para>
<para>
The AC3 decoder can create audio output mixes for 2, 4, or 6 speakers.
When configured for 6 speakers, this decoder provides separate output of
all the AC3 channels to the sound driver, allowing for full "surround
sound" experience without the external AC3 decoder required to use the
hwac3 codec.
</para>
<para>
Use the <option>-channels</option> option to select the number of output
channels. Use <option>-channels 2</option> for a stereo downmix. For a 4
channel downmix (Left Front, Right Front, Left Surround and Right Surround
outputs), use <option>-channels 4</option>. In this case, any center
channel will be mixed equally to the front channels. <option>-channels
6</option> will output all the AC3 channels as they are encoded - in the
order Left, Right, Left Surround, Right Surround, Center and LFE.
</para>
<para>
The default number of output channels is 2.
</para>
<para>
To use more than 2 output channels, you will need to use OSS, and have a
sound card that supports the appropriate number of output channels via the
SNDCTL_DSP_CHANNELS ioctl. An example of a suitable driver is emu10k1
(used by Soundblaster Live! cards) from August 2001 or newer (ALSA CVS is
also supposed to work).
</para>
</sect3>
<sect3 id="hwac3">
<title>Hardware AC3 decoding</title>
<para>
You need an AC3 capable sound card, with digital out (SP/DIF). The card's
driver must properly support the AFMT_AC3 format (C-Media does). Connect
your AC3 decoder to the SP/DIF output, and use the <option>-ac
hwac3</option> option. It is experimental but known to work with C-Media
cards and Soundblaster Live! + ALSA (but not OSS) drivers and DXR3/Hollywood+
MPEG decoder cards.
</para>
</sect3>
<sect3 id="libmad">
<title>libmad support</title>
<para>
<ulink url="http://mad.sourceforge.net">libmad</ulink> is a multiplatform
MPEG audio decoding library. It does not handle broken files well, and it
sometimes has problems with seeking.
</para>
<para>
To enable support, compile with the <option>--enable-mad</option> configure
option.
</para>
</sect3>
<sect3 id="vivo-audio">
<title>VIVO audio</title>
<para>
The audio codec used in VIVO files depends on whether it is a VIVO/1.0 or
VIVO/2.0 file. VIVO/1.0 files have <emphasis role="bold">g.723</emphasis> audio,
and VIVO/2.0 files have <emphasis role="bold">Vivo Siren</emphasis> audio. Both are
supported.
</para>
</sect3>
<sect3 id="realaudio">
<title>RealAudio</title>
<para>
<application>MPlayer</application> supports decoding nearly all versions of
RealAudio:
</para>
<itemizedlist>
<listitem><simpara>
RealAudio DNET - decoding supported by
<systemitem class="library">liba52</systemitem>
</simpara></listitem>
<listitem><simpara>
RealAudio Cook/Sipro/ATRAC3 - decoding supported by
<emphasis role="bold">RealPlayer libraries</emphasis>
</simpara></listitem>
</itemizedlist>
<para>
On how to install RealPlayer libraries, see the
<link linkend="realmedia">RealMedia file format</link> section.
</para>
</sect3>
<sect3 id="qdesign">
<title>QDesign codecs</title>
<para>
QDesign audio streams (fourcc:<emphasis>QDMC, QDM2</emphasis>) are found
in MOV/QT files. Both versions of this codec can be decoded with QuickTime
libraries. For installation instructions please see the
<link linkend="sorenson">Sorenson video codec</link> section.
</para>
</sect3>
<sect3 id="qualcomm">
<title>Qualcomm codecs</title>
<para>
Qualcomm audio streams (fourcc:<emphasis>Qclp</emphasis>) is found
in MOV/QT files. It can be decoded with QuickTime
libraries. For installation instructions please see the
<link linkend="sorenson">Sorenson video codec</link> section.
</para>
</sect3>
</sect2>
<!-- ********** -->
<sect2 id="win32-codecs">
<title>Win32 codecs importing HOWTO</title>
<!-- TODO: a short paragraph of text would be nice here... -->
<sect3 id="vfw-codecs">
<title>VFW codecs</title>
<para>
VFW (Video for Windows) is the old Video API for Windows. Its codecs have
the <filename>.DLL</filename> or (rarely) <filename>.DRV</filename>
extension. If <application>MPlayer</application> fails at playing your AVI
with this kind of message:
<screen>UNKNOWN video codec: HFYU (0x55594648)</screen>
</para>
<para>
It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU =
HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you
have to find out which DLL Windows loads in order to play this file. In our
case, the <filename>system.ini</filename> contains this information in a
line that reads:
<programlisting>VIDC.HFYU=huffyuv.dll</programlisting>
</para>
<para>
So you need the <filename>huffyuv.dll</filename> file. Note that the audio
codecs are specified by the MSACM prefix:
<programlisting>msacm.l3acm=L3codeca.acm</programlisting>
</para>
<para>
This is the MP3 codec. Now that you have all the necessary information
(fourcc, codec file, sample AVI), submit your codec support request by
mail, and upload these files to the FTP site:
<systemitem role="url">
ftp://ftp.mplayerhq.hu/MPlayer/incoming/[codecname]/
</systemitem>
</para>
<note><para>On Windows NT/2000/XP search for this info in the registry,
e.g. search for "VIDC.HFYU". To find out how to do this, look at
the old DirectShow method below.
</para></note>
</sect3>
<sect3 id="dshow-codecs">
<title>DirectShow codecs</title>
<para>
DirectShow is the newer Video API, which is even worse than its predecessor.
Things are harder with DirectShow, since
<itemizedlist>
<listitem><simpara>
<filename>system.ini</filename> does not contain the needed information,
instead it is stored in the registry and
</simpara></listitem>
<listitem><simpara>
we need the GUID of the codec.
</simpara></listitem>
</itemizedlist>
</para>
<procedure>
<title>New Method:</title>
<para>
Using <application>Microsoft GraphEdit</application> (fast)
</para>
<step><para>
Get <application>GraphEdit</application> from either DirectX SDK or
<ulink url="http://doom9.org">doom9</ulink>
</para></step>
<step><para>
Start <command>graphedit.exe</command>.
</para></step>
<step><para>
From the menu select Graph -> Insert Filters.
</para></step>
<step><para>
Expand item <systemitem>DirectShow Filters</systemitem>
</para></step>
<step><para>
Select the right codec name and expand item.
</para></step>
<step><para>
In the entry <systemitem>DisplayName</systemitem> look at the text in
winged brackets after the backslash and write it down (five dash-delimited
blocks, the GUID).
</para></step>
<step><para>
The codec binary is the file specified in the <systemitem>Filename</systemitem>
entry.
</para></step>
</procedure>
<note>
<para>
If there is no <systemitem>Filename</systemitem> and
<systemitem>DisplayName</systemitem> contains something like
<systemitem>device:dmo</systemitem>, then it is a DMO-Codec.
</para>
</note>
<procedure>
<title>Old Method:</title>
<para>
Take a deep breath and start searching the registry...
</para>
<step><para>
Start <command>regedit</command>.
</para></step>
<step><para>
Press <keycap>Ctrl</keycap>+<keycap>F</keycap>, disable the first two
checkboxes, and enable the third. Type in the fourcc of the codec (e.g.
<userinput>TM20</userinput>).
</para></step>
<step><para>
You should see a field which contains the path and the filename (e.g.
<filename>C:\WINDOWS\SYSTEM\TM20DEC.AX</filename>).
</para></step>
<step><para>
Now that you have the file, we need the GUID. Try searching again, but
now search for the codec's name, not the fourcc. Its name can be acquired
when Media Player is playing the file, by checking
<guimenu>File</guimenu> -> <guisubmenu>Properties</guisubmenu> ->
<guimenuitem>Advanced</guimenuitem>.
If not, you are out of luck. Try guessing (e.g. search for TrueMotion).
</para></step>
<step><para>
If the GUID is found you should see a <guilabel>FriendlyName</guilabel>
and a <guilabel>CLSID</guilabel> field. Write down the 16 byte CLSID,
this is the GUID we need.
</para></step>
</procedure>
<note>
<para>
If searching fails, try enabling all the checkboxes. You may have
false hits, but you may get lucky...
</para>
</note>
<para>
Now that you have all the necessary information (fourcc, GUID, codec file,
sample AVI), submit your codec support request by mail, and upload these files
to the FTP site:
<systemitem
role="url">ftp://ftp.mplayerhq.hu/MPlayer/incoming/[codecname]/
</systemitem>
</para>
</sect3>
</sect2>
</sect1>
--- NEW FILE ---
\FOT{3}\Seq%
{\def\PageNumberFormat%
{1}\def\PageNumberRestart%
{0}\def\PageTwoSide%
{0}\def\TwoSideStartOnRight%
{0}\def\PageNColumns%
{1}\def\PageColumnSep%
{36\p@}\def\PageBalanceColumns%
{0}\def\WritingMode%
{lefttoright}\def\InputWhitespaceTreatment%
{collapse}\def\LeftMargin%
{72\p@}\def\RightMargin%
{72\p@}\def\PageWidth%
{612\p@}\def\PageHeight%
{792\p@}\def\MinLeading%
{2\p@}\def\MinLeadingFactor%
{0}\def\TopMargin%
{72\p@}\def\BottomMargin%
{96\p@}\def\HeaderMargin%
[...70564 lines suppressed...]
{0\p@}\def\FirstLineStartIndentFactor%
{0}\def\Quadding%
{start}\def\Hyphenate%
{0}\def\Language%
{EN}\def\sbNom%
{5\p@}\def\sbMin%
{5\p@}\def\sbMax%
{5\p@}\def\sbConditional%
{1}\def\saNom%
{5\p@}\def\saMin%
{5\p@}\def\saMax%
{5\p@}\def\saConditional%
{1}}Please see \Node%
{\def\Element%
{6063}}\Seq%
{}\Seq%
{}\Seq%
{}this file\endSeq{}\Seq%
{} (../../tech/patches.txt)\endSeq{}\endSeq{}\endSeq{}\endNode{}.\endPar{}\endNode{}\endSeq{}\endSpS{}\endNode{}
\endSeq{}\endNode{}\endNode{}\endSeq{}\endFOT{}
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd"
[
<!ENTITY audio.xml SYSTEM "audio.xml">
<!ENTITY bugreports.xml SYSTEM "bugreports.xml">
<!ENTITY bugs.xml SYSTEM "bugs.xml">
<!ENTITY cd-dvd.xml SYSTEM "cd-dvd.xml">
<!ENTITY codecs.xml SYSTEM "codecs.xml">
<!ENTITY edl.xml SYSTEM "edl.xml">
<!ENTITY faq.xml SYSTEM "faq.xml">
<!ENTITY features.xml SYSTEM "features.xml">
<!ENTITY formats.xml SYSTEM "formats.xml">
<!ENTITY history.xml SYSTEM "history.xml">
<!ENTITY install.xml SYSTEM "install.xml">
<!ENTITY mail-lists.xml SYSTEM "mail-lists.xml">
<!ENTITY mencoder.xml SYSTEM "mencoder.xml">
<!ENTITY patches.xml SYSTEM "patches.xml">
<!ENTITY ports.xml SYSTEM "ports.xml">
<!ENTITY skin.xml SYSTEM "skin.xml">
<!ENTITY tvinput.xml SYSTEM "tvinput.xml">
<!ENTITY usage.xml SYSTEM "usage.xml">
<!ENTITY users-vs-dev.xml SYSTEM "users-vs-dev.xml">
<!ENTITY video-filters.xml SYSTEM "video-filters.xml">
<!ENTITY video.xml SYSTEM "video.xml">
]>
<book lang="en">
<bookinfo id="toc">
<title>MPlayer - The Movie Player for LINUX</title>
<subtitle><ulink url="http://www.mplayerhq.hu"></ulink></subtitle>
<date>July 4, 2002</date>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Arpad Gereoffy (A'rpi/ESP-team)</holder>
</copyright>
<!--
<legalnotice>
<title>License</title>
<para>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.</para>
<para>This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.</para>
<para>You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA.</para>
</legalnotice>
-->
</bookinfo>
<preface id="howtoread">
<title>How to read this documentation</title>
<para>
If you are a first-time installer: be sure to read everything from here to
the end of the Installation section, and follow the links you will find. If
you have any other questions, return to the <link linkend="toc">Table of
Contents</link> and search for the topic, read the <xref linkend="faq"/>,
or try grepping through the files.
</para>
<para>
The main rule of this documentation: if it's not documented, it
<emphasis>does not exist.</emphasis> If I don't say you encode audio from
TV tuner, you can't. A healthy quantity of combining ability is welcomed,
though. Good luck. You'll need it :) And for another good advice, let me
quote Chris Phillips from the mplayer-users mailing list:
</para>
<blockquote><para>
I said a while ago that there is such a difference between a newbie and a
dumbass. No matter what you actually know about a system (linux, cars,
girls :D) you should ALWAYS be able to take a step back and be objective,
otherwise, you're just dumb IMHO. A girl i live with assumed the vacuum
cleaner was broken because it didn't suck things up. never thought to
change the bag, becasue she'd never done it before... now that's just
stupid, not a case of simply not knowing what to do... Simply not being
that familiar with your surroundings is no excuse for a) laziness and b)
ignorance. So many people seem to see the word "error" and then stop...
few seem to actually read the words on the OTHER side of the colon.
</para></blockquote>
</preface>
<chapter id="intro">
<title>Introduction</title>
<para>
<application>MPlayer</application> is a movie player for Linux (runs on
many other Unices, and <emphasis role="bold">non-x86</emphasis> CPUs, see
<xref linkend="ports"/>). It plays most MPEG, VOB, AVI, OGG/OGM, VIVO, ASF/WMA/WMV,
QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA files, supported by
many native, XAnim, RealPlayer, and Win32 DLL codecs. You can watch
<emphasis role="bold">VideoCD, SVCD, DVD, 3ivx, RealMedia</emphasis>, and
<emphasis role="bold">DivX</emphasis> movies too (and you don't need the avifile
library at all!). Another big feature of mplayer is the wide range of
supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib,
fbdev, AAlib, DirectFB, but you can use GGI and SDL (and this way all their
drivers) and some lowlevel card-specific drivers (for Matrox, 3Dfx and
Radeon, Mach64, Permedia3) too! Most of them supports software or hardware
scaling, so you can enjoy movies in fullscreen.
<application>MPlayer</application> supports displaying through some
hardware MPEG decoder boards, such as the DVB and DXR3/Hollywood+ ! And
what about the nice big antialiased shaded subtitles
(<emphasis role="bold">10 supported types</emphasis>) with European/ISO 8859-1,2
(Hungarian, English, Czech, etc), Cyrillic, Korean fonts, and the onscreen display
(OSD)?
</para>
<para>
The player is rock solid playing damaged MPEG files (useful for some VCDs),
and it plays bad AVI files which are unplayable with the famous windows
media player. Even AVI files without index chunk are playable, and you can
temporarily rebuild their indexes with the <option>-idx</option> option, or
permanently with <application>MEncoder</application>, thus enabling
seeking! As you see, stability and quality are the most important things,
but the speed is also amazing.
</para>
<para>
<application>MEncoder</application> (MPlayer's Movie Encoder) is a simple movie
encoder, designed to encode MPlayer-playable movies
(<emphasis role="bold">AVI/ASF/OGG/DVD/VCD/VOB/MPG/MOV/VIV/FLI/RM/NUV/NET/PVA</emphasis>)
to other MPlayer-playable formats (see below). It can encode with various codecs,
like DivX4 (1 or 2 passes), libavcodec, <emphasis role="bold">PCM/MP3/VBR MP3</emphasis>
audio. Also has powerful plugin system for video manipulation.
</para>
<itemizedlist>
<title>MEncoder features</title>
<listitem><simpara>
Encoding from the wide range of fileformats and decoders of
<application>MPlayer</application>
</simpara></listitem>
<listitem><simpara>
Encoding to all the codecs of ffmpeg's <link
linkend="ffmpeg">libavcodec</link>
</simpara></listitem>
<listitem><simpara>
Video encoding from <emphasis role="bold">V4L compatible TV tuners</emphasis>
</simpara></listitem>
<listitem><simpara>
Encoding/multiplexing to interleaved AVI files with proper index
</simpara></listitem>
<listitem><simpara>
Creating files from external audio stream
</simpara></listitem>
<listitem><simpara>
1, 2 or 3 pass encoding
</simpara></listitem>
<listitem><para>
<emphasis role="bold">VBR</emphasis> MP3 audio
<important><simpara>
VBR MP3 audio doesn't always play nicely on windows players!
</simpara></important>
</para></listitem>
<listitem><simpara>
PCM audio
</simpara></listitem>
<listitem><simpara>
Stream copying
</simpara></listitem>
<listitem><simpara>
Input A/V synchronizing (PTS-based, can be disabled with
<option>-mc 0</option> option)
</simpara></listitem>
<listitem><simpara>
FPS correction with <option>-ofps</option> option (useful when encoding
29.97 fps VOB to 24 fps AVI)
</simpara></listitem>
<listitem><simpara>
Using our very powerful plugin system (crop, expand, flip, postprocess,
rotate, scale, rgb/yuv conversion)
</simpara></listitem>
<listitem><simpara>
Can encode DVD/VOBsub <emphasis role="bold">AND</emphasis> text subtitles
into the output file
</simpara></listitem>
<listitem><simpara>
Can rip DVD subtitles to Vobsub format
</simpara></listitem>
</itemizedlist>
<itemizedlist>
<title>Planned features</title>
<listitem><simpara>
Even wider variety of available en/decoding formats/codecs
(creating VOB files with DivX4/Indeo5/VIVO streams :).
</simpara></listitem>
</itemizedlist>
<!-- FIXME: the license should be in bookinfo -->
<para>
<application>MPlayer</application> and <application>MEncoder</application>
can be distributed under the terms of the GNU General Public License Version 2.
</para>
&history.xml;
&install.xml;
</chapter>
&features.xml;
&usage.xml;
&faq.xml;
&cd-dvd.xml;
&ports.xml;
&mencoder.xml;
&mail-lists.xml;
&bugreports.xml;
&bugs.xml;
&skin.xml;
&users-vs-dev.xml;
&patches.xml;
</book>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="edl" xreflabel="TV input">
<title>Edit Decision Lists (EDL)</title>
<para>
The edit decision list (EDL) system allows you to automatically skip
or mute sections of videos during playback, based on a movie specific
EDL configuration file.
</para>
<para>
This is useful for those who may want to watch a film in "family-friendly"
mode. You can cut out any violence, profanity, Jar-Jar Binks .. from a movie
according to your own personal preferences. Aside from this, there are other
uses, like automatically skipping over commercials in video files you watch.
</para>
<para>
The EDL file format is pretty bare-bones. Once the EDL system has reached a
certain level of maturity, an XML-based file format will probably be implemented
(keeping backwards compatibility with previous EDL formats).
</para>
<para>
The maximum number of EDL entries for the current incarnation of EDL is 1000.
If you happen to need more, change the <systemitem>#define MAX_EDL_ENTRIES</systemitem>
in the <filename>edl.h</filename> file.
</para>
<sect2 id="edl_using">
<title>Using an EDL file</title>
<para>
Include the <option>-edl <filename></option> flag when you run
<application>MPlayer</application>, with the name of the EDL file you
want applied to the video.
</para>
</sect2>
<sect2 id="edl_making">
<title>Making an EDL file</title>
<para>
The current EDL file format is:
<programlisting>
[begin second] [end second] [action]
</programlisting>
Where the seconds are floating-point numbers and the action is either
<literal>0</literal> for skip or <literal>1</literal> for mute. Example:
<programlisting>
5.3 7.1 0
15 16.7 1
420 422 0
</programlisting>
This will skip from second 5.3 to second 7.1 of the video, then mute at
15 seconds, unmute at 16.7 seconds and skip from second 420 to second 422
of the video. These actions will be performed when the playback timer
reaches the times given in the file.
</para>
<para>
To create an EDL file to work from, use the <option>-edlout <filename></option>
flag. During playback, when you want to mark the previous two seconds to skip over,
hit <keycap>i</keycap>. A corresponding entry will be written to the file for
that time. You can then go back and fine-tune the generated EDL file.
</para>
</sect2>
</sect1>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<chapter id="faq" xreflabel="FAQ">
<title>Frequently Asked Questions</title>
<qandaset defaultlabel="number">
<qandadiv id="faq-compilation">
<title>Compilation</title>
<qandaentry>
<question><para>
Compilation stops with an error message similar to this one:
<screen>
In file included from mplayer.c:34:
mw.h: In function `mplMainDraw':
mw.h:209: Internal compiler error in print_rtl_and_abort, at flow.c:6458
Please submit a full bug report,
with preprocessed source if appropriate.
</screen>
</para></question>
[...1067 lines suppressed...]
<question><para>
I'm trying to work with 2GB+ files on a VFAT file system. Does it work?
</para></question>
<answer><para>
No, VFAT doesn't support 2GB+ files.
</para></answer>
</qandaentry>
<qandaentry>
<question><para>
Why is the recommended bitrate printed by MEncoder negative?
</para></question>
<answer><para>
Because the bitrate you encoded the audio with is too large to fit the
movie on any CD. Check if you have libmp3lame installed properly.
</para></answer>
</qandaentry>
</qandadiv>
</qandaset>
</chapter>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<chapter id="features">
<title>Features</title>
&formats.xml;
&codecs.xml;
<sect1 id="devices">
<title>Output devices</title>
&video.xml;
&audio.xml;
</sect1>
&tvinput.xml;
&edl.xml;
</chapter>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="formats">
<title>Supported formats</title>
<para>
It is important to clarify a common mistake. When people see a file with a
<filename>.AVI</filename> extension, they immediately conclude that it is
not an MPEG file. That is not true. At least not entirely. Contrary to
popular belief such a file <emphasis>can</emphasis> contain MPEG1 video.
</para>
<para>
You see, a <emphasis role="bold">codec</emphasis> is not the same as a
<emphasis role="bold">file format</emphasis>.
Examples of video <emphasis role="bold">codecs</emphasis> are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.
Examples of file <emphasis role="bold">formats</emphasis> are: MPG, AVI, ASF.
</para>
<para>
In theory, you can put an OpenDivX video and MP3 audio
into an <emphasis role="bold">MPG format file</emphasis>. However, most
players will not play it, since they expect MPEG1 video and MP2 audio (unlike
<emphasis role="bold">AVI</emphasis>, <emphasis role="bold">MPG</emphasis>
does not have the necessary fields to describe its video and audio streams).
Or you might put MPEG1 video into an AVI file.
<ulink url="http://ffmpeg.sourceforge.net/">FFmpeg</ulink> and
<link linkend="mencoder">MEncoder</link> can create these files.
</para>
<sect2 id="video-formats">
<title>Video formats</title>
<sect3 id="mpg-vob-dat">
<title>MPEG files</title>
<para>
MPEG files come in different guises:
</para>
<itemizedlist>
<listitem><simpara>
MPG: This is the most <emphasis role="bold">basic</emphasis> form of the
MPEG file formats. It contains MPEG1 video, and MP2 (MPEG-1 layer 2) or
rarely MP1 audio.
</simpara></listitem>
<listitem><simpara>
DAT: This is the very same format as MPG with a different extension. It
is used on <emphasis role="bold">Video CDs</emphasis>. Due to the way VCDs
are created and Linux is designed, the DAT files cannot be played nor copied
from VCDs as regular files. You have to use the <option>-vcd</option> option
to play the Video CD.
</simpara></listitem>
<listitem><simpara>
VOB: This is the MPEG file format on <emphasis role="bold">DVDs</emphasis>.
It is the same as MPG, plus the capability to contain subtitles or non-MPEG
(AC3) audio. It contains encoded MPEG2 video and usually AC3 audio, but DTS,
MP2 and uncompressed LPCM are allowed, too. Read the
<link linkend="dvd">DVD section</link>!
</simpara></listitem>
</itemizedlist>
<para>
Series of frames form independent groups in MPEG files. This means that you
can cut/join an MPEG file with standard file tools (like
<command>dd</command>, <command>cut</command>), and it remains completely
functional.
</para>
<para>
One important feature of MPGs is that they have a field to describe the
aspect ratio of the video stream within. For example SVCDs have 480x480
resolution video, and in the header that field is set to 4:3, so that it is
played at 640x480. AVI files do not have this field, so they have to be
rescaled during encoding or played with the <option>-aspect</option>
option.
</para>
</sect3>
<sect3 id="avi">
<title>AVI files</title>
<para>
Designed by Microsoft, <emphasis role="bold">AVI (Audio Video Interleaved)</emphasis>
is a widespread multipurpose format currently used mostly for DivX and DivX4
video. It has many known drawbacks and shortcomings (for example in streaming). It
supports one video stream and 0 to 99 audio streams and can be as big as
2GB. There exists an extension allowing bigger files called OpenDML. Microsoft
currently strongly discourages its use and encourages ASF/WMV. Not that
anybody cares.
</para>
<para>
There is a hack that allows AVI files to contain an Ogg Vorbis audio
stream, but makes them incompatible with standard AVI.
<application>MPlayer</application> supports playing these files. Seeking is
also implemented but severely hampered by badly encoded files with
confusing headers. Unfortunately the only encoder currently capable of
creating these files, <application>NanDub</application>, has this problem.
</para>
<note>
<para>
DV cameras create raw DV streams that DV grabbing utilities convert to two
different types of AVI files. The AVI will then contain either separate
audio and video streams that <application>MPlayer</application> can play or
the raw DV stream for which support is under development.
</para>
</note>
<para>
There are two kinds of AVI files:
<itemizedlist>
<listitem><simpara>
<emphasis role="bold">Interleaved:</emphasis> Audio and video content is
interleaved. This is the standard usage. Recommended and mostly used. Some tools
create interleaved AVIs with bad sync. <application>MPlayer</application>
detects these as interleaved, and this climaxes in loss of A/V sync,
probably at seeking. These files should be played as non-interleaved
(with the <option>-ni</option> option).
</simpara></listitem>
<listitem><simpara>
<emphasis role="bold">Non-interleaved:</emphasis> First comes the whole
video stream, then the whole audio stream. It thus needs a lot of seeking,
making playing from network or CD-ROM difficult.
</simpara></listitem>
</itemizedlist>
</para>
<para>
<application>MPlayer</application> supports two kinds of timings for AVI
files:
<itemizedlist>
<listitem><simpara>
<emphasis role="bold">bps-based:</emphasis> It is based on the
bitrate/samplerate of the video/audio stream. This method is used by
most players, including <ulink url="http://avifile.sourceforge.net">avifile</ulink>
and <application>Windows Media Player</application>. Files with broken
headers, and files created with VBR audio but not VBR-compliant encoder
will result in A/V desync with this method (mostly at seeking).
</simpara></listitem>
<listitem><simpara>
<emphasis role="bold">interleaving-based:</emphasis> It does not use the bitrate
value of the header, instead it uses the relative position of interleaved
audio and video chunks, making badly encoded files with VBR audio playable.
</simpara></listitem>
</itemizedlist>
</para>
<para>
Any audio and video codec is allowed, but note that VBR audio is not well
supported by most players. The file format makes it possible to use VBR
audio, but most players expect CBR audio, thus they fail with VBR. VBR is
uncommon and Microsoft's AVI specs only describe CBR audio. I also noticed
that most AVI encoders/multiplexers create bad files when using VBR audio.
There are only two known exceptions:
<application>NanDub</application> and <link linkend="mencoder">MEncoder</link>.
</para>
</sect3>
<sect3 id="asf-wmv">
<title>ASF/WMV files</title>
<para>
ASF (Active Streaming Format) comes from Microsoft. They developed two
variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (<application>Windows
Media Player</application> and <application>Windows Media Encoder</application>)
and is very secret. v2.0 is published and patented :). Of course they differ,
there is no compatibility at all (it is just another legal game).
<application>MPlayer</application> supports only v1.0, as nobody has ever seen
v2.0 files :). Note that ASF files nowadays come with the extension
<filename>.WMA</filename> or <filename>.WMV</filename>.
</para>
</sect3>
<sect3 id="qt-mov">
<title>QuickTime/MOV files</title>
<para>
These formats were designed by Apple and can contain any codec, CBR or VBR.
They usually have a <filename>.QT</filename> or <filename>.MOV</filename>
extension. Note that since the MPEG4 group chose QuickTime as the recommended
file format for MPEG4, their MOV files come with a <filename>.MPG</filename> or
<filename>.MP4</filename> extension (Interestingly the video and audio
streams in these files are real MPG and AAC files. Yo can even extract them with the
<option>-dumpvideo</option> and <option>-dumpaudio</option> options.).
</para>
<note>
<para>
Most new QuickTime files use <emphasis role="bold">Sorenson</emphasis> video and
QDesign Music audio. See our <link linkend="sorenson">Sorenson</link> codec section.
</para>
</note>
</sect3>
<sect3 id="vivo">
<title>VIVO files</title>
<para>
<application>MPlayer</application> happily demuxes VIVO file formats. The
biggest disadvantage of the format is that it has no index block, nor a
fixed packet size or sync bytes and most files lack even keyframes, so
forget seeking!
</para>
<para>
The video codec of VIVO/1.0 files is standard <emphasis role="bold">h.263</emphasis>.
The video codec of VIVO/2.0 files is a modified, nonstandard
<emphasis role="bold">h.263v2</emphasis>. The audio is the same, it may be
<emphasis role="bold">g.723 (standard)</emphasis>, or
<emphasis role="bold">Vivo Siren</emphasis>.
</para>
<para>
See the
<link linkend="vivo-video">VIVO video codec</link> and
<link linkend="vivo-audio">VIVO audio codec</link>
sections for installation instructions.
</para>
</sect3>
<sect3 id="fli">
<title>FLI files</title>
<para>
<emphasis role="bold">FLI</emphasis> is a very old file format used by
Autodesk Animator, but it is a common file format for short animations on the net.
<application>MPlayer</application> demuxes and decodes FLI movies and is
even able to seek within them (useful when looping with the
<option>-loop</option> option). FLI files do not have keyframes, so the
picture will be messy for a short time after seeking.
</para>
</sect3>
<sect3 id="realmedia">
<title>RealMedia (RM) files</title>
<para>
Yes, <application>MPlayer</application> can read (demux) RealMedia
(<filename>.rm</filename>) files. Seeking works, but you have to explicitly
specify the <option>-forceidx</option> option (the format supports
keyframes). Here are the lists of the supported <link
linkend="realvideo">RealVideo</link> and <link
linkend="realaudio">RealAudio</link> codecs.
</para>
</sect3>
<sect3 id="nuppelvideo">
<title>NuppelVideo files</title>
<para>
<ulink url="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</ulink>
is a TV grabber tool (AFAIK:). <application>MPlayer</application> can read
its <filename>.NUV</filename> files (only NuppelVideo 5.0). Those files can
contain uncompressed YV12, YV12+RTJpeg compressed, YV12 RTJpeg+lzo
compressed, and YV12+lzo compressed frames.
<application>MPlayer</application> decodes (and also <emphasis role="bold">encodes</emphasis>
them with <application>MEncoder</application> to DivX/etc!) them all. Seeking works.
</para>
</sect3>
<sect3 id="yuv4mpeg">
<title>yuv4mpeg files</title>
<para>
<ulink url="http://mjpeg.sourceforge.net">yuv4mpeg / yuv4mpeg2</ulink>
is a file format used by the
<ulink url="http://mjpeg.sf.net">mjpegtools programs</ulink>.
You can grab, produce, filter or encode video in this format using these tools.
The file format is really a sequence of uncompressed YUV 4:2:0 images.
</para>
</sect3>
<sect3 id="film">
<title>FILM files</title>
<para>
This format is used on old Sega Saturn CD-ROM games.
</para>
</sect3>
<sect3 id="roq">
<title>RoQ files</title>
<para>
RoQ files are multimedia files used in some ID games such as Quake III and
Return to Castle Wolfenstein.
</para>
</sect3>
<sect3 id="ogg">
<title>OGG/OGM files</title>
<para>
This is a new fileformat from <ulink url="http://www.xiph.org">Xiphophorus</ulink>.
It can contain any video or audio codec, CBR or VBR. You'll need
<systemitem class="library">libogg</systemitem> and
<systemitem class="library">libvorbis</systemitem> installed before
compiling <application>MPlayer</application> to be able to play it.
</para>
</sect3>
<sect3 id="sdp">
<title>SDP files</title>
<para>
<ulink url="ftp://ftp.rfc-editor.org/in-notes/rfc2327.txt">SDP</ulink> is an
IETF standard format for describing video and/or audio RTP streams.
(The "<ulink url="http://www.live.com/mplayer/">LIVE.COM Streaming Media</ulink>"
are required.)
</para>
</sect3>
<sect3 id="pva">
<title>PVA files</title>
<para>
PVA is an MPEG-like format used by DVB TV boards' software (e.g.:
<application>MultiDec</application>, <application>WinTV</application> under Windows.
</para>
<para>
The PVA specifications can be downloaded from the following address:
<ulink url="http://www.technotrend.de/download/av_format_v1.pdf"/>
</para>
</sect3>
<sect3 id="gif">
<title>GIF files</title>
<para>
The <emphasis role="bold">GIF</emphasis> format is a common format for web
graphics. There are two versions of the GIF spec, GIF87a and GIF89a. The
main difference is that GIF89a allows for animation. MPlayer supports both
formats through use of <systemitem class="library">libungif</systemitem> or
another libgif-compatible library. Non-animated GIFs will be displayed as
single frame videos. (Use the <option>-loop</option> and <option>-fixed-vo</option>
options to display these longer.)
</para>
<para>
<application>MPlayer</application> currently does not support seeking in GIF
files. GIF files do not necessarily have a fixed frame size, nor a fixed
framerate. Rather, each frame is of independent size and is supposed to be
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
frame's delay in centiseconds.
</para>
<para>
Standard GIF files contain 24-bit RGB frames with at most an 8-bit indexed
pallete. These frames are usually LZW-compressed, although some GIF encoders
produce uncompressed frames to avoid patent issues with LZW compression.
</para>
<para>
If your distribution does not come with <systemitem class="library">libungif</systemitem>,
download a copy from the
<ulink url="http://prtr-13.ucsc.edu/~badger/software/libungif/index.shtml">libungif
homepage</ulink>. For detailed technical information, have a look at the
<ulink url="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF89a specification</ulink>.
</para>
</sect3>
</sect2>
<!-- ********** -->
<sect2 id="audio-formats">
<title>Audio formats</title>
<para>
<application>MPlayer</application> is a <emphasis role="bold">movie</emphasis>
and not a <emphasis role="bold">media</emphasis> player, although it can play
some audio file formats (they are listed in the sections below). This is not
a recommended usage of <application>MPlayer</application>, you better use <ulink
url="http://www.xmms.org">XMMS</ulink>.
</para>
<sect3 id="mp3">
<title>MP3 files</title>
<para>
You may have problems playing certain MP3 files that
<application>MPlayer</application> will misdetect as MPEGs and play
incorrectly or not at all. This cannot be fixed without dropping support
for certain broken MPEG files and thus will remain like this for the
foreseeable future. The <option>-demuxer</option> flag described in the
manpage may help you in these cases.
</para>
</sect3>
<sect3 id="wav">
<title>WAV files</title>
<para>
</para>
</sect3>
<sect3 id="ogg-vorbis">
<title>OGG/OGM files (Vorbis)</title>
<para>
Requires properly installed
<systemitem class="library">libogg</systemitem> and
<systemitem class="library">libvorbis</systemitem>.
</para>
</sect3>
<sect3 id="wma-asf">
<title>WMA/ASF files</title>
<para>
</para>
</sect3>
<sect3 id="mp4">
<title>MP4 files</title>
<para></para>
</sect3>
<sect3 id="cdda">
<title>CD audio</title>
<para>
<application>MPlayer</application> can use <application>cdparanoia</application>
to play CDDA (Audio CD). The scope of this section does not contain enumerating
<application>cdparanoia</application>'s features.
</para>
<para>
See the man page's <option>-cdda</option> option which can be used to pass
options to <application>cdparanoia</application>.
</para>
</sect3>
<sect3 id="xmms">
<title>XMMS</title>
<para>
<application>MPlayer</application> can use <application>XMMS</application> input
plugins to play many file formats. There are plugins for SNES game tunes, SID
tunes (from Commodore 64), many Amiga formats, .xm, .it, VQF, musepack, Bonk,
shorten and many others. You can find them at the
<ulink url="http://www.xmms.org/plugins_input.html">XMMS input plugin page</ulink>.
</para>
<para>
For this feature you need to have <application>XMMS</application> and compile
<application>MPlayer</application> with <filename>./configure --enable-xmms</filename>.
If that does not work, you might need to set the <application>XMMS</application>
plugin and library path explicitly by way of the <option>--with-xmmsplugindir</option>
and <option>--withxmmslibdir</option> options.
</para>
</sect3>
</sect2>
</sect1>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- FIXME: history really should be in the appendix -->
<sect1 id="history">
<title>History</title>
<para>
This began a year ago... I (A'rpi) have tried lots of players under linux
(mtv, xmps, dvdview, livid/oms, videolan, xine, xanim, avifile, xmmp) but
they all have some problem. Mostly with special files or with audio/video
sync. Most of them is unable to play both MPEG1, MPEG2 and AVI (DivX)
files. Many players have image quality or speed problems too. So I've
decided to write/modify one...
<itemizedlist>
<listitem><para>
<emphasis role="bold">mpg12play v0.1-v0.3</emphasis>: Sep 22-25, 2000
</para>
<para>The first try, hacked together in a half hour! I've used libmpeg3
from <ulink url="http://www.heroinewarrior.com"/> up to the version 0.3, but
there were image quality and speed problems with it.
</para></listitem>
<listitem><para>
<emphasis role="bold">mpg12play v0.5-v0.87</emphasis>: Sep 28-Oct 20, 2000
</para><para>Mpeg codec replaced with DVDview by Dirk Farin, it was a
great stuff, but it was slow and was written in C++ (I hate C++!!!)
</para></listitem>
<listitem><para>
<emphasis role="bold">mpg12play v0.9-v0.95pre5</emphasis>: Oct 21-Nov 2, 2000
</para><para>Mpeg codec was libmpeg2 (mpeg2dec) by Aaron Holtzman and
Michel Lespinasse. It's great, optimized very fast C code with perfect
image quality and 100% MPEG standard conformance.
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer v0.3-v0.9</emphasis>: Nov 18-Dec 4, 2000
</para><para>It was a pack of two programs: mpg12play v0.95pre6 and my
new simple AVI player 'avip' based on avifile's Win32 DLL loader.
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer v0.10</emphasis>: Jan 1, 2001
</para><para>The MPEG and AVI player in a single binary!
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer v0.11pre series</emphasis>:
</para><para>Some new developers joined and from 0.11 the mplayer project
is a team-work! Added ASF file support, and OpenDivX
(see <ulink url="http://www.projectmayo.com"/>) en/decoding.
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer v0.17a "The IdegCounter"</emphasis> Apr 27, 2001
</para><para>The release version of the 0.11pre after 4 months of heavy
development! Try it, and be amazed! Thousands of new features added...
and of course old code was improved too, bugs removed etc.
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer 0.18 "The BugCounter"</emphasis> Jul 9, 2001
</para><para>2 months since 0.17 and here's a new release.. Completed ASF
support, more subtitle formats, introduced libao (similar to libvo but to
audio), even more stable than ever, and so on. It's a MUST!
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer 0.50 "The Faszom(C)ounter"</emphasis> Oct 8, 2001
</para><para>Hmm. Release again. Tons of new features, beta GUI version,
bugs fixed, new vo and ao drivers, ported to many systems, including
opensource DivX codecs and much more. Try it!
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer 0.60 "The RTFMCounter"</emphasis> Jan 3, 2002
</para><para>MOV/VIVO/RM/FLI/NUV fileformats support, native CRAM, Cinepak,
ADPCM codecs, and support for XAnim's binary codecs; DVD subtitles support,
first release of MEncoder, TV grabbing, cache, liba52, countless fixes.
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer 0.90pre10 "The BirthdayCounter"</emphasis> Nov 11, 2002
</para><para> Although this is not a release, I am going to mention it because it
came out 2 years after MPlayer v0.01. Happy birthday, MPlayer!
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer 0.90rc1 "The CodecCounter"</emphasis> Dec 7, 2002
</para><para>Again not a release, but after adding Sorenson 3 (QuickTime)
and Windows Media 9 support, MPlayer is the world's first movie player with
support for all known video formats!
</para></listitem>
<listitem><para>
<emphasis role="bold">MPlayer 0.90 "?"</emphasis> Date yet unknown
</para></listitem>
</itemizedlist>
</para>
</sect1>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="install">
<title>Installation</title>
<para>
In this section I'll try to guide you through the compiling and configuring
process of <application>MPlayer</application>. It's not easy, but it won't
necessarily be hard. If you experience a different behavior than what I
explain, please search through this documentation and you'll find your
answers. If you see links, please follow them and read carefully what they
contain. It will take some time, but it DOES worth it.
</para>
<para>
You need a fairly recent system. On Linux, 2.4.x kernels are recommended.
</para>
<sect2 id="softreq">
<title>Software requirements</title>
<itemizedlist>
<listitem><para>
<emphasis role="bold">binutils</emphasis> - suggested version is <emphasis role="bold">2.11.x</emphasis>.
This program is responsible for generating MMX/ 3DNow!/etc instructions,
thus very important.
</para></listitem>
<listitem><para>
<emphasis role="bold">gcc</emphasis> - suggested versions are: <emphasis role="bold">2.95.3</emphasis>
(maybe <emphasis role="bold">2.95.4</emphasis>) and <emphasis role="bold">3.2+</emphasis>.
<emphasis role="bold">Never</emphasis> use 2.96 or 3.0.x! They generate faulty code for
<application>MPlayer</application>. If you decide to change gcc from
2.96, then don't decide in favor of 3.0.x just because it's newer! Early
releases of 3.0.x were even more buggy than 2.96. So downgrade to 2.95.x
(downgrade <systemitem class="library">libstdc++</systemitem> too, other
programs may need it) or don't up/downgrade at all (but in this case, be
prepared for runtime problems). If you vote for 3.x.x, try to use the
latest version, early releases had various bugs, so be sure you use at
least 3.1, it's tested and working. For detailed information about gcc 2.96's
bugs (that are still NOT fixed, they have been WORKED AROUND in
<application>MPlayer</application>!),see the <link linkend="gcc-296">gcc 2.96</link>
section and the <xref linkend="faq"/>.
</para></listitem>
<listitem><para>
<emphasis role="bold">XFree86</emphasis> - suggested version is <emphasis role="bold">always the
newest</emphasis> (4.2.1). Normally, everyone wants this, as starting
with XFree86 4.0.2, it contains the <link linkend="xv">XVideo</link>
extension (somewhere referred to as <emphasis role="bold">Xv</emphasis>)
which is needed to enable the hardware YUV acceleration (fast image display)
on cards that support it.
Make sure its <emphasis role="bold">development package</emphasis> is installed,
too, otherwise it won't work.
For some video cards you don't need XFree86. See list below.
</para></listitem>
<listitem><para>
<emphasis role="bold">make</emphasis> - suggested version is
<emphasis role="bold">always the newest</emphasis> (at least 3.79.x). This
usually isn't important.
</para></listitem>
<listitem><para>
<emphasis role="bold">SDL</emphasis> - it's not mandatory, but can help in
some cases (bad audio, video cards that lag strangely with the xv driver).
Always use the newest (beginning from 1.2.x).
</para></listitem>
<listitem><para>
<emphasis role="bold">libjpeg</emphasis> - optional JPEG decoder, used by the <option>-mf</option>
option and some QT MOV files. Useful for both MPlayer and MEncoder if
you plan to work with jpeg files.
</para></listitem>
<listitem><para>
<emphasis role="bold">libpng</emphasis> - recommended and default (M)PNG decoder. Required for GUI.
Useful for both <application>MPlayer</application> and
<application>MEncoder</application>.
</para></listitem>
<listitem><para>
<emphasis role="bold">lame</emphasis> - recommended, needed for encoding MP3 audio with
<application>MEncoder</application>, suggested version is
<emphasis>always the newest</emphasis> (at least 3.90).
</para></listitem>
<listitem><para>
<emphasis role="bold">libogg</emphasis> - optional, needed for playing OGG file format.
</para></listitem>
<listitem><para>
<emphasis role="bold">libvorbis</emphasis> - optional, needed for playing OGG Vorbis audio.
</para></listitem>
<listitem><para>
<emphasis role="bold"><ulink url="http://www.live.com/mplayer/">LIVE.COM Streaming Media</ulink></emphasis>
- optional, needed for playing RTSP/RTP streams.
</para></listitem>
<listitem><para>
<emphasis role="bold">directfb</emphasis> - optional, from
<ulink url="http://www.directfb.org"/>
</para></listitem>
<listitem><para>
<emphasis role="bold">cdparanoia</emphasis> - optional, for CDDA support
</para></listitem>
<listitem><para>
<emphasis role="bold">libfreetype</emphasis> - optional, for TTF fonts
support. At least 2.0.9 is required.
</para></listitem>
<listitem><para>
<emphasis role="bold">libxmms</emphasis> - optional, for XMMS input plugin
support. At least 1.2.7 is required.
</para></listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Codecs</title>
<itemizedlist>
<listitem><para>
<emphasis role="bold">libavcodec</emphasis>: This codec package is capable
of decoding H263/MJPEG/RV10/DivX3/DivX4/DivX5/MP41/MP42/WMV1 encoded video
streams and WMA (Windows Media Audio) v1/v2 audio streams, on multiple
platforms. It is also known to be the fastest for this task. See the
<link linkend="ffmpeg">this section</link> section for details. Features:
<itemizedlist>
<listitem><simpara>
gain decoding of videos mentioned above, on non-x86 machines
</simpara></listitem>
<listitem><simpara>
encoding with most of the mentioned codecs
</simpara></listitem>
<listitem><simpara>
this codec is the <emphasis role="bold">fastest codec available</emphasis> for
DivX/3/4/5 and other MPEG4 types. Recommended!
</simpara></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
<emphasis role="bold">Win32 codecs</emphasis>: If you plan to use
<application>MPlayer</application> on x86 architecture, you will possibly need
them. Download the Win32 codecs from our
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/">codecs page</ulink>
and install them to <filename class="directory">/usr/lib/win32</filename>
<emphasis role="bold">BEFORE</emphasis> compiling <application>MPlayer</application>,
otherwise no Win32 support will be compiled!
<note><para>The avifile project has similar codecs package, but it
differs from ours, so if you want to use all supported codecs, then use
our package (do not worry, avifile works with it without problems).</para>
</note>
Features:
<itemizedlist>
<listitem><simpara>
you need this if you want to play or encode for example movies recorded
with various hardware compressors, like tuner cards, digital cameras
(example: DV, ATI VCR, MJPEG)
</simpara></listitem>
<listitem><simpara>
needed if you want to play <emphasis role="bold">WMV8, WMV9/WMA9 movies</emphasis>.
</simpara></listitem>
<listitem><simpara>
Not needed for old ASF's with MP41 or MP42 video (though VoxWare audio is
frequent for these files - it's done by the Win32 codec), or WMV7. Also not
needed for WMA (Windows Media Audio), libavcodec has opensource decoder for that.
</simpara></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
<emphasis role="bold">QuickTime codecs</emphasis>: on x86 platforms these
codecs can be used to decode Sorenson v1/v3, RPZA, and other QuickTime video,
and QDesign audio streams. Installation instructions can be found in the
<link linkend="sorenson">Sorenson video codec</link> section.
</para></listitem>
<listitem><para>
<emphasis role="bold">DivX4/DivX5</emphasis>: information about this codec is
available in the <link linkend="divx4-5">DivX4/DivX5</link>. You possibly
don't want this codec as <emphasis role="bold">libavcodec</emphasis> (see
above) is much faster and has better quality than this, for both decoding
and encoding. Features:
<itemizedlist>
<listitem><simpara>
1 pass or 2 pass encoding with <link linkend="mencoder">MEncoder</link>
</simpara></listitem>
<listitem><simpara>
can play old <emphasis role="bold">DivX3</emphasis> movies much faster than
the Win32 DLL but slower than <emphasis role="bold">libavcodec</emphasis>!
</simpara></listitem>
<listitem><simpara>
it's closed-source, and only a x86 version is available.
</simpara></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
<emphasis role="bold">XviD</emphasis>: Open source encoding alternative to
Divx4Linux. Features:
<itemizedlist>
<listitem><simpara>
1 pass or 2 pass encoding with <link linkend="mencoder">MEncoder</link>
</simpara></listitem>
<listitem><simpara>
it's open-source, so it's multiplatform.
</simpara></listitem>
<listitem><simpara>
it's about 2 times faster than divx4 when encoding - about the same
quality
</simpara></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
The <emphasis role="bold"><link linkend="xanim">XAnim codecs</link></emphasis>
are the best (full screen, hardware YUV zoom) for decoding
<emphasis role="bold">3ivx</emphasis> and Indeo 3/4/5 movies, and some old
formats. And they are multiplatform, so this is the only way to play Indeo on
non-x86 platforms (well, apart from using XAnim:). But for example Cinepak movies
are best played with <application>MPlayer</application>'s own Cinepak decoder!
</para></listitem>
<listitem><para>
For <emphasis role="bold">Ogg Vorbis</emphasis> audio decoding you need to
install <systemitem class="library">libvorbis</systemitem> properly. Use
deb/rpm packages if available, or compile from
<ulink url="http://ogg.org/ogg/vorbis/download/vorbis_nightly_cvs.tgz">source</ulink>
(this is a nightly updated tarball of Vorbis CVS).
</para></listitem>
<listitem><para>
<application>MPlayer</application> can use the libraries of RealPlayer 8
or RealONE to play files with <emphasis role="bold">RealVideo 2.0-4.0</emphasis>
video, and Sipro/Cook audio. See <link linkend="realmedia">RealMedia file format</link>
section for installation instructions and more information.
</para></listitem>
</itemizedlist>
</sect2>
<sect2 id="video-cards">
<title>Video cards</title>
<para>
There are generally two kind of video cards. One kind (the newer cards) has
<emphasis role="bold">hardware scaling and YUV acceleration</emphasis> support,
the other cards don't.
</para>
<sect3 id="yuv-cards">
<title>YUV cards</title>
<para>
They can display and scale (zoom) the picture to any size that fits in
their memory, with <emphasis role="bold">small CPU usage</emphasis> (even when
zooming), thus fullscreen is nice and very fast.
<itemizedlist>
<listitem><para>
<emphasis role="bold">Matrox G200/G400/G450/G550 cards</emphasis>: although a
<link linkend="vidix">Vidix driver</link> is provided, it is recommended to
use the mga_vid module instead, for it works much better.
Please see the <link linkend="mga_vid">mga_vid</link> section about its
installation and usage. It is important to do these steps
<emphasis>before</emphasis> compiling <application>MPlayer</application>,
otherwise no mga_vid support will be built. Also check out the
<link linkend="tvout-mga-g400">Matrox TV-out</link> section. If you
<emphasis role="bold"> If you don't use Linux</emphasis>, your only
possibility is the VIDIX driver: read <link linkend="vidix">VIDIX</link> section.
</para></listitem>
<listitem><para>
<emphasis role="bold">3Dfx Voodoo3/Banshee cards</emphasis>: please see
<link linkend="tdfxfb">tdfxfb</link> section in order to gain big speedup.
It is important to do these steps <emphasis role="bold">before</emphasis>
compiling <application>MPlayer</application>, otherwise no 3Dfx support will be
built. Also see the <link linkend="tvout-voodoo">3dfx TV-out section</link>.
If you use X, use at least <emphasis role="bold">4.2.0</emphasis>, as 3dfx Xv
driver was broken in 4.1.0, and earlier releases.
</para></listitem>
<listitem><para>
<emphasis role="bold">ATI cards</emphasis>: <link linkend="vidix">VIDIX</link>
driver is provided for the following cards:
<emphasis role="bold">Radeon, Rage128, Mach64</emphasis> (Rage XL/Mobility, Xpert98).
Also see the <link linkend="tvout-ati">ATI cards section</link> of the TV-out documentation,
to know if you card's TV-out is supported under Linux/<application>MPlayer</application>.
</para></listitem>
<listitem><para>
<emphasis role="bold">S3 cards</emphasis>: the Savage and Virge/DX chips have
hardware acceleration. Use as new XFree86 version as possible, older drivers are
buggy. Savage chips have problems with YV12 display, see <link linkend="s3">S3 Xv
section</link> for details. Older, Trio cards have no, or slow hardware
support.
</para></listitem>
<listitem><para>
<emphasis role="bold">nVidia cards</emphasis>: very bad choice for video playing.
If you do not have a GeForce2 (or newer) card, it's not likely to work without bugs.
<emphasis role="bold">the built-in nVidia driver in XFree86 doesn't contain
support for hardware YUV acceleration for all nVidia cards.</emphasis> You have
to download nVidia's closed-source drivers from nVidia.com. See the <link
linkend="nvidia">nVidia Xv driver</link> section for details. Please also check
the <link linkend="tvout-nvidia">nVidia TV-out section</link> if you wish to
use a TV.
</para></listitem>
<listitem><para>
<emphasis role="bold">3DLabs GLINT R3 and Permedia3</emphasis>: a VIDIX driver
is provided (pm3_vid). Please see the <link linkend="vidix">VIDIX</link> section
for details.
</para></listitem>
<listitem><para>
<emphasis role="bold">Other cards</emphasis>: none of the above?
<itemizedlist>
<listitem><simpara>
Try if the XFree86 driver (and your card) supports hardware
acceleration. See the <link linkend="xv">Xv section</link> for details.
</simpara></listitem>
<listitem><simpara>
If it doesn't, then your card's video features aren't supported under
your operating system :( If it does hardware scaling under Windows, it
doesn't mean it will do the same under Linux or other OS, it depends on
the drivers. Most manufacturers don't make Linux drivers nor release chip
specs - so you're unlucky if using their cards.
See <xref linkend="non-yuv-cards"/>.
</simpara></listitem>
</itemizedlist>
</para></listitem>
</itemizedlist>
</para>
</sect3>
<sect3 id="non-yuv-cards" xreflabel="Non-YUV cards">
<title>Non-YUV cards</title>
<para>
Fullscreen playing can be achieved by either enabling <emphasis role="bold">
software scaling</emphasis> (use the <option>-zoom</option> or <option>-vop</option>,
but i warn you: this is slow), or switching to a smaller video mode, for example
352x288. If you don't have YUV acceleration, this latter method is recommended.
Video mode switching can be enabled by using the <option>-vm</option> option and
it works with the following drivers:
<itemizedlist>
<listitem><simpara>
<emphasis role="bold">using</emphasis> XFree86: see details in <link linkend="dga">DGA driver</link> and
<link linkend="x11">X11 driver</link> sections. DGA is recommended! Also
try DGA via SDL, sometimes it's better.
</simpara></listitem>
<listitem><simpara>
<emphasis role="bold">not using</emphasis> XFree86: try the drivers in the
following order:
<link linkend="vesa">vesa</link>,
<link linkend="fbdev">fbdev</link>,
<link linkend="svgalib">svgalib</link>,
<link linkend="aalib">aalib</link>.
</simpara></listitem>
</itemizedlist>
</para>
</sect3>
<!-- FIXME: find a more logical organization for this section -->
<sect3 id="cirrus-logic-cards" xreflabel="Cirrus-Logic cards">
<title>Cirrus-Logic cards</title>
<itemizedlist>
<listitem><para>
GD 7548: present on-board and tested in Compaq Armada 41xx notebook series.
<itemizedlist>
<listitem><simpara>
XFree86 3: works in 8/16bpp modes. However, the driver is dramatically slow
and buggy in 800x600 at 16bpp. <emphasis role="bold">Recommended: 640x480 at 16bpp</emphasis>
</simpara></listitem>
<listitem><simpara>
XFree86 4: the Xserver freezes soon after start unless acceleration is
disabled, but then the whole thing gets slower than XFree86 3. No XVideo.
</simpara></listitem>
<listitem><simpara>
FBdev: framebuffer can be turned on with the <systemitem>clgenfb</systemitem>
driver in the kernel, though for me it worked only in 8bpp, thus unusable.
The clgenfb source had to be extended with the 7548 ID before compilation.
</simpara></listitem>
<listitem><simpara>
VESA: the card is only VBE 1.2 capable, so VESA output can't be used. Can't
be workarounded with UniVBE.
</simpara></listitem>
<listitem><simpara>
SVGAlib: detects an older Cirrus chip. Usable but slow with
<option>-bpp 8</option>.
</simpara></listitem>
</itemizedlist>
</para></listitem>
</itemizedlist>
</sect3>
</sect2>
<sect2 id="sounc-cards">
<title>Sound cards</title>
<itemizedlist>
<listitem><simpara>
<emphasis role="bold">Soundblaster Live!</emphasis>: with this card you can use
4 or 6 (5.1) channels AC3 decoding instead of 2. Read the
<link linkend="swac3">Software AC3 decoding</link> section. For hardware AC3
passthrough you <emphasis role="bold">must</emphasis> use ALSA 0.9 oss emulation!
</simpara></listitem>
<listitem><simpara>
<emphasis role="bold">C-Media with SP/DIF out</emphasis>: hardware AC3
passthrough is possible with these cards, see
<link linkend="hwac3">Hardware AC3 decoding</link> section.
</simpara></listitem>
<listitem><simpara>
Features of <emphasis role="bold">other cards</emphasis> aren't supported by
<application>MPlayer</application>. <emphasis role="bold">It's very recommended
to read the <link linkend="audio-dev">sound card</link> section!</emphasis>
</simpara></listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Features</title>
<itemizedlist>
<listitem><para>
Decide if you need GUI. If you do, see the <link linkend="gui">GUI
section</link> before compiling.
</para></listitem>
<listitem><para>
If you want to install <application>MEncoder</application> (our great
all-purpose encoder), see the <link linkend="mencoder">MEncoder section</link>.
</para></listitem>
<listitem><para>
If you have a V4L compatible <emphasis role="bold">TV tuner</emphasis> card,
and wish to watch/grab and encode movies with <application>MPlayer</application>,
read the <link linkend="tv-input">TV input</link> section.
</para></listitem>
<listitem><para>
There is a neat <emphasis role="bold">OSD Menu</emphasis> support ready to be
used. Check the <link linkend="subosd">OSD menu</link> section.
</para></listitem>
</itemizedlist>
<para>
Then build <application>MPlayer</application>:
<screen>
./configure
make
make install</screen>
</para>
<para>
At this point, <application>MPlayer</application> is ready to use. The
directory <filename class="directory">$PREFIX/share/mplayer</filename>
contains the <filename>codecs.conf</filename> file, which is used to tell
the program all the codecs and their capabilities. This file should always
be kept up to date together with the main binary. Check if you have
<filename>codecs.conf</filename> in your home directory
(<filename>~/.mplayer/codecs.conf</filename>) left from old
<application>MPlayer</application> versions, and remove it.
</para>
<para>
Debian users can build a .deb package for themselves, it's very simple.
Just exec
<screen>fakeroot debian/rules binary</screen>
in <application>MPlayer</application>'s root directory. See
<link linkend="debian">Debian packaging</link> for detailled instructions.
</para>
<para>
<emphasis role="bold">Always browse the output of</emphasis>
<filename>./configure</filename>, and the
<filename>configure.log</filename> file, they contain information about
what will be built, and what will not. You may also want to view
<filename>config.h</filename> and <filename>config.mak</filename> files.
If you have some libraries installed, but not detected by
<filename>./configure</filename>, then check if you also have the proper
header files (usually the -dev packages) and their version matches. The
<filename>configure.log</filename> file usually tells you what is missing.
</para>
<para>
Though not mandatory, the fonts should be installed in order to gain OSD,
and subtitle functionality. The recommended method is installing a TTF
font file and telling MPlayer to use it. See the <link linkend="subosd">Subtitles
and OSD</link> section for details.
</para>
</sect2>
</sect1>
<!-- ********** -->
<sect1 id="gui">
<title>What about the GUI?</title>
<para>
The GUI needs GTK 1.2.x (it isn't fully GTK, but the panels are). The skins
are stored in PNG format, so GTK, <systemitem class="library">libpng</systemitem>
(and their devel stuff, usualy called <systemitem class="library">gtk-dev</systemitem>
and <systemitem class="library">libpng-dev</systemitem>) has to be installed.
You can build it by specifying <option>--enable-gui</option> during
<filename>./configure</filename>. Then, to turn on GUI mode, you either
<itemizedlist>
<listitem><para>
specify <literal>gui=yes</literal> in your config file
</para></listitem>
<listitem><para>
execute
<screen>ln -s $PREFIX/bin/mplayer $PREFIX/bin/gmplayer</screen>
and call <command>gmplayer</command> instead.
</para></listitem>
</itemizedlist>
</para>
<para>
Currently you can't use the <option>-gui</option> option on the command
line, due to technical reasons.
</para>
<para>
As <application>MPlayer</application> doesn't have a skin included, you
have to download them if you want to use the GUI. See the <ulink
url="http://www.mplayerhq.hu/homepage/dload.html">download page</ulink>.
They should be extracted to the usual system-wide directory (<filename
class="directory">$PREFIX/share/mplayer/Skin</filename>), or to <filename
class="directory">$HOME/.mplayer/Skin</filename>.
<application>MPlayer</application> by default looks in these directories
for a directory named <filename class="directory">default</filename>, but
you can use the <option>-skin <replaceable>newskin</replaceable></option>
option, or the <literal>skin=newskin</literal> config file directive to use
the skin in <filename class="directory">*/Skin/newskin</filename>
directory.
</para>
</sect1>
<!-- ********** -->
<sect1 id="subosd">
<title>Subtitles and OSD</title>
<para>
MPlayer can display subtitles along with movie files. Currently the
following formats are supported:
<itemizedlist>
<listitem><para>VobSub</para></listitem>
<listitem><para>OGM</para></listitem>
<listitem><para>CC (closed caption)</para></listitem>
<listitem><para>Microdvd</para></listitem>
<listitem><para>SubRip</para></listitem>
<listitem><para>SubViewer</para></listitem>
<listitem><para>Sami</para></listitem>
<listitem><para>VPlayer</para></listitem>
<listitem><para>RT</para></listitem>
<listitem><para>SSA</para></listitem>
<listitem><para><link linkend="mpsub">MPsub</link></para></listitem>
<listitem><para>AQTitle</para></listitem>
<listitem><para>JACOsub</para></listitem>
</itemizedlist>
</para>
<para>
MPlayer can dump the previously listed subtitle formats
(<emphasis role="bold">except the three first</emphasis>) into the following
destination formats, with the given options:
<itemizedlist>
<listitem><para>MPsub: <option>-dumpmpsub</option></para></listitem>
<listitem><para>SubRip: <option>-dumpsrtsub</option></para></listitem>
<listitem><para>Microdvd: <option>-dumpmicrodvdsub</option></para></listitem>
<listitem><para>JACOsub: <option>-dumpjacosub</option></para></listitem>
<listitem><para>Sami: <option>-dumpsami</option></para></listitem>
</itemizedlist>
</para>
<para>
The command line options differ slightly for the different formats:
</para>
<formalpara>
<title>VobSub subtitles</title>
<para>
VobSub subtitles consist of a big (some megabytes) <filename>.SUB</filename> file,
and optional <filename>.IDX</filename> and/or <filename>.IFO</filename>
files. If you have files like <filename>sample.sub</filename>,
<filename>sample.ifo</filename> (optional), <filename>sample.idx</filename> -
you have to pass <application>MPlayer</application> the
<option>-vobsub sample [-vobsubid <replaceable>id</replaceable>]</option> options
(full path optional). The <option>-vobsubid</option> option is like
<option>-sid</option> for DVDs, you can choose between subtitle tracks
(languages) with it. In case that <option>-vobsubid</option> is omitted,
<application>MPLayer</application> will try to use the languages given by the
<option>-slang</option> option and fall back to the <systemitem>langidx</systemitem>
in the <filename>.IDX</filename> file to set the subtitle language. If it fails,
there will be no subtitles.
</para>
</formalpara>
<formalpara>
<title>Other subtitles</title>
<para>
The other formats consist of a single text file containing timing,
placement and text information. Usage: If you have a file like
<filename>sample.txt</filename>, you have to pass the option <option>-sub
sample.txt</option> (full path optional).
</para>
</formalpara>
<variablelist>
<title>Adjusting subtitle timing and placement:</title>
<varlistentry>
<term><option>-subdelay <replaceable>sec</replaceable></option></term>
<listitem><simpara>
Delays subtitles by <option><replaceable>sec</replaceable></option> seconds.
Can be negative.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>-subfps <replaceable>RATE</replaceable></option></term>
<listitem><simpara>
Specify frame/sec rate of subtitle file (float number).
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><option>-subpos <replaceable>0-100</replaceable></option></term>
<listitem><simpara>
Specify the position of subtitles.
</simpara></listitem>
</varlistentry>
</variablelist>
<para>
If you experience a growing delay between the movie and the subtitles when
using a MicroDVD subtitle file, most likely the frame rate of the movie and
the subtitle file are different. Please note that the MicroDVD subtitle
format uses absolute frame numbers for its timing, and therefore the
<option>-subfps</option> option cannot be used with this format. As
<application>MPlayer</application> has no way to guess the frame rate of
the subtitle file, you have to manually convert the frame rate. There is a
little perl script in the <filename class="directory">contrib</filename>
directory of the MPlayer FTP site to do this conversion for you.
</para>
<para>
About DVD subtitles, read the <link linkend="dvd">DVD section</link>.
</para>
<sect2 id="mpsub">
<title>MPlayer's own subtitle format</title>
<para>
<application>MPlayer</application> introduces a new subtitle format called
<emphasis role="bold">MPsub</emphasis>. It was designed by Gabucino. Basically
its main feature is being <emphasis>dynamically</emphasis> time-based (although
it has frame-based mode too). Example (from <ulink
url="../../tech/mpsub.sub">DOCS/tech/mpsub.sub</ulink>):
<programlisting>
# first number : wait this much after previous subtitle disappeared
# second number : display the current subtitle for this many seconds
15 3
A long long, time ago...
0 3
in a galaxy far away...
0 3
Naboo was under an attack.<!--
--></programlisting>
</para>
<para>
So you see, the main goal was to <emphasis role="bold">make subtitle
editing/timing/joining/cutting easy</emphasis>. And, if you - say - get an
SSA subtitle but it's badly timed/delayed to your version of the movie, you
simply do a
<screen>mplayer dummy.avi -sub source.ssa -dumpmpsub</screen>
A <filename>dump.mpsub</filename> file will be created in the
current directory, which will contain the source subtitle's text, but in
<emphasis role="bold">MPsub</emphasis> format. Then you can freely add/subtract
seconds to/from the subtitle.
</para>
<para>
Subtitles are displayed with a technique called <emphasis role="bold">'OSD',
On Screen Display</emphasis>.OSD is used to display current time, volume bar,
seek bar etc.
</para>
</sect2>
<sect2 id="mpsub-install">
<title>Installing OSD and subtitles</title>
<para>
You need an MPlayer font package to be able to use OSD/SUB feature.
There are many ways to get it:
</para>
<itemizedlist>
<listitem><para>
Download ready-to-use font packages from MPlayer site. Note: currently
available fonts are limited for ISO 8859-1/2 support, but there are some
other (including Korean, Russian, ISO 8859-8 etc) fonts at contrib/font
section of FTP, made by users.
</para><para>
<!-- FIXME: this para should be before the list -->
Font should have appropriate <filename>font.desc</filename> file which
maps unicode font positions to the actual code page of the subtitles
text. Other solution is to have subtitles encoded in UTF8 encoding and
use <option>-utf8</option> option or just name the subtitles file
<filename><video_name>.utf</filename> and have it in the same dir
as the video file. Recoding from different codepages to UTF8 could be
<!-- FIXME: iconv (Debian) konwert (Red Hat) instead? -->
done by using <command>konwert</command> (Debian) or
<command>iconv</command> (Red Hat) programs.
</para><para>
<table>
<title>Some URLs</title>
<tgroup cols="2">
<thead>
<row><entry>URL</entry><entry>Comment</entry></row>
</thead>
<tbody>
<row><entry>
<ulink url="ftp://ftp.mplayerhq.hu/MPlayer/releases/"></ulink>
</entry><entry>
ISO fonts
</entry></row>
<row><entry>
<ulink url="ftp://ftp.mplayerhq.hu/MPlayer/contrib/fonts/"></ulink>
</entry><entry>
various fonts by users
</entry></row>
<row><entry>
<ulink url="http://realtime.ssu.ac.kr/~lethean/mplayer"></ulink>
</entry><entry>
Korean fonts and RAW plugin
</entry></row>
</tbody>
</tgroup>
</table>
</para></listitem>
<listitem><para>
Use the font generator tool at <filename
class="directory">TOOLS/subfont-c</filename>. It's a complete tool to
convert from TTF/Type1/etc font to mplayer font pkg. (read
<filename>TOOLS/subfont-c/README</filename> for details)
</para></listitem>
<listitem><para>
Use the font generator GIMP plugin at <filename
class="directory">TOOLS/subfont-GIMP</filename> (note: you must have HSI
RAW plugin too, see URL below)
<!-- FIXME: where's that URL? -->
</para></listitem>
<listitem><para>
using a TrueType (TTF) font, by the means of the <systemitem class="library">freetype</systemitem>
library. Version 2.0.9 or greater is mandatory! Then you have two methods:
<itemizedlist>
<listitem><para>
use the <option>-font /path/to/arial.ttf</option> option to specify a
TrueType font file on every occasion
</para></listitem>
<listitem><para>
create a symlink:<screen>ln -s /path/to/arial.ttf ~/.mplayer/subfont.ttf</screen>
</para></listitem>
</itemizedlist>
</para></listitem>
</itemizedlist>
<para>
If you chose non-TTF fonts, UNZIP the file you downloaded to <filename
class="directory">~/.mplayer</filename> or <filename
class="directory">$PREFIX/share/mplayer</filename>. Then rename or symlink
one of the extracted directories to <filename>font</filename>, for example:
<screen>ln -s ~/.mplayer/arial-24 ~/.mplayer/font</screen>
Now you have to see a timer at the upper left corner of the movie (switch
it off with the <keycap>o</keycap> key).
</para>
<para>
OSD has 4 states (switch with <keycap>o</keycap>):
<orderedlist>
<listitem><simpara>
volume bar + seek bar (default)
</simpara></listitem>
<listitem><simpara>
volume bar + seek bar + timer + file position percentage on seeking
</simpara></listitem>
<listitem><simpara>
volume bar + seek bar + timer + total duration of the media
</simpara></listitem>
<listitem><simpara>
subtitles only
</simpara></listitem>
</orderedlist>
You can change default behaviour by setting <varname>osdlevel</varname>
variable in config file, or the <option>-osdlevel</option> command line option.
</para>
</sect2>
<sect2 id="osdmenu">
<title>OSD menu</title>
<para>
MPlayer has a completely user definiable OSD Menu interface.
</para>
<note><simpara>
the Preferences menu is currently UNIMPLEMENTED!
</simpara></note>
<orderedlist>
<title>Installation</title>
<listitem><simpara>
compile <application>MPlayer</application> by passing the <option>--enable-menu</option>
to <filename>./configure</filename>
</simpara></listitem>
<listitem><simpara>
make sure you have an OSD font installed
</simpara></listitem>
<listitem><simpara>
copy <filename>etc/menu.conf</filename> to your
<filename class="directory">.mplayer</filename> directory
</simpara></listitem>
<listitem><simpara>
copy <filename>etc/input.conf</filename> to your
<filename class="directory">.mplayer</filename> directory, or to the system-wide
<application>MPlayer</application> config dir (default:
<filename class="directory">/usr/local/etc/mplayer</filename>)
</simpara></listitem>
<listitem><simpara>
check and edit <filename>input.conf</filename> to enable menu movement keys
(it is described there).
</simpara></listitem>
<listitem><para>
start <application>MPlayer</application> by the following example:
<screen>$ mplayer -menu file.avi</screen>
</para></listitem>
<listitem><simpara>
push any menu key you defined
</simpara></listitem>
</orderedlist>
</sect2>
</sect1>
<!-- ********** -->
<sect1 id="rtc">
<title>RTC</title>
<para>
There are three timing methods in MPlayer.
<itemizedlist>
<listitem><simpara>
<emphasis role="bold">To use the old method</emphasis>, you don't have to do
anything. It uses <systemitem>usleep()</systemitem> to tune
A/V sync, with +/- 10ms accuracy. However sometimes the sync has to be
tuned even finer.
</simpara></listitem>
<listitem><para>
<emphasis role="bold">The new timer</emphasis> code uses PC's RTC (Real Time Clock)
for this task, because it has precise 1ms timers. It is automagically enabled
when available, but requires root privileges, a <emphasis>setuid root</emphasis>
<application>MPlayer</application> binary or a properly set up kernel.
If you are running kernel 2.4.19pre8 or later you can adjust the maximum RTC
frequency for normal users through the /proc filesystem. Use this command to
enable RTC for normal users:
<screen>echo 1024 > /proc/sys/dev/rtc/max-user-freq</screen>
If you do not have such a new kernel, you can also change one line in
<filename>drivers/char/rtc.c</filename> and recompile your kernel.
Find the section that reads
<programlisting>
* We don't really want Joe User enabling more
* than 64Hz of interrupts on a multi-user machine.
*/
if ((rtc_freq > 64) && (!capable(CAP_SYS_RESOURCE)))
</programlisting>
and change the 64 to 1024. You should really know what you are doing, though.
You can see the new timer's efficiency in the status line.
The power management functions of some notebook BIOSes with speedstep CPUs
interact badly with RTC. Audio and video may get out of sync. Plugging the
external power connector in before you power up your notebook seems to help.
You can always turn off RTC support with the <option>-nortc</option> option.
In some hardware combinations (confirmed during usage of non-DMA DVD drive
on an ALi1541 board) usage of the RTC timer causes skippy playback. It's
recommended to use the third method in these cases.
</para></listitem>
<listitem><simpara>
<emphasis role="bold">The third timer code</emphasis> is turned on with the
<option>-softsleep</option> option. It has the efficiency of the RTC, but it
doesn't use RTC. On the other hand, it requires more CPU.
</simpara></listitem>
</itemizedlist>
<note><para><emphasis role="bold">NEVER install a setuid root
<application>MPlayer</application> binary on a multiuser system!</emphasis>
It's a clear way for everyone to become root.
</para></note>
</para>
</sect1>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<appendix id="mailinglists">
<title>Mailing lists</title>
<para>
There are some public mailing lists on <application>MPlayer</application>. Unless
explicitly stated otherwise the language of these lists is <emphasis role="bold">English</emphasis>.
Please do not send messages in other languages or HTML mail! Message size limit
is 80k. If you have something bigger put it up for download somewhere. Click the
links to subscribe. On the mailing lists, the same rules about writing and quoting
apply as on usenet. Please follow them, it makes the life of those who read your
mails a lot easier. If you do not know them please read
<ulink url="http://learn.to/edit_messages">HOWTO edit messages</ulink> or (if you
are in a hurry) <ulink url="http://www.xs4all.nl/~hanb/documents/quotingguide.html">Quoting HOWTO</ulink>.
<itemizedlist>
<listitem><para>
MPlayer announce list:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-announce"/>
List for MPlayer announcements. Subscribe here if you want to get
announcements about new features.
</para></listitem>
<listitem><para>
MPlayer developers list:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng"/>
This list is about MPlayer development! Talking about interface/API changes,
new libraries, code optimization, configure changes is ontopic here. Send patches
but not bug reports, user questions, feature requests or flames here to keep the
list traffic low.
</para></listitem>
<listitem><para>
MPlayer users list:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-users"/>
<itemizedlist>
<listitem><para>
Send bug reports here after reading the <link linkend="bugs">Known Bugs</link>
and <link linkend="bugreports">bug reporting section</link>).
</para></listitem>
<listitem><para>
Send feature requests here (after reading the <emphasis role="bold">whole
documentation</emphasis>).
</para></listitem>
<listitem><para>
Send user questions here (after reading the <emphasis role="bold">whole
documentation</emphasis>).
</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
MPlayer Hungarian users list:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-felhasznalok"/>
<itemizedlist>
<listitem><para>
Hungarian language list
</para></listitem>
<listitem><para>
Topic? We'll see about it... mostly flame and RTFM questions up to now :(
</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
MPlayer & Matrox G200/G400/G450/G550 users:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-matrox"/>
Matrox related questions like
<itemizedlist>
<listitem><para>
things about mga_vid
</para></listitem>
<listitem><para>
Matrox's official beta drivers (for X 4.x.x)
</para></listitem>
<listitem><para>
matroxfb-TVout stuff
</para></listitem>
</itemizedlist>
</para></listitem>
<listitem><para>
MPlayer & DVB card users:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-dvb"/>
Things related to the hardware decoder card called DVB (not <emphasis role="bold">DXR3</emphasis>!).
</para></listitem>
<listitem><para>
MPlayer CVS-log:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog"/>
All changes in MPlayer code are automatically sent to this list. Only
questions about these changes belong here (if you do not understand why a
change is required or you have a better fix or you have noticed a possible
bug/problem in the commit).
</para></listitem>
<listitem><para>
MPlayer CygWin-porting list:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-cygwin"/>
List for discussion about MPlayer's CygWin port.
</para></listitem>
<listitem><para>
MPlayer OS/2-porting list:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-os2"/>
List for discussion about MPlayer's OS/2 port.
</para></listitem>
<listitem><para>
MPlayer Weekly News' editors and translators list:
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-mwn"/>
List for discussion about the Weekly News releases.
</para></listitem>
</itemizedlist>
<note><para>
You can reach the searchable mailing list archives at
<ulink url="http://www.mplayerhq.hu/cgi-bin/htsearch"/>.
</para></note>
</para>
</appendix>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<chapter id="mencoder">
<title>Encoding with MEncoder</title>
<para>
For the complete list of available <application>MEncoder</application> options
and examples, please see the man page. For a series of hands-on examples and
detailed guides on using several encoding parameters, read the
<ulink url="../../tech/encoding-tips.txt">encoding-tips</ulink> that were
collected from several mailing list threads on mplayer-users. Search the
<ulink url="http://mplayerhq.hu/pipermail/mplayer-users/">archives</ulink>
for a wealth of discussions about all aspects of and problems related to
encoding with <application>MEncoder</application>.
</para>
<sect1 id="menc-feat-divx4">
<title>Encoding 2 or 3-pass MPEG-4 ("DivX")</title>
<formalpara>
<title>2-pass encoding</title>
<para>
The name comes from the fact that this method encodes the file <emphasis>twice</emphasis>.
The first encoding (dubbed pass) creates some temporary files
(<filename>*.log</filename>) with a size of few megabytes, do not delete
them yet (you can delete the AVI). In the second pass, the 2-pass output
file is created, using the bitrate data 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 guides available on the
Net.
</para>
</formalpara>
<para>
This example shows how to encode a DVD to a 2-pass MPEG-4 ("DivX") AVI.
Just two commands are needed:
<screen>rm frameno.avi</screen>
remove this file, which can come from a previous 3-pass encoding (it interferes
with current one)
<screen>
mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o movie.avi
mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac copy -o movie.avi
</screen>
</para>
<formalpara>
<title>3-pass encoding</title>
<para>
This is an extension of 2-pass encoding, where the audio encoding takes
place in a separate pass. This method enables estimation of recommended
video bitrate in order to fit on a CD. Also, the audio is encoded only
once, unlike in 2-pass mode. The schematics:
</para>
</formalpara>
<procedure>
<step><para>
Remove conflicting temporary file:
<screen>rm frameno.avi</screen>
</para></step>
<step><para>
<emphasis>First pass:</emphasis>
<screen>mencoder <replaceable>file/DVD</replaceable> -ovc frameno -oac mp3lame -lameopts vbr=3 -o frameno.avi</screen>
An audio-only avi file will be created, containing
<emphasis role="bold">only</emphasis> the requested audio stream. Don't forget
<option>-lameopts</option>, if you need to set it. If you were encoding a
long movie, <application>MEncoder</application> prints the recommended
bitrate values for 650Mb, 700Mb, and 800Mb destination sizes, after this
pass finishes.
</para></step>
<step><para>
<emphasis>Second pass:</emphasis>
<screen>
mencoder <replaceable>file/DVD</replaceable> -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=<replaceable>bitrate</replaceable><!--
--></screen>
This is the first pass of video encoding. Optionally specify the video
bitrate MEncoder printed at the end of the previous pass.
</para></step>
<step><para>
<emphasis>Third pass:</emphasis>
<screen>
mencoder <replaceable>file/DVD</replaceable> -oac copy -pass 2 \
-ovc divx4 -divx4opts br=<replaceable>bitrate</replaceable>
</screen>
This is the second pass of video encoding. Specify the same bitrate
as in the previous pass unless you really know what you are doing.
In this pass, audio from <filename>frameno.avi</filename> will be
inserted into the destination file...and it's all ready!
</para></step>
</procedure>
<example>
<title>Example of 3-pass encoding</title>
<para>
<screen>rm frameno.avi</screen>
remove this file, which can come from a previous 3-pass encoding
(it interferes with current one)
<screen>
mencoder -dvd 2 -ovc frameno -o frameno.avi -oac mp3lame -lameopts vbr=3
mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o movie.avi
mencoder -dvd 2 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2 -oac copy -o movie.avi
</screen>
</para>
</example>
</sect1>
<sect1 id="menc-feat-mpeg">
<title>Encoding to MPEG format</title>
<para>
<application>MEncoder</application> can create MPEG (MPEG-PS) format output
files. It's probably useful only with libavcodec's <emphasis>mpeg1video</emphasis>
codec, because players - except <application>MPlayer</application> - expect MPEG1
video, and MPEG1 layer 2 (MP2) audio streams in MPEG files.
</para>
<para>
this feature is not very useful right now, aside that it probably has many bugs,
but the more importantly because MEncoder currently cannot encode MPEG1 layer 2
(MP2) audio, which all other players expect in MPEG files.
</para>
<para>
To change MEncoder's output file format, use the <option>-of mpeg</option> option.
</para>
<para>
Example:
<screen>
mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -oac copy <replaceable>other options</replaceable> media.avi -o output.mpg
</screen>
</para>
</sect1>
<sect1 id="menc-feat-rescale">
<title>Rescaling movies</title>
<para>
Often the need to resize movie images' size emerges. Its reasons can be
many: decreasing file size, network bandwidth,etc. Most people even do
rescaling when converting DVDs or SVCDs to DivX AVI. This is <emphasis role="bold">bad</emphasis>.
Instead of even you doing so, read the <link linkend="aspect">Preserving aspect ratio</link>
section.
</para>
<para>
The scaling process is handled by the <literal>scale</literal> video filter:
<option>-vop scale=<replaceable>width</replaceable>:<replaceable>height</replaceable></option>.
Its quality can be set with the <option>-sws</option> option.
If it's not specified, <application>MEncoder</application> will use 0: fast
bilinear.
</para>
<para>
Usage:
<screen>
mencoder <replaceable>input.mpg</replaceable> -ovc lavc -lavcopts vcodec=mpeg4 -vop scale=640:480-o <replaceable>output.avi</replaceable>
</screen>
</para>
</sect1>
<sect1 id="menc-feat-streamcopy">
<title>Stream copying</title>
<para>
<application>MEncoder</application> can handle input streams in two ways:
<emphasis role="bold">encode</emphasis> or <emphasis role="bold">copy</emphasis>
them. This section is about <emphasis role="bold">copying</emphasis>.
</para>
<itemizedlist>
<listitem><para>
<emphasis role="bold">Video stream</emphasis> (option <option>-ovc copy</option>):
nice stuff can be done :) Like, putting (not converting!) FLI or VIVO or
MPEG1 video into an AVI file! Of course only
<application>MPlayer</application> can play such files :) And it probably
has no real life value at all. Rationally: video stream copying can be
useful for example when only the audio stream has to be encoded (like,
uncompressed PCM to MP3).
</para></listitem>
<listitem><para>
<emphasis role="bold">Audio stream</emphasis> (option <option>-oac copy</option>):
straightforward. It is possible to take an external audio file (MP3,
Vorbis) and mux it into the output stream. Use the
<option>-audiofile <replaceable>filename</replaceable></option> option
for this.
</para></listitem>
</itemizedlist>
</sect1>
<sect1 id="menc-feat-fix-avi">
<title>Fixing AVIs with broken index or interleaving</title>
<para>
Easiest thing. We simply copy the video and audio streams, and
<application>MEncoder</application> generates the index. Of course this cannot fix possible bugs in
the video and/or audio streams. It also fixes files with broken interleaving,
thus the <option>-ni</option> option won't be needed for them anymore.
</para>
<para>
Command:
<screen>
mencoder -idx <replaceable>input.avi</replaceable> -ovc copy -oac copy -o <replaceable>output.avi</replaceable><!--
--></screen>
</para>
<sect2 id="menc-feat-appending">
<title>Appending multiple AVI files</title>
<para>
As a side-effect, the broken AVI fixer function enables MEncoder to append
2 (or more) AVI files:
</para>
<para>
Command:
<screen>cat 1.avi 2.avi | mencoder -noidx -ovc copy -oac copy -o output.avi -</screen>
</para>
<note><para>
This expects <filename>1.avi</filename> and <filename>2.avi</filename> to use
the same codecs, resolution, stream rate etc, and at least <filename>1.avi</filename>
must not be broken. You may need to fix your input AVI files first, as described
<link linkend="menc-feat-fix-avi">above</link>.
</para></note>
</sect2>
</sect1>
<sect1 id="menc-feat-enc-libavcodec">
<title>Encoding with the libavcodec codec family</title>
<para>
<link linkend="ffmpeg">libavcodec</link> provides simple encoding to a lot
of interesting video and audio formats (currently its audio codecs are
unsupported). You can encode to the following codecs:
<informaltable frame="all">
<tgroup cols="2">
<thead>
<row><entry>Codec name</entry><entry>Description</entry></row>
</thead>
<tbody>
<row><entry>mjpeg</entry><entry>
Motion JPEG
</entry></row>
<row><entry>h263</entry><entry>
H263
</entry></row>
<row><entry>h263p</entry><entry>
H263 Plus
</entry></row>
<row><entry>mpeg4</entry><entry>
ISO standard MPEG-4 (DivX 5, XVID compatible)
</entry></row>
<row><entry>msmpeg4</entry><entry>
pre-standard MPEG-4 variant by MS, v3 (aka DivX3)
</entry></row>
<row><entry>msmpeg4v2</entry><entry>
pre-standard MPEG-4 by MS, v2 (used in old asf files)
</entry></row>
<row><entry>wmv1</entry><entry>
Windows Media Video, version 1 (aka WMV7)
</entry></row>
<row><entry>rv10</entry><entry>
an old RealVideo codec
</entry></row>
<row><entry>mpeg1video</entry><entry>
MPEG1 video :)
</entry></row>
<row><entry>huffyuv</entry><entry>
lossless compression
</entry></row>
</tbody>
</tgroup>
</informaltable>
The first column contains the codec names that should be passed after the
<literal>vcodec</literal> config, like: <option>-lavcopts vcodec=msmpeg4</option>
</para>
<informalexample>
<para>
An example, with MJPEG compression:
<screen>mencoder -dvd 2 -o title2.avi -ovc lavc -lavcopts vcodec=mjpeg -oac copy</screen>
</para>
</informalexample>
</sect1>
<sect1 id="menc-feat-enc-images">
<title>Encoding from multiple input image files (JPEGs,PNGs or TGAs)</title>
<para>
<application>MEncoder</application> is capable of creating movies from one
or more JPEG, PNG or TGA files. With simple framecopy it can create MJPEG
(Motion JPEG), MPNG (Motion PNG) or MTGA (Motion TGA) files.
</para>
<orderedlist>
<title>Explanation of the process:</title>
<listitem><para>
<application>MEncoder</application> <emphasis>decodes</emphasis> the input image(s) with
<systemitem class="library">libjpeg</systemitem> (when decoding PNGs, it
will use <systemitem class="library">libpng</systemitem>).
</para></listitem>
<listitem><para>
<application>MEncoder</application> then feeds the decoded image to the
chosen video compressor (DivX4, Xvid, ffmpeg msmpeg4, etc.).
</para></listitem>
</orderedlist>
<formalpara>
<title>Examples</title>
<para>
The explanation of the <option>-mf</option> option can be found below in
the man page.
<informalexample>
<para>
Creating a DivX4 file from all the JPEG files in the current dir:
<screen>
mencoder -mf on:w=800:h=600:fps=25 -ovc divx4 -o output.avi \*.jpg<!--
--></screen>
</para>
</informalexample>
<informalexample>
<para>
Creating a DivX4 file from some JPEG files in the current dir:
<screen>
mencoder -mf on:w=800:h=600:fps=25 -ovc divx4 -o output.avi frame001.jpg,frame002.jpg <!--
--></screen>
</para>
</informalexample>
<informalexample>
<para>
Creating a Motion JPEG (MJPEG) file from all the JPEG files in the current
dir:
<screen>
mencoder -mf on:w=800:h=600:fps=25 -ovc copy -o output.avi \*.jpg<!--
--></screen>
</para>
</informalexample>
<informalexample>
<para>
Creating an uncompressed file from all the PNG files in the current dir:
<screen>
mencoder -mf on:w=800:h=600:fps=25:type=png -ovc raw -o output.avi \*.png<!--
--></screen>
</para>
</informalexample>
<note><para>
Width must be integer multiple of 4, it's a limitation of the RAW RGB AVI format.
</para></note>
<informalexample>
<para>
Creating a Motion PNG (MPNG) file from all the PNG files in the current
dir:
<screen>
mencoder -mf on:w=800:h=600:fps=25:type=png -ovc copy -o output.avi \*.png<!--
--></screen>
</para>
</informalexample>
<informalexample>
<para>
Creating a Motion TGA (MTGA) file from all the TGA files in the current
dir:
<screen>
mencoder -mf on:w=800:h=600:fps=25:type=tga -ovc copy -o output.avi \*.tga<!--
--></screen>
</para>
</informalexample>
</para>
</formalpara>
</sect1>
<sect1 id="menc-feat-extractsub">
<title>Extracting DVD subtitles to Vobsub file</title>
<para>
<application>MEncoder</application> is capable of extracting subtitles from
a DVD into Vobsub fomat files. They consist of a pair of files ending in
<filename>.idx</filename> and <filename>.sub</filename> and are usually
packaged in a single <filename>.rar</filename> archive.
<application>MPlayer</application> can play these with the
<option>-vobsub</option> and <option>-vobsubid</option> options.
</para>
<para>
You specify the basename (i.e without the <filename>.idx</filename> or
<filename>.sub</filename> extension) of the output files with
<option>-vobsubout</option> and the index for this subtitle in the
resulting files with <option>-vobsuboutindex</option>.
</para>
<para>
If the input is not from a DVD you should use <option>-ifo</option> to
indicate the <filename>.ifo</filename> file needed to construct the
resulting <filename>.idx</filename> file.
</para>
<para>
If the input is not from a DVD and you do not have the
<filename>.ifo</filename> file you will need to use the
<option>-vobsubid</option> option to let it know what language id to put in
the <filename>.idx</filename> file.
</para>
<para>
Each run will append the running subtitle if the <filename>.idx</filename>
and <filename>.sub</filename> files already exist. So you should remove any
before starting.
</para>
<example>
<title>Copying two subtitles from a DVD while doing 3-pass encoding</title>
<screen>
rm subtitles.idx subtitles.sub
mencoder -dvd 1 -vobsubout subtitles -vobsuboutindex 0 -sid 2 -o frameno.avi -ovc frameno
mencoder -dvd 1 -oac copy -ovc divx4 -pass 1
mencoder -dvd 1 -oac copy -ovc divx4 -pass 2 -vobsubout subtitles -vobsuboutindex 1 -sid 5<!--
--></screen>
</example>
<example>
<title>Copying a french subtitle from an MPEG file</title>
<screen>
rm subtitles.idx subtitles.sub
mencoder movie.mpg -ifo movie.ifo -vobsubout subtitles -vobsuboutindex 0 -vobsuboutid fr -sid 1<!--
--></screen>
</example>
</sect1>
<sect1 id="aspect">
<title>Preserving aspect ratio</title>
<para>
DVDs and SVCDs (i.e. MPEG1/2) files contain an aspect ratio value, which
describes how should the player scale the video stream, so humans won't
have egg heads (ex.: 480x480 + 4:3 = 640x480). However when encoding to AVI
(DivX) files, you have be aware that AVI headers don't store this value.
Rescaling the movie is disgusting and time consuming, there must be a better
feature!
</para>
<para>There is</para>
<para>
MPEG4 has an unique feature: the video stream can contain its needed aspect
ratio. Yes, just like MPEG1/2 files (DVD, SVCD). Regretfully, there are
<emphasis role="bold">no</emphasis> video players outside which support this
attribute. Except <application>MPlayer</application>.
</para>
<para>
This feature can be used only with <emphasis role="bold">libavcodec</emphasis>'s
<systemitem>mpeg4</systemitem> codec. Keep in mind: although <application>MPlayer</application>
will correctly play the created file, other players will use the wrong aspect
ratio.
</para>
<para>
You seriously should crop the black bands over and below the movie image.
See the manpage about the usage of the <systemitem>cropdetect</systemitem> and
<systemitem>crop</systemitem> filters.
</para>
<formalpara>
<title>Usage</title>
<para>
<screen>mencoder sample-svcd.mpg -ovc lavc -lavcopts vcodec=mpeg4:aspect=16.0/9.0 -vop crop=714:548:0:14 -oac copy -o output.avi</screen>
</para>
</formalpara>
</sect1>
</chapter>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<appendix id="patches">
<title>How to send patches</title>
<para>
Please see <ulink url="../../tech/patches.txt">this file</ulink>.
</para>
</appendix>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<chapter id="ports" xreflabel="Ports">
<title>Ports</title>
<sect1 id="linux">
<title>Linux</title>
<para>
The main development platform is Linux on x86, although
<application>MPlayer</application> works on many other Linux ports.
Binary packages of MPlayer are available from several sources. However,
<emphasis role="bold">none of these packages are supported</emphasis>.
Report problems to the authors, not to us.
</para>
<sect2 id="debian">
<title>Debian packaging</title>
<para>
To build a Debian package, run the following command in the MPlayer
source directory:
<screen>fakeroot debian/rules binary</screen>
As root you can then install the <filename>.deb</filename> package as usual:
<screen>dpkg -i ../mplayer_<replaceable>version</replaceable>.deb</screen>
</para>
<para>
Christian Marillat has been making unofficial Debian MPlayer, MEncoder and font
packages for a while, you can (apt-)get them from his
<ulink url="http://marillat.free.fr/">homepage</ulink>.
</para>
</sect2>
<sect2 id="rpm">
<title>RPM packaging</title>
<para>
Dominik Mierzejewski created and maintains official Red Hat RPM packages of
<application>MPlayer</application>. They are available from his
<ulink url="http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/">homepage</ulink>.
</para>
<para>
Mandrake RPM packages are available from the <ulink url="http://plf.zarb.org/">P.L.F.</ulink>.
SuSE includes a crippled version of MPlayer in their distribution. If you want all the features
you will have to install from source.
</para>
</sect2>
<sect2 id="arm">
<title>ARM</title>
<para>
MPlayer works on Linux PDAs with ARM CPU e.g. Sharp Zaurus, Compaq Ipaq. The
easiest way to obtain MPlayer is to get it from one of the
<ulink url="http://www.openzaurus.org">OpenZaurus</ulink> package feeds. If
you want to compile it yourself, you should look at the
<ulink url="http://openzaurus.bkbits.net:8080/buildroot/src/packages/mplayer?nav=index.html|src/.|src/packages">MPlayer</ulink>
and the
<ulink url="http://openzaurus.bkbits.net:8080/buildroot/src/packages/libavcodec?nav=index.html|src/.|src/packages">libavcodec</ulink>
directory in the OpenZaurus distribution buildroot. These always have the latest
Makefile and patches used for building a CVS MPlayer with libavcodec.
If you need a GUI frontend, you can use xmms-embedded.
</para>
</sect2>
</sect1>
<sect1 id="bsd">
<title>*BSD</title>
<para>
<application>MPlayer</application> runs on FreeBSD, OpenBSD, NetBSD,
BSD/OS and Darwin. There are ports/pkgsrc/fink/etc versions of MPlayer
available that are probably easier to use than our raw sources.
</para>
<para>
To build MPlayer you will need GNU make (gmake - native BSD make
will not work) and a recent version of binutils.
</para>
<para>
If MPlayer complains about not finding <filename>/dev/cdrom</filename> or
<filename>/dev/dvd</filename>, create an appropiate symbolic link:
<screen>ln -s /dev/(your_cdrom_device) /dev/cdrom</screen>
</para>
<para>
To use Win32 DLLs with MPlayer you will need to re-compile the kernel with
"<envar>option USER_LDT</envar>" (unless you run FreeBSD-CURRENT,
where this is the default).
</para>
<sect2 id="freebsd">
<title>FreeBSD</title>
<para>
If your CPU has SSE, recompile your kernel with
"<envar>options CPU_ENABLE_SSE</envar>" (FreeBSD-STABLE or kernel
patches required).
</para>
</sect2>
<sect2 id="openbsd">
<title>OpenBSD</title>
<para>
Due to limitations in different versions of gas (relocation vs MMX), you
will need to compile in two steps: First make sure that the non-native as
is first in your <envar>$PATH</envar> and do a <command>gmake -k</command>, then
make sure that the native version is used and do <command>gmake</command>.
</para>
</sect2>
</sect1>
<sect1 id="solaris">
<title>Solaris</title>
<para>
<application>MPlayer</application> should work on Solaris 2.6 or newer.
</para>
<para>
On <emphasis role="bold">UltraSPARCs</emphasis>, MPlayer takes advantage of their
<emphasis role="bold">VIS</emphasis> extensions (equivalent to MMX), currently
only in <emphasis>libmpeg2</emphasis>, <emphasis>libvo</emphasis> and
<emphasis>libavcodec</emphasis>, but not in mp3lib. You can watch a VOB file
on a 400MHz CPU. You'll need
<ulink url="http://www.sun.com/sparc/vis/mediaLib.html">mLib</ulink> installed.
</para>
<para>
To build the package you will need GNU <application>make</application>
(<filename>gmake</filename>, <filename>/opt/sfw/gmake</filename>), native
Solaris make will not work. Typical error you get when building with
Solaris' make instead of GNU make:
<screen>
% /usr/ccs/bin/make
make: Fatal error in reader: Makefile, line 25: Unexpected end of line seen
</screen>
</para>
<para>
On Solaris SPARC, you need the GNU C/C++ Compiler; it does not matter if
GNU C/C++ compiler is configured with or without the GNU assembler.
</para>
<para>
On Solaris x86, you need the GNU assembler and the GNU C/C++ compiler,
configured to use the GNU assembler! The mplayer code on the x86 platform
makes heavy use of MMX, SSE and 3DNOW! instructions that cannot be compiled
using Sun's assembler <filename>/usr/ccs/bin/as</filename>.
</para>
<para>The <filename>configure</filename> script tries to find out, which
assembler program is used by your "gcc" command (in case the autodetection
fails, use the <option>--as=/whereever/you/have/installed/gnu-as</option>
option to tell the <filename>configure</filename> script where it can find GNU
"as" on your system).
</para>
<para>
Error message from <filename>configure</filename> on a Solaris x86 system using
GCC without GNU assembler:
<screen>
% configure
...
Checking assembler (/usr/ccs/bin/as) ... , failed
Please upgrade(downgrade) binutils to 2.10.1...
</screen>
(Solution: Install and use a gcc configured with <option>--with-as=gas</option>)
</para>
<para>
Typical error you get when building with a GNU C compiler that does not use GNU as:
<screen>
% gmake
...
gcc -c -Iloader -Ilibvo -O4 -march=i686 -mcpu=i686 -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 ...
</screen>
</para>
<para>
Due to bugs in Solaris 8, you may not be able to play DVD discs larger than 4 GB:
</para>
<itemizedlist>
<listitem><para>
The sd(7D) driver on Solaris 8 x86 has a bug when accessing a disk block >4GB
on a device using a logical blocksize != DEV_BSIZE (i.e. CD-ROM and DVD media).
Due to a 32Bit int overflow, a disk address modulo 4GB is accessed
(<ulink url="http://groups.yahoo.com/group/solarisonintel/message/22516"/>).
This problem does not exist in the SPARC version of Solaris 8.
</para></listitem>
<listitem><para>
A similar bug is present in the hsfs(7FS) filesystem code (aka ISO9660),
hsfs may not not support partitions/disks larger than 4GB, all data is
accessed modulo 4GB
(<ulink url="http://groups.yahoo.com/group/solarisonintel/message/22592"/>).
The hsfs problem can be fixed by installing patch 109764-04 (sparc) / 109765-04 (x86).
</para></listitem>
</itemizedlist>
<para>
On Solaris with an UltraSPARC CPU, you can get some extra speed by using the
CPU's VIS instructions for certain time consuming operations. VIS acceleration
can be used in MPlayer by calling functions in Sun's
<ulink url="http://www.sun.com/sparc/vis/mediaLib.html">mediaLib</ulink>.
</para>
<para>
VIS accelerated operations from mediaLib are used for mpeg2 video decoding
and for color space conversion in the video output drivers.
</para>
</sect1>
<sect1 id="sgi">
<title>Silicon Graphics / Irix</title>
<para>
You can either try to install the GNU install program, and (if you did
not put it in your global path) then point to the location with:
<screen>./configure --install-path=PATH</screen>
</para>
<para>
Or you can use the default install delivered with IRIX 6.5 in which case
you will have to edit the <filename>Makefile</filename> by hand a little bit.
Change the following two lines:
<programlisting>
$(INSTALL) -c -m 644 DOCS/mplayer.1 $(MANDIR)/man1/mplayer.1
$(INSTALL) -c -m 644 etc/codecs.conf $(CONFDIR)/codecs.conf
</programlisting>
to:
<programlisting>
$(INSTALL) -m 644 mplayer.1 $(MANDIR)/man1/
$(INSTALL) -m 644 codecs.conf $(CONFDIR)/
</programlisting>
And then do (from within the MPlayer source dir):
<screen>cp DOCS/mplayer.1 . ; cp etc/codecs.conf .</screen>
and then go on with building and installing.
</para>
</sect1>
<sect1 id="qnx">
<title>QNX</title>
<para>
Works. You'll need to download SDL for QNX, and install it. Then run
<application>MPlayer</application> with <option>-vo sdl:photon</option>
and <option>-ao sdl:nto</option> options, and it should be fast.
</para>
<para>
The <option>-vo x11</option> output will be even slower than on Linux,
since QNX has only X <emphasis>emulation</emphasis> which is VERY slow. Use SDL.
</para>
</sect1>
<sect1 id="cygwin">
<title>Cygwin</title>
<para>
The Cygwin port is still in its infancy. Currently there is no support for
Win32 DLLs or OpenGL. SDL is known to distort sound and image or crash on
some systems. <ulink url="../../tech/patches.txt">Patches</ulink>
are always welcome. Best results are achieved with the native DirectX video
output driver (<option>-vo directx</option>) and the native Windows waveout
audio driver (<option>-ao win32</option>). You should also check out the
<ulink url="http://mplayerhq.hu/mailman/listinfo/mplayer-cygwin/">mplayer-cygwin</ulink>
mailing list for help and latest information.
</para>
<para>
You have to copy or symlink <filename>etc/cygwin_inttypes.h</filename>
from the MPlayer source directory to <filename>/usr/include/inttypes.h</filename>
in order to make MPlayer compile.
</para>
<para>
To get native DirectX video, download
<ulink url="http://www.videolan.org/vlc/dx7headers.tgz">DirectX 7 header files</ulink>,
extract them to <filename>/usr/include/</filename> or <filename>/usr/local/include/</filename>
and recompile. If the image is distorted, try turning off hardware acceleration with
<option>-vo directx:noaccel</option>
</para>
<para>
Instructions and files for making SDL run under Cygwin can be found on the
<ulink url="http://www.libsdl.org/extras/win32/cygwin/">libsdl site</ulink>.
</para>
<para>
You can play VCDs by playing the .DAT or .MPG files that Windows exposes on
VCDs. It works like this (adjust for the drive letter of your CD-ROM):
<screen>mplayer d:/mpegav/avseq01.dat</screen>
<screen>mplayer /cygdrive/d/MPEG2/AVSEQ01.MPG</screen>
</para>
<para>
DVDs also work, just set the DVD device correctly to whatever your CD-ROM
device is:
<screen>mplayer -dvd <title> -dvd-device '\\.\d:'</screen>
</para>
<para>
QuickTime DLLs have also been reported to work. Compile with
<option>--enable-qtx-codecs</option> and put the codecs into
the default Windows DLL location, <filename class="directory">C:\WINNT\system32</filename>
or <filename class="directory">C:\Windows\system</filename> depending on your
Windows version.
</para>
</sect1>
</chapter>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<appendix id="skin">
<title>MPlayer skin format</title>
<para>
The purpose of this document is to describe the MPlayer skin format.
The information contained here might be wrong, for
<orderedlist>
<listitem><para>It is not me who wrote the GUI.</para></listitem>
<listitem><para>The GUI is not finished.</para></listitem>
<listitem><para>I might be wrong.</para></listitem>
</orderedlist>
So do not be surprised if something does not work as described here.
</para>
<para>Thanks to <emphasis>Zoltán Ponekker</emphasis> for his help.</para>
<para><emphasis>András Mohari <mayday at freemail.hu></emphasis></para>
<sect1 id="skin-overview">
[...1055 lines suppressed...]
</varlistentry>
<varlistentry>
<term><emphasis role="bold">evSetURL</emphasis></term>
<listitem><para>
Displays the URL dialog window.
</para></listitem>
</varlistentry>
<varlistentry>
<term><emphasis role="bold">evSkinBrowser</emphasis></term>
<listitem><para>
Open the skin browser window.
</para></listitem>
</varlistentry>
</variablelist>
</sect1>
</appendix>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<sect1 id="tv-input" xreflabel="TV input">
<title>TV input</title>
<para>
This section is about how to enable <emphasis role="bold">watching/grabbing
from V4L compatible TV tuner</emphasis>.
</para>
<sect2 id="tv-compilation">
<title>Compilation</title>
<procedure>
<step><para>
First, you have to recompile. <filename>./configure</filename> will
autodetect kernel headers of v4l stuff and the existence of
<filename>/dev/video*</filename> entries. If they exist, TV support will
be built (see the output of <filename>./configure</filename>).
</para></step>
<step><para>
Make sure your tuner works with another TV software in Linux, for
example xawtv.
</para></step>
</procedure>
</sect2>
<sect2 id="tv-tips">
<title>Usage tips</title>
<para>
The full listing of the options is available on the manual page.
Here are just a few tips:
</para>
<itemizedlist>
<listitem>
<para>
Use the <option>channels</option> option. An example:
<screen>-tv on:channels=26-MTV1,23-TV2</screen>
Explanation: using this option, only the 26 and 23 channels will be usable,
and there will be a nice OSD text upon channel switching, displaying the
channel's name. Spaces in the channel name must be replaced by the
"_" character.
</para>
</listitem>
<listitem>
<para>
Choose some sane image dimensions. The dimensions of the resulting image should
be divisible by 16.
</para>
</listitem>
<listitem>
<para>
If you capture the video with the vertical resolution higher than half of
the full resolution (i.e. 288 for PAL or 240 for NTSC), make sure you turned
deinterlacing on. Otherwise you'll get a movie which is distorted during
fast-motion scenes and the bitrate controller will be probably even unable
to retain the specified bitrate as the interlacing artifacts produce high
amount of detail and thus consume lot of bandwidth. You can enable
deinterlacing with <option>-vop pp=DEINT_TYPE</option>. Usually
<option>pp=lb</option> does a good job, but it can be matter of personal
preference. See other deinterlacing algorithms in the manual and give it a try.
</para>
</listitem>
<listitem>
<para>
Crop out the dead space. When you capture the video, the areas at the edges
are usually black or contain some noise. These again consume lots of
unnecessary bandwidth. More precisely it's not the black areas themselves
but the sharp transitions between the black and the brighter video image
which do but that's not important for now. Before you start capturing,
adjust the arguments of the <option>crop</option> option so that all the
crap at the margins is cropped out. Again, don't forget to keep the resulting
dimensions sane.
</para>
</listitem>
<listitem>
<para>
Watch out for CPU load. It shouldn't cross the 90% boundary for most of the
time. If you have a large capture buffer, MEncoder can survive an overload
for few seconds but nothing more. It's better to turn off the 3D OpenGL
screensavers and similar stuff.
</para>
</listitem>
<listitem>
<para>
Don't mess with the system clock. <application>MEncoder</application> uses the
system clock for doing A/V sync. If you adjust the system clock (especially
backwards in time), MEncoder gets confused and you will lose frames. This is
an important issue if you are hooked to a network and run some time
synchronization software like NTP. You have to turn NTP off during the capture
process if you want to capture reliably.
</para>
</listitem>
<listitem>
<para>
Don't change the <option>outfmt</option> unless you know what you are doing
or your card/driver really doesn't support the default (YV12 colorspace).
In the older versions of <application>MPlayer</application>/
<application>MEncoder</application> it was necessary to specify the output
format. This issue should be fixed in the current releases and <option>outfmt</option>
isn't required anymore, and the default suits the most purposes. For example,
if you are capturing into DivX using libavcodec and specify
<option>outfmt=RGB24</option> in order to increase the quality of the captured
images, the captured image will be actually later converted back into YV12 so
the only thing you achieve is a massive waste of CPU power.
</para>
</listitem>
<listitem>
<para>
To specify the I420 colorspace (<option>outfmt=i420</option>), you have to add an
option <option>-vc rawi420</option> due to a fourcc conflict with an Intel Indeo
video codec.
</para>
</listitem>
<listitem>
<para>
There are several ways of capturing audio. You can grab the sound either using
your soundcard via an external cable connection between video card and line-in,
or using the built-in ADC in the bt878 chip. In the latter case, you have to
load the <emphasis role="bold">btaudio</emphasis> driver. Read the
<filename>linux/Documentation/sound/btaudio</filename> file (in the kernel
tree, not MPlayer's) for some instructions on using this driver.
</para>
</listitem>
<listitem>
<para>
If <application>MEncoder</application> cannot open the audio device, make
sure that it is really available. There can be some trouble with the sound
servers like arts (KDE) or esd (GNOME). If you have a full duplex soundcard
(almost any decent card supports it today), and you are using KDE, try to
check the "full duplex" option in the sound server preference menu.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="tv-examples">
<title>Examples</title>
<informalexample>
<para>
Dummy output, to AAlib :)
<screen>
mplayer -tv on:driver=dummy:width=640:height=480 -vo aa<!--
--></screen>
</para>
</informalexample>
<informalexample>
<para>
Input from standard V4L:
<screen>
mplayer -tv on:driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv<!--
--></screen>
</para>
</informalexample>
<informalexample>
<para>
A more sophisticated example. This makes MEncoder capture the full PAL
image, crop the margins, and deinterlace the picture using a linear blend
algorithm. Audio is compressed with a constant bitrate of 64kbps, using
LAME codec. This setup is suitable for capturing movies.
<screen>
mencoder -tv on:driver=v4l:width=768:height=576 \
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 \
-oac mp3lame -lameopts cbr:br=64 \
-vop pp=lb,crop=720:544:24:16 -o output.avi
</screen>
</para>
</informalexample>
<informalexample>
<para>
This will additionally rescale the image to 384x288 and compresses the
video with the bitrate of 350kbps in high quality mode. The vqmax option
looses the quantizer and allows the video compressor to actualy reach so
low bitrate even at the expense of the quality. This can be used for
capturing long TV series, where the video quality isn't so important.
<screen>
mencoder -tv on:driver=v4l:width=768:height=576 \
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=350:vhq:vqmax=31:keyint=300 \
-oac mp3lame -lameopts cbr:br=48 \
-vop scale=384:288,pp=tn/lb,crop=720:540:24:18 -sws 1 -o output.avi
</screen>
It's also possible to specify smaller image dimensions in the <option>-tv</option>
option and omit the software scaling but this approach uses the maximum available
information and is a little more resistant to noise. The bt8x8 chips can do the
pixel averaging only in the horizontal direction due to a hardware limitation.
</para>
</informalexample>
</sect2>
</sect1>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<chapter id="usage">
<title>Usage</title>
<sect1 id="commandline">
<title>Command line</title>
<para>
<application>MPlayer</application> utilizes a complex playtree. It consists
of global options written as first, for example
<screen>mplayer -vfm 5</screen>
and options written after filenames, that apply only to the given
filename/URL/whatever, for example:
<screen>mplayer -vfm 5 movie1.avi movie2.avi -vfm 4</screen>
</para>
<para>
You can group filenames/URLs together using <literal>{</literal> and
<literal>}</literal>. It's useful with option <option>-loop</option>:
<screen>mplayer { 1.avi - loop 2 2.avi } -loop 3</screen>
The above command will play files in this order: 1, 1, 2, 1, 1, 2, 1, 1, 2.
</para>
<para>
Playing a file:
<synopsis>
<command>mplayer</command><!--
--> [<replaceable>options</replaceable>]<!--
--> [<replaceable>path</replaceable>/]<replaceable>filename</replaceable>
</synopsis>
</para>
<para>
Playing more files:
<synopsis>
<command>mplayer</command><!--
--> [<replaceable>default options</replaceable>]<!--
--> [<replaceable>path</replaceable>/]<replaceable>filename1</replaceable><!--
--> [<replaceable>options for filename1</replaceable>]<!--
--> <replaceable>filename2</replaceable><!--
--> [<replaceable>options for filename2</replaceable>] ...
</synopsis>
</para>
<para>
Playing VCD:
<synopsis>
<command>mplayer</command> [<replaceable>options</replaceable>]<!--
--> -vcd <replaceable>trackno</replaceable><!--
--> [-cdrom-device <replaceable>/dev/cdrom</replaceable>]
</synopsis>
</para>
<para>
Playing DVD:
<synopsis>
<command>mplayer</command> [<replaceable>options</replaceable>]<!--
--> -dvd <replaceable>titleno</replaceable><!--
--> [-dvd-device <replaceable>/dev/dvd</replaceable>]
</synopsis>
</para>
<para>
Playing from the WWW:
<synopsis>
<command>mplayer</command> [<replaceable>options</replaceable>]<!--
--> http://<replaceable>site.com/file.asf</replaceable>
</synopsis>
(playlists can be used, too)
</para>
<para>
Playing from RTSP:
<synopsis>
<command>mplayer</command> [<replaceable>options</replaceable>]<!--
--> rtsp://<replaceable>server.example.com/streamName</replaceable>
</synopsis>
</para>
<para>
Latest versions of <application>MPlayer</application> also accepts VCD and
DVD tracks in URL style, just like <application>Xine</application> does:
<screen>mplayer dvd://1</screen>
or
<screen>mplayer vcd://1</screen>
</para>
<para>
Examples:
<screen>
mplayer -vo x11 /mnt/Films/Contact/contact2.mpg
mplayer -vcd 2
mplayer -afm 3 /mnt/DVDtrailers/alien4.vob
mplayer -dvd 1 -dvd-device /dev/hdc
mplayer -abs 65536 -delay -0.4 -nobps ~/movies/test.avi<!--
--></screen>
</para>
</sect1>
<sect1 id="control">
<title>Control</title>
<para>
<application>MPlayer</application> has a fully configurable, command
driven, control layer which lets you control
<application>MPlayer</application> with keyboard, mouse, joystick or remote
control (using LIRC). See the man page for the complete list of keyboard controls.
</para>
<sect2 id="ctrl-cfg">
<title>Controls configuration</title>
<para>
<application>MPlayer</application> allows you bind any key/button to any
MPlayer command using a simple config file. The syntax consist of a key
name followed by a command. The default config file location is
<filename>$HOME/.mplayer/input.conf</filename> but it can be overridden
using the <option>-input <replaceable>conf</replaceable></option> option
(relative path are relative to <filename>$HOME/.mplayer</filename>).
</para>
<example>
<title>A simple input control file</title>
<programlisting>
##
## MPlayer input control file
##
RIGHT seek +10
LEFT seek -10
- audio_delay 0.100
+ audio_delay -0.100
q quit
> pt_step 1
< pt_step -1
ENTER pt_step 1 1<!--
--></programlisting>
</example>
<sect3 id="ctrl-cfg-keys">
<title>Key names</title>
<para>
You can have a full list by running
<command>mplayer -input keylist</command>.
</para>
<itemizedlist>
<title>Keyboard</title>
<listitem><simpara>Any printable character</simpara></listitem>
<listitem><simpara><literal>SPACE</literal></simpara></listitem>
<listitem><simpara><literal>ENTER</literal></simpara></listitem>
<listitem><simpara><literal>TAB</literal></simpara></listitem>
<listitem><simpara><literal>CTRL</literal></simpara></listitem>
<listitem><simpara><literal>BS</literal></simpara></listitem>
<listitem><simpara><literal>DEL</literal></simpara></listitem>
<listitem><simpara><literal>INS</literal></simpara></listitem>
<listitem><simpara><literal>HOME</literal></simpara></listitem>
<listitem><simpara><literal>END</literal></simpara></listitem>
<listitem><simpara><literal>PGUP</literal></simpara></listitem>
<listitem><simpara><literal>PGDWN</literal></simpara></listitem>
<listitem><simpara><literal>ESC</literal></simpara></listitem>
<listitem><simpara><literal>RIGHT</literal></simpara></listitem>
<listitem><simpara><literal>LEFT</literal></simpara></listitem>
<listitem><simpara><literal>UP</literal></simpara></listitem>
<listitem><simpara><literal>DOWN</literal></simpara></listitem>
</itemizedlist>
<itemizedlist>
<title>Mouse (only supported under X)</title>
<listitem><simpara>
<literal>MOUSE_BTN0</literal> (Left button)</simpara></listitem>
<listitem><simpara>
<literal>MOUSE_BTN1</literal> (Right button)</simpara></listitem>
<listitem><simpara>
<literal>MOUSE_BTN2</literal> (Middle button)</simpara></listitem>
<listitem><simpara>
<literal>MOUSE_BTN3</literal> (Wheel)</simpara></listitem>
<listitem><simpara>
<literal>MOUSE_BTN4</literal> (Wheel)</simpara></listitem>
<listitem><simpara>...</simpara></listitem>
<listitem><simpara><literal>MOUSE_BTN9</literal></simpara></listitem>
</itemizedlist>
<itemizedlist>
<title>Joystick (support must be enabled at compile time)</title>
<listitem><simpara>
<literal>JOY_RIGHT</literal> or
<literal>JOY_AXIS0_PLUS</literal></simpara></listitem>
<listitem><simpara>
<literal>JOY_LEFT</literal> or
<literal>JOY_AXIS0_MINUS</literal></simpara></listitem>
<listitem><simpara>
<literal>JOY_UP</literal> or
<literal>JOY_AXIS1_MINUS</literal></simpara></listitem>
<listitem><simpara>
<literal>JOY_DOWN</literal> or
<literal>JOY_AXIS1_PLUS</literal></simpara></listitem>
<listitem><simpara><literal>JOY_AXIS2_PLUS</literal></simpara></listitem>
<listitem><simpara><literal>JOY_AXIS2_MINUS</literal></simpara></listitem>
<listitem><simpara>...</simpara></listitem>
<listitem><simpara><literal>JOY_AXIS9_PLUS</literal></simpara></listitem>
<listitem><simpara><literal>JOY_AXIS9_MINUS</literal></simpara></listitem>
</itemizedlist>
</sect3>
<sect3 id="ctrl-cfg-commands">
<title>Commands</title>
<para>
You can have a full list of known commands by running
<command>mplayer -input cmdlist</command>.
</para>
<itemizedlist>
<listitem><para><literal>seek</literal> (int) val [(int) type=0]</para>
<para>
Seek to some place in the movie.
Type <literal>0</literal> is a relative seek of +/- val seconds.
Type <literal>1</literal> seek to val % in the movie.
</para></listitem>
<listitem><para><literal>audio_delay</literal> (float) val</para>
<para>
Adjust the audio delay of val seconds
</para></listitem>
<listitem><para><literal>quit</literal></para>
<para>
Quit <application>MPlayer</application>
</para></listitem>
<listitem><para><literal>pause</literal></para>
<para>
Pause/unpause the playback
</para></listitem>
<listitem><para><literal>grap_frames</literal></para>
<para>
Somebody know ?
</para></listitem>
<listitem><para><literal>pt_step</literal> (int) val [(int) force=0]</para>
<para>
Go to next/previous entry in playtree. Val sign tell the direction. If
no other entry is available in the given direction it won't do anything
unless force is non 0.
</para></listitem>
<listitem><para><literal>pt_up_step</literal> (int) val [(int) force=0]</para>
<para>
Like pt_step but it jump to next/previous in the parent list. It's useful
to break inner loop in the playtree.
</para></listitem>
<listitem><para><literal>alt_src_step</literal> (int) val</para>
<para>
When more than one source is available it select the next/previous one
(only supported by asx playlist).
</para></listitem>
<listitem><para><literal>sub_delay</literal> (float) val [(int) abs=0]</para>
<para>
Adjust the subtitles delay of +/- val seconds or set it to val seconds
when abs is non zero.
</para></listitem>
<listitem><para><literal>osd</literal> [(int) level=-1]</para>
<para>
Toggle osd mode or set it to level when level > 0.
</para></listitem>
<listitem><para><literal>volume</literal> (int) dir</para>
<para>Increase/decrease volume
</para></listitem>
<listitem><simpara><literal>contrast</literal> (int) val [(int) abs=0]
</simpara></listitem>
<listitem><simpara><literal>brightness</literal> (int) val [(int) abs=0]
</simpara></listitem>
<listitem><simpara><literal>hue</literal> (int) val [(int) abs=0]
</simpara></listitem>
<listitem><para><literal>saturation</literal> (int) val [(int) abs=0]</para>
<para>
Set/Adjust video parameters. Val range from -100 to 100.
</para></listitem>
<listitem><para><literal>frame_drop</literal> [(int) type=-1]</para>
<para>
Toggle/Set frame dropping mode.
</para></listitem>
<listitem><para><literal>sub_visibility</literal></para>
<para>
Adjust subtitles visibility.
</para></listitem>
<listitem><para><literal>sub_pos</literal> (int) val</para>
<para>
Adjust subtitles position.
</para></listitem>
<listitem><para><literal>vobsub_lang</literal></para>
<para>
Change the language of VobSub subtitles.
</para></listitem>
<listitem><para><literal>vo_fullscreen</literal></para>
<para>
Switch fullscreen mode.
</para></listitem>
<listitem><para><literal>tv_step_channel</literal> (int) dir</para>
<para>
Select next/previous tv channel.
</para></listitem>
<listitem><para><literal>tv_step_norm</literal></para>
<para>
Change TV norm.
</para></listitem>
<listitem><para><literal>tv_step_chanlist</literal></para>
<para>
Change channel list.
</para></listitem>
<listitem><simpara><literal>gui_loadfile</literal></simpara></listitem>
<listitem><simpara><literal>gui_loadsubtitle</literal></simpara></listitem>
<listitem><simpara><literal>gui_about</literal></simpara></listitem>
<listitem><simpara><literal>gui_play</literal></simpara></listitem>
<listitem><simpara><literal>gui_stop</literal></simpara></listitem>
<listitem><simpara><literal>gui_playlist</literal></simpara></listitem>
<listitem><simpara><literal>gui_preferences</literal></simpara></listitem>
<listitem><para><literal>gui_skinbrowser</literal></para>
<para>
GUI actions
</para></listitem>
</itemizedlist>
</sect3>
</sect2>
<sect2 id="lirc">
<title>Control from LIRC</title>
<para>
Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver,
an (almost) arbitrary remote control and control your linux box with it!
More about it at <ulink url="http://www.lirc.org">www.lirc.org</ulink>.
</para>
<para>
If you have installed the lirc-package, configure will autodetect it. If
everything went fine, <application>MPlayer</application> will print a
message like "<computeroutput>Setting up lirc support...</computeroutput>"
on startup. If an error occurs it will tell you. If it doesn't tell you
anything about LIRC there's no support compiled in. That's it :-)
</para>
<para>
The application name for <application>MPlayer</application> is - oh wonder
- <filename>mplayer</filename>. You can use any mplayer commands and even
pass more than one command by separating them with <literal>\n</literal>.
Don't forget to enable the repeat flag in <filename>.lircrc</filename> when
it make sense (seek, volume, etc). Here's an excerpt from my
<filename>.lircrc</filename>:
</para>
<programlisting>
begin
button = VOLUME_PLUS
prog = mplayer
config = volume 1
repeat = 1
end
begin
button = VOLUME_MINUS
prog = mplayer
config = volume -1
repeat = 1
end
begin
button = CD_PLAY
prog = mplayer
config = pause
end
begin
button = CD_STOP
prog = mplayer
config = seek 0 1\npause
end<!--
--></programlisting>
<para>
If you don't like the standard location for the lirc-config file
(<filename>~/.lircrc</filename>) use the <option>-lircconf
<replaceable>filename</replaceable></option> switch to specify another
file.
</para>
</sect2>
<sect2 id="slave-mode">
<title>Slave mode</title>
<para>
The slave mode allow you to build simple frontend to
<application>MPlayer</application>. When enabled (with the
<option>-slave</option> option) <application>MPlayer</application> will
read commands separated by new line (\n) from stdin.
</para>
</sect2>
</sect1>
<sect1 id="streaming">
<title>Streaming from network or pipes</title>
<para>
<application>MPlayer</application> can play files from network, using the
HTTP or MMS protocol.
</para>
<para>
Playing goes by simply using adding the URL to the command line.
<application>MPlayer</application> also honors the
<envar>http_proxy</envar> environment variable, and uses proxy if
available. Proxy usage can also be forced:
<screen>mplayer http_proxy://proxy.micorsops.com:3128/http://micorsops.com:80/stream.asf</screen>
</para>
<para>
<application>MPlayer</application> can read from stdin
(<emphasis>not</emphasis> named pipes). This can be for example used to
play from FTP:
<screen>wget ftp://micorsops.com/something.avi -O - | mplayer -</screen>
</para>
<para>
Note: it's also recommended to enable CACHE when playback from network:
<screen>wget ftp://micorsops.com/something.avi -O - | mplayer -cache 8192 -</screen>
</para>
</sect1>
</chapter>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<appendix id="users-vs-dev">
<title>Developer cries</title>
<sect1 id="gcc-296">
<title>GCC 2.96</title>
<formalpara>
<title>The background:</title>
<para>
The GCC <emphasis>2.95</emphasis> series is an official GNU release and
version 2.95.3 of GCC is the most bug-free in that series. We have never
noticed compilation problems that we could trace to gcc-2.95.3. Starting
with Red Hat Linux 7.0, <emphasis>Red Hat</emphasis> included a heavily
patched CVS version of GCC in their distribution and named it
<emphasis>2.96</emphasis>. Red Hat included this version in the
distribution because GCC 3.0 was not finished at the time, and they needed
a compiler that worked well on all of their supported platforms, including
IA64 and s390. The Linux distributor <emphasis>Mandrake</emphasis> also
followed Red Hat's example and started shipping GCC 2.96 with their
Linux-Mandrake 8.0 series.
</para>
</formalpara>
<formalpara>
<title>The statements:</title>
<para>
The GCC team disclaimed any link with GCC 2.96 and issued an
<ulink url="http://gcc.gnu.org/gcc-2.96.html">official response</ulink>
to GCC 2.96. Many developers around the world began having problems with
GCC 2.96, and started recommending other compilers. Examples are
<ulink url="http://www.mysql.com/downloads/mysql-3.23.html">MySQL</ulink>,
<ulink url="http://avifile.sourceforge.net/news-old1.htm">avifile</ulink>
and
<ulink url="http://www.winehq.com/news/?view=92#RH 7.1 gcc fixes compiler bug">Wine</ulink>.
Other interesting links are
<ulink url="http://www.atnf.csiro.au/people/rgooch/linux/docs/kernel-newsflash.html">
Linux kernel news flash about kernel 2.4.17</ulink>
and
<ulink url="http://www.voy.com/3516/572.html">Voy Forum</ulink>.
<application>MPlayer</application> also suffered from intermittent problems
that were all solved by switching to a different version of GCC. Several
projects started implementing workarounds for some of the 2.96 issues, but
we refused to fix other people's bugs, especially since some workarounds
may imply a performance penalty.
</para>
</formalpara>
<para>
You can read about the other side of the story
<ulink url="http://www.bero.org/gcc296.html">at this site</ulink>.
GCC 2.96 does not allow <literal>|</literal> (pipe) characters in assembler
comments because it supports Intel as well as AT&T Syntax and the
<literal>|</literal> character is a symbol in the Intel variant. The
problem is that it <emphasis>silently</emphasis> ignores the whole
assembler block. This is supposedly fixed now, GCC prints a warning instead
of skipping the block.
</para>
<formalpara>
<title>The present:</title>
<para>
Red Hat says that GCC 2.96-85 and above is fixed. The situation has indeed
improved, yet we still see problem reports on our mailing lists that
disappear with a different compiler. In any case it does not matter any
longer. Hopefully a maturing GCC 3.x will solve the issue for good. If you
want to compile with 2.96 give the <option>--disable-gcc-checking</option>
flag to <filename>configure</filename>. Remember that you are on your own
and <emphasis>do not report any bugs</emphasis>. If you do, you will only
get banned from our mailing list because we have had more than enough flame
wars over GCC 2.96. Please let the matter rest.
</para>
</formalpara>
<para>
If you have problems with GCC 2.96, you can get 2.96-85 packages from the
Red Hat <ulink url="ftp://updates.redhat.com">ftp server</ulink>, or just
go for the 3.0.4 packages offered for version 7.2 and later. You can also
get <ulink url="ftp://people.redhat.com/jakub/gcc/3.2-10/">gcc-3.2-10 packages</ulink>
(unofficial, but working fine)
and you can install them along the gcc-2.96 you already have. MPlayer will
detect it and use 3.1 instead of 2.96. If you do not want to or cannot use
the binary packages, here is how you can compile GCC 3.1 from source:
</para>
<procedure>
<step><para>
Go to the
<ulink url="http://gcc.gnu.org/mirrors.html">GCC mirrors page</ulink>
page and download <filename>gcc-core-XXX.tar.gz</filename> where XXX is
the version number. This includes the complete C compiler and is sufficient for
<application>MPlayer</application>. If you also want C++, Java or some of
the other advanced GCC features <filename>gcc-XXX.tar.gz</filename> may
better suit your needs.
</para></step>
<step><para>
Extract the archive with
<screen>tar -xvzf gcc-core-XXX.tar.gz</screen>
</para></step>
<step><para>
GCC is not built inside the source directory itself like most programs,
but needs a build directory outside the source directory. Thus you need
to create this directory via
<screen>mkdir gcc-build</screen>
</para></step>
<step><para>
Then you can proceed to configure gcc in the build directory, but you
need the configure from the source directory:
<screen>
cd gcc-build
../gcc-3.XXX/configure</screen>
</para></step>
<step><para>
Compile GCC by issuing this command in the build directory:
<screen>make bootstrap</screen>
</para></step>
<step><para>
Now you can install GCC (as root) by typing
<screen>make install</screen>
</para></step>
</procedure>
</sect1>
<sect1 id="mplayer-binary">
<title>Binary distribution</title>
<para>
<application>MPlayer</application> previously contained source from the
OpenDivX project, which disallows binary redistribution.This code has been
removed in version 0.90-pre1 and the remaining file <filename>divx_vbr.c</filename>
that is derived from OpenDivX sources has been put under the GPL by its authors
as of version 0.90pre9. You are now welcome to create binary packages as you
see fit.
</para>
<para>
Another impediment to binary redistribution was compiletime optimizations
for CPU architecture. <application>MPlayer</application> now supports
runtime CPU detection (specify the
<option>--enable-runtime-cpudetection</option> option when compiling). It
is disabled by default because it implies a small speed sacrifice, it is
now possible to create binaries that run on different members of the Intel
CPU family.
</para>
</sect1>
<sect1 id="nvidia-opinions">
<title>nVidia</title>
<para>
We dislike the fact that <ulink url="http://www.nvidia.com">nVidia</ulink>
only provides binary drivers (for use with XFree86), which are often buggy.
We have had many reports on
<ulink url="http://mplayerhq.hu/pipermail/mplayer-users/">mplayer-users</ulink>
about problems related to these closed-source drivers
and their poor quality, instability and poor user and expert support.
Here is an example from the
<ulink url="http://www.nvnews.net/forum/showthread.php?s=fda5725bc2151e29453b2da3bd5d2930&threadid=14306">nVidia Linux Forum</ulink>.
Many of these problems/issues keep appearing repeatedly.
We have been contacted by nVidia lately, and they said these bugs do not
exist, instability is caused by bad AGP chips, and they received no reports
of driver bugs (like the purple line). So if you have a problem with your
nVidia card, you are advised to update the nVidia driver and/or buy a new
motherboard or ask nVidia to supply open-source drivers. In any case, if
you are using the nVidia binary drivers and facing driver related problems,
please be aware that you will receive very little help from our side
because we have little power to help in this matter.
</para>
</sect1>
<sect1 id="joe-barr">
<title>Joe Barr</title>
<para>
Joe Barr became infamous by writing a less than favorable
<ulink url="http://www.linuxworld.com/site-stories/2001/1214.mplayer.html">
<application>MPlayer</application> review</ulink>.
He found <application>MPlayer</application> hard to install, but then
again he is not very fond of
<ulink
url="http://www.linuxworld.com/linuxworld/lw-2000-06/lw-06-exam.html">reading documentation</ulink>.
He also concluded that the developers were unfriendly and the documentation
incomplete and insulting. You be the judge.
He went on to mention <application>MPlayer</application> negatively in his
<ulink url="http://www.linuxworld.com/site-stories/2001/1227.predictions.html">10 Linux predictions for 2002</ulink>.
In a followup
<ulink url="http://www.linuxworld.com/site-stories/2002/0125.xine.html">review of xine</ulink>
he continued stirring up controversy. Ironically at the end of that article
he quotes his exchange with Günter Bartsch, the original author of xine,
that perfectly summarizes the whole situation:
<blockquote><para>
However, he also went on to say that he was "surprised" by my column about
Mplayer and thought it was unfair, reminding me that it is a free software
project. "If you don't like it," Bartsch said, "you're free not to use it."
</para></blockquote>
</para>
<para>
He does not reply to our mails. His editor does not reply to our mails.
Here are some quotes from different people about Joe Barr, so you can form
your own opinion:
</para>
<para>
Marc Rassbach has
<ulink url="http://daily.daemonnews.org/view_story.php3?story_id=2102">something to say</ulink>
about the man
<blockquote><para>
You may all remember the LinuxWorld 2000, when he claimed that Linus T said
that 'FreeBSD is just a handful of programmers'. Linus said NOTHING of the
sort. When Joe was called on this, his reaction was to call BSD supporters
assholes and jerks.
</para></blockquote>
</para>
<para>
A <ulink url="http://www.mplayerhq.hu/pipermail/mplayer-users/2001-December/009118.html">quote</ulink>
from Robert Munro on the
<ulink url="http://mplayerhq.hu/pipermail/mplayer-users/">mplayer-users</ulink>
mailing list:
<blockquote>
<para>
He's interesting, but not good at avoiding, um... controversy. Joe Barr
used to be one of the regulars on Will Zachmann's Canopus forum on
Compuserve, years ago. He was an OS/2 advocate then (I was an OS/2 fan
too).
</para>
<para>
He used to go over-the-top, flaming people, and I suspect he had some hard
times, then. He's mellowed some, judging by his columns recently.
Moderately subtle humor was not his mode in those earlier days, not at all.
</para>
</blockquote>
</para>
</sect1>
</appendix>
--- NEW FILE ---
<?xml version="1.0" encoding="iso-8859-1"?>
<sect2 id="video-dev">
<title>Video output devices</title>
<sect3 id="mtrr">
<title>Setting up MTRR</title>
<para>
It is VERY recommended to check if the MTRR registers
are set up properly, because they can give a big performance boost.
</para>
<para>
Do a <command>/proc/mtrr</command>:
<screen>
<prompt>--($:~)--</prompt> cat /proc/mtrr
reg00: base=0xe4000000 (3648MB), size= 16MB: write-combining, count=9
reg01: base=0xd8000000 (3456MB), size= 128MB: write-combining, count=1<!--
--></screen>
[...2102 lines suppressed...]
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
</programlisting>
</para>
<para>
Of course the important thing is the TwinView part.
</para>
</sect4>
</sect3>
</sect2>
- Previous message: [Mplayer-cvslog] CVS: main/DOCS/xml BUGS,NONE,1.1 default.css,NONE,1.1 gen-html.xsl.sh,NONE,1.1 html-common.xsl,NONE,1.1 ldp.dsl,NONE,1.1 Makefile,NONE,1.1 Makefile.inc,NONE,1.1 README,NONE,1.1 README.maintainers,NONE,1.1
- Next message: [Mplayer-cvslog] CVS: main/DOCS/xml/xsl ldp-html-chunk.xsl,NONE,1.1 ldp-html-common.xsl,NONE,1.1 ldp-html.xsl,NONE,1.1ldp-print.xsl,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list