comparison DOCS/formats.html @ 6960:87deea511b1f

continuing paragraph reformatting
author gabucino
date Sat, 10 Aug 2002 20:26:43 +0000
parents 3274d0725fde
children 916f62dd0910
comparison
equal deleted inserted replaced
6959:f7d8c02536e4 6960:87deea511b1f
11 11
12 12
13 <P><B><A NAME="formats">2.1 Supported formats</A></B></P> 13 <P><B><A NAME="formats">2.1 Supported formats</A></B></P>
14 14
15 <P>It is important to clarify a common mistake. When people see a file with a 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. 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 file 17 That is not true. At least not entirely. Contrary to popular belief such a
18 <B>can</B> contain MPEG1 video.</P> 18 file <B>can</B> contain MPEG1 video.</P>
19 19
20 <P>You see, a <B>codec</B> is not the same as a <B>file format</B>.<BR> 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> 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.<BR> 22 Examples of file <B>formats</B> are: MPG, AVI, ASF.<BR>
23 </P> 23 </P>
24 24
25 <P>In theory, you can put an OpenDivX video and MP3 audio 25 <P>In theory, you can put an OpenDivX video and MP3 audio into an <B>MPG</B>
26 into an <B>MPG</B> format file. However, most players will not play it, since 26 format file. However, most players will not play it, since they expect MPEG1
27 they expect MPEG1 video and MP2 audio (unlike <B>AVI</B>, <B>MPG</B> does not have the 27 video and MP2 audio (unlike <B>AVI</B>, <B>MPG</B> does not have the
28 necessary fields to describe its video and audio streams). 28 necessary fields to describe its video and audio streams). Or you might put
29 Or you might put MPEG1 video into an AVI file. <A HREF="http://ffmpeg.sourceforge.net">FFmpeg</A> 29 MPEG1 video into an AVI file.
30 and <A HREF="encoding.html">MEncoder</A> can create these files.</P> 30 <A HREF="http://ffmpeg.sourceforge.net">FFmpeg</A> and
31 <A HREF="encoding.html">MEncoder</A> can create these files.</P>
31 32
32 33
33 34
34 <P><B><A NAME="video_formats">2.1.1 Video formats</A></B></P> 35 <P><B><A NAME="video_formats">2.1.1 Video formats</A></B></P>
35 36
37 <P><B><A NAME="mpeg">2.1.1.1 MPEG files</A></B></P> 38 <P><B><A NAME="mpeg">2.1.1.1 MPEG files</A></B></P>
38 39
39 <P>MPEG files come in different guises:</P> 40 <P>MPEG files come in different guises:</P>
40 41
41 <UL> 42 <UL>
42 <LI>MPG: This is the most <B>basic</B> form of the MPEG file formats. It contains 43 <LI>MPG: This is the most <B>basic</B> form of the MPEG file formats. It
43 MPEG1 video, and MP2 (MPEG-1 layer 2) or rarely MP1 audio.</LI> 44 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 is used 45 <LI>DAT: This is the very same format as MPG with a different extension. It
45 on <B>Video CD</B>s. Due to the way VCDs are created and Linux is designed, 46 is used on <B>Video CD</B>s. Due to the way VCDs are created and Linux is
46 DAT files cannot be played nor copied from VCDs as regular files. You have 47 designed, DAT files cannot be played nor copied from VCDs as regular files.
47 to use the <CODE>-vcd</CODE> option to play the Video CD.</LI> 48 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, plus the 49 <LI>VOB: This is the MPEG file format on <B>DVD</B>s. It is the same as MPG,
49 capability to contain subtitles or non-MPEG (AC3) audio. It contains encoded MPEG2 50 plus the capability to contain subtitles or non-MPEG (AC3) audio. It
50 video and usually AC3 audio, but DTS, MP2 and uncompressed LPCM are allowed, too.<BR> 51 contains encoded MPEG2 video and usually AC3 audio, but DTS, MP2 and
51 <B>Read the <A HREF="cd-dvd.html#dvd">DVD section</A> !</B></LI> 52 uncompressed LPCM are allowed, too.<BR> <B>Read the <A
53 HREF="cd-dvd.html#dvd">DVD section</A>!</B></LI>
52 </UL> 54 </UL>
53 55
54 <P>Series of frames form independent groups in MPEG files. This means that you 56 <P>Series of frames form independent groups in MPEG files. This means that you
55 can cut/join an MPEG file with standard file tools (like <CODE>dd</CODE>, 57 can cut/join an MPEG file with standard file tools (like <CODE>dd</CODE>,
56 <CODE>cut</CODE>), and it remains completely functional.</P> 58 <CODE>cut</CODE>), and it remains completely functional.</P>
57 59
58 <P>One important feature of MPGs is that they have a field to describe 60 <P>One important feature of MPGs is that they have a field to describe the
59 the aspect ratio of the video stream within. For example SVCDs have 61 aspect ratio of the video stream within. For example SVCDs have 480x480
60 480x480 resolution video, and in the header that field is set to 4:3, so that 62 resolution video, and in the header that field is set to 4:3, so that it is
61 it is played at 640x480. AVI files do not have this field, so they have to be 63 played at 640x480. AVI files do not have this field, so they have to be
62 rescaled during encoding or played with the <CODE>-aspect</CODE> option.</P> 64 rescaled during encoding or played with the <CODE>-aspect</CODE> option.</P>
63 65
64 66
65 <P><B><A NAME="avi">2.1.1.2 AVI files</A></B></P> 67 <P><B><A NAME="avi">2.1.1.2 AVI files</A></B></P>
66 68
67 <P>Designed by Microsoft, <B>AVI (Audio Video Interleaved)</B> is a 69 <P>Designed by Microsoft, <B>AVI (Audio Video Interleaved)</B> is a widespread
68 widespread multipurpose format currently used mostly for DivX and DivX4 70 multipurpose format currently used mostly for DivX and DivX4 video. It has
69 video. It has many known drawbacks and shortcomings (for example in streaming). 71 many known drawbacks and shortcomings (for example in streaming). It
70 It supports one video stream and 0 to 99 audio streams. File size is limited to 72 supports one video stream and 0 to 99 audio streams. File size is limited to
71 2GB, but there exists an extension allowing bigger files called <B>OpenDMS</B>. 73 2GB, but there exists an extension allowing bigger files called
72 Microsoft currently strongly discourages its use and encourages ASF/WMV. Not that 74 <B>OpenDMS</B>. Microsoft currently strongly discourages its use and
73 anybody cares.<BR> 75 encourages ASF/WMV. Not that anybody cares.<BR>
74 76
75 <P>There is a hack that allows AVI files to contain an Ogg Vorbis audio 77 <P>There is a hack that allows AVI files to contain an Ogg Vorbis audio
76 stream, but makes them incompatible with standard AVI. <B>MPlayer</B> 78 stream, but makes them incompatible with standard AVI. <B>MPlayer</B>
77 supports playing these files. Seeking is also implemented but severely 79 supports playing these files. Seeking is also implemented but severely
78 hampered by badly encoded files with confusing headers. Unfortunately the 80 hampered by badly encoded files with confusing headers. Unfortunately the
79 only encoder currently capable of creating these files, NanDub, has this 81 only encoder currently capable of creating these files, NanDub, has this
80 problem.</P> 82 problem.</P>
81 83
82 <P><B>Note:</B> DV cameras create raw DV streams that DV grabbing utilities 84 <P><B>Note:</B> DV cameras create raw DV streams that DV grabbing utilities
83 convert to two different types of AVI files. The AVI will then contain either 85 convert to two different types of AVI files. The AVI will then contain either
84 separate audio and video streams that <B>MPlayer</B> can play or the raw DV 86 separate audio and video streams that <B>MPlayer</B> can play or the raw DV
85 stream for which support is under development.</P> 87 stream for which support is under development.</P>
86 88
87 <P>There are two kinds of AVI files:</P> 89 <P>There are two kinds of AVI files:</P>
88 <UL> 90 <UL>
89 <LI><B>Interleaved:</B> Audio and video content is interleaved. This is the 91 <LI><B>Interleaved:</B> Audio and video content is interleaved. This is the
90 standard usage. Recommended and mostly used. Some tools create interleaved 92 standard usage. Recommended and mostly used. Some tools create interleaved
108 it uses the relative position of interleaved audio and video chunks, making 110 it uses the relative position of interleaved audio and video chunks, making
109 badly encoded files with VBR audio playable.</LI> 111 badly encoded files with VBR audio playable.</LI>
110 </UL> 112 </UL>
111 113
112 <P>Any audio and video codec is allowed, but note that VBR audio is not well 114 <P>Any audio and video codec is allowed, but note that VBR audio is not well
113 supported by most players. The file format makes it possible to use VBR 115 supported by most players. The file format makes it possible to use VBR
114 audio, but most players expect CBR audio, thus they fail with VBR. VBR is 116 audio, but most players expect CBR audio, thus they fail with VBR. VBR is
115 uncommon and the Microsoft AVI specs only describe CBR audio. Most AVI 117 uncommon and the Microsoft AVI specs only describe CBR audio. Most AVI
116 encoders/multiplexers create bad files when using VBR audio. There are only 118 encoders/multiplexers create bad files when using VBR audio. There are only
117 two known exceptions: NanDub and <A HREF="encoding.html">MEncoder</A>.</P> 119 two known exceptions: NanDub and <A HREF="encoding.html">MEncoder</A>.</P>
118 120
119 121
120 <P><B><A NAME="asf">2.1.1.3 ASF/WMV files</A></B></P> 122 <P><B><A NAME="asf">2.1.1.3 ASF/WMV files</A></B></P>
121 123
122 <P>ASF (active streaming format) comes from Microsoft. They developed two 124 <P>ASF (active streaming format) comes from Microsoft. They developed two
123 variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (Windows 125 variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (Windows
124 Media Player and Windows Media Encoder) and is very secret. v2.0 is published 126 Media Player and Windows Media Encoder) and is very secret. v2.0 is published
125 and patented :). Of course they differ, there is no compatibility at all (it is 127 and patented :). Of course they differ, there is no compatibility at all (it
126 just another legal game). <B>MPlayer</B> supports only v1.0, as nobody has ever seen 128 is just another legal game). <B>MPlayer</B> supports only v1.0, as nobody has
127 v2.0 files :). Note that ASF files nowadays come with the extension .WMA or 129 ever seen v2.0 files :). Note that ASF files nowadays come with the extension
128 .WMV.</P> 130 .WMA or .WMV.</P>
129 131
130 132
131 <P><B><A NAME="mov">2.1.1.4 QuickTime/MOV files</A></B></P> 133 <P><B><A NAME="mov">2.1.1.4 QuickTime/MOV files</A></B></P>
132 134
133 <P>These formats were designed by Apple and can contain any codec, CBR or VBR. 135 <P>These formats were designed by Apple and can contain any codec, CBR or VBR.
134 They usually have a .QT or .MOV extension. Ever since the MPEG4 group chose 136 They usually have a .QT or .MOV extension. Ever since the MPEG4 group chose
135 QuickTime as the recommended file format for MPEG4, their MOV files come with a 137 QuickTime as the recommended file format for MPEG4, their MOV files come with
136 .MPG or .MP4 extension (Interestingly the video and audio streams in these 138 an
137 files are real MPG and AAC files. You can even extract them with the 139 .MPG or .MP4 extension (Interestingly the video and audio streams in these
138 <CODE>-dumpvideo</CODE> and <CODE>-dumpaudio</CODE> options.).</P> 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>
139 142
140 <P><B>Note:</B> Most new QuickTime files use <B>Sorenson</B> video and QDesign 143 <P><B>Note:</B> Most new QuickTime files use <B>Sorenson</B> video and QDesign
141 Music audio. See our <A HREF="codecs.html#sorenson">Sorenson</A> codec 144 Music audio. See our <A HREF="codecs.html#sorenson">Sorenson</A> codec
142 section. QDesign Music audio currently cannot be played.</P> 145 section. QDesign Music audio currently cannot be played.</P>
143 146
144 147
145 <P><B><A NAME="vivo">2.1.1.5 VIVO files</A></B></P> 148 <P><B><A NAME="vivo">2.1.1.5 VIVO files</A></B></P>
146 149
147 <P><B>MPlayer</B> happily demuxes VIVO file formats. The biggest disadvantage of 150 <P><B>MPlayer</B> happily demuxes VIVO file formats. The biggest disadvantage
148 the format is that it has no index block, nor a fixed packet size or sync bytes 151 of the format is that it has no index block, nor a fixed packet size or sync
149 and most files lack even keyframes, so forget seeking!</P> 152 bytes and most files lack even keyframes, so forget seeking!</P>
150 153
151 <P>The video codec of VIVO/1.0 files is standard <B>h.263</B>. The video codec 154 <P>The video codec of VIVO/1.0 files is standard <B>h.263</B>. The video codec
152 of VIVO/2.0 files is a modified, nonstandard <B>h.263v2</B>. The audio is the same, 155 of VIVO/2.0 files is a modified, nonstandard <B>h.263v2</B>. The audio is the
153 it may be <B>g.723</B> (standard), or <B>Vivo Siren</B>.</P> 156 same, it may be <B>g.723</B> (standard), or <B>Vivo Siren</B>.</P>
154 157
155 <P>See the <A HREF="codecs.html#vivo_video">VIVO video codec</A> 158 <P>See the <A HREF="codecs.html#vivo_video">VIVO video codec</A> and
156 and <A HREF="codecs.html#vivo_audio">VIVO audio codec</A> sections for installation 159 <A HREF="codecs.html#vivo_audio">VIVO audio codec</A> sections for installation
157 instructions.</P> 160 instructions.</P>
158 161
159 162
160 <P><B><A NAME="fli">2.1.1.6 FLI files</A></B></P> 163 <P><B><A NAME="fli">2.1.1.6 FLI files</A></B></P>
161 164
162 <P><B>FLI</B> is a very old file format used by Autodesk Animator, but it is 165 <P><B>FLI</B> is a very old file format used by Autodesk Animator, but it is a
163 a common file format for short animations on the net. <B>MPlayer</B> demuxes 166 common file format for short animations on the net. <B>MPlayer</B> demuxes
164 and decodes FLI movies and is even able to seek within them (useful when 167 and decodes FLI movies and is even able to seek within them (useful when
165 looping with the <CODE>-loop</CODE> option). FLI files do not have keyframes, so the picture 168 looping with the <CODE>-loop</CODE> option). FLI files do not have keyframes,
166 will be messy for a short time after seeking.</P> 169 so the picture will be messy for a short time after seeking.</P>
167 170
168 171
169 <P><B><A NAME="real">2.1.1.7 RealMedia (RM) files</A></B></P> 172 <P><B><A NAME="real">2.1.1.7 RealMedia (RM) files</A></B></P>
170 173
171 <P>Yes, <B>MPlayer</B> can read (demux) RealMedia (.rm) files. Seeking works, 174 <P>Yes, <B>MPlayer</B> can read (demux) RealMedia (.rm) files. Seeking works,
176 179
177 180
178 <P><B><A NAME="nuppelvideo">2.1.1.8 NuppelVideo files</A></B></P> 181 <P><B><A NAME="nuppelvideo">2.1.1.8 NuppelVideo files</A></B></P>
179 182
180 <P><A HREF="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</A> 183 <P><A HREF="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</A>
181 is a TV grabber tool (AFAIK:). <B>MPlayer</B> can read its .NUV 184 is a TV grabber tool (AFAIK:). <B>MPlayer</B> can read its .NUV files (only
182 files (only NuppelVideo 5.0). Those files can contain uncompressed YV12, 185 NuppelVideo 5.0). Those files can contain uncompressed YV12, YV12+RTJpeg
183 YV12+RTJpeg compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed 186 compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed frames.
184 frames. <B>MPlayer</B> decodes them all (and also <B>encodes</B> them with 187 <B>MPlayer</B> decodes them all (and also <B>encodes</B> them with
185 <B>MEncoder</B> to DivX/etc!). Seeking works.</P> 188 <B>MEncoder</B> to DivX/etc!). Seeking works.</P>
186 189
187 190
188 <P><B><A NAME="yuv4mpeg">2.1.1.9 yuv4mpeg files</A></B></P> 191 <P><B><A NAME="yuv4mpeg">2.1.1.9 yuv4mpeg files</A></B></P>
189 192
190 <P><A HREF="http://mjpeg.sourceforge.net">yuv4mpeg / yuv4mpeg2</A> is 193 <P><A HREF="http://mjpeg.sourceforge.net">yuv4mpeg / yuv4mpeg2</A> is a file
191 a file format used by the <A HREF="http://mjpeg.sf.net">mjpegtools programs</A>. 194 format used by the <A HREF="http://mjpeg.sf.net">mjpegtools programs</A>.
192 You can grab, produce, filter or encode video in this format using these tools. 195 You can grab, produce, filter or encode video in this format using these
193 The file format is really a sequence of uncompressed YUV 4:2:0 images. 196 tools. The file format is really a sequence of uncompressed YUV 4:2:0
197 images.
194 </P> 198 </P>
195 199
196 200
197 <P><B><A NAME="film">2.1.1.10 FILM files</A></B></P> 201 <P><B><A NAME="film">2.1.1.10 FILM files</A></B></P>
198 202
222 226
223 227
224 <P><B><A NAME="mp3">2.1.2.1 MP3 files</A></B></P> 228 <P><B><A NAME="mp3">2.1.2.1 MP3 files</A></B></P>
225 229
226 <P>You may have problems playing certain MP3 files that <B>MPlayer</B> will 230 <P>You may have problems playing certain MP3 files that <B>MPlayer</B> will
227 misdetect as MPEGs and play incorrectly or not at all. This cannot be fixed 231 misdetect as MPEGs and play incorrectly or not at all. This cannot be fixed
228 without dropping support for certain broken MPEG files and thus will remain 232 without dropping support for certain broken MPEG files and thus will remain
229 like this for the foreseeable future. The <CODE>-demuxer</CODE> flag described 233 like this for the foreseeable future. The <CODE>-demuxer</CODE> flag
230 in the manpage may help you in these cases.</P> 234 described in the manpage may help you in these cases.</P>
231 235
232 236
233 <P><B><A NAME="wav">2.1.2.2 WAV files</A></B></P> 237 <P><B><A NAME="wav">2.1.2.2 WAV files</A></B></P>
234 238
235 239