comparison DOCS/Polish/formats.html @ 6040:d5c692754cf2

refresh and charset settings
author nell
date Fri, 10 May 2002 11:17:41 +0000
parents ed33540a982b
children
comparison
equal deleted inserted replaced
6039:8e941ce0b636 6040:d5c692754cf2
1 <HTML> 1 <HTML>
2
3 <HEAD>
4 <STYLE>
5 .text
6 {font-family : Verdana, Arial, Helvetica, sans-serif;
7 font-size : 14px;}
8 </STYLE>
9 </HEAD>
10
2 <BODY BGCOLOR=WHITE> 11 <BODY BGCOLOR=WHITE>
3 12
4 <FONT face="Verdana, Arial, Helvetica, sans-serif" size=2> 13 <FONT CLASS="text">
5
6 14
7 <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>
8 16
9 <P><B>MPlayer</B> can read/play from the following devices/formats:<BR> 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 an MPEG 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>
21
22 <P>You see, a <B>codec</B> is not the same as a <B>file format</B>.<BR>
23 Examples of video <B>codecs</B> are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.<BR>
24 Examples of file <B>formats</B> are: MPG, AVI, ASF.<BR>
25 </P>
26
27 <P>In theory, you can put an OpenDivX video and MP3 audio
28 into an <B>MPG</B> format file. However, most players will not play it, since
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).
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>
33
34
35
36 <P><B><A NAME=2.1.1>2.1.1. Video formats</A></B></P>
37
38
39 <P><B><A NAME=2.1.1.1>2.1.1.1. MPEG files</A></B></P>
40
41 <P>MPEG files come in different guises:</P>
42
10 <UL> 43 <UL>
11 <LI> <A HREF="#2.1.1.1">VCD</A> (Video CD) directly from CD-ROM or from CDRwin's .bin image file 44 <LI>MPG: This is the most <B>basic</B> form of the MPEG file formats. It contains
12 <LI> <A HREF="#2.1.1.1">DVD</A>, directly from your DVD disk, using libdvdread for decryption 45 MPEG1 video, and MP2 (MPEG-1 layer 2) or rarely MP1 audio.</LI>
13 <LI> <A HREF="#2.1.1.1">MPEG 1/2</A> System Stream (PS/PES/VOB) and Elementary Stream (ES) file 46 <LI>DAT: This is the very same format as MPG with a different extension. It is used
14 formats 47 on <B>Video CD</B>s. Due to the way VCDs are created and Linux is designed,
15 <LI> <A HREF="#2.1.1.2">RIFF AVI</A> file format 48 the DAT files cannot be played nor copied from VCDs as regular files. You have
16 <LI> <A HREF="#2.1.1.3">ASF/WMV</A> 1.0 file format 49 to use the <CODE>-vcd</CODE> option to play the Video CD.</LI>
17 <LI> <A HREF="#2.1.1.4">QT/MOV</A> file format with (un)compressed headers 50 <LI>VOB: This is the MPEG file format on <B>DVD</B>s. It is the same as MPG, plus the
18 <LI> <A HREF="#2.1.1.5">VIVO</A> format (.viv files) 51 capability to contain subtitles or non-MPEG (AC3) audio. It contains encoded MPEG2
19 <LI> <A HREF="#2.1.1.6">FLI</A> format 52 video and usually AC3 audio, but DTS, MP2 and uncompressed LPCM are allowed, too.<BR>
20 <LI> <A HREF="#2.1.1.7">RealMedia</A> format (.rm files)
21 <LI> <A HREF="#2.1.1.8">NuppelVideo</A> format (.nuv files)
22 <LI> <A HREF="#2.1.1.9">yuv4mpeg</A> format
23 <LI> supports <A HREF="documentation.html#3.3">reading from stdin</A>, or network via HTTP
24 </UL></P>
25
26 <P>It's important to clarify a popular mistake. When people see a file with
27 <B>.AVI</B> extension, they instantly declare that isn't an MPEG file.
28 That's not true. At least not entirely. If you tell them that such a file
29 can contain MPEG1 video, they laugh at you. Feel free to kick their dumbass
30 faces, then tell them to RTFM.</P>
31
32 <P>You see, a <B>codec</B> isn't equal to a <B>file format</B>.<BR>
33 Video <B>codecs</B> are: MPEG1, MPEG2, DivX, Indeo5, 3ivx.<BR>
34 Video <B>formats</B> are: MPG, AVI, ASF.<BR>
35 </P>
36
37 <P>In theory, you can happily put an OpenDivX video and MP3 audio
38 into a <B>.MPG</B> format file. Though most players won't play it, since
39 they expect MPEG1 video and MP2 audio (<B>.MPG</B> doesn't have the
40 necessary fields to describe its video and audio streams, like <B>.AVI</B>
41 does). Or put MPEG1 video to an .AVI. For example <A HREF="http://ffmpeg.sourceforge.net">ffmpeg</A> can
42 create these files.</P>
43
44 <P>Audio <B>codecs</B> and <B>formats</B> are basically the same terms.</P>
45
46
47 <P><B><A NAME=2.1.1>2.1.1. Video formats</A></B></P>
48
49
50 <P><B><A NAME=2.1.1.1>2.1.1.1. MPEG files</A></B></P>
51
52 <P>
53 <LI>MPG : this is the most <B>basic</B> form of MPEG file formats. Contains
54 MPEG1 video, and MP2 (MPEG-1 layer 2) audio, or rarely MP1.</LI>
55 <LI>DAT : this is the very same format as MPG, just different extension. Used
56 on <B>Video CD</B>s. Due to the nature VCDs are created and Linux is designed,
57 the DAT files can't be played nor copied from VCDs. You have to use the
58 <CODE>-vcd</CODE> option to play the VideoCD.</LI>
59 <LI>VOB : this is the MPEG file format on <B>DVD</B>s. The same as MPG, plus
60 capability to contain subtitles, or non-MPEG (AC3) audio. Contains encoded MPEG2
61 video, and usually AC3 audio, but MP2 is allowed too.<BR>
62 <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>
63 </P> 54 </UL>
64 55
65 <P>In MPEG files, series of frames are grouped together, and are independent 56 <P>Series of frames form independent groups in MPEG files. This means that you
66 from the other groups. What this means is you can cut/join an MPEG file with 57 can cut/join an MPEG file with standard file tools (like dd, cut), and it
67 standard file-tools (like dd, cut), and it remains completely functional.</P> 58 remains completely functional.</P>
68 59
69 <P>One important feature for MPGs is that they have a field to describe 60 <P>One important feature of MPGs is that they have a field to describe
70 the aspect ratio of the video stream within. For example SVCDs have 61 the aspect ratio of the video stream within. For example SVCDs have
71 480x480 resolution video, and in the header that field is set to 4:3, so 62 480x480 resolution video, and in the header that field is set to 4:3, so that
72 it's played at 640x480. AVI files don't have this field, so one has to 63 it is played at 640x480. AVI files do not have this field, so they have to be
73 rescale it during encoding.</P> 64 rescaled during encoding or played with the <CODE>-aspect</CODE> option.</P>
74 65
75 66
76 <P><B><A NAME=2.1.1.2>2.1.1.2. AVI files</A></B></P> 67 <P><B><A NAME=2.1.1.2>2.1.1.2. AVI files</A></B></P>
77 68
78 <P>Designed by Micro$oft, the <B>AVI (Audio Video Interleaved)</B> is a 69 <P>Designed by Micro$oft, <B>AVI (Audio Video Interleaved)</B> is a
79 widespread multipurpose format, currently used mostly for DivX and DivX4 70 widespread multipurpose format currently used mostly for DivX and DivX4
80 videos. Has many known drawbacks, and inabilities (for example in streaming). 71 video. It has many known drawbacks and shortcomings (for example in streaming).
81 Has support for one video stream, and 99 audio streams. Can be as big as 72 It supports one video stream and 0 to 99 audio streams and can be as big as
82 2Gb. There exists an extension for it to be bigger, called <B>OpenDMS</B>. 73 2GB. There exists an extension allowing bigger files called <B>OpenDMS</B>.
83 M$ currently strongly discourages its use and propagates ASF/WMV. Not if 74 M$ currently strongly discourages its use and encourages ASF/WMV. Not that
84 anybody cares.<BR> 75 anybody cares.<BR>
85 <B>NOTE</B> : DV cameras can create two types of AVI format, one is the usual and 76
77 <P>There is a hack for AVI files that enhances them to contain Ogg Vorbis audio
78 stream, but makes them incompatible with standard AVI. <B>MPlayer</B>
79 supports playing these files, though seeking is currently unimplemented.</P>
80
81 <B>NOTE:</B> DV cameras can create two types of AVI formats. One is common and
86 playable, the other is neither.</P> 82 playable, the other is neither.</P>
87 83
88 <P>There are two kinds of AVI files: 84 <P>There are two kinds of AVI files:</P>
89 <UL> 85 <UL>
90 <LI><B>Interleaved</B> : audio and video content is interleaved. This is the 86 <LI><B>Interleaved:</B> Audio and video content is interleaved. This is the
91 standard usage. Recommended and mostly used. Some tools create interleaved 87 standard usage. Recommended and mostly used. Some tools create interleaved
92 AVIs with bad sync. <B>MPlayer</B> detects these as interleaved, and this 88 AVIs with bad sync. <B>MPlayer</B> detects these as interleaved, and this
93 climaxes in loss of A/V sync, probably at seeking. These files should be 89 climaxes in loss of A/V sync, probably at seeking. These files should be
94 played as non-interleaved (with the <CODE>-ni</CODE> option).</LI> 90 played as non-interleaved (with the <CODE>-ni</CODE> option).</LI>
95 <LI><B>Non-interleaved</B> : bad. First come the whole video stream, then the whole 91 <LI><B>Non-interleaved:</B> First comes the whole video stream, then the whole
96 audio stream, thus needs a lot of seeking. It's very bad when playing from 92 audio stream. It thus needs a lot of seeking, making playing from network or
97 network or CDROM.</LI> 93 CD-Rom difficult.</LI>
98 </UL> 94 </UL>
99 </P> 95
100 96 <P><B>MPlayer</B> supports two kinds of timings for AVI files:</P>
101 <P>MPlayer supports 2 kind of timing for AVI files:
102 <UL> 97 <UL>
103 <LI><B>bps-based</B> : it is based on bitrate/samplerate of video/audio stream. This 98 <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 avifile and windows media player. 99 method is used by most players, including <A HREF="http://avifile.sourceforge.net">avifile</A>
100 and windows media player.
105 Files with broken headers, and files created with VBR audio but not 101 Files with broken headers, and files created with VBR audio but not
106 VBR-compliant encoder will result in A/V desync with this method (mostly at 102 VBR-compliant encoder will result in A/V desync with this method (mostly at
107 seeking).</LI> 103 seeking).</LI>
108 <LI><B>interleaving-based</B> : it doesn't use bitrate value of the header, instead 104 <LI><B>interleaving-based</B>: It does not use the bitrate value of the header, instead
109 it uses the relative position of interleaved audio and video chunks. Makes 105 it uses the relative position of interleaved audio and video chunks, making
110 some badly encoded file with VBR audio playable.</LI> 106 badly encoded files with VBR audio playable.</LI>
111 </UL> 107 </UL>
112 </P> 108
113 109 <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 isn't well 110 supported by most players. The file format makes it possible to use VBR
115 supported by most of the 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 111 audio, but most players expect CBR audio, thus they fail with VBR. VBR is
117 unusual, and Microsoft's AVI specs only describe CBR audio. I also note, that 112 uncommon and Microsoft's AVI specs only describe CBR audio. I also noticed that
118 most AVI encoders/multiplexers create bad files if using VBR audio. Only 2 113 most AVI encoders/multiplexers create bad files when using VBR audio. There are only
119 exception (known by me): NaNDub and <A HREF="encoding.html">MEncoder</A>.</P> 114 two exceptions (known to me): NaNDub and <A HREF="encoding.html">MEncoder</A>.</P>
120 115
121 116
122 <P><B><A NAME=2.1.1.3>2.1.1.3. ASF/WMV files</A></B></P> 117 <P><B><A NAME=2.1.1.3>2.1.1.3. ASF/WMV files</A></B></P>
123 118
124 <P>ASF (active streaming format) comes from Microsoft. They developed two 119 <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 120 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 121 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's 122 and patented :). Of course they differ, there is no compatibility at all (it is
128 just another legal game). <B>MPlayer</B> supports only v1.0, as nobody has ever seen 123 just another legal game). <B>MPlayer</B> supports only v1.0, as nobody has ever seen
129 v2.0 files :) . Note, that .ASF files nowdays come with the extension .WMA or 124 v2.0 files :). Note that ASF files nowadays come with the extension .WMA or
130 .WMV.</P> 125 .WMV.</P>
131 126
132 127
133 <P><B><A NAME=2.1.1.4>2.1.1.4. QuickTime/MOV files</A></B></P> 128 <P><B><A NAME=2.1.1.4>2.1.1.4. QuickTime/MOV files</A></B></P>
134 129
135 <P>These are from Macintosh. Usually have extensions of .QT or .MOV . Note 130 <P>These formats were designed by Apple. They usually have a .QT or .MOV extension. Note
136 that since the MPEG4 Group chose QuickTime as the recommended file format 131 that since the MPEG4 group chose QuickTime as the recommended file format
137 for MPEG4, their .MOV files come with .MPG or .MP4 extension (interesting 132 for MPEG4, their MOV files come with a .MPG or .MP4 extension (Interestingly
138 that in these files the video stream is a real .MPG file. With the 133 the video and audio streams in these files are real MPG and AAC files. With the
139 <CODE>-dumpvideo</CODE> option you can even extract it.).</P> 134 <CODE>-dumpvideo</CODE> and <CODE>-dumpaudio</CODE> options you can even extract them!).</P>
140 135
141 <P><B>Codecs</B>: any codecs allowed, both CBR and VBR. Note: most new mov files use 136 <P><B>Codecs</B>: Any codec is allowed, both CBR and VBR. Note: most new QuickTime files use
142 <B>Sorenson</B> video and QDesign Music audio. These formats are completely 137 <B>Sorensen</B> video and QDesign Music audio. These formats have not been
143 secret, and only Apple's quicktime player is able to play these files (on 138 disclosed and will probably remain so in the future, making Apple's QuickTime
144 win/mac only).</P> 139 player the only player able to play these files (on Windows/Mac OS only).</P>
145 140
146 141
147 <P><B><A NAME=2.1.1.5>2.1.1.5. VIV files</A></B></P> 142 <P><B><A NAME=2.1.1.5>2.1.1.5. VIV files</A></B></P>
148 143
149 <P><B>MPlayer</B> happily demuxes VIVO file formats. The format's big 144 <P><B>MPlayer</B> happily demuxes VIVO file formats. The biggest disadvantage of
150 disadvantage is that it has no index block, nor fixed packetsize or sync bytes, 145 the format is that it has no index block, nor a fixed packet size or sync bytes
151 and most files lack even keyframes, so forget seeking!</P> 146 and most files lack even keyframes, so forget seeking!</P>
152 147
153 <P>VIVO/1.0 files' video codec is standard <B>h.263</B> . The VIVO/2.0 files' 148 <P>The video codec of VIVO/1.0 files is standard <B>h.263</B>. The video codec
154 video codec is a modified, nonstandard <B>h.263</B> . Audio is the same, 149 of VIVO/2.0 files is a modified, nonstandard <B>h.263v2</B>. The audio is the same,
155 it may be <B>g.723</B> (standard), or <B>Vivo Siren</B> .</P> 150 it may be <B>g.723</B> (standard), or <B>Vivo Siren</B>.</P>
156 151
157 <P>See the <A HREF=codecs.html#2.2.1.4>VIVO video codec</A> 152 <P>See the <A HREF="codecs.html#2.2.1.4">VIVO video codec</A>
158 and <A HREF=codecs.html#2.2.2.4>VIVO audio codec</A> sections for installation 153 and <A HREF="codecs.html#2.2.2.4">VIVO audio codec</A> sections for installation
159 instructions.</P> 154 instructions.</P>
160 155
161 156
162 <P><B><A NAME=2.1.1.6>2.1.1.6. FLI files</A></B></P> 157 <P><B><A NAME=2.1.1.6>2.1.1.6. FLI files</A></B></P>
163 158
164 <P><B>FLI</B> is a very old fileformat used by Autodesk Animator, but it's 159 <P><B>FLI</B> is a very old file format used by Autodesk Animator, but it is
165 a common fileformat for short animations on the Net. <B>MPlayer</B> demuxes 160 a common file format for short animations on the net. <B>MPlayer</B> demuxes
166 and decodes FLI movies and is even able to seek within them (useful when 161 and decodes FLI movies and is even able to seek within them (useful when
167 looping with the -loop option). FLI files don't have keyframes, so picture 162 looping with the <CODE>-loop</CODE> option). FLI files do not have keyframes, so the picture
168 will be messy for a short time after seeking.</P> 163 will be messy for a short time after seeking.</P>
169 164
170 165
171 <P><B><A NAME=2.1.1.7>2.1.1.7. RealMedia (RM) files</A></B></P> 166 <P><B><A NAME=2.1.1.7>2.1.1.7. RealMedia (RM) files</A></B></P>
172 167
173 <P>Yes, <B>MPlayer</B> can read (demux) RealMedia (.rm) files. Seeking 168 <P>Yes, <B>MPlayer</B> can read (demux) RealMedia (.rm) files. Seeking works
174 is under implementation, and RM has keyframes so it will be flawless. 169 (the format supports keyframes). Here are the lists of the supported
175 Here are the lists of the supported <A HREF="codecs.html#2.2.1.8">RealVideo</A> 170 <A HREF="codecs.html#2.2.1.8">RealVideo</A>
176 and <A HREF="codecs.html#2.2.2.5">RealAudio</A> codecs. 171 and <A HREF="codecs.html#2.2.2.5">RealAudio</A> codecs.
177 172
178 173
179 <P><B><A NAME=2.1.1.8>2.1.1.8. NuppelVideo files</A></B></P> 174 <P><B><A NAME=2.1.1.8>2.1.1.8. NuppelVideo files</A></B></P>
180 175
181 <P><A HREF="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</A> 176 <P><A HREF="http://mars.tuwien.ac.at/~roman/nuppelvideo">NuppelVideo</A>
182 is a TV grabber tool (AFAIK:). <B>MPlayer</B> can read its <CODE>.nuv</CODE> 177 is a TV grabber tool (AFAIK:). <B>MPlayer</B> can read its .NUV
183 files (only NuppelVideo 5.0). Those files can contain uncompressed YV12, 178 files (only NuppelVideo 5.0). Those files can contain uncompressed YV12,
184 YV12+RTJpeg compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed 179 YV12+RTJpeg compressed, YV12 RTJpeg+lzo compressed, and YV12+lzo compressed
185 frames, <B>MPlayer</B> decodes (and also <B>encodes</B> them with MEncoder to 180 frames. <B>MPlayer</B> decodes (and also <B>encodes</B> them with MEncoder to
186 DivX/etc!) them all. Seeking is under implementation.</P> 181 DivX/etc!) them all. Seeking works.</P>
187 182
188 183
189 <P><B><A NAME=2.1.1.9>2.1.1.9. yuv4mpeg files</A></B></P> 184 <P><B><A NAME=2.1.1.9>2.1.1.9. yuv4mpeg files</A></B></P>
190 185
191 <P><A HREF="http://mjpeg.sourceforge.net">yuv4mpeg / yuv4mpeg2</A> is 186 <P><A HREF="http://mjpeg.sourceforge.net">yuv4mpeg / yuv4mpeg2</A> is
192 also a fileformat for TV grabbing, or so :) I know only one thing about it: 187 a file format used by the <A HREF="http://mjpeg.sf.net">mjpegtools programs</A>.
193 we support it.</P> 188 You can grab, produce, filter or encode video in this format using these.
189 The file format is really a sequence of uncompressed YUV 4:2:0 images.
190 </P>
191
192
193 <P><B><A NAME=2.1.1.10>2.1.1.10. FILM files</A></B></P>
194
195 <P>This format is used on old Sega Saturn CD-Rom games.</P>
196
197
198 <P><B><A NAME=2.1.1.11>2.1.1.11. RoQ files</A></B></P>
199
200 <P>RoQ files are multimedia files used in some ID games such as Quake III and
201 Return to Castle Wolfenstein.</P>
202
203
204 <P><B><A NAME=2.1.1.12>2.1.1.12. OGG files</A></B></P>
205
206 <P>This is a new fileformat from Xiphophorus, developed to contain Vorbis
207 audio. You'll need <CODE>libogg</CODE> and <CODE>libvorbis</CODE> installed
208 before compiling <B>MPlayer</B> to be able to play it.</P>
194 209
195 210
196 <P><B><A NAME=2.1.2>2.1.2. Audio formats</A></B></P> 211 <P><B><A NAME=2.1.2>2.1.2. Audio formats</A></B></P>
197 212
198 <P>Currently <B>MPlayer</B> is still a <B>Movie</B> and not a <B>Media</B> 213 <P><B>MPlayer</B> is a <B>Movie</B> and not a <B>Media</B> player, although
199 player, thus the pure audio formats (for example MP3, WAV, audio ASF) are 214 it can play some audio file formats (they are listed in the sections below).
200 unplayable. Use <A HREF="http://www.xmms.org">xmms</A>, <A HREF="http://www.mpg123.de">mpg123</A> 215 This is not a recommended usage of <B>MPlayer</B>, you better use
201 or whatever.</P> 216 <A HREF="http://www.xmms.org">xmms</A>.</P>
217
218
219 <P><B><A NAME=2.1.2.1>2.1.2.1. MP3 files</A></B></P>
220
221 <P>You may have problems playing certain MP3 files that <B>MPlayer</B> will
222 misdetect as MPEGs and play incorrectly or not at all. This cannot be fixed
223 without dropping support for certain broken MPEG files and thus will remain
224 like this for the foreseeable future. The <CODE>-demuxer</CODE> flag described
225 in the manpage may help you in these cases.</P>
226
227
228 <P><B><A NAME=2.1.2.2>2.1.2.2. WAV files</A></B></P>
229
230
231 <P><B><A NAME=2.1.2.3>2.1.2.3. OGG files (Vorbis)</A></B></P>
232
233 <P>Requires properly installed <CODE>libogg</CODE> and
234 <CODE>libvorbis</CODE>.</P>
235
236
237 <P><B><A NAME=2.1.2.4>2.1.2.4. WMA/ASF files</A></B></P>
238
239
240 <P><B><A NAME=2.1.2.5>2.1.2.5. MP4 files</A></B></P>
202 241
203 </BODY> 242 </BODY>
204 </HTML> 243 </HTML>