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