comparison DOCS/formats.html @ 5395:c8e3d5241531

applied Diego's patch
author gabucino
date Fri, 29 Mar 2002 22:34:12 +0000
parents 1a7fd8f13ac0
children b4206f207ad1
comparison
equal deleted inserted replaced
5394:cc405b698747 5395:c8e3d5241531
13 <FONT CLASS="text"> 13 <FONT CLASS="text">
14 14
15 <P><B><A NAME=2.1>2.1. Supported formats</A></B></P> 15 <P><B><A NAME=2.1>2.1. Supported formats</A></B></P>
16 16
17 <P>It is important to clarify a common mistake. When people see a file with a 17 <P>It is important to clarify a common mistake. When people see a file with a
18 <B>.AVI</B> extension, they immediately conclude that it is not a MPEG file. 18 <B>.AVI</B> extension, they immediately conclude that it is not an MPEG file.
19 That is not true. At least not entirely. Contrary to popular belief such a file 19 That is not true. At least not entirely. Contrary to popular belief such a file
20 <B>can</B> contain MPEG1 video.</P> 20 <B>can</B> contain MPEG1 video.</P>
21 21
22 <P>You see, a <B>codec</B> is not the same as a <B>file format</B>.<BR> 22 <P>You see, a <B>codec</B> is not the same as a <B>file format</B>.<BR>
23 Video <B>codecs</B> are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.<BR> 23 Examples of video <B>codecs</B> are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.<BR>
24 Video <B>formats</B> are: MPG, AVI, ASF.<BR> 24 Examples of file <B>formats</B> are: MPG, AVI, ASF.<BR>
25 </P> 25 </P>
26 26
27 <P>In theory, you can happily put an OpenDivX video and MP3 audio 27 <P>In theory, you can put an OpenDivX video and MP3 audio
28 into a <B>MPG</B> format file. Most players will not play it, though, since 28 into an <B>MPG</B> format file. However, most players will not play it, since
29 they expect MPEG1 video and MP2 audio (<B>.MPG</B> does not have the 29 they expect MPEG1 video and MP2 audio (unlike <B>AVI</B>, <B>MPG</B> does not have the
30 necessary fields to describe its video and audio streams, like <B>.AVI</B> 30 necessary fields to describe its video and audio streams).
31 does). Or you might put MPEG1 video into an .AVI file. <A HREF="http://ffmpeg.sourceforge.net">FFmpeg</A> 31 Or you might put MPEG1 video into an AVI file. <A HREF="http://ffmpeg.sourceforge.net">FFmpeg</A>
32 and <A HREF="encoding.html">MEncoder</A> can create these files.</P> 32 and <A HREF="encoding.html">MEncoder</A> can create these files.</P>
33 33
34 <P>In contrast to that audio <B>codecs</B> and audio <B>formats</B> are basically the same terms.</P>
35 34
36 35
37 <P><B><A NAME=2.1.1>2.1.1. Video formats</A></B></P> 36 <P><B><A NAME=2.1.1>2.1.1. Video formats</A></B></P>
38 37
39 38
40 <P><B><A NAME=2.1.1.1>2.1.1.1. MPEG files</A></B></P> 39 <P><B><A NAME=2.1.1.1>2.1.1.1. MPEG files</A></B></P>
41 40
42 <P> 41 <P>MPEG files come in different guises:</P>
43 <LI>MPG : This is the most <B>basic</B> form of the MPEG file formats. It contains 42
43 <UL>
44 <LI>MPG: This is the most <B>basic</B> form of the MPEG file formats. It contains
44 MPEG1 video, and MP2 (MPEG-1 layer 2) or rarely MP1 audio.</LI> 45 MPEG1 video, and MP2 (MPEG-1 layer 2) or rarely MP1 audio.</LI>
45 <LI>DAT : This is the very same format as MPG with a different extension. It is used 46 <LI>DAT: This is the very same format as MPG with a different extension. It is used
46 on <B>Video CD</B>s. Due to the way VCDs are created and Linux is designed, 47 on <B>Video CD</B>s. Due to the way VCDs are created and Linux is designed,
47 the DAT files cannot be played nor copied from VCDs as regular files. You have 48 the DAT files cannot be played nor copied from VCDs as regular files. You have
48 to use the <CODE>-vcd</CODE> option to play the Video CD.</LI> 49 to use the <CODE>-vcd</CODE> option to play the Video CD.</LI>
49 <LI>VOB : This is the MPEG file format on <B>DVD</B>s. It is the same as MPG, plus the 50 <LI>VOB: This is the MPEG file format on <B>DVD</B>s. It is the same as MPG, plus the
50 capability to contain subtitles or non-MPEG (AC3) audio. It contains encoded MPEG2 51 capability to contain subtitles or non-MPEG (AC3) audio. It contains encoded MPEG2
51 video and usually AC3 audio, but DTS, MP2 and uncompressed LPCM are allowed, too.<BR> 52 video and usually AC3 audio, but DTS, MP2 and uncompressed LPCM are allowed, too.<BR>
52 <B>Read the <A HREF="cd-dvd.html#4.2">DVD section</A> !</B></LI> 53 <B>Read the <A HREF="cd-dvd.html#4.2">DVD section</A> !</B></LI>
53 </P> 54 </UL>
54 55
55 <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
56 can cut/join an MPEG file with standard file tools (like dd, cut), and it 57 can cut/join an MPEG file with standard file tools (like dd, cut), and it
57 remains completely functional.</P> 58 remains completely functional.</P>
58 59
70 video. It has many known drawbacks and shortcomings (for example in streaming). 71 video. It has many known drawbacks and shortcomings (for example in streaming).
71 It supports one video stream and 0 to 99 audio streams and can be as big as 72 It supports one video stream and 0 to 99 audio streams and can be as big as
72 2GB. There exists an extension allowing bigger files called <B>OpenDMS</B>. 73 2GB. There exists an extension allowing bigger files called <B>OpenDMS</B>.
73 M$ currently strongly discourages its use and encourages ASF/WMV. Not that 74 M$ currently strongly discourages its use and encourages ASF/WMV. Not that
74 anybody cares.<BR> 75 anybody cares.<BR>
75 <B>NOTE</B>: DV cameras can create two types of AVI formats. One is common and 76 <B>NOTE:</B> DV cameras can create two types of AVI formats. One is common and
76 playable, the other is neither.</P> 77 playable, the other is neither.</P>
77 78
78 <P>There are two kinds of AVI files: 79 <P>There are two kinds of AVI files:</P>
79 <UL> 80 <UL>
80 <LI><B>Interleaved</B>: Audio and video content is interleaved. This is the 81 <LI><B>Interleaved:</B> Audio and video content is interleaved. This is the
81 standard usage. Recommended and mostly used. Some tools create interleaved 82 standard usage. Recommended and mostly used. Some tools create interleaved
82 AVIs with bad sync. <B>MPlayer</B> detects these as interleaved, and this 83 AVIs with bad sync. <B>MPlayer</B> detects these as interleaved, and this
83 climaxes in loss of A/V sync, probably at seeking. These files should be 84 climaxes in loss of A/V sync, probably at seeking. These files should be
84 played as non-interleaved (with the <CODE>-ni</CODE> option).</LI> 85 played as non-interleaved (with the <CODE>-ni</CODE> option).</LI>
85 <LI><B>Non-interleaved</B>: First comes the whole video stream, then the whole 86 <LI><B>Non-interleaved:</B> First comes the whole video stream, then the whole
86 audio stream. It thus needs a lot of seeking, making playing from network or 87 audio stream. It thus needs a lot of seeking, making playing from network or
87 CD-Rom difficult.</LI> 88 CD-Rom difficult.</LI>
88 </UL> 89 </UL>
89 </P> 90
90 91 <P><B>MPlayer</B> supports two kinds of timings for AVI files:</P>
91 <P><B>MPlayer</B> supports two kinds of timings for AVI files:
92 <UL> 92 <UL>
93 <LI><B>bps-based</B>: It is based on the bitrate/samplerate of the video/audio stream. This 93 <LI><B>bps-based</B>: It is based on the bitrate/samplerate of the video/audio stream. This
94 method is used by most players, including avifile and windows media player. 94 method is used by most players, including <A HREF="http://avifile.sourceforge.net">avifile</A>
95 and windows media player.
95 Files with broken headers, and files created with VBR audio but not 96 Files with broken headers, and files created with VBR audio but not
96 VBR-compliant encoder will result in A/V desync with this method (mostly at 97 VBR-compliant encoder will result in A/V desync with this method (mostly at
97 seeking).</LI> 98 seeking).</LI>
98 <LI><B>interleaving-based</B>: It does not use the bitrate value of the header, instead 99 <LI><B>interleaving-based</B>: It does not use the bitrate value of the header, instead
99 it uses the relative position of interleaved audio and video chunks, making 100 it uses the relative position of interleaved audio and video chunks, making
100 badly encoded files with VBR audio playable.</LI> 101 badly encoded files with VBR audio playable.</LI>
101 </UL> 102 </UL>
102 </P>
103 103
104 <P>Any audio and video codec is allowed, but note that VBR audio is not well 104 <P>Any audio and video codec is allowed, but note that VBR audio is not well
105 supported by most players. The file format makes it possible to use VBR 105 supported by most players. The file format makes it possible to use VBR
106 audio, but most players expect CBR audio, thus they fail with VBR. VBR is 106 audio, but most players expect CBR audio, thus they fail with VBR. VBR is
107 uncommon and Microsoft's AVI specs only describe CBR audio. I also noticed that 107 uncommon and Microsoft's AVI specs only describe CBR audio. I also noticed that
114 <P>ASF (active streaming format) comes from Microsoft. They developed two 114 <P>ASF (active streaming format) comes from Microsoft. They developed two
115 variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (windows 115 variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools (windows
116 media player and windows media encoder) and is very secret. v2.0 is published 116 media player and windows media encoder) and is very secret. v2.0 is published
117 and patented :). Of course they differ, there is no compatibility at all (it is 117 and patented :). Of course they differ, there is no compatibility at all (it is
118 just another legal game). <B>MPlayer</B> supports only v1.0, as nobody has ever seen 118 just another legal game). <B>MPlayer</B> supports only v1.0, as nobody has ever seen
119 v2.0 files :) . Note, that .ASF files nowdays come with the extension .WMA or 119 v2.0 files :). Note that ASF files nowadays come with the extension .WMA or
120 .WMV.</P> 120 .WMV.</P>
121 121
122 122
123 <P><B><A NAME=2.1.1.4>2.1.1.4. QuickTime/MOV files</A></B></P> 123 <P><B><A NAME=2.1.1.4>2.1.1.4. QuickTime/MOV files</A></B></P>
124 124
125 <P>These are from the Macintosh. They usually have a .QT or .MOV extension. Note 125 <P>These formats were designed by Apple. They usually have a .QT or .MOV extension. Note
126 that since the MPEG4 group chose QuickTime as the recommended file format 126 that since the MPEG4 group chose QuickTime as the recommended file format
127 for MPEG4, their .MOV files come with a .MPG or .MP4 extension (Interestingly 127 for MPEG4, their MOV files come with a .MPG or .MP4 extension (Interestingly
128 the video and audio streams in these files are real .MPG and .AAC files. With the 128 the video and audio streams in these files are real MPG and AAC files. With the
129 <CODE>-dumpvideo/-dumpaudio</CODE> options you can even extract them!).</P> 129 <CODE>-dumpvideo</CODE> and <CODE>-dumpaudio</CODE> options you can even extract them!).</P>
130 130
131 <P><B>Codecs</B>: Any codec is allowed, both CBR and VBR. Note: most new QuickTime files use 131 <P><B>Codecs</B>: Any codec is allowed, both CBR and VBR. Note: most new QuickTime files use
132 <B>Sorensen</B> video and QDesign Music audio. These formats are completely 132 <B>Sorensen</B> video and QDesign Music audio. These formats have not been
133 secret, and only Apple's QuickTime player is able to play these files (on 133 disclosed and will probably remain so in the future, making Apple's QuickTime
134 win/mac only).</P> 134 player the only player able to play these files (on Windows/Mac OS only).</P>
135 135
136 136
137 <P><B><A NAME=2.1.1.5>2.1.1.5. VIV files</A></B></P> 137 <P><B><A NAME=2.1.1.5>2.1.1.5. VIV files</A></B></P>
138 138
139 <P><B>MPlayer</B> happily demuxes VIVO file formats. The biggest disadvantage of 139 <P><B>MPlayer</B> happily demuxes VIVO file formats. The biggest disadvantage of
142 142
143 <P>The video codec of VIVO/1.0 files is standard <B>h.263</B>. The video codec 143 <P>The video codec of VIVO/1.0 files is standard <B>h.263</B>. The video codec
144 of VIVO/2.0 files is a modified, nonstandard <B>h.263v2</B>. The audio is the same, 144 of VIVO/2.0 files is a modified, nonstandard <B>h.263v2</B>. The audio is the same,
145 it may be <B>g.723</B> (standard), or <B>Vivo Siren</B>.</P> 145 it may be <B>g.723</B> (standard), or <B>Vivo Siren</B>.</P>
146 146
147 <P>See the <A HREF=codecs.html#2.2.1.4>VIVO video codec</A> 147 <P>See the <A HREF="codecs.html#2.2.1.4">VIVO video codec</A>
148 and <A HREF=codecs.html#2.2.2.4>VIVO audio codec</A> sections for installation 148 and <A HREF="codecs.html#2.2.2.4">VIVO audio codec</A> sections for installation
149 instructions.</P> 149 instructions.</P>
150 150
151 151
152 <P><B><A NAME=2.1.1.6>2.1.1.6. FLI files</A></B></P> 152 <P><B><A NAME=2.1.1.6>2.1.1.6. FLI files</A></B></P>
153 153
167 167
168 168
169 <P><B><A NAME=2.1.1.8>2.1.1.8. NuppelVideo files</A></B></P> 169 <P><B><A NAME=2.1.1.8>2.1.1.8. NuppelVideo files</A></B></P>
170 170
171 <P><A HREF="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</A> 171 <P><A HREF="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</A>
172 is a TV grabber tool (AFAIK:). <B>MPlayer</B> can read its <CODE>.nuv</CODE> 172 is a TV grabber tool (AFAIK:). <B>MPlayer</B> can read its .NUV
173 files (only NuppelVideo 5.0). Those files can contain uncompressed YV12, 173 files (only NuppelVideo 5.0). Those files can contain uncompressed YV12,
174 YV12+RTJpeg compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed 174 YV12+RTJpeg compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed
175 frames. <B>MPlayer</B> decodes (and also <B>encodes</B> them with MEncoder to 175 frames. <B>MPlayer</B> decodes (and also <B>encodes</B> them with MEncoder to
176 DivX/etc!) them all. Seeking is being implemented.</P> 176 DivX/etc!) them all. Seeking is being implemented.</P>
177 177