2003-03-23 23:35:12 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
2003-09-21 13:05:42 +00:00
<!-- $Revision$ -->
2006-01-05 23:32:18 +00:00
<chapter id= "codecs" >
<title > Codecs</title>
2003-03-23 23:35:12 +00:00
2006-01-05 23:32:18 +00:00
<sect1 id= "video-codecs" >
2003-03-23 23:35:12 +00:00
<title > Video codecs</title>
<para >
2006-09-05 13:42:52 +00:00
The <ulink url= "../../codecs-status.html" > codec status table</ulink> is a
complete list of all supported codecs, regenerated daily.
Some binary codecs for use with MPlayer are available in the
<ulink url= "http://www.mplayerhq.hu/design7/dload.html#binary_codecs" > download section</ulink>
of our homepage.
2003-03-23 23:35:12 +00:00
</para>
<para >
The most important ones above all:
</para>
<itemizedlist >
<listitem > <simpara >
2004-11-24 11:23:21 +00:00
<emphasis role= "bold" > MPEG-1</emphasis> (<emphasis role= "bold" > VCD</emphasis> ) and
<emphasis role= "bold" > MPEG-2</emphasis> (<emphasis role= "bold" > DVD</emphasis> ) video
2003-03-23 23:35:12 +00:00
</simpara> </listitem>
<listitem > <simpara >
native decoders for <emphasis role= "bold" > DivX ;-), OpenDivX (DivX4),
2006-10-22 12:17:07 +00:00
DivX6 (Pro), 3ivX, M$ MPEG-4</emphasis> v1, v2 and other MPEG-4 variants
2003-03-23 23:35:12 +00:00
</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 >
2003-05-19 17:18:05 +00:00
native <emphasis role= "bold" > Sorenson 3 (SVQ3)</emphasis> decoder
2003-03-23 23:35:12 +00:00
</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 >
2004-08-24 11:10:40 +00:00
VIVO 1.0, 2.0, I263 and other <emphasis role= "bold" > H.263(+)</emphasis> variants
2003-03-23 23:35:12 +00:00
</simpara> </listitem>
<listitem > <simpara >
FLI/FLC
</simpara> </listitem>
<listitem > <simpara >
2004-01-21 19:25:18 +00:00
<emphasis role= "bold" > RealVideo 1.0 & 2.0</emphasis> from
<systemitem class= "library" > libavcodec</systemitem> , and
2003-12-12 16:25:40 +00:00
<emphasis role= "bold" > RealVideo 3.0 & 4.0</emphasis> codecs using RealPlayer
2003-12-12 13:10:15 +00:00
libraries
2003-03-23 23:35:12 +00:00
</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,
2004-11-29 18:44:08 +00:00
please read the <link linkend= "codec-importing" > codec importing HOWTO</link>
2003-03-23 23:35:12 +00:00
and help us add support for it.
</para>
2006-01-05 23:32:18 +00:00
<sect2 id= "ffmpeg" xreflabel= "FFmpeg/libavcodec" >
2003-10-14 09:39:00 +00:00
<title > FFmpeg/libavcodec</title>
2003-03-23 23:35:12 +00:00
<para >
2006-10-21 20:07:49 +00:00
<ulink url= "http://ffmpeg.org" > FFmpeg</ulink> contains
<systemitem class= "library" > libavcodec</systemitem> , the leading
open source video and audio codec library. It is capable
of decoding most multimedia formats, usually at higher speeds
than the alternatives. and aims to add support for
the rest of them eventually. It is the default decoder for
the majority of codecs that <application > MPlayer</application>
supports. Encoding is also possible for some formats and
supported in <application > MEncoder</application> .
2003-10-12 21:16:58 +00:00
</para>
<para >
For a complete list of supported codecs please visit the FFmpeg homepage.
2004-12-05 23:54:49 +00:00
Supported <ulink url= "http://ffmpeg.org/ffmpeg-doc.html#SEC19" > video</ulink>
and <ulink url= "http://ffmpeg.org/ffmpeg-doc.html#SEC20" > audio</ulink> codecs.
2003-05-19 17:18:05 +00:00
</para>
2003-03-23 23:35:12 +00:00
<para >
2006-10-21 20:07:49 +00:00
<application > MPlayer</application> contains
<systemitem class= "library" > libavcodec</systemitem> .
2006-06-06 13:58:03 +00:00
Just run <filename > configure</filename> and compile.
2006-06-06 18:58:36 +00:00
</para>
2003-03-23 23:35:12 +00:00
2006-01-05 23:32:18 +00:00
</sect2>
2003-03-23 23:35:12 +00:00
2006-01-05 23:32:18 +00:00
<sect2 id= "xvid" >
2003-03-29 01:45:21 +00:00
<title > XviD</title>
2003-03-23 23:35:12 +00:00
<para >
2005-06-12 20:22:09 +00:00
<ulink url= "http://www.xvid.org" > XviD</ulink> is a free software MPEG-4 ASP
2005-06-30 19:53:24 +00:00
compliant video codec, which features two pass encoding and full MPEG-4 ASP
2005-06-12 19:44:52 +00:00
support, making it a lot more efficient than the well-known DivX codec.
It yields very good video quality and good performance due to CPU
optimizations for most modern processors.
</para>
<para >
It began as a forked development of the OpenDivX codec.
This happened when ProjectMayo changed OpenDivX to closed source
2006-10-22 12:17:07 +00:00
DivX4 (now DivX6), and the non-ProjectMayo people working on OpenDivX got angry,
2003-03-29 01:45:21 +00:00
then started XviD. So both projects have the same origin.
2003-03-23 23:35:12 +00:00
</para>
2006-10-21 20:07:49 +00:00
<para >
2006-10-22 12:17:07 +00:00
Note that XviD is not necessary to decode XviD-encoded video.
2006-10-21 20:07:49 +00:00
<systemitem class= "library" > libavcodec</systemitem> is used by
default as it offers better speed.
</para>
2003-03-23 23:35:12 +00:00
<procedure >
2005-06-12 19:44:52 +00:00
<title > Installing <systemitem class= "library" > XviD</systemitem> </title>
2003-03-23 23:35:12 +00:00
<para >
2005-06-12 19:44:52 +00:00
Like most open source software, it is available in two flavors:
<ulink url= "http://www.xvid.org/downloads.html" > official releases</ulink>
and the CVS version.
The CVS version is usually stable enough to use, as most of the time it
features fixes for bugs that exist in releases.
Here is what to do to make <systemitem class= "library" > XviD</systemitem>
CVS work with <application > MEncoder</application> (you need at least
2005-07-23 10:12:44 +00:00
<application > autoconf</application> 2.50,
<application > automake</application> and <application > libtool</application> ):
2003-03-23 23:35:12 +00:00
</para>
<step > <para >
<screen > cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid login</screen>
</para> </step>
<step > <para >
<screen > cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcore</screen>
</para> </step>
<step > <para >
<screen > cd xvidcore/build/generic</screen>
</para> </step>
<step > <para >
2003-03-29 01:45:21 +00:00
<screen > ./bootstrap.sh</screen>
2003-03-23 23:35:12 +00:00
</para> </step>
<step > <para >
2003-03-29 01:45:21 +00:00
<screen > ./configure</screen>
You may have to add some options (examine the output of
2004-09-02 06:40:16 +00:00
<command > ./configure --help</command> ).
2003-03-23 23:35:12 +00:00
</para> </step>
<step > <para >
2003-03-29 01:45:21 +00:00
<screen > make & & make install</screen>
2003-03-23 23:35:12 +00:00
</para> </step>
<step > <para >
2003-03-29 01:45:21 +00:00
If you specified <option > --enable-divxcompat</option> ,
copy <filename > ../../src/divx4.h</filename> to
2003-03-23 23:35:12 +00:00
<filename class= "directory" > /usr/local/include/</filename> .
</para> </step>
<step > <para >
Recompile <application > MPlayer</application> with
2004-02-27 07:10:27 +00:00
<option > --with-xvidlibdir=<replaceable > /path/to/</replaceable> libxvidcore.a</option>
2006-10-20 15:40:43 +00:00
<option > --with-xvidincdir=<replaceable > /path/to/</replaceable> xvid.h</option> .
2003-03-23 23:35:12 +00:00
</para> </step>
</procedure>
2006-01-05 23:32:18 +00:00
</sect2>
2003-03-23 23:35:12 +00:00
2006-01-05 23:32:18 +00:00
<sect2 id= "codec-x264" >
2005-05-02 17:45:23 +00:00
<title > x264</title>
2006-01-05 23:32:18 +00:00
<sect3 id= "codec-x264-whatis" >
2005-05-02 17:45:23 +00:00
<title > What is x264?</title>
<para >
2006-10-21 20:07:49 +00:00
<ulink url= "http://developers.videolan.org/x264.html" > <systemitem class= "library" > x264</systemitem> </ulink>
is a library for
2005-05-02 17:45:23 +00:00
creating H.264 video streams.
It is not 100% complete, but currently it has at least some kind
of support for most of the H.264 features which impact quality.
There are also many advanced features in the H.264 specification
which have nothing to do with video quality per se; many of these
are not yet implemented in
<systemitem class= "library" > x264</systemitem> .
</para>
<itemizedlist >
<title > Encoder features</title>
<listitem > <para > CAVLC/CABAC</para> </listitem>
<listitem > <para > Multi-references</para> </listitem>
2005-12-31 00:41:35 +00:00
<listitem > <para > Intra: all macroblock types (16x16, 8x8, and 4x4 with
2005-05-02 17:45:23 +00:00
all predictions)</para> </listitem>
<listitem > <para > Inter P: all partitions (from 16x16 down to
4x4)</para> </listitem>
<listitem > <para > Inter B: partitions from 16x16 down to 8x8
(including SKIP/DIRECT)</para> </listitem>
<listitem > <para > Ratecontrol: constant quantizer, constant bitrate,
2005-12-31 00:41:35 +00:00
single or multipass ABR, optional VBV</para> </listitem>
2005-05-02 17:45:23 +00:00
<listitem > <para > Scene cut detection</para> </listitem>
<listitem > <para > Adaptive B-frame placement</para> </listitem>
<listitem > <para > B-frames as references / arbitrary frame
order</para> </listitem>
2005-12-31 00:41:35 +00:00
<listitem > <para > 8x8 and 4x4 adaptive spatial transform</para> </listitem>
<listitem > <para > Lossless mode</para> </listitem>
<listitem > <para > Custom quantization matrices</para> </listitem>
<listitem > <para > Parallel encoding of multiple slices</para> </listitem>
2005-05-02 17:45:23 +00:00
</itemizedlist>
2006-01-05 23:32:18 +00:00
</sect3>
2005-05-02 17:45:23 +00:00
2006-01-05 23:32:18 +00:00
<sect3 id= "codec-h264-whatis" >
2005-05-02 17:45:23 +00:00
<title > What is H.264?</title>
<para >
H.264 is one name for a new digital video codec jointly developed
by the ITU and MPEG.
It can also be correctly referred to by the cumbersome names of
"ISO/IEC 14496-10" or "MPEG-4 Part 10".
More frequently, it is referred to as "MPEG-4 AVC" or just "AVC".
</para>
<para >
Whatever you call it, H.264 may be worth trying because it can
typically match the quality of MPEG-4 ASP with 5%-30% less
bitrate.
Actual results will depend on both the source material and the
encoder.
2005-05-08 21:48:02 +00:00
The gains from using H.264 do not come for free: Decoding H.264
2005-05-02 17:45:23 +00:00
streams seems to have steep CPU and memory requirements.
2005-07-04 05:37:27 +00:00
For instance, on a 1733 MHz Athlon, a DVD-resolution 1500kbps H.264
video requires around 35% CPU to decode.
By comparison, decoding a DVD-resolution 1500kbps MPEG-4 ASP stream
requires around 10% CPU.
2005-05-02 17:45:23 +00:00
This means that decoding high-definition streams is almost out of
the question for most users.
It also means that even a decent DVD rip may sometimes stutter on
processors slower than 2.0 GHz or so.
</para>
<para >
At least with <systemitem class= "library" > x264</systemitem> ,
encoding requirements are not much worse than what you are used to
2005-05-08 21:48:02 +00:00
with MPEG-4 ASP.
2005-05-02 17:45:23 +00:00
For instance, on a 1733 MHz Athlon a typical DVD encode would run
at 5-15fps.
</para>
<para >
This document is not intended to explain the details of H.264,
but if you are interested in a brief overview, you may want to read
<ulink url= "http://www.cdt.luth.se/~peppar/kurs/smd151/spie04-h264OverviewPaper.pdf" > The H.264/AVC Advanced Video Coding Standard: Overview and Introduction to the Fidelity Range Extensions</ulink> .
</para>
2006-01-05 23:32:18 +00:00
</sect3>
2005-05-02 17:45:23 +00:00
2006-01-05 23:32:18 +00:00
<sect3 id= "codec-x264-playback" >
2005-05-02 17:45:23 +00:00
<title > How can I play H.264 videos with <application > MPlayer</application> ?</title>
<para >
<application > MPlayer</application> uses
<systemitem class= "library" > libavcodec</systemitem> 's H.264
decoder.
<systemitem class= "library" > libavcodec</systemitem> has had at
least minimally usable H.264 decoding since around July 2004,
however major changes and improvements have been implemented since
that time, both in terms of more functionalities supported and in
terms of improved CPU usage.
2006-06-06 13:58:03 +00:00
Just to be certain, it is always a good idea to use a recent Subversion
2005-05-02 17:45:23 +00:00
checkout.
</para>
<para >
If you want a quick and easy way to know whether there have been
recent changes to <systemitem class= "library" > libavcodec</systemitem> 's
H.264 decoding, you might keep an eye on
2006-06-06 13:58:03 +00:00
<ulink url= "http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/h264.c?view=log" > FFmpeg Subversion repository's web interface</ulink> .
2005-05-02 17:45:23 +00:00
</para>
2006-01-05 23:32:18 +00:00
</sect3>
2005-05-02 17:45:23 +00:00
2006-01-05 23:32:18 +00:00
<sect3 id= "codec-x264-encode" >
2005-05-02 17:45:23 +00:00
<title > How can I encode videos using <application > MEncoder</application> and <systemitem class= "library" > x264</systemitem> ?</title>
<para >
If you have the subversion client installed, the latest x264
sources can be gotten with this command:
<screen >
2005-07-23 12:10:43 +00:00
svn co svn://svn.videolan.org/x264/trunk x264<!--
--></screen>
2005-05-02 17:45:23 +00:00
<application > MPlayer</application> sources are updated whenever
an <systemitem class= "library" > x264</systemitem> API change
2006-06-06 13:58:03 +00:00
occurs, so it is always suggested to use
<application > MPlayer</application> from Subversion as well.
2005-05-02 17:45:23 +00:00
Perhaps this situation will change when and if an
<systemitem class= "library" > x264</systemitem> "release" occurs.
Meanwhile, <systemitem class= "library" > x264</systemitem> should
be considered very unstable, in the sense that its programming
interface is subject to change.
</para>
<para >
<systemitem class= "library" > x264</systemitem> is built and
installed in the standard way:
<screen >
2005-07-23 12:10:43 +00:00
./configure & & make & & sudo make install<!--
--></screen>
2005-05-02 17:45:23 +00:00
This installs libx264.a in /usr/local/lib and x264.h is placed in
/usr/local/include.
With the <systemitem class= "library" > x264</systemitem> library
and header placed in the standard locations, building
<application > MPlayer</application> with
<systemitem class= "library" > x264</systemitem> support is easy.
Just run the standard:
<screen > ./configure & & make & & sudo make install</screen>
The configure script will autodetect that you have satisfied the
requirements for <systemitem class= "library" > x264</systemitem> .
</para>
2003-03-23 23:35:12 +00:00
</sect3>
</sect2>
2006-01-05 23:32:18 +00:00
</sect1>
2003-03-23 23:35:12 +00:00
<!-- ********** -->
2006-01-05 23:32:18 +00:00
<sect1 id= "audio-codecs" >
2003-03-23 23:35:12 +00:00
<title > Audio codecs</title>
<itemizedlist >
<title > The most important audio codecs above all:</title>
<listitem > <simpara >
2003-10-31 21:56:56 +00:00
MPEG layer 1/2/3 (MP1/2/3) audio (<emphasis role= "bold" > native</emphasis>
2003-03-23 23:35:12 +00:00
code, with MMX/SSE/3DNow! optimization)
</simpara> </listitem>
<listitem > <simpara >
2004-09-02 00:46:21 +00:00
Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) (<emphasis role= "bold" > native</emphasis> code, with
2004-01-21 19:25:18 +00:00
<link linkend= "ffmpeg" > <systemitem class= "library" > libavcodec</systemitem> </link> )
2003-03-23 23:35:12 +00:00
</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 >
2004-10-02 15:56:54 +00:00
AC3 passing through sound card hardware
2003-03-23 23:35:12 +00:00
</simpara> </listitem>
2003-10-31 21:56:56 +00:00
<listitem > <simpara >
AAC
</simpara> </listitem>
2003-03-23 23:35:12 +00:00
<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>
2006-04-09 12:13:59 +00:00
<listitem > <simpara >
Adaptive Multi-Rate (AMR) speech codecs
</simpara> </listitem>
2003-03-23 23:35:12 +00:00
</itemizedlist>
2006-01-05 23:32:18 +00:00
<sect2 id= "swac3" >
2003-03-23 23:35:12 +00:00
<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>
2006-01-05 23:32:18 +00:00
</sect2>
2003-03-23 23:35:12 +00:00
2006-01-05 23:32:18 +00:00
<sect2 id= "hwac3" >
2003-03-23 23:35:12 +00:00
<title > Hardware AC3 decoding</title>
<para >
2004-05-01 12:03:03 +00:00
You need an AC3 capable sound card, with digital out (S/PDIF). The card's
2003-03-23 23:35:12 +00:00
driver must properly support the AFMT_AC3 format (C-Media does). Connect
2004-05-01 12:03:03 +00:00
your AC3 decoder to the S/PDIF output, and use the <option > -ac
2003-03-23 23:35:12 +00:00
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>
2006-01-05 23:32:18 +00:00
</sect2>
2003-03-23 23:35:12 +00:00
2006-01-05 23:32:18 +00:00
<sect2 id= "libmad" >
2003-03-23 23:35:12 +00:00
<title > libmad support</title>
<para >
2004-11-19 12:03:41 +00:00
<ulink url= "http://www.underbit.com/products/mad/" > libmad</ulink> is a multiplatform,
2003-10-31 21:56:56 +00:00
integer (internally 24bit PCM) only
2003-03-23 23:35:12 +00:00
MPEG audio decoding library. It does not handle broken files well, and it
2003-10-31 21:56:56 +00:00
sometimes has problems with seeking, but it may perform better on FPU-less
2003-10-31 21:59:00 +00:00
(such as <link linkend= "arm" > ARM</link> ) platform than mp3lib.
2003-03-23 23:35:12 +00:00
</para>
<para >
2006-10-20 17:13:03 +00:00
If you have a proper installation of libmad, <filename > configure</filename>
will notice and support for MPEG audio decoding via
<systemitem class= "library" > libmad</systemitem> will be built automatically.
2003-03-23 23:35:12 +00:00
</para>
2006-01-05 23:32:18 +00:00
</sect2>
2003-03-23 23:35:12 +00:00
2006-01-19 22:41:15 +00:00
<sect2 id= "hwmpa" >
<title > Hardware MPEG audio codec</title>
<para >
This codec (selected by -ac hwmpa) passes through MPEG audio packets
to hardware decoders, such as the ones found in full-featured DVB cards
and DXR2 adapters.
Don't use it in combination with any other audio output device
(such as OSS and ALSA) that isn't able to decode it (you will hear
only white noise).
</para>
</sect2>
2003-03-23 23:35:12 +00:00
2006-01-05 23:32:18 +00:00
<sect2 id= "aac" >
2003-04-02 20:28:41 +00:00
<title > AAC codec</title>
<para >
AAC (Advanced Audio Coding) is an audio codec sometimes found in MOV and MP4
files. An open source decoder called FAAD is available from
2003-08-31 23:13:50 +00:00
<ulink url= "http://www.audiocoding.com" /> .
2005-02-06 02:19:18 +00:00
<application > MPlayer</application> includes a CVS snapshot of libfaad 2.1
beta, so you do not need to get it separately.
2003-04-02 20:28:41 +00:00
</para>
2003-10-07 10:18:55 +00:00
<para >
If you use gcc 3.2 which fails to compile our internal FAAD or want to use
the external library for some other reason, download the library from the
2004-12-05 23:54:49 +00:00
<ulink url= "http://www.audiocoding.com/modules/mydownloads/" > download page</ulink>
2006-10-20 17:13:03 +00:00
and pass <option > --enable-faad-external</option> to <filename > configure</filename> .
2003-10-07 10:18:55 +00:00
You do not need all of faad2 to decode AAC files, libfaad is enough. Build
it like this:
<screen >
cd faad2/
2005-02-15 03:04:56 +00:00
sh bootstrap
2003-10-07 10:18:55 +00:00
./configure
cd libfaad
make
make install
</screen>
Binaries are not available from audiocoding.com, but you can (apt-)get Debian
2006-06-26 10:50:45 +00:00
packages from <ulink url= "http://www.debian-multimedia.org/" > Christian Marillat's homepage</ulink> ,
2005-07-02 23:33:40 +00:00
Mandrake/Mandriva RPMs from the <ulink url= "http://plf.zarb.org" > P.L.F</ulink> and RedHat RPMs
2004-07-21 20:08:42 +00:00
from <ulink url= "http://greysector.rangers.eu.org/" > Grey Sector</ulink> .
2003-10-07 10:18:55 +00:00
</para>
2003-03-23 23:35:12 +00:00
</sect2>
2006-04-09 12:13:59 +00:00
<sect2 id= "amr" >
<title > AMR codecs</title>
<para >
Adaptive Multi-Rate speech codec is used in third generation (3G) mobile
phones.
Reference implementation is available from
<ulink url= "http://www.3gpp.org" > The 3rd Generation Partnership Project</ulink>
(free for private use).
</para>
<para >
To enable support, download the sources for
<ulink url= "http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26104-610.zip" > AMR-NB</ulink>
and
<ulink url= "http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26204-600.zip" > AMR-WB</ulink>
codecs, put them in the directory where you unpacked the
<application > MPlayer</application> source and run the following commands:
<screen >
unzip 26104-610.zip
unzip 26104-610_ANSI_C_source_code.zip
mv c-code libavcodec/amr_float
unzip 26204-600.zip
unzip 26204-600_ANSI-C_source_code.zip
mv c-code libavcodec/amrwb_float
</screen>
After that, follow the usual <application > MPlayer</application>
<link linkend= "features" > build procedure</link> .
</para>
</sect2>
2006-01-05 23:32:18 +00:00
</sect1>
2003-03-23 23:35:12 +00:00
<!-- ********** -->
2006-01-05 23:32:18 +00:00
<sect1 id= "codec-importing" >
2003-03-23 23:35:12 +00:00
<title > Win32 codecs importing HOWTO</title>
<!-- TODO: a short paragraph of text would be nice here... -->
2006-01-05 23:32:18 +00:00
<sect2 id= "vfw-codecs" >
2003-03-23 23:35:12 +00:00
<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" >
2006-08-28 21:50:26 +00:00
ftp://upload.mplayerhq.hu/MPlayer/incoming/[codecname]/
2003-03-23 23:35:12 +00:00
</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>
2006-01-05 23:32:18 +00:00
</sect2>
2003-03-23 23:35:12 +00:00
2006-01-05 23:32:18 +00:00
<sect2 id= "dshow-codecs" >
2003-03-23 23:35:12 +00:00
<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
2006-10-21 08:44:10 +00:00
<ulink url= "http://doom9.net" > doom9</ulink> .
2003-03-23 23:35:12 +00:00
</para> </step>
<step > <para >
Start <command > graphedit.exe</command> .
</para> </step>
<step > <para >
From the menu select Graph -> Insert Filters.
</para> </step>
<step > <para >
2006-10-21 08:44:10 +00:00
Expand item <systemitem > DirectShow Filters</systemitem> .
2003-03-23 23:35:12 +00:00
</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
2006-08-28 21:50:26 +00:00
role="url">ftp://upload.mplayerhq.hu/MPlayer/incoming/[codecname]/
2003-03-23 23:35:12 +00:00
</systemitem>
</para>
2004-11-21 12:53:03 +00:00
<para >
If you want to add a codec yourself, read
<ulink url= "http://www.mplayerhq.hu/MPlayer/DOCS/tech/codecs.conf.txt" > DOCS/tech/codecs.conf.txt</ulink> .
</para>
2003-03-23 23:35:12 +00:00
</sect2>
</sect1>
2006-01-05 23:32:18 +00:00
</chapter>