Statistics
| Branch: | Revision:

ffmpeg / doc / ffmpeg-doc.texi @ 22b6a24c

History | View | Annotate | Download (26.2 KB)

1 9181577c Fabrice Bellard
\input texinfo @c -*- texinfo -*-
2
3
@settitle FFmpeg Documentation
4
@titlepage
5
@sp 7
6
@center @titlefont{FFmpeg Documentation}
7
@sp 3
8
@end titlepage
9
10
11
@chapter Introduction
12
13
FFmpeg is a very fast video and audio converter. It can also grab from
14
a live audio/video source.
15 115329f1 Diego Biurrun
16 9181577c Fabrice Bellard
The command line interface is designed to be intuitive, in the sense
17 4c5f7207 Diego Biurrun
that FFmpeg tries to figure out all parameters that can possibly be
18
derived automatically. You usually only have to specify the target
19
bitrate you want.
20 9181577c Fabrice Bellard
21
FFmpeg can also convert from any sample rate to any other, and resize
22
video on the fly with a high quality polyphase filter.
23
24
@chapter Quick Start
25
26 e99c4e10 Fabrice Bellard
@c man begin EXAMPLES
27 9181577c Fabrice Bellard
@section Video and Audio grabbing
28
29 cc58300e Ramiro Polla
FFmpeg can grab video and audio from devices given that you specify the input
30
format and device.
31 e99c4e10 Fabrice Bellard
32 9181577c Fabrice Bellard
@example
33 1156c6b0 Ramiro Polla
ffmpeg -f oss -i /dev/dsp -f video4linux2 -i /dev/video0 /tmp/out.mpg
34 9181577c Fabrice Bellard
@end example
35
36 e99c4e10 Fabrice Bellard
Note that you must activate the right video source and channel before
37 4c5f7207 Diego Biurrun
launching FFmpeg with any TV viewer such as xawtv
38 66d82290 Robert Swain
(@url{http://linux.bytesex.org/xawtv/}) by Gerd Knorr. You also
39 4c5f7207 Diego Biurrun
have to set the audio recording levels correctly with a
40 e99c4e10 Fabrice Bellard
standard mixer.
41 9181577c Fabrice Bellard
42 76d2efda Baptiste Coudurier
@section X11 grabbing
43
44 913e4081 Diego Biurrun
FFmpeg can grab the X11 display.
45 76d2efda Baptiste Coudurier
46
@example
47 9e0ab666 Benoit Fouet
ffmpeg -f x11grab -s cif -i :0.0 /tmp/out.mpg
48 76d2efda Baptiste Coudurier
@end example
49
50 913e4081 Diego Biurrun
0.0 is display.screen number of your X11 server, same as
51
the DISPLAY environment variable.
52 76d2efda Baptiste Coudurier
53 0cd4faf9 Panagiotis Issaris
@example
54 9e0ab666 Benoit Fouet
ffmpeg -f x11grab -s cif -i :0.0+10,20 /tmp/out.mpg
55 0cd4faf9 Panagiotis Issaris
@end example
56
57
0.0 is display.screen number of your X11 server, same as the DISPLAY environment
58
variable. 10 is the x-offset and 20 the y-offset for the grabbing.
59
60 6bf40f39 Philip Gladstone
@section Video and Audio file format conversion
61 9181577c Fabrice Bellard
62 4c5f7207 Diego Biurrun
* FFmpeg can use any supported file format and protocol as input:
63 9181577c Fabrice Bellard
64
Examples:
65
66 4c5f7207 Diego Biurrun
* You can use YUV files as input:
67 9181577c Fabrice Bellard
68
@example
69 115329f1 Diego Biurrun
ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
70 9181577c Fabrice Bellard
@end example
71
72 115329f1 Diego Biurrun
It will use the files:
73 9181577c Fabrice Bellard
@example
74 e99c4e10 Fabrice Bellard
/tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
75
/tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
76 9181577c Fabrice Bellard
@end example
77
78 e99c4e10 Fabrice Bellard
The Y files use twice the resolution of the U and V files. They are
79
raw files, without header. They can be generated by all decent video
80
decoders. You must specify the size of the image with the @option{-s} option
81 4c5f7207 Diego Biurrun
if FFmpeg cannot guess it.
82 9181577c Fabrice Bellard
83 4c5f7207 Diego Biurrun
* You can input from a raw YUV420P file:
84 9181577c Fabrice Bellard
85
@example
86 e99c4e10 Fabrice Bellard
ffmpeg -i /tmp/test.yuv /tmp/out.avi
87 9181577c Fabrice Bellard
@end example
88
89 4c5f7207 Diego Biurrun
test.yuv is a file containing raw YUV planar data. Each frame is composed
90
of the Y plane followed by the U and V planes at half vertical and
91 e99c4e10 Fabrice Bellard
horizontal resolution.
92 9181577c Fabrice Bellard
93 4c5f7207 Diego Biurrun
* You can output to a raw YUV420P file:
94 9181577c Fabrice Bellard
95
@example
96 f926cbe7 Michel Bardiaux
ffmpeg -i mydivx.avi hugefile.yuv
97 9181577c Fabrice Bellard
@end example
98
99
* You can set several input files and output files:
100
101
@example
102 e99c4e10 Fabrice Bellard
ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
103 9181577c Fabrice Bellard
@end example
104
105 4c5f7207 Diego Biurrun
Converts the audio file a.wav and the raw YUV video file a.yuv
106
to MPEG file a.mpg.
107 9181577c Fabrice Bellard
108 6bf40f39 Philip Gladstone
* You can also do audio and video conversions at the same time:
109 9181577c Fabrice Bellard
110
@example
111 e99c4e10 Fabrice Bellard
ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
112 9181577c Fabrice Bellard
@end example
113
114 c27c66c3 Benoit Fouet
Converts a.wav to MPEG audio at 22050 Hz sample rate.
115 9181577c Fabrice Bellard
116
* You can encode to several formats at the same time and define a
117 e99c4e10 Fabrice Bellard
mapping from input stream to output streams:
118 9181577c Fabrice Bellard
119
@example
120 5438308f Panagiotis Issaris
ffmpeg -i /tmp/a.wav -ab 64k /tmp/a.mp2 -ab 128k /tmp/b.mp2 -map 0:0 -map 0:0
121 9181577c Fabrice Bellard
@end example
122
123 4c5f7207 Diego Biurrun
Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '-map
124
file:index' specifies which input stream is used for each output
125 e99c4e10 Fabrice Bellard
stream, in the order of the definition of output streams.
126 9181577c Fabrice Bellard
127 831ec935 Diego Biurrun
* You can transcode decrypted VOBs:
128 9181577c Fabrice Bellard
129
@example
130 7b900f2d Diego Biurrun
ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800k -g 300 -bf 2 -acodec libmp3lame -ab 128k snatch.avi
131 9181577c Fabrice Bellard
@end example
132
133 4c5f7207 Diego Biurrun
This is a typical DVD ripping example; the input is a VOB file, the
134
output an AVI file with MPEG-4 video and MP3 audio. Note that in this
135
command we use B-frames so the MPEG-4 stream is DivX5 compatible, and
136
GOP size is 300 which means one intra frame every 10 seconds for 29.97fps
137
input video. Furthermore, the audio stream is MP3-encoded so you need
138 1cc60c47 Diego Biurrun
to enable LAME support by passing @code{--enable-libmp3lame} to configure.
139 4c5f7207 Diego Biurrun
The mapping is particularly useful for DVD transcoding
140 e99c4e10 Fabrice Bellard
to get the desired audio language.
141 9181577c Fabrice Bellard
142 4c5f7207 Diego Biurrun
NOTE: To see the supported input formats, use @code{ffmpeg -formats}.
143 8d36d36e Stefano Sabatini
144 c73d3996 Stefano Sabatini
* You can extract images from a video, or create a video from many images:
145 8d36d36e Stefano Sabatini
146 c73d3996 Stefano Sabatini
For extracting images from a video:
147 8d36d36e Stefano Sabatini
@example
148
ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
149
@end example
150
151
This will extract one video frame per second from the video and will
152
output them in files named @file{foo-001.jpeg}, @file{foo-002.jpeg},
153
etc. Images will be rescaled to fit the new WxH values.
154
155 c73d3996 Stefano Sabatini
If you want to extract just a limited number of frames, you can use the
156
above command in combination with the -vframes or -t option, or in
157
combination with -ss to start extracting from a certain point in time.
158
159
For creating a video from many images:
160
@example
161
ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi
162
@end example
163
164 8d36d36e Stefano Sabatini
The syntax @code{foo-%03d.jpeg} specifies to use a decimal number
165
composed of three digits padded with zeroes to express the sequence
166
number. It is the same syntax supported by the C printf function, but
167
only formats accepting a normal integer are suitable.
168
169 07696497 Stefano Sabatini
* You can put many streams of the same type in the output:
170
171
@example
172
ffmpeg -i test1.avi -i test2.avi -vcodec copy -acodec copy -vcodec copy -acodec copy test12.avi -newvideo -newaudio
173
@end example
174
175
In addition to the first video and audio streams, the resulting
176
output file @file{test12.avi} will contain the second video
177
and the second audio stream found in the input streams list.
178
179
The @code{-newvideo}, @code{-newaudio} and @code{-newsubtitle}
180
options have to be specified immediately after the name of the output
181
file to which you want to add them.
182 e99c4e10 Fabrice Bellard
@c man end
183 9181577c Fabrice Bellard
184
@chapter Invocation
185
186
@section Syntax
187
188 e99c4e10 Fabrice Bellard
The generic syntax is:
189 9181577c Fabrice Bellard
190 115329f1 Diego Biurrun
@example
191 e99c4e10 Fabrice Bellard
@c man begin SYNOPSIS
192 28f88dc8 Michael Niedermayer
ffmpeg [[infile options][@option{-i} @var{infile}]]... @{[outfile options] @var{outfile}@}...
193 e99c4e10 Fabrice Bellard
@c man end
194 9181577c Fabrice Bellard
@end example
195 e99c4e10 Fabrice Bellard
@c man begin DESCRIPTION
196
As a general rule, options are applied to the next specified
197 699e77b1 Víctor Paesa
file. Therefore, order is important, and you can have the same
198 8cc62264 Diego Biurrun
option on the command line multiple times. Each occurrence is
199 699e77b1 Víctor Paesa
then applied to the next input or output file.
200
201 eb10acec Diego Biurrun
* To set the video bitrate of the output file to 64kbit/s:
202 699e77b1 Víctor Paesa
@example
203
ffmpeg -i input.avi -b 64k output.avi
204
@end example
205
206
* To force the frame rate of the output file to 24 fps:
207
@example
208
ffmpeg -i input.avi -r 24 output.avi
209
@end example
210
211 9c170372 tripp
* To force the frame rate of the input file (valid for raw formats only)
212
to 1 fps and the frame rate of the output file to 24 fps:
213 699e77b1 Víctor Paesa
@example
214 9c170372 tripp
ffmpeg -r 1 -i input.m2v -r 24 output.avi
215 699e77b1 Víctor Paesa
@end example
216
217
The format option may be needed for raw input files.
218 9181577c Fabrice Bellard
219 4c5f7207 Diego Biurrun
By default, FFmpeg tries to convert as losslessly as possible: It
220
uses the same audio and video parameters for the outputs as the one
221 e99c4e10 Fabrice Bellard
specified for the inputs.
222
@c man end
223 9181577c Fabrice Bellard
224 e99c4e10 Fabrice Bellard
@c man begin OPTIONS
225 9181577c Fabrice Bellard
@section Main options
226
227 e99c4e10 Fabrice Bellard
@table @option
228 5f6cb6eb Stefano Sabatini
@include fftools-common-opts.texi
229 62d75662 Stefano Sabatini
230 a19caa0f Stefano Sabatini
@item -f @var{fmt}
231 4c5f7207 Diego Biurrun
Force format.
232 18bff752 Fabrice Bellard
233 a19caa0f Stefano Sabatini
@item -i @var{filename}
234 831ec935 Diego Biurrun
input file name
235 9181577c Fabrice Bellard
236 115329f1 Diego Biurrun
@item -y
237 4c5f7207 Diego Biurrun
Overwrite output files.
238 9181577c Fabrice Bellard
239 a19caa0f Stefano Sabatini
@item -t @var{duration}
240 250c5317 Godwin Stewart
Restrict the transcoded/captured video sequence
241
to the duration specified in seconds.
242 4c5f7207 Diego Biurrun
@code{hh:mm:ss[.xxx]} syntax is also supported.
243 9181577c Fabrice Bellard
244 a19caa0f Stefano Sabatini
@item -fs @var{limit_size}
245 4386f941 Diego Biurrun
Set the file size limit.
246
247 a19caa0f Stefano Sabatini
@item -ss @var{position}
248 4c5f7207 Diego Biurrun
Seek to given time position in seconds.
249
@code{hh:mm:ss[.xxx]} syntax is also supported.
250 e83a84ac Benjamin Larsson
251 a19caa0f Stefano Sabatini
@item -itsoffset @var{offset}
252 4386f941 Diego Biurrun
Set the input time offset in seconds.
253
@code{[-]hh:mm:ss[.xxx]} syntax is also supported.
254
This option affects all the input files that follow it.
255
The offset is added to the timestamps of the input files.
256
Specifying a positive offset means that the corresponding
257
streams are delayed by 'offset' seconds.
258
259 a19caa0f Stefano Sabatini
@item -timestamp @var{time}
260 4386f941 Diego Biurrun
Set the timestamp.
261
262 39a4f146 Stefano Sabatini
@item -metadata @var{key}=@var{value}
263 5227bd63 Stefano Sabatini
Set a metadata key/value pair.
264 4386f941 Diego Biurrun
265 edb501c4 Stefano Sabatini
For example, for setting the title in the output file:
266 39a4f146 Stefano Sabatini
@example
267 edb501c4 Stefano Sabatini
ffmpeg -i in.avi -metadata title="my title" out.flv
268 39a4f146 Stefano Sabatini
@end example
269 ec1b10f4 Panagiotis Issaris
270 a19caa0f Stefano Sabatini
@item -v @var{number}
271 53d1bdba Stefano Sabatini
Set the logging verbosity level.
272 4386f941 Diego Biurrun
273 a19caa0f Stefano Sabatini
@item -target @var{type}
274 4386f941 Diego Biurrun
Specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd",
275 4c5f7207 Diego Biurrun
"ntsc-svcd", ... ). All the format options (bitrate, codecs,
276
buffer sizes) are then set automatically. You can just type:
277 99db6420 Fabrice Bellard
278
@example
279
ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
280
@end example
281
282 4c5f7207 Diego Biurrun
Nevertheless you can specify additional options as long as you know
283
they do not conflict with the standard, as in:
284 791d8d1d Michel Bardiaux
285
@example
286
ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
287
@end example
288
289 a19caa0f Stefano Sabatini
@item -dframes @var{number}
290 4386f941 Diego Biurrun
Set the number of data frames to record.
291
292 a19caa0f Stefano Sabatini
@item -scodec @var{codec}
293 4386f941 Diego Biurrun
Force subtitle codec ('copy' to copy stream).
294
295
@item -newsubtitle
296
Add a new subtitle stream to the current output stream.
297
298 a19caa0f Stefano Sabatini
@item -slang @var{code}
299 4386f941 Diego Biurrun
Set the ISO 639 language code (3 letters) of the current subtitle stream.
300 401fbdde Michael Niedermayer
301 9181577c Fabrice Bellard
@end table
302
303
@section Video Options
304
305 e99c4e10 Fabrice Bellard
@table @option
306 a19caa0f Stefano Sabatini
@item -b @var{bitrate}
307 3c0ba870 Panagiotis Issaris
Set the video bitrate in bit/s (default = 200 kb/s).
308 a19caa0f Stefano Sabatini
@item -vframes @var{number}
309 4386f941 Diego Biurrun
Set the number of video frames to record.
310 a19caa0f Stefano Sabatini
@item -r @var{fps}
311 4386f941 Diego Biurrun
Set frame rate (Hz value, fraction or abbreviation), (default = 25).
312 a19caa0f Stefano Sabatini
@item -s @var{size}
313 67053c30 Ivan Kalvachev
Set frame size. The format is @samp{wxh} (ffserver default = 160x128, ffmpeg default = same as source).
314 4c5f7207 Diego Biurrun
The following abbreviations are recognized:
315 5ee03c86 Fabrice Bellard
@table @samp
316 18bff752 Fabrice Bellard
@item sqcif
317
128x96
318
@item qcif
319
176x144
320
@item cif
321
352x288
322
@item 4cif
323
704x576
324 41913a35 Gwenole Beauchesne
@item 16cif
325
1408x1152
326 7d88b5ca Benoit Fouet
@item qqvga
327
160x120
328
@item qvga
329
320x240
330
@item vga
331
640x480
332
@item svga
333
800x600
334
@item xga
335
1024x768
336
@item uxga
337
1600x1200
338
@item qxga
339
2048x1536
340
@item sxga
341
1280x1024
342
@item qsxga
343
2560x2048
344
@item hsxga
345
5120x4096
346
@item wvga
347
852x480
348
@item wxga
349
1366x768
350
@item wsxga
351
1600x1024
352
@item wuxga
353
1920x1200
354
@item woxga
355
2560x1600
356
@item wqsxga
357
3200x2048
358
@item wquxga
359
3840x2400
360
@item whsxga
361
6400x4096
362
@item whuxga
363
7680x4800
364
@item cga
365
320x200
366
@item ega
367
640x350
368
@item hd480
369
852x480
370
@item hd720
371
1280x720
372
@item hd1080
373
1920x1080
374 18bff752 Fabrice Bellard
@end table
375
376 a19caa0f Stefano Sabatini
@item -aspect @var{aspect}
377 4c5f7207 Diego Biurrun
Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).
378 a19caa0f Stefano Sabatini
@item -croptop @var{size}
379 4c5f7207 Diego Biurrun
Set top crop band size (in pixels).
380 a19caa0f Stefano Sabatini
@item -cropbottom @var{size}
381 4c5f7207 Diego Biurrun
Set bottom crop band size (in pixels).
382 a19caa0f Stefano Sabatini
@item -cropleft @var{size}
383 4c5f7207 Diego Biurrun
Set left crop band size (in pixels).
384 a19caa0f Stefano Sabatini
@item -cropright @var{size}
385 4c5f7207 Diego Biurrun
Set right crop band size (in pixels).
386 a19caa0f Stefano Sabatini
@item -padtop @var{size}
387 4c5f7207 Diego Biurrun
Set top pad band size (in pixels).
388 a19caa0f Stefano Sabatini
@item -padbottom @var{size}
389 4c5f7207 Diego Biurrun
Set bottom pad band size (in pixels).
390 a19caa0f Stefano Sabatini
@item -padleft @var{size}
391 4c5f7207 Diego Biurrun
Set left pad band size (in pixels).
392 a19caa0f Stefano Sabatini
@item -padright @var{size}
393 4c5f7207 Diego Biurrun
Set right pad band size (in pixels).
394 a19caa0f Stefano Sabatini
@item -padcolor @var{hex_color}
395 4c5f7207 Diego Biurrun
Set color of padded bands. The value for padcolor is expressed
396
as a six digit hexadecimal number where the first two digits
397
represent red, the middle two digits green and last two digits
398
blue (default = 000000 (black)).
399 9181577c Fabrice Bellard
@item -vn
400 4c5f7207 Diego Biurrun
Disable video recording.
401 a19caa0f Stefano Sabatini
@item -bt @var{tolerance}
402 e3576e25 Jason Garrett-Glaser
Set video bitrate tolerance (in bits, default 4000k).
403
Has a minimum value of: (target_bitrate/target_framerate).
404
In 1-pass mode, bitrate tolerance specifies how far ratecontrol is
405
willing to deviate from the target average bitrate value. This is
406
not related to min/max bitrate. Lowering tolerance too much has
407
an adverse effect on quality.
408 a19caa0f Stefano Sabatini
@item -maxrate @var{bitrate}
409 f754bfb9 Michael Niedermayer
Set max video bitrate (in bit/s).
410 bbc35f51 tripp
Requires -bufsize to be set.
411 a19caa0f Stefano Sabatini
@item -minrate @var{bitrate}
412 f754bfb9 Michael Niedermayer
Set min video bitrate (in bit/s).
413 bbc35f51 tripp
Most useful in setting up a CBR encode:
414
@example
415
ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
416
@end example
417
It is of little use elsewise.
418 a19caa0f Stefano Sabatini
@item -bufsize @var{size}
419 fa78d895 Diego Biurrun
Set video buffer verifier buffer size (in bits).
420 a19caa0f Stefano Sabatini
@item -vcodec @var{codec}
421 4c5f7207 Diego Biurrun
Force video codec to @var{codec}. Use the @code{copy} special value to
422 5ee03c86 Fabrice Bellard
tell that the raw codec data must be copied as is.
423 18bff752 Fabrice Bellard
@item -sameq
424 4c5f7207 Diego Biurrun
Use same video quality as source (implies VBR).
425 9181577c Fabrice Bellard
426 a19caa0f Stefano Sabatini
@item -pass @var{n}
427 c2902c9c Stefano Sabatini
Select the pass number (1 or 2). It is used to do two-pass
428
video encoding. The statistics of the video are recorded in the first
429
pass into a log file (see also the option -passlogfile),
430
and in the second pass that log file is used to generate the video
431
at the exact requested bitrate.
432 850a8d42 Erwan Ducroquet
On pass 1, you may just deactivate audio and set output to null,
433
examples for Windows and Unix:
434
@example
435
ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y NUL
436
ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y /dev/null
437
@end example
438 9181577c Fabrice Bellard
439 44fe7113 Stefano Sabatini
@item -passlogfile @var{prefix}
440
Set two-pass log file name prefix to @var{prefix}, the default file name
441
prefix is ``ffmpeg2pass''. The complete file name will be
442
@file{PREFIX-N.log}, where N is a number specific to the output
443 c2902c9c Stefano Sabatini
stream.
444 9181577c Fabrice Bellard
445 4386f941 Diego Biurrun
@item -newvideo
446
Add a new video stream to the current output stream.
447
448 0fc2c0f6 Matthieu Crapet
@item -vlang @var{code}
449
Set the ISO 639 language code (3 letters) of the current video stream.
450
451 9181577c Fabrice Bellard
@end table
452
453 18bff752 Fabrice Bellard
@section Advanced Video Options
454 9181577c Fabrice Bellard
455 e99c4e10 Fabrice Bellard
@table @option
456 a19caa0f Stefano Sabatini
@item -pix_fmt @var{format}
457 c3b95b1d Stefano Sabatini
Set pixel format. Use 'list' as parameter to show all the supported
458
pixel formats.
459 a19caa0f Stefano Sabatini
@item -sws_flags @var{flags}
460 831ec935 Diego Biurrun
Set SwScaler flags (only available when compiled with swscale support).
461 a19caa0f Stefano Sabatini
@item -g @var{gop_size}
462 4c5f7207 Diego Biurrun
Set the group of pictures size.
463 115329f1 Diego Biurrun
@item -intra
464 4c5f7207 Diego Biurrun
Use only intra frames.
465 a19caa0f Stefano Sabatini
@item -vdt @var{n}
466 4386f941 Diego Biurrun
Discard threshold.
467 a19caa0f Stefano Sabatini
@item -qscale @var{q}
468 4bef236b Diego Biurrun
Use fixed video quantizer scale (VBR).
469 a19caa0f Stefano Sabatini
@item -qmin @var{q}
470 4bef236b Diego Biurrun
minimum video quantizer scale (VBR)
471 a19caa0f Stefano Sabatini
@item -qmax @var{q}
472 4bef236b Diego Biurrun
maximum video quantizer scale (VBR)
473 a19caa0f Stefano Sabatini
@item -qdiff @var{q}
474 4bef236b Diego Biurrun
maximum difference between the quantizer scales (VBR)
475 a19caa0f Stefano Sabatini
@item -qblur @var{blur}
476 3a9b190c tripp
video quantizer scale blur (VBR) (range 0.0 - 1.0)
477 a19caa0f Stefano Sabatini
@item -qcomp @var{compression}
478 3a9b190c tripp
video quantizer scale compression (VBR) (default 0.5).
479
Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0
480 18bff752 Fabrice Bellard
481 a19caa0f Stefano Sabatini
@item -lmin @var{lambda}
482 9ae711e1 Víctor Paesa
minimum video lagrange factor (VBR)
483 a19caa0f Stefano Sabatini
@item -lmax @var{lambda}
484 9ae711e1 Víctor Paesa
max video lagrange factor (VBR)
485 a19caa0f Stefano Sabatini
@item -mblmin @var{lambda}
486 9ae711e1 Víctor Paesa
minimum macroblock quantizer scale (VBR)
487 a19caa0f Stefano Sabatini
@item -mblmax @var{lambda}
488 9ae711e1 Víctor Paesa
maximum macroblock quantizer scale (VBR)
489
490
These four options (lmin, lmax, mblmin, mblmax) use 'lambda' units,
491
but you may use the QP2LAMBDA constant to easily convert from 'q' units:
492
@example
493
ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
494
@end example
495
496 a19caa0f Stefano Sabatini
@item -rc_init_cplx @var{complexity}
497 4c5f7207 Diego Biurrun
initial complexity for single pass encoding
498 a19caa0f Stefano Sabatini
@item -b_qfactor @var{factor}
499 4c5f7207 Diego Biurrun
qp factor between P- and B-frames
500 a19caa0f Stefano Sabatini
@item -i_qfactor @var{factor}
501 4c5f7207 Diego Biurrun
qp factor between P- and I-frames
502 a19caa0f Stefano Sabatini
@item -b_qoffset @var{offset}
503 4c5f7207 Diego Biurrun
qp offset between P- and B-frames
504 a19caa0f Stefano Sabatini
@item -i_qoffset @var{offset}
505 4c5f7207 Diego Biurrun
qp offset between P- and I-frames
506 a19caa0f Stefano Sabatini
@item -rc_eq @var{equation}
507 4c5f7207 Diego Biurrun
Set rate control equation (@pxref{FFmpeg formula
508
evaluator}) (default = @code{tex^qComp}).
509 a19caa0f Stefano Sabatini
@item -rc_override @var{override}
510 5ee03c86 Fabrice Bellard
rate control override for specific intervals
511 a19caa0f Stefano Sabatini
@item -me_method @var{method}
512 4c5f7207 Diego Biurrun
Set motion estimation method to @var{method}.
513
Available methods are (from lowest to best quality):
514 18bff752 Fabrice Bellard
@table @samp
515
@item zero
516 5ee03c86 Fabrice Bellard
Try just the (0, 0) vector.
517 18bff752 Fabrice Bellard
@item phods
518
@item log
519
@item x1
520 c0de00da Stefano Sabatini
@item hex
521
@item umh
522 18bff752 Fabrice Bellard
@item epzs
523
(default method)
524
@item full
525
exhaustive search (slow and marginally better than epzs)
526
@end table
527
528 a19caa0f Stefano Sabatini
@item -dct_algo @var{algo}
529 4c5f7207 Diego Biurrun
Set DCT algorithm to @var{algo}. Available values are:
530 18bff752 Fabrice Bellard
@table @samp
531
@item 0
532
FF_DCT_AUTO (default)
533
@item 1
534
FF_DCT_FASTINT
535
@item 2
536
FF_DCT_INT
537
@item 3
538
FF_DCT_MMX
539
@item 4
540
FF_DCT_MLIB
541
@item 5
542
FF_DCT_ALTIVEC
543
@end table
544
545 a19caa0f Stefano Sabatini
@item -idct_algo @var{algo}
546 4c5f7207 Diego Biurrun
Set IDCT algorithm to @var{algo}. Available values are:
547 18bff752 Fabrice Bellard
@table @samp
548
@item 0
549
FF_IDCT_AUTO (default)
550
@item 1
551 115329f1 Diego Biurrun
FF_IDCT_INT
552 18bff752 Fabrice Bellard
@item 2
553 115329f1 Diego Biurrun
FF_IDCT_SIMPLE
554 18bff752 Fabrice Bellard
@item 3
555 115329f1 Diego Biurrun
FF_IDCT_SIMPLEMMX
556 18bff752 Fabrice Bellard
@item 4
557 115329f1 Diego Biurrun
FF_IDCT_LIBMPEG2MMX
558 18bff752 Fabrice Bellard
@item 5
559 115329f1 Diego Biurrun
FF_IDCT_PS2
560 18bff752 Fabrice Bellard
@item 6
561 115329f1 Diego Biurrun
FF_IDCT_MLIB
562 18bff752 Fabrice Bellard
@item 7
563 115329f1 Diego Biurrun
FF_IDCT_ARM
564 18bff752 Fabrice Bellard
@item 8
565 115329f1 Diego Biurrun
FF_IDCT_ALTIVEC
566 18bff752 Fabrice Bellard
@item 9
567 115329f1 Diego Biurrun
FF_IDCT_SH4
568 18bff752 Fabrice Bellard
@item 10
569 115329f1 Diego Biurrun
FF_IDCT_SIMPLEARM
570 18bff752 Fabrice Bellard
@end table
571
572 a19caa0f Stefano Sabatini
@item -er @var{n}
573 4c5f7207 Diego Biurrun
Set error resilience to @var{n}.
574 18bff752 Fabrice Bellard
@table @samp
575 115329f1 Diego Biurrun
@item 1
576 1471c6c2 Diego Biurrun
FF_ER_CAREFUL (default)
577 18bff752 Fabrice Bellard
@item 2
578 5ee03c86 Fabrice Bellard
FF_ER_COMPLIANT
579 18bff752 Fabrice Bellard
@item 3
580
FF_ER_AGGRESSIVE
581
@item 4
582
FF_ER_VERY_AGGRESSIVE
583
@end table
584
585 a19caa0f Stefano Sabatini
@item -ec @var{bit_mask}
586 4c5f7207 Diego Biurrun
Set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask of
587 5ee03c86 Fabrice Bellard
the following values:
588 18bff752 Fabrice Bellard
@table @samp
589
@item 1
590 4c5f7207 Diego Biurrun
FF_EC_GUESS_MVS (default = enabled)
591 18bff752 Fabrice Bellard
@item 2
592 4c5f7207 Diego Biurrun
FF_EC_DEBLOCK (default = enabled)
593 18bff752 Fabrice Bellard
@end table
594
595 a19caa0f Stefano Sabatini
@item -bf @var{frames}
596 4c5f7207 Diego Biurrun
Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
597 a19caa0f Stefano Sabatini
@item -mbd @var{mode}
598 18bff752 Fabrice Bellard
macroblock decision
599
@table @samp
600
@item 0
601 4c5f7207 Diego Biurrun
FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in FFmpeg).
602 18bff752 Fabrice Bellard
@item 1
603 4c5f7207 Diego Biurrun
FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.
604 18bff752 Fabrice Bellard
@item 2
605 019c8838 Diego Biurrun
FF_MB_DECISION_RD: rate distortion
606 18bff752 Fabrice Bellard
@end table
607
608
@item -4mv
609 4c5f7207 Diego Biurrun
Use four motion vector by macroblock (MPEG-4 only).
610 18bff752 Fabrice Bellard
@item -part
611 4c5f7207 Diego Biurrun
Use data partitioning (MPEG-4 only).
612 a19caa0f Stefano Sabatini
@item -bug @var{param}
613 4c5f7207 Diego Biurrun
Work around encoder bugs that are not auto-detected.
614 a19caa0f Stefano Sabatini
@item -strict @var{strictness}
615 4c5f7207 Diego Biurrun
How strictly to follow the standards.
616 5ee03c86 Fabrice Bellard
@item -aic
617 4c5f7207 Diego Biurrun
Enable Advanced intra coding (h263+).
618 5ee03c86 Fabrice Bellard
@item -umv
619 4c5f7207 Diego Biurrun
Enable Unlimited Motion Vector (h263+)
620 18bff752 Fabrice Bellard
621
@item -deinterlace
622 4c5f7207 Diego Biurrun
Deinterlace pictures.
623 3841e813 Benjamin Larsson
@item -ilme
624 4c5f7207 Diego Biurrun
Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
625
Use this option if your input file is interlaced and you want
626
to keep the interlaced format for minimum losses.
627
The alternative is to deinterlace the input stream with
628
@option{-deinterlace}, but deinterlacing introduces losses.
629 18bff752 Fabrice Bellard
@item -psnr
630 4c5f7207 Diego Biurrun
Calculate PSNR of compressed frames.
631 18bff752 Fabrice Bellard
@item -vstats
632 4c5f7207 Diego Biurrun
Dump video coding statistics to @file{vstats_HHMMSS.log}.
633 a19caa0f Stefano Sabatini
@item -vstats_file @var{file}
634 b60d1379 Stefano Sabatini
Dump video coding statistics to @var{file}.
635 a19caa0f Stefano Sabatini
@item -top @var{n}
636 4386f941 Diego Biurrun
top=1/bottom=0/auto=-1 field first
637 a19caa0f Stefano Sabatini
@item -dc @var{precision}
638 4386f941 Diego Biurrun
Intra_dc_precision.
639 a19caa0f Stefano Sabatini
@item -vtag @var{fourcc/tag}
640 4386f941 Diego Biurrun
Force video tag/fourcc.
641
@item -qphist
642
Show QP histogram.
643 a19caa0f Stefano Sabatini
@item -vbsf @var{bitstream_filter}
644 5ad2b4c6 tripp
Bitstream filters available are "dump_extra", "remove_extra", "noise", "h264_mp4toannexb", "imxdump", "mjpegadump".
645
@example
646
ffmpeg -i h264.mp4 -vcodec copy -vbsf h264_mp4toannexb -an out.h264
647
@end example
648 18bff752 Fabrice Bellard
@end table
649
650
@section Audio Options
651
652
@table @option
653 a19caa0f Stefano Sabatini
@item -aframes @var{number}
654 4386f941 Diego Biurrun
Set the number of audio frames to record.
655 a19caa0f Stefano Sabatini
@item -ar @var{freq}
656 4c5f7207 Diego Biurrun
Set the audio sampling frequency (default = 44100 Hz).
657 a19caa0f Stefano Sabatini
@item -ab @var{bitrate}
658 5438308f Panagiotis Issaris
Set the audio bitrate in bit/s (default = 64k).
659 385e1658 John Van Sickle
@item -aq @var{q}
660
Set the audio quality (codec-specific, VBR).
661 a19caa0f Stefano Sabatini
@item -ac @var{channels}
662 4c5f7207 Diego Biurrun
Set the number of audio channels (default = 1).
663 5ee03c86 Fabrice Bellard
@item -an
664 4c5f7207 Diego Biurrun
Disable audio recording.
665 a19caa0f Stefano Sabatini
@item -acodec @var{codec}
666 4c5f7207 Diego Biurrun
Force audio codec to @var{codec}. Use the @code{copy} special value to
667
specify that the raw codec data must be copied as is.
668 de62a89d Víctor Paesa
@item -newaudio
669 18fd519f Diego Biurrun
Add a new audio track to the output file. If you want to specify parameters,
670
do so before @code{-newaudio} (@code{-acodec}, @code{-ab}, etc..).
671 de62a89d Víctor Paesa
672 18fd519f Diego Biurrun
Mapping will be done automatically, if the number of output streams is equal to
673
the number of input streams, else it will pick the first one that matches. You
674 de62a89d Víctor Paesa
can override the mapping using @code{-map} as usual.
675
676
Example:
677
@example
678 5438308f Panagiotis Issaris
ffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384k test.mpg -acodec mp2 -ab 192k -newaudio
679 de62a89d Víctor Paesa
@end example
680 a19caa0f Stefano Sabatini
@item -alang @var{code}
681 4386f941 Diego Biurrun
Set the ISO 639 language code (3 letters) of the current audio stream.
682
@end table
683
684
@section Advanced Audio options:
685
686
@table @option
687 a19caa0f Stefano Sabatini
@item -atag @var{fourcc/tag}
688 4386f941 Diego Biurrun
Force audio tag/fourcc.
689 a19caa0f Stefano Sabatini
@item -absf @var{bitstream_filter}
690 4386f941 Diego Biurrun
Bitstream filters available are "dump_extra", "remove_extra", "noise", "mp3comp", "mp3decomp".
691
@end table
692
693
@section Subtitle options:
694
695
@table @option
696 a19caa0f Stefano Sabatini
@item -scodec @var{codec}
697 4386f941 Diego Biurrun
Force subtitle codec ('copy' to copy stream).
698
@item -newsubtitle
699
Add a new subtitle stream to the current output stream.
700 a19caa0f Stefano Sabatini
@item -slang @var{code}
701 4386f941 Diego Biurrun
Set the ISO 639 language code (3 letters) of the current subtitle stream.
702 f0ef7bee Diego Biurrun
@item -sn
703
Disable subtitle recording.
704 5ad2b4c6 tripp
@item -sbsf @var{bitstream_filter}
705
Bitstream filters available are "mov2textsub", "text2movsub".
706
@example
707
ffmpeg -i file.mov -an -vn -sbsf mov2textsub -scodec copy -f rawvideo sub.txt
708
@end example
709 18bff752 Fabrice Bellard
@end table
710
711
@section Audio/Video grab options
712
713
@table @option
714 a19caa0f Stefano Sabatini
@item -vc @var{channel}
715 4c5f7207 Diego Biurrun
Set video grab channel (DV1394 only).
716 a19caa0f Stefano Sabatini
@item -tvstd @var{standard}
717 4c5f7207 Diego Biurrun
Set television standard (NTSC, PAL (SECAM)).
718 cc58300e Ramiro Polla
@item -isync
719
Synchronize read on input.
720 18bff752 Fabrice Bellard
@end table
721
722
@section Advanced options
723
724
@table @option
725 bb89b0bc Stefano Sabatini
@item -map @var{input_stream_id}[:@var{sync_stream_id}]
726 e645a733 Benjamin Larsson
Set stream mapping from input streams to output streams.
727
Just enumerate the input streams in the order you want them in the output.
728 bb89b0bc Stefano Sabatini
@var{sync_stream_id} if specified sets the input stream to sync
729
against.
730 a19caa0f Stefano Sabatini
@item -map_meta_data @var{outfile}:@var{infile}
731
Set meta data information of @var{outfile} from @var{infile}.
732 18bff752 Fabrice Bellard
@item -debug
733 4c5f7207 Diego Biurrun
Print specific debug info.
734 115329f1 Diego Biurrun
@item -benchmark
735 4c5f7207 Diego Biurrun
Add timings for benchmarking.
736 4386f941 Diego Biurrun
@item -dump
737 4c5f7207 Diego Biurrun
Dump each input packet.
738 4386f941 Diego Biurrun
@item -hex
739
When dumping packets, also dump the payload.
740 18bff752 Fabrice Bellard
@item -bitexact
741 4c5f7207 Diego Biurrun
Only use bit exact algorithms (for codec testing).
742 a19caa0f Stefano Sabatini
@item -ps @var{size}
743 2b12317a Martin Storsjö
Set RTP payload size in bytes.
744 5ee03c86 Fabrice Bellard
@item -re
745 4c5f7207 Diego Biurrun
Read input at native frame rate. Mainly used to simulate a grab device.
746 4386f941 Diego Biurrun
@item -loop_input
747 4c5f7207 Diego Biurrun
Loop over the input stream. Currently it works only for image
748
streams. This option is used for automatic FFserver testing.
749 a19caa0f Stefano Sabatini
@item -loop_output @var{number_of_times}
750 019c8838 Diego Biurrun
Repeatedly loop output for formats that support looping such as animated GIF
751 4c5f7207 Diego Biurrun
(0 will loop the output infinitely).
752 a19caa0f Stefano Sabatini
@item -threads @var{count}
753 4386f941 Diego Biurrun
Thread count.
754 a19caa0f Stefano Sabatini
@item -vsync @var{parameter}
755 29c9183c Diego Biurrun
Video sync method. Video will be stretched/squeezed to match the timestamps,
756
it is done by duplicating and dropping frames. With -map you can select from
757
which stream the timestamps should be taken. You can leave either video or
758 c52e13f1 Benjamin Larsson
audio unchanged and sync the remaining stream(s) to the unchanged one.
759 a19caa0f Stefano Sabatini
@item -async @var{samples_per_second}
760 29c9183c Diego Biurrun
Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps,
761 c52e13f1 Benjamin Larsson
the parameter is the maximum samples per second by which the audio is changed.
762
-async 1 is a special case where only the start of the audio stream is corrected
763
without any later correction.
764 43399718 Víctor Paesa
@item -copyts
765
Copy timestamps from input to output.
766
@item -shortest
767
Finish encoding when the shortest input stream ends.
768
@item -dts_delta_threshold
769
Timestamp discontinuity delta threshold.
770 a19caa0f Stefano Sabatini
@item -muxdelay @var{seconds}
771 43399718 Víctor Paesa
Set the maximum demux-decode delay.
772 a19caa0f Stefano Sabatini
@item -muxpreload @var{seconds}
773 43399718 Víctor Paesa
Set the initial demux-decode delay.
774 9181577c Fabrice Bellard
@end table
775 18bff752 Fabrice Bellard
776 4a60e574 Stefano Sabatini
@section Preset files
777
778
A preset file contains a sequence of @var{option}=@var{value} pairs,
779
one for each line, specifying a sequence of options which would be
780
awkward to specify on the command line. Lines starting with the hash
781
('#') character are ignored and are used to provide comments. Check
782
the @file{ffpresets} directory in the FFmpeg source tree for examples.
783
784 35c504b6 Ramiro Polla
Preset files are specified with the @code{vpre}, @code{apre},
785
@code{spre}, and @code{fpre} options. The @code{fpre} option takes the
786
filename of the preset instead of a preset name as input and can be
787
used for any kind of codec. For the @code{vpre}, @code{apre}, and
788
@code{spre} options, the options specified in a preset file are
789 66e9aa74 Stefano Sabatini
applied to the currently selected codec of the same type as the preset
790
option.
791 4a60e574 Stefano Sabatini
792 35c504b6 Ramiro Polla
The argument passed to the @code{vpre}, @code{apre}, and @code{spre}
793
preset options identifies the preset file to use according to the
794
following rules:
795 4a60e574 Stefano Sabatini
796
First ffmpeg searches for a file named @var{arg}.ffpreset in the
797 bd591ead Stefano Sabatini
directories @file{$HOME/.ffmpeg}, and in the datadir defined at
798
configuration time (usually @file{PREFIX/share/ffmpeg}) in that
799
order. For example, if the argument is @code{libx264-max}, it will
800
search for the file @file{libx264-max.ffpreset}.
801 4a60e574 Stefano Sabatini
802
If no such file is found, then ffmpeg will search for a file named
803
@var{codec_name}-@var{arg}.ffpreset in the above-mentioned
804
directories, where @var{codec_name} is the name of the codec to which
805
the preset file options will be applied. For example, if you select
806
the video codec with @code{-vcodec libx264} and use @code{-vpre max},
807
then it will search for the file @file{libx264-max.ffpreset}.
808
809 72cdcc0b Diego Biurrun
@anchor{FFmpeg formula evaluator}
810 18bff752 Fabrice Bellard
@section FFmpeg formula evaluator
811
812
When evaluating a rate control string, FFmpeg uses an internal formula
813 115329f1 Diego Biurrun
evaluator.
814 18bff752 Fabrice Bellard
815
The following binary operators are available: @code{+}, @code{-},
816
@code{*}, @code{/}, @code{^}.
817
818
The following unary operators are available: @code{+}, @code{-},
819
@code{(...)}.
820
821 17bdc290 Víctor Paesa
The following statements are available: @code{ld}, @code{st},
822
@code{while}.
823
824 18bff752 Fabrice Bellard
The following functions are available:
825
@table @var
826
@item sinh(x)
827
@item cosh(x)
828
@item tanh(x)
829
@item sin(x)
830
@item cos(x)
831
@item tan(x)
832 593b3219 Víctor Paesa
@item atan(x)
833
@item asin(x)
834
@item acos(x)
835 18bff752 Fabrice Bellard
@item exp(x)
836
@item log(x)
837 593b3219 Víctor Paesa
@item abs(x)
838 18bff752 Fabrice Bellard
@item squish(x)
839
@item gauss(x)
840 593b3219 Víctor Paesa
@item mod(x, y)
841 18bff752 Fabrice Bellard
@item max(x, y)
842
@item min(x, y)
843 593b3219 Víctor Paesa
@item eq(x, y)
844
@item gte(x, y)
845 18bff752 Fabrice Bellard
@item gt(x, y)
846 593b3219 Víctor Paesa
@item lte(x, y)
847 18bff752 Fabrice Bellard
@item lt(x, y)
848
@item bits2qp(bits)
849
@item qp2bits(qp)
850
@end table
851
852
The following constants are available:
853
@table @var
854
@item PI
855
@item E
856
@item iTex
857
@item pTex
858
@item tex
859
@item mv
860
@item fCode
861
@item iCount
862
@item mcVar
863
@item var
864
@item isI
865
@item isP
866
@item isB
867
@item avgQP
868
@item qComp
869
@item avgIITex
870
@item avgPITex
871
@item avgPPTex
872
@item avgBPTex
873
@item avgTex
874
@end table
875
876 e99c4e10 Fabrice Bellard
@c man end
877
878
@ignore
879
880
@setfilename ffmpeg
881
@settitle FFmpeg video converter
882
883
@c man begin SEEALSO
884 019c8838 Diego Biurrun
ffserver(1), ffplay(1) and the HTML documentation of @file{ffmpeg}.
885 e99c4e10 Fabrice Bellard
@c man end
886
887
@c man begin AUTHOR
888
Fabrice Bellard
889
@c man end
890
891
@end ignore
892 9181577c Fabrice Bellard
893
@section Protocols
894
895 831ec935 Diego Biurrun
The file name can be @file{-} to read from standard input or to write
896 4c5f7207 Diego Biurrun
to standard output.
897 9181577c Fabrice Bellard
898 4c5f7207 Diego Biurrun
FFmpeg also handles many protocols specified with an URL syntax.
899 9181577c Fabrice Bellard
900 0584b718 Daniel Verkamp
Use 'ffmpeg -protocols' to see a list of the supported protocols.
901 9181577c Fabrice Bellard
902 e99c4e10 Fabrice Bellard
The protocol @code{http:} is currently used only to communicate with
903 4c5f7207 Diego Biurrun
FFserver (see the FFserver documentation). When FFmpeg will be a
904 e99c4e10 Fabrice Bellard
video player it will also be used for streaming :-)
905 9181577c Fabrice Bellard
906
@chapter Tips
907
908
@itemize
909 4c5f7207 Diego Biurrun
@item For streaming at very low bitrate application, use a low frame rate
910
and a small GOP size. This is especially true for RealVideo where
911 e99c4e10 Fabrice Bellard
the Linux player does not seem to be very fast, so it can miss
912
frames. An example is:
913 9181577c Fabrice Bellard
914
@example
915 3c0ba870 Panagiotis Issaris
ffmpeg -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm
916 9181577c Fabrice Bellard
@end example
917
918
@item  The parameter 'q' which is displayed while encoding is the current
919 4c5f7207 Diego Biurrun
quantizer. The value 1 indicates that a very good quality could
920
be achieved. The value 31 indicates the worst quality. If q=31 appears
921 e99c4e10 Fabrice Bellard
too often, it means that the encoder cannot compress enough to meet
922 4c5f7207 Diego Biurrun
your bitrate. You must either increase the bitrate, decrease the
923 e99c4e10 Fabrice Bellard
frame rate or decrease the frame size.
924 9181577c Fabrice Bellard
925
@item If your computer is not fast enough, you can speed up the
926 e99c4e10 Fabrice Bellard
compression at the expense of the compression ratio. You can use
927
'-me zero' to speed up motion estimation, and '-intra' to disable
928 4c5f7207 Diego Biurrun
motion estimation completely (you have only I-frames, which means it
929 e99c4e10 Fabrice Bellard
is about as good as JPEG compression).
930 9181577c Fabrice Bellard
931 4c5f7207 Diego Biurrun
@item To have very low audio bitrates, reduce the sampling frequency
932 c27c66c3 Benoit Fouet
(down to 22050 Hz for MPEG audio, 22050 or 11025 for AC-3).
933 9181577c Fabrice Bellard
934
@item To have a constant quality (but a variable bitrate), use the option
935 e99c4e10 Fabrice Bellard
'-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
936
quality).
937 9181577c Fabrice Bellard
938
@item When converting video files, you can use the '-sameq' option which
939 4c5f7207 Diego Biurrun
uses the same quality factor in the encoder as in the decoder.
940
It allows almost lossless encoding.
941 9181577c Fabrice Bellard
942
@end itemize
943
944
@bye