comparison DOCS/codecs.html @ 1682:dba45a1aafad

*** empty log message ***
author gabucino
date Fri, 24 Aug 2001 18:48:13 +0000
parents a5cb1b1d47a8
children 390bbb52e371
comparison
equal deleted inserted replaced
1681:445ea1ce4180 1682:dba45a1aafad
1 <HTML> 1 <HTML>
2
3 <BODY> 2 <BODY>
4 3
5 <PRE> 4 <P><B><A NAME=2.1>2.1. Video Formats, Audio &amp; Video Codecs</A></B></P>
6 5
7 <A NAME=2.1>2.1. Video Formats, Audio &amp; Video Codecs</A> 6 <P><B><A NAME=2.1.1>2.1.1. Supported input formats</A></B></P>
8 7
9 8 <P><B>MPlayer</B> can read/play from the following devices/formats:<BR>
10 <A NAME=2.1.1>2.1.1. Supported input formats</A> 9 <UL>
11 10 <LI> VCD (Video CD) directly from CD-ROM or from CDRwin's .bin image file
12 <B>MPlayer</B> can read/play from the following devices/formats: 11 <LI> DVD, directly from your DVD disk, using optional libcss for decryption
13 - VCD (Video CD) directly from CD-ROM or from CDRwin's .bin image file 12 <LI> MPEG 1/2 System Stream (PS/PES/VOB) and Elementary Stream (ES) file
14 - DVD, directly from your DVD disk, using optional libcss for decryption
15 - MPEG 1/2 System Stream (PS/PES/VOB) and Elementary Stream (ES) file
16 formats 13 formats
17 - RIFF AVI file format 14 <LI> RIFF AVI file format
18 - ASF 1.0 file format 15 <LI> ASF 1.0 file format
19 - supports reading from file, stdin, DVD drive or network via HTTP 16 <LI> supports reading from file, stdin, DVD drive or network via HTTP
20 17 </UL></P>
21 Note: about quicktime (.mov/.qt) and realmedia (.ra/.rm) support read the FAQ! 18
22 19 <P>Note: about quicktime (.mov/.qt) and realmedia (.ra/.rm) support read the FAQ!</P>
23 20
24 <A NAME=2.1.2>2.1.2. Supported audio &amp; video codecs</A> 21
25 22 <P><B><A NAME=2.1.2>2.1.2. Supported audio &amp; video codecs</A></B></P>
26 See http://mplayerhq.hu/MPlayer/DOCS/codecs.html for the complete, 23
27 daily updated list!!! 24 <P>See http://mplayer.sourceforge.net/DOCS/codecs.html for the complete,
28 25 daily updated list!!!</P>
29 The most important video codecs: 26
30 - MPEG1 (VCD) and MPEG2 (DVD) video 27 <P>The most important video codecs:<BR>
31 - DivX, FFmpeg, OpenDivX and other MPEG4 variants 28 <UL>
32 - Windows Media Video 7 (WMV1) and Windows Media Video 8 used in .wmv files 29 <LI>MPEG1 (VCD) and MPEG2 (DVD) video
33 - Intel Indeo codecs (3.1,3.2,4.1,5.0) 30 <LI>DivX, FFmpeg, OpenDivX and other MPEG4 variants
34 - MJPEG, ASV2 and other hardware formats 31 <LI>Windows Media Video 7 (WMV1) and Windows Media Video 8 used in .wmv files
35 32 <LI>Intel Indeo codecs (3.1,3.2,4.1,5.0)
36 The most important audio codecs: 33 <LI>MJPEG, ASV2 and other hardware formats
37 - MPEG layer 2, and layer 3 (MP3) audio (native code, with 3dnow optimization) 34 </UL></P>
38 - AC3 dolby audio (native code, with 3dnow optimization) 35
39 - AC3 passthrough to soundcard's decoder 36 <P>The most important audio codecs:<BR>
40 - Voxware audio 37 <UL>
41 - alaw, msgsm, pcm and other simple old audio formats 38 <LI>MPEG layer 2, and layer 3 (MP3) audio (native code, with 3dnow optimization)
42 39 <LI>AC3 dolby audio (native code, with 3dnow optimization)
43 If you have a codec not listed here, and not supported yet, just 40 <LI>Voxware audio
44 read http://mplayerhq.hu/MPlayer/DOCS/codecs.html 41 <LI>alaw, msgsm, pcm and other simple old audio formats
45 to get info about its status and about how to help us adding support for it! 42 </UL></P>
46 43
47 44 <P>If you have a codec not listed here, and not supported yet, just
48 <A NAME=2.1.2.1>2.1.2.1. DivX4</A> 45 read http://mplayer.sourceforge.net/DOCS/codecs.html
49 46 to get info about its status and about how to help us adding support for it!</P>
50 This section contains information about the DivX4 codec of 47
51 <A HREF="http://www.projectmayo.com">ProjectMayo</A>. Their first available alpha version was the OpenDivX 4.0 48
52 alpha 47 and 48. Support for this was/is included in <B>MPlayer</B>, and built by 49 <P><B><A NAME=2.1.2.1>2.1.2.1. DivX4</A></B></P>
53 default. We even used its postprocessing code to optionally enhance visual 50
54 quality of MPEG1/2 movies. 51 <P>This section contains information about the DivX4 codec of
55 52 <A HREF="http://www.projectmayo.com">ProjectMayo</A>. Their first available alpha version was the OpenDivX 4.0
56 The new generation of this codec can even decode movies made with the 53 alpha 47 and 48. Support for this was/is included in <B>MPlayer</B>, and built by
57 infamous DivX codec! And it's not everything, it's MUCH faster than the 54 default. We even used its postprocessing code to optionally enhance visual
58 traditional Win32 DivX DLL's. See below for configuration. The only 55 quality of MPEG1/2 movies.</P>
59 disadvantage of this codec is that it's currently closed-source. :( 56
60 57 <P>The new generation of this codec can even decode movies made with the
61 The codec can be downloaded from the following URL: 58 infamous DivX codec! And it's not everything, it's MUCH faster than the
62 59 traditional Win32 DivX DLL's. See below for configuration. The only
63 60 disadvantage of this codec is that it's currently closed-source. :(</P>
64 http://download2.projectmayo.com/dnload/divx4linux/divx4linux-20010718.zip 61
65 62 <P>The codec can be downloaded from the following URL:</P>
66 63
67 No automatic installing available at this time, so install it manually, 64 <P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>http://download2.projectmayo.com/dnload/divx4linux/divx4linux-20010718.zip</CODE></P>
68 EXACTLY as described here. Unpack it, and copy files to their place: 65
69 66 <P>No automatic installing available at this time, so install it manually,
70 67 EXACTLY as described here. Unpack it, and copy files to their place:</P>
71 cp libdivxdecore.so.0.0.0 /usr/local/lib/ 68
72 ln -s /usr/local/lib/libdivxdecore.so.0.0.0 /usr/local/lib/libdivxdecore.so.0 69 <P><CODE>cp libdivxdecore.so.0.0.0 /usr/local/lib/<BR>
73 ln -s /usr/local/lib/libdivxdecore.so.0 /usr/local/lib/libdivxdecore.so 70 ln -s /usr/local/lib/libdivxdecore.so.0.0.0 /usr/local/lib/libdivxdecore.so.0<BR>
74 ldconfig 71 ln -s /usr/local/lib/libdivxdecore.so.0 /usr/local/lib/libdivxdecore.so<BR>
75 cp decore.h /usr/local/include/ 72 ldconfig<BR>
76 73 cp decore.h /usr/local/include/</CODE></P>
77 74
78 <B>MPlayer</B> autodetects if DivX4 is (properly) installed, just compile 75
79 as usual. If it doesn't detect it, you didn't install it exactly as above, 76 <P><B>MPlayer</B> autodetects if DivX4 is (properly) installed, just compile
80 and/or has fucked up config (see last question of 5.1 section). 77 as usual. If it doesn't detect it, you didn't install it exactly as above,
81 78 and/or has fucked up config (see last question of 5.1 section).</P>
82 Using it is a bit tricky. As it conflicts with the old OpenDivX (it's API is 79
83 very similar to OpenDivX's), OpenDivX code is disabled, and the OpenDivX 80 <P>Using it is a bit tricky. As it conflicts with the old OpenDivX (it's API is
84 driver calls this library too. 81 very similar to OpenDivX's), OpenDivX code is disabled, and the OpenDivX
85 82 driver calls this library too.</P>
86 Generally we can pinpoint this issue to that you have two options to use 83
87 this codec: 84 <P>Generally we can pinpoint this issue to that you have two options to use
88 85 this codec:</P>
89 86
90 -vc odivx : using divx4 codec as a new version of OpenDivX. 87 <P><TABLE BORDER=0>
91 in this case it produces YV12 image in its own buffer, 88 <TD>&nbsp;&nbsp;</TD><TD VALIGN=top>-vc&nbsp;odivx</TD><TD>&nbsp;&nbsp;</TD>
92 and <B>MPlayer</B> (libvo) does colorspace conversion. 89 <TD>using divx4 codec as a new version of OpenDivX.
93 90 in this case it produces YV12 image in its own buffer,
94 -vc divx4 : using divx4 codec's colorspace conversion. 91 and <B>MPlayer</B> (libvo) does colorspace conversion.</TD><TR>
95 in this mode, you can use YUY2/UYVY too. 92 <TD></TD><TD VALIGN=top>-vc&nbsp;divx4</TD><TD></TD>
96 93 <TD>using divx4 codec's colorspace conversion.
97 The 'odivx' method is usually faster, due to the fact that it transfers 94 in this mode, you can use YUY2/UYVY too.</TD><TR>
98 image data in YV12 (planar YUV 4:2:0) format, thus requiring much less 95 </TABLE></P>
99 bandwidth on the bus. For packed YUV modes (YUY2, UYVY) use the 'divx4' 96
100 method. For RGB modes you can choose freely, their speed is same, maybe 97 <P>The 'odivx' method is usually faster, due to the fact that it transfers
101 differ according to the current bpp. 98 image data in YV12 (planar YUV 4:2:0) format, thus requiring much less
102 99 bandwidth on the bus. For packed YUV modes (YUY2, UYVY) use the 'divx4'
103 Note: it supports postprocessing too, but range of values is strange: 100 method. For RGB modes you can choose freely, their speed is same, maybe
104 101 differ according to the current bpp.</P>
105 0 no postproc 102
106 10 .. 20 postprocessing, normal 103 <P>Note: it supports postprocessing too, but range of values is strange:</P>
107 (like level 2 with divxds) 104
108 30 .. 60 hard postprocessing, eats many CPU. 105 <P><TABLE BORDER=0>
109 (like level 4 with divxds) 106 <TD>&nbsp;&nbsp;</TD><TD>0</TD><TD>&nbsp;&nbsp;</TD>
110 107 <TD>no postproc</TD><TR>
111 108 <TD></TD><TD>10 .. 20</TD>
112 <A NAME=2.1.2.2>2.1.2.2. ffmpeg's DivX/libavcodec</A> 109 <TD></TD><TD>postprocessing, normal (like level 2 with divxds)</TD><TR>
113 110 <TD></TD><TD>30 .. 60</TD>
114 Beginning with version 0.4.2 , <A HREF="http://ffmpeg.sourceforge.net">ffmpeg</A> contains an <B>opensource</B> DivX codec, 111 <TD></TD><TD>hard prostprocessing, eats many CPU (like level 4 with divxds</TD><TR>
115 which is compatible with the traditional DivX. <B>MPlayer</B> supports this codec, 112 </TABLE></P>
116 and this makes it possible to <B>watch DivX movies on non-x86 platforms!</B> 113
117 It was removed from <B>MPlayer</B>'s cvs tree, you have to download it 114 <P><B><A NAME=2.1.2.2>2.1.2.2. ffmpeg's DivX/libavcodec</A></B></P>
118 manually directly from <B>FFmpeg</B>'s tree : 115
119 116 <P>Beginning with version 0.4.2 , <A HREF="http://ffmpeg.sourceforge.net">ffmpeg</A> contains an <B>opensource</B> DivX codec,
120 117 which is compatible with the traditional DivX. <B>MPlayer</B> supports this codec,
118 and this makes it possible to <B>watch DivX movies on non-x86 platforms!</B>
119 It was removed from <B>MPlayer</B>'s cvs tree, you have to download it
120 manually directly from <B>FFmpeg</B>'s tree:</P>
121
122 <P><CODE>
121 cvs -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg login 123 cvs -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg login
122 cvs -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg co ffmpeg 124 cvs -d:pserver:anonymous@cvs.ffmpeg.sourceforge.net:/cvsroot/ffmpeg co ffmpeg
123 125 </CODE></P>
124 126
125 Note: if you copy with CVS subdirs, next time it's enough to do 127 <P>Note: <I>if you copy with CVS subdirs, next time it's enough to do
126 'cvs update'. 128 'cvs update'.</I></P>
127 129
128 Now, move the newly downloaded ffmpeg source's <B>libavcodec</B> directory, 130 <P>Now, move the newly downloaded ffmpeg source's <B>libavcodec</B> directory,
129 (with all it's subdirectories) to <B>MPlayer</B>'s tree, so it will look 131 (with all it's subdirectories) to <B>MPlayer</B>'s tree, so it will look
130 like this : 132 like this:</P>
131 133
132 134 <P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>main/libavcodec</CODE></P>
133 main/libavcodec 135
134 136 <P>Symlinking is NOT enough, you have to copy it.</P>
135 137
136 Symlinking is NOT enough, you have to copy it. 138 <P>./configure detects if it can be built. At the moment it doesn't support
137 139 postprocessing, and is under optimization (it's faster than the DS/VfW DivX
138 ./configure detects if it can be built. At the moment it doesn't support 140 codec).</P>
139 postprocessing, and is under optimization (it's faster than the DS/VfW DivX 141
140 codec). 142 <P>In order to use it, refresh your codecs.conf file, and do as the manpage,
141 143 or the example.conf says (the -vfm option).</P>
142 In order to use it, refresh your codecs.conf file, and do as the manpage, 144
143 or the example.conf says (the -vfm option). 145 <P>Note: libavcodec contains other codecs as well, but at the moment we mostly
144 146 focus on ffdivx, and it's unlikely that this will change.</P>
145 Note: libavcodec contains other codecs as well, but at the moment we mostly 147
146 focus on ffdivx, and it's unlikely that this will change. 148
147 149 <P><B><A NAME=2.1.4>2.1.4. Codec importing howto</A></B></P>
148 150
149   <A NAME=2.1.2.3>2.1.2.3. Hardware AC3 decoding</A> 151 <P><B><A NAME=2.1.4.1>2.1.4.1. VFW codecs</A></B></P>
150 152
151 You will need a soundcard with AC3 passthrough capability to digital out 153 <P>VfW (Video for Windows) is the old Video API for Windows. Its codecs have
152 (SP/DIF). Also, the its driver has to support AFMT_AC3 (SB Live! for example) 154 the .DLL or (rarely) .DRV extension.
153 Connect the hardware AC3 decoder to your soundcard's SP/DIF, and use 155 If <B>MPlayer</B> fails with your AVI:</P>
154 -ac hwac3 . It may work. 156
155 157 <P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>UNKNOWN video codec: HFYU (0x55594648)</CODE></P>
156 158
157 <A NAME=2.1.4>2.1.4. Codec importing howto</A> 159 <P>It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU =
158 160 HuffYUV codec, DIV3 = DivX Low Motion, etc...). Now that we know this, we'll
159 161 have to find out which DLL Windows loads in order to play this file. In our
160 <A NAME=2.1.4.1>2.1.4.1. VFW codecs</A> 162 case, the system.ini contains this (with many others):</P>
161 163
162 VfW (Video for Windows) is the old Video API for Windows. Its codecs have 164 <P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>VIDC.HFYU=huffyuv.dll</CODE></P>
163 the .DLL or (rarely) .DRV extension. 165
164 If <B>MPlayer</B> fails with your AVI: 166 <P>So we'll need the huffyuv.dll file. Note that the audio codecs are specified
165 167 with the MSACM prefix:</P>
166 168
167 UNKNOWN video codec: HFYU (0x55594648) 169 <P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>msacm.l3acm=L3codeca.acm</CODE></P>
168 170
169 171
170 It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU = 172 <P>This is the MP3 codec.
171 HuffYUV codec, DIV3 = DivX Low Motion, etc...). Now that we know this, we'll 173 So, now we have all the info needed (fourcc, codec file, sample AVI), submit
172 have to find out which DLL Windows loads in order to play this file. In our 174 your codec support request in mail, and upload these files to the FTP:</P>
173 case, the system.ini contains this (with many others): 175
174 176 <P>&nbsp;&nbsp;&nbsp;&nbsp;<CODE>ftp://mplayerhq.hu/MPlayer/incoming/[codecname]/</CODE></P>
175 177
176 VIDC.HFYU=huffyuv.dll 178
177 179 <P><B><A NAME=2.1.4.2>2.1.4.2. DirectShow codecs</A></B></P>
178 180
179 So we'll need the huffyuv.dll file. Note that the audio codecs are specified 181 <P>DirectShow is the newer Video API, which is even worse than its predecessor.
180 with the MSACM prefix : 182 Things are harder with DirectShow, since
181 183 <UL>
182 184 <LI>system.ini doesn't contain the needed information, instead it's stored in
183 msacm.l3acm=L3codeca.acm 185 the registry :(
184 186 <LI>we'll need the GUID of the codec.
185 187 </UL></P>
186 This is the MP3 codec. 188
187 So, now we have all the info needed (fourcc, codec file, sample AVI), submit 189 <P>So let's search that goddamn registry..
188 your codec support request in mail, and upload these files to the FTP: 190 <UL>
189 ftp://mplayerhq.hu/MPlayer/incoming/[codecname]/ 191 <LI>Start 'regedit'
190 192 <LI>press ctrl-f, disable the first two checkbox, and enable the third. Type
191 193 the fourcc of the codec. (for ex.: TM20)
192 <A NAME=2.1.4.2>2.1.4.2. DirectShow codecs</A> 194 <LI>you should see a field which contains the path and filename
193 195 (for ex. : C:\WINDOWS\SYSTEM\TM20DEC.AX)
194 DirectShow is the newer Video API, which is even worse than its predecessor. 196 <LI>now that we have the file, we'll need the GUID. Try searching again, but
195 Things are harder with DirectShow, since 197 now we'll search for the codec's name, not the fourcc. Its name can be acquired
196 - system.ini doesn't contain the needed information, instead it's stored in 198 when Media Player is playing that file, by checking File/Properties/Advanced.
197 the registry :( 199 If not, bad luck ;) Try guessing.
198 - we'll need the GUID of the codec. 200 (for ex. search for : TrueMotion)
199 201 <LI>if found (in registry), there should be a FriendlyName field, and a CLSID
200 So let's search that goddamn registry.. 202 field. Write down that 16 byte of CLSID, this is the GUID required by us.
201 - Start 'regedit' 203 </UL></P>
202 - press ctrl-f, disable the first two checkbox, and enable the third. Type 204
203 the fourcc of the codec. (for ex.: TM20) 205 <P>NOTE: if searching fails, try to enable all the checkboxes.. you may have
204 - you should see a field which contains the path and filename 206 false hits, but maybe you'll have the right, too...</P>
205 (for ex. : C:\WINDOWS\SYSTEM\TM20DEC.AX) 207 <P>NOTE: dump that M$ shit.</P>
206 - now that we have the file, we'll need the GUID. Try searching again, but 208
207 now we'll search for the codec's name, not the fourcc. Its name can be acquired 209
208 when Media Player is playing that file, by checking File/Properties/Advanced. 210 <P>So, now we have all the info needed (fourcc, GUID, codec file, sample AVI),
209 If not, bad luck ;) Try guessing. 211 submit your codec support request in mail, and upload these files to the FTP:<BR>
210 (for ex. search for : TrueMotion) 212 ftp://mplayerhq.hu/MPlayer/incoming/[codecname]/</P>
211 - if found (in registry), there should be a FriendlyName field, and a CLSID 213
212 field. Write down that 16 byte of CLSID, this is the GUID required by us. 214 <BR>
213 215 <HR>MPlayer documentation project
214
215 NOTE : if searching fails, try to enable all the checkboxes.. you may have
216 false hits, but maybe you'll have the right, too...
217 NOTE : dump that M$ shit.
218
219
220 So, now we have all the info needed (fourcc, GUID, codec file, sample AVI),
221 submit your codec support request in mail, and upload these files to the FTP:
222 ftp://mplayerhq.hu/MPlayer/incoming/[codecname]/
223
224 </PRE>
225 216
226 </BODY> 217 </BODY>
227
228 </HTML> 218 </HTML>