comparison DOCS/en/formats.html @ 9382:1b3444713694

Move English files to en/ subdirectory.
author diego
date Mon, 10 Feb 2003 00:00:00 +0000
parents DOCS/formats.html@42667fd91d4a
children 4518182fb630
comparison
equal deleted inserted replaced
9381:007a1bdce1f4 9382:1b3444713694
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML>
3
4 <HEAD>
5 <TITLE>Formats - MPlayer - The Movie Player for Linux</TITLE>
6 <LINK REL="stylesheet" TYPE="text/css" HREF="default.css">
7 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
8 </HEAD>
9
10 <BODY>
11
12
13 <H2><A NAME="formats">2.1 Supported formats</A></H2>
14
15 <P>It is important to clarify a common mistake. When people see a file with a
16 <B>.AVI</B> extension, they immediately conclude that it is not an MPEG file.
17 That is not true. At least not entirely. Contrary to popular belief such a
18 file <B>can</B> contain MPEG1 video.</P>
19
20 <P>You see, a <B>codec</B> is not the same as a <B>file format</B>.<BR>
21 Examples of video <B>codecs</B> are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.<BR>
22 Examples of file <B>formats</B> are: MPG, AVI, ASF.</P>
23
24 <P>In theory, you can put an OpenDivX video and MP3 audio into an <B>MPG</B>
25 format file. However, most players will not play it, since they expect MPEG1
26 video and MP2 audio (unlike <B>AVI</B>, <B>MPG</B> does not have the
27 necessary fields to describe its video and audio streams). Or you might put
28 MPEG1 video into an AVI file.
29 <A HREF="http://ffmpeg.sourceforge.net">FFmpeg</A> and
30 <A HREF="encoding.html">MEncoder</A> can create these files.</P>
31
32
33
34 <H3><A NAME="video_formats">2.1.1 Video formats</A></H3>
35
36
37 <H4><A NAME="mpeg">2.1.1.1 MPEG files</A></H4>
38
39 <P>MPEG files come in different guises:</P>
40
41 <UL>
42 <LI>MPG: This is the most <B>basic</B> form of the MPEG file formats. It
43 contains MPEG1 video, and MP2 (MPEG-1 layer 2) or rarely MP1 audio.</LI>
44 <LI>DAT: This is the very same format as MPG with a different extension. It
45 is used on <B>Video CD</B>s. Due to the way VCDs are created and Linux is
46 designed, DAT files cannot be played nor copied from VCDs as regular files.
47 You have to use the <CODE>-vcd</CODE> option to play the Video CD.</LI>
48 <LI>VOB: This is the MPEG file format on <B>DVD</B>s. It is the same as MPG,
49 plus the capability to contain subtitles or non-MPEG (AC3) audio. It
50 contains encoded MPEG2 video and usually AC3 audio, but DTS, MP2 and
51 uncompressed LPCM are allowed, too.<BR> <B>Read the <A
52 HREF="cd-dvd.html#dvd">DVD section</A>!</B></LI>
53 </UL>
54
55 <P>Series of frames form independent groups in MPEG files. This means that you
56 can cut/join an MPEG file with standard file tools (like <CODE>dd</CODE>,
57 <CODE>cut</CODE>), and it remains completely functional.</P>
58
59 <P>One important feature of MPGs is that they have a field to describe the
60 aspect ratio of the video stream within. For example SVCDs have 480x480
61 resolution video, and in the header that field is set to 4:3, so that it is
62 played at 640x480. AVI files do not have this field, so they have to be
63 rescaled during encoding or played with the <CODE>-aspect</CODE> option.</P>
64
65
66 <H4><A NAME="avi">2.1.1.2 AVI files</A></H4>
67
68 <P>Designed by Microsoft, <B>AVI (Audio Video Interleaved)</B> is a widespread
69 multipurpose format currently used mostly for DivX and DivX4 video. It has
70 many known drawbacks and shortcomings (for example in streaming). It
71 supports one video stream and 0 to 99 audio streams. File size is limited to
72 2GB, but there exists an extension allowing bigger files called
73 <B>OpenDMS</B>. Microsoft currently strongly discourages its use and
74 encourages ASF/WMV. Not that anybody cares.</P>
75
76 <P>There is a hack that allows AVI files to contain an Ogg Vorbis audio
77 stream, but makes them incompatible with standard AVI. MPlayer
78 supports playing these files. Seeking is also implemented but severely
79 hampered by badly encoded files with confusing headers. Unfortunately the
80 only encoder currently capable of creating these files, NanDub, has this
81 problem.</P>
82
83 <P><B>Note:</B> DV cameras create raw DV streams that DV grabbing utilities
84 convert to two different types of AVI files. The AVI will then contain either
85 separate audio and video streams that MPlayer can play or the raw DV
86 stream for which support is under development.</P>
87
88 <P>There are two kinds of AVI files:</P>
89 <UL>
90 <LI><B>Interleaved:</B> Audio and video content is interleaved. This is the
91 standard usage. Recommended and mostly used. Some tools create
92 interleaved AVIs with bad sync. MPlayer detects these as
93 interleaved, and this climaxes in loss of A/V sync, probably at seeking.
94 These files should be played as non-interleaved (with the <CODE>-ni</CODE>
95 option).</LI>
96 <LI><B>Non-interleaved:</B> First comes the whole video stream, then the whole
97 audio stream. It thus needs a lot of seeking, making playing from network or
98 CD-Rom difficult.</LI>
99 </UL>
100
101 <P>MPlayer supports two kinds of timings for AVI files:</P>
102 <UL>
103 <LI><B>bps-based</B>: It is based on the bitrate/samplerate of the video/audio stream. This
104 method is used by most players, including <A HREF="http://avifile.sourceforge.net">avifile</A>
105 and Windows Media Player.
106 Files with broken headers, and files created with VBR audio but not with a
107 VBR-compliant encoder will result in A/V desync with this method (mostly at
108 seeking).</LI>
109 <LI><B>interleaving-based</B>: It does not use the bitrate value of the header, instead
110 it uses the relative position of interleaved audio and video chunks, making
111 badly encoded files with VBR audio playable.</LI>
112 </UL>
113
114 <P>Any audio and video codec is allowed, but note that VBR audio is not well
115 supported by most players. The file format makes it possible to use VBR
116 audio, but most players expect CBR audio, thus they fail with VBR. VBR is
117 uncommon and the Microsoft AVI specs only describe CBR audio. Most AVI
118 encoders/multiplexers create bad files when using VBR audio. There are only
119 two known exceptions: NanDub and <A HREF="encoding.html">MEncoder</A>.</P>
120
121
122 <H4><A NAME="asf">2.1.1.3 ASF/WMV files</A></H4>
123
124 <P>ASF (active streaming format) comes from Microsoft. They developed two
125 variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (Windows
126 Media Player and Windows Media Encoder) and is very secret. v2.0 is published
127 and patented :). Of course they differ, there is no compatibility at all (it
128 is just another legal game). MPlayer supports only v1.0, as nobody has
129 ever seen v2.0 files :). Note that ASF files nowadays come with the extension
130 .WMA or .WMV.</P>
131
132
133 <H4><A NAME="mov">2.1.1.4 QuickTime/MOV files</A></H4>
134
135 <P>These formats were designed by Apple and can contain any codec, CBR or VBR.
136 They usually have a .QT or .MOV extension. Ever since the MPEG4 group chose
137 QuickTime as the recommended file format for MPEG4, their MOV files come with
138 an
139 .MPG or .MP4 extension (Interestingly the video and audio streams in these
140 files are real MPG and AAC files. You can even extract them with the
141 <CODE>-dumpvideo</CODE> and <CODE>-dumpaudio</CODE> options.).</P>
142
143 <P><B>Note:</B> Most new QuickTime files use <B>Sorenson</B> video and QDesign
144 Music audio. See our <A HREF="codecs.html#sorenson">Sorenson</A> codec
145 section.</P>
146
147
148 <H4><A NAME="vivo">2.1.1.5 VIVO files</A></H4>
149
150 <P>MPlayer happily demuxes VIVO file formats. The biggest disadvantage
151 of the format is that it has no index block, nor a fixed packet size or sync
152 bytes and most files lack even keyframes, so forget seeking!</P>
153
154 <P>The video codec of VIVO/1.0 files is standard <B>h.263</B>. The video codec
155 of VIVO/2.0 files is a modified, nonstandard <B>h.263v2</B>. The audio is the
156 same, it may be <B>g.723</B> (standard), or <B>Vivo Siren</B>.</P>
157
158 <P>See the <A HREF="codecs.html#vivo_video">VIVO video codec</A> and
159 <A HREF="codecs.html#vivo_audio">VIVO audio codec</A> sections for installation
160 instructions.</P>
161
162
163 <H4><A NAME="fli">2.1.1.6 FLI files</A></H4>
164
165 <P><B>FLI</B> is a very old file format used by Autodesk Animator, but it is a
166 common file format for short animations on the net. MPlayer demuxes
167 and decodes FLI movies and is even able to seek within them (useful when
168 looping with the <CODE>-loop</CODE> option). FLI files do not have keyframes,
169 so the picture will be messy for a short time after seeking.</P>
170
171
172 <H4><A NAME="real">2.1.1.7 RealMedia (RM) files</A></H4>
173
174 <P>Yes, MPlayer can read (demux) RealMedia (.rm) files. Seeking works,
175 but you have to explicitly specify the <CODE>-forceidx</CODE> option
176 (the format supports keyframes). Here are the lists of the supported
177 <A HREF="codecs.html#realvideo">RealVideo</A>
178 and <A HREF="codecs.html#realaudio">RealAudio</A> codecs.</P>
179
180
181 <H4><A NAME="nuppelvideo">2.1.1.8 NuppelVideo files</A></H4>
182
183 <P><A HREF="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</A>
184 is a TV grabber tool (AFAIK:). MPlayer can read its .NUV files (only
185 NuppelVideo 5.0). Those files can contain uncompressed YV12, YV12+RTJpeg
186 compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed frames.
187 MPlayer decodes them all (and also <B>encodes</B> them with
188 MEncoder to DivX/etc!). Seeking works.</P>
189
190
191 <H4><A NAME="yuv4mpeg">2.1.1.9 yuv4mpeg files</A></H4>
192
193 <P><A HREF="http://mjpeg.sourceforge.net">yuv4mpeg / yuv4mpeg2</A> is a file
194 format used by the <A HREF="http://mjpeg.sf.net">mjpegtools programs</A>.
195 You can grab, produce, filter or encode video in this format using these
196 tools. The file format is really a sequence of uncompressed YUV 4:2:0
197 images.</P>
198
199
200 <H4><A NAME="film">2.1.1.10 FILM files</A></H4>
201
202 <P>This format is used on old Sega Saturn CD-Rom games.</P>
203
204
205 <H4><A NAME="roq">2.1.1.11 RoQ files</A></H4>
206
207 <P>RoQ files are multimedia files used in some ID games such as Quake III and
208 Return to Castle Wolfenstein.</P>
209
210
211 <H4><A NAME="ogg">2.1.1.12 OGG/OGM files</A></H4>
212
213 <P>This is a new file format from <A HREF="http://www.xiph.org">Xiphophorus</A>.
214 It can contain any video or audio codec, CBR or VBR. You will need to
215 have <CODE>libogg</CODE> and <CODE>libvorbis</CODE> installed
216 before compiling MPlayer to be able to play it.</P>
217
218
219 <H4><A NAME="sdp">2.1.1.13 SDP files</A></H4>
220
221 <P><A HREF="ftp://ftp.rfc-editor.org/in-notes/rfc2327.txt">SDP</A>
222 is an IETF standard format for describing video and/or audio RTP streams.
223 (The "<A HREF="http://www.live.com/mplayer/">LIVE.COM Streaming Media</A>"
224 libraries are required.)</P>
225
226
227 <H4><A NAME="pva">2.1.1.14 PVA files</A></H4>
228
229 <P>PVA is an MPEG-like format used by DVB TV boards' software (e.g.: MultiDec,
230 WinTV) under Windows.</P>
231
232 <P>The PVA specifications can be downloaded from the following address:
233 <A HREF="http://www.technotrend.de/download/av_format_v1.pdf">http://www.technotrend.de/download/av_format_v1.pdf</A></P>
234
235
236 <H4><A NAME="gif">2.1.1.15 GIF files</A></H4>
237
238 <P>The <B>GIF</B> format is a common format for web graphics. There are two
239 versions of the GIF spec, GIF87a and GIF89a. The main difference is that
240 GIF89a allows for animation. MPlayer supports both formats through use
241 of libungif or another libgif-compatible library. Non-animated GIFs will
242 be displayed as single frame videos. (Use the <CODE>-loop</CODE> and
243 <CODE>-fixed-vo</CODE> options to display these longer.)</P>
244
245 <P>MPlayer currently does not support seeking in GIF files. GIF files do
246 not necessarily have a fixed frame size, nor a fixed framerate. Rather,
247 each frame is of independent size and is supposed to be positioned in a
248 certain place on a field of fixed-size. The framerate is controlled by
249 an optional block before each frame that specifies the next frame's delay
250 in centiseconds.</P>
251
252 <P>Standard GIF files contain 24-bit RGB frames with at most an 8-bit
253 indexed pallete. These frames are usually LZW-compressed, although
254 some GIF encoders produce uncompressed frames to avoid patent issues
255 with LZW compression.</P>
256
257 <P>If your distribution does not come with libungif, download a copy from the
258 <A HREF="http://prtr-13.ucsc.edu/~badger/software/libungif/index.shtml">libungif homepage</A>.
259 For detailed technical information, have a look at the
260 <A HREF="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF89a specification</A>.</P>
261
262
263 <H3><A NAME="audio_formats">2.1.2 Audio formats</A></H3>
264
265 <P>MPlayer is a <B>Movie</B> and not a <B>Media</B> player, although
266 it can play some audio file formats (they are listed in the sections below).
267 This is not a recommended usage of MPlayer, you better use
268 <A HREF="http://www.xmms.org">xmms</A>.</P>
269
270
271 <H4><A NAME="mp3">2.1.2.1 MP3 files</A></H4>
272
273 <P>You may have problems playing certain MP3 files that MPlayer will
274 misdetect as MPEGs and play incorrectly or not at all. This cannot be fixed
275 without dropping support for certain broken MPEG files and thus will remain
276 like this for the foreseeable future. The <CODE>-demuxer</CODE> flag
277 described in the man page may help you in these cases.</P>
278
279
280 <H4><A NAME="wav">2.1.2.2 WAV files</A></H4>
281
282
283 <H4><A NAME="ogg_vorbis">2.1.2.3 OGG/OGM files (Vorbis)</A></H4>
284
285 <P>Requires properly installed <CODE>libogg</CODE> and
286 <CODE>libvorbis</CODE>.</P>
287
288
289 <H4><A NAME="wma">2.1.2.4 WMA/ASF files</A></H4>
290
291
292 <H4><A NAME="mp4">2.1.2.5 MP4 files</A></H4>
293
294
295 <H4><A NAME="cdda">2.1.2.6 CD audio</A></H4>
296
297 <P>MPlayer can use <B>cdparanoia</B> (lib) to play CDDA (Audio CD).
298 The scope of this section does not contain enumerating cdparanoia's
299 features.</P>
300
301 <P>See the man page's <CODE>-cdda</CODE> option which can be used to
302 pass options to cdparanoia.</P>
303
304
305 <H4><A NAME="xmms">2.1.2.7 XMMS</A></H4>
306
307 <P>MPlayer can use XMMS input plugins to play many file formats. There are
308 plugins for SNES game tunes, SID tunes (from Commodore 64), many Amiga
309 formats, .xm, .it, VQF, musepack, Bonk, shorten and many others. You can find
310 them at the
311 <A HREF="http://www.xmms.org/plugins_input.html">XMMS input plugin page</A>.</P>
312
313 <P>For this feature you need to have XMMS and compile MPlayer with
314 <CODE>./configure --enable-xmms</CODE>. If that does not work, you might need
315 to set the XMMS plugin and library path explicitly by way of the
316 <CODE>--with-xmmsplugindir</CODE> and <CODE>--withxmmslibdir</CODE>
317 options.</P>
318
319 </BODY>
320 </HTML>