comparison DOCS/codecs.html @ 1612:1b011d6150c7

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