9675
|
1 <?xml version="1.0" encoding="iso-8859-1"?>
|
|
2 <sect1 id="formats">
|
|
3 <title>Supported formats</title>
|
|
4
|
|
5 <para>
|
|
6 It is important to clarify a common mistake. When people see a file with a
|
|
7 <filename>.AVI</filename> extension, they immediately conclude that it is
|
|
8 not an MPEG file. That is not true. At least not entirely. Contrary to
|
|
9 popular belief such a file <emphasis>can</emphasis> contain MPEG1 video.
|
|
10 </para>
|
|
11
|
|
12 <para>
|
|
13 You see, a <emphasis role="bold">codec</emphasis> is not the same as a
|
|
14 <emphasis role="bold">file format</emphasis>.
|
|
15 Examples of video <emphasis role="bold">codecs</emphasis> are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.
|
|
16 Examples of file <emphasis role="bold">formats</emphasis> are: MPG, AVI, ASF.
|
|
17 </para>
|
|
18
|
|
19 <para>
|
|
20 In theory, you can put an OpenDivX video and MP3 audio
|
|
21 into an <emphasis role="bold">MPG format file</emphasis>. However, most
|
|
22 players will not play it, since they expect MPEG1 video and MP2 audio (unlike
|
|
23 <emphasis role="bold">AVI</emphasis>, <emphasis role="bold">MPG</emphasis>
|
|
24 does not have the necessary fields to describe its video and audio streams).
|
|
25 Or you might put MPEG1 video into an AVI file.
|
|
26 <ulink url="http://ffmpeg.sourceforge.net/">FFmpeg</ulink> and
|
|
27 <link linkend="mencoder">MEncoder</link> can create these files.
|
|
28 </para>
|
|
29
|
|
30
|
|
31 <sect2 id="video-formats">
|
|
32 <title>Video formats</title>
|
|
33
|
|
34 <sect3 id="mpg-vob-dat">
|
|
35 <title>MPEG files</title>
|
|
36
|
|
37 <para>
|
|
38 MPEG files come in different guises:
|
|
39 </para>
|
|
40
|
|
41 <itemizedlist>
|
|
42 <listitem><simpara>
|
|
43 MPG: This is the most <emphasis role="bold">basic</emphasis> form of the
|
|
44 MPEG file formats. It contains MPEG1 video, and MP2 (MPEG-1 layer 2) or
|
|
45 rarely MP1 audio.
|
|
46 </simpara></listitem>
|
|
47 <listitem><simpara>
|
|
48 DAT: This is the very same format as MPG with a different extension. It
|
|
49 is used on <emphasis role="bold">Video CDs</emphasis>. Due to the way VCDs
|
|
50 are created and Linux is designed, the DAT files cannot be played nor copied
|
|
51 from VCDs as regular files. You have to use the <option>-vcd</option> option
|
|
52 to play the Video CD.
|
|
53 </simpara></listitem>
|
|
54 <listitem><simpara>
|
|
55 VOB: This is the MPEG file format on <emphasis role="bold">DVDs</emphasis>.
|
|
56 It is the same as MPG, plus the capability to contain subtitles or non-MPEG
|
|
57 (AC3) audio. It contains encoded MPEG2 video and usually AC3 audio, but DTS,
|
9683
|
58 MP2 and uncompressed LPCM are allowed, too. <emphasis role="bold">Read the
|
|
59 <link linkend="dvd">DVD section</link></emphasis>!
|
9675
|
60 </simpara></listitem>
|
|
61 </itemizedlist>
|
|
62
|
|
63 <para>
|
|
64 Series of frames form independent groups in MPEG files. This means that you
|
|
65 can cut/join an MPEG file with standard file tools (like
|
|
66 <command>dd</command>, <command>cut</command>), and it remains completely
|
|
67 functional.
|
|
68 </para>
|
|
69
|
|
70 <para>
|
|
71 One important feature of MPGs is that they have a field to describe the
|
|
72 aspect ratio of the video stream within. For example SVCDs have 480x480
|
|
73 resolution video, and in the header that field is set to 4:3, so that it is
|
|
74 played at 640x480. AVI files do not have this field, so they have to be
|
|
75 rescaled during encoding or played with the <option>-aspect</option>
|
|
76 option.
|
|
77 </para>
|
|
78 </sect3>
|
|
79
|
|
80
|
|
81 <sect3 id="avi">
|
|
82 <title>AVI files</title>
|
|
83
|
|
84 <para>
|
|
85 Designed by Microsoft, <emphasis role="bold">AVI (Audio Video Interleaved)</emphasis>
|
|
86 is a widespread multipurpose format currently used mostly for DivX and DivX4
|
|
87 video. It has many known drawbacks and shortcomings (for example in streaming). It
|
|
88 supports one video stream and 0 to 99 audio streams and can be as big as
|
9683
|
89 2GB, but there exists an extension allowing bigger files called
|
|
90 <emphasis role="bold">OpenDML</emphasis>. Microsoft currently strongly
|
|
91 discourages its use and encourages ASF/WMV. Not that anybody cares.
|
9675
|
92 </para>
|
|
93
|
|
94 <para>
|
|
95 There is a hack that allows AVI files to contain an Ogg Vorbis audio
|
|
96 stream, but makes them incompatible with standard AVI.
|
|
97 <application>MPlayer</application> supports playing these files. Seeking is
|
|
98 also implemented but severely hampered by badly encoded files with
|
|
99 confusing headers. Unfortunately the only encoder currently capable of
|
|
100 creating these files, <application>NanDub</application>, has this problem.
|
|
101 </para>
|
|
102
|
|
103 <note>
|
|
104 <para>
|
|
105 DV cameras create raw DV streams that DV grabbing utilities convert to two
|
|
106 different types of AVI files. The AVI will then contain either separate
|
|
107 audio and video streams that <application>MPlayer</application> can play or
|
|
108 the raw DV stream for which support is under development.
|
|
109 </para>
|
|
110 </note>
|
|
111
|
|
112 <para>
|
|
113 There are two kinds of AVI files:
|
|
114 <itemizedlist>
|
|
115 <listitem><simpara>
|
|
116 <emphasis role="bold">Interleaved:</emphasis> Audio and video content is
|
|
117 interleaved. This is the standard usage. Recommended and mostly used. Some tools
|
|
118 create interleaved AVIs with bad sync. <application>MPlayer</application>
|
|
119 detects these as interleaved, and this climaxes in loss of A/V sync,
|
|
120 probably at seeking. These files should be played as non-interleaved
|
|
121 (with the <option>-ni</option> option).
|
|
122 </simpara></listitem>
|
|
123 <listitem><simpara>
|
|
124 <emphasis role="bold">Non-interleaved:</emphasis> First comes the whole
|
|
125 video stream, then the whole audio stream. It thus needs a lot of seeking,
|
|
126 making playing from network or CD-ROM difficult.
|
|
127 </simpara></listitem>
|
|
128 </itemizedlist>
|
|
129 </para>
|
|
130
|
|
131 <para>
|
|
132 <application>MPlayer</application> supports two kinds of timings for AVI
|
|
133 files:
|
|
134 <itemizedlist>
|
|
135 <listitem><simpara>
|
|
136 <emphasis role="bold">bps-based:</emphasis> It is based on the
|
|
137 bitrate/samplerate of the video/audio stream. This method is used by
|
|
138 most players, including <ulink url="http://avifile.sourceforge.net">avifile</ulink>
|
|
139 and <application>Windows Media Player</application>. Files with broken
|
|
140 headers, and files created with VBR audio but not VBR-compliant encoder
|
|
141 will result in A/V desync with this method (mostly at seeking).
|
|
142 </simpara></listitem>
|
|
143 <listitem><simpara>
|
|
144 <emphasis role="bold">interleaving-based:</emphasis> It does not use the bitrate
|
|
145 value of the header, instead it uses the relative position of interleaved
|
|
146 audio and video chunks, making badly encoded files with VBR audio playable.
|
|
147 </simpara></listitem>
|
|
148 </itemizedlist>
|
|
149 </para>
|
|
150
|
|
151 <para>
|
|
152 Any audio and video codec is allowed, but note that VBR audio is not well
|
|
153 supported by most players. The file format makes it possible to use VBR
|
|
154 audio, but most players expect CBR audio, thus they fail with VBR. VBR is
|
|
155 uncommon and Microsoft's AVI specs only describe CBR audio. I also noticed
|
|
156 that most AVI encoders/multiplexers create bad files when using VBR audio.
|
|
157 There are only two known exceptions:
|
|
158 <application>NanDub</application> and <link linkend="mencoder">MEncoder</link>.
|
|
159 </para>
|
|
160 </sect3>
|
|
161
|
|
162
|
|
163 <sect3 id="asf-wmv">
|
|
164 <title>ASF/WMV files</title>
|
|
165 <para>
|
|
166 ASF (Active Streaming Format) comes from Microsoft. They developed two
|
|
167 variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (<application>Windows
|
|
168 Media Player</application> and <application>Windows Media Encoder</application>)
|
|
169 and is very secret. v2.0 is published and patented :). Of course they differ,
|
|
170 there is no compatibility at all (it is just another legal game).
|
|
171 <application>MPlayer</application> supports only v1.0, as nobody has ever seen
|
|
172 v2.0 files :). Note that ASF files nowadays come with the extension
|
|
173 <filename>.WMA</filename> or <filename>.WMV</filename>.
|
|
174 </para>
|
|
175 </sect3>
|
|
176
|
|
177
|
|
178 <sect3 id="qt-mov">
|
|
179 <title>QuickTime/MOV files</title>
|
|
180
|
|
181 <para>
|
|
182 These formats were designed by Apple and can contain any codec, CBR or VBR.
|
|
183 They usually have a <filename>.QT</filename> or <filename>.MOV</filename>
|
|
184 extension. Note that since the MPEG4 group chose QuickTime as the recommended
|
|
185 file format for MPEG4, their MOV files come with a <filename>.MPG</filename> or
|
|
186 <filename>.MP4</filename> extension (Interestingly the video and audio
|
9683
|
187 streams in these files are real MPG and AAC files. You can even extract them with the
|
9675
|
188 <option>-dumpvideo</option> and <option>-dumpaudio</option> options.).
|
|
189 </para>
|
|
190
|
|
191 <note>
|
|
192 <para>
|
|
193 Most new QuickTime files use <emphasis role="bold">Sorenson</emphasis> video and
|
|
194 QDesign Music audio. See our <link linkend="sorenson">Sorenson</link> codec section.
|
|
195 </para>
|
|
196 </note>
|
|
197 </sect3>
|
|
198
|
|
199
|
|
200 <sect3 id="vivo">
|
|
201 <title>VIVO files</title>
|
|
202
|
|
203 <para>
|
|
204 <application>MPlayer</application> happily demuxes VIVO file formats. The
|
|
205 biggest disadvantage of the format is that it has no index block, nor a
|
|
206 fixed packet size or sync bytes and most files lack even keyframes, so
|
|
207 forget seeking!
|
|
208 </para>
|
|
209
|
|
210 <para>
|
|
211 The video codec of VIVO/1.0 files is standard <emphasis role="bold">h.263</emphasis>.
|
|
212 The video codec of VIVO/2.0 files is a modified, nonstandard
|
|
213 <emphasis role="bold">h.263v2</emphasis>. The audio is the same, it may be
|
|
214 <emphasis role="bold">g.723 (standard)</emphasis>, or
|
|
215 <emphasis role="bold">Vivo Siren</emphasis>.
|
|
216 </para>
|
|
217
|
|
218 <para>
|
|
219 See the
|
|
220 <link linkend="vivo-video">VIVO video codec</link> and
|
|
221 <link linkend="vivo-audio">VIVO audio codec</link>
|
|
222 sections for installation instructions.
|
|
223 </para>
|
|
224 </sect3>
|
|
225
|
|
226
|
|
227 <sect3 id="fli">
|
|
228 <title>FLI files</title>
|
|
229 <para>
|
|
230 <emphasis role="bold">FLI</emphasis> is a very old file format used by
|
|
231 Autodesk Animator, but it is a common file format for short animations on the net.
|
|
232 <application>MPlayer</application> demuxes and decodes FLI movies and is
|
|
233 even able to seek within them (useful when looping with the
|
|
234 <option>-loop</option> option). FLI files do not have keyframes, so the
|
|
235 picture will be messy for a short time after seeking.
|
|
236 </para>
|
|
237 </sect3>
|
|
238
|
|
239
|
|
240 <sect3 id="realmedia">
|
|
241 <title>RealMedia (RM) files</title>
|
|
242
|
|
243 <para>
|
|
244 Yes, <application>MPlayer</application> can read (demux) RealMedia
|
|
245 (<filename>.rm</filename>) files. Seeking works, but you have to explicitly
|
|
246 specify the <option>-forceidx</option> option (the format supports
|
|
247 keyframes). Here are the lists of the supported <link
|
|
248 linkend="realvideo">RealVideo</link> and <link
|
|
249 linkend="realaudio">RealAudio</link> codecs.
|
|
250 </para>
|
|
251 </sect3>
|
|
252
|
|
253
|
|
254 <sect3 id="nuppelvideo">
|
|
255 <title>NuppelVideo files</title>
|
|
256 <para>
|
|
257 <ulink url="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</ulink>
|
|
258 is a TV grabber tool (AFAIK:). <application>MPlayer</application> can read
|
|
259 its <filename>.NUV</filename> files (only NuppelVideo 5.0). Those files can
|
|
260 contain uncompressed YV12, YV12+RTJpeg compressed, YV12 RTJpeg+lzo
|
|
261 compressed, and YV12+lzo compressed frames.
|
|
262 <application>MPlayer</application> decodes (and also <emphasis role="bold">encodes</emphasis>
|
|
263 them with <application>MEncoder</application> to DivX/etc!) them all. Seeking works.
|
|
264 </para>
|
|
265 </sect3>
|
|
266
|
|
267
|
|
268 <sect3 id="yuv4mpeg">
|
|
269 <title>yuv4mpeg files</title>
|
|
270 <para>
|
|
271 <ulink url="http://mjpeg.sourceforge.net">yuv4mpeg / yuv4mpeg2</ulink>
|
|
272 is a file format used by the
|
|
273 <ulink url="http://mjpeg.sf.net">mjpegtools programs</ulink>.
|
|
274 You can grab, produce, filter or encode video in this format using these tools.
|
|
275 The file format is really a sequence of uncompressed YUV 4:2:0 images.
|
|
276 </para>
|
|
277 </sect3>
|
|
278
|
|
279
|
|
280 <sect3 id="film">
|
|
281 <title>FILM files</title>
|
|
282 <para>
|
|
283 This format is used on old Sega Saturn CD-ROM games.
|
|
284 </para>
|
|
285 </sect3>
|
|
286
|
|
287
|
|
288 <sect3 id="roq">
|
|
289 <title>RoQ files</title>
|
|
290 <para>
|
|
291 RoQ files are multimedia files used in some ID games such as Quake III and
|
|
292 Return to Castle Wolfenstein.
|
|
293 </para>
|
|
294 </sect3>
|
|
295
|
|
296
|
|
297 <sect3 id="ogg">
|
|
298 <title>OGG/OGM files</title>
|
|
299 <para>
|
|
300 This is a new fileformat from <ulink url="http://www.xiph.org">Xiphophorus</ulink>.
|
|
301 It can contain any video or audio codec, CBR or VBR. You'll need
|
|
302 <systemitem class="library">libogg</systemitem> and
|
|
303 <systemitem class="library">libvorbis</systemitem> installed before
|
|
304 compiling <application>MPlayer</application> to be able to play it.
|
|
305 </para>
|
|
306 </sect3>
|
|
307
|
|
308
|
|
309 <sect3 id="sdp">
|
|
310 <title>SDP files</title>
|
|
311 <para>
|
|
312 <ulink url="ftp://ftp.rfc-editor.org/in-notes/rfc2327.txt">SDP</ulink> is an
|
|
313 IETF standard format for describing video and/or audio RTP streams.
|
|
314 (The "<ulink url="http://www.live.com/mplayer/">LIVE.COM Streaming Media</ulink>"
|
|
315 are required.)
|
|
316 </para>
|
|
317 </sect3>
|
|
318
|
|
319
|
|
320 <sect3 id="pva">
|
|
321 <title>PVA files</title>
|
|
322 <para>
|
|
323 PVA is an MPEG-like format used by DVB TV boards' software (e.g.:
|
|
324 <application>MultiDec</application>, <application>WinTV</application> under Windows.
|
|
325 </para>
|
|
326
|
|
327 <para>
|
|
328 The PVA specifications can be downloaded from the following address:
|
|
329 <ulink url="http://www.technotrend.de/download/av_format_v1.pdf"/>
|
|
330 </para>
|
|
331 </sect3>
|
|
332
|
|
333
|
|
334 <sect3 id="gif">
|
|
335 <title>GIF files</title>
|
|
336 <para>
|
|
337 The <emphasis role="bold">GIF</emphasis> format is a common format for web
|
|
338 graphics. There are two versions of the GIF spec, GIF87a and GIF89a. The
|
|
339 main difference is that GIF89a allows for animation. MPlayer supports both
|
|
340 formats through use of <systemitem class="library">libungif</systemitem> or
|
|
341 another libgif-compatible library. Non-animated GIFs will be displayed as
|
|
342 single frame videos. (Use the <option>-loop</option> and <option>-fixed-vo</option>
|
|
343 options to display these longer.)
|
|
344 </para>
|
|
345
|
|
346 <para>
|
|
347 <application>MPlayer</application> currently does not support seeking in GIF
|
|
348 files. GIF files do not necessarily have a fixed frame size, nor a fixed
|
|
349 framerate. Rather, each frame is of independent size and is supposed to be
|
|
350 positioned in a certain place on a field of fixed-size. The framerate is
|
|
351 controlled by an optional block before each frame that specifies the next
|
|
352 frame's delay in centiseconds.
|
|
353 </para>
|
|
354
|
|
355 <para>
|
|
356 Standard GIF files contain 24-bit RGB frames with at most an 8-bit indexed
|
|
357 pallete. These frames are usually LZW-compressed, although some GIF encoders
|
|
358 produce uncompressed frames to avoid patent issues with LZW compression.
|
|
359 </para>
|
|
360
|
|
361 <para>
|
|
362 If your distribution does not come with <systemitem class="library">libungif</systemitem>,
|
|
363 download a copy from the
|
|
364 <ulink url="http://prtr-13.ucsc.edu/~badger/software/libungif/index.shtml">libungif
|
|
365 homepage</ulink>. For detailed technical information, have a look at the
|
|
366 <ulink url="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF89a specification</ulink>.
|
|
367 </para>
|
|
368 </sect3>
|
|
369 </sect2>
|
|
370
|
|
371 <!-- ********** -->
|
|
372
|
|
373 <sect2 id="audio-formats">
|
|
374 <title>Audio formats</title>
|
|
375
|
|
376 <para>
|
|
377 <application>MPlayer</application> is a <emphasis role="bold">movie</emphasis>
|
|
378 and not a <emphasis role="bold">media</emphasis> player, although it can play
|
|
379 some audio file formats (they are listed in the sections below). This is not
|
|
380 a recommended usage of <application>MPlayer</application>, you better use <ulink
|
|
381 url="http://www.xmms.org">XMMS</ulink>.
|
|
382 </para>
|
|
383
|
|
384 <sect3 id="mp3">
|
|
385 <title>MP3 files</title>
|
|
386 <para>
|
|
387 You may have problems playing certain MP3 files that
|
|
388 <application>MPlayer</application> will misdetect as MPEGs and play
|
|
389 incorrectly or not at all. This cannot be fixed without dropping support
|
|
390 for certain broken MPEG files and thus will remain like this for the
|
|
391 foreseeable future. The <option>-demuxer</option> flag described in the
|
|
392 manpage may help you in these cases.
|
|
393 </para>
|
|
394 </sect3>
|
|
395
|
|
396 <sect3 id="wav">
|
|
397 <title>WAV files</title>
|
|
398 <para>
|
|
399 </para>
|
|
400 </sect3>
|
|
401
|
|
402 <sect3 id="ogg-vorbis">
|
|
403 <title>OGG/OGM files (Vorbis)</title>
|
|
404 <para>
|
|
405 Requires properly installed
|
|
406 <systemitem class="library">libogg</systemitem> and
|
|
407 <systemitem class="library">libvorbis</systemitem>.
|
|
408 </para>
|
|
409 </sect3>
|
|
410
|
|
411 <sect3 id="wma-asf">
|
|
412 <title>WMA/ASF files</title>
|
|
413 <para>
|
|
414 </para>
|
|
415 </sect3>
|
|
416
|
|
417 <sect3 id="mp4">
|
|
418 <title>MP4 files</title>
|
|
419 <para></para>
|
|
420 </sect3>
|
|
421
|
|
422 <sect3 id="cdda">
|
|
423 <title>CD audio</title>
|
|
424 <para>
|
|
425 <application>MPlayer</application> can use <application>cdparanoia</application>
|
|
426 to play CDDA (Audio CD). The scope of this section does not contain enumerating
|
|
427 <application>cdparanoia</application>'s features.
|
|
428 </para>
|
|
429
|
|
430 <para>
|
|
431 See the man page's <option>-cdda</option> option which can be used to pass
|
|
432 options to <application>cdparanoia</application>.
|
|
433 </para>
|
|
434 </sect3>
|
|
435
|
|
436 <sect3 id="xmms">
|
|
437 <title>XMMS</title>
|
|
438 <para>
|
|
439 <application>MPlayer</application> can use <application>XMMS</application> input
|
|
440 plugins to play many file formats. There are plugins for SNES game tunes, SID
|
|
441 tunes (from Commodore 64), many Amiga formats, .xm, .it, VQF, musepack, Bonk,
|
|
442 shorten and many others. You can find them at the
|
|
443 <ulink url="http://www.xmms.org/plugins_input.html">XMMS input plugin page</ulink>.
|
|
444 </para>
|
|
445
|
|
446 <para>
|
|
447 For this feature you need to have <application>XMMS</application> and compile
|
|
448 <application>MPlayer</application> with <filename>./configure --enable-xmms</filename>.
|
|
449 If that does not work, you might need to set the <application>XMMS</application>
|
|
450 plugin and library path explicitly by way of the <option>--with-xmmsplugindir</option>
|
|
451 and <option>--withxmmslibdir</option> options.
|
|
452 </para>
|
|
453 </sect3>
|
|
454 </sect2>
|
|
455 </sect1>
|