Mercurial > mplayer.hg
comparison DOCS/xml/en/codecs.xml @ 9675:62c5a17038ba
XML version of MPlayer's doc
author | nicolas |
---|---|
date | Sun, 23 Mar 2003 23:35:12 +0000 |
parents | |
children | c70001c8bde9 |
comparison
equal
deleted
inserted
replaced
9674:461f71ba8af4 | 9675:62c5a17038ba |
---|---|
1 <?xml version="1.0" encoding="iso-8859-1"?> | |
2 <sect1 id="codecs"> | |
3 <title>Supported codecs</title> | |
4 | |
5 <sect2 id="video-codecs"> | |
6 <title>Video codecs</title> | |
7 | |
8 <para> | |
9 See the <ulink url="http://www.mplayerhq.hu/DOCS/codecs-status.html">codec status table</ulink> | |
10 for the complete, daily generated list. Quite a few codecs are available for | |
11 download from our homepage. Grab them from our | |
12 <ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/">codecs page</ulink>. | |
13 </para> | |
14 | |
15 <para> | |
16 The most important ones above all: | |
17 </para> | |
18 | |
19 <itemizedlist> | |
20 <listitem><simpara> | |
21 <emphasis role="bold">MPEG1</emphasis> (<emphasis role="bold">VCD</emphasis>) and | |
22 <emphasis role="bold">MPEG2</emphasis> (<emphasis role="bold">DVD</emphasis>) video | |
23 </simpara></listitem> | |
24 <listitem><simpara> | |
25 native decoders for <emphasis role="bold">DivX ;-), OpenDivX (DivX4), | |
26 DivX 5.01, 3ivX, M$ MPEG4</emphasis> v1, v2 and other MPEG4 variants | |
27 </simpara></listitem> | |
28 <listitem><simpara> | |
29 native decoder for <emphasis role="bold">Windows Media Video 7/8</emphasis> | |
30 (<emphasis role="bold">WMV1/WMV2</emphasis>), and Win32 DLL decoder | |
31 for <emphasis role="bold">Windows Media Video 9</emphasis> | |
32 (<emphasis role="bold">WMV3</emphasis>), both used in <filename>.wmv</filename> | |
33 files | |
34 </simpara></listitem> | |
35 <listitem><simpara> | |
36 native <emphasis role="bold">Sorenson 1 (SVQ1)</emphasis> decoder | |
37 </simpara></listitem> | |
38 <listitem><simpara> | |
39 Win32/QT <emphasis role="bold">Sorenson 3 (SVQ3)</emphasis> decoder | |
40 </simpara></listitem> | |
41 <listitem><simpara> | |
42 <emphasis role="bold">3ivx</emphasis> v1, v2 decoder | |
43 </simpara></listitem> | |
44 <listitem><simpara> | |
45 Cinepak and <emphasis role="bold">Intel Indeo</emphasis> codecs (3.1,3.2,4.1,5.0) | |
46 </simpara></listitem> | |
47 <listitem><simpara> | |
48 <emphasis role="bold">MJPEG</emphasis>, AVID, VCR2, ASV2 and other hardware | |
49 formats | |
50 </simpara></listitem> | |
51 <listitem><simpara> | |
52 VIVO 1.0, 2.0, I263 and other <emphasis role="bold">h263(+)</emphasis> variants | |
53 </simpara></listitem> | |
54 <listitem><simpara> | |
55 FLI/FLC | |
56 </simpara></listitem> | |
57 <listitem><simpara> | |
58 <emphasis role="bold">RealVideo 1.0</emphasis> from libavcodec, and | |
59 <emphasis role="bold">RealVideo 2.0, 3.0</emphasis> and | |
60 <emphasis role="bold">4.0</emphasis> codecs using RealPlayer libraries | |
61 </simpara></listitem> | |
62 <listitem><simpara> | |
63 native decoder for HuffYUV | |
64 </simpara></listitem> | |
65 <listitem><simpara> | |
66 Various old simple RLE-like formats | |
67 </simpara></listitem> | |
68 </itemizedlist> | |
69 | |
70 <para> | |
71 If you have a Win32 codec not listed here which is not supported yet, | |
72 please read the <link linkend="win32-codecs">codec importing HOWTO</link> | |
73 and help us add support for it. | |
74 </para> | |
75 | |
76 | |
77 <sect3 id="divx4-5"> | |
78 <title>DivX4/DivX5</title> | |
79 | |
80 <para> | |
81 This section contains information about the DivX4 codec of | |
82 <ulink url="http://www.projectmayo.com">Project Mayo</ulink>. | |
83 Their first available alpha version was OpenDivX 4.0 alpha 47 and 48. | |
84 Support for this was included in <application>MPlayer</application> in the | |
85 past, and built by default. We also used its postprocessing code to | |
86 optionally enhance visual quality of MPEG1/2 movies. Now we use our own, | |
87 for all file types. | |
88 </para> | |
89 | |
90 <para> | |
91 The new generation of this codec is called DivX4 and can even decode | |
92 movies made with the infamous DivX codec! In addition it is much faster | |
93 than the native Win32 DivX DLLs but slower than <systemitem | |
94 class="library">libavcodec</systemitem>. Hence its usage as a decoder is | |
95 <emphasis role="bold">DISCOURAGED</emphasis>. However, it is useful for | |
96 encoding. One disadvantage of this codec is that it is not available under an | |
97 Open Source license. | |
98 </para> | |
99 | |
100 <para> | |
101 DivX4 works in two modes: | |
102 <variablelist> | |
103 <varlistentry><term><option>-vc odivx</option></term> | |
104 <listitem><simpara> | |
105 Uses the codec in OpenDivX fashion. In this case it produces YV12 images | |
106 in its own buffer, and <application>MPlayer</application> does colorspace | |
107 conversion via libvo. (<emphasis role="bold">Fast, recommended!</emphasis>) | |
108 </simpara></listitem> | |
109 </varlistentry> | |
110 <varlistentry><term><option>-vc divx4</option></term> | |
111 <listitem><simpara> | |
112 Uses the colorspace conversion of the codec. In this mode you can use | |
113 YUY2/UYVY, too. (<emphasis role="bold">SLOW</emphasis>) | |
114 </simpara></listitem> | |
115 </varlistentry> | |
116 </variablelist> | |
117 </para> | |
118 | |
119 <para> | |
120 The <option>-vc odivx</option> method is usually faster, due to the fact | |
121 that it transfers image data in YV12 (planar YUV 4:2:0) format, thus | |
122 requiring much less bandwidth on the bus. For packed YUV modes (YUY2, UYVY) | |
123 use the <option>-vc divx4</option> method. For RGB modes the speed is the | |
124 same, differing at best according to your current color depth. | |
125 <note> | |
126 <para> | |
127 If your <option>-vo</option> driver supports direct rendering, then <option>-vc | |
128 divx4</option> may be faster, or even the fastest solution. | |
129 </para> | |
130 | |
131 <para> | |
132 The Divx4/5 binary codec library can be downloaded from | |
133 <ulink url="http://avifile.sourceforge.net">avifile</ulink> or | |
134 <ulink url="http://www.divx.com">divx.com</ulink> | |
135 Unpack it, run <filename>./install.sh</filename> as root and do not forget adding | |
136 <filename class="directory">/usr/local/lib</filename> to your | |
137 <filename>/etc/ld.so.conf</filename> and running <command>ldconfig</command>. | |
138 </para> | |
139 | |
140 <para> | |
141 Get the CVS version of the OLD OpenDivx core library like this: | |
142 </para> | |
143 | |
144 <procedure> | |
145 <step><para> | |
146 <screen>cvs -d:pserver:anonymous@cvs.projectmayo.com:/cvsroot login</screen> | |
147 </para></step> | |
148 <step><para> | |
149 <screen>cvs -d:pserver:anonymous@cvs.projectmayo.com:/cvsroot co divxcore</screen> | |
150 </para></step> | |
151 <step><para> | |
152 This core library is split into a decore and encore library that have to be | |
153 compiled separately. For the decore Library, simply type | |
154 <screen> | |
155 cd divxcore/decore/build/linux | |
156 make | |
157 cp libdivxdecore.so /usr/local/lib | |
158 ln -s /usr/local/lib/libdivxdecore.so /usr/local/lib/libdivxdecore.so.0 | |
159 cp ../../src/decore.h /usr/local/include | |
160 </screen> | |
161 </para></step> | |
162 <step><para> | |
163 Alas, for the encore library there is no Linux Makefile available, and the | |
164 MMX optimized code only works on Windows. You can still compile it, though, | |
165 by using this | |
166 <ulink url="ftp://ftp.mplayerhq.hu/MPlayer/contrib/divx-mf/Makefile">Makefile</ulink>. | |
167 <screen> | |
168 cd ../../../encore/build | |
169 mkdir linux | |
170 cd linux | |
171 cp path/Makefile . | |
172 make | |
173 cp libdivxencore.so /usr/local/lib | |
174 ln -s /usr/local/lib/libdivxdecore.so /usr/local/lib/libdivxdecore.so.0 | |
175 cp ../../src/encore.h /usr/local/include | |
176 </screen> | |
177 </para></step> | |
178 </procedure> | |
179 | |
180 <para> | |
181 <application>MPlayer</application> autodetects DivX4/DivX5 if it is | |
182 properly installed, just compile as usual. If it does not detect it, you | |
183 did not install or configure it correctly. | |
184 </para> | |
185 | |
186 </note> | |
187 </para> | |
188 </sect3> | |
189 | |
190 | |
191 <sect3 id="ffmpeg" xreflabel="FFmpeg DivX/libavcodec"> | |
192 <title>FFmpeg DivX/libavcodec</title> | |
193 | |
194 <para> | |
195 <ulink url="http://ffmpeg.sourceforge.net">FFmpeg</ulink> contains an | |
196 <emphasis role="bold">open source</emphasis> codec package, which is capable | |
197 of decoding streams encoded with H263/MJPEG/RV10/DivX3/DivX4/DivX5/MP41/MP42/WMV1/WMV2/HuffYUV | |
198 video, or WMA (Windows Media Audio) audio codecs. Not only some of them can be | |
199 encoded with, but it also offers higher speed than the Win32 codecs or the | |
200 DivX.com DivX4/5 library! | |
201 </para> | |
202 | |
203 <para> | |
204 It contains a lot of nice codecs, especially important are the MPEG4 variants: | |
205 DivX3, DivX4, DivX5, Windows Media Video 7 (WMV1). Also a very interesting one | |
206 is the WMA decoder. | |
207 </para> | |
208 | |
209 <para> | |
210 If you use an <application>MPlayer</application> release you have libavcodec | |
211 right in the package, just build as usual. If you use | |
212 <application>MPlayer</application> from CVS you have to extract libavcodec from | |
213 the FFmpeg CVS tree as FFmpeg releases <emphasis role="bold">don't</emphasis> | |
214 work with <application>MPlayer</application>. In order to achieve this do: | |
215 </para> | |
216 | |
217 <procedure> | |
218 <step><para> | |
219 <screen>cvs -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg login</screen> | |
220 </para></step> | |
221 <step><para> | |
222 <screen>cvs -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg co ffmpeg</screen> | |
223 </para></step> | |
224 <step><para> | |
225 Move the <filename>libavcodec</filename> directory from the FFmpeg | |
226 sources to the root of the <application>MPlayer</application> CVS tree. | |
227 It should look like this: | |
228 <filename>main/libavcodec</filename> | |
229 </para><para> | |
230 Symlinking is <emphasis role="bold">not</emphasis> enough, you have to | |
231 copy/move it! | |
232 </para></step> | |
233 <step><para> | |
234 Compile. <filename>configure</filename> should detect problems before | |
235 compilation. | |
236 </para></step> | |
237 </procedure> | |
238 | |
239 <note> | |
240 <para> | |
241 <application>MPlayer</application> from CVS does contain a | |
242 <filename>libavcodec</filename> subdirectory, but it does | |
243 <emphasis role="bold">not</emphasis> contain the source for libavcodec! | |
244 You must follow the steps above to obtain the source for this library. | |
245 </para> | |
246 </note> | |
247 | |
248 <para> | |
249 With FFmpeg and my Matrox G400, I can view even the highest resolution DivX | |
250 movies without dropped frames on my K6/2 500. | |
251 </para> | |
252 </sect3> | |
253 | |
254 | |
255 <sect3 id="xanim"> | |
256 <title>XAnim codecs</title> | |
257 | |
258 <note> | |
259 <para> | |
260 Be advised that the XAnim binary codecs are packaged with a piece of text | |
261 claiming to be a legally binding software license which, besides other | |
262 restrictions, forbids the user to use the codecs in conjunction with any | |
263 program other than <application>XAnim</application>. However, the XAnim | |
264 author has yet to bring legal action against anyone for codec-related issues. | |
265 </para> | |
266 </note> | |
267 | |
268 <formalpara> | |
269 <title>INSTALLATION AND USAGE</title> | |
270 <para> | |
271 <application>MPlayer</application> is capable of employing the XAnim codecs | |
272 for decoding. Follow the instructions to enable them: | |
273 </para> | |
274 </formalpara> | |
275 | |
276 <procedure> | |
277 <step><para> | |
278 Download the codecs you wish to use from the | |
279 <ulink url="http://xanim.va.pubnix.com">XAnim site</ulink>. | |
280 The 3ivx codec is not there, but at the | |
281 <ulink url="http://www.3ivx.com">3ivx site</ulink>. | |
282 </para></step> | |
283 <step><para> | |
284 Use the <option>--with-xanimlibdir</option> option to tell | |
285 <filename>configure</filename> where | |
286 to find the XAnim codecs. By default, it looks for them at | |
287 <filename class="directory">/usr/local/lib/xanim/mods</filename>, | |
288 <filename class="directory">/usr/lib/xanim/mods</filename> and | |
289 <filename class="directory">/usr/lib/xanim</filename>. | |
290 Alternatively you can set the environment variable | |
291 <envar>XANIM_MOD_DIR</envar> to the directory of the XAnim codecs. | |
292 </para></step> | |
293 <step><para> | |
294 Rename/symlink the files, cutting out the architecture stuff, so they | |
295 will have filenames like these: <filename>vid_cvid.xa</filename>, | |
296 <filename>vid_h263.xa</filename>, <filename>vid_iv50.xa</filename> | |
297 </para></step> | |
298 </procedure> | |
299 | |
300 <para> | |
301 XAnim is video codec family <systemitem>xanim</systemitem>, so you may want | |
302 to use the <option>-vfm xanim</option> option to tell <application>MPlayer</application> | |
303 to use them if possible. | |
304 </para> | |
305 | |
306 <para> | |
307 Tested codecs include: <emphasis role="bold">Indeo 3.2, 4.1, 5.0, CVID, 3ivX, | |
308 h263.</emphasis> | |
309 </para> | |
310 </sect3> | |
311 | |
312 | |
313 <sect3 id="vivo-video"> | |
314 <title>VIVO video</title> | |
315 <para> | |
316 <application>MPlayer</application> can play Vivo (1.0 and 2.0) videos. The | |
317 most suitable codec for 1.0 files is FFmpeg's H263 decoder, you can use it | |
318 with the <option>-vc ffh263</option> option. For 2.0 files, use the | |
319 Win32 DLL through the <option>-vc vivo</option> option. If you do not supply | |
320 command line options <application>MPlayer</application> selects the best codec | |
321 automatically. | |
322 </para> | |
323 </sect3> | |
324 | |
325 | |
326 <sect3 id="mpeg12"> | |
327 <title>MPEG 1/2 video</title> | |
328 <para> | |
329 MPEG1 and MPEG2 are decoded by the multiplatform native <systemitem | |
330 class="library">libmpeg2</systemitem> library, whose source code is | |
331 included in <application>MPlayer</application>. We handle buggy MPEG 1/2 | |
332 video files by catching <systemitem>Signal 11</systemitem> | |
333 (<systemitem>segmentation fault</systemitem>), and quickly | |
334 reinitializing the codec, continuing exactly from where the failure | |
335 occurred. This recovery technique has no measurable speed penalty. | |
336 </para> | |
337 </sect3> | |
338 | |
339 | |
340 <sect3 id="msvideo1"> | |
341 <title>MS Video1</title> | |
342 <para> | |
343 This is a very old and very bad codec from Microsoft. In the past it was | |
344 decoded with the <filename>msvidc32.dll</filename> Win32 codec, now we have | |
345 our own open source implementation | |
346 (by <ulink url="mailto:melanson@pcisys.net">Mike Melanson</ulink>). | |
347 </para> | |
348 </sect3> | |
349 | |
350 | |
351 <sect3 id="cinepak-cvid"> | |
352 <title>Cinepak CVID</title> | |
353 <para> | |
354 <application>MPlayer</application> uses its own open source, multiplatform | |
355 Cinepak decoder (by <ulink url="mailto:timf@csse.monash.edu.au">Dr. Tim Ferguson</ulink>) | |
356 by default. It supports YUV outputs, so that hardware | |
357 scaling is possible if the video output driver permits it. | |
358 </para> | |
359 </sect3> | |
360 | |
361 | |
362 <sect3 id="realvideo"> | |
363 <title>RealVideo</title> | |
364 | |
365 <para> | |
366 <application>MPlayer</application> supports decoding all versions of | |
367 RealVideo: | |
368 | |
369 <itemizedlist> | |
370 <listitem><simpara> | |
371 RealVideo 1.0 (fourcc RV10) - en/decoding supported by | |
372 <systemitem class="library">libavcodec</systemitem> | |
373 </simpara></listitem> | |
374 <listitem><simpara> | |
375 RealVideo 2.0, 3.0, 4.0 (fourcc RV20, RV30, RV40) - decoding supported by | |
376 <emphasis role="bold">RealPlayer libraries</emphasis> | |
377 </simpara></listitem> | |
378 </itemizedlist> | |
379 </para> | |
380 | |
381 <para> | |
382 It is recommended to download and install <application>RealPlayer8</application> | |
383 or <application>RealONE</application>, because <application>MPlayer</application> | |
384 can use their libraries to decode files with RealVideo 2.0 - 4.0 video. The | |
385 <application>MPlayer</application> <filename>configure</filename> script should | |
386 detect the <application>RealPlayer</application> libraries in the standard | |
387 locations of a full installation. If it does not, tell <filename>configure</filename> | |
388 where to look with the <option>--with-reallibdir</option> option. | |
389 </para> | |
390 | |
391 <note><para> | |
392 <application>RealPlayer</application> libraries currently | |
393 <emphasis role="bold">only work with Linux, FreeBSD, NetBSD and Cygwin on the x86, | |
394 Alpha and PowerPC (Linux/Alpha and Linux/PowerPC have been tested) platforms</emphasis>. | |
395 </para></note> | |
396 </sect3> | |
397 | |
398 | |
399 <sect3 id="xvid"> | |
400 <title>XViD</title> | |
401 | |
402 <para> | |
403 <ulink url="http://www.xvid.org">XViD</ulink> is a forked development of the | |
404 OpenDivX codec. It happened when ProjectMayo changed OpenDivX to closed source | |
405 DivX4 (now DivX5), and the non-ProjectMayo people working on OpenDivX got angry, | |
406 then started XViD. So both projects have the same origin. | |
407 | |
408 <itemizedlist> | |
409 <title>ADVANTAGES</title> | |
410 <listitem><simpara> | |
411 open source | |
412 </simpara></listitem> | |
413 <listitem><simpara> | |
414 its API is compatible with DivX4 so adding support for it is easy | |
415 </simpara></listitem> | |
416 <listitem><simpara> | |
417 2-pass encoding support | |
418 </simpara></listitem> | |
419 <listitem><simpara> | |
420 nice encoding quality, higher speed than DivX4 (you can optimize it for | |
421 your box while compiling) | |
422 </simpara></listitem> | |
423 </itemizedlist> | |
424 | |
425 <itemizedlist> | |
426 <title>DISADVANTAGES</title> | |
427 <listitem><simpara> | |
428 currently it does not properly <emphasis role="bold">decode</emphasis> all | |
429 DivX/DivX4 files (no problem as <link linkend="ffmpeg">libavcodec</link> | |
430 can play them) | |
431 </simpara></listitem> | |
432 <listitem><simpara> | |
433 you have to choose between DivX4 <emphasis role="bold">or</emphasis> XViD | |
434 support at compiletime | |
435 </simpara></listitem> | |
436 <listitem><simpara> | |
437 under development | |
438 </simpara></listitem> | |
439 </itemizedlist> | |
440 </para> | |
441 | |
442 <procedure> | |
443 <title>INSTALLING XVID CVS</title> | |
444 <para> | |
445 It is currently available only from CVS. Here are the download and | |
446 installation instructions: | |
447 </para> | |
448 <step><para> | |
449 <screen>cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid login</screen> | |
450 </para></step> | |
451 <step><para> | |
452 <screen>cvs -z3 -d:pserver:anonymous@cvs.xvid.org:/xvid co xvidcore</screen> | |
453 </para></step> | |
454 <step><para> | |
455 <screen>cd xvidcore/build/generic</screen> | |
456 </para></step> | |
457 <step><para> | |
458 Edit <filename>MakeFile</filename> for your architecture (probably | |
459 <filename>Makefile.linuxx86</filename>) to fit your needs. | |
460 </para></step> | |
461 <step><para> | |
462 <screen>make -f Makefile.linux</screen> | |
463 </para></step> | |
464 <step><para> | |
465 Copy <filename>divx4.h</filename> and <filename>xvid.h</filename> from | |
466 <filename class="directory">/usr/local/include/</filename>. | |
467 </para></step> | |
468 <step><para> | |
469 Get <filename>encore2.h</filename> and <filename>decore.h</filename> from | |
470 the DivX4Linux package, and copy them to | |
471 <filename class="directory">/usr/local/include/</filename>. | |
472 </para></step> | |
473 <step><para> | |
474 Recompile <application>MPlayer</application> with | |
475 <option>--with-xvidcore=<replaceable>/path/to/libxvidcore.a</replaceable></option>. | |
476 </para></step> | |
477 </procedure> | |
478 </sect3> | |
479 | |
480 | |
481 <sect3 id="sorenson"> | |
482 <title>Sorenson</title> | |
483 | |
484 <para> | |
485 Sorenson is a video codec developed by Sorenson Media and licensed to Apple who | |
486 distribute it with their <application>QuickTime Player</application>. We are | |
487 currently able to decode all version of Sorenson video files with the following | |
488 decoders. | |
489 </para> | |
490 | |
491 <itemizedlist> | |
492 <listitem><simpara> | |
493 Sorenson 1 (fourcc <emphasis>SVQ1</emphasis>) - decoding supported by | |
494 <emphasis role="bold">native codecs</emphasis>. Actually there are two | |
495 (nearly equal) decoders for SVQ1: one is built in <application>MPlayer</application>, | |
496 the other in libavcodec. You can invoke each of them with the <option>-vc svq1</option> | |
497 and <option>-vc ffsvq1</option> options respectively. Some files may work | |
498 with one of them, and not with the other, so test both decoders. The decoder | |
499 was written (reverse engineered) by the <ulink url="http://www.xinehq.de">xine</ulink> | |
500 authors. | |
501 </simpara></listitem> | |
502 <listitem><simpara> | |
503 Sorenson 3 (fourcc <emphasis>SVQ3</emphasis>) - decoding supported by | |
504 <emphasis role="bold">Win32 QuickTime libraries</emphasis> | |
505 </simpara></listitem> | |
506 </itemizedlist> | |
507 | |
508 <procedure> | |
509 <title>INSTALLING XVID CVS</title> | |
510 <note><para>currently only 32bit Intel platforms are supported.</para></note> | |
511 <step><para>download MPlayer CVS</para></step> | |
512 <step><para>compile MPlayer with: | |
513 <screen>$ ./configure --enable-qtx-codecs</screen> | |
514 </para></step> | |
515 <step><para>download QuickTime DLL pack from | |
516 <ulink url="http://www.mplayerhq.hu/MPlayer/releases/codecs/"/> | |
517 </para></step> | |
518 <step><para>extract QuickTime DLL pack to your Win32 codecs directory | |
519 (default: <filename class="directory">/usr/lib/win32</filename>) | |
520 </para></step> | |
521 </procedure> | |
522 | |
523 </sect3> | |
524 </sect2> | |
525 | |
526 <!-- ********** --> | |
527 | |
528 <sect2 id="audio-codecs"> | |
529 <title>Audio codecs</title> | |
530 | |
531 <itemizedlist> | |
532 <title>The most important audio codecs above all:</title> | |
533 <listitem><simpara> | |
534 MPEG layer 2 (MP2), and layer 3 (MP3) audio (<emphasis role="bold">native</emphasis> | |
535 code, with MMX/SSE/3DNow! optimization) | |
536 </simpara></listitem> | |
537 <listitem><simpara> | |
538 MPEG layer 1 audio (<emphasis role="bold">native</emphasis> code, with libavcodec) | |
539 </simpara></listitem> | |
540 <listitem><simpara> | |
541 Windows Media Audio v1, v2 (<emphasis role="bold">native</emphasis> code, with | |
542 libavcodec) | |
543 </simpara></listitem> | |
544 <listitem><simpara> | |
545 Windows Media Audio 9 (WMAv3) (using DMO DLL) | |
546 </simpara></listitem> | |
547 <listitem><simpara> | |
548 AC3 Dolby audio (<emphasis role="bold">native</emphasis> code, with | |
549 MMX/SSE/3DNow! optimization) | |
550 </simpara></listitem> | |
551 <listitem><simpara> | |
552 AC3 passing through soundcard hardware | |
553 </simpara></listitem> | |
554 <listitem><simpara> | |
555 Ogg Vorbis audio codec (<emphasis role="bold">native</emphasis> library) | |
556 </simpara></listitem> | |
557 <listitem><simpara> | |
558 RealAudio: DNET (low bitrate AC3), Cook, Sipro and ATRAC3 | |
559 </simpara></listitem> | |
560 <listitem><simpara> | |
561 QuickTime: Qualcomm and QDesign audio codecs | |
562 </simpara></listitem> | |
563 <listitem><simpara> | |
564 VIVO audio (g723, Vivo Siren) | |
565 </simpara></listitem> | |
566 <listitem><simpara> | |
567 Voxware audio (using DirectShow DLL) | |
568 </simpara></listitem> | |
569 <listitem><simpara> | |
570 alaw and ulaw, various gsm, adpcm and pcm formats and other simple old | |
571 audio codecs | |
572 </simpara></listitem> | |
573 </itemizedlist> | |
574 | |
575 | |
576 <sect3 id="swac3"> | |
577 <title>Software AC3 decoding</title> | |
578 | |
579 <para> | |
580 This is the default decoder used for files with AC3 audio. | |
581 </para> | |
582 | |
583 <para> | |
584 The AC3 decoder can create audio output mixes for 2, 4, or 6 speakers. | |
585 When configured for 6 speakers, this decoder provides separate output of | |
586 all the AC3 channels to the sound driver, allowing for full "surround | |
587 sound" experience without the external AC3 decoder required to use the | |
588 hwac3 codec. | |
589 </para> | |
590 | |
591 <para> | |
592 Use the <option>-channels</option> option to select the number of output | |
593 channels. Use <option>-channels 2</option> for a stereo downmix. For a 4 | |
594 channel downmix (Left Front, Right Front, Left Surround and Right Surround | |
595 outputs), use <option>-channels 4</option>. In this case, any center | |
596 channel will be mixed equally to the front channels. <option>-channels | |
597 6</option> will output all the AC3 channels as they are encoded - in the | |
598 order Left, Right, Left Surround, Right Surround, Center and LFE. | |
599 </para> | |
600 | |
601 <para> | |
602 The default number of output channels is 2. | |
603 </para> | |
604 | |
605 <para> | |
606 To use more than 2 output channels, you will need to use OSS, and have a | |
607 sound card that supports the appropriate number of output channels via the | |
608 SNDCTL_DSP_CHANNELS ioctl. An example of a suitable driver is emu10k1 | |
609 (used by Soundblaster Live! cards) from August 2001 or newer (ALSA CVS is | |
610 also supposed to work). | |
611 </para> | |
612 </sect3> | |
613 | |
614 | |
615 <sect3 id="hwac3"> | |
616 <title>Hardware AC3 decoding</title> | |
617 <para> | |
618 You need an AC3 capable sound card, with digital out (SP/DIF). The card's | |
619 driver must properly support the AFMT_AC3 format (C-Media does). Connect | |
620 your AC3 decoder to the SP/DIF output, and use the <option>-ac | |
621 hwac3</option> option. It is experimental but known to work with C-Media | |
622 cards and Soundblaster Live! + ALSA (but not OSS) drivers and DXR3/Hollywood+ | |
623 MPEG decoder cards. | |
624 </para> | |
625 </sect3> | |
626 | |
627 | |
628 <sect3 id="libmad"> | |
629 <title>libmad support</title> | |
630 | |
631 <para> | |
632 <ulink url="http://mad.sourceforge.net">libmad</ulink> is a multiplatform | |
633 MPEG audio decoding library. It does not handle broken files well, and it | |
634 sometimes has problems with seeking. | |
635 </para> | |
636 | |
637 <para> | |
638 To enable support, compile with the <option>--enable-mad</option> configure | |
639 option. | |
640 </para> | |
641 </sect3> | |
642 | |
643 | |
644 <sect3 id="vivo-audio"> | |
645 <title>VIVO audio</title> | |
646 <para> | |
647 The audio codec used in VIVO files depends on whether it is a VIVO/1.0 or | |
648 VIVO/2.0 file. VIVO/1.0 files have <emphasis role="bold">g.723</emphasis> audio, | |
649 and VIVO/2.0 files have <emphasis role="bold">Vivo Siren</emphasis> audio. Both are | |
650 supported. | |
651 </para> | |
652 </sect3> | |
653 | |
654 | |
655 <sect3 id="realaudio"> | |
656 <title>RealAudio</title> | |
657 | |
658 <para> | |
659 <application>MPlayer</application> supports decoding nearly all versions of | |
660 RealAudio: | |
661 </para> | |
662 | |
663 <itemizedlist> | |
664 <listitem><simpara> | |
665 RealAudio DNET - decoding supported by | |
666 <systemitem class="library">liba52</systemitem> | |
667 </simpara></listitem> | |
668 <listitem><simpara> | |
669 RealAudio Cook/Sipro/ATRAC3 - decoding supported by | |
670 <emphasis role="bold">RealPlayer libraries</emphasis> | |
671 </simpara></listitem> | |
672 </itemizedlist> | |
673 | |
674 <para> | |
675 On how to install RealPlayer libraries, see the | |
676 <link linkend="realmedia">RealMedia file format</link> section. | |
677 </para> | |
678 </sect3> | |
679 | |
680 <sect3 id="qdesign"> | |
681 <title>QDesign codecs</title> | |
682 <para> | |
683 QDesign audio streams (fourcc:<emphasis>QDMC, QDM2</emphasis>) are found | |
684 in MOV/QT files. Both versions of this codec can be decoded with QuickTime | |
685 libraries. For installation instructions please see the | |
686 <link linkend="sorenson">Sorenson video codec</link> section. | |
687 </para> | |
688 </sect3> | |
689 | |
690 <sect3 id="qualcomm"> | |
691 <title>Qualcomm codecs</title> | |
692 <para> | |
693 Qualcomm audio streams (fourcc:<emphasis>Qclp</emphasis>) is found | |
694 in MOV/QT files. It can be decoded with QuickTime | |
695 libraries. For installation instructions please see the | |
696 <link linkend="sorenson">Sorenson video codec</link> section. | |
697 </para> | |
698 </sect3> | |
699 </sect2> | |
700 | |
701 <!-- ********** --> | |
702 | |
703 <sect2 id="win32-codecs"> | |
704 <title>Win32 codecs importing HOWTO</title> | |
705 | |
706 <!-- TODO: a short paragraph of text would be nice here... --> | |
707 | |
708 <sect3 id="vfw-codecs"> | |
709 <title>VFW codecs</title> | |
710 | |
711 <para> | |
712 VFW (Video for Windows) is the old Video API for Windows. Its codecs have | |
713 the <filename>.DLL</filename> or (rarely) <filename>.DRV</filename> | |
714 extension. If <application>MPlayer</application> fails at playing your AVI | |
715 with this kind of message: | |
716 <screen>UNKNOWN video codec: HFYU (0x55594648)</screen> | |
717 </para> | |
718 | |
719 <para> | |
720 It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU = | |
721 HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you | |
722 have to find out which DLL Windows loads in order to play this file. In our | |
723 case, the <filename>system.ini</filename> contains this information in a | |
724 line that reads: | |
725 <programlisting>VIDC.HFYU=huffyuv.dll</programlisting> | |
726 </para> | |
727 | |
728 <para> | |
729 So you need the <filename>huffyuv.dll</filename> file. Note that the audio | |
730 codecs are specified by the MSACM prefix: | |
731 <programlisting>msacm.l3acm=L3codeca.acm</programlisting> | |
732 </para> | |
733 | |
734 <para> | |
735 This is the MP3 codec. Now that you have all the necessary information | |
736 (fourcc, codec file, sample AVI), submit your codec support request by | |
737 mail, and upload these files to the FTP site: | |
738 <systemitem role="url"> | |
739 ftp://ftp.mplayerhq.hu/MPlayer/incoming/[codecname]/ | |
740 </systemitem> | |
741 </para> | |
742 | |
743 <note><para>On Windows NT/2000/XP search for this info in the registry, | |
744 e.g. search for "VIDC.HFYU". To find out how to do this, look at | |
745 the old DirectShow method below. | |
746 </para></note> | |
747 </sect3> | |
748 | |
749 | |
750 <sect3 id="dshow-codecs"> | |
751 <title>DirectShow codecs</title> | |
752 | |
753 <para> | |
754 DirectShow is the newer Video API, which is even worse than its predecessor. | |
755 Things are harder with DirectShow, since | |
756 <itemizedlist> | |
757 <listitem><simpara> | |
758 <filename>system.ini</filename> does not contain the needed information, | |
759 instead it is stored in the registry and | |
760 </simpara></listitem> | |
761 <listitem><simpara> | |
762 we need the GUID of the codec. | |
763 </simpara></listitem> | |
764 </itemizedlist> | |
765 </para> | |
766 | |
767 <procedure> | |
768 <title>New Method:</title> | |
769 <para> | |
770 Using <application>Microsoft GraphEdit</application> (fast) | |
771 </para> | |
772 <step><para> | |
773 Get <application>GraphEdit</application> from either DirectX SDK or | |
774 <ulink url="http://doom9.org">doom9</ulink> | |
775 </para></step> | |
776 <step><para> | |
777 Start <command>graphedit.exe</command>. | |
778 </para></step> | |
779 <step><para> | |
780 From the menu select Graph -> Insert Filters. | |
781 </para></step> | |
782 <step><para> | |
783 Expand item <systemitem>DirectShow Filters</systemitem> | |
784 </para></step> | |
785 <step><para> | |
786 Select the right codec name and expand item. | |
787 </para></step> | |
788 <step><para> | |
789 In the entry <systemitem>DisplayName</systemitem> look at the text in | |
790 winged brackets after the backslash and write it down (five dash-delimited | |
791 blocks, the GUID). | |
792 </para></step> | |
793 <step><para> | |
794 The codec binary is the file specified in the <systemitem>Filename</systemitem> | |
795 entry. | |
796 </para></step> | |
797 </procedure> | |
798 | |
799 <note> | |
800 <para> | |
801 If there is no <systemitem>Filename</systemitem> and | |
802 <systemitem>DisplayName</systemitem> contains something like | |
803 <systemitem>device:dmo</systemitem>, then it is a DMO-Codec. | |
804 </para> | |
805 </note> | |
806 | |
807 <procedure> | |
808 <title>Old Method:</title> | |
809 <para> | |
810 Take a deep breath and start searching the registry... | |
811 </para> | |
812 <step><para> | |
813 Start <command>regedit</command>. | |
814 </para></step> | |
815 <step><para> | |
816 Press <keycap>Ctrl</keycap>+<keycap>F</keycap>, disable the first two | |
817 checkboxes, and enable the third. Type in the fourcc of the codec (e.g. | |
818 <userinput>TM20</userinput>). | |
819 </para></step> | |
820 <step><para> | |
821 You should see a field which contains the path and the filename (e.g. | |
822 <filename>C:\WINDOWS\SYSTEM\TM20DEC.AX</filename>). | |
823 </para></step> | |
824 <step><para> | |
825 Now that you have the file, we need the GUID. Try searching again, but | |
826 now search for the codec's name, not the fourcc. Its name can be acquired | |
827 when Media Player is playing the file, by checking | |
828 <guimenu>File</guimenu> -> <guisubmenu>Properties</guisubmenu> -> | |
829 <guimenuitem>Advanced</guimenuitem>. | |
830 If not, you are out of luck. Try guessing (e.g. search for TrueMotion). | |
831 </para></step> | |
832 <step><para> | |
833 If the GUID is found you should see a <guilabel>FriendlyName</guilabel> | |
834 and a <guilabel>CLSID</guilabel> field. Write down the 16 byte CLSID, | |
835 this is the GUID we need. | |
836 </para></step> | |
837 </procedure> | |
838 | |
839 <note> | |
840 <para> | |
841 If searching fails, try enabling all the checkboxes. You may have | |
842 false hits, but you may get lucky... | |
843 </para> | |
844 </note> | |
845 | |
846 <para> | |
847 Now that you have all the necessary information (fourcc, GUID, codec file, | |
848 sample AVI), submit your codec support request by mail, and upload these files | |
849 to the FTP site: | |
850 <systemitem | |
851 role="url">ftp://ftp.mplayerhq.hu/MPlayer/incoming/[codecname]/ | |
852 </systemitem> | |
853 </para> | |
854 </sect3> | |
855 </sect2> | |
856 </sect1> |