1
<?xml version="1.0" encoding="iso-8859-1"?>
2
<!-- $Revision: 1.74 $ -->
6
<sect1 id="video-codecs">
7
<title>Video codecs</title>
10
See the <ulink url="../../codecs-status.html">codec status table</ulink>
11
for the complete, daily generated list. Quite a few codecs are available for
12
download from our homepage. Grab them from our
13
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/">codecs page</ulink>.
17
The most important ones above all:
22
<emphasis role="bold">MPEG-1</emphasis> (<emphasis role="bold">VCD</emphasis>) and
23
<emphasis role="bold">MPEG-2</emphasis> (<emphasis role="bold">DVD</emphasis>) video
26
native decoders for <emphasis role="bold">DivX ;-), OpenDivX (DivX4),
27
DivX 5 (Pro), 3ivX, M$ MPEG-4</emphasis> v1, v2 and other MPEG-4 variants
30
native decoder for <emphasis role="bold">Windows Media Video 7/8</emphasis>
31
(<emphasis role="bold">WMV1/WMV2</emphasis>), and Win32 DLL decoder
32
for <emphasis role="bold">Windows Media Video 9</emphasis>
33
(<emphasis role="bold">WMV3</emphasis>), both used in <filename>.wmv</filename>
37
native <emphasis role="bold">Sorenson 1 (SVQ1)</emphasis> decoder
40
native <emphasis role="bold">Sorenson 3 (SVQ3)</emphasis> decoder
43
<emphasis role="bold">3ivx</emphasis> v1, v2 decoder
46
Cinepak and <emphasis role="bold">Intel Indeo</emphasis> codecs (3.1,3.2,4.1,5.0)
49
<emphasis role="bold">MJPEG</emphasis>, AVID, VCR2, ASV2 and other hardware
53
VIVO 1.0, 2.0, I263 and other <emphasis role="bold">H.263(+)</emphasis> variants
59
<emphasis role="bold">RealVideo 1.0 & 2.0</emphasis> from
60
<systemitem class="library">libavcodec</systemitem>, and
61
<emphasis role="bold">RealVideo 3.0 & 4.0</emphasis> codecs using RealPlayer
65
native decoder for HuffYUV
68
Various old simple RLE-like formats
73
If you have a Win32 codec not listed here which is not supported yet,
74
please read the <link linkend="codec-importing">codec importing HOWTO</link>
75
and help us add support for it.
80
<title>DivX4/DivX5</title>
83
This section contains information about the DivX4 and DivX5 codecs of
84
<ulink url="http://www.projectmayo.com">Project Mayo</ulink>.
85
Their first available alpha version was OpenDivX 4.0 alpha 47 and 48.
86
Support for this was included in <application>MPlayer</application> in the
87
past, and built by default. We also used its postprocessing code to
88
optionally enhance visual quality of MPEG-1/2 movies. Now we use our own,
93
The new generation of this codec is called DivX4 and can even decode
94
movies made with the infamous DivX codec! In addition it is much faster
95
than the native Win32 DivX DLLs but slower than
96
<systemitem class="library">libavcodec</systemitem>.
97
Hence its usage as a decoder is
98
<emphasis role="bold">discouraged</emphasis>. However, it is useful for
99
encoding. One disadvantage of this codec is that it is not available under an
104
DivX4 works in two modes:
106
<varlistentry><term><option>-vc odivx</option></term>
108
Uses the codec in OpenDivX fashion. In this case it produces YV12 images
109
in its own buffer, and <application>MPlayer</application> does colorspace
110
conversion via libvo. (<emphasis role="bold">Fast, recommended!</emphasis>)
111
</simpara></listitem>
113
<varlistentry><term><option>-vc divx4</option></term>
115
Uses the colorspace conversion of the codec. In this mode you can use
116
YUY2/UYVY, too. (<emphasis role="bold">SLOW</emphasis>)
117
</simpara></listitem>
123
The <option>-vc odivx</option> method is usually faster, due to the fact
124
that it transfers image data in YV12 (planar YUV 4:2:0) format, thus
125
requiring much less bandwidth on the bus. For packed YUV modes (YUY2, UYVY)
126
use the <option>-vc divx4</option> method. For RGB modes the speed is the
127
same, differing at best according to your current color depth.
130
If your <option>-vo</option> driver supports direct rendering, then <option>-vc
131
divx4</option> may be faster, or even the fastest solution.
135
The DivX4/5 binary codec library can be downloaded from
136
<ulink url="http://avifile.sf.net">avifile</ulink> or
137
<ulink url="http://www.divx.com">divx.com</ulink>
138
Unpack it, run <filename>./install.sh</filename> as root and do not forget adding
139
<filename class="directory">/usr/local/lib</filename> to your
140
<filename>/etc/ld.so.conf</filename> and running <command>ldconfig</command>.
144
Get the CVS version of the OLD OpenDivX core library like this:
149
<screen>cvs -d:pserver:anonymous@cvs.projectmayo.com:/cvsroot login</screen>
152
<screen>cvs -d:pserver:anonymous@cvs.projectmayo.com:/cvsroot co divxcore</screen>
155
This core library is split into a decore and encore library that have to be
156
compiled separately. For the decore Library, simply type
158
cd divxcore/decore/build/linux
160
cp libdivxdecore.so /usr/local/lib
161
ln -s libdivxdecore.so /usr/local/lib/libdivxdecore.so.0
162
cp ../../src/decore.h /usr/local/include
166
Alas, for the encore library there is no Linux Makefile available, and the
167
MMX optimized code only works on Windows. You can still compile it, though,
169
<ulink url="ftp://ftp.mplayerhq.hu/MPlayer/contrib/divx-mf/Makefile">Makefile</ulink>.
171
cd ../../../encore/build
176
cp libdivxencore.so /usr/local/lib
177
ln -s libdivxencore.so /usr/local/lib/libdivxencore.so.0
178
cp ../../src/encore.h /usr/local/include
184
<application>MPlayer</application> autodetects DivX4/DivX5 if it is
185
properly installed, just compile as usual. If it does not detect it, you
186
did not install or configure it correctly.
194
<sect2 id="ffmpeg" xreflabel="FFmpeg/libavcodec">
195
<title>FFmpeg/libavcodec</title>
198
<ulink url="http://ffmpeg.org">FFmpeg</ulink> contains an
199
<emphasis role="bold">open source</emphasis> codec package, which is capable
200
of decoding streams with various audio and video codecs. It also offers an
201
impressing encoding facility and higher speed than the Win32 codecs or the
202
DivX.com DivX4/5 libraries!
206
It contains a lot of nice codecs, especially important are the MPEG-4 variants:
207
DivX3, DivX4, DivX5, Windows Media Video 7/8 (WMV1/WMV2). Also a very interesting one
212
The most recent codec deserving credit is the <emphasis role="bold">Sorenson 3</emphasis>
213
(SVQ3) codec. This is the first, completely opensource implementation. It is even
214
faster than the original. Be sure to prefer this instead of the binary codec!
218
For a complete list of supported codecs please visit the FFmpeg homepage.
219
Supported <ulink url="http://ffmpeg.org/ffmpeg-doc.html#SEC19">video</ulink>
220
and <ulink url="http://ffmpeg.org/ffmpeg-doc.html#SEC20">audio</ulink> codecs.
224
If you use an <application>MPlayer</application> release you have
225
<systemitem class="library">libavcodec</systemitem>
226
right in the package, just build as usual. If you use
227
<application>MPlayer</application> from CVS you have to extract
228
<systemitem class="library">libavcodec</systemitem> from
229
the FFmpeg CVS tree as FFmpeg releases are very rare. The CVS is mostly stable
230
and offers the most features. In order to achieve this do:
235
<screen>cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg login</screen>
238
<screen>cvs -z3 -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co -P ffmpeg/libavcodec ffmpeg/libavutil</screen>
241
Move the <filename>libavcodec</filename> and <filename>libavutil</filename>
242
directories from the FFmpeg
243
sources to the root of the <application>MPlayer</application> CVS tree.
244
It should look like this:
245
<filename class="directory">main/libavcodec</filename>
246
<filename class="directory">main/libavutil</filename>
248
Symlinking is <emphasis role="bold">not</emphasis> enough, you have to
252
If you prefer having <systemitem class="library">libavcodec</systemitem>
253
updated at the same time you update
254
<application>MPlayer</application> CVS, put the following line into the
255
<filename>main/CVS/Entries</filename> file:
256
<screen>D/libavcodec////</screen>
257
<screen>D/libavutil////</screen>
260
Compile. <filename>configure</filename> should detect problems before
267
<application>MPlayer</application> from CVS does contain a
268
<filename>libavcodec</filename> subdirectory, but it does
269
<emphasis role="bold">not</emphasis> contain the source for
270
<systemitem class="library">libavcodec</systemitem>!
271
You must follow the steps above to obtain the source for this library.
276
With FFmpeg and my Matrox G400, I can view even the highest resolution DivX
277
movies without dropped frames on my K6-2 500.
283
<title>XAnim codecs</title>
287
Be advised that the XAnim binary codecs are packaged with a piece of text
288
claiming to be a legally binding software license which, besides other
289
restrictions, forbids the user to use the codecs in conjunction with any
290
program other than <application>XAnim</application>. However, the XAnim
291
author has yet to bring legal action against anyone for codec-related issues.
296
<title>INSTALLATION AND USAGE</title>
298
<application>MPlayer</application> is capable of employing the XAnim codecs
299
for decoding. Follow the instructions to enable them:
305
Download the codecs you wish to use from the
306
<ulink url="http://xanim.va.pubnix.com">XAnim site</ulink>.
307
The <emphasis role="bold">3ivx</emphasis> codec is not there, but at the
308
<ulink url="http://www.3ivx.com">3ivx site</ulink>.
311
<emphasis role="bold">OR</emphasis> download the codecs pack from our
312
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/">codecs page</ulink>
315
Use the <option>--with-xanimlibdir</option> option to tell
316
<filename>configure</filename> where
317
to find the XAnim codecs. By default, it looks for them at
318
<filename class="directory">/usr/local/lib/codecs</filename>,
319
<filename class="directory">/usr/local/lib/xanim/mods</filename>,
320
<filename class="directory">/usr/lib/xanim/mods</filename> and
321
<filename class="directory">/usr/lib/xanim</filename>.
322
Alternatively you can set the environment variable
323
<envar>XANIM_MOD_DIR</envar> to the directory of the XAnim codecs.
326
Rename/symlink the files, cutting out the architecture stuff, so they
327
will have filenames like these: <filename>vid_cvid.xa</filename>,
328
<filename>vid_h263.xa</filename>, <filename>vid_iv50.xa</filename>
333
XAnim is video codec family <systemitem>xanim</systemitem>, so you may want
334
to use the <option>-vfm xanim</option> option to tell <application>MPlayer</application>
335
to use them if possible.
339
Tested codecs include: <emphasis role="bold">Indeo 3.2, 4.1, 5.0, CVID, 3ivX,
345
<sect2 id="vivo-video">
346
<title>VIVO video</title>
348
<application>MPlayer</application> can play Vivo (1.0 and 2.0) videos. The
349
most suitable codec for 1.0 files is FFmpeg's H.263 decoder, you can use it
350
with the <option>-vc ffh263</option> option. For 2.0 files, use the
351
Win32 DLL through the <option>-vc vivo</option> option. If you do not supply
352
command line options <application>MPlayer</application> selects the best codec
359
<title>MPEG-1/2 video</title>
361
MPEG-1 and MPEG-2 are decoded by the multiplatform native <systemitem
362
class="library">libmpeg2</systemitem> library, whose source code is
363
included in <application>MPlayer</application>. We handle buggy MPEG-1/2
364
video files by catching <systemitem>Signal 11</systemitem>
365
(<systemitem>segmentation fault</systemitem>), and quickly
366
reinitializing the codec, continuing exactly from where the failure
367
occurred. This recovery technique has no measurable speed penalty.
372
<sect2 id="avicodecs">
373
<title>MS Video1, Cinepak CVID, and other older codecs</title>
375
<application>MPlayer</application> is able to play most of the older codecs
376
used in AVI and MOV files.
377
In the past they were decoded with binary Win32 codecs, but now we have
378
<emphasis role="bold">native codecs</emphasis> for most of them using
379
<link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>.
384
<sect2 id="realvideo">
385
<title>RealVideo</title>
388
<application>MPlayer</application> supports decoding all versions of
393
RealVideo 1.0, 2.0 (fourcc RV10, RV20) - en/decoding supported by
394
<systemitem class="library">libavcodec</systemitem>
395
</simpara></listitem>
397
RealVideo 3.0, 4.0 (fourcc RV30, RV40) - decoding supported by
398
<emphasis role="bold">RealPlayer libraries</emphasis>
399
</simpara></listitem>
404
Download Real codecs from
405
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/">http://www.mplayerhq.hu/MPlayer/releases/codecs/</ulink>
406
and extract them to the
407
<filename class="directory">/usr/local/lib/codecs</filename> directory.
408
If you want to store them in a different location, pass the
409
<option>--with-reallibdir</option> option to <command>configure</command>.
413
<application>RealPlayer</application> libraries currently
414
<emphasis role="bold">only work with Linux, FreeBSD, NetBSD and Cygwin on the x86,
415
Alpha and PowerPC (Linux/Alpha and Linux/PowerPC have been tested) platforms and with Mac OS X</emphasis>.
424
<ulink url="http://www.xvid.org">XviD</ulink> is a free software MPEG-4 ASP
425
compliant video codec, which features two pass encoding and full MPEG-4 ASP
426
support, making it a lot more efficient than the well-known DivX codec.
427
It yields very good video quality and good performance due to CPU
428
optimizations for most modern processors.
431
It began as a forked development of the OpenDivX codec.
432
This happened when ProjectMayo changed OpenDivX to closed source
433
DivX4 (now DivX5), and the non-ProjectMayo people working on OpenDivX got angry,
434
then started XviD. So both projects have the same origin.
438
<title>Installing <systemitem class="library">XviD</systemitem></title>
440
Like most open source software, it is available in two flavors:
441
<ulink url="http://www.xvid.org/downloads.html">official releases</ulink>
443
The CVS version is usually stable enough to use, as most of the time it
444
features fixes for bugs that exist in releases.
445
Here is what to do to make <systemitem class="library">XviD</systemitem>
446
CVS work with <application>MEncoder</application> (you need at least
447
<application>autoconf</application> 2.50,
448
<application>automake</application> and <application>libtool</application>):
451
<screen>cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid login</screen>
454
<screen>cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcore</screen>
457
<screen>cd xvidcore/build/generic</screen>
460
<screen>./bootstrap.sh</screen>
463
<screen>./configure</screen>
464
You may have to add some options (examine the output of
465
<command>./configure --help</command>).
468
<screen>make && make install</screen>
471
If you specified <option>--enable-divxcompat</option>,
472
copy <filename>../../src/divx4.h</filename> to
473
<filename class="directory">/usr/local/include/</filename>.
476
Recompile <application>MPlayer</application> with
477
<option>--with-xvidlibdir=<replaceable>/path/to/</replaceable>libxvidcore.a</option>
478
<option>--with-xvidincdir=<replaceable>/path/to/</replaceable>xvid.h</option>
484
<sect2 id="sorenson">
485
<title>Sorenson</title>
488
Sorenson is a video codec developed by Sorenson Media and licensed to Apple who
489
distribute it with their <application>QuickTime Player</application>. We are
490
currently able to decode all version of Sorenson video files with the following
496
Sorenson Video v1 (fourcc <emphasis>SVQ1</emphasis>) - decoding supported
497
by <emphasis role="bold">native codec</emphasis>
498
(<link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>)
499
</simpara></listitem>
501
Sorenson Video v3 (fourcc <emphasis>SVQ3</emphasis>) - decoding supported by
502
<emphasis role="bold">native codec</emphasis>
503
(<link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>)
504
</simpara></listitem>
508
<title>COMPILING MPLAYER WITH QUICKTIME LIBRARIES SUPPORT</title>
509
<note><para>Currently only 32-bit Intel platforms are supported.</para></note>
510
<step><para>download <application>MPlayer</application> CVS</para></step>
511
<step><para>download QuickTime DLL pack from
512
<ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/"/>
514
<step><para>extract QuickTime DLL pack to your Win32 codecs directory
515
(default: <filename class="directory">/usr/local/lib/codecs/</filename>)
517
<step><para>compile <application>MPlayer</application></para></step>
522
<sect2 id="codec-x264">
525
<sect3 id="codec-x264-whatis">
526
<title>What is x264?</title>
528
<systemitem class="library">x264</systemitem> is a library for
529
creating H.264 video streams.
530
It is not 100% complete, but currently it has at least some kind
531
of support for most of the H.264 features which impact quality.
532
There are also many advanced features in the H.264 specification
533
which have nothing to do with video quality per se; many of these
534
are not yet implemented in
535
<systemitem class="library">x264</systemitem>.
539
<title>Encoder features</title>
540
<listitem><para>CAVLC/CABAC</para></listitem>
541
<listitem><para>Multi-references</para></listitem>
542
<listitem><para>Intra: all macroblock types (16x16, 8x8, and 4x4 with
543
all predictions)</para></listitem>
544
<listitem><para>Inter P: all partitions (from 16x16 down to
545
4x4)</para></listitem>
546
<listitem><para>Inter B: partitions from 16x16 down to 8x8
547
(including SKIP/DIRECT)</para></listitem>
548
<listitem><para>Ratecontrol: constant quantizer, constant bitrate,
549
single or multipass ABR, optional VBV</para></listitem>
550
<listitem><para>Scene cut detection</para></listitem>
551
<listitem><para>Adaptive B-frame placement</para></listitem>
552
<listitem><para>B-frames as references / arbitrary frame
553
order</para></listitem>
554
<listitem><para>8x8 and 4x4 adaptive spatial transform</para></listitem>
555
<listitem><para>Lossless mode</para></listitem>
556
<listitem><para>Custom quantization matrices</para></listitem>
557
<listitem><para>Parallel encoding of multiple slices</para></listitem>
562
<sect3 id="codec-h264-whatis">
563
<title>What is H.264?</title>
565
H.264 is one name for a new digital video codec jointly developed
567
It can also be correctly referred to by the cumbersome names of
568
"ISO/IEC 14496-10" or "MPEG-4 Part 10".
569
More frequently, it is referred to as "MPEG-4 AVC" or just "AVC".
572
Whatever you call it, H.264 may be worth trying because it can
573
typically match the quality of MPEG-4 ASP with 5%-30% less
575
Actual results will depend on both the source material and the
577
The gains from using H.264 do not come for free: Decoding H.264
578
streams seems to have steep CPU and memory requirements.
579
For instance, on a 1733 MHz Athlon, a DVD-resolution 1500kbps H.264
580
video requires around 35% CPU to decode.
581
By comparison, decoding a DVD-resolution 1500kbps MPEG-4 ASP stream
582
requires around 10% CPU.
583
This means that decoding high-definition streams is almost out of
584
the question for most users.
585
It also means that even a decent DVD rip may sometimes stutter on
586
processors slower than 2.0 GHz or so.
589
At least with <systemitem class="library">x264</systemitem>,
590
encoding requirements are not much worse than what you are used to
592
For instance, on a 1733 MHz Athlon a typical DVD encode would run
596
This document is not intended to explain the details of H.264,
597
but if you are interested in a brief overview, you may want to read
598
<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>.
602
<sect3 id="codec-x264-playback">
603
<title>How can I play H.264 videos with <application>MPlayer</application>?</title>
605
<application>MPlayer</application> uses
606
<systemitem class="library">libavcodec</systemitem>'s H.264
608
<systemitem class="library">libavcodec</systemitem> has had at
609
least minimally usable H.264 decoding since around July 2004,
610
however major changes and improvements have been implemented since
611
that time, both in terms of more functionalities supported and in
612
terms of improved CPU usage.
613
Just to be certain, it is always a good idea to use a recent CVS
617
If you want a quick and easy way to know whether there have been
618
recent changes to <systemitem class="library">libavcodec</systemitem>'s
619
H.264 decoding, you might keep an eye on
620
<ulink url="http://mplayerhq.hu/cgi-bin/cvsweb.cgi/ffmpeg/libavcodec/h264.c?cvsroot=FFMpeg">FFmpeg CVS repository's web interface</ulink>.
624
<sect3 id="codec-x264-encode">
625
<title>How can I encode videos using <application>MEncoder</application> and <systemitem class="library">x264</systemitem>?</title>
627
If you have the subversion client installed, the latest x264
628
sources can be gotten with this command:
630
svn co svn://svn.videolan.org/x264/trunk x264<!--
632
<application>MPlayer</application> sources are updated whenever
633
an <systemitem class="library">x264</systemitem> API change
634
occurs, so it is always suggested to use CVS
635
<application>MPlayer</application> as well.
636
Perhaps this situation will change when and if an
637
<systemitem class="library">x264</systemitem> "release" occurs.
638
Meanwhile, <systemitem class="library">x264</systemitem> should
639
be considered very unstable, in the sense that its programming
640
interface is subject to change.
643
<systemitem class="library">x264</systemitem> is built and
644
installed in the standard way:
646
./configure && make && sudo make install<!--
648
This installs libx264.a in /usr/local/lib and x264.h is placed in
651
With the <systemitem class="library">x264</systemitem> library
652
and header placed in the standard locations, building
653
<application>MPlayer</application> with
654
<systemitem class="library">x264</systemitem> support is easy.
655
Just run the standard:
656
<screen>./configure && make && sudo make install</screen>
657
The configure script will autodetect that you have satisfied the
658
requirements for <systemitem class="library">x264</systemitem>.
666
<sect1 id="audio-codecs">
667
<title>Audio codecs</title>
670
<title>The most important audio codecs above all:</title>
672
MPEG layer 1/2/3 (MP1/2/3) audio (<emphasis role="bold">native</emphasis>
673
code, with MMX/SSE/3DNow! optimization)
674
</simpara></listitem>
676
Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) (<emphasis role="bold">native</emphasis> code, with
677
<link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>)
678
</simpara></listitem>
680
Windows Media Audio 9 (WMAv3) (using DMO DLL)
681
</simpara></listitem>
683
AC3 Dolby audio (<emphasis role="bold">native</emphasis> code, with
684
MMX/SSE/3DNow! optimization)
685
</simpara></listitem>
687
AC3 passing through sound card hardware
688
</simpara></listitem>
691
</simpara></listitem>
693
Ogg Vorbis audio codec (<emphasis role="bold">native</emphasis> library)
694
</simpara></listitem>
696
RealAudio: DNET (low bitrate AC3), Cook, Sipro and ATRAC3
697
</simpara></listitem>
699
QuickTime: Qualcomm and QDesign audio codecs
700
</simpara></listitem>
702
VIVO audio (g723, Vivo Siren)
703
</simpara></listitem>
705
Voxware audio (using DirectShow DLL)
706
</simpara></listitem>
708
alaw and ulaw, various gsm, adpcm and pcm formats and other simple old
710
</simpara></listitem>
715
<title>Software AC3 decoding</title>
718
This is the default decoder used for files with AC3 audio.
722
The AC3 decoder can create audio output mixes for 2, 4, or 6 speakers.
723
When configured for 6 speakers, this decoder provides separate output of
724
all the AC3 channels to the sound driver, allowing for full "surround
725
sound" experience without the external AC3 decoder required to use the
730
Use the <option>-channels</option> option to select the number of output
731
channels. Use <option>-channels 2</option> for a stereo downmix. For a 4
732
channel downmix (Left Front, Right Front, Left Surround and Right Surround
733
outputs), use <option>-channels 4</option>. In this case, any center
734
channel will be mixed equally to the front channels. <option>-channels
735
6</option> will output all the AC3 channels as they are encoded - in the
736
order Left, Right, Left Surround, Right Surround, Center and LFE.
740
The default number of output channels is 2.
744
To use more than 2 output channels, you will need to use OSS, and have a
745
sound card that supports the appropriate number of output channels via the
746
SNDCTL_DSP_CHANNELS ioctl. An example of a suitable driver is emu10k1
747
(used by Soundblaster Live! cards) from August 2001 or newer (ALSA CVS is
748
also supposed to work).
754
<title>Hardware AC3 decoding</title>
756
You need an AC3 capable sound card, with digital out (S/PDIF). The card's
757
driver must properly support the AFMT_AC3 format (C-Media does). Connect
758
your AC3 decoder to the S/PDIF output, and use the <option>-ac
759
hwac3</option> option. It is experimental but known to work with C-Media
760
cards and Soundblaster Live! + ALSA (but not OSS) drivers and DXR3/Hollywood+
767
<title>libmad support</title>
770
<ulink url="http://www.underbit.com/products/mad/">libmad</ulink> is a multiplatform,
771
integer (internally 24bit PCM) only
772
MPEG audio decoding library. It does not handle broken files well, and it
773
sometimes has problems with seeking, but it may perform better on FPU-less
774
(such as <link linkend="arm">ARM</link>) platform than mp3lib.
778
To enable support, compile with the <option>--enable-mad</option> configure
784
<sect2 id="vivo-audio">
785
<title>VIVO audio</title>
787
The audio codec used in VIVO files depends on whether it is a VIVO/1.0 or
788
VIVO/2.0 file. VIVO/1.0 files have <emphasis role="bold">g.723</emphasis> audio,
789
and VIVO/2.0 files have <emphasis role="bold">Vivo Siren</emphasis> audio. Both are
795
<sect2 id="realaudio">
796
<title>RealAudio</title>
799
<application>MPlayer</application> supports decoding nearly all versions of
805
RealAudio DNET - decoding supported by
806
<systemitem class="library">liba52</systemitem>
807
</simpara></listitem>
809
RealAudio Cook/Sipro/ATRAC3 - decoding supported by
810
<emphasis role="bold">RealPlayer libraries</emphasis>
811
</simpara></listitem>
815
Instructions on how to install the RealPlayer libraries are in the
816
<link linkend="realvideo">RealVideo</link> section.
821
<title>QDesign codecs</title>
823
QDesign audio streams (fourcc:<emphasis>QDMC, QDM2</emphasis>) are found
824
in MOV/QT files. Both versions of this codec can be decoded with QuickTime
825
libraries. For installation instructions please see the
826
<link linkend="sorenson">Sorenson video codec</link> section.
830
<sect2 id="qualcomm">
831
<title>Qualcomm codecs</title>
833
Qualcomm audio streams (fourcc:<emphasis>Qclp</emphasis>) is found
834
in MOV/QT files. It can be decoded with QuickTime
835
libraries. For installation instructions please see the
836
<link linkend="sorenson">Sorenson video codec</link> section.
841
<title>AAC codec</title>
843
AAC (Advanced Audio Coding) is an audio codec sometimes found in MOV and MP4
844
files. An open source decoder called FAAD is available from
845
<ulink url="http://www.audiocoding.com"/>.
846
<application>MPlayer</application> includes a CVS snapshot of libfaad 2.1
847
beta, so you do not need to get it separately.
851
If you use gcc 3.2 which fails to compile our internal FAAD or want to use
852
the external library for some other reason, download the library from the
853
<ulink url="http://www.audiocoding.com/modules/mydownloads/">download page</ulink>
854
and pass <option>--enable-external-faad</option> to <filename>configure</filename>.
855
You do not need all of faad2 to decode AAC files, libfaad is enough. Build
865
Binaries are not available from audiocoding.com, but you can (apt-)get Debian
866
packages from <ulink url="http://hpisi.nerim.net">Christian Marillat's homepage</ulink>,
867
Mandrake/Mandriva RPMs from the <ulink url="http://plf.zarb.org">P.L.F</ulink> and RedHat RPMs
868
from <ulink url="http://greysector.rangers.eu.org/">Grey Sector</ulink>.
876
<sect1 id="codec-importing">
877
<title>Win32 codecs importing HOWTO</title>
879
<!-- TODO: a short paragraph of text would be nice here... -->
881
<sect2 id="vfw-codecs">
882
<title>VFW codecs</title>
885
VFW (Video for Windows) is the old Video API for Windows. Its codecs have
886
the <filename>.DLL</filename> or (rarely) <filename>.DRV</filename>
887
extension. If <application>MPlayer</application> fails at playing your AVI
888
with this kind of message:
889
<screen>UNKNOWN video codec: HFYU (0x55594648)</screen>
893
It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU =
894
HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you
895
have to find out which DLL Windows loads in order to play this file. In our
896
case, the <filename>system.ini</filename> contains this information in a
898
<programlisting>VIDC.HFYU=huffyuv.dll</programlisting>
902
So you need the <filename>huffyuv.dll</filename> file. Note that the audio
903
codecs are specified by the MSACM prefix:
904
<programlisting>msacm.l3acm=L3codeca.acm</programlisting>
908
This is the MP3 codec. Now that you have all the necessary information
909
(fourcc, codec file, sample AVI), submit your codec support request by
910
mail, and upload these files to the FTP site:
911
<systemitem role="url">
912
ftp://ftp.mplayerhq.hu/MPlayer/incoming/[codecname]/
916
<note><para>On Windows NT/2000/XP search for this info in the registry,
917
e.g. search for "VIDC.HFYU". To find out how to do this, look at
918
the old DirectShow method below.
923
<sect2 id="dshow-codecs">
924
<title>DirectShow codecs</title>
927
DirectShow is the newer Video API, which is even worse than its predecessor.
928
Things are harder with DirectShow, since
931
<filename>system.ini</filename> does not contain the needed information,
932
instead it is stored in the registry and
933
</simpara></listitem>
935
we need the GUID of the codec.
936
</simpara></listitem>
941
<title>New Method:</title>
943
Using <application>Microsoft GraphEdit</application> (fast)
946
Get <application>GraphEdit</application> from either DirectX SDK or
947
<ulink url="http://doom9.net">doom9</ulink>
950
Start <command>graphedit.exe</command>.
953
From the menu select Graph -> Insert Filters.
956
Expand item <systemitem>DirectShow Filters</systemitem>
959
Select the right codec name and expand item.
962
In the entry <systemitem>DisplayName</systemitem> look at the text in
963
winged brackets after the backslash and write it down (five dash-delimited
967
The codec binary is the file specified in the <systemitem>Filename</systemitem>
974
If there is no <systemitem>Filename</systemitem> and
975
<systemitem>DisplayName</systemitem> contains something like
976
<systemitem>device:dmo</systemitem>, then it is a DMO-Codec.
981
<title>Old Method:</title>
983
Take a deep breath and start searching the registry...
986
Start <command>regedit</command>.
989
Press <keycap>Ctrl</keycap>+<keycap>F</keycap>, disable the first two
990
checkboxes, and enable the third. Type in the fourcc of the codec (e.g.
991
<userinput>TM20</userinput>).
994
You should see a field which contains the path and the filename (e.g.
995
<filename>C:\WINDOWS\SYSTEM\TM20DEC.AX</filename>).
998
Now that you have the file, we need the GUID. Try searching again, but
999
now search for the codec's name, not the fourcc. Its name can be acquired
1000
when Media Player is playing the file, by checking
1001
<guimenu>File</guimenu> -> <guisubmenu>Properties</guisubmenu> ->
1002
<guimenuitem>Advanced</guimenuitem>.
1003
If not, you are out of luck. Try guessing (e.g. search for TrueMotion).
1006
If the GUID is found you should see a <guilabel>FriendlyName</guilabel>
1007
and a <guilabel>CLSID</guilabel> field. Write down the 16 byte CLSID,
1008
this is the GUID we need.
1014
If searching fails, try enabling all the checkboxes. You may have
1015
false hits, but you may get lucky...
1020
Now that you have all the necessary information (fourcc, GUID, codec file,
1021
sample AVI), submit your codec support request by mail, and upload these files
1024
role="url">ftp://ftp.mplayerhq.hu/MPlayer/incoming/[codecname]/
1029
If you want to add a codec yourself, read
1030
<ulink url="http://www.mplayerhq.hu/MPlayer/DOCS/tech/codecs.conf.txt">DOCS/tech/codecs.conf.txt</ulink>.