Mercurial > mplayer.hg
annotate DOCS/xml/en/codecs.xml @ 20860:f95698d9d53c
rename: XviD -> Xvid
author | kraymer |
---|---|
date | Mon, 13 Nov 2006 08:53:20 +0000 |
parents | ac12fbccafae |
children | 6833a38146bb |
rev | line source |
---|---|
20535 | 1 <?xml version="1.0" encoding="utf-8"?> |
10913
49b1a67e7381
Add revision keyword to english xml files, to ease translation synchronization
lumag
parents:
10869
diff
changeset
|
2 <!-- $Revision$ --> |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
3 <chapter id="codecs"> |
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
4 <title>Codecs</title> |
9675 | 5 |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
6 <sect1 id="video-codecs"> |
9675 | 7 <title>Video codecs</title> |
8 | |
9 <para> | |
19681 | 10 The <ulink url="../../codecs-status.html">codec status table</ulink> is a |
11 complete list of all supported codecs, regenerated daily. | |
12 Some binary codecs for use with MPlayer are available in the | |
13 <ulink url="http://www.mplayerhq.hu/design7/dload.html#binary_codecs">download section</ulink> | |
14 of our homepage. | |
9675 | 15 </para> |
16 | |
17 <para> | |
18 The most important ones above all: | |
19 </para> | |
20 | |
21 <itemizedlist> | |
22 <listitem><simpara> | |
14024 | 23 <emphasis role="bold">MPEG-1</emphasis> (<emphasis role="bold">VCD</emphasis>) and |
24 <emphasis role="bold">MPEG-2</emphasis> (<emphasis role="bold">DVD</emphasis>) video | |
9675 | 25 </simpara></listitem> |
26 <listitem><simpara> | |
20355 | 27 native decoders for <emphasis role="bold">all DivX variants, |
28 3ivX, M$ MPEG-4</emphasis> v1, v2 and other MPEG-4 variants | |
9675 | 29 </simpara></listitem> |
30 <listitem><simpara> | |
31 native decoder for <emphasis role="bold">Windows Media Video 7/8</emphasis> | |
32 (<emphasis role="bold">WMV1/WMV2</emphasis>), and Win32 DLL decoder | |
33 for <emphasis role="bold">Windows Media Video 9</emphasis> | |
34 (<emphasis role="bold">WMV3</emphasis>), both used in <filename>.wmv</filename> | |
35 files | |
36 </simpara></listitem> | |
37 <listitem><simpara> | |
38 native <emphasis role="bold">Sorenson 1 (SVQ1)</emphasis> decoder | |
39 </simpara></listitem> | |
40 <listitem><simpara> | |
10132 | 41 native <emphasis role="bold">Sorenson 3 (SVQ3)</emphasis> decoder |
9675 | 42 </simpara></listitem> |
43 <listitem><simpara> | |
44 <emphasis role="bold">3ivx</emphasis> v1, v2 decoder | |
45 </simpara></listitem> | |
46 <listitem><simpara> | |
47 Cinepak and <emphasis role="bold">Intel Indeo</emphasis> codecs (3.1,3.2,4.1,5.0) | |
48 </simpara></listitem> | |
49 <listitem><simpara> | |
50 <emphasis role="bold">MJPEG</emphasis>, AVID, VCR2, ASV2 and other hardware | |
51 formats | |
52 </simpara></listitem> | |
53 <listitem><simpara> | |
13111 | 54 VIVO 1.0, 2.0, I263 and other <emphasis role="bold">H.263(+)</emphasis> variants |
9675 | 55 </simpara></listitem> |
56 <listitem><simpara> | |
57 FLI/FLC | |
58 </simpara></listitem> | |
59 <listitem><simpara> | |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11758
diff
changeset
|
60 <emphasis role="bold">RealVideo 1.0 & 2.0</emphasis> from |
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11758
diff
changeset
|
61 <systemitem class="library">libavcodec</systemitem>, and |
11638 | 62 <emphasis role="bold">RealVideo 3.0 & 4.0</emphasis> codecs using RealPlayer |
11637 | 63 libraries |
9675 | 64 </simpara></listitem> |
65 <listitem><simpara> | |
66 native decoder for HuffYUV | |
67 </simpara></listitem> | |
68 <listitem><simpara> | |
69 Various old simple RLE-like formats | |
70 </simpara></listitem> | |
71 </itemizedlist> | |
72 | |
73 <para> | |
74 If you have a Win32 codec not listed here which is not supported yet, | |
14061 | 75 please read the <link linkend="codec-importing">codec importing HOWTO</link> |
9675 | 76 and help us add support for it. |
77 </para> | |
78 | |
79 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
80 <sect2 id="ffmpeg" xreflabel="FFmpeg/libavcodec"> |
11107 | 81 <title>FFmpeg/libavcodec</title> |
9675 | 82 |
83 <para> | |
20335 | 84 <ulink url="http://ffmpeg.org">FFmpeg</ulink> contains |
85 <systemitem class="library">libavcodec</systemitem>, the leading | |
86 open source video and audio codec library. It is capable | |
87 of decoding most multimedia formats, usually at higher speeds | |
20666 | 88 than the alternatives, and aims to add support for |
20335 | 89 the rest of them eventually. It is the default decoder for |
90 the majority of codecs that <application>MPlayer</application> | |
91 supports. Encoding is also possible for some formats and | |
92 supported in <application>MEncoder</application>. | |
11089 | 93 </para> |
94 | |
95 <para> | |
20687
558608ebde11
Better wording, especially if hyperlinks are not visible
torinthiel
parents:
20686
diff
changeset
|
96 For a complete list of supported |
558608ebde11
Better wording, especially if hyperlinks are not visible
torinthiel
parents:
20686
diff
changeset
|
97 <ulink url="http://ffmpeg.org/ffmpeg-doc.html#SEC19">video</ulink> |
558608ebde11
Better wording, especially if hyperlinks are not visible
torinthiel
parents:
20686
diff
changeset
|
98 and <ulink url="http://ffmpeg.org/ffmpeg-doc.html#SEC20">audio</ulink> |
558608ebde11
Better wording, especially if hyperlinks are not visible
torinthiel
parents:
20686
diff
changeset
|
99 codecs please visit the FFmpeg homepage. |
10132 | 100 </para> |
101 | |
102 <para> | |
20335 | 103 <application>MPlayer</application> contains |
104 <systemitem class="library">libavcodec</systemitem>. | |
20689 | 105 Just run <filename>./configure</filename> and compile. |
18601
802ec5d54662
</para> tag was accidently deleted and caused compile error
kraymer
parents:
18599
diff
changeset
|
106 </para> |
9675 | 107 |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
108 </sect2> |
9675 | 109 |
110 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
111 <sect2 id="xvid"> |
20860 | 112 <title>Xvid</title> |
9675 | 113 |
114 <para> | |
20860 | 115 <ulink url="http://www.xvid.org">Xvid</ulink> is a free software MPEG-4 ASP |
15871 | 116 compliant video codec, which features two pass encoding and full MPEG-4 ASP |
15709 | 117 support, making it a lot more efficient than the well-known DivX codec. |
118 It yields very good video quality and good performance due to CPU | |
119 optimizations for most modern processors. | |
120 </para> | |
121 <para> | |
122 It began as a forked development of the OpenDivX codec. | |
123 This happened when ProjectMayo changed OpenDivX to closed source | |
20355 | 124 DivX4, and the non-ProjectMayo people working on OpenDivX got angry, |
20860 | 125 then started Xvid. So both projects have the same origin. |
9675 | 126 </para> |
127 | |
20335 | 128 <para> |
20860 | 129 Note that Xvid is not necessary to decode Xvid-encoded video. |
20335 | 130 <systemitem class="library">libavcodec</systemitem> is used by |
131 default as it offers better speed. | |
132 </para> | |
133 | |
9675 | 134 <procedure> |
20860 | 135 <title>Installing <systemitem class="library">Xvid</systemitem></title> |
9675 | 136 <para> |
15709 | 137 Like most open source software, it is available in two flavors: |
138 <ulink url="http://www.xvid.org/downloads.html">official releases</ulink> | |
139 and the CVS version. | |
140 The CVS version is usually stable enough to use, as most of the time it | |
141 features fixes for bugs that exist in releases. | |
20860 | 142 Here is what to do to make <systemitem class="library">Xvid</systemitem> |
15709 | 143 CVS work with <application>MEncoder</application> (you need at least |
16067
f9ffda85aeee
the the auto* tools should be inside an <application></application> tag
gpoirier
parents:
15915
diff
changeset
|
144 <application>autoconf</application> 2.50, |
f9ffda85aeee
the the auto* tools should be inside an <application></application> tag
gpoirier
parents:
15915
diff
changeset
|
145 <application>automake</application> and <application>libtool</application>): |
9675 | 146 </para> |
147 <step><para> | |
148 <screen>cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid login</screen> | |
149 </para></step> | |
150 <step><para> | |
151 <screen>cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcore</screen> | |
152 </para></step> | |
153 <step><para> | |
154 <screen>cd xvidcore/build/generic</screen> | |
155 </para></step> | |
156 <step><para> | |
9720
5cd40fe6ba7e
Updated XviD CVS instructions by Dmitry Baryshkov <lumag@qnc.ru>.
diego
parents:
9683
diff
changeset
|
157 <screen>./bootstrap.sh</screen> |
9675 | 158 </para></step> |
159 <step><para> | |
9720
5cd40fe6ba7e
Updated XviD CVS instructions by Dmitry Baryshkov <lumag@qnc.ru>.
diego
parents:
9683
diff
changeset
|
160 <screen>./configure</screen> |
5cd40fe6ba7e
Updated XviD CVS instructions by Dmitry Baryshkov <lumag@qnc.ru>.
diego
parents:
9683
diff
changeset
|
161 You may have to add some options (examine the output of |
13223
4d3536e69177
- <screen> -> <command>, improves readibility and sense.
wight
parents:
13222
diff
changeset
|
162 <command>./configure --help</command>). |
9675 | 163 </para></step> |
164 <step><para> | |
9720
5cd40fe6ba7e
Updated XviD CVS instructions by Dmitry Baryshkov <lumag@qnc.ru>.
diego
parents:
9683
diff
changeset
|
165 <screen>make && make install</screen> |
5cd40fe6ba7e
Updated XviD CVS instructions by Dmitry Baryshkov <lumag@qnc.ru>.
diego
parents:
9683
diff
changeset
|
166 </para></step> |
5cd40fe6ba7e
Updated XviD CVS instructions by Dmitry Baryshkov <lumag@qnc.ru>.
diego
parents:
9683
diff
changeset
|
167 <step><para> |
5cd40fe6ba7e
Updated XviD CVS instructions by Dmitry Baryshkov <lumag@qnc.ru>.
diego
parents:
9683
diff
changeset
|
168 If you specified <option>--enable-divxcompat</option>, |
5cd40fe6ba7e
Updated XviD CVS instructions by Dmitry Baryshkov <lumag@qnc.ru>.
diego
parents:
9683
diff
changeset
|
169 copy <filename>../../src/divx4.h</filename> to |
9675 | 170 <filename class="directory">/usr/local/include/</filename>. |
171 </para></step> | |
172 <step><para> | |
173 Recompile <application>MPlayer</application> with | |
12000 | 174 <option>--with-xvidlibdir=<replaceable>/path/to/</replaceable>libxvidcore.a</option> |
20312
acab67264bf9
capitalization fixes, add missing dots to sentences
kraymer
parents:
19681
diff
changeset
|
175 <option>--with-xvidincdir=<replaceable>/path/to/</replaceable>xvid.h</option>. |
9675 | 176 </para></step> |
177 </procedure> | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
178 </sect2> |
9675 | 179 |
180 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
181 <sect2 id="codec-x264"> |
20684
9076064494eb
A bunch of missing <systemitem class="library"> tags
torinthiel
parents:
20683
diff
changeset
|
182 <title><systemitem class="library">x264</systemitem></title> |
15326 | 183 |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
184 <sect3 id="codec-x264-whatis"> |
20684
9076064494eb
A bunch of missing <systemitem class="library"> tags
torinthiel
parents:
20683
diff
changeset
|
185 <title>What is <systemitem class="library">x264</systemitem>?</title> |
15326 | 186 <para> |
20335 | 187 <ulink url="http://developers.videolan.org/x264.html"><systemitem class="library">x264</systemitem></ulink> |
188 is a library for | |
15326 | 189 creating H.264 video streams. |
190 It is not 100% complete, but currently it has at least some kind | |
191 of support for most of the H.264 features which impact quality. | |
192 There are also many advanced features in the H.264 specification | |
193 which have nothing to do with video quality per se; many of these | |
194 are not yet implemented in | |
195 <systemitem class="library">x264</systemitem>. | |
196 </para> | |
197 | |
198 <itemizedlist> | |
199 <title>Encoder features</title> | |
200 <listitem><para>CAVLC/CABAC</para></listitem> | |
201 <listitem><para>Multi-references</para></listitem> | |
17273 | 202 <listitem><para>Intra: all macroblock types (16x16, 8x8, and 4x4 with |
15326 | 203 all predictions)</para></listitem> |
204 <listitem><para>Inter P: all partitions (from 16x16 down to | |
205 4x4)</para></listitem> | |
206 <listitem><para>Inter B: partitions from 16x16 down to 8x8 | |
207 (including SKIP/DIRECT)</para></listitem> | |
208 <listitem><para>Ratecontrol: constant quantizer, constant bitrate, | |
17273 | 209 single or multipass ABR, optional VBV</para></listitem> |
15326 | 210 <listitem><para>Scene cut detection</para></listitem> |
211 <listitem><para>Adaptive B-frame placement</para></listitem> | |
212 <listitem><para>B-frames as references / arbitrary frame | |
213 order</para></listitem> | |
17273 | 214 <listitem><para>8x8 and 4x4 adaptive spatial transform</para></listitem> |
215 <listitem><para>Lossless mode</para></listitem> | |
216 <listitem><para>Custom quantization matrices</para></listitem> | |
217 <listitem><para>Parallel encoding of multiple slices</para></listitem> | |
15326 | 218 </itemizedlist> |
219 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
220 </sect3> |
15326 | 221 |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
222 <sect3 id="codec-h264-whatis"> |
15326 | 223 <title>What is H.264?</title> |
224 <para> | |
225 H.264 is one name for a new digital video codec jointly developed | |
226 by the ITU and MPEG. | |
227 It can also be correctly referred to by the cumbersome names of | |
228 "ISO/IEC 14496-10" or "MPEG-4 Part 10". | |
229 More frequently, it is referred to as "MPEG-4 AVC" or just "AVC". | |
230 </para> | |
231 <para> | |
232 Whatever you call it, H.264 may be worth trying because it can | |
233 typically match the quality of MPEG-4 ASP with 5%-30% less | |
234 bitrate. | |
235 Actual results will depend on both the source material and the | |
236 encoder. | |
15370 | 237 The gains from using H.264 do not come for free: Decoding H.264 |
15326 | 238 streams seems to have steep CPU and memory requirements. |
15915 | 239 For instance, on a 1733 MHz Athlon, a DVD-resolution 1500kbps H.264 |
240 video requires around 35% CPU to decode. | |
241 By comparison, decoding a DVD-resolution 1500kbps MPEG-4 ASP stream | |
242 requires around 10% CPU. | |
15326 | 243 This means that decoding high-definition streams is almost out of |
244 the question for most users. | |
245 It also means that even a decent DVD rip may sometimes stutter on | |
246 processors slower than 2.0 GHz or so. | |
247 </para> | |
248 <para> | |
249 At least with <systemitem class="library">x264</systemitem>, | |
250 encoding requirements are not much worse than what you are used to | |
15370 | 251 with MPEG-4 ASP. |
15326 | 252 For instance, on a 1733 MHz Athlon a typical DVD encode would run |
253 at 5-15fps. | |
254 </para> | |
255 <para> | |
256 This document is not intended to explain the details of H.264, | |
257 but if you are interested in a brief overview, you may want to read | |
258 <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>. | |
259 </para> | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
260 </sect3> |
15326 | 261 |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
262 <sect3 id="codec-x264-playback"> |
15326 | 263 <title>How can I play H.264 videos with <application>MPlayer</application>?</title> |
264 <para> | |
265 <application>MPlayer</application> uses | |
266 <systemitem class="library">libavcodec</systemitem>'s H.264 | |
267 decoder. | |
268 <systemitem class="library">libavcodec</systemitem> has had at | |
269 least minimally usable H.264 decoding since around July 2004, | |
270 however major changes and improvements have been implemented since | |
271 that time, both in terms of more functionalities supported and in | |
272 terms of improved CPU usage. | |
18599 | 273 Just to be certain, it is always a good idea to use a recent Subversion |
15326 | 274 checkout. |
275 </para> | |
276 <para> | |
277 If you want a quick and easy way to know whether there have been | |
278 recent changes to <systemitem class="library">libavcodec</systemitem>'s | |
279 H.264 decoding, you might keep an eye on | |
18599 | 280 <ulink url="http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/h264.c?view=log">FFmpeg Subversion repository's web interface</ulink>. |
15326 | 281 </para> |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
282 </sect3> |
15326 | 283 |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
284 <sect3 id="codec-x264-encode"> |
15326 | 285 <title>How can I encode videos using <application>MEncoder</application> and <systemitem class="library">x264</systemitem>?</title> |
286 <para> | |
287 If you have the subversion client installed, the latest x264 | |
288 sources can be gotten with this command: | |
20686 | 289 <screen>svn co svn://svn.videolan.org/x264/trunk x264</screen> |
15326 | 290 <application>MPlayer</application> sources are updated whenever |
291 an <systemitem class="library">x264</systemitem> API change | |
18599 | 292 occurs, so it is always suggested to use |
293 <application>MPlayer</application> from Subversion as well. | |
15326 | 294 Perhaps this situation will change when and if an |
295 <systemitem class="library">x264</systemitem> "release" occurs. | |
296 Meanwhile, <systemitem class="library">x264</systemitem> should | |
297 be considered very unstable, in the sense that its programming | |
298 interface is subject to change. | |
299 </para> | |
300 <para> | |
301 <systemitem class="library">x264</systemitem> is built and | |
302 installed in the standard way: | |
20686 | 303 <screen>./configure && make && sudo make install</screen> |
15326 | 304 This installs libx264.a in /usr/local/lib and x264.h is placed in |
305 /usr/local/include. | |
306 | |
307 With the <systemitem class="library">x264</systemitem> library | |
308 and header placed in the standard locations, building | |
309 <application>MPlayer</application> with | |
310 <systemitem class="library">x264</systemitem> support is easy. | |
311 Just run the standard: | |
312 <screen>./configure && make && sudo make install</screen> | |
20689 | 313 The <filename>./configure</filename> script will autodetect that you have satisfied the |
15326 | 314 requirements for <systemitem class="library">x264</systemitem>. |
315 </para> | |
316 </sect3> | |
9675 | 317 </sect2> |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
318 </sect1> |
9675 | 319 |
320 <!-- ********** --> | |
321 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
322 <sect1 id="audio-codecs"> |
9675 | 323 <title>Audio codecs</title> |
324 | |
325 <itemizedlist> | |
326 <title>The most important audio codecs above all:</title> | |
327 <listitem><simpara> | |
11342 | 328 MPEG layer 1/2/3 (MP1/2/3) audio (<emphasis role="bold">native</emphasis> |
9675 | 329 code, with MMX/SSE/3DNow! optimization) |
330 </simpara></listitem> | |
331 <listitem><simpara> | |
13222 | 332 Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) (<emphasis role="bold">native</emphasis> code, with |
11822
359eaf957bf1
Add <systemitem class="library"> tags to libavcodec and a few others.
diego
parents:
11758
diff
changeset
|
333 <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>) |
9675 | 334 </simpara></listitem> |
335 <listitem><simpara> | |
336 Windows Media Audio 9 (WMAv3) (using DMO DLL) | |
337 </simpara></listitem> | |
338 <listitem><simpara> | |
339 AC3 Dolby audio (<emphasis role="bold">native</emphasis> code, with | |
340 MMX/SSE/3DNow! optimization) | |
341 </simpara></listitem> | |
342 <listitem><simpara> | |
13532 | 343 AC3 passing through sound card hardware |
9675 | 344 </simpara></listitem> |
345 <listitem><simpara> | |
11342 | 346 AAC |
347 </simpara></listitem> | |
348 <listitem><simpara> | |
9675 | 349 Ogg Vorbis audio codec (<emphasis role="bold">native</emphasis> library) |
350 </simpara></listitem> | |
351 <listitem><simpara> | |
352 RealAudio: DNET (low bitrate AC3), Cook, Sipro and ATRAC3 | |
353 </simpara></listitem> | |
354 <listitem><simpara> | |
355 QuickTime: Qualcomm and QDesign audio codecs | |
356 </simpara></listitem> | |
357 <listitem><simpara> | |
358 VIVO audio (g723, Vivo Siren) | |
359 </simpara></listitem> | |
360 <listitem><simpara> | |
361 Voxware audio (using DirectShow DLL) | |
362 </simpara></listitem> | |
363 <listitem><simpara> | |
364 alaw and ulaw, various gsm, adpcm and pcm formats and other simple old | |
365 audio codecs | |
366 </simpara></listitem> | |
18060
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
367 <listitem><simpara> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
368 Adaptive Multi-Rate (AMR) speech codecs |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
369 </simpara></listitem> |
9675 | 370 </itemizedlist> |
371 | |
372 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
373 <sect2 id="swac3"> |
9675 | 374 <title>Software AC3 decoding</title> |
375 | |
376 <para> | |
377 This is the default decoder used for files with AC3 audio. | |
378 </para> | |
379 | |
380 <para> | |
381 The AC3 decoder can create audio output mixes for 2, 4, or 6 speakers. | |
382 When configured for 6 speakers, this decoder provides separate output of | |
383 all the AC3 channels to the sound driver, allowing for full "surround | |
384 sound" experience without the external AC3 decoder required to use the | |
385 hwac3 codec. | |
386 </para> | |
387 | |
388 <para> | |
389 Use the <option>-channels</option> option to select the number of output | |
390 channels. Use <option>-channels 2</option> for a stereo downmix. For a 4 | |
391 channel downmix (Left Front, Right Front, Left Surround and Right Surround | |
392 outputs), use <option>-channels 4</option>. In this case, any center | |
393 channel will be mixed equally to the front channels. <option>-channels | |
394 6</option> will output all the AC3 channels as they are encoded - in the | |
395 order Left, Right, Left Surround, Right Surround, Center and LFE. | |
396 </para> | |
397 | |
398 <para> | |
399 The default number of output channels is 2. | |
400 </para> | |
401 | |
402 <para> | |
403 To use more than 2 output channels, you will need to use OSS, and have a | |
404 sound card that supports the appropriate number of output channels via the | |
405 SNDCTL_DSP_CHANNELS ioctl. An example of a suitable driver is emu10k1 | |
406 (used by Soundblaster Live! cards) from August 2001 or newer (ALSA CVS is | |
407 also supposed to work). | |
408 </para> | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
409 </sect2> |
9675 | 410 |
411 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
412 <sect2 id="hwac3"> |
9675 | 413 <title>Hardware AC3 decoding</title> |
414 <para> | |
12369 | 415 You need an AC3 capable sound card, with digital out (S/PDIF). The card's |
9675 | 416 driver must properly support the AFMT_AC3 format (C-Media does). Connect |
12369 | 417 your AC3 decoder to the S/PDIF output, and use the <option>-ac |
9675 | 418 hwac3</option> option. It is experimental but known to work with C-Media |
419 cards and Soundblaster Live! + ALSA (but not OSS) drivers and DXR3/Hollywood+ | |
420 MPEG decoder cards. | |
421 </para> | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
422 </sect2> |
9675 | 423 |
424 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
425 <sect2 id="libmad"> |
20684
9076064494eb
A bunch of missing <systemitem class="library"> tags
torinthiel
parents:
20683
diff
changeset
|
426 <title><systemitem class="library">libmad</systemitem> support</title> |
9675 | 427 |
428 <para> | |
20684
9076064494eb
A bunch of missing <systemitem class="library"> tags
torinthiel
parents:
20683
diff
changeset
|
429 <ulink url="http://www.underbit.com/products/mad/"><systemitem class="library">libmad</systemitem></ulink> |
9076064494eb
A bunch of missing <systemitem class="library"> tags
torinthiel
parents:
20683
diff
changeset
|
430 is a multiplatform, integer (internally 24bit PCM) only |
9675 | 431 MPEG audio decoding library. It does not handle broken files well, and it |
11342 | 432 sometimes has problems with seeking, but it may perform better on FPU-less |
20684
9076064494eb
A bunch of missing <systemitem class="library"> tags
torinthiel
parents:
20683
diff
changeset
|
433 (such as <link linkend="arm">ARM</link>) platform than <systemitem class="library">mp3lib</systemitem>. |
9675 | 434 </para> |
435 | |
436 <para> | |
20684
9076064494eb
A bunch of missing <systemitem class="library"> tags
torinthiel
parents:
20683
diff
changeset
|
437 If you have a proper installation of <systemitem class="library">libmad</systemitem>, |
20689 | 438 <filename>./configure</filename> |
20315 | 439 will notice and support for MPEG audio decoding via |
440 <systemitem class="library">libmad</systemitem> will be built automatically. | |
9675 | 441 </para> |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
442 </sect2> |
9675 | 443 |
17432 | 444 <sect2 id="hwmpa"> |
445 <title>Hardware MPEG audio codec</title> | |
446 | |
447 <para> | |
20683 | 448 This codec (selected by <option>-ac hwmpa</option>) passes through MPEG audio packets |
17432 | 449 to hardware decoders, such as the ones found in full-featured DVB cards |
450 and DXR2 adapters. | |
451 Don't use it in combination with any other audio output device | |
452 (such as OSS and ALSA) that isn't able to decode it (you will hear | |
453 only white noise). | |
454 </para> | |
455 </sect2> | |
456 | |
9675 | 457 |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
458 <sect2 id="aac"> |
9802 | 459 <title>AAC codec</title> |
460 <para> | |
461 AAC (Advanced Audio Coding) is an audio codec sometimes found in MOV and MP4 | |
462 files. An open source decoder called FAAD is available from | |
10766 | 463 <ulink url="http://www.audiocoding.com"/>. |
14658 | 464 <application>MPlayer</application> includes a CVS snapshot of libfaad 2.1 |
465 beta, so you do not need to get it separately. | |
9802 | 466 </para> |
11031 | 467 |
468 <para> | |
469 If you use gcc 3.2 which fails to compile our internal FAAD or want to use | |
470 the external library for some other reason, download the library from the | |
14113 | 471 <ulink url="http://www.audiocoding.com/modules/mydownloads/">download page</ulink> |
20689 | 472 and pass <option>--enable-faad-external</option> to <filename>./configure</filename>. |
11031 | 473 You do not need all of faad2 to decode AAC files, libfaad is enough. Build |
474 it like this: | |
475 <screen> | |
476 cd faad2/ | |
14700 | 477 sh bootstrap |
11031 | 478 ./configure |
479 cd libfaad | |
480 make | |
481 make install | |
482 </screen> | |
483 Binaries are not available from audiocoding.com, but you can (apt-)get Debian | |
18820 | 484 packages from <ulink url="http://www.debian-multimedia.org/">Christian Marillat's homepage</ulink>, |
15894 | 485 Mandrake/Mandriva RPMs from the <ulink url="http://plf.zarb.org">P.L.F</ulink> and RedHat RPMs |
12882 | 486 from <ulink url="http://greysector.rangers.eu.org/">Grey Sector</ulink>. |
11031 | 487 </para> |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
488 </sect2> |
9802 | 489 |
18060
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
490 <sect2 id="amr"> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
491 <title>AMR codecs</title> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
492 <para> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
493 Adaptive Multi-Rate speech codec is used in third generation (3G) mobile |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
494 phones. |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
495 Reference implementation is available from |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
496 <ulink url="http://www.3gpp.org">The 3rd Generation Partnership Project</ulink> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
497 (free for private use). |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
498 </para> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
499 <para> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
500 To enable support, download the sources for |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
501 <ulink url="http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26104-610.zip">AMR-NB</ulink> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
502 and |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
503 <ulink url="http://www.3gpp.org/ftp/Specs/latest/Rel-6/26_series/26204-600.zip">AMR-WB</ulink> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
504 codecs, put them in the directory where you unpacked the |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
505 <application>MPlayer</application> source and run the following commands: |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
506 <screen> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
507 unzip 26104-610.zip |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
508 unzip 26104-610_ANSI_C_source_code.zip |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
509 mv c-code libavcodec/amr_float |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
510 unzip 26204-600.zip |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
511 unzip 26204-600_ANSI-C_source_code.zip |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
512 mv c-code libavcodec/amrwb_float |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
513 </screen> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
514 After that, follow the usual <application>MPlayer</application> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
515 <link linkend="features">build procedure</link>. |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
516 </para> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
517 </sect2> |
cbc29633fbee
AMR codecs support info, patch by Rathann, with slight alteration by me.
gpoirier
parents:
17432
diff
changeset
|
518 |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
519 </sect1> |
9675 | 520 |
521 <!-- ********** --> | |
522 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
523 <sect1 id="codec-importing"> |
9675 | 524 <title>Win32 codecs importing HOWTO</title> |
525 | |
526 <!-- TODO: a short paragraph of text would be nice here... --> | |
527 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
528 <sect2 id="vfw-codecs"> |
9675 | 529 <title>VFW codecs</title> |
530 | |
531 <para> | |
532 VFW (Video for Windows) is the old Video API for Windows. Its codecs have | |
533 the <filename>.DLL</filename> or (rarely) <filename>.DRV</filename> | |
534 extension. If <application>MPlayer</application> fails at playing your AVI | |
535 with this kind of message: | |
536 <screen>UNKNOWN video codec: HFYU (0x55594648)</screen> | |
537 It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU = | |
538 HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you | |
539 have to find out which DLL Windows loads in order to play this file. In our | |
540 case, the <filename>system.ini</filename> contains this information in a | |
541 line that reads: | |
542 <programlisting>VIDC.HFYU=huffyuv.dll</programlisting> | |
543 </para> | |
544 | |
545 <para> | |
546 So you need the <filename>huffyuv.dll</filename> file. Note that the audio | |
547 codecs are specified by the MSACM prefix: | |
548 <programlisting>msacm.l3acm=L3codeca.acm</programlisting> | |
549 </para> | |
550 | |
551 <para> | |
552 This is the MP3 codec. Now that you have all the necessary information | |
553 (fourcc, codec file, sample AVI), submit your codec support request by | |
554 mail, and upload these files to the FTP site: | |
555 <systemitem role="url"> | |
20688 | 556 ftp://upload.mplayerhq.hu/MPlayer/incoming/<replaceable><codecname></replaceable>/ |
9675 | 557 </systemitem> |
558 </para> | |
559 | |
560 <note><para>On Windows NT/2000/XP search for this info in the registry, | |
561 e.g. search for "VIDC.HFYU". To find out how to do this, look at | |
562 the old DirectShow method below. | |
563 </para></note> | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
564 </sect2> |
9675 | 565 |
566 | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
567 <sect2 id="dshow-codecs"> |
9675 | 568 <title>DirectShow codecs</title> |
569 | |
570 <para> | |
571 DirectShow is the newer Video API, which is even worse than its predecessor. | |
572 Things are harder with DirectShow, since | |
573 <itemizedlist> | |
574 <listitem><simpara> | |
575 <filename>system.ini</filename> does not contain the needed information, | |
576 instead it is stored in the registry and | |
577 </simpara></listitem> | |
578 <listitem><simpara> | |
579 we need the GUID of the codec. | |
580 </simpara></listitem> | |
581 </itemizedlist> | |
582 </para> | |
583 | |
584 <procedure> | |
585 <title>New Method:</title> | |
586 <para> | |
587 Using <application>Microsoft GraphEdit</application> (fast) | |
588 </para> | |
589 <step><para> | |
590 Get <application>GraphEdit</application> from either DirectX SDK or | |
20322 | 591 <ulink url="http://doom9.net">doom9</ulink>. |
9675 | 592 </para></step> |
593 <step><para> | |
594 Start <command>graphedit.exe</command>. | |
595 </para></step> | |
596 <step><para> | |
597 From the menu select Graph -> Insert Filters. | |
598 </para></step> | |
599 <step><para> | |
20322 | 600 Expand item <systemitem>DirectShow Filters</systemitem>. |
9675 | 601 </para></step> |
602 <step><para> | |
603 Select the right codec name and expand item. | |
604 </para></step> | |
605 <step><para> | |
606 In the entry <systemitem>DisplayName</systemitem> look at the text in | |
607 winged brackets after the backslash and write it down (five dash-delimited | |
608 blocks, the GUID). | |
609 </para></step> | |
610 <step><para> | |
611 The codec binary is the file specified in the <systemitem>Filename</systemitem> | |
612 entry. | |
613 </para></step> | |
614 </procedure> | |
615 | |
616 <note> | |
617 <para> | |
618 If there is no <systemitem>Filename</systemitem> and | |
619 <systemitem>DisplayName</systemitem> contains something like | |
620 <systemitem>device:dmo</systemitem>, then it is a DMO-Codec. | |
621 </para> | |
622 </note> | |
623 | |
624 <procedure> | |
625 <title>Old Method:</title> | |
626 <para> | |
627 Take a deep breath and start searching the registry... | |
628 </para> | |
629 <step><para> | |
630 Start <command>regedit</command>. | |
631 </para></step> | |
632 <step><para> | |
633 Press <keycap>Ctrl</keycap>+<keycap>F</keycap>, disable the first two | |
634 checkboxes, and enable the third. Type in the fourcc of the codec (e.g. | |
635 <userinput>TM20</userinput>). | |
636 </para></step> | |
637 <step><para> | |
638 You should see a field which contains the path and the filename (e.g. | |
639 <filename>C:\WINDOWS\SYSTEM\TM20DEC.AX</filename>). | |
640 </para></step> | |
641 <step><para> | |
642 Now that you have the file, we need the GUID. Try searching again, but | |
643 now search for the codec's name, not the fourcc. Its name can be acquired | |
644 when Media Player is playing the file, by checking | |
645 <guimenu>File</guimenu> -> <guisubmenu>Properties</guisubmenu> -> | |
646 <guimenuitem>Advanced</guimenuitem>. | |
647 If not, you are out of luck. Try guessing (e.g. search for TrueMotion). | |
648 </para></step> | |
649 <step><para> | |
650 If the GUID is found you should see a <guilabel>FriendlyName</guilabel> | |
651 and a <guilabel>CLSID</guilabel> field. Write down the 16 byte CLSID, | |
652 this is the GUID we need. | |
653 </para></step> | |
654 </procedure> | |
655 | |
656 <note> | |
657 <para> | |
658 If searching fails, try enabling all the checkboxes. You may have | |
659 false hits, but you may get lucky... | |
660 </para> | |
661 </note> | |
662 | |
663 <para> | |
664 Now that you have all the necessary information (fourcc, GUID, codec file, | |
665 sample AVI), submit your codec support request by mail, and upload these files | |
666 to the FTP site: | |
667 <systemitem | |
20688 | 668 role="url">ftp://upload.mplayerhq.hu/MPlayer/incoming/<replaceable><codecname></replaceable>/ |
9675 | 669 </systemitem> |
670 </para> | |
14004
3d698ac7ec9a
Explain what you need to read to add a codec yourself, patch by
diego
parents:
13977
diff
changeset
|
671 |
3d698ac7ec9a
Explain what you need to read to add a codec yourself, patch by
diego
parents:
13977
diff
changeset
|
672 <para> |
3d698ac7ec9a
Explain what you need to read to add a codec yourself, patch by
diego
parents:
13977
diff
changeset
|
673 If you want to add a codec yourself, read |
3d698ac7ec9a
Explain what you need to read to add a codec yourself, patch by
diego
parents:
13977
diff
changeset
|
674 <ulink url="http://www.mplayerhq.hu/MPlayer/DOCS/tech/codecs.conf.txt">DOCS/tech/codecs.conf.txt</ulink>. |
3d698ac7ec9a
Explain what you need to read to add a codec yourself, patch by
diego
parents:
13977
diff
changeset
|
675 </para> |
3d698ac7ec9a
Explain what you need to read to add a codec yourself, patch by
diego
parents:
13977
diff
changeset
|
676 |
9675 | 677 </sect2> |
678 </sect1> | |
17321
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
679 |
7f9fcf5245a0
Improve overall structure by adding a few top-level chapters so that
diego
parents:
17273
diff
changeset
|
680 </chapter> |