Mercurial > mplayer.hg
annotate DOCS/codecs.html @ 2690:a2bb142ce67d
some updates
author | gabucino |
---|---|
date | Sun, 04 Nov 2001 17:35:29 +0000 |
parents | aadd16c5d6eb |
children | 62bcea66003e |
rev | line source |
---|---|
1612 | 1 <HTML> |
1712 | 2 <BODY BGCOLOR=WHITE> |
1704 | 3 |
4 <FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> | |
1612 | 5 |
1682 | 6 <P><B><A NAME=2.1>2.1. Video Formats, Audio & Video Codecs</A></B></P> |
1612 | 7 |
1682 | 8 <P><B><A NAME=2.1.1>2.1.1. Supported input formats</A></B></P> |
1612 | 9 |
1682 | 10 <P><B>MPlayer</B> can read/play from the following devices/formats:<BR> |
11 <UL> | |
12 <LI> VCD (Video CD) directly from CD-ROM or from CDRwin's .bin image file | |
2005 | 13 <LI> DVD, directly from your DVD disk, using libdvdread for decryption |
1682 | 14 <LI> MPEG 1/2 System Stream (PS/PES/VOB) and Elementary Stream (ES) file |
15 formats | |
16 <LI> RIFF AVI file format | |
1869 | 17 <LI> ASF/WMV 1.0 file format |
2611 | 18 <LI> QT/MOV file format with (un)compressed headers |
2690 | 19 <LI> VIVO format (.viv files) |
1869 | 20 <LI> supports reading from file, stdin, or network via HTTP |
1682 | 21 </UL></P> |
1612 | 22 |
2153 | 23 <P>Note: about realmedia (.ra/.rm) support read the FAQ!</P> |
1612 | 24 |
25 | |
1682 | 26 <P><B><A NAME=2.1.2>2.1.2. Supported audio & video codecs</A></B></P> |
1612 | 27 |
1731 | 28 <P>See <A HREF="http://www.mplayerhq.hu/DOCS/codecs-status.html">http://www.mplayerhq.hu/DOCS/codecs-status.html</A> for the complete, |
1869 | 29 daily generated list!!!</P> |
1612 | 30 |
1682 | 31 <P>The most important video codecs:<BR> |
32 <UL> | |
2290 | 33 <LI>MPEG1 (VCD) and MPEG2 (DVD) video</LI> |
2690 | 34 <LI>DivX ;-), OpenDivX (DivX4), 3ivx and other MPEG4 variants</LI> |
2290 | 35 <LI>Windows Media Video 7 (WMV1) and 8 (WMV2) used in .wmv files</LI> |
36 <LI>Intel Indeo codecs (3.1,3.2,4.1,5.0)</LI> | |
37 <LI>MJPEG, ASV2 and other hardware formats</LI> | |
2690 | 38 <LI>XAnim codecs</LI> |
1682 | 39 </UL></P> |
1612 | 40 |
1682 | 41 <P>The most important audio codecs:<BR> |
42 <UL> | |
2290 | 43 <LI>MPEG layer 2, and layer 3 (MP3) audio (native code, with MMX/SSE/3DNow! optimization)</LI> |
44 <LI>AC3 dolby audio (native code, with SSE/3DNow! optimization)</LI> | |
45 <LI>Ogg Vorbis audio codec (native lib)</LI> | |
46 <LI>Voxware audio (using directshow DLL)</LI> | |
47 <LI>alaw, msgsm, pcm and other simple old audio formats</LI> | |
1682 | 48 </UL></P> |
1612 | 49 |
1731 | 50 <P>If you have a codec not listed here, and not supported yet, just read <A |
2559 | 51 HREF="#2.1.3">section 2.1.3</A> to get info about how to help us adding support |
1731 | 52 for it!</P> |
1612 | 53 |
1682 | 54 <P><B><A NAME=2.1.2.1>2.1.2.1. DivX4</A></B></P> |
1612 | 55 |
1682 | 56 <P>This section contains information about the DivX4 codec of |
57 <A HREF="http://www.projectmayo.com">ProjectMayo</A>. Their first available alpha version was the OpenDivX 4.0 | |
58 alpha 47 and 48. Support for this was/is included in <B>MPlayer</B>, and built by | |
2240
5d476d03e2b3
ide vmi nagy hulyeseget akartam irni de elfelejtettem
gabucino
parents:
2153
diff
changeset
|
59 default. We used to use its postprocessing code to optionally enhance visual |
5d476d03e2b3
ide vmi nagy hulyeseget akartam irni de elfelejtettem
gabucino
parents:
2153
diff
changeset
|
60 quality of MPEG1/2 movies. Now we use our own.</P> |
1612 | 61 |
1682 | 62 <P>The new generation of this codec can even decode movies made with the |
63 infamous DivX codec! And it's not everything, it's MUCH faster than the | |
64 traditional Win32 DivX DLL's. See below for configuration. The only | |
65 disadvantage of this codec is that it's currently closed-source. :(</P> | |
1612 | 66 |
1682 | 67 <P>The codec can be downloaded from the following URL:</P> |
68 | |
1731 | 69 <P> <A HREF="http://download2.projectmayo.com/dnload/divx4linux/divx4linux-20010718.zip">http://download2.projectmayo.com/dnload/divx4linux/divx4linux-20010718.zip</A></P> |
1612 | 70 |
2684 | 71 <P>Unpack it, and run <CODE>./install.sh</CODE> as root.</P> |
1612 | 72 |
1869 | 73 <P>Note: do NOT forget to add /usr/local/lib to your /etc/ld.so.conf !</P> |
1612 | 74 |
1682 | 75 <P><B>MPlayer</B> autodetects if DivX4 is (properly) installed, just compile |
76 as usual. If it doesn't detect it, you didn't install it exactly as above, | |
77 and/or has fucked up config (see last question of 5.1 section).</P> | |
78 | |
79 <P>Using it is a bit tricky. As it conflicts with the old OpenDivX (it's API is | |
80 very similar to OpenDivX's), OpenDivX code is disabled, and the OpenDivX | |
81 driver calls this library too.</P> | |
82 | |
83 <P>Generally we can pinpoint this issue to that you have two options to use | |
84 this codec:</P> | |
85 | |
86 <P><TABLE BORDER=0> | |
1987 | 87 <TD> </TD><TD VALIGN=top><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>-vc odivx</TD><TD> </TD> |
88 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>using divx4 codec as a new version of OpenDivX. | |
1682 | 89 in this case it produces YV12 image in its own buffer, |
1987 | 90 and <B>MPlayer</B> (libvo) does colorspace conversion. (<B>RECOMMENDED!</B>)</TD><TR> |
91 <TD></TD><TD VALIGN=top><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>-vc divx4</TD><TD></TD> | |
92 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>using divx4 codec's colorspace conversion. | |
2095 | 93 in this mode, you can use YUY2/UYVY too.</TD></TR> |
1682 | 94 </TABLE></P> |
1612 | 95 |
1682 | 96 <P>The 'odivx' method is usually faster, due to the fact that it transfers |
97 image data in YV12 (planar YUV 4:2:0) format, thus requiring much less | |
98 bandwidth on the bus. For packed YUV modes (YUY2, UYVY) use the 'divx4' | |
99 method. For RGB modes you can choose freely, their speed is same, maybe | |
100 differ according to the current bpp.</P> | |
101 | |
2240
5d476d03e2b3
ide vmi nagy hulyeseget akartam irni de elfelejtettem
gabucino
parents:
2153
diff
changeset
|
102 <P>Note: it supports postprocessing too, but range of values is strange: (TODO UPDATE)</P> |
1612 | 103 |
1682 | 104 <P><TABLE BORDER=0> |
1987 | 105 <TD> </TD><TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>0</TD><TD> </TD> |
106 <TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>no postproc</TD><TR> | |
107 <TD></TD><TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>10 .. 20</TD> | |
108 <TD></TD><TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>postprocessing, normal (like level 2 with divxds)</TD><TR> | |
109 <TD></TD><TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>30 .. 60</TD> | |
110 <TD></TD><TD><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>hard prostprocessing, eats many CPU (like level 4 with divxds</TD><TR> | |
1682 | 111 </TABLE></P> |
1612 | 112 |
1682 | 113 <P><B><A NAME=2.1.2.2>2.1.2.2. ffmpeg's DivX/libavcodec</A></B></P> |
114 | |
115 <P>Beginning with version 0.4.2 , <A HREF="http://ffmpeg.sourceforge.net">ffmpeg</A> contains an <B>opensource</B> DivX codec, | |
116 which is compatible with the traditional DivX. <B>MPlayer</B> supports this codec, | |
2290 | 117 and this makes it possible to <B>watch DivX/DivX4 movies on non-x86 platforms</B>, |
118 and gain much faster <B>DivX/DivX4</B> decoding speed than the Win32 codecs and | |
119 the original DivX4 library has!<BR> | |
1682 | 120 It was removed from <B>MPlayer</B>'s cvs tree, you have to download it |
121 manually directly from <B>FFmpeg</B>'s tree:</P> | |
122 | |
123 <P><CODE> | |
1987 | 124 cvs -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg login<BR> |
1612 | 125 cvs -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg co ffmpeg |
1682 | 126 </CODE></P> |
1612 | 127 |
1682 | 128 <P>Note: <I>if you copy with CVS subdirs, next time it's enough to do |
129 'cvs update'.</I></P> | |
1612 | 130 |
1682 | 131 <P>Now, move the newly downloaded ffmpeg source's <B>libavcodec</B> directory, |
132 (with all it's subdirectories) to <B>MPlayer</B>'s tree, so it will look | |
133 like this:</P> | |
1612 | 134 |
1682 | 135 <P> <CODE>main/libavcodec</CODE></P> |
1612 | 136 |
1869 | 137 <P>Symlinking is NOT enough, you have to copy/move it!!!</P> |
1668 | 138 |
2240
5d476d03e2b3
ide vmi nagy hulyeseget akartam irni de elfelejtettem
gabucino
parents:
2153
diff
changeset
|
139 <P>./configure detects if it can be built. The codec also <B>supports |
5d476d03e2b3
ide vmi nagy hulyeseget akartam irni de elfelejtettem
gabucino
parents:
2153
diff
changeset
|
140 postprocessing!</B></P> |
1612 | 141 |
1682 | 142 <P>In order to use it, refresh your codecs.conf file, and do as the manpage, |
143 or the example.conf says (the -vfm option).</P> | |
1612 | 144 |
2290 | 145 <P>To achieve the <B>greatest speed</B> on my K6, I remove the |
146 <CODE>ffmpeg12</CODE> section from codecs.conf (this codec isn't optimized, and | |
147 libmpeg2 is twice as fast), and place <CODE>vfm=5</CODE> in my config file. | |
148 Then <B>MPlayer</B> always uses <B>ffdivx/ffodivx</B> to decode | |
149 <B>DivX/DivX4</B> files, and libmpeg2 for MPEG1/2 . With this and my Matrox G400, I can view even the | |
150 highest resolution DivX/DivX4 movies on my K6/2 500, without framedrop.</P> | |
1612 | 151 |
152 | |
1785 | 153 <P><B><A NAME=2.1.2.3>2.1.2.3. Hardware AC3 decoding</A></B></P> |
1688 | 154 |
155 <P>You'll need an AC3 capable soundcard, with digital out (SP/DIF). The | |
156 card's driver must support the AFMT_AC3 format (like SB Live! does). | |
157 Connect your AC3 decoder to the SP/DIF output, and use the '-ac hwac3' | |
1987 | 158 option. It may or may not work (experimental). (probably won't...)</P> |
1688 | 159 |
160 | |
2411 | 161 <P><B><A NAME=2.1.2.4>2.1.2.4. XAnim codecs</A></B></P> |
162 | |
163 <P>Foreword: using (some) XAnim codecs with other program than XAnim, is | |
164 <B><I>ILLEGAL</I></B>. It is <B>YOUR</B> responsibility to read its license, | |
165 and do accordingly. The authors of <B>MPlayer</B> can't be held responsible for | |
166 any unlawful act of the user.</P> | |
167 | |
168 <P>So yes, <B>MPlayer</B> can use XAnim's codecs for decoding. It's very | |
169 easy to enable them:</P> | |
170 | |
171 <P> | |
172 <UL> | |
173 <LI>download the codecs you wish to use from the | |
174 <A HREF="http://xanim.va.pubnix.com">XAnim site</A>. The <B>3ivx</B> codec | |
175 isn't there, so download it from the <A HREF="http://www.3ivx.com">3ivx site</A>.</LI> | |
176 | |
2664 | 177 <LI>use the <CODE>--with-xanimlibdir</CODE> option to tell configure where |
178 it can find the xanim codecs. By default, it checks them at <CODE>/usr/lib/xanim/mods</CODE> .</LI> | |
2411 | 179 </UL> |
180 </P> | |
181 | |
182 <P>They are video codec family number 10, so you may want to use <CODE>-vfm 10</CODE> | |
183 option to tell <B>MPlayer</B> to use them if possible.</P> | |
184 | |
185 <P>Tested codecs are: <B>Indeo 3.2</B>, <B>4.1</B>, <B>5.0</B>, <B>CVID</B>, <B>3ivX</B>, <B>h263</B>.</P> | |
186 | |
2452 | 187 |
188 <P><B><A NAME=2.1.2.5>2.1.2.5. libmad support</A></B></P> | |
189 | |
190 <P><A HREF="http://mad.sourceforge.net">libmad</A> is a multiplatform MPEG audio | |
191 decoding library. If you don't know why is it good, you probably don't need it.</P> | |
192 | |
193 <P>To enable support, compile with the <CODE>--enable-mad</CODE> configure | |
194 option.</P> | |
195 | |
196 | |
2559 | 197 <P><B><A NAME=2.1.3>2.1.3. Codec importing howto</A></B></P> |
1682 | 198 |
2559 | 199 <P><B><A NAME=2.1.3.1>2.1.3.1. VFW codecs</A></B></P> |
1682 | 200 |
201 <P>VfW (Video for Windows) is the old Video API for Windows. Its codecs have | |
202 the .DLL or (rarely) .DRV extension. | |
203 If <B>MPlayer</B> fails with your AVI:</P> | |
204 | |
205 <P> <CODE>UNKNOWN video codec: HFYU (0x55594648)</CODE></P> | |
1612 | 206 |
1682 | 207 <P>It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU = |
208 HuffYUV codec, DIV3 = DivX Low Motion, etc...). Now that we know this, we'll | |
209 have to find out which DLL Windows loads in order to play this file. In our | |
210 case, the system.ini contains this (with many others):</P> | |
1612 | 211 |
1682 | 212 <P> <CODE>VIDC.HFYU=huffyuv.dll</CODE></P> |
213 | |
214 <P>So we'll need the huffyuv.dll file. Note that the audio codecs are specified | |
215 with the MSACM prefix:</P> | |
216 | |
217 <P> <CODE>msacm.l3acm=L3codeca.acm</CODE></P> | |
1612 | 218 |
219 | |
1682 | 220 <P>This is the MP3 codec. |
221 So, now we have all the info needed (fourcc, codec file, sample AVI), submit | |
222 your codec support request in mail, and upload these files to the FTP:</P> | |
1612 | 223 |
1869 | 224 <P> <CODE>ftp://ftp.mplayerhq.hu/MPlayer/incoming/[codecname]/</CODE></P> |
1612 | 225 |
226 | |
2559 | 227 <P><B><A NAME=2.1.3.2>2.1.3.2. DirectShow codecs</A></B></P> |
1612 | 228 |
1682 | 229 <P>DirectShow is the newer Video API, which is even worse than its predecessor. |
230 Things are harder with DirectShow, since | |
231 <UL> | |
232 <LI>system.ini doesn't contain the needed information, instead it's stored in | |
233 the registry :( | |
234 <LI>we'll need the GUID of the codec. | |
235 </UL></P> | |
1612 | 236 |
1682 | 237 <P>So let's search that goddamn registry.. |
238 <UL> | |
239 <LI>Start 'regedit' | |
240 <LI>press ctrl-f, disable the first two checkbox, and enable the third. Type | |
241 the fourcc of the codec. (for ex.: TM20) | |
242 <LI>you should see a field which contains the path and filename | |
243 (for ex. : C:\WINDOWS\SYSTEM\TM20DEC.AX) | |
244 <LI>now that we have the file, we'll need the GUID. Try searching again, but | |
245 now we'll search for the codec's name, not the fourcc. Its name can be acquired | |
246 when Media Player is playing that file, by checking File/Properties/Advanced. | |
247 If not, bad luck ;) Try guessing. | |
248 (for ex. search for : TrueMotion) | |
249 <LI>if found (in registry), there should be a FriendlyName field, and a CLSID | |
250 field. Write down that 16 byte of CLSID, this is the GUID required by us. | |
251 </UL></P> | |
252 | |
253 <P>NOTE: if searching fails, try to enable all the checkboxes.. you may have | |
254 false hits, but maybe you'll have the right, too...</P> | |
255 <P>NOTE: dump that M$ shit.</P> | |
1612 | 256 |
257 | |
1682 | 258 <P>So, now we have all the info needed (fourcc, GUID, codec file, sample AVI), |
259 submit your codec support request in mail, and upload these files to the FTP:<BR> | |
1869 | 260 ftp://ftp.mplayerhq.hu/MPlayer/incoming/[codecname]/</P> |
1612 | 261 |
262 </BODY> | |
263 </HTML> |