1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
|
---|
2 | <html>
|
---|
3 | <!-- Created on June, 30 2006 by texi2html 1.76 -->
|
---|
4 | <!--
|
---|
5 | Written by: Lionel Cons <[email protected]> (original author)
|
---|
6 | Karl Berry <[email protected]>
|
---|
7 | Olaf Bachmann <[email protected]>
|
---|
8 | and many others.
|
---|
9 | Maintained by: Many creative people <[email protected]>
|
---|
10 | Send bugs and suggestions to <[email protected]>
|
---|
11 |
|
---|
12 | -->
|
---|
13 | <head>
|
---|
14 | <title>FFmpeg Documentation: 1. Introduction</title>
|
---|
15 |
|
---|
16 | <meta name="description" content="FFmpeg Documentation: 1. Introduction">
|
---|
17 | <meta name="keywords" content="FFmpeg Documentation: 1. Introduction">
|
---|
18 | <meta name="resource-type" content="document">
|
---|
19 | <meta name="distribution" content="global">
|
---|
20 | <meta name="Generator" content="texi2html 1.76">
|
---|
21 | <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
---|
22 | <style type="text/css">
|
---|
23 | <!--
|
---|
24 | a.summary-letter {text-decoration: none}
|
---|
25 | pre.display {font-family: serif}
|
---|
26 | pre.format {font-family: serif}
|
---|
27 | pre.menu-comment {font-family: serif}
|
---|
28 | pre.menu-preformatted {font-family: serif}
|
---|
29 | pre.smalldisplay {font-family: serif; font-size: smaller}
|
---|
30 | pre.smallexample {font-size: smaller}
|
---|
31 | pre.smallformat {font-family: serif; font-size: smaller}
|
---|
32 | pre.smalllisp {font-size: smaller}
|
---|
33 | span.sansserif {font-family:sans-serif; font-weight:normal;}
|
---|
34 | ul.toc {list-style: none}
|
---|
35 | -->
|
---|
36 | </style>
|
---|
37 |
|
---|
38 |
|
---|
39 | </head>
|
---|
40 |
|
---|
41 | <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
|
---|
42 |
|
---|
43 | <a name="SEC1"></a>
|
---|
44 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
45 | <tr><td valign="middle" align="left">[ < ]</td>
|
---|
46 | <td valign="middle" align="left">[<a href="#SEC2" title="Next section in reading order"> > </a>]</td>
|
---|
47 | <td valign="middle" align="left"> </td>
|
---|
48 | <td valign="middle" align="left">[ << ]</td>
|
---|
49 | <td valign="middle" align="left">[ Up ]</td>
|
---|
50 | <td valign="middle" align="left">[<a href="#SEC2" title="Next chapter"> >> </a>]</td>
|
---|
51 | <td valign="middle" align="left"> </td>
|
---|
52 | <td valign="middle" align="left"> </td>
|
---|
53 | <td valign="middle" align="left"> </td>
|
---|
54 | <td valign="middle" align="left"> </td>
|
---|
55 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
56 | <td valign="middle" align="left">[Contents]</td>
|
---|
57 | <td valign="middle" align="left">[Index]</td>
|
---|
58 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
59 | </tr></table>
|
---|
60 | <h1 class="chapter"> 1. Introduction </h1>
|
---|
61 |
|
---|
62 | <p>FFmpeg is a very fast video and audio converter. It can also grab from
|
---|
63 | a live audio/video source.
|
---|
64 | </p>
|
---|
65 | <p>The command line interface is designed to be intuitive, in the sense
|
---|
66 | that FFmpeg tries to figure out all parameters that can possibly be
|
---|
67 | derived automatically. You usually only have to specify the target
|
---|
68 | bitrate you want.
|
---|
69 | </p>
|
---|
70 | <p>FFmpeg can also convert from any sample rate to any other, and resize
|
---|
71 | video on the fly with a high quality polyphase filter.
|
---|
72 | </p>
|
---|
73 | <hr size="6">
|
---|
74 | <a name="SEC2"></a>
|
---|
75 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
76 | <tr><td valign="middle" align="left">[<a href="#SEC1" title="Previous section in reading order"> < </a>]</td>
|
---|
77 | <td valign="middle" align="left">[<a href="#SEC3" title="Next section in reading order"> > </a>]</td>
|
---|
78 | <td valign="middle" align="left"> </td>
|
---|
79 | <td valign="middle" align="left">[<a href="#SEC1" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
80 | <td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
|
---|
81 | <td valign="middle" align="left">[<a href="#SEC5" title="Next chapter"> >> </a>]</td>
|
---|
82 | <td valign="middle" align="left"> </td>
|
---|
83 | <td valign="middle" align="left"> </td>
|
---|
84 | <td valign="middle" align="left"> </td>
|
---|
85 | <td valign="middle" align="left"> </td>
|
---|
86 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
87 | <td valign="middle" align="left">[Contents]</td>
|
---|
88 | <td valign="middle" align="left">[Index]</td>
|
---|
89 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
90 | </tr></table>
|
---|
91 | <h1 class="chapter"> 2. Quick Start </h1>
|
---|
92 |
|
---|
93 | <hr size="6">
|
---|
94 | <a name="SEC3"></a>
|
---|
95 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
96 | <tr><td valign="middle" align="left">[<a href="#SEC2" title="Previous section in reading order"> < </a>]</td>
|
---|
97 | <td valign="middle" align="left">[<a href="#SEC4" title="Next section in reading order"> > </a>]</td>
|
---|
98 | <td valign="middle" align="left"> </td>
|
---|
99 | <td valign="middle" align="left">[<a href="#SEC2" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
100 | <td valign="middle" align="left">[<a href="#SEC2" title="Up section"> Up </a>]</td>
|
---|
101 | <td valign="middle" align="left">[<a href="#SEC5" title="Next chapter"> >> </a>]</td>
|
---|
102 | <td valign="middle" align="left"> </td>
|
---|
103 | <td valign="middle" align="left"> </td>
|
---|
104 | <td valign="middle" align="left"> </td>
|
---|
105 | <td valign="middle" align="left"> </td>
|
---|
106 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
107 | <td valign="middle" align="left">[Contents]</td>
|
---|
108 | <td valign="middle" align="left">[Index]</td>
|
---|
109 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
110 | </tr></table>
|
---|
111 | <h2 class="section"> 2.1 Video and Audio grabbing </h2>
|
---|
112 |
|
---|
113 | <p>FFmpeg can use a video4linux compatible video source and any Open Sound
|
---|
114 | System audio source:
|
---|
115 | </p>
|
---|
116 | <table><tr><td> </td><td><pre class="example">ffmpeg /tmp/out.mpg
|
---|
117 | </pre></td></tr></table>
|
---|
118 | <p>Note that you must activate the right video source and channel before
|
---|
119 | launching FFmpeg with any TV viewer such as xawtv
|
---|
120 | (<a href="http://bytesex.org/xawtv/">http://bytesex.org/xawtv/</a>) by Gerd Knorr. You also
|
---|
121 | have to set the audio recording levels correctly with a
|
---|
122 | standard mixer.
|
---|
123 | </p>
|
---|
124 | <hr size="6">
|
---|
125 | <a name="SEC4"></a>
|
---|
126 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
127 | <tr><td valign="middle" align="left">[<a href="#SEC3" title="Previous section in reading order"> < </a>]</td>
|
---|
128 | <td valign="middle" align="left">[<a href="#SEC5" title="Next section in reading order"> > </a>]</td>
|
---|
129 | <td valign="middle" align="left"> </td>
|
---|
130 | <td valign="middle" align="left">[<a href="#SEC2" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
131 | <td valign="middle" align="left">[<a href="#SEC2" title="Up section"> Up </a>]</td>
|
---|
132 | <td valign="middle" align="left">[<a href="#SEC5" title="Next chapter"> >> </a>]</td>
|
---|
133 | <td valign="middle" align="left"> </td>
|
---|
134 | <td valign="middle" align="left"> </td>
|
---|
135 | <td valign="middle" align="left"> </td>
|
---|
136 | <td valign="middle" align="left"> </td>
|
---|
137 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
138 | <td valign="middle" align="left">[Contents]</td>
|
---|
139 | <td valign="middle" align="left">[Index]</td>
|
---|
140 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
141 | </tr></table>
|
---|
142 | <h2 class="section"> 2.2 Video and Audio file format conversion </h2>
|
---|
143 |
|
---|
144 | <p>* FFmpeg can use any supported file format and protocol as input:
|
---|
145 | </p>
|
---|
146 | <p>Examples:
|
---|
147 | </p>
|
---|
148 | <p>* You can use YUV files as input:
|
---|
149 | </p>
|
---|
150 | <table><tr><td> </td><td><pre class="example">ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
|
---|
151 | </pre></td></tr></table>
|
---|
152 | <p>It will use the files:
|
---|
153 | </p><table><tr><td> </td><td><pre class="example">/tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
|
---|
154 | /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
|
---|
155 | </pre></td></tr></table>
|
---|
156 | <p>The Y files use twice the resolution of the U and V files. They are
|
---|
157 | raw files, without header. They can be generated by all decent video
|
---|
158 | decoders. You must specify the size of the image with the <samp>`-s'</samp> option
|
---|
159 | if FFmpeg cannot guess it.
|
---|
160 | </p>
|
---|
161 | <p>* You can input from a raw YUV420P file:
|
---|
162 | </p>
|
---|
163 | <table><tr><td> </td><td><pre class="example">ffmpeg -i /tmp/test.yuv /tmp/out.avi
|
---|
164 | </pre></td></tr></table>
|
---|
165 | <p>test.yuv is a file containing raw YUV planar data. Each frame is composed
|
---|
166 | of the Y plane followed by the U and V planes at half vertical and
|
---|
167 | horizontal resolution.
|
---|
168 | </p>
|
---|
169 | <p>* You can output to a raw YUV420P file:
|
---|
170 | </p>
|
---|
171 | <table><tr><td> </td><td><pre class="example">ffmpeg -i mydivx.avi hugefile.yuv
|
---|
172 | </pre></td></tr></table>
|
---|
173 | <p>* You can set several input files and output files:
|
---|
174 | </p>
|
---|
175 | <table><tr><td> </td><td><pre class="example">ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
|
---|
176 | </pre></td></tr></table>
|
---|
177 | <p>Converts the audio file a.wav and the raw YUV video file a.yuv
|
---|
178 | to MPEG file a.mpg.
|
---|
179 | </p>
|
---|
180 | <p>* You can also do audio and video conversions at the same time:
|
---|
181 | </p>
|
---|
182 | <table><tr><td> </td><td><pre class="example">ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
|
---|
183 | </pre></td></tr></table>
|
---|
184 | <p>Converts a.wav to MPEG audio at 22050Hz sample rate.
|
---|
185 | </p>
|
---|
186 | <p>* You can encode to several formats at the same time and define a
|
---|
187 | mapping from input stream to output streams:
|
---|
188 | </p>
|
---|
189 | <table><tr><td> </td><td><pre class="example">ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0
|
---|
190 | </pre></td></tr></table>
|
---|
191 | <p>Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-map
|
---|
192 | file:index' specifies which input stream is used for each output
|
---|
193 | stream, in the order of the definition of output streams.
|
---|
194 | </p>
|
---|
195 | <p>* You can transcode decrypted VOBs
|
---|
196 | </p>
|
---|
197 | <table><tr><td> </td><td><pre class="example">ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
|
---|
198 | </pre></td></tr></table>
|
---|
199 | <p>This is a typical DVD ripping example; the input is a VOB file, the
|
---|
200 | output an AVI file with MPEG-4 video and MP3 audio. Note that in this
|
---|
201 | command we use B-frames so the MPEG-4 stream is DivX5 compatible, and
|
---|
202 | GOP size is 300 which means one intra frame every 10 seconds for 29.97fps
|
---|
203 | input video. Furthermore, the audio stream is MP3-encoded so you need
|
---|
204 | to enable LAME support by passing <code>--enable-mp3lame</code> to configure.
|
---|
205 | The mapping is particularly useful for DVD transcoding
|
---|
206 | to get the desired audio language.
|
---|
207 | </p>
|
---|
208 | <p>NOTE: To see the supported input formats, use <code>ffmpeg -formats</code>.
|
---|
209 | </p>
|
---|
210 | <hr size="6">
|
---|
211 | <a name="SEC5"></a>
|
---|
212 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
213 | <tr><td valign="middle" align="left">[<a href="#SEC4" title="Previous section in reading order"> < </a>]</td>
|
---|
214 | <td valign="middle" align="left">[<a href="#SEC6" title="Next section in reading order"> > </a>]</td>
|
---|
215 | <td valign="middle" align="left"> </td>
|
---|
216 | <td valign="middle" align="left">[<a href="#SEC2" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
217 | <td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
|
---|
218 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
219 | <td valign="middle" align="left"> </td>
|
---|
220 | <td valign="middle" align="left"> </td>
|
---|
221 | <td valign="middle" align="left"> </td>
|
---|
222 | <td valign="middle" align="left"> </td>
|
---|
223 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
224 | <td valign="middle" align="left">[Contents]</td>
|
---|
225 | <td valign="middle" align="left">[Index]</td>
|
---|
226 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
227 | </tr></table>
|
---|
228 | <h1 class="chapter"> 3. Invocation </h1>
|
---|
229 |
|
---|
230 | <hr size="6">
|
---|
231 | <a name="SEC6"></a>
|
---|
232 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
233 | <tr><td valign="middle" align="left">[<a href="#SEC5" title="Previous section in reading order"> < </a>]</td>
|
---|
234 | <td valign="middle" align="left">[<a href="#SEC7" title="Next section in reading order"> > </a>]</td>
|
---|
235 | <td valign="middle" align="left"> </td>
|
---|
236 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
237 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
238 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
239 | <td valign="middle" align="left"> </td>
|
---|
240 | <td valign="middle" align="left"> </td>
|
---|
241 | <td valign="middle" align="left"> </td>
|
---|
242 | <td valign="middle" align="left"> </td>
|
---|
243 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
244 | <td valign="middle" align="left">[Contents]</td>
|
---|
245 | <td valign="middle" align="left">[Index]</td>
|
---|
246 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
247 | </tr></table>
|
---|
248 | <h2 class="section"> 3.1 Syntax </h2>
|
---|
249 |
|
---|
250 | <p>The generic syntax is:
|
---|
251 | </p>
|
---|
252 | <table><tr><td> </td><td><pre class="example">ffmpeg [[infile options][<samp>`-i'</samp> <var>infile</var>]]... {[outfile options] <var>outfile</var>}...
|
---|
253 | </pre></td></tr></table><p>If no input file is given, audio/video grabbing is done.
|
---|
254 | </p>
|
---|
255 | <p>As a general rule, options are applied to the next specified
|
---|
256 | file. For example, if you give the <samp>`-b 64'</samp> option, it sets the video
|
---|
257 | bitrate of the next file. The format option may be needed for raw input
|
---|
258 | files.
|
---|
259 | </p>
|
---|
260 | <p>By default, FFmpeg tries to convert as losslessly as possible: It
|
---|
261 | uses the same audio and video parameters for the outputs as the one
|
---|
262 | specified for the inputs.
|
---|
263 | </p>
|
---|
264 | <hr size="6">
|
---|
265 | <a name="SEC7"></a>
|
---|
266 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
267 | <tr><td valign="middle" align="left">[<a href="#SEC6" title="Previous section in reading order"> < </a>]</td>
|
---|
268 | <td valign="middle" align="left">[<a href="#SEC8" title="Next section in reading order"> > </a>]</td>
|
---|
269 | <td valign="middle" align="left"> </td>
|
---|
270 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
271 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
272 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
273 | <td valign="middle" align="left"> </td>
|
---|
274 | <td valign="middle" align="left"> </td>
|
---|
275 | <td valign="middle" align="left"> </td>
|
---|
276 | <td valign="middle" align="left"> </td>
|
---|
277 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
278 | <td valign="middle" align="left">[Contents]</td>
|
---|
279 | <td valign="middle" align="left">[Index]</td>
|
---|
280 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
281 | </tr></table>
|
---|
282 | <h2 class="section"> 3.2 Main options </h2>
|
---|
283 |
|
---|
284 | <dl compact="compact">
|
---|
285 | <dt> <samp>`-L'</samp></dt>
|
---|
286 | <dd><p>Show license.
|
---|
287 | </p>
|
---|
288 | </dd>
|
---|
289 | <dt> <samp>`-h'</samp></dt>
|
---|
290 | <dd><p>Show help.
|
---|
291 | </p>
|
---|
292 | </dd>
|
---|
293 | <dt> <samp>`-formats'</samp></dt>
|
---|
294 | <dd><p>Show available formats, codecs, protocols, ...
|
---|
295 | </p>
|
---|
296 | </dd>
|
---|
297 | <dt> <samp>`-f fmt'</samp></dt>
|
---|
298 | <dd><p>Force format.
|
---|
299 | </p>
|
---|
300 | </dd>
|
---|
301 | <dt> <samp>`-i filename'</samp></dt>
|
---|
302 | <dd><p>input filename
|
---|
303 | </p>
|
---|
304 | </dd>
|
---|
305 | <dt> <samp>`-y'</samp></dt>
|
---|
306 | <dd><p>Overwrite output files.
|
---|
307 | </p>
|
---|
308 | </dd>
|
---|
309 | <dt> <samp>`-t duration'</samp></dt>
|
---|
310 | <dd><p>Set the recording time in seconds.
|
---|
311 | <code>hh:mm:ss[.xxx]</code> syntax is also supported.
|
---|
312 | </p>
|
---|
313 | </dd>
|
---|
314 | <dt> <samp>`-ss position'</samp></dt>
|
---|
315 | <dd><p>Seek to given time position in seconds.
|
---|
316 | <code>hh:mm:ss[.xxx]</code> syntax is also supported.
|
---|
317 | </p>
|
---|
318 | </dd>
|
---|
319 | <dt> <samp>`-title string'</samp></dt>
|
---|
320 | <dd><p>Set the title.
|
---|
321 | </p>
|
---|
322 | </dd>
|
---|
323 | <dt> <samp>`-author string'</samp></dt>
|
---|
324 | <dd><p>Set the author.
|
---|
325 | </p>
|
---|
326 | </dd>
|
---|
327 | <dt> <samp>`-copyright string'</samp></dt>
|
---|
328 | <dd><p>Set the copyright.
|
---|
329 | </p>
|
---|
330 | </dd>
|
---|
331 | <dt> <samp>`-comment string'</samp></dt>
|
---|
332 | <dd><p>Set the comment.
|
---|
333 | </p>
|
---|
334 | </dd>
|
---|
335 | <dt> <samp>`-target type'</samp></dt>
|
---|
336 | <dd><p>Specify target file type ("vcd", "svcd", "dvd", "dv", "pal-vcd",
|
---|
337 | "ntsc-svcd", ... ). All the format options (bitrate, codecs,
|
---|
338 | buffer sizes) are then set automatically. You can just type:
|
---|
339 | </p>
|
---|
340 | <table><tr><td> </td><td><pre class="example">ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
|
---|
341 | </pre></td></tr></table>
|
---|
342 | <p>Nevertheless you can specify additional options as long as you know
|
---|
343 | they do not conflict with the standard, as in:
|
---|
344 | </p>
|
---|
345 | <table><tr><td> </td><td><pre class="example">ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
|
---|
346 | </pre></td></tr></table>
|
---|
347 | </dd>
|
---|
348 | <dt> <samp>`-hq'</samp></dt>
|
---|
349 | <dd><p>Activate high quality settings.
|
---|
350 | </p>
|
---|
351 | </dd>
|
---|
352 | <dt> <samp>`-itsoffset offset'</samp></dt>
|
---|
353 | <dd><p>Set the input time offset in seconds.
|
---|
354 | <code>[-]hh:mm:ss[.xxx]</code> syntax is also supported.
|
---|
355 | This option affects all the input files that follow it.
|
---|
356 | The offset is added to the timestamps of the input files.
|
---|
357 | Specifying a positive offset means that the corresponding
|
---|
358 | streams are delayed by 'offset' seconds.
|
---|
359 | </p>
|
---|
360 | </dd>
|
---|
361 | </dl>
|
---|
362 |
|
---|
363 | <hr size="6">
|
---|
364 | <a name="SEC8"></a>
|
---|
365 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
366 | <tr><td valign="middle" align="left">[<a href="#SEC7" title="Previous section in reading order"> < </a>]</td>
|
---|
367 | <td valign="middle" align="left">[<a href="#SEC9" title="Next section in reading order"> > </a>]</td>
|
---|
368 | <td valign="middle" align="left"> </td>
|
---|
369 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
370 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
371 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
372 | <td valign="middle" align="left"> </td>
|
---|
373 | <td valign="middle" align="left"> </td>
|
---|
374 | <td valign="middle" align="left"> </td>
|
---|
375 | <td valign="middle" align="left"> </td>
|
---|
376 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
377 | <td valign="middle" align="left">[Contents]</td>
|
---|
378 | <td valign="middle" align="left">[Index]</td>
|
---|
379 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
380 | </tr></table>
|
---|
381 | <h2 class="section"> 3.3 Video Options </h2>
|
---|
382 |
|
---|
383 | <dl compact="compact">
|
---|
384 | <dt> <samp>`-b bitrate'</samp></dt>
|
---|
385 | <dd><p>Set the video bitrate in kbit/s (default = 200 kb/s).
|
---|
386 | </p></dd>
|
---|
387 | <dt> <samp>`-r fps'</samp></dt>
|
---|
388 | <dd><p>Set frame rate (default = 25).
|
---|
389 | </p></dd>
|
---|
390 | <dt> <samp>`-s size'</samp></dt>
|
---|
391 | <dd><p>Set frame size. The format is <samp>`wxh'</samp> (default = 160x128).
|
---|
392 | The following abbreviations are recognized:
|
---|
393 | </p><dl compact="compact">
|
---|
394 | <dt> <samp>`sqcif'</samp></dt>
|
---|
395 | <dd><p>128x96
|
---|
396 | </p></dd>
|
---|
397 | <dt> <samp>`qcif'</samp></dt>
|
---|
398 | <dd><p>176x144
|
---|
399 | </p></dd>
|
---|
400 | <dt> <samp>`cif'</samp></dt>
|
---|
401 | <dd><p>352x288
|
---|
402 | </p></dd>
|
---|
403 | <dt> <samp>`4cif'</samp></dt>
|
---|
404 | <dd><p>704x576
|
---|
405 | </p></dd>
|
---|
406 | </dl>
|
---|
407 |
|
---|
408 | </dd>
|
---|
409 | <dt> <samp>`-aspect aspect'</samp></dt>
|
---|
410 | <dd><p>Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).
|
---|
411 | </p></dd>
|
---|
412 | <dt> <samp>`-croptop size'</samp></dt>
|
---|
413 | <dd><p>Set top crop band size (in pixels).
|
---|
414 | </p></dd>
|
---|
415 | <dt> <samp>`-cropbottom size'</samp></dt>
|
---|
416 | <dd><p>Set bottom crop band size (in pixels).
|
---|
417 | </p></dd>
|
---|
418 | <dt> <samp>`-cropleft size'</samp></dt>
|
---|
419 | <dd><p>Set left crop band size (in pixels).
|
---|
420 | </p></dd>
|
---|
421 | <dt> <samp>`-cropright size'</samp></dt>
|
---|
422 | <dd><p>Set right crop band size (in pixels).
|
---|
423 | </p></dd>
|
---|
424 | <dt> <samp>`-padtop size'</samp></dt>
|
---|
425 | <dd><p>Set top pad band size (in pixels).
|
---|
426 | </p></dd>
|
---|
427 | <dt> <samp>`-padbottom size'</samp></dt>
|
---|
428 | <dd><p>Set bottom pad band size (in pixels).
|
---|
429 | </p></dd>
|
---|
430 | <dt> <samp>`-padleft size'</samp></dt>
|
---|
431 | <dd><p>Set left pad band size (in pixels).
|
---|
432 | </p></dd>
|
---|
433 | <dt> <samp>`-padright size'</samp></dt>
|
---|
434 | <dd><p>Set right pad band size (in pixels).
|
---|
435 | </p></dd>
|
---|
436 | <dt> <samp>`-padcolor (hex color)'</samp></dt>
|
---|
437 | <dd><p>Set color of padded bands. The value for padcolor is expressed
|
---|
438 | as a six digit hexadecimal number where the first two digits
|
---|
439 | represent red, the middle two digits green and last two digits
|
---|
440 | blue (default = 000000 (black)).
|
---|
441 | </p></dd>
|
---|
442 | <dt> <samp>`-vn'</samp></dt>
|
---|
443 | <dd><p>Disable video recording.
|
---|
444 | </p></dd>
|
---|
445 | <dt> <samp>`-bt tolerance'</samp></dt>
|
---|
446 | <dd><p>Set video bitrate tolerance (in kbit/s).
|
---|
447 | </p></dd>
|
---|
448 | <dt> <samp>`-maxrate bitrate'</samp></dt>
|
---|
449 | <dd><p>Set max video bitrate tolerance (in kbit/s).
|
---|
450 | </p></dd>
|
---|
451 | <dt> <samp>`-minrate bitrate'</samp></dt>
|
---|
452 | <dd><p>Set min video bitrate tolerance (in kbit/s).
|
---|
453 | </p></dd>
|
---|
454 | <dt> <samp>`-bufsize size'</samp></dt>
|
---|
455 | <dd><p>Set rate control buffer size (in kbit).
|
---|
456 | </p></dd>
|
---|
457 | <dt> <samp>`-vcodec codec'</samp></dt>
|
---|
458 | <dd><p>Force video codec to <var>codec</var>. Use the <code>copy</code> special value to
|
---|
459 | tell that the raw codec data must be copied as is.
|
---|
460 | </p></dd>
|
---|
461 | <dt> <samp>`-sameq'</samp></dt>
|
---|
462 | <dd><p>Use same video quality as source (implies VBR).
|
---|
463 | </p>
|
---|
464 | </dd>
|
---|
465 | <dt> <samp>`-pass n'</samp></dt>
|
---|
466 | <dd><p>Select the pass number (1 or 2). It is useful to do two pass
|
---|
467 | encoding. The statistics of the video are recorded in the first
|
---|
468 | pass and the video is generated at the exact requested bitrate
|
---|
469 | in the second pass.
|
---|
470 | </p>
|
---|
471 | </dd>
|
---|
472 | <dt> <samp>`-passlogfile file'</samp></dt>
|
---|
473 | <dd><p>Set two pass logfile name to <var>file</var>.
|
---|
474 | </p>
|
---|
475 | </dd>
|
---|
476 | </dl>
|
---|
477 |
|
---|
478 | <hr size="6">
|
---|
479 | <a name="SEC9"></a>
|
---|
480 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
481 | <tr><td valign="middle" align="left">[<a href="#SEC8" title="Previous section in reading order"> < </a>]</td>
|
---|
482 | <td valign="middle" align="left">[<a href="#SEC10" title="Next section in reading order"> > </a>]</td>
|
---|
483 | <td valign="middle" align="left"> </td>
|
---|
484 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
485 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
486 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
487 | <td valign="middle" align="left"> </td>
|
---|
488 | <td valign="middle" align="left"> </td>
|
---|
489 | <td valign="middle" align="left"> </td>
|
---|
490 | <td valign="middle" align="left"> </td>
|
---|
491 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
492 | <td valign="middle" align="left">[Contents]</td>
|
---|
493 | <td valign="middle" align="left">[Index]</td>
|
---|
494 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
495 | </tr></table>
|
---|
496 | <h2 class="section"> 3.4 Advanced Video Options </h2>
|
---|
497 |
|
---|
498 | <dl compact="compact">
|
---|
499 | <dt> <samp>`-g gop_size'</samp></dt>
|
---|
500 | <dd><p>Set the group of pictures size.
|
---|
501 | </p></dd>
|
---|
502 | <dt> <samp>`-intra'</samp></dt>
|
---|
503 | <dd><p>Use only intra frames.
|
---|
504 | </p></dd>
|
---|
505 | <dt> <samp>`-qscale q'</samp></dt>
|
---|
506 | <dd><p>Use fixed video quantiser scale (VBR).
|
---|
507 | </p></dd>
|
---|
508 | <dt> <samp>`-qmin q'</samp></dt>
|
---|
509 | <dd><p>minimum video quantiser scale (VBR)
|
---|
510 | </p></dd>
|
---|
511 | <dt> <samp>`-qmax q'</samp></dt>
|
---|
512 | <dd><p>maximum video quantiser scale (VBR)
|
---|
513 | </p></dd>
|
---|
514 | <dt> <samp>`-qdiff q'</samp></dt>
|
---|
515 | <dd><p>maximum difference between the quantiser scales (VBR)
|
---|
516 | </p></dd>
|
---|
517 | <dt> <samp>`-qblur blur'</samp></dt>
|
---|
518 | <dd><p>video quantiser scale blur (VBR)
|
---|
519 | </p></dd>
|
---|
520 | <dt> <samp>`-qcomp compression'</samp></dt>
|
---|
521 | <dd><p>video quantiser scale compression (VBR)
|
---|
522 | </p>
|
---|
523 | </dd>
|
---|
524 | <dt> <samp>`-rc_init_cplx complexity'</samp></dt>
|
---|
525 | <dd><p>initial complexity for single pass encoding
|
---|
526 | </p></dd>
|
---|
527 | <dt> <samp>`-b_qfactor factor'</samp></dt>
|
---|
528 | <dd><p>qp factor between P- and B-frames
|
---|
529 | </p></dd>
|
---|
530 | <dt> <samp>`-i_qfactor factor'</samp></dt>
|
---|
531 | <dd><p>qp factor between P- and I-frames
|
---|
532 | </p></dd>
|
---|
533 | <dt> <samp>`-b_qoffset offset'</samp></dt>
|
---|
534 | <dd><p>qp offset between P- and B-frames
|
---|
535 | </p></dd>
|
---|
536 | <dt> <samp>`-i_qoffset offset'</samp></dt>
|
---|
537 | <dd><p>qp offset between P- and I-frames
|
---|
538 | </p></dd>
|
---|
539 | <dt> <samp>`-rc_eq equation'</samp></dt>
|
---|
540 | <dd><p>Set rate control equation (see section <a href="#SEC13">FFmpeg formula evaluator</a>) (default = <code>tex^qComp</code>).
|
---|
541 | </p></dd>
|
---|
542 | <dt> <samp>`-rc_override override'</samp></dt>
|
---|
543 | <dd><p>rate control override for specific intervals
|
---|
544 | </p></dd>
|
---|
545 | <dt> <samp>`-me method'</samp></dt>
|
---|
546 | <dd><p>Set motion estimation method to <var>method</var>.
|
---|
547 | Available methods are (from lowest to best quality):
|
---|
548 | </p><dl compact="compact">
|
---|
549 | <dt> <samp>`zero'</samp></dt>
|
---|
550 | <dd><p>Try just the (0, 0) vector.
|
---|
551 | </p></dd>
|
---|
552 | <dt> <samp>`phods'</samp></dt>
|
---|
553 | <dt> <samp>`log'</samp></dt>
|
---|
554 | <dt> <samp>`x1'</samp></dt>
|
---|
555 | <dt> <samp>`epzs'</samp></dt>
|
---|
556 | <dd><p>(default method)
|
---|
557 | </p></dd>
|
---|
558 | <dt> <samp>`full'</samp></dt>
|
---|
559 | <dd><p>exhaustive search (slow and marginally better than epzs)
|
---|
560 | </p></dd>
|
---|
561 | </dl>
|
---|
562 |
|
---|
563 | </dd>
|
---|
564 | <dt> <samp>`-dct_algo algo'</samp></dt>
|
---|
565 | <dd><p>Set DCT algorithm to <var>algo</var>. Available values are:
|
---|
566 | </p><dl compact="compact">
|
---|
567 | <dt> <samp>`0'</samp></dt>
|
---|
568 | <dd><p>FF_DCT_AUTO (default)
|
---|
569 | </p></dd>
|
---|
570 | <dt> <samp>`1'</samp></dt>
|
---|
571 | <dd><p>FF_DCT_FASTINT
|
---|
572 | </p></dd>
|
---|
573 | <dt> <samp>`2'</samp></dt>
|
---|
574 | <dd><p>FF_DCT_INT
|
---|
575 | </p></dd>
|
---|
576 | <dt> <samp>`3'</samp></dt>
|
---|
577 | <dd><p>FF_DCT_MMX
|
---|
578 | </p></dd>
|
---|
579 | <dt> <samp>`4'</samp></dt>
|
---|
580 | <dd><p>FF_DCT_MLIB
|
---|
581 | </p></dd>
|
---|
582 | <dt> <samp>`5'</samp></dt>
|
---|
583 | <dd><p>FF_DCT_ALTIVEC
|
---|
584 | </p></dd>
|
---|
585 | </dl>
|
---|
586 |
|
---|
587 | </dd>
|
---|
588 | <dt> <samp>`-idct_algo algo'</samp></dt>
|
---|
589 | <dd><p>Set IDCT algorithm to <var>algo</var>. Available values are:
|
---|
590 | </p><dl compact="compact">
|
---|
591 | <dt> <samp>`0'</samp></dt>
|
---|
592 | <dd><p>FF_IDCT_AUTO (default)
|
---|
593 | </p></dd>
|
---|
594 | <dt> <samp>`1'</samp></dt>
|
---|
595 | <dd><p>FF_IDCT_INT
|
---|
596 | </p></dd>
|
---|
597 | <dt> <samp>`2'</samp></dt>
|
---|
598 | <dd><p>FF_IDCT_SIMPLE
|
---|
599 | </p></dd>
|
---|
600 | <dt> <samp>`3'</samp></dt>
|
---|
601 | <dd><p>FF_IDCT_SIMPLEMMX
|
---|
602 | </p></dd>
|
---|
603 | <dt> <samp>`4'</samp></dt>
|
---|
604 | <dd><p>FF_IDCT_LIBMPEG2MMX
|
---|
605 | </p></dd>
|
---|
606 | <dt> <samp>`5'</samp></dt>
|
---|
607 | <dd><p>FF_IDCT_PS2
|
---|
608 | </p></dd>
|
---|
609 | <dt> <samp>`6'</samp></dt>
|
---|
610 | <dd><p>FF_IDCT_MLIB
|
---|
611 | </p></dd>
|
---|
612 | <dt> <samp>`7'</samp></dt>
|
---|
613 | <dd><p>FF_IDCT_ARM
|
---|
614 | </p></dd>
|
---|
615 | <dt> <samp>`8'</samp></dt>
|
---|
616 | <dd><p>FF_IDCT_ALTIVEC
|
---|
617 | </p></dd>
|
---|
618 | <dt> <samp>`9'</samp></dt>
|
---|
619 | <dd><p>FF_IDCT_SH4
|
---|
620 | </p></dd>
|
---|
621 | <dt> <samp>`10'</samp></dt>
|
---|
622 | <dd><p>FF_IDCT_SIMPLEARM
|
---|
623 | </p></dd>
|
---|
624 | </dl>
|
---|
625 |
|
---|
626 | </dd>
|
---|
627 | <dt> <samp>`-er n'</samp></dt>
|
---|
628 | <dd><p>Set error resilience to <var>n</var>.
|
---|
629 | </p><dl compact="compact">
|
---|
630 | <dt> <samp>`1'</samp></dt>
|
---|
631 | <dd><p>FF_ER_CAREFUL (default)
|
---|
632 | </p></dd>
|
---|
633 | <dt> <samp>`2'</samp></dt>
|
---|
634 | <dd><p>FF_ER_COMPLIANT
|
---|
635 | </p></dd>
|
---|
636 | <dt> <samp>`3'</samp></dt>
|
---|
637 | <dd><p>FF_ER_AGGRESSIVE
|
---|
638 | </p></dd>
|
---|
639 | <dt> <samp>`4'</samp></dt>
|
---|
640 | <dd><p>FF_ER_VERY_AGGRESSIVE
|
---|
641 | </p></dd>
|
---|
642 | </dl>
|
---|
643 |
|
---|
644 | </dd>
|
---|
645 | <dt> <samp>`-ec bit_mask'</samp></dt>
|
---|
646 | <dd><p>Set error concealment to <var>bit_mask</var>. <var>bit_mask</var> is a bit mask of
|
---|
647 | the following values:
|
---|
648 | </p><dl compact="compact">
|
---|
649 | <dt> <samp>`1'</samp></dt>
|
---|
650 | <dd><p>FF_EC_GUESS_MVS (default = enabled)
|
---|
651 | </p></dd>
|
---|
652 | <dt> <samp>`2'</samp></dt>
|
---|
653 | <dd><p>FF_EC_DEBLOCK (default = enabled)
|
---|
654 | </p></dd>
|
---|
655 | </dl>
|
---|
656 |
|
---|
657 | </dd>
|
---|
658 | <dt> <samp>`-bf frames'</samp></dt>
|
---|
659 | <dd><p>Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
|
---|
660 | </p></dd>
|
---|
661 | <dt> <samp>`-mbd mode'</samp></dt>
|
---|
662 | <dd><p>macroblock decision
|
---|
663 | </p><dl compact="compact">
|
---|
664 | <dt> <samp>`0'</samp></dt>
|
---|
665 | <dd><p>FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in FFmpeg).
|
---|
666 | </p></dd>
|
---|
667 | <dt> <samp>`1'</samp></dt>
|
---|
668 | <dd><p>FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.
|
---|
669 | </p></dd>
|
---|
670 | <dt> <samp>`2'</samp></dt>
|
---|
671 | <dd><p>FF_MB_DECISION_RD: rate distortion
|
---|
672 | </p></dd>
|
---|
673 | </dl>
|
---|
674 |
|
---|
675 | </dd>
|
---|
676 | <dt> <samp>`-4mv'</samp></dt>
|
---|
677 | <dd><p>Use four motion vector by macroblock (MPEG-4 only).
|
---|
678 | </p></dd>
|
---|
679 | <dt> <samp>`-part'</samp></dt>
|
---|
680 | <dd><p>Use data partitioning (MPEG-4 only).
|
---|
681 | </p></dd>
|
---|
682 | <dt> <samp>`-bug param'</samp></dt>
|
---|
683 | <dd><p>Work around encoder bugs that are not auto-detected.
|
---|
684 | </p></dd>
|
---|
685 | <dt> <samp>`-strict strictness'</samp></dt>
|
---|
686 | <dd><p>How strictly to follow the standards.
|
---|
687 | </p></dd>
|
---|
688 | <dt> <samp>`-aic'</samp></dt>
|
---|
689 | <dd><p>Enable Advanced intra coding (h263+).
|
---|
690 | </p></dd>
|
---|
691 | <dt> <samp>`-umv'</samp></dt>
|
---|
692 | <dd><p>Enable Unlimited Motion Vector (h263+)
|
---|
693 | </p>
|
---|
694 | </dd>
|
---|
695 | <dt> <samp>`-deinterlace'</samp></dt>
|
---|
696 | <dd><p>Deinterlace pictures.
|
---|
697 | </p></dd>
|
---|
698 | <dt> <samp>`-interlace'</samp></dt>
|
---|
699 | <dd><p>Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
|
---|
700 | Use this option if your input file is interlaced and you want
|
---|
701 | to keep the interlaced format for minimum losses.
|
---|
702 | The alternative is to deinterlace the input stream with
|
---|
703 | <samp>`-deinterlace'</samp>, but deinterlacing introduces losses.
|
---|
704 | </p></dd>
|
---|
705 | <dt> <samp>`-psnr'</samp></dt>
|
---|
706 | <dd><p>Calculate PSNR of compressed frames.
|
---|
707 | </p></dd>
|
---|
708 | <dt> <samp>`-vstats'</samp></dt>
|
---|
709 | <dd><p>Dump video coding statistics to <tt>`vstats_HHMMSS.log'</tt>.
|
---|
710 | </p></dd>
|
---|
711 | <dt> <samp>`-vhook module'</samp></dt>
|
---|
712 | <dd><p>Insert video processing <var>module</var>. <var>module</var> contains the module
|
---|
713 | name and its parameters separated by spaces.
|
---|
714 | </p></dd>
|
---|
715 | </dl>
|
---|
716 |
|
---|
717 | <hr size="6">
|
---|
718 | <a name="SEC10"></a>
|
---|
719 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
720 | <tr><td valign="middle" align="left">[<a href="#SEC9" title="Previous section in reading order"> < </a>]</td>
|
---|
721 | <td valign="middle" align="left">[<a href="#SEC11" title="Next section in reading order"> > </a>]</td>
|
---|
722 | <td valign="middle" align="left"> </td>
|
---|
723 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
724 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
725 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
726 | <td valign="middle" align="left"> </td>
|
---|
727 | <td valign="middle" align="left"> </td>
|
---|
728 | <td valign="middle" align="left"> </td>
|
---|
729 | <td valign="middle" align="left"> </td>
|
---|
730 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
731 | <td valign="middle" align="left">[Contents]</td>
|
---|
732 | <td valign="middle" align="left">[Index]</td>
|
---|
733 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
734 | </tr></table>
|
---|
735 | <h2 class="section"> 3.5 Audio Options </h2>
|
---|
736 |
|
---|
737 | <dl compact="compact">
|
---|
738 | <dt> <samp>`-ar freq'</samp></dt>
|
---|
739 | <dd><p>Set the audio sampling frequency (default = 44100 Hz).
|
---|
740 | </p></dd>
|
---|
741 | <dt> <samp>`-ab bitrate'</samp></dt>
|
---|
742 | <dd><p>Set the audio bitrate in kbit/s (default = 64).
|
---|
743 | </p></dd>
|
---|
744 | <dt> <samp>`-ac channels'</samp></dt>
|
---|
745 | <dd><p>Set the number of audio channels (default = 1).
|
---|
746 | </p></dd>
|
---|
747 | <dt> <samp>`-an'</samp></dt>
|
---|
748 | <dd><p>Disable audio recording.
|
---|
749 | </p></dd>
|
---|
750 | <dt> <samp>`-acodec codec'</samp></dt>
|
---|
751 | <dd><p>Force audio codec to <var>codec</var>. Use the <code>copy</code> special value to
|
---|
752 | specify that the raw codec data must be copied as is.
|
---|
753 | </p></dd>
|
---|
754 | </dl>
|
---|
755 |
|
---|
756 | <hr size="6">
|
---|
757 | <a name="SEC11"></a>
|
---|
758 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
759 | <tr><td valign="middle" align="left">[<a href="#SEC10" title="Previous section in reading order"> < </a>]</td>
|
---|
760 | <td valign="middle" align="left">[<a href="#SEC12" title="Next section in reading order"> > </a>]</td>
|
---|
761 | <td valign="middle" align="left"> </td>
|
---|
762 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
763 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
764 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
765 | <td valign="middle" align="left"> </td>
|
---|
766 | <td valign="middle" align="left"> </td>
|
---|
767 | <td valign="middle" align="left"> </td>
|
---|
768 | <td valign="middle" align="left"> </td>
|
---|
769 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
770 | <td valign="middle" align="left">[Contents]</td>
|
---|
771 | <td valign="middle" align="left">[Index]</td>
|
---|
772 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
773 | </tr></table>
|
---|
774 | <h2 class="section"> 3.6 Audio/Video grab options </h2>
|
---|
775 |
|
---|
776 | <dl compact="compact">
|
---|
777 | <dt> <samp>`-vd device'</samp></dt>
|
---|
778 | <dd><p>sEt video grab device (e.g. <tt>`/dev/video0'</tt>).
|
---|
779 | </p></dd>
|
---|
780 | <dt> <samp>`-vc channel'</samp></dt>
|
---|
781 | <dd><p>Set video grab channel (DV1394 only).
|
---|
782 | </p></dd>
|
---|
783 | <dt> <samp>`-tvstd standard'</samp></dt>
|
---|
784 | <dd><p>Set television standard (NTSC, PAL (SECAM)).
|
---|
785 | </p></dd>
|
---|
786 | <dt> <samp>`-dv1394'</samp></dt>
|
---|
787 | <dd><p>Set DV1394 grab.
|
---|
788 | </p></dd>
|
---|
789 | <dt> <samp>`-ad device'</samp></dt>
|
---|
790 | <dd><p>Set audio device (e.g. <tt>`/dev/dsp'</tt>).
|
---|
791 | </p></dd>
|
---|
792 | </dl>
|
---|
793 |
|
---|
794 | <hr size="6">
|
---|
795 | <a name="SEC12"></a>
|
---|
796 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
797 | <tr><td valign="middle" align="left">[<a href="#SEC11" title="Previous section in reading order"> < </a>]</td>
|
---|
798 | <td valign="middle" align="left">[<a href="#SEC13" title="Next section in reading order"> > </a>]</td>
|
---|
799 | <td valign="middle" align="left"> </td>
|
---|
800 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
801 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
802 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
803 | <td valign="middle" align="left"> </td>
|
---|
804 | <td valign="middle" align="left"> </td>
|
---|
805 | <td valign="middle" align="left"> </td>
|
---|
806 | <td valign="middle" align="left"> </td>
|
---|
807 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
808 | <td valign="middle" align="left">[Contents]</td>
|
---|
809 | <td valign="middle" align="left">[Index]</td>
|
---|
810 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
811 | </tr></table>
|
---|
812 | <h2 class="section"> 3.7 Advanced options </h2>
|
---|
813 |
|
---|
814 | <dl compact="compact">
|
---|
815 | <dt> <samp>`-map file:stream'</samp></dt>
|
---|
816 | <dd><p>Set input stream mapping.
|
---|
817 | </p></dd>
|
---|
818 | <dt> <samp>`-debug'</samp></dt>
|
---|
819 | <dd><p>Print specific debug info.
|
---|
820 | </p></dd>
|
---|
821 | <dt> <samp>`-benchmark'</samp></dt>
|
---|
822 | <dd><p>Add timings for benchmarking.
|
---|
823 | </p></dd>
|
---|
824 | <dt> <samp>`-hex'</samp></dt>
|
---|
825 | <dd><p>Dump each input packet.
|
---|
826 | </p></dd>
|
---|
827 | <dt> <samp>`-bitexact'</samp></dt>
|
---|
828 | <dd><p>Only use bit exact algorithms (for codec testing).
|
---|
829 | </p></dd>
|
---|
830 | <dt> <samp>`-ps size'</samp></dt>
|
---|
831 | <dd><p>Set packet size in bits.
|
---|
832 | </p></dd>
|
---|
833 | <dt> <samp>`-re'</samp></dt>
|
---|
834 | <dd><p>Read input at native frame rate. Mainly used to simulate a grab device.
|
---|
835 | </p></dd>
|
---|
836 | <dt> <samp>`-loop'</samp></dt>
|
---|
837 | <dd><p>Loop over the input stream. Currently it works only for image
|
---|
838 | streams. This option is used for automatic FFserver testing.
|
---|
839 | </p></dd>
|
---|
840 | <dt> <samp>`-loop_output number_of_times'</samp></dt>
|
---|
841 | <dd><p>Repeatedly loop output for formats that support looping such as animated GIF
|
---|
842 | (0 will loop the output infinitely).
|
---|
843 | </p></dd>
|
---|
844 | </dl>
|
---|
845 |
|
---|
846 | <hr size="6">
|
---|
847 | <a name="FFmpeg-formula-evaluator"></a>
|
---|
848 | <a name="SEC13"></a>
|
---|
849 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
850 | <tr><td valign="middle" align="left">[<a href="#SEC12" title="Previous section in reading order"> < </a>]</td>
|
---|
851 | <td valign="middle" align="left">[<a href="#SEC14" title="Next section in reading order"> > </a>]</td>
|
---|
852 | <td valign="middle" align="left"> </td>
|
---|
853 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
854 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
855 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
856 | <td valign="middle" align="left"> </td>
|
---|
857 | <td valign="middle" align="left"> </td>
|
---|
858 | <td valign="middle" align="left"> </td>
|
---|
859 | <td valign="middle" align="left"> </td>
|
---|
860 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
861 | <td valign="middle" align="left">[Contents]</td>
|
---|
862 | <td valign="middle" align="left">[Index]</td>
|
---|
863 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
864 | </tr></table>
|
---|
865 | <h2 class="section"> 3.8 FFmpeg formula evaluator </h2>
|
---|
866 |
|
---|
867 | <p>When evaluating a rate control string, FFmpeg uses an internal formula
|
---|
868 | evaluator.
|
---|
869 | </p>
|
---|
870 | <p>The following binary operators are available: <code>+</code>, <code>-</code>,
|
---|
871 | <code>*</code>, <code>/</code>, <code>^</code>.
|
---|
872 | </p>
|
---|
873 | <p>The following unary operators are available: <code>+</code>, <code>-</code>,
|
---|
874 | <code>(...)</code>.
|
---|
875 | </p>
|
---|
876 | <p>The following functions are available:
|
---|
877 | </p><dl compact="compact">
|
---|
878 | <dt> <var>sinh(x)</var></dt>
|
---|
879 | <dt> <var>cosh(x)</var></dt>
|
---|
880 | <dt> <var>tanh(x)</var></dt>
|
---|
881 | <dt> <var>sin(x)</var></dt>
|
---|
882 | <dt> <var>cos(x)</var></dt>
|
---|
883 | <dt> <var>tan(x)</var></dt>
|
---|
884 | <dt> <var>exp(x)</var></dt>
|
---|
885 | <dt> <var>log(x)</var></dt>
|
---|
886 | <dt> <var>squish(x)</var></dt>
|
---|
887 | <dt> <var>gauss(x)</var></dt>
|
---|
888 | <dt> <var>abs(x)</var></dt>
|
---|
889 | <dt> <var>max(x, y)</var></dt>
|
---|
890 | <dt> <var>min(x, y)</var></dt>
|
---|
891 | <dt> <var>gt(x, y)</var></dt>
|
---|
892 | <dt> <var>lt(x, y)</var></dt>
|
---|
893 | <dt> <var>eq(x, y)</var></dt>
|
---|
894 | <dt> <var>bits2qp(bits)</var></dt>
|
---|
895 | <dt> <var>qp2bits(qp)</var></dt>
|
---|
896 | </dl>
|
---|
897 |
|
---|
898 | <p>The following constants are available:
|
---|
899 | </p><dl compact="compact">
|
---|
900 | <dt> <var>PI</var></dt>
|
---|
901 | <dt> <var>E</var></dt>
|
---|
902 | <dt> <var>iTex</var></dt>
|
---|
903 | <dt> <var>pTex</var></dt>
|
---|
904 | <dt> <var>tex</var></dt>
|
---|
905 | <dt> <var>mv</var></dt>
|
---|
906 | <dt> <var>fCode</var></dt>
|
---|
907 | <dt> <var>iCount</var></dt>
|
---|
908 | <dt> <var>mcVar</var></dt>
|
---|
909 | <dt> <var>var</var></dt>
|
---|
910 | <dt> <var>isI</var></dt>
|
---|
911 | <dt> <var>isP</var></dt>
|
---|
912 | <dt> <var>isB</var></dt>
|
---|
913 | <dt> <var>avgQP</var></dt>
|
---|
914 | <dt> <var>qComp</var></dt>
|
---|
915 | <dt> <var>avgIITex</var></dt>
|
---|
916 | <dt> <var>avgPITex</var></dt>
|
---|
917 | <dt> <var>avgPPTex</var></dt>
|
---|
918 | <dt> <var>avgBPTex</var></dt>
|
---|
919 | <dt> <var>avgTex</var></dt>
|
---|
920 | </dl>
|
---|
921 |
|
---|
922 |
|
---|
923 |
|
---|
924 | <hr size="6">
|
---|
925 | <a name="SEC14"></a>
|
---|
926 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
927 | <tr><td valign="middle" align="left">[<a href="#SEC13" title="Previous section in reading order"> < </a>]</td>
|
---|
928 | <td valign="middle" align="left">[<a href="#SEC15" title="Next section in reading order"> > </a>]</td>
|
---|
929 | <td valign="middle" align="left"> </td>
|
---|
930 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
931 | <td valign="middle" align="left">[<a href="#SEC5" title="Up section"> Up </a>]</td>
|
---|
932 | <td valign="middle" align="left">[<a href="#SEC15" title="Next chapter"> >> </a>]</td>
|
---|
933 | <td valign="middle" align="left"> </td>
|
---|
934 | <td valign="middle" align="left"> </td>
|
---|
935 | <td valign="middle" align="left"> </td>
|
---|
936 | <td valign="middle" align="left"> </td>
|
---|
937 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
938 | <td valign="middle" align="left">[Contents]</td>
|
---|
939 | <td valign="middle" align="left">[Index]</td>
|
---|
940 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
941 | </tr></table>
|
---|
942 | <h2 class="section"> 3.9 Protocols </h2>
|
---|
943 |
|
---|
944 | <p>The filename can be <tt>`-'</tt> to read from standard input or to write
|
---|
945 | to standard output.
|
---|
946 | </p>
|
---|
947 | <p>FFmpeg also handles many protocols specified with an URL syntax.
|
---|
948 | </p>
|
---|
949 | <p>Use 'ffmpeg -formats' to see a list of the supported protocols.
|
---|
950 | </p>
|
---|
951 | <p>The protocol <code>http:</code> is currently used only to communicate with
|
---|
952 | FFserver (see the FFserver documentation). When FFmpeg will be a
|
---|
953 | video player it will also be used for streaming :-)
|
---|
954 | </p>
|
---|
955 | <hr size="6">
|
---|
956 | <a name="SEC15"></a>
|
---|
957 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
958 | <tr><td valign="middle" align="left">[<a href="#SEC14" title="Previous section in reading order"> < </a>]</td>
|
---|
959 | <td valign="middle" align="left">[<a href="#SEC16" title="Next section in reading order"> > </a>]</td>
|
---|
960 | <td valign="middle" align="left"> </td>
|
---|
961 | <td valign="middle" align="left">[<a href="#SEC5" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
962 | <td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
|
---|
963 | <td valign="middle" align="left">[<a href="#SEC16" title="Next chapter"> >> </a>]</td>
|
---|
964 | <td valign="middle" align="left"> </td>
|
---|
965 | <td valign="middle" align="left"> </td>
|
---|
966 | <td valign="middle" align="left"> </td>
|
---|
967 | <td valign="middle" align="left"> </td>
|
---|
968 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
969 | <td valign="middle" align="left">[Contents]</td>
|
---|
970 | <td valign="middle" align="left">[Index]</td>
|
---|
971 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
972 | </tr></table>
|
---|
973 | <h1 class="chapter"> 4. Tips </h1>
|
---|
974 |
|
---|
975 | <ul class="toc">
|
---|
976 | <li> For streaming at very low bitrate application, use a low frame rate
|
---|
977 | and a small GOP size. This is especially true for RealVideo where
|
---|
978 | the Linux player does not seem to be very fast, so it can miss
|
---|
979 | frames. An example is:
|
---|
980 |
|
---|
981 | <table><tr><td> </td><td><pre class="example">ffmpeg -g 3 -r 3 -t 10 -b 50 -s qcif -f rv10 /tmp/b.rm
|
---|
982 | </pre></td></tr></table>
|
---|
983 | </li><li> The parameter 'q' which is displayed while encoding is the current
|
---|
984 | quantizer. The value 1 indicates that a very good quality could
|
---|
985 | be achieved. The value 31 indicates the worst quality. If q=31 appears
|
---|
986 | too often, it means that the encoder cannot compress enough to meet
|
---|
987 | your bitrate. You must either increase the bitrate, decrease the
|
---|
988 | frame rate or decrease the frame size.
|
---|
989 |
|
---|
990 | </li><li> If your computer is not fast enough, you can speed up the
|
---|
991 | compression at the expense of the compression ratio. You can use
|
---|
992 | '-me zero' to speed up motion estimation, and '-intra' to disable
|
---|
993 | motion estimation completely (you have only I-frames, which means it
|
---|
994 | is about as good as JPEG compression).
|
---|
995 |
|
---|
996 | </li><li> To have very low audio bitrates, reduce the sampling frequency
|
---|
997 | (down to 22050 kHz for MPEG audio, 22050 or 11025 for AC3).
|
---|
998 |
|
---|
999 | </li><li> To have a constant quality (but a variable bitrate), use the option
|
---|
1000 | '-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
|
---|
1001 | quality).
|
---|
1002 |
|
---|
1003 | </li><li> When converting video files, you can use the '-sameq' option which
|
---|
1004 | uses the same quality factor in the encoder as in the decoder.
|
---|
1005 | It allows almost lossless encoding.
|
---|
1006 |
|
---|
1007 | </li></ul>
|
---|
1008 |
|
---|
1009 | <hr size="6">
|
---|
1010 | <a name="SEC16"></a>
|
---|
1011 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1012 | <tr><td valign="middle" align="left">[<a href="#SEC15" title="Previous section in reading order"> < </a>]</td>
|
---|
1013 | <td valign="middle" align="left">[<a href="#SEC17" title="Next section in reading order"> > </a>]</td>
|
---|
1014 | <td valign="middle" align="left"> </td>
|
---|
1015 | <td valign="middle" align="left">[<a href="#SEC15" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1016 | <td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
|
---|
1017 | <td valign="middle" align="left">[<a href="#SEC21" title="Next chapter"> >> </a>]</td>
|
---|
1018 | <td valign="middle" align="left"> </td>
|
---|
1019 | <td valign="middle" align="left"> </td>
|
---|
1020 | <td valign="middle" align="left"> </td>
|
---|
1021 | <td valign="middle" align="left"> </td>
|
---|
1022 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1023 | <td valign="middle" align="left">[Contents]</td>
|
---|
1024 | <td valign="middle" align="left">[Index]</td>
|
---|
1025 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1026 | </tr></table>
|
---|
1027 | <h1 class="chapter"> 5. Supported File Formats and Codecs </h1>
|
---|
1028 |
|
---|
1029 | <p>You can use the <code>-formats</code> option to have an exhaustive list.
|
---|
1030 | </p>
|
---|
1031 | <hr size="6">
|
---|
1032 | <a name="SEC17"></a>
|
---|
1033 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1034 | <tr><td valign="middle" align="left">[<a href="#SEC16" title="Previous section in reading order"> < </a>]</td>
|
---|
1035 | <td valign="middle" align="left">[<a href="#SEC18" title="Next section in reading order"> > </a>]</td>
|
---|
1036 | <td valign="middle" align="left"> </td>
|
---|
1037 | <td valign="middle" align="left">[<a href="#SEC16" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1038 | <td valign="middle" align="left">[<a href="#SEC16" title="Up section"> Up </a>]</td>
|
---|
1039 | <td valign="middle" align="left">[<a href="#SEC21" title="Next chapter"> >> </a>]</td>
|
---|
1040 | <td valign="middle" align="left"> </td>
|
---|
1041 | <td valign="middle" align="left"> </td>
|
---|
1042 | <td valign="middle" align="left"> </td>
|
---|
1043 | <td valign="middle" align="left"> </td>
|
---|
1044 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1045 | <td valign="middle" align="left">[Contents]</td>
|
---|
1046 | <td valign="middle" align="left">[Index]</td>
|
---|
1047 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1048 | </tr></table>
|
---|
1049 | <h2 class="section"> 5.1 File Formats </h2>
|
---|
1050 |
|
---|
1051 | <p>FFmpeg supports the following file formats through the <code>libavformat</code>
|
---|
1052 | library:
|
---|
1053 | </p>
|
---|
1054 | <table>
|
---|
1055 | <tr><td><p> Supported File Format </p></td><td><p> Encoding </p></td><td><p> Decoding </p></td><td><p> Comments
|
---|
1056 | </p></td></tr>
|
---|
1057 | <tr><td><p> MPEG audio </p></td><td><p> X </p></td><td><p> X
|
---|
1058 | </p></td></tr>
|
---|
1059 | <tr><td><p> MPEG-1 systems </p></td><td><p> X </p></td><td><p> X
|
---|
1060 | </p></td><td><p> muxed audio and video
|
---|
1061 | </p></td></tr>
|
---|
1062 | <tr><td><p> MPEG-2 PS </p></td><td><p> X </p></td><td><p> X
|
---|
1063 | </p></td><td><p> also known as <code>VOB</code> file
|
---|
1064 | </p></td></tr>
|
---|
1065 | <tr><td><p> MPEG-2 TS </p></td><td> </td><td><p> X
|
---|
1066 | </p></td><td><p> also known as DVB Transport Stream
|
---|
1067 | </p></td></tr>
|
---|
1068 | <tr><td><p> ASF</p></td><td><p> X </p></td><td><p> X
|
---|
1069 | </p></td></tr>
|
---|
1070 | <tr><td><p> AVI</p></td><td><p> X </p></td><td><p> X
|
---|
1071 | </p></td></tr>
|
---|
1072 | <tr><td><p> WAV</p></td><td><p> X </p></td><td><p> X
|
---|
1073 | </p></td></tr>
|
---|
1074 | <tr><td><p> Macromedia Flash</p></td><td><p> X </p></td><td><p> X
|
---|
1075 | </p></td><td><p> Only embedded audio is decoded.
|
---|
1076 | </p></td></tr>
|
---|
1077 | <tr><td><p> FLV </p></td><td><p> X </p></td><td><p> X
|
---|
1078 | </p></td><td><p> Macromedia Flash video files
|
---|
1079 | </p></td></tr>
|
---|
1080 | <tr><td><p> Real Audio and Video </p></td><td><p> X </p></td><td><p> X
|
---|
1081 | </p></td></tr>
|
---|
1082 | <tr><td><p> Raw AC3 </p></td><td><p> X </p></td><td><p> X
|
---|
1083 | </p></td></tr>
|
---|
1084 | <tr><td><p> Raw MJPEG </p></td><td><p> X </p></td><td><p> X
|
---|
1085 | </p></td></tr>
|
---|
1086 | <tr><td><p> Raw MPEG video </p></td><td><p> X </p></td><td><p> X
|
---|
1087 | </p></td></tr>
|
---|
1088 | <tr><td><p> Raw PCM8/16 bits, mulaw/Alaw</p></td><td><p> X </p></td><td><p> X
|
---|
1089 | </p></td></tr>
|
---|
1090 | <tr><td><p> Raw CRI ADX audio </p></td><td><p> X </p></td><td><p> X
|
---|
1091 | </p></td></tr>
|
---|
1092 | <tr><td><p> Raw Shorten audio </p></td><td> </td><td><p> X
|
---|
1093 | </p></td></tr>
|
---|
1094 | <tr><td><p> SUN AU format </p></td><td><p> X </p></td><td><p> X
|
---|
1095 | </p></td></tr>
|
---|
1096 | <tr><td><p> NUT </p></td><td><p> X </p></td><td><p> X </p></td><td><p> NUT Open Container Format
|
---|
1097 | </p></td></tr>
|
---|
1098 | <tr><td><p> QuickTime </p></td><td><p> X </p></td><td><p> X
|
---|
1099 | </p></td></tr>
|
---|
1100 | <tr><td><p> MPEG-4 </p></td><td><p> X </p></td><td><p> X
|
---|
1101 | </p></td><td><p> MPEG-4 is a variant of QuickTime.
|
---|
1102 | </p></td></tr>
|
---|
1103 | <tr><td><p> Raw MPEG4 video </p></td><td><p> X </p></td><td><p> X
|
---|
1104 | </p></td></tr>
|
---|
1105 | <tr><td><p> DV </p></td><td><p> X </p></td><td><p> X
|
---|
1106 | </p></td></tr>
|
---|
1107 | <tr><td><p> 4xm </p></td><td> </td><td><p> X
|
---|
1108 | </p></td><td><p> 4X Technologies format, used in some games.
|
---|
1109 | </p></td></tr>
|
---|
1110 | <tr><td><p> Playstation STR </p></td><td> </td><td><p> X
|
---|
1111 | </p></td></tr>
|
---|
1112 | <tr><td><p> Id RoQ </p></td><td> </td><td><p> X
|
---|
1113 | </p></td><td><p> Used in Quake III, Jedi Knight 2, other computer games.
|
---|
1114 | </p></td></tr>
|
---|
1115 | <tr><td><p> Interplay MVE </p></td><td> </td><td><p> X
|
---|
1116 | </p></td><td><p> Format used in various Interplay computer games.
|
---|
1117 | </p></td></tr>
|
---|
1118 | <tr><td><p> WC3 Movie </p></td><td> </td><td><p> X
|
---|
1119 | </p></td><td><p> Multimedia format used in Origin's Wing Commander III computer game.
|
---|
1120 | </p></td></tr>
|
---|
1121 | <tr><td><p> Sega FILM/CPK </p></td><td> </td><td><p> X
|
---|
1122 | </p></td><td><p> Used in many Sega Saturn console games.
|
---|
1123 | </p></td></tr>
|
---|
1124 | <tr><td><p> Westwood Studios VQA/AUD </p></td><td> </td><td><p> X
|
---|
1125 | </p></td><td><p> Multimedia formats used in Westwood Studios games.
|
---|
1126 | </p></td></tr>
|
---|
1127 | <tr><td><p> Id Cinematic (.cin) </p></td><td> </td><td><p> X
|
---|
1128 | </p></td><td><p> Used in Quake II.
|
---|
1129 | </p></td></tr>
|
---|
1130 | <tr><td><p> FLIC format </p></td><td> </td><td><p> X
|
---|
1131 | </p></td><td><p> .fli/.flc files
|
---|
1132 | </p></td></tr>
|
---|
1133 | <tr><td><p> Sierra VMD </p></td><td> </td><td><p> X
|
---|
1134 | </p></td><td><p> Used in Sierra CD-ROM games.
|
---|
1135 | </p></td></tr>
|
---|
1136 | <tr><td><p> Sierra Online </p></td><td> </td><td><p> X
|
---|
1137 | </p></td><td><p> .sol files used in Sierra Online games.
|
---|
1138 | </p></td></tr>
|
---|
1139 | <tr><td><p> Matroska </p></td><td> </td><td><p> X
|
---|
1140 | </p></td></tr>
|
---|
1141 | <tr><td><p> Electronic Arts Multimedia </p></td><td> </td><td><p> X
|
---|
1142 | </p></td><td><p> Used in various EA games; files have extensions like WVE and UV2.
|
---|
1143 | </p></td></tr>
|
---|
1144 | <tr><td><p> Nullsoft Video (NSV) format </p></td><td> </td><td><p> X
|
---|
1145 | </p></td></tr>
|
---|
1146 | <tr><td><p> ADTS AAC audio </p></td><td><p> X </p></td><td><p> X
|
---|
1147 | </p></td></tr>
|
---|
1148 | <tr><td><p> Creative VOC </p></td><td><p> X </p></td><td><p> X </p></td><td><p> Created for the Sound Blaster Pro.
|
---|
1149 | </p></td></tr>
|
---|
1150 | <tr><td><p> American Laser Games MM </p></td><td> </td><td><p> X
|
---|
1151 | </p></td><td><p> Multimedia format used in games like Mad Dog McCree
|
---|
1152 | </p></td></tr>
|
---|
1153 | <tr><td><p> AVS </p></td><td> </td><td><p> X
|
---|
1154 | </p></td><td><p> Multimedia format used by the Creature Shock game.
|
---|
1155 | </p></td></tr>
|
---|
1156 | <tr><td><p> Smacker </p></td><td> </td><td><p> X
|
---|
1157 | </p></td><td><p> Multimedia format used by many games.
|
---|
1158 | </p></td></tr>
|
---|
1159 | </table>
|
---|
1160 |
|
---|
1161 | <p><code>X</code> means that encoding (resp. decoding) is supported.
|
---|
1162 | </p>
|
---|
1163 | <hr size="6">
|
---|
1164 | <a name="SEC18"></a>
|
---|
1165 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1166 | <tr><td valign="middle" align="left">[<a href="#SEC17" title="Previous section in reading order"> < </a>]</td>
|
---|
1167 | <td valign="middle" align="left">[<a href="#SEC19" title="Next section in reading order"> > </a>]</td>
|
---|
1168 | <td valign="middle" align="left"> </td>
|
---|
1169 | <td valign="middle" align="left">[<a href="#SEC16" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1170 | <td valign="middle" align="left">[<a href="#SEC16" title="Up section"> Up </a>]</td>
|
---|
1171 | <td valign="middle" align="left">[<a href="#SEC21" title="Next chapter"> >> </a>]</td>
|
---|
1172 | <td valign="middle" align="left"> </td>
|
---|
1173 | <td valign="middle" align="left"> </td>
|
---|
1174 | <td valign="middle" align="left"> </td>
|
---|
1175 | <td valign="middle" align="left"> </td>
|
---|
1176 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1177 | <td valign="middle" align="left">[Contents]</td>
|
---|
1178 | <td valign="middle" align="left">[Index]</td>
|
---|
1179 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1180 | </tr></table>
|
---|
1181 | <h2 class="section"> 5.2 Image Formats </h2>
|
---|
1182 |
|
---|
1183 | <p>FFmpeg can read and write images for each frame of a video sequence. The
|
---|
1184 | following image formats are supported:
|
---|
1185 | </p>
|
---|
1186 | <table>
|
---|
1187 | <tr><td><p> Supported Image Format </p></td><td><p> Encoding </p></td><td><p> Decoding </p></td><td><p> Comments
|
---|
1188 | </p></td></tr>
|
---|
1189 | <tr><td><p> PGM, PPM </p></td><td><p> X </p></td><td><p> X
|
---|
1190 | </p></td></tr>
|
---|
1191 | <tr><td><p> PAM </p></td><td><p> X </p></td><td><p> X </p></td><td><p> PAM is a PNM extension with alpha support.
|
---|
1192 | </p></td></tr>
|
---|
1193 | <tr><td><p> PGMYUV </p></td><td><p> X </p></td><td><p> X </p></td><td><p> PGM with U and V components in YUV 4:2:0
|
---|
1194 | </p></td></tr>
|
---|
1195 | <tr><td><p> JPEG </p></td><td><p> X </p></td><td><p> X </p></td><td><p> Progressive JPEG is not supported.
|
---|
1196 | </p></td></tr>
|
---|
1197 | <tr><td><p> .Y.U.V </p></td><td><p> X </p></td><td><p> X </p></td><td><p> one raw file per component
|
---|
1198 | </p></td></tr>
|
---|
1199 | <tr><td><p> animated GIF </p></td><td><p> X </p></td><td><p> X </p></td><td><p> Only uncompressed GIFs are generated.
|
---|
1200 | </p></td></tr>
|
---|
1201 | <tr><td><p> PNG </p></td><td><p> X </p></td><td><p> X </p></td><td><p> 2 bit and 4 bit/pixel not supported yet.
|
---|
1202 | </p></td></tr>
|
---|
1203 | <tr><td><p> SGI </p></td><td><p> X </p></td><td><p> X </p></td><td><p> SGI RGB image format
|
---|
1204 | </p></td></tr>
|
---|
1205 | </table>
|
---|
1206 |
|
---|
1207 | <p><code>X</code> means that encoding (resp. decoding) is supported.
|
---|
1208 | </p>
|
---|
1209 | <hr size="6">
|
---|
1210 | <a name="SEC19"></a>
|
---|
1211 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1212 | <tr><td valign="middle" align="left">[<a href="#SEC18" title="Previous section in reading order"> < </a>]</td>
|
---|
1213 | <td valign="middle" align="left">[<a href="#SEC20" title="Next section in reading order"> > </a>]</td>
|
---|
1214 | <td valign="middle" align="left"> </td>
|
---|
1215 | <td valign="middle" align="left">[<a href="#SEC16" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1216 | <td valign="middle" align="left">[<a href="#SEC16" title="Up section"> Up </a>]</td>
|
---|
1217 | <td valign="middle" align="left">[<a href="#SEC21" title="Next chapter"> >> </a>]</td>
|
---|
1218 | <td valign="middle" align="left"> </td>
|
---|
1219 | <td valign="middle" align="left"> </td>
|
---|
1220 | <td valign="middle" align="left"> </td>
|
---|
1221 | <td valign="middle" align="left"> </td>
|
---|
1222 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1223 | <td valign="middle" align="left">[Contents]</td>
|
---|
1224 | <td valign="middle" align="left">[Index]</td>
|
---|
1225 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1226 | </tr></table>
|
---|
1227 | <h2 class="section"> 5.3 Video Codecs </h2>
|
---|
1228 |
|
---|
1229 | <table>
|
---|
1230 | <tr><td><p> Supported Codec </p></td><td><p> Encoding </p></td><td><p> Decoding </p></td><td><p> Comments
|
---|
1231 | </p></td></tr>
|
---|
1232 | <tr><td><p> MPEG-1 video </p></td><td><p> X </p></td><td><p> X
|
---|
1233 | </p></td></tr>
|
---|
1234 | <tr><td><p> MPEG-2 video </p></td><td><p> X </p></td><td><p> X
|
---|
1235 | </p></td></tr>
|
---|
1236 | <tr><td><p> MPEG-4 </p></td><td><p> X </p></td><td><p> X </p></td><td><p> also known as DivX4/5
|
---|
1237 | </p></td></tr>
|
---|
1238 | <tr><td><p> MSMPEG4 V1 </p></td><td><p> X </p></td><td><p> X
|
---|
1239 | </p></td></tr>
|
---|
1240 | <tr><td><p> MSMPEG4 V2 </p></td><td><p> X </p></td><td><p> X
|
---|
1241 | </p></td></tr>
|
---|
1242 | <tr><td><p> MSMPEG4 V3 </p></td><td><p> X </p></td><td><p> X </p></td><td><p> also known as DivX3
|
---|
1243 | </p></td></tr>
|
---|
1244 | <tr><td><p> WMV7 </p></td><td><p> X </p></td><td><p> X
|
---|
1245 | </p></td></tr>
|
---|
1246 | <tr><td><p> WMV8 </p></td><td><p> X </p></td><td><p> X </p></td><td><p> not completely working
|
---|
1247 | </p></td></tr>
|
---|
1248 | <tr><td><p> H.261 </p></td><td><p> X </p></td><td><p> X
|
---|
1249 | </p></td></tr>
|
---|
1250 | <tr><td><p> H.263(+) </p></td><td><p> X </p></td><td><p> X </p></td><td><p> also known as RealVideo 1.0
|
---|
1251 | </p></td></tr>
|
---|
1252 | <tr><td><p> H.264 </p></td><td> </td><td><p> X
|
---|
1253 | </p></td></tr>
|
---|
1254 | <tr><td><p> RealVideo 1.0 </p></td><td><p> X </p></td><td><p> X
|
---|
1255 | </p></td></tr>
|
---|
1256 | <tr><td><p> RealVideo 2.0 </p></td><td><p> X </p></td><td><p> X
|
---|
1257 | </p></td></tr>
|
---|
1258 | <tr><td><p> MJPEG </p></td><td><p> X </p></td><td><p> X
|
---|
1259 | </p></td></tr>
|
---|
1260 | <tr><td><p> lossless MJPEG </p></td><td><p> X </p></td><td><p> X
|
---|
1261 | </p></td></tr>
|
---|
1262 | <tr><td><p> JPEG-LS </p></td><td><p> X </p></td><td><p> X </p></td><td><p> fourcc: MJLS, lossless and near-lossless is supported
|
---|
1263 | </p></td></tr>
|
---|
1264 | <tr><td><p> Apple MJPEG-B </p></td><td> </td><td><p> X
|
---|
1265 | </p></td></tr>
|
---|
1266 | <tr><td><p> Sunplus MJPEG </p></td><td> </td><td><p> X </p></td><td><p> fourcc: SP5X
|
---|
1267 | </p></td></tr>
|
---|
1268 | <tr><td><p> DV </p></td><td><p> X </p></td><td><p> X
|
---|
1269 | </p></td></tr>
|
---|
1270 | <tr><td><p> HuffYUV </p></td><td><p> X </p></td><td><p> X
|
---|
1271 | </p></td></tr>
|
---|
1272 | <tr><td><p> FFmpeg Video 1 </p></td><td><p> X </p></td><td><p> X </p></td><td><p> experimental lossless codec (fourcc: FFV1)
|
---|
1273 | </p></td></tr>
|
---|
1274 | <tr><td><p> FFmpeg Snow </p></td><td><p> X </p></td><td><p> X </p></td><td><p> experimental wavelet codec (fourcc: SNOW)
|
---|
1275 | </p></td></tr>
|
---|
1276 | <tr><td><p> Asus v1 </p></td><td><p> X </p></td><td><p> X </p></td><td><p> fourcc: ASV1
|
---|
1277 | </p></td></tr>
|
---|
1278 | <tr><td><p> Asus v2 </p></td><td><p> X </p></td><td><p> X </p></td><td><p> fourcc: ASV2
|
---|
1279 | </p></td></tr>
|
---|
1280 | <tr><td><p> Creative YUV </p></td><td> </td><td><p> X </p></td><td><p> fourcc: CYUV
|
---|
1281 | </p></td></tr>
|
---|
1282 | <tr><td><p> Sorenson Video 1 </p></td><td><p> X </p></td><td><p> X </p></td><td><p> fourcc: SVQ1
|
---|
1283 | </p></td></tr>
|
---|
1284 | <tr><td><p> Sorenson Video 3 </p></td><td> </td><td><p> X </p></td><td><p> fourcc: SVQ3
|
---|
1285 | </p></td></tr>
|
---|
1286 | <tr><td><p> On2 VP3 </p></td><td> </td><td><p> X </p></td><td><p> still experimental
|
---|
1287 | </p></td></tr>
|
---|
1288 | <tr><td><p> Theora </p></td><td> </td><td><p> X </p></td><td><p> still experimental
|
---|
1289 | </p></td></tr>
|
---|
1290 | <tr><td><p> Intel Indeo 3 </p></td><td> </td><td><p> X
|
---|
1291 | </p></td></tr>
|
---|
1292 | <tr><td><p> FLV </p></td><td><p> X </p></td><td><p> X </p></td><td><p> Sorenson H.263 used in Flash
|
---|
1293 | </p></td></tr>
|
---|
1294 | <tr><td><p> Flash Screen Video </p></td><td> </td><td><p> X </p></td><td><p> fourcc: FSV1
|
---|
1295 | </p></td></tr>
|
---|
1296 | <tr><td><p> ATI VCR1 </p></td><td> </td><td><p> X </p></td><td><p> fourcc: VCR1
|
---|
1297 | </p></td></tr>
|
---|
1298 | <tr><td><p> ATI VCR2 </p></td><td> </td><td><p> X </p></td><td><p> fourcc: VCR2
|
---|
1299 | </p></td></tr>
|
---|
1300 | <tr><td><p> Cirrus Logic AccuPak </p></td><td> </td><td><p> X </p></td><td><p> fourcc: CLJR
|
---|
1301 | </p></td></tr>
|
---|
1302 | <tr><td><p> 4X Video </p></td><td> </td><td><p> X </p></td><td><p> Used in certain computer games.
|
---|
1303 | </p></td></tr>
|
---|
1304 | <tr><td><p> Sony Playstation MDEC </p></td><td> </td><td><p> X
|
---|
1305 | </p></td></tr>
|
---|
1306 | <tr><td><p> Id RoQ </p></td><td> </td><td><p> X </p></td><td><p> Used in Quake III, Jedi Knight 2, other computer games.
|
---|
1307 | </p></td></tr>
|
---|
1308 | <tr><td><p> Xan/WC3 </p></td><td> </td><td><p> X </p></td><td><p> Used in Wing Commander III .MVE files.
|
---|
1309 | </p></td></tr>
|
---|
1310 | <tr><td><p> Interplay Video </p></td><td> </td><td><p> X </p></td><td><p> Used in Interplay .MVE files.
|
---|
1311 | </p></td></tr>
|
---|
1312 | <tr><td><p> Apple Animation </p></td><td> </td><td><p> X </p></td><td><p> fourcc: 'rle '
|
---|
1313 | </p></td></tr>
|
---|
1314 | <tr><td><p> Apple Graphics </p></td><td> </td><td><p> X </p></td><td><p> fourcc: 'smc '
|
---|
1315 | </p></td></tr>
|
---|
1316 | <tr><td><p> Apple Video </p></td><td> </td><td><p> X </p></td><td><p> fourcc: rpza
|
---|
1317 | </p></td></tr>
|
---|
1318 | <tr><td><p> Apple QuickDraw </p></td><td> </td><td><p> X </p></td><td><p> fourcc: qdrw
|
---|
1319 | </p></td></tr>
|
---|
1320 | <tr><td><p> Cinepak </p></td><td> </td><td><p> X
|
---|
1321 | </p></td></tr>
|
---|
1322 | <tr><td><p> Microsoft RLE </p></td><td> </td><td><p> X
|
---|
1323 | </p></td></tr>
|
---|
1324 | <tr><td><p> Microsoft Video-1 </p></td><td> </td><td><p> X
|
---|
1325 | </p></td></tr>
|
---|
1326 | <tr><td><p> Westwood VQA </p></td><td> </td><td><p> X
|
---|
1327 | </p></td></tr>
|
---|
1328 | <tr><td><p> Id Cinematic Video </p></td><td> </td><td><p> X </p></td><td><p> Used in Quake II.
|
---|
1329 | </p></td></tr>
|
---|
1330 | <tr><td><p> Planar RGB </p></td><td> </td><td><p> X </p></td><td><p> fourcc: 8BPS
|
---|
1331 | </p></td></tr>
|
---|
1332 | <tr><td><p> FLIC video </p></td><td> </td><td><p> X
|
---|
1333 | </p></td></tr>
|
---|
1334 | <tr><td><p> Duck TrueMotion v1 </p></td><td> </td><td><p> X </p></td><td><p> fourcc: DUCK
|
---|
1335 | </p></td></tr>
|
---|
1336 | <tr><td><p> Duck TrueMotion v2 </p></td><td> </td><td><p> X </p></td><td><p> fourcc: TM20
|
---|
1337 | </p></td></tr>
|
---|
1338 | <tr><td><p> VMD Video </p></td><td> </td><td><p> X </p></td><td><p> Used in Sierra VMD files.
|
---|
1339 | </p></td></tr>
|
---|
1340 | <tr><td><p> MSZH </p></td><td> </td><td><p> X </p></td><td><p> Part of LCL
|
---|
1341 | </p></td></tr>
|
---|
1342 | <tr><td><p> ZLIB </p></td><td><p> X </p></td><td><p> X </p></td><td><p> Part of LCL, encoder experimental
|
---|
1343 | </p></td></tr>
|
---|
1344 | <tr><td><p> TechSmith Camtasia </p></td><td> </td><td><p> X </p></td><td><p> fourcc: TSCC
|
---|
1345 | </p></td></tr>
|
---|
1346 | <tr><td><p> IBM Ultimotion </p></td><td> </td><td><p> X </p></td><td><p> fourcc: ULTI
|
---|
1347 | </p></td></tr>
|
---|
1348 | <tr><td><p> Miro VideoXL </p></td><td> </td><td><p> X </p></td><td><p> fourcc: VIXL
|
---|
1349 | </p></td></tr>
|
---|
1350 | <tr><td><p> QPEG </p></td><td> </td><td><p> X </p></td><td><p> fourccs: QPEG, Q1.0, Q1.1
|
---|
1351 | </p></td></tr>
|
---|
1352 | <tr><td><p> LOCO </p></td><td> </td><td><p> X </p></td><td>
|
---|
1353 | </td></tr>
|
---|
1354 | <tr><td><p> Winnov WNV1 </p></td><td> </td><td><p> X </p></td><td>
|
---|
1355 | </td></tr>
|
---|
1356 | <tr><td><p> Autodesk Animator Studio Codec </p></td><td> </td><td><p> X </p></td><td><p> fourcc: AASC
|
---|
1357 | </p></td></tr>
|
---|
1358 | <tr><td><p> Fraps FPS1 </p></td><td> </td><td><p> X </p></td><td>
|
---|
1359 | </td></tr>
|
---|
1360 | <tr><td><p> CamStudio </p></td><td> </td><td><p> X </p></td><td><p> fourcc: CSCD
|
---|
1361 | </p></td></tr>
|
---|
1362 | <tr><td><p> American Laser Games Video </p></td><td> </td><td><p> X </p></td><td><p> Used in games like Mad Dog McCree
|
---|
1363 | </p></td></tr>
|
---|
1364 | <tr><td><p> ZMBV </p></td><td> </td><td><p> X </p></td><td>
|
---|
1365 | </td></tr>
|
---|
1366 | <tr><td><p> AVS Video </p></td><td> </td><td><p> X </p></td><td><p> Video encoding used by the Creature Shock game.
|
---|
1367 | </p></td></tr>
|
---|
1368 | <tr><td><p> Smacker Video </p></td><td> </td><td><p> X </p></td><td><p> Video encoding used in Smacker.
|
---|
1369 | </p></td></tr>
|
---|
1370 | <tr><td><p> RTjpeg </p></td><td> </td><td><p> X </p></td><td><p> Video encoding used in NuppelVideo files.
|
---|
1371 | </p></td></tr>
|
---|
1372 | <tr><td><p> KMVC </p></td><td> </td><td><p> X </p></td><td><p> Codec used in Worms games.
|
---|
1373 | </p></td></tr>
|
---|
1374 | </table>
|
---|
1375 |
|
---|
1376 | <p><code>X</code> means that encoding (resp. decoding) is supported.
|
---|
1377 | </p>
|
---|
1378 | <p>See <a href="http://mplayerhq.hu/~michael/codec-features.html">http://mplayerhq.hu/~michael/codec-features.html</a> to
|
---|
1379 | get a precise comparison of the FFmpeg MPEG-4 codec compared to
|
---|
1380 | other implementations.
|
---|
1381 | </p>
|
---|
1382 | <hr size="6">
|
---|
1383 | <a name="SEC20"></a>
|
---|
1384 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1385 | <tr><td valign="middle" align="left">[<a href="#SEC19" title="Previous section in reading order"> < </a>]</td>
|
---|
1386 | <td valign="middle" align="left">[<a href="#SEC21" title="Next section in reading order"> > </a>]</td>
|
---|
1387 | <td valign="middle" align="left"> </td>
|
---|
1388 | <td valign="middle" align="left">[<a href="#SEC16" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1389 | <td valign="middle" align="left">[<a href="#SEC16" title="Up section"> Up </a>]</td>
|
---|
1390 | <td valign="middle" align="left">[<a href="#SEC21" title="Next chapter"> >> </a>]</td>
|
---|
1391 | <td valign="middle" align="left"> </td>
|
---|
1392 | <td valign="middle" align="left"> </td>
|
---|
1393 | <td valign="middle" align="left"> </td>
|
---|
1394 | <td valign="middle" align="left"> </td>
|
---|
1395 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1396 | <td valign="middle" align="left">[Contents]</td>
|
---|
1397 | <td valign="middle" align="left">[Index]</td>
|
---|
1398 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1399 | </tr></table>
|
---|
1400 | <h2 class="section"> 5.4 Audio Codecs </h2>
|
---|
1401 |
|
---|
1402 | <table>
|
---|
1403 | <tr><td><p> Supported Codec </p></td><td><p> Encoding </p></td><td><p> Decoding </p></td><td><p> Comments
|
---|
1404 | </p></td></tr>
|
---|
1405 | <tr><td><p> MPEG audio layer 2 </p></td><td><p> IX </p></td><td><p> IX
|
---|
1406 | </p></td></tr>
|
---|
1407 | <tr><td><p> MPEG audio layer 1/3 </p></td><td><p> IX </p></td><td><p> IX
|
---|
1408 | </p></td><td><p> MP3 encoding is supported through the external library LAME.
|
---|
1409 | </p></td></tr>
|
---|
1410 | <tr><td><p> AC3 </p></td><td><p> IX </p></td><td><p> IX
|
---|
1411 | </p></td><td><p> liba52 is used internally for decoding.
|
---|
1412 | </p></td></tr>
|
---|
1413 | <tr><td><p> Vorbis </p></td><td><p> X </p></td><td><p> X
|
---|
1414 | </p></td><td><p> Supported through the external library libvorbis.
|
---|
1415 | </p></td></tr>
|
---|
1416 | <tr><td><p> WMA V1/V2 </p></td><td> </td><td><p> X
|
---|
1417 | </p></td></tr>
|
---|
1418 | <tr><td><p> AAC </p></td><td><p> X </p></td><td><p> X
|
---|
1419 | </p></td><td><p> Supported through the external library libfaac/libfaad.
|
---|
1420 | </p></td></tr>
|
---|
1421 | <tr><td><p> Microsoft ADPCM </p></td><td><p> X </p></td><td><p> X
|
---|
1422 | </p></td></tr>
|
---|
1423 | <tr><td><p> MS IMA ADPCM </p></td><td><p> X </p></td><td><p> X
|
---|
1424 | </p></td></tr>
|
---|
1425 | <tr><td><p> QT IMA ADPCM </p></td><td> </td><td><p> X
|
---|
1426 | </p></td></tr>
|
---|
1427 | <tr><td><p> 4X IMA ADPCM </p></td><td> </td><td><p> X
|
---|
1428 | </p></td></tr>
|
---|
1429 | <tr><td><p> G.726 ADPCM </p></td><td><p> X </p></td><td><p> X
|
---|
1430 | </p></td></tr>
|
---|
1431 | <tr><td><p> Duck DK3 IMA ADPCM </p></td><td> </td><td><p> X
|
---|
1432 | </p></td><td><p> Used in some Sega Saturn console games.
|
---|
1433 | </p></td></tr>
|
---|
1434 | <tr><td><p> Duck DK4 IMA ADPCM </p></td><td> </td><td><p> X
|
---|
1435 | </p></td><td><p> Used in some Sega Saturn console games.
|
---|
1436 | </p></td></tr>
|
---|
1437 | <tr><td><p> Westwood Studios IMA ADPCM </p></td><td> </td><td><p> X
|
---|
1438 | </p></td><td><p> Used in Westwood Studios games like Command and Conquer.
|
---|
1439 | </p></td></tr>
|
---|
1440 | <tr><td><p> SMJPEG IMA ADPCM </p></td><td> </td><td><p> X
|
---|
1441 | </p></td><td><p> Used in certain Loki game ports.
|
---|
1442 | </p></td></tr>
|
---|
1443 | <tr><td><p> CD-ROM XA ADPCM </p></td><td> </td><td><p> X
|
---|
1444 | </p></td></tr>
|
---|
1445 | <tr><td><p> CRI ADX ADPCM </p></td><td><p> X </p></td><td><p> X
|
---|
1446 | </p></td><td><p> Used in Sega Dreamcast games.
|
---|
1447 | </p></td></tr>
|
---|
1448 | <tr><td><p> Electronic Arts ADPCM </p></td><td> </td><td><p> X
|
---|
1449 | </p></td><td><p> Used in various EA titles.
|
---|
1450 | </p></td></tr>
|
---|
1451 | <tr><td><p> Creative ADPCM </p></td><td> </td><td><p> X
|
---|
1452 | </p></td><td><p> 16 -> 4, 8 -> 4, 8 -> 3, 8 -> 2
|
---|
1453 | </p></td></tr>
|
---|
1454 | <tr><td><p> RA144 </p></td><td> </td><td><p> X
|
---|
1455 | </p></td><td><p> Real 14400 bit/s codec
|
---|
1456 | </p></td></tr>
|
---|
1457 | <tr><td><p> RA288 </p></td><td> </td><td><p> X
|
---|
1458 | </p></td><td><p> Real 28800 bit/s codec
|
---|
1459 | </p></td></tr>
|
---|
1460 | <tr><td><p> RADnet </p></td><td><p> X </p></td><td><p> IX
|
---|
1461 | </p></td><td><p> Real low bitrate AC3 codec, liba52 is used for decoding.
|
---|
1462 | </p></td></tr>
|
---|
1463 | <tr><td><p> AMR-NB </p></td><td><p> X </p></td><td><p> X
|
---|
1464 | </p></td><td><p> Supported through an external library.
|
---|
1465 | </p></td></tr>
|
---|
1466 | <tr><td><p> AMR-WB </p></td><td><p> X </p></td><td><p> X
|
---|
1467 | </p></td><td><p> Supported through an external library.
|
---|
1468 | </p></td></tr>
|
---|
1469 | <tr><td><p> DV audio </p></td><td> </td><td><p> X
|
---|
1470 | </p></td></tr>
|
---|
1471 | <tr><td><p> Id RoQ DPCM </p></td><td> </td><td><p> X
|
---|
1472 | </p></td><td><p> Used in Quake III, Jedi Knight 2, other computer games.
|
---|
1473 | </p></td></tr>
|
---|
1474 | <tr><td><p> Interplay MVE DPCM </p></td><td> </td><td><p> X
|
---|
1475 | </p></td><td><p> Used in various Interplay computer games.
|
---|
1476 | </p></td></tr>
|
---|
1477 | <tr><td><p> Xan DPCM </p></td><td> </td><td><p> X
|
---|
1478 | </p></td><td><p> Used in Origin's Wing Commander IV AVI files.
|
---|
1479 | </p></td></tr>
|
---|
1480 | <tr><td><p> Sierra Online DPCM </p></td><td> </td><td><p> X
|
---|
1481 | </p></td><td><p> Used in Sierra Online game audio files.
|
---|
1482 | </p></td></tr>
|
---|
1483 | <tr><td><p> Apple MACE 3 </p></td><td> </td><td><p> X
|
---|
1484 | </p></td></tr>
|
---|
1485 | <tr><td><p> Apple MACE 6 </p></td><td> </td><td><p> X
|
---|
1486 | </p></td></tr>
|
---|
1487 | <tr><td><p> FLAC lossless audio </p></td><td> </td><td><p> X
|
---|
1488 | </p></td></tr>
|
---|
1489 | <tr><td><p> Shorten lossless audio </p></td><td> </td><td><p> X
|
---|
1490 | </p></td></tr>
|
---|
1491 | <tr><td><p> Apple lossless audio </p></td><td> </td><td><p> X
|
---|
1492 | </p></td><td><p> QuickTime fourcc 'alac'
|
---|
1493 | </p></td></tr>
|
---|
1494 | <tr><td><p> FFmpeg Sonic </p></td><td><p> X </p></td><td><p> X
|
---|
1495 | </p></td><td><p> experimental lossy/lossless codec
|
---|
1496 | </p></td></tr>
|
---|
1497 | <tr><td><p> Qdesign QDM2 </p></td><td> </td><td><p> X
|
---|
1498 | </p></td><td><p> there are still some distortions
|
---|
1499 | </p></td></tr>
|
---|
1500 | <tr><td><p> Real COOK </p></td><td> </td><td><p> X
|
---|
1501 | </p></td><td><p> All versions except 5.1 are supported
|
---|
1502 | </p></td></tr>
|
---|
1503 | <tr><td><p> DSP Group TrueSpeech </p></td><td> </td><td><p> X
|
---|
1504 | </p></td></tr>
|
---|
1505 | <tr><td><p> True Audio (TTA) </p></td><td> </td><td><p> X
|
---|
1506 | </p></td></tr>
|
---|
1507 | <tr><td><p> Smacker Audio </p></td><td> </td><td><p> X
|
---|
1508 | </p></td></tr>
|
---|
1509 | </table>
|
---|
1510 |
|
---|
1511 | <p><code>X</code> means that encoding (resp. decoding) is supported.
|
---|
1512 | </p>
|
---|
1513 | <p><code>I</code> means that an integer-only version is available, too (ensures high
|
---|
1514 | performance on systems without hardware floating point support).
|
---|
1515 | </p>
|
---|
1516 | <hr size="6">
|
---|
1517 | <a name="SEC21"></a>
|
---|
1518 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1519 | <tr><td valign="middle" align="left">[<a href="#SEC20" title="Previous section in reading order"> < </a>]</td>
|
---|
1520 | <td valign="middle" align="left">[<a href="#SEC22" title="Next section in reading order"> > </a>]</td>
|
---|
1521 | <td valign="middle" align="left"> </td>
|
---|
1522 | <td valign="middle" align="left">[<a href="#SEC16" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1523 | <td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
|
---|
1524 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1525 | <td valign="middle" align="left"> </td>
|
---|
1526 | <td valign="middle" align="left"> </td>
|
---|
1527 | <td valign="middle" align="left"> </td>
|
---|
1528 | <td valign="middle" align="left"> </td>
|
---|
1529 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1530 | <td valign="middle" align="left">[Contents]</td>
|
---|
1531 | <td valign="middle" align="left">[Index]</td>
|
---|
1532 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1533 | </tr></table>
|
---|
1534 | <h1 class="chapter"> 6. Platform Specific information </h1>
|
---|
1535 |
|
---|
1536 | <hr size="6">
|
---|
1537 | <a name="SEC22"></a>
|
---|
1538 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1539 | <tr><td valign="middle" align="left">[<a href="#SEC21" title="Previous section in reading order"> < </a>]</td>
|
---|
1540 | <td valign="middle" align="left">[<a href="#SEC23" title="Next section in reading order"> > </a>]</td>
|
---|
1541 | <td valign="middle" align="left"> </td>
|
---|
1542 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1543 | <td valign="middle" align="left">[<a href="#SEC21" title="Up section"> Up </a>]</td>
|
---|
1544 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1545 | <td valign="middle" align="left"> </td>
|
---|
1546 | <td valign="middle" align="left"> </td>
|
---|
1547 | <td valign="middle" align="left"> </td>
|
---|
1548 | <td valign="middle" align="left"> </td>
|
---|
1549 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1550 | <td valign="middle" align="left">[Contents]</td>
|
---|
1551 | <td valign="middle" align="left">[Index]</td>
|
---|
1552 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1553 | </tr></table>
|
---|
1554 | <h2 class="section"> 6.1 Linux </h2>
|
---|
1555 |
|
---|
1556 | <p>FFmpeg should be compiled with at least GCC 2.95.3. GCC 3.2 is the
|
---|
1557 | preferred compiler now for FFmpeg. All future optimizations will depend on
|
---|
1558 | features only found in GCC 3.2.
|
---|
1559 | </p>
|
---|
1560 | <hr size="6">
|
---|
1561 | <a name="SEC23"></a>
|
---|
1562 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1563 | <tr><td valign="middle" align="left">[<a href="#SEC22" title="Previous section in reading order"> < </a>]</td>
|
---|
1564 | <td valign="middle" align="left">[<a href="#SEC24" title="Next section in reading order"> > </a>]</td>
|
---|
1565 | <td valign="middle" align="left"> </td>
|
---|
1566 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1567 | <td valign="middle" align="left">[<a href="#SEC21" title="Up section"> Up </a>]</td>
|
---|
1568 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1569 | <td valign="middle" align="left"> </td>
|
---|
1570 | <td valign="middle" align="left"> </td>
|
---|
1571 | <td valign="middle" align="left"> </td>
|
---|
1572 | <td valign="middle" align="left"> </td>
|
---|
1573 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1574 | <td valign="middle" align="left">[Contents]</td>
|
---|
1575 | <td valign="middle" align="left">[Index]</td>
|
---|
1576 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1577 | </tr></table>
|
---|
1578 | <h2 class="section"> 6.2 BSD </h2>
|
---|
1579 |
|
---|
1580 | <p>BSD make will not build FFmpeg, you need to install and use GNU Make
|
---|
1581 | (<tt>`gmake'</tt>).
|
---|
1582 | </p>
|
---|
1583 | <hr size="6">
|
---|
1584 | <a name="SEC24"></a>
|
---|
1585 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1586 | <tr><td valign="middle" align="left">[<a href="#SEC23" title="Previous section in reading order"> < </a>]</td>
|
---|
1587 | <td valign="middle" align="left">[<a href="#SEC25" title="Next section in reading order"> > </a>]</td>
|
---|
1588 | <td valign="middle" align="left"> </td>
|
---|
1589 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1590 | <td valign="middle" align="left">[<a href="#SEC21" title="Up section"> Up </a>]</td>
|
---|
1591 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1592 | <td valign="middle" align="left"> </td>
|
---|
1593 | <td valign="middle" align="left"> </td>
|
---|
1594 | <td valign="middle" align="left"> </td>
|
---|
1595 | <td valign="middle" align="left"> </td>
|
---|
1596 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1597 | <td valign="middle" align="left">[Contents]</td>
|
---|
1598 | <td valign="middle" align="left">[Index]</td>
|
---|
1599 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1600 | </tr></table>
|
---|
1601 | <h2 class="section"> 6.3 Windows </h2>
|
---|
1602 |
|
---|
1603 | <hr size="6">
|
---|
1604 | <a name="SEC25"></a>
|
---|
1605 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1606 | <tr><td valign="middle" align="left">[<a href="#SEC24" title="Previous section in reading order"> < </a>]</td>
|
---|
1607 | <td valign="middle" align="left">[<a href="#SEC26" title="Next section in reading order"> > </a>]</td>
|
---|
1608 | <td valign="middle" align="left"> </td>
|
---|
1609 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1610 | <td valign="middle" align="left">[<a href="#SEC24" title="Up section"> Up </a>]</td>
|
---|
1611 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1612 | <td valign="middle" align="left"> </td>
|
---|
1613 | <td valign="middle" align="left"> </td>
|
---|
1614 | <td valign="middle" align="left"> </td>
|
---|
1615 | <td valign="middle" align="left"> </td>
|
---|
1616 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1617 | <td valign="middle" align="left">[Contents]</td>
|
---|
1618 | <td valign="middle" align="left">[Index]</td>
|
---|
1619 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1620 | </tr></table>
|
---|
1621 | <h3 class="subsection"> 6.3.1 Native Windows compilation </h3>
|
---|
1622 |
|
---|
1623 | <ul class="toc">
|
---|
1624 | <li> Install the current versions of MSYS and MinGW from
|
---|
1625 | <a href="http://www.mingw.org/">http://www.mingw.org/</a>. You can find detailed installation
|
---|
1626 | instructions in the download section and the FAQ.
|
---|
1627 |
|
---|
1628 | </li><li> If you want to test the FFplay, also download
|
---|
1629 | the MinGW development library of SDL 1.2.x
|
---|
1630 | (<tt>`SDL-devel-1.2.x-mingw32.tar.gz'</tt>) from
|
---|
1631 | <a href="http://www.libsdl.org">http://www.libsdl.org</a>. Unpack it in a temporary directory, and
|
---|
1632 | unpack the archive <tt>`i386-mingw32msvc.tar.gz'</tt> in the MinGW tool
|
---|
1633 | directory. Edit the <tt>`sdl-config'</tt> script so that it gives the
|
---|
1634 | correct SDL directory when invoked.
|
---|
1635 |
|
---|
1636 | </li><li> Extract the current version of FFmpeg.
|
---|
1637 |
|
---|
1638 | </li><li> Start the MSYS shell (file <tt>`msys.bat'</tt>).
|
---|
1639 |
|
---|
1640 | </li><li> Change to the FFmpeg directory and follow
|
---|
1641 | the instructions of how to compile FFmpeg (file
|
---|
1642 | <tt>`INSTALL'</tt>). Usually, launching <tt>`./configure'</tt> and <tt>`make'</tt>
|
---|
1643 | suffices. If you have problems using SDL, verify that
|
---|
1644 | <tt>`sdl-config'</tt> can be launched from the MSYS command line.
|
---|
1645 |
|
---|
1646 | </li><li> You can install FFmpeg in <tt>`Program Files/FFmpeg'</tt> by typing
|
---|
1647 | <tt>`make install'</tt>. Don't forget to copy <tt>`SDL.dll'</tt> to the place
|
---|
1648 | you launch <tt>`ffplay'</tt> from.
|
---|
1649 |
|
---|
1650 | </li></ul>
|
---|
1651 |
|
---|
1652 | <p>Notes:
|
---|
1653 | </p><ul class="toc">
|
---|
1654 | <li> The target <tt>`make wininstaller'</tt> can be used to create a
|
---|
1655 | Nullsoft based Windows installer for FFmpeg and FFplay. <tt>`SDL.dll'</tt>
|
---|
1656 | must be copied to the FFmpeg directory in order to build the
|
---|
1657 | installer.
|
---|
1658 |
|
---|
1659 | </li><li> By using <code>./configure --enable-shared</code> when configuring FFmpeg,
|
---|
1660 | you can build <tt>`avcodec.dll'</tt> and <tt>`avformat.dll'</tt>. With
|
---|
1661 | <code>make install</code> you install the FFmpeg DLLs and the associated
|
---|
1662 | headers in <tt>`Program Files/FFmpeg'</tt>.
|
---|
1663 |
|
---|
1664 | </li><li> Visual C++ compatibility: If you used <code>./configure --enable-shared</code>
|
---|
1665 | when configuring FFmpeg, FFmpeg tries to use the Microsoft Visual
|
---|
1666 | C++ <code>lib</code> tool to build <code>avcodec.lib</code> and
|
---|
1667 | <code>avformat.lib</code>. With these libraries you can link your Visual C++
|
---|
1668 | code directly with the FFmpeg DLLs (see below).
|
---|
1669 |
|
---|
1670 | </li></ul>
|
---|
1671 |
|
---|
1672 | <hr size="6">
|
---|
1673 | <a name="SEC26"></a>
|
---|
1674 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1675 | <tr><td valign="middle" align="left">[<a href="#SEC25" title="Previous section in reading order"> < </a>]</td>
|
---|
1676 | <td valign="middle" align="left">[<a href="#SEC27" title="Next section in reading order"> > </a>]</td>
|
---|
1677 | <td valign="middle" align="left"> </td>
|
---|
1678 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1679 | <td valign="middle" align="left">[<a href="#SEC24" title="Up section"> Up </a>]</td>
|
---|
1680 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1681 | <td valign="middle" align="left"> </td>
|
---|
1682 | <td valign="middle" align="left"> </td>
|
---|
1683 | <td valign="middle" align="left"> </td>
|
---|
1684 | <td valign="middle" align="left"> </td>
|
---|
1685 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1686 | <td valign="middle" align="left">[Contents]</td>
|
---|
1687 | <td valign="middle" align="left">[Index]</td>
|
---|
1688 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1689 | </tr></table>
|
---|
1690 | <h3 class="subsection"> 6.3.2 Visual C++ compatibility </h3>
|
---|
1691 |
|
---|
1692 | <p>FFmpeg will not compile under Visual C++ - and it has too many
|
---|
1693 | dependencies on the GCC compiler to make a port viable. However,
|
---|
1694 | if you want to use the FFmpeg libraries in your own applications,
|
---|
1695 | you can still compile those applications using Visual C++. An
|
---|
1696 | important restriction to this is that you have to use the
|
---|
1697 | dynamically linked versions of the FFmpeg libraries (i.e. the
|
---|
1698 | DLLs), and you have to make sure that Visual-C++-compatible
|
---|
1699 | import libraries are created during the FFmpeg build process.
|
---|
1700 | </p>
|
---|
1701 | <p>This description of how to use the FFmpeg libraries with Visual C++ is
|
---|
1702 | based on Visual C++ 2005 Express Edition Beta 2. If you have a different
|
---|
1703 | version, you might have to modify the procedures slightly.
|
---|
1704 | </p>
|
---|
1705 | <p>Here are the step-by-step instructions for building the FFmpeg libraries
|
---|
1706 | so they can be used with Visual C++:
|
---|
1707 | </p>
|
---|
1708 | <ol>
|
---|
1709 | <li> Install Visual C++ (if you haven't done so already).
|
---|
1710 |
|
---|
1711 | </li><li> Install MinGW and MSYS as described above.
|
---|
1712 |
|
---|
1713 | </li><li> Add a call to <tt>`vcvars32.bat'</tt> (which sets up the environment
|
---|
1714 | variables for the Visual C++ tools) as the first line of
|
---|
1715 | <tt>`msys.bat'</tt>. The standard location for <tt>`vcvars32.bat'</tt> is
|
---|
1716 | <tt>`C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat'</tt>,
|
---|
1717 | and the standard location for <tt>`msys.bat'</tt> is
|
---|
1718 | <tt>`C:\msys\1.0\msys.bat'</tt>. If this corresponds to your setup, add the
|
---|
1719 | following line as the first line of <tt>`msys.bat'</tt>:
|
---|
1720 |
|
---|
1721 | <p><code>call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"</code>
|
---|
1722 | </p>
|
---|
1723 | </li><li> Start the MSYS shell (file <tt>`msys.bat'</tt>) and type <code>link.exe</code>.
|
---|
1724 | If you get a help message with the command line options of <code>link.exe</code>,
|
---|
1725 | this means your environment variables are set up correctly, the
|
---|
1726 | Microsoft linker is on the path and will be used by FFmpeg to
|
---|
1727 | create Visual-C++-compatible import libraries.
|
---|
1728 |
|
---|
1729 | </li><li> Extract the current version of FFmpeg and change to the FFmpeg directory.
|
---|
1730 |
|
---|
1731 | </li><li> Type the command
|
---|
1732 | <code>./configure --enable-shared --disable-static --enable-memalign-hack</code>
|
---|
1733 | to configure and, if that didn't produce any errors,
|
---|
1734 | type <code>make</code> to build FFmpeg.
|
---|
1735 |
|
---|
1736 | </li><li> The subdirectories <tt>`libavformat'</tt>, <tt>`libavcodec'</tt>, and
|
---|
1737 | <tt>`libavutil'</tt> should now contain the files <tt>`avformat.dll'</tt>,
|
---|
1738 | <tt>`avformat.lib'</tt>, <tt>`avcodec.dll'</tt>, <tt>`avcodec.lib'</tt>,
|
---|
1739 | <tt>`avutil.dll'</tt>, and <tt>`avutil.lib'</tt>, respectively. Copy the three
|
---|
1740 | DLLs to your System32 directory (typically <tt>`C:\Windows\System32'</tt>).
|
---|
1741 |
|
---|
1742 | </li></ol>
|
---|
1743 |
|
---|
1744 | <p>And here is how to use these libraries with Visual C++:
|
---|
1745 | </p>
|
---|
1746 | <ol>
|
---|
1747 | <li> Create a new console application ("File / New / Project") and then
|
---|
1748 | select "Win32 Console Application". On the appropriate page of the
|
---|
1749 | Application Wizard, uncheck the "Precompiled headers" option.
|
---|
1750 |
|
---|
1751 | </li><li> Write the source code for your application, or, for testing, just
|
---|
1752 | copy the code from an existing sample application into the source file
|
---|
1753 | that Visual C++ has already created for you. (Note that your source
|
---|
1754 | filehas to have a <code>.cpp</code> extension; otherwise, Visual C++ won't
|
---|
1755 | compile the FFmpeg headers correctly because in C mode, it doesn't
|
---|
1756 | recognize the <code>inline</code> keyword.) For example, you can copy
|
---|
1757 | <tt>`output_example.c'</tt> from the FFmpeg distribution (but you will
|
---|
1758 | have to make minor modifications so the code will compile under
|
---|
1759 | C++, see below).
|
---|
1760 |
|
---|
1761 | </li><li> Open the "Project / Properties" dialog box. In the "Configuration"
|
---|
1762 | combo box, select "All Configurations" so that the changes you make will
|
---|
1763 | affect both debug and release builds. In the tree view on the left hand
|
---|
1764 | side, select "C/C++ / General", then edit the "Additional Include
|
---|
1765 | Directories" setting to contain the complete paths to the
|
---|
1766 | <tt>`libavformat'</tt>, <tt>`libavcodec'</tt>, and <tt>`libavutil'</tt>
|
---|
1767 | subdirectories of your FFmpeg directory. Note that the directories have
|
---|
1768 | to be separated using semicolons. Now select "Linker / General" from the
|
---|
1769 | tree view and edit the "Additional Library Directories" setting to
|
---|
1770 | contain the same three directories.
|
---|
1771 |
|
---|
1772 | </li><li> Still in the "Project / Properties" dialog box, select "Linker / Input"
|
---|
1773 | from the tree view, then add the files <tt>`avformat.lib'</tt>,
|
---|
1774 | <tt>`avcodec.lib'</tt>, and <tt>`avutil.lib'</tt> to the end of the "Additional
|
---|
1775 | Dependencies". Note that the names of the libraries have to be separated
|
---|
1776 | using spaces.
|
---|
1777 |
|
---|
1778 | </li><li> Now, select "C/C++ / Code Generation" from the tree view. Select
|
---|
1779 | "Debug" in the "Configuration" combo box. Make sure that "Runtime
|
---|
1780 | Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in
|
---|
1781 | the "Configuration" combo box and make sure that "Runtime Library" is
|
---|
1782 | set to "Multi-threaded DLL".
|
---|
1783 |
|
---|
1784 | </li><li> Click "OK" to close the "Project / Properties" dialog box and build
|
---|
1785 | the application. Hopefully, it should compile and run cleanly. If you
|
---|
1786 | used <tt>`output_example.c'</tt> as your sample application, you will get a
|
---|
1787 | few compiler errors, but they are easy to fix. The first type of error
|
---|
1788 | occurs because Visual C++ doesn't allow an <code>int</code> to be converted to
|
---|
1789 | an <code>enum</code> without a cast. To solve the problem, insert the required
|
---|
1790 | casts (this error occurs once for a <code>CodecID</code> and once for a
|
---|
1791 | <code>CodecType</code>). The second type of error occurs because C++ requires
|
---|
1792 | the return value of <code>malloc</code> to be cast to the exact type of the
|
---|
1793 | pointer it is being assigned to. Visual C++ will complain that, for
|
---|
1794 | example, <code>(void *)</code> is being assigned to <code>(uint8_t *)</code> without
|
---|
1795 | an explicit cast. So insert an explicit cast in these places to silence
|
---|
1796 | the compiler. The third type of error occurs because the <code>snprintf</code>
|
---|
1797 | library function is called <code>_snprintf</code> under Visual C++. So just
|
---|
1798 | add an underscore to fix the problem. With these changes,
|
---|
1799 | <tt>`output_example.c'</tt> should compile under Visual C++, and the
|
---|
1800 | resulting executable should produce valid video files.
|
---|
1801 |
|
---|
1802 | </li></ol>
|
---|
1803 |
|
---|
1804 | <hr size="6">
|
---|
1805 | <a name="SEC27"></a>
|
---|
1806 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1807 | <tr><td valign="middle" align="left">[<a href="#SEC26" title="Previous section in reading order"> < </a>]</td>
|
---|
1808 | <td valign="middle" align="left">[<a href="#SEC28" title="Next section in reading order"> > </a>]</td>
|
---|
1809 | <td valign="middle" align="left"> </td>
|
---|
1810 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1811 | <td valign="middle" align="left">[<a href="#SEC24" title="Up section"> Up </a>]</td>
|
---|
1812 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1813 | <td valign="middle" align="left"> </td>
|
---|
1814 | <td valign="middle" align="left"> </td>
|
---|
1815 | <td valign="middle" align="left"> </td>
|
---|
1816 | <td valign="middle" align="left"> </td>
|
---|
1817 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1818 | <td valign="middle" align="left">[Contents]</td>
|
---|
1819 | <td valign="middle" align="left">[Index]</td>
|
---|
1820 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1821 | </tr></table>
|
---|
1822 | <h3 class="subsection"> 6.3.3 Cross compilation for Windows with Linux </h3>
|
---|
1823 |
|
---|
1824 | <p>You must use the MinGW cross compilation tools available at
|
---|
1825 | <a href="http://www.mingw.org/">http://www.mingw.org/</a>.
|
---|
1826 | </p>
|
---|
1827 | <p>Then configure FFmpeg with the following options:
|
---|
1828 | </p><table><tr><td> </td><td><pre class="example">./configure --enable-mingw32 --cross-prefix=i386-mingw32msvc-
|
---|
1829 | </pre></td></tr></table><p>(you can change the cross-prefix according to the prefix chosen for the
|
---|
1830 | MinGW tools).
|
---|
1831 | </p>
|
---|
1832 | <p>Then you can easily test FFmpeg with Wine
|
---|
1833 | (<a href="http://www.winehq.com/">http://www.winehq.com/</a>).
|
---|
1834 | </p>
|
---|
1835 | <hr size="6">
|
---|
1836 | <a name="SEC28"></a>
|
---|
1837 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1838 | <tr><td valign="middle" align="left">[<a href="#SEC27" title="Previous section in reading order"> < </a>]</td>
|
---|
1839 | <td valign="middle" align="left">[<a href="#SEC29" title="Next section in reading order"> > </a>]</td>
|
---|
1840 | <td valign="middle" align="left"> </td>
|
---|
1841 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1842 | <td valign="middle" align="left">[<a href="#SEC21" title="Up section"> Up </a>]</td>
|
---|
1843 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1844 | <td valign="middle" align="left"> </td>
|
---|
1845 | <td valign="middle" align="left"> </td>
|
---|
1846 | <td valign="middle" align="left"> </td>
|
---|
1847 | <td valign="middle" align="left"> </td>
|
---|
1848 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1849 | <td valign="middle" align="left">[Contents]</td>
|
---|
1850 | <td valign="middle" align="left">[Index]</td>
|
---|
1851 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1852 | </tr></table>
|
---|
1853 | <h2 class="section"> 6.4 Mac OS X </h2>
|
---|
1854 |
|
---|
1855 | <hr size="6">
|
---|
1856 | <a name="SEC29"></a>
|
---|
1857 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1858 | <tr><td valign="middle" align="left">[<a href="#SEC28" title="Previous section in reading order"> < </a>]</td>
|
---|
1859 | <td valign="middle" align="left">[<a href="#SEC30" title="Next section in reading order"> > </a>]</td>
|
---|
1860 | <td valign="middle" align="left"> </td>
|
---|
1861 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1862 | <td valign="middle" align="left">[<a href="#SEC21" title="Up section"> Up </a>]</td>
|
---|
1863 | <td valign="middle" align="left">[<a href="#SEC30" title="Next chapter"> >> </a>]</td>
|
---|
1864 | <td valign="middle" align="left"> </td>
|
---|
1865 | <td valign="middle" align="left"> </td>
|
---|
1866 | <td valign="middle" align="left"> </td>
|
---|
1867 | <td valign="middle" align="left"> </td>
|
---|
1868 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1869 | <td valign="middle" align="left">[Contents]</td>
|
---|
1870 | <td valign="middle" align="left">[Index]</td>
|
---|
1871 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1872 | </tr></table>
|
---|
1873 | <h2 class="section"> 6.5 BeOS </h2>
|
---|
1874 |
|
---|
1875 | <p>The configure script should guess the configuration itself.
|
---|
1876 | Networking support is currently not finished.
|
---|
1877 | errno issues fixed by Andrew Bachmann.
|
---|
1878 | </p>
|
---|
1879 | <p>Old stuff:
|
---|
1880 | </p>
|
---|
1881 | <p>François Revol - revol at free dot fr - April 2002
|
---|
1882 | </p>
|
---|
1883 | <p>The configure script should guess the configuration itself,
|
---|
1884 | however I still didn't test building on the net_server version of BeOS.
|
---|
1885 | </p>
|
---|
1886 | <p>FFserver is broken (needs poll() implementation).
|
---|
1887 | </p>
|
---|
1888 | <p>There are still issues with errno codes, which are negative in BeOS, and
|
---|
1889 | that FFmpeg negates when returning. This ends up turning errors into
|
---|
1890 | valid results, then crashes.
|
---|
1891 | (To be fixed)
|
---|
1892 | </p>
|
---|
1893 | <hr size="6">
|
---|
1894 | <a name="SEC30"></a>
|
---|
1895 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1896 | <tr><td valign="middle" align="left">[<a href="#SEC29" title="Previous section in reading order"> < </a>]</td>
|
---|
1897 | <td valign="middle" align="left">[<a href="#SEC31" title="Next section in reading order"> > </a>]</td>
|
---|
1898 | <td valign="middle" align="left"> </td>
|
---|
1899 | <td valign="middle" align="left">[<a href="#SEC21" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1900 | <td valign="middle" align="left">[<a href="#SEC1" title="Up section"> Up </a>]</td>
|
---|
1901 | <td valign="middle" align="left">[ >> ]</td>
|
---|
1902 | <td valign="middle" align="left"> </td>
|
---|
1903 | <td valign="middle" align="left"> </td>
|
---|
1904 | <td valign="middle" align="left"> </td>
|
---|
1905 | <td valign="middle" align="left"> </td>
|
---|
1906 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1907 | <td valign="middle" align="left">[Contents]</td>
|
---|
1908 | <td valign="middle" align="left">[Index]</td>
|
---|
1909 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1910 | </tr></table>
|
---|
1911 | <h1 class="chapter"> 7. Developers Guide </h1>
|
---|
1912 |
|
---|
1913 | <hr size="6">
|
---|
1914 | <a name="SEC31"></a>
|
---|
1915 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1916 | <tr><td valign="middle" align="left">[<a href="#SEC30" title="Previous section in reading order"> < </a>]</td>
|
---|
1917 | <td valign="middle" align="left">[<a href="#SEC32" title="Next section in reading order"> > </a>]</td>
|
---|
1918 | <td valign="middle" align="left"> </td>
|
---|
1919 | <td valign="middle" align="left">[<a href="#SEC30" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1920 | <td valign="middle" align="left">[<a href="#SEC30" title="Up section"> Up </a>]</td>
|
---|
1921 | <td valign="middle" align="left">[ >> ]</td>
|
---|
1922 | <td valign="middle" align="left"> </td>
|
---|
1923 | <td valign="middle" align="left"> </td>
|
---|
1924 | <td valign="middle" align="left"> </td>
|
---|
1925 | <td valign="middle" align="left"> </td>
|
---|
1926 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1927 | <td valign="middle" align="left">[Contents]</td>
|
---|
1928 | <td valign="middle" align="left">[Index]</td>
|
---|
1929 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1930 | </tr></table>
|
---|
1931 | <h2 class="section"> 7.1 API </h2>
|
---|
1932 | <ul class="toc">
|
---|
1933 | <li> libavcodec is the library containing the codecs (both encoding and
|
---|
1934 | decoding). Look at <tt>`libavcodec/apiexample.c'</tt> to see how to use it.
|
---|
1935 |
|
---|
1936 | </li><li> libavformat is the library containing the file format handling (mux and
|
---|
1937 | demux code for several formats). Look at <tt>`ffplay.c'</tt> to use it in a
|
---|
1938 | player. See <tt>`output_example.c'</tt> to use it to generate audio or video
|
---|
1939 | streams.
|
---|
1940 |
|
---|
1941 | </li></ul>
|
---|
1942 |
|
---|
1943 | <hr size="6">
|
---|
1944 | <a name="SEC32"></a>
|
---|
1945 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1946 | <tr><td valign="middle" align="left">[<a href="#SEC31" title="Previous section in reading order"> < </a>]</td>
|
---|
1947 | <td valign="middle" align="left">[<a href="#SEC33" title="Next section in reading order"> > </a>]</td>
|
---|
1948 | <td valign="middle" align="left"> </td>
|
---|
1949 | <td valign="middle" align="left">[<a href="#SEC30" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1950 | <td valign="middle" align="left">[<a href="#SEC30" title="Up section"> Up </a>]</td>
|
---|
1951 | <td valign="middle" align="left">[ >> ]</td>
|
---|
1952 | <td valign="middle" align="left"> </td>
|
---|
1953 | <td valign="middle" align="left"> </td>
|
---|
1954 | <td valign="middle" align="left"> </td>
|
---|
1955 | <td valign="middle" align="left"> </td>
|
---|
1956 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1957 | <td valign="middle" align="left">[Contents]</td>
|
---|
1958 | <td valign="middle" align="left">[Index]</td>
|
---|
1959 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1960 | </tr></table>
|
---|
1961 | <h2 class="section"> 7.2 Integrating libavcodec or libavformat in your program </h2>
|
---|
1962 |
|
---|
1963 | <p>You can integrate all the source code of the libraries to link them
|
---|
1964 | statically to avoid any version problem. All you need is to provide a
|
---|
1965 | 'config.mak' and a 'config.h' in the parent directory. See the defines
|
---|
1966 | generated by ./configure to understand what is needed.
|
---|
1967 | </p>
|
---|
1968 | <p>You can use libavcodec or libavformat in your commercial program, but
|
---|
1969 | <em>any patch you make must be published</em>. The best way to proceed is
|
---|
1970 | to send your patches to the FFmpeg mailing list.
|
---|
1971 | </p>
|
---|
1972 | <hr size="6">
|
---|
1973 | <a name="Coding-Rules"></a>
|
---|
1974 | <a name="SEC33"></a>
|
---|
1975 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
1976 | <tr><td valign="middle" align="left">[<a href="#SEC32" title="Previous section in reading order"> < </a>]</td>
|
---|
1977 | <td valign="middle" align="left">[<a href="#SEC34" title="Next section in reading order"> > </a>]</td>
|
---|
1978 | <td valign="middle" align="left"> </td>
|
---|
1979 | <td valign="middle" align="left">[<a href="#SEC30" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
1980 | <td valign="middle" align="left">[<a href="#SEC30" title="Up section"> Up </a>]</td>
|
---|
1981 | <td valign="middle" align="left">[ >> ]</td>
|
---|
1982 | <td valign="middle" align="left"> </td>
|
---|
1983 | <td valign="middle" align="left"> </td>
|
---|
1984 | <td valign="middle" align="left"> </td>
|
---|
1985 | <td valign="middle" align="left"> </td>
|
---|
1986 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
1987 | <td valign="middle" align="left">[Contents]</td>
|
---|
1988 | <td valign="middle" align="left">[Index]</td>
|
---|
1989 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
1990 | </tr></table>
|
---|
1991 | <h2 class="section"> 7.3 Coding Rules </h2>
|
---|
1992 |
|
---|
1993 | <p>FFmpeg is programmed in the ISO C90 language with a few additional
|
---|
1994 | features from ISO C99, namely:
|
---|
1995 | </p><ul>
|
---|
1996 | <li>
|
---|
1997 | the <samp>`inline'</samp> keyword;
|
---|
1998 | </li><li>
|
---|
1999 | <samp>`//'</samp> comments;
|
---|
2000 | </li><li>
|
---|
2001 | designated struct initializers (<samp>`struct s x = { .i = 17 };'</samp>)
|
---|
2002 | </li><li>
|
---|
2003 | compound literals (<samp>`x = (struct s) { 17, 23 };'</samp>)
|
---|
2004 | </li></ul>
|
---|
2005 |
|
---|
2006 | <p>These features are supported by all compilers we care about, so we won't
|
---|
2007 | accept patches to remove their use unless they absolutely don't impair
|
---|
2008 | clarity and performance.
|
---|
2009 | </p>
|
---|
2010 | <p>All code must compile with GCC 2.95 and GCC 3.3. Currently, FFmpeg also
|
---|
2011 | compiles with several other compilers, such as the Compaq ccc compiler
|
---|
2012 | or Sun Studio 9, and we would like to keep it that way unless it would
|
---|
2013 | be exceedingly involved. To ensure compatibility, please don't use any
|
---|
2014 | additional C99 features or GCC extensions. Especially watch out for:
|
---|
2015 | </p><ul>
|
---|
2016 | <li>
|
---|
2017 | mixing statements and declarations;
|
---|
2018 | </li><li>
|
---|
2019 | <samp>`long long'</samp> (use <samp>`int64_t'</samp> instead);
|
---|
2020 | </li><li>
|
---|
2021 | <samp>`__attribute__'</samp> not protected by <samp>`#ifdef __GNUC__'</samp> or similar;
|
---|
2022 | </li><li>
|
---|
2023 | GCC statement expressions (<samp>`(x = ({ int y = 4; y; })'</samp>).
|
---|
2024 | </li></ul>
|
---|
2025 |
|
---|
2026 | <p>Indent size is 4.
|
---|
2027 | The presentation is the one specified by 'indent -i4 -kr -nut'.
|
---|
2028 | The TAB character is forbidden outside of Makefiles as is any
|
---|
2029 | form of trailing whitespace. Commits containing either will be
|
---|
2030 | rejected by the Subversion repository.
|
---|
2031 | </p>
|
---|
2032 | <p>Main priority in FFmpeg is simplicity and small code size (=less
|
---|
2033 | bugs).
|
---|
2034 | </p>
|
---|
2035 | <p>Comments: Use the JavaDoc/Doxygen
|
---|
2036 | format (see examples below) so that code documentation
|
---|
2037 | can be generated automatically. All nontrivial functions should have a comment
|
---|
2038 | above them explaining what the function does, even if it's just one sentence.
|
---|
2039 | All structures and their member variables should be documented, too.
|
---|
2040 | </p><table><tr><td> </td><td><pre class="example">/**
|
---|
2041 | * @file mpeg.c
|
---|
2042 | * MPEG codec.
|
---|
2043 | * @author ...
|
---|
2044 | */
|
---|
2045 |
|
---|
2046 | /**
|
---|
2047 | * Summary sentence.
|
---|
2048 | * more text ...
|
---|
2049 | * ...
|
---|
2050 | */
|
---|
2051 | typedef struct Foobar{
|
---|
2052 | int var1; /**< var1 description */
|
---|
2053 | int var2; ///< var2 description
|
---|
2054 | /** var3 description */
|
---|
2055 | int var3;
|
---|
2056 | } Foobar;
|
---|
2057 |
|
---|
2058 | /**
|
---|
2059 | * Summary sentence.
|
---|
2060 | * more text ...
|
---|
2061 | * ...
|
---|
2062 | * @param my_parameter description of my_parameter
|
---|
2063 | * @return return value description
|
---|
2064 | */
|
---|
2065 | int myfunc(int my_parameter)
|
---|
2066 | ...
|
---|
2067 | </pre></td></tr></table>
|
---|
2068 | <p>fprintf and printf are forbidden in libavformat and libavcodec,
|
---|
2069 | please use av_log() instead.
|
---|
2070 | </p>
|
---|
2071 | <hr size="6">
|
---|
2072 | <a name="Development-Policy"></a>
|
---|
2073 | <a name="SEC34"></a>
|
---|
2074 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
2075 | <tr><td valign="middle" align="left">[<a href="#SEC33" title="Previous section in reading order"> < </a>]</td>
|
---|
2076 | <td valign="middle" align="left">[<a href="#SEC35" title="Next section in reading order"> > </a>]</td>
|
---|
2077 | <td valign="middle" align="left"> </td>
|
---|
2078 | <td valign="middle" align="left">[<a href="#SEC30" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
2079 | <td valign="middle" align="left">[<a href="#SEC30" title="Up section"> Up </a>]</td>
|
---|
2080 | <td valign="middle" align="left">[ >> ]</td>
|
---|
2081 | <td valign="middle" align="left"> </td>
|
---|
2082 | <td valign="middle" align="left"> </td>
|
---|
2083 | <td valign="middle" align="left"> </td>
|
---|
2084 | <td valign="middle" align="left"> </td>
|
---|
2085 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
2086 | <td valign="middle" align="left">[Contents]</td>
|
---|
2087 | <td valign="middle" align="left">[Index]</td>
|
---|
2088 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
2089 | </tr></table>
|
---|
2090 | <h2 class="section"> 7.4 Development Policy </h2>
|
---|
2091 |
|
---|
2092 | <ol>
|
---|
2093 | <li>
|
---|
2094 | You must not commit code which breaks FFmpeg! (Meaning unfinished but
|
---|
2095 | enabled code which breaks compilation or compiles but does not work or
|
---|
2096 | breaks the regression tests)
|
---|
2097 | You can commit unfinished stuff (for testing etc), but it must be disabled
|
---|
2098 | (#ifdef etc) by default so it does not interfere with other developers'
|
---|
2099 | work.
|
---|
2100 | </li><li>
|
---|
2101 | You don't have to over-test things. If it works for you, and you think it
|
---|
2102 | should work for others, then commit. If your code has problems
|
---|
2103 | (portability, triggers compiler bugs, unusual environment etc) they will be
|
---|
2104 | reported and eventually fixed.
|
---|
2105 | </li><li>
|
---|
2106 | Do not commit unrelated changes together, split them into self-contained
|
---|
2107 | pieces.
|
---|
2108 | </li><li>
|
---|
2109 | Do not change behavior of the program (renaming options etc) without
|
---|
2110 | first discussing it on the ffmpeg-devel mailing list. Do not remove
|
---|
2111 | functionality from the code. Just improve!
|
---|
2112 |
|
---|
2113 | <p> Note: Redundant code can be removed.
|
---|
2114 | </p></li><li>
|
---|
2115 | Do not commit changes to the build system (Makefiles, configure script)
|
---|
2116 | which change behavior, defaults etc, without asking first. The same
|
---|
2117 | applies to compiler warning fixes, trivial looking fixes and to code
|
---|
2118 | maintained by other developers. We usually have a reason for doing things
|
---|
2119 | the way we do. Send your changes as patches to the ffmpeg-devel mailing
|
---|
2120 | list, and if the code maintainers say OK, you may commit. This does not
|
---|
2121 | apply to files you wrote and/or maintain.
|
---|
2122 | </li><li>
|
---|
2123 | We refuse source indentation and other cosmetic changes if they are mixed
|
---|
2124 | with functional changes, such commits will be rejected and removed. Every
|
---|
2125 | developer has his own indentation style, you should not change it. Of course
|
---|
2126 | if you (re)write something, you can use your own style, even though we would
|
---|
2127 | prefer if the indentation throughout FFmpeg was consistent (Many projects
|
---|
2128 | force a given indentation style - we don't.). If you really need to make
|
---|
2129 | indentation changes (try to avoid this), separate them strictly from real
|
---|
2130 | changes.
|
---|
2131 |
|
---|
2132 | <p> NOTE: If you had to put if(){ .. } over a large (> 5 lines) chunk of code,
|
---|
2133 | then either do NOT change the indentation of the inner part within (don't
|
---|
2134 | move it to the right)! or do so in a separate commit
|
---|
2135 | </p></li><li>
|
---|
2136 | Always fill out the commit log message. Describe in a few lines what you
|
---|
2137 | changed and why. You can refer to mailing list postings if you fix a
|
---|
2138 | particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
|
---|
2139 | </li><li>
|
---|
2140 | If you apply a patch by someone else, include the name and email address in
|
---|
2141 | the log message. Since the ffmpeg-cvslog mailing list is publicly
|
---|
2142 | archived you should add some SPAM protection to the email address. Send an
|
---|
2143 | answer to ffmpeg-devel (or wherever you got the patch from) saying that
|
---|
2144 | you applied the patch.
|
---|
2145 | </li><li>
|
---|
2146 | Do NOT commit to code actively maintained by others without permission. Send
|
---|
2147 | a patch to ffmpeg-devel instead.
|
---|
2148 | </li><li>
|
---|
2149 | Subscribe to the ffmpeg-cvslog mailing list. The diffs of all commits
|
---|
2150 | are sent there and reviewed by all the other developers. Bugs and possible
|
---|
2151 | improvements or general questions regarding commits are discussed there. We
|
---|
2152 | expect you to react if problems with your code are uncovered.
|
---|
2153 | </li><li>
|
---|
2154 | Update the documentation if you change behavior or add features. If you are
|
---|
2155 | unsure how best to do this, send a patch to ffmpeg-devel, the documentation
|
---|
2156 | maintainer(s) will review and commit your stuff.
|
---|
2157 | </li><li>
|
---|
2158 | Never write to unallocated memory, never write over the end of arrays,
|
---|
2159 | always check values read from some untrusted source before using them
|
---|
2160 | as array index or other risky things.
|
---|
2161 | </li><li>
|
---|
2162 | Remember to check if you need to bump versions for the specific libav
|
---|
2163 | parts (libavutil, libavcodec, libavformat) you are changing. You need
|
---|
2164 | to change the version integer and the version string.
|
---|
2165 | Incrementing the first component means no backward compatibility to
|
---|
2166 | previous versions (e.g. removal of a function).
|
---|
2167 | Incrementing the second component means backward compatible change
|
---|
2168 | (e.g. addition of a function).
|
---|
2169 | Incrementing the third component means a noteworthy binary compatible
|
---|
2170 | change (e.g. encoder bug fix that matters for the decoder).
|
---|
2171 | </li><li>
|
---|
2172 | If you add a new codec, remember to update the changelog, add it to
|
---|
2173 | the supported codecs table in the documentation and bump the second
|
---|
2174 | component of the <tt>`libavcodec'</tt> version number appropriately. If
|
---|
2175 | it has a fourcc, add it to <tt>`libavformat/avienc.c'</tt>, even if it
|
---|
2176 | is only a decoder.
|
---|
2177 | </li></ol>
|
---|
2178 |
|
---|
2179 | <p>We think our rules are not too hard. If you have comments, contact us.
|
---|
2180 | </p>
|
---|
2181 | <p>Note, these rules are mostly borrowed from the MPlayer project.
|
---|
2182 | </p>
|
---|
2183 | <hr size="6">
|
---|
2184 | <a name="SEC35"></a>
|
---|
2185 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
2186 | <tr><td valign="middle" align="left">[<a href="#SEC34" title="Previous section in reading order"> < </a>]</td>
|
---|
2187 | <td valign="middle" align="left">[<a href="#SEC36" title="Next section in reading order"> > </a>]</td>
|
---|
2188 | <td valign="middle" align="left"> </td>
|
---|
2189 | <td valign="middle" align="left">[<a href="#SEC30" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
2190 | <td valign="middle" align="left">[<a href="#SEC34" title="Up section"> Up </a>]</td>
|
---|
2191 | <td valign="middle" align="left">[ >> ]</td>
|
---|
2192 | <td valign="middle" align="left"> </td>
|
---|
2193 | <td valign="middle" align="left"> </td>
|
---|
2194 | <td valign="middle" align="left"> </td>
|
---|
2195 | <td valign="middle" align="left"> </td>
|
---|
2196 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
2197 | <td valign="middle" align="left">[Contents]</td>
|
---|
2198 | <td valign="middle" align="left">[Index]</td>
|
---|
2199 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
2200 | </tr></table>
|
---|
2201 | <h3 class="subsection"> 7.4.1 Renaming/moving files or content of files </h3>
|
---|
2202 | <p> You CANNOT do that. Post a request for such a change to the mailing list
|
---|
2203 | Do NOT remove & readd a file - it will kill the changelog!!!!
|
---|
2204 | </p>
|
---|
2205 | <hr size="6">
|
---|
2206 | <a name="SEC36"></a>
|
---|
2207 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
2208 | <tr><td valign="middle" align="left">[<a href="#SEC35" title="Previous section in reading order"> < </a>]</td>
|
---|
2209 | <td valign="middle" align="left">[<a href="#SEC37" title="Next section in reading order"> > </a>]</td>
|
---|
2210 | <td valign="middle" align="left"> </td>
|
---|
2211 | <td valign="middle" align="left">[<a href="#SEC30" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
2212 | <td valign="middle" align="left">[<a href="#SEC30" title="Up section"> Up </a>]</td>
|
---|
2213 | <td valign="middle" align="left">[ >> ]</td>
|
---|
2214 | <td valign="middle" align="left"> </td>
|
---|
2215 | <td valign="middle" align="left"> </td>
|
---|
2216 | <td valign="middle" align="left"> </td>
|
---|
2217 | <td valign="middle" align="left"> </td>
|
---|
2218 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
2219 | <td valign="middle" align="left">[Contents]</td>
|
---|
2220 | <td valign="middle" align="left">[Index]</td>
|
---|
2221 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
2222 | </tr></table>
|
---|
2223 | <h2 class="section"> 7.5 Submitting patches </h2>
|
---|
2224 |
|
---|
2225 | <p>First, (see section <a href="#SEC33">Coding Rules</a>) above if you didn't yet.
|
---|
2226 | </p>
|
---|
2227 | <p>When you submit your patch, try to send a unified diff (diff '-up'
|
---|
2228 | option). I cannot read other diffs :-)
|
---|
2229 | </p>
|
---|
2230 | <p>Also please do not submit patches which contain several unrelated changes.
|
---|
2231 | Split them into individual self-contained patches; this makes reviewing
|
---|
2232 | them much easier.
|
---|
2233 | </p>
|
---|
2234 | <p>Run the regression tests before submitting a patch so that you can
|
---|
2235 | verify that there are no big problems.
|
---|
2236 | </p>
|
---|
2237 | <p>Patches should be posted as base64 encoded attachments (or any other
|
---|
2238 | encoding which ensures that the patch won't be trashed during
|
---|
2239 | transmission) to the ffmpeg-devel mailing list, see
|
---|
2240 | <a href="http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel">http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel</a>
|
---|
2241 | </p>
|
---|
2242 | <p>It also helps quite a bit if you tell us what the patch does (for example
|
---|
2243 | 'replaces lrint by lrintf'), and why (for example '*BSD isn't C99 compliant
|
---|
2244 | and has no lrint()')
|
---|
2245 | </p>
|
---|
2246 | <p>We reply to all submitted patches and either apply or reject with some
|
---|
2247 | explanation why, but sometimes we are quite busy so it can take a week or two.
|
---|
2248 | </p>
|
---|
2249 | <hr size="6">
|
---|
2250 | <a name="SEC37"></a>
|
---|
2251 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
2252 | <tr><td valign="middle" align="left">[<a href="#SEC36" title="Previous section in reading order"> < </a>]</td>
|
---|
2253 | <td valign="middle" align="left">[ > ]</td>
|
---|
2254 | <td valign="middle" align="left"> </td>
|
---|
2255 | <td valign="middle" align="left">[<a href="#SEC30" title="Beginning of this chapter or previous chapter"> << </a>]</td>
|
---|
2256 | <td valign="middle" align="left">[<a href="#SEC30" title="Up section"> Up </a>]</td>
|
---|
2257 | <td valign="middle" align="left">[ >> ]</td>
|
---|
2258 | <td valign="middle" align="left"> </td>
|
---|
2259 | <td valign="middle" align="left"> </td>
|
---|
2260 | <td valign="middle" align="left"> </td>
|
---|
2261 | <td valign="middle" align="left"> </td>
|
---|
2262 | <td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
2263 | <td valign="middle" align="left">[Contents]</td>
|
---|
2264 | <td valign="middle" align="left">[Index]</td>
|
---|
2265 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
2266 | </tr></table>
|
---|
2267 | <h2 class="section"> 7.6 Regression tests </h2>
|
---|
2268 |
|
---|
2269 | <p>Before submitting a patch (or committing to the repository), you should at least
|
---|
2270 | test that you did not break anything.
|
---|
2271 | </p>
|
---|
2272 | <p>The regression tests build a synthetic video stream and a synthetic
|
---|
2273 | audio stream. These are then encoded and decoded with all codecs or
|
---|
2274 | formats. The CRC (or MD5) of each generated file is recorded in a
|
---|
2275 | result file. A 'diff' is launched to compare the reference results and
|
---|
2276 | the result file.
|
---|
2277 | </p>
|
---|
2278 | <p>The regression tests then go on to test the FFserver code with a
|
---|
2279 | limited set of streams. It is important that this step runs correctly
|
---|
2280 | as well.
|
---|
2281 | </p>
|
---|
2282 | <p>Run 'make test' to test all the codecs and formats.
|
---|
2283 | </p>
|
---|
2284 | <p>Run 'make fulltest' to test all the codecs, formats and FFserver.
|
---|
2285 | </p>
|
---|
2286 | <p>[Of course, some patches may change the results of the regression tests. In
|
---|
2287 | this case, the reference results of the regression tests shall be modified
|
---|
2288 | accordingly].
|
---|
2289 | </p>
|
---|
2290 | <hr size="6">
|
---|
2291 | <a name="SEC_About"></a>
|
---|
2292 | <table cellpadding="1" cellspacing="1" border="0">
|
---|
2293 | <tr><td valign="middle" align="left">[<a href="#SEC1" title="Cover (top) of document">Top</a>]</td>
|
---|
2294 | <td valign="middle" align="left">[Contents]</td>
|
---|
2295 | <td valign="middle" align="left">[Index]</td>
|
---|
2296 | <td valign="middle" align="left">[<a href="#SEC_About" title="About (help)"> ? </a>]</td>
|
---|
2297 | </tr></table>
|
---|
2298 | <h1>About This Document</h1>
|
---|
2299 | <p>
|
---|
2300 | This document was generated on <i>June, 30 2006</i> using <a href="http://texi2html.cvshome.org/"><i>texi2html 1.76</i></a>.
|
---|
2301 | </p>
|
---|
2302 | <p>
|
---|
2303 | The buttons in the navigation panels have the following meaning:
|
---|
2304 | </p>
|
---|
2305 | <table border="1">
|
---|
2306 | <tr>
|
---|
2307 | <th> Button </th>
|
---|
2308 | <th> Name </th>
|
---|
2309 | <th> Go to </th>
|
---|
2310 | <th> From 1.2.3 go to</th>
|
---|
2311 | </tr>
|
---|
2312 | <tr>
|
---|
2313 | <td align="center"> [ < ] </td>
|
---|
2314 | <td align="center">Back</td>
|
---|
2315 | <td>previous section in reading order</td>
|
---|
2316 | <td>1.2.2</td>
|
---|
2317 | </tr>
|
---|
2318 | <tr>
|
---|
2319 | <td align="center"> [ > ] </td>
|
---|
2320 | <td align="center">Forward</td>
|
---|
2321 | <td>next section in reading order</td>
|
---|
2322 | <td>1.2.4</td>
|
---|
2323 | </tr>
|
---|
2324 | <tr>
|
---|
2325 | <td align="center"> [ << ] </td>
|
---|
2326 | <td align="center">FastBack</td>
|
---|
2327 | <td>beginning of this chapter or previous chapter</td>
|
---|
2328 | <td>1</td>
|
---|
2329 | </tr>
|
---|
2330 | <tr>
|
---|
2331 | <td align="center"> [ Up ] </td>
|
---|
2332 | <td align="center">Up</td>
|
---|
2333 | <td>up section</td>
|
---|
2334 | <td>1.2</td>
|
---|
2335 | </tr>
|
---|
2336 | <tr>
|
---|
2337 | <td align="center"> [ >> ] </td>
|
---|
2338 | <td align="center">FastForward</td>
|
---|
2339 | <td>next chapter</td>
|
---|
2340 | <td>2</td>
|
---|
2341 | </tr>
|
---|
2342 | <tr>
|
---|
2343 | <td align="center"> [Top] </td>
|
---|
2344 | <td align="center">Top</td>
|
---|
2345 | <td>cover (top) of document</td>
|
---|
2346 | <td> </td>
|
---|
2347 | </tr>
|
---|
2348 | <tr>
|
---|
2349 | <td align="center"> [Contents] </td>
|
---|
2350 | <td align="center">Contents</td>
|
---|
2351 | <td>table of contents</td>
|
---|
2352 | <td> </td>
|
---|
2353 | </tr>
|
---|
2354 | <tr>
|
---|
2355 | <td align="center"> [Index] </td>
|
---|
2356 | <td align="center">Index</td>
|
---|
2357 | <td>index</td>
|
---|
2358 | <td> </td>
|
---|
2359 | </tr>
|
---|
2360 | <tr>
|
---|
2361 | <td align="center"> [ ? ] </td>
|
---|
2362 | <td align="center">About</td>
|
---|
2363 | <td>about (help)</td>
|
---|
2364 | <td> </td>
|
---|
2365 | </tr>
|
---|
2366 | </table>
|
---|
2367 |
|
---|
2368 | <p>
|
---|
2369 | where the <strong> Example </strong> assumes that the current position is at <strong> Subsubsection One-Two-Three </strong> of a document of the following structure:
|
---|
2370 | </p>
|
---|
2371 |
|
---|
2372 | <ul>
|
---|
2373 | <li> 1. Section One
|
---|
2374 | <ul>
|
---|
2375 | <li>1.1 Subsection One-One
|
---|
2376 | <ul>
|
---|
2377 | <li>...</li>
|
---|
2378 | </ul>
|
---|
2379 | </li>
|
---|
2380 | <li>1.2 Subsection One-Two
|
---|
2381 | <ul>
|
---|
2382 | <li>1.2.1 Subsubsection One-Two-One</li>
|
---|
2383 | <li>1.2.2 Subsubsection One-Two-Two</li>
|
---|
2384 | <li>1.2.3 Subsubsection One-Two-Three
|
---|
2385 | <strong><== Current Position </strong></li>
|
---|
2386 | <li>1.2.4 Subsubsection One-Two-Four</li>
|
---|
2387 | </ul>
|
---|
2388 | </li>
|
---|
2389 | <li>1.3 Subsection One-Three
|
---|
2390 | <ul>
|
---|
2391 | <li>...</li>
|
---|
2392 | </ul>
|
---|
2393 | </li>
|
---|
2394 | <li>1.4 Subsection One-Four</li>
|
---|
2395 | </ul>
|
---|
2396 | </li>
|
---|
2397 | </ul>
|
---|
2398 |
|
---|
2399 | <hr size="1">
|
---|
2400 | <p>
|
---|
2401 | <font size="-1">
|
---|
2402 | This document was generated on <i>June, 30 2006</i> using <a href="http://texi2html.cvshome.org/"><i>texi2html 1.76</i></a>.
|
---|
2403 | </font>
|
---|
2404 | <br>
|
---|
2405 |
|
---|
2406 | </p>
|
---|
2407 | </body>
|
---|
2408 | </html>
|
---|