Statistics
| Branch: | Revision:

ffmpeg / doc / ffmpeg-doc.texi @ 1cee4eaf

History | View | Annotate | Download (26.6 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 9181577c Fabrice Bellard
@item -L
229 4c5f7207 Diego Biurrun
Show license.
230 18bff752 Fabrice Bellard
231 9181577c Fabrice Bellard
@item -h
232 4c5f7207 Diego Biurrun
Show help.
233 18bff752 Fabrice Bellard
234 4386f941 Diego Biurrun
@item -version
235
Show version.
236
237 e99c4e10 Fabrice Bellard
@item -formats
238 f67f485b Daniel Verkamp
Show available formats, codecs, bitstream filters, protocols, and frame size and frame rate abbreviations.
239
240
The fields preceding the format and codec names have the following meanings:
241
@table @samp
242
@item D
243
Decoding available
244
@item E
245
Encoding available
246
@item V/A/S
247
Video/audio/subtitle codec
248
@item S
249
Codec supports slices
250
@item D
251
Codec supports direct rendering
252
@item T
253
Codec can handle input truncated at random locations instead of only at frame boundaries
254
@end table
255 18bff752 Fabrice Bellard
256 a19caa0f Stefano Sabatini
@item -f @var{fmt}
257 4c5f7207 Diego Biurrun
Force format.
258 18bff752 Fabrice Bellard
259 a19caa0f Stefano Sabatini
@item -i @var{filename}
260 831ec935 Diego Biurrun
input file name
261 9181577c Fabrice Bellard
262 115329f1 Diego Biurrun
@item -y
263 4c5f7207 Diego Biurrun
Overwrite output files.
264 9181577c Fabrice Bellard
265 a19caa0f Stefano Sabatini
@item -t @var{duration}
266 250c5317 Godwin Stewart
Restrict the transcoded/captured video sequence
267
to the duration specified in seconds.
268 4c5f7207 Diego Biurrun
@code{hh:mm:ss[.xxx]} syntax is also supported.
269 9181577c Fabrice Bellard
270 a19caa0f Stefano Sabatini
@item -fs @var{limit_size}
271 4386f941 Diego Biurrun
Set the file size limit.
272
273 a19caa0f Stefano Sabatini
@item -ss @var{position}
274 4c5f7207 Diego Biurrun
Seek to given time position in seconds.
275
@code{hh:mm:ss[.xxx]} syntax is also supported.
276 e83a84ac Benjamin Larsson
277 a19caa0f Stefano Sabatini
@item -itsoffset @var{offset}
278 4386f941 Diego Biurrun
Set the input time offset in seconds.
279
@code{[-]hh:mm:ss[.xxx]} syntax is also supported.
280
This option affects all the input files that follow it.
281
The offset is added to the timestamps of the input files.
282
Specifying a positive offset means that the corresponding
283
streams are delayed by 'offset' seconds.
284
285 a19caa0f Stefano Sabatini
@item -title @var{string}
286 4c5f7207 Diego Biurrun
Set the title.
287 9181577c Fabrice Bellard
288 a19caa0f Stefano Sabatini
@item -timestamp @var{time}
289 4386f941 Diego Biurrun
Set the timestamp.
290
291 a19caa0f Stefano Sabatini
@item -author @var{string}
292 4c5f7207 Diego Biurrun
Set the author.
293 9181577c Fabrice Bellard
294 a19caa0f Stefano Sabatini
@item -copyright @var{string}
295 4c5f7207 Diego Biurrun
Set the copyright.
296 9181577c Fabrice Bellard
297 a19caa0f Stefano Sabatini
@item -comment @var{string}
298 4c5f7207 Diego Biurrun
Set the comment.
299 9181577c Fabrice Bellard
300 a19caa0f Stefano Sabatini
@item -album @var{string}
301 4386f941 Diego Biurrun
Set the album.
302
303 a19caa0f Stefano Sabatini
@item -track @var{number}
304 ec1b10f4 Panagiotis Issaris
Set the track.
305
306 a19caa0f Stefano Sabatini
@item -year @var{number}
307 ec1b10f4 Panagiotis Issaris
Set the year.
308
309 a19caa0f Stefano Sabatini
@item -v @var{number}
310 53d1bdba Stefano Sabatini
Set the logging verbosity level.
311 4386f941 Diego Biurrun
312 a19caa0f Stefano Sabatini
@item -target @var{type}
313 4386f941 Diego Biurrun
Specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd",
314 4c5f7207 Diego Biurrun
"ntsc-svcd", ... ). All the format options (bitrate, codecs,
315
buffer sizes) are then set automatically. You can just type:
316 99db6420 Fabrice Bellard
317
@example
318
ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
319
@end example
320
321 4c5f7207 Diego Biurrun
Nevertheless you can specify additional options as long as you know
322
they do not conflict with the standard, as in:
323 791d8d1d Michel Bardiaux
324
@example
325
ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
326
@end example
327
328 a19caa0f Stefano Sabatini
@item -dframes @var{number}
329 4386f941 Diego Biurrun
Set the number of data frames to record.
330
331 a19caa0f Stefano Sabatini
@item -scodec @var{codec}
332 4386f941 Diego Biurrun
Force subtitle codec ('copy' to copy stream).
333
334
@item -newsubtitle
335
Add a new subtitle stream to the current output stream.
336
337 a19caa0f Stefano Sabatini
@item -slang @var{code}
338 4386f941 Diego Biurrun
Set the ISO 639 language code (3 letters) of the current subtitle stream.
339 401fbdde Michael Niedermayer
340 9181577c Fabrice Bellard
@end table
341
342
@section Video Options
343
344 e99c4e10 Fabrice Bellard
@table @option
345 a19caa0f Stefano Sabatini
@item -b @var{bitrate}
346 3c0ba870 Panagiotis Issaris
Set the video bitrate in bit/s (default = 200 kb/s).
347 a19caa0f Stefano Sabatini
@item -vframes @var{number}
348 4386f941 Diego Biurrun
Set the number of video frames to record.
349 a19caa0f Stefano Sabatini
@item -r @var{fps}
350 4386f941 Diego Biurrun
Set frame rate (Hz value, fraction or abbreviation), (default = 25).
351 a19caa0f Stefano Sabatini
@item -s @var{size}
352 67053c30 Ivan Kalvachev
Set frame size. The format is @samp{wxh} (ffserver default = 160x128, ffmpeg default = same as source).
353 4c5f7207 Diego Biurrun
The following abbreviations are recognized:
354 5ee03c86 Fabrice Bellard
@table @samp
355 18bff752 Fabrice Bellard
@item sqcif
356
128x96
357
@item qcif
358
176x144
359
@item cif
360
352x288
361
@item 4cif
362
704x576
363 7d88b5ca Benoit Fouet
@item qqvga
364
160x120
365
@item qvga
366
320x240
367
@item vga
368
640x480
369
@item svga
370
800x600
371
@item xga
372
1024x768
373
@item uxga
374
1600x1200
375
@item qxga
376
2048x1536
377
@item sxga
378
1280x1024
379
@item qsxga
380
2560x2048
381
@item hsxga
382
5120x4096
383
@item wvga
384
852x480
385
@item wxga
386
1366x768
387
@item wsxga
388
1600x1024
389
@item wuxga
390
1920x1200
391
@item woxga
392
2560x1600
393
@item wqsxga
394
3200x2048
395
@item wquxga
396
3840x2400
397
@item whsxga
398
6400x4096
399
@item whuxga
400
7680x4800
401
@item cga
402
320x200
403
@item ega
404
640x350
405
@item hd480
406
852x480
407
@item hd720
408
1280x720
409
@item hd1080
410
1920x1080
411 18bff752 Fabrice Bellard
@end table
412
413 a19caa0f Stefano Sabatini
@item -aspect @var{aspect}
414 4c5f7207 Diego Biurrun
Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).
415 a19caa0f Stefano Sabatini
@item -croptop @var{size}
416 4c5f7207 Diego Biurrun
Set top crop band size (in pixels).
417 a19caa0f Stefano Sabatini
@item -cropbottom @var{size}
418 4c5f7207 Diego Biurrun
Set bottom crop band size (in pixels).
419 a19caa0f Stefano Sabatini
@item -cropleft @var{size}
420 4c5f7207 Diego Biurrun
Set left crop band size (in pixels).
421 a19caa0f Stefano Sabatini
@item -cropright @var{size}
422 4c5f7207 Diego Biurrun
Set right crop band size (in pixels).
423 a19caa0f Stefano Sabatini
@item -padtop @var{size}
424 4c5f7207 Diego Biurrun
Set top pad band size (in pixels).
425 a19caa0f Stefano Sabatini
@item -padbottom @var{size}
426 4c5f7207 Diego Biurrun
Set bottom pad band size (in pixels).
427 a19caa0f Stefano Sabatini
@item -padleft @var{size}
428 4c5f7207 Diego Biurrun
Set left pad band size (in pixels).
429 a19caa0f Stefano Sabatini
@item -padright @var{size}
430 4c5f7207 Diego Biurrun
Set right pad band size (in pixels).
431 a19caa0f Stefano Sabatini
@item -padcolor @var{hex_color}
432 4c5f7207 Diego Biurrun
Set color of padded bands. The value for padcolor is expressed
433
as a six digit hexadecimal number where the first two digits
434
represent red, the middle two digits green and last two digits
435
blue (default = 000000 (black)).
436 9181577c Fabrice Bellard
@item -vn
437 4c5f7207 Diego Biurrun
Disable video recording.
438 a19caa0f Stefano Sabatini
@item -bt @var{tolerance}
439 e3576e25 Jason Garrett-Glaser
Set video bitrate tolerance (in bits, default 4000k).
440
Has a minimum value of: (target_bitrate/target_framerate).
441
In 1-pass mode, bitrate tolerance specifies how far ratecontrol is
442
willing to deviate from the target average bitrate value. This is
443
not related to min/max bitrate. Lowering tolerance too much has
444
an adverse effect on quality.
445 a19caa0f Stefano Sabatini
@item -maxrate @var{bitrate}
446 f754bfb9 Michael Niedermayer
Set max video bitrate (in bit/s).
447 bbc35f51 tripp
Requires -bufsize to be set.
448 a19caa0f Stefano Sabatini
@item -minrate @var{bitrate}
449 f754bfb9 Michael Niedermayer
Set min video bitrate (in bit/s).
450 bbc35f51 tripp
Most useful in setting up a CBR encode:
451
@example
452
ffmpeg -i myfile.avi -b 4000k -minrate 4000k -maxrate 4000k -bufsize 1835k out.m2v
453
@end example
454
It is of little use elsewise.
455 a19caa0f Stefano Sabatini
@item -bufsize @var{size}
456 fa78d895 Diego Biurrun
Set video buffer verifier buffer size (in bits).
457 a19caa0f Stefano Sabatini
@item -vcodec @var{codec}
458 4c5f7207 Diego Biurrun
Force video codec to @var{codec}. Use the @code{copy} special value to
459 5ee03c86 Fabrice Bellard
tell that the raw codec data must be copied as is.
460 18bff752 Fabrice Bellard
@item -sameq
461 4c5f7207 Diego Biurrun
Use same video quality as source (implies VBR).
462 9181577c Fabrice Bellard
463 a19caa0f Stefano Sabatini
@item -pass @var{n}
464 c2902c9c Stefano Sabatini
Select the pass number (1 or 2). It is used to do two-pass
465
video encoding. The statistics of the video are recorded in the first
466
pass into a log file (see also the option -passlogfile),
467
and in the second pass that log file is used to generate the video
468
at the exact requested bitrate.
469 850a8d42 Erwan Ducroquet
On pass 1, you may just deactivate audio and set output to null,
470
examples for Windows and Unix:
471
@example
472
ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y NUL
473
ffmpeg -i foo.mov -vcodec libxvid -pass 1 -an -f rawvideo -y /dev/null
474
@end example
475 9181577c Fabrice Bellard
476 44fe7113 Stefano Sabatini
@item -passlogfile @var{prefix}
477
Set two-pass log file name prefix to @var{prefix}, the default file name
478
prefix is ``ffmpeg2pass''. The complete file name will be
479
@file{PREFIX-N.log}, where N is a number specific to the output
480 c2902c9c Stefano Sabatini
stream.
481 9181577c Fabrice Bellard
482 4386f941 Diego Biurrun
@item -newvideo
483
Add a new video stream to the current output stream.
484
485 9181577c Fabrice Bellard
@end table
486
487 18bff752 Fabrice Bellard
@section Advanced Video Options
488 9181577c Fabrice Bellard
489 e99c4e10 Fabrice Bellard
@table @option
490 a19caa0f Stefano Sabatini
@item -pix_fmt @var{format}
491 c3b95b1d Stefano Sabatini
Set pixel format. Use 'list' as parameter to show all the supported
492
pixel formats.
493 a19caa0f Stefano Sabatini
@item -sws_flags @var{flags}
494 831ec935 Diego Biurrun
Set SwScaler flags (only available when compiled with swscale support).
495 a19caa0f Stefano Sabatini
@item -g @var{gop_size}
496 4c5f7207 Diego Biurrun
Set the group of pictures size.
497 115329f1 Diego Biurrun
@item -intra
498 4c5f7207 Diego Biurrun
Use only intra frames.
499 a19caa0f Stefano Sabatini
@item -vdt @var{n}
500 4386f941 Diego Biurrun
Discard threshold.
501 a19caa0f Stefano Sabatini
@item -qscale @var{q}
502 4bef236b Diego Biurrun
Use fixed video quantizer scale (VBR).
503 a19caa0f Stefano Sabatini
@item -qmin @var{q}
504 4bef236b Diego Biurrun
minimum video quantizer scale (VBR)
505 a19caa0f Stefano Sabatini
@item -qmax @var{q}
506 4bef236b Diego Biurrun
maximum video quantizer scale (VBR)
507 a19caa0f Stefano Sabatini
@item -qdiff @var{q}
508 4bef236b Diego Biurrun
maximum difference between the quantizer scales (VBR)
509 a19caa0f Stefano Sabatini
@item -qblur @var{blur}
510 3a9b190c tripp
video quantizer scale blur (VBR) (range 0.0 - 1.0)
511 a19caa0f Stefano Sabatini
@item -qcomp @var{compression}
512 3a9b190c tripp
video quantizer scale compression (VBR) (default 0.5).
513
Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0-1.0
514 18bff752 Fabrice Bellard
515 a19caa0f Stefano Sabatini
@item -lmin @var{lambda}
516 9ae711e1 Víctor Paesa
minimum video lagrange factor (VBR)
517 a19caa0f Stefano Sabatini
@item -lmax @var{lambda}
518 9ae711e1 Víctor Paesa
max video lagrange factor (VBR)
519 a19caa0f Stefano Sabatini
@item -mblmin @var{lambda}
520 9ae711e1 Víctor Paesa
minimum macroblock quantizer scale (VBR)
521 a19caa0f Stefano Sabatini
@item -mblmax @var{lambda}
522 9ae711e1 Víctor Paesa
maximum macroblock quantizer scale (VBR)
523
524
These four options (lmin, lmax, mblmin, mblmax) use 'lambda' units,
525
but you may use the QP2LAMBDA constant to easily convert from 'q' units:
526
@example
527
ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
528
@end example
529
530 a19caa0f Stefano Sabatini
@item -rc_init_cplx @var{complexity}
531 4c5f7207 Diego Biurrun
initial complexity for single pass encoding
532 a19caa0f Stefano Sabatini
@item -b_qfactor @var{factor}
533 4c5f7207 Diego Biurrun
qp factor between P- and B-frames
534 a19caa0f Stefano Sabatini
@item -i_qfactor @var{factor}
535 4c5f7207 Diego Biurrun
qp factor between P- and I-frames
536 a19caa0f Stefano Sabatini
@item -b_qoffset @var{offset}
537 4c5f7207 Diego Biurrun
qp offset between P- and B-frames
538 a19caa0f Stefano Sabatini
@item -i_qoffset @var{offset}
539 4c5f7207 Diego Biurrun
qp offset between P- and I-frames
540 a19caa0f Stefano Sabatini
@item -rc_eq @var{equation}
541 4c5f7207 Diego Biurrun
Set rate control equation (@pxref{FFmpeg formula
542
evaluator}) (default = @code{tex^qComp}).
543 a19caa0f Stefano Sabatini
@item -rc_override @var{override}
544 5ee03c86 Fabrice Bellard
rate control override for specific intervals
545 a19caa0f Stefano Sabatini
@item -me_method @var{method}
546 4c5f7207 Diego Biurrun
Set motion estimation method to @var{method}.
547
Available methods are (from lowest to best quality):
548 18bff752 Fabrice Bellard
@table @samp
549
@item zero
550 5ee03c86 Fabrice Bellard
Try just the (0, 0) vector.
551 18bff752 Fabrice Bellard
@item phods
552
@item log
553
@item x1
554 c0de00da Stefano Sabatini
@item hex
555
@item umh
556 18bff752 Fabrice Bellard
@item epzs
557
(default method)
558
@item full
559
exhaustive search (slow and marginally better than epzs)
560
@end table
561
562 a19caa0f Stefano Sabatini
@item -dct_algo @var{algo}
563 4c5f7207 Diego Biurrun
Set DCT algorithm to @var{algo}. Available values are:
564 18bff752 Fabrice Bellard
@table @samp
565
@item 0
566
FF_DCT_AUTO (default)
567
@item 1
568
FF_DCT_FASTINT
569
@item 2
570
FF_DCT_INT
571
@item 3
572
FF_DCT_MMX
573
@item 4
574
FF_DCT_MLIB
575
@item 5
576
FF_DCT_ALTIVEC
577
@end table
578
579 a19caa0f Stefano Sabatini
@item -idct_algo @var{algo}
580 4c5f7207 Diego Biurrun
Set IDCT algorithm to @var{algo}. Available values are:
581 18bff752 Fabrice Bellard
@table @samp
582
@item 0
583
FF_IDCT_AUTO (default)
584
@item 1
585 115329f1 Diego Biurrun
FF_IDCT_INT
586 18bff752 Fabrice Bellard
@item 2
587 115329f1 Diego Biurrun
FF_IDCT_SIMPLE
588 18bff752 Fabrice Bellard
@item 3
589 115329f1 Diego Biurrun
FF_IDCT_SIMPLEMMX
590 18bff752 Fabrice Bellard
@item 4
591 115329f1 Diego Biurrun
FF_IDCT_LIBMPEG2MMX
592 18bff752 Fabrice Bellard
@item 5
593 115329f1 Diego Biurrun
FF_IDCT_PS2
594 18bff752 Fabrice Bellard
@item 6
595 115329f1 Diego Biurrun
FF_IDCT_MLIB
596 18bff752 Fabrice Bellard
@item 7
597 115329f1 Diego Biurrun
FF_IDCT_ARM
598 18bff752 Fabrice Bellard
@item 8
599 115329f1 Diego Biurrun
FF_IDCT_ALTIVEC
600 18bff752 Fabrice Bellard
@item 9
601 115329f1 Diego Biurrun
FF_IDCT_SH4
602 18bff752 Fabrice Bellard
@item 10
603 115329f1 Diego Biurrun
FF_IDCT_SIMPLEARM
604 18bff752 Fabrice Bellard
@end table
605
606 a19caa0f Stefano Sabatini
@item -er @var{n}
607 4c5f7207 Diego Biurrun
Set error resilience to @var{n}.
608 18bff752 Fabrice Bellard
@table @samp
609 115329f1 Diego Biurrun
@item 1
610 1471c6c2 Diego Biurrun
FF_ER_CAREFUL (default)
611 18bff752 Fabrice Bellard
@item 2
612 5ee03c86 Fabrice Bellard
FF_ER_COMPLIANT
613 18bff752 Fabrice Bellard
@item 3
614
FF_ER_AGGRESSIVE
615
@item 4
616
FF_ER_VERY_AGGRESSIVE
617
@end table
618
619 a19caa0f Stefano Sabatini
@item -ec @var{bit_mask}
620 4c5f7207 Diego Biurrun
Set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask of
621 5ee03c86 Fabrice Bellard
the following values:
622 18bff752 Fabrice Bellard
@table @samp
623
@item 1
624 4c5f7207 Diego Biurrun
FF_EC_GUESS_MVS (default = enabled)
625 18bff752 Fabrice Bellard
@item 2
626 4c5f7207 Diego Biurrun
FF_EC_DEBLOCK (default = enabled)
627 18bff752 Fabrice Bellard
@end table
628
629 a19caa0f Stefano Sabatini
@item -bf @var{frames}
630 4c5f7207 Diego Biurrun
Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).
631 a19caa0f Stefano Sabatini
@item -mbd @var{mode}
632 18bff752 Fabrice Bellard
macroblock decision
633
@table @samp
634
@item 0
635 4c5f7207 Diego Biurrun
FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in FFmpeg).
636 18bff752 Fabrice Bellard
@item 1
637 4c5f7207 Diego Biurrun
FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.
638 18bff752 Fabrice Bellard
@item 2
639 019c8838 Diego Biurrun
FF_MB_DECISION_RD: rate distortion
640 18bff752 Fabrice Bellard
@end table
641
642
@item -4mv
643 4c5f7207 Diego Biurrun
Use four motion vector by macroblock (MPEG-4 only).
644 18bff752 Fabrice Bellard
@item -part
645 4c5f7207 Diego Biurrun
Use data partitioning (MPEG-4 only).
646 a19caa0f Stefano Sabatini
@item -bug @var{param}
647 4c5f7207 Diego Biurrun
Work around encoder bugs that are not auto-detected.
648 a19caa0f Stefano Sabatini
@item -strict @var{strictness}
649 4c5f7207 Diego Biurrun
How strictly to follow the standards.
650 5ee03c86 Fabrice Bellard
@item -aic
651 4c5f7207 Diego Biurrun
Enable Advanced intra coding (h263+).
652 5ee03c86 Fabrice Bellard
@item -umv
653 4c5f7207 Diego Biurrun
Enable Unlimited Motion Vector (h263+)
654 18bff752 Fabrice Bellard
655
@item -deinterlace
656 4c5f7207 Diego Biurrun
Deinterlace pictures.
657 3841e813 Benjamin Larsson
@item -ilme
658 4c5f7207 Diego Biurrun
Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
659
Use this option if your input file is interlaced and you want
660
to keep the interlaced format for minimum losses.
661
The alternative is to deinterlace the input stream with
662
@option{-deinterlace}, but deinterlacing introduces losses.
663 18bff752 Fabrice Bellard
@item -psnr
664 4c5f7207 Diego Biurrun
Calculate PSNR of compressed frames.
665 18bff752 Fabrice Bellard
@item -vstats
666 4c5f7207 Diego Biurrun
Dump video coding statistics to @file{vstats_HHMMSS.log}.
667 a19caa0f Stefano Sabatini
@item -vstats_file @var{file}
668 b60d1379 Stefano Sabatini
Dump video coding statistics to @var{file}.
669 a19caa0f Stefano Sabatini
@item -top @var{n}
670 4386f941 Diego Biurrun
top=1/bottom=0/auto=-1 field first
671 a19caa0f Stefano Sabatini
@item -dc @var{precision}
672 4386f941 Diego Biurrun
Intra_dc_precision.
673 a19caa0f Stefano Sabatini
@item -vtag @var{fourcc/tag}
674 4386f941 Diego Biurrun
Force video tag/fourcc.
675
@item -qphist
676
Show QP histogram.
677 a19caa0f Stefano Sabatini
@item -vbsf @var{bitstream_filter}
678 5ad2b4c6 tripp
Bitstream filters available are "dump_extra", "remove_extra", "noise", "h264_mp4toannexb", "imxdump", "mjpegadump".
679
@example
680
ffmpeg -i h264.mp4 -vcodec copy -vbsf h264_mp4toannexb -an out.h264
681
@end example
682 18bff752 Fabrice Bellard
@end table
683
684
@section Audio Options
685
686
@table @option
687 a19caa0f Stefano Sabatini
@item -aframes @var{number}
688 4386f941 Diego Biurrun
Set the number of audio frames to record.
689 a19caa0f Stefano Sabatini
@item -ar @var{freq}
690 4c5f7207 Diego Biurrun
Set the audio sampling frequency (default = 44100 Hz).
691 a19caa0f Stefano Sabatini
@item -ab @var{bitrate}
692 5438308f Panagiotis Issaris
Set the audio bitrate in bit/s (default = 64k).
693 a19caa0f Stefano Sabatini
@item -ac @var{channels}
694 4c5f7207 Diego Biurrun
Set the number of audio channels (default = 1).
695 5ee03c86 Fabrice Bellard
@item -an
696 4c5f7207 Diego Biurrun
Disable audio recording.
697 a19caa0f Stefano Sabatini
@item -acodec @var{codec}
698 4c5f7207 Diego Biurrun
Force audio codec to @var{codec}. Use the @code{copy} special value to
699
specify that the raw codec data must be copied as is.
700 de62a89d Víctor Paesa
@item -newaudio
701 18fd519f Diego Biurrun
Add a new audio track to the output file. If you want to specify parameters,
702
do so before @code{-newaudio} (@code{-acodec}, @code{-ab}, etc..).
703 de62a89d Víctor Paesa
704 18fd519f Diego Biurrun
Mapping will be done automatically, if the number of output streams is equal to
705
the number of input streams, else it will pick the first one that matches. You
706 de62a89d Víctor Paesa
can override the mapping using @code{-map} as usual.
707
708
Example:
709
@example
710 5438308f Panagiotis Issaris
ffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384k test.mpg -acodec mp2 -ab 192k -newaudio
711 de62a89d Víctor Paesa
@end example
712 a19caa0f Stefano Sabatini
@item -alang @var{code}
713 4386f941 Diego Biurrun
Set the ISO 639 language code (3 letters) of the current audio stream.
714
@end table
715
716
@section Advanced Audio options:
717
718
@table @option
719 a19caa0f Stefano Sabatini
@item -atag @var{fourcc/tag}
720 4386f941 Diego Biurrun
Force audio tag/fourcc.
721 a19caa0f Stefano Sabatini
@item -absf @var{bitstream_filter}
722 4386f941 Diego Biurrun
Bitstream filters available are "dump_extra", "remove_extra", "noise", "mp3comp", "mp3decomp".
723
@end table
724
725
@section Subtitle options:
726
727
@table @option
728 a19caa0f Stefano Sabatini
@item -scodec @var{codec}
729 4386f941 Diego Biurrun
Force subtitle codec ('copy' to copy stream).
730
@item -newsubtitle
731
Add a new subtitle stream to the current output stream.
732 a19caa0f Stefano Sabatini
@item -slang @var{code}
733 4386f941 Diego Biurrun
Set the ISO 639 language code (3 letters) of the current subtitle stream.
734 5ad2b4c6 tripp
@item -sbsf @var{bitstream_filter}
735
Bitstream filters available are "mov2textsub", "text2movsub".
736
@example
737
ffmpeg -i file.mov -an -vn -sbsf mov2textsub -scodec copy -f rawvideo sub.txt
738
@end example
739 18bff752 Fabrice Bellard
@end table
740
741
@section Audio/Video grab options
742
743
@table @option
744 a19caa0f Stefano Sabatini
@item -vc @var{channel}
745 4c5f7207 Diego Biurrun
Set video grab channel (DV1394 only).
746 a19caa0f Stefano Sabatini
@item -tvstd @var{standard}
747 4c5f7207 Diego Biurrun
Set television standard (NTSC, PAL (SECAM)).
748 cc58300e Ramiro Polla
@item -isync
749
Synchronize read on input.
750 18bff752 Fabrice Bellard
@end table
751
752
@section Advanced options
753
754
@table @option
755 bb89b0bc Stefano Sabatini
@item -map @var{input_stream_id}[:@var{sync_stream_id}]
756 e645a733 Benjamin Larsson
Set stream mapping from input streams to output streams.
757
Just enumerate the input streams in the order you want them in the output.
758 bb89b0bc Stefano Sabatini
@var{sync_stream_id} if specified sets the input stream to sync
759
against.
760 a19caa0f Stefano Sabatini
@item -map_meta_data @var{outfile}:@var{infile}
761
Set meta data information of @var{outfile} from @var{infile}.
762 18bff752 Fabrice Bellard
@item -debug
763 4c5f7207 Diego Biurrun
Print specific debug info.
764 115329f1 Diego Biurrun
@item -benchmark
765 4c5f7207 Diego Biurrun
Add timings for benchmarking.
766 4386f941 Diego Biurrun
@item -dump
767 4c5f7207 Diego Biurrun
Dump each input packet.
768 4386f941 Diego Biurrun
@item -hex
769
When dumping packets, also dump the payload.
770 18bff752 Fabrice Bellard
@item -bitexact
771 4c5f7207 Diego Biurrun
Only use bit exact algorithms (for codec testing).
772 a19caa0f Stefano Sabatini
@item -ps @var{size}
773 4c5f7207 Diego Biurrun
Set packet size in bits.
774 5ee03c86 Fabrice Bellard
@item -re
775 4c5f7207 Diego Biurrun
Read input at native frame rate. Mainly used to simulate a grab device.
776 4386f941 Diego Biurrun
@item -loop_input
777 4c5f7207 Diego Biurrun
Loop over the input stream. Currently it works only for image
778
streams. This option is used for automatic FFserver testing.
779 a19caa0f Stefano Sabatini
@item -loop_output @var{number_of_times}
780 019c8838 Diego Biurrun
Repeatedly loop output for formats that support looping such as animated GIF
781 4c5f7207 Diego Biurrun
(0 will loop the output infinitely).
782 a19caa0f Stefano Sabatini
@item -threads @var{count}
783 4386f941 Diego Biurrun
Thread count.
784 a19caa0f Stefano Sabatini
@item -vsync @var{parameter}
785 29c9183c Diego Biurrun
Video sync method. Video will be stretched/squeezed to match the timestamps,
786
it is done by duplicating and dropping frames. With -map you can select from
787
which stream the timestamps should be taken. You can leave either video or
788 c52e13f1 Benjamin Larsson
audio unchanged and sync the remaining stream(s) to the unchanged one.
789 a19caa0f Stefano Sabatini
@item -async @var{samples_per_second}
790 29c9183c Diego Biurrun
Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps,
791 c52e13f1 Benjamin Larsson
the parameter is the maximum samples per second by which the audio is changed.
792
-async 1 is a special case where only the start of the audio stream is corrected
793
without any later correction.
794 43399718 Víctor Paesa
@item -copyts
795
Copy timestamps from input to output.
796
@item -shortest
797
Finish encoding when the shortest input stream ends.
798
@item -dts_delta_threshold
799
Timestamp discontinuity delta threshold.
800 a19caa0f Stefano Sabatini
@item -muxdelay @var{seconds}
801 43399718 Víctor Paesa
Set the maximum demux-decode delay.
802 a19caa0f Stefano Sabatini
@item -muxpreload @var{seconds}
803 43399718 Víctor Paesa
Set the initial demux-decode delay.
804 9181577c Fabrice Bellard
@end table
805 18bff752 Fabrice Bellard
806 4a60e574 Stefano Sabatini
@section Preset files
807
808
A preset file contains a sequence of @var{option}=@var{value} pairs,
809
one for each line, specifying a sequence of options which would be
810
awkward to specify on the command line. Lines starting with the hash
811
('#') character are ignored and are used to provide comments. Check
812
the @file{ffpresets} directory in the FFmpeg source tree for examples.
813
814
Preset files are specified with the @code{vpre}, @code{apre} and
815
@code{spre} options. The options specified in a preset file are
816 66e9aa74 Stefano Sabatini
applied to the currently selected codec of the same type as the preset
817
option.
818 4a60e574 Stefano Sabatini
819
The argument passed to the preset options identifies the preset file
820
to use according to the following rules.
821
822
First ffmpeg searches for a file named @var{arg}.ffpreset in the
823 bd591ead Stefano Sabatini
directories @file{$HOME/.ffmpeg}, and in the datadir defined at
824
configuration time (usually @file{PREFIX/share/ffmpeg}) in that
825
order. For example, if the argument is @code{libx264-max}, it will
826
search for the file @file{libx264-max.ffpreset}.
827 4a60e574 Stefano Sabatini
828
If no such file is found, then ffmpeg will search for a file named
829
@var{codec_name}-@var{arg}.ffpreset in the above-mentioned
830
directories, where @var{codec_name} is the name of the codec to which
831
the preset file options will be applied. For example, if you select
832
the video codec with @code{-vcodec libx264} and use @code{-vpre max},
833
then it will search for the file @file{libx264-max.ffpreset}.
834
835
Finally, if the above rules failed and the argument specifies an
836
absolute pathname, ffmpeg will search for that filename. This way you
837
can specify the absolute and complete filename of the preset file, for
838
example @file{./ffpresets/libx264-max.ffpreset}.
839
840 18bff752 Fabrice Bellard
@node FFmpeg formula evaluator
841
@section FFmpeg formula evaluator
842
843
When evaluating a rate control string, FFmpeg uses an internal formula
844 115329f1 Diego Biurrun
evaluator.
845 18bff752 Fabrice Bellard
846
The following binary operators are available: @code{+}, @code{-},
847
@code{*}, @code{/}, @code{^}.
848
849
The following unary operators are available: @code{+}, @code{-},
850
@code{(...)}.
851
852 17bdc290 Víctor Paesa
The following statements are available: @code{ld}, @code{st},
853
@code{while}.
854
855 18bff752 Fabrice Bellard
The following functions are available:
856
@table @var
857
@item sinh(x)
858
@item cosh(x)
859
@item tanh(x)
860
@item sin(x)
861
@item cos(x)
862
@item tan(x)
863 593b3219 Víctor Paesa
@item atan(x)
864
@item asin(x)
865
@item acos(x)
866 18bff752 Fabrice Bellard
@item exp(x)
867
@item log(x)
868 593b3219 Víctor Paesa
@item abs(x)
869 18bff752 Fabrice Bellard
@item squish(x)
870
@item gauss(x)
871 593b3219 Víctor Paesa
@item mod(x, y)
872 18bff752 Fabrice Bellard
@item max(x, y)
873
@item min(x, y)
874 593b3219 Víctor Paesa
@item eq(x, y)
875
@item gte(x, y)
876 18bff752 Fabrice Bellard
@item gt(x, y)
877 593b3219 Víctor Paesa
@item lte(x, y)
878 18bff752 Fabrice Bellard
@item lt(x, y)
879
@item bits2qp(bits)
880
@item qp2bits(qp)
881
@end table
882
883
The following constants are available:
884
@table @var
885
@item PI
886
@item E
887
@item iTex
888
@item pTex
889
@item tex
890
@item mv
891
@item fCode
892
@item iCount
893
@item mcVar
894
@item var
895
@item isI
896
@item isP
897
@item isB
898
@item avgQP
899
@item qComp
900
@item avgIITex
901
@item avgPITex
902
@item avgPPTex
903
@item avgBPTex
904
@item avgTex
905
@end table
906
907 e99c4e10 Fabrice Bellard
@c man end
908
909
@ignore
910
911
@setfilename ffmpeg
912
@settitle FFmpeg video converter
913
914
@c man begin SEEALSO
915 019c8838 Diego Biurrun
ffserver(1), ffplay(1) and the HTML documentation of @file{ffmpeg}.
916 e99c4e10 Fabrice Bellard
@c man end
917
918
@c man begin AUTHOR
919
Fabrice Bellard
920
@c man end
921
922
@end ignore
923 9181577c Fabrice Bellard
924
@section Protocols
925
926 831ec935 Diego Biurrun
The file name can be @file{-} to read from standard input or to write
927 4c5f7207 Diego Biurrun
to standard output.
928 9181577c Fabrice Bellard
929 4c5f7207 Diego Biurrun
FFmpeg also handles many protocols specified with an URL syntax.
930 9181577c Fabrice Bellard
931 4c5f7207 Diego Biurrun
Use 'ffmpeg -formats' to see a list of the supported protocols.
932 9181577c Fabrice Bellard
933 e99c4e10 Fabrice Bellard
The protocol @code{http:} is currently used only to communicate with
934 4c5f7207 Diego Biurrun
FFserver (see the FFserver documentation). When FFmpeg will be a
935 e99c4e10 Fabrice Bellard
video player it will also be used for streaming :-)
936 9181577c Fabrice Bellard
937
@chapter Tips
938
939
@itemize
940 4c5f7207 Diego Biurrun
@item For streaming at very low bitrate application, use a low frame rate
941
and a small GOP size. This is especially true for RealVideo where
942 e99c4e10 Fabrice Bellard
the Linux player does not seem to be very fast, so it can miss
943
frames. An example is:
944 9181577c Fabrice Bellard
945
@example
946 3c0ba870 Panagiotis Issaris
ffmpeg -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm
947 9181577c Fabrice Bellard
@end example
948
949
@item  The parameter 'q' which is displayed while encoding is the current
950 4c5f7207 Diego Biurrun
quantizer. The value 1 indicates that a very good quality could
951
be achieved. The value 31 indicates the worst quality. If q=31 appears
952 e99c4e10 Fabrice Bellard
too often, it means that the encoder cannot compress enough to meet
953 4c5f7207 Diego Biurrun
your bitrate. You must either increase the bitrate, decrease the
954 e99c4e10 Fabrice Bellard
frame rate or decrease the frame size.
955 9181577c Fabrice Bellard
956
@item If your computer is not fast enough, you can speed up the
957 e99c4e10 Fabrice Bellard
compression at the expense of the compression ratio. You can use
958
'-me zero' to speed up motion estimation, and '-intra' to disable
959 4c5f7207 Diego Biurrun
motion estimation completely (you have only I-frames, which means it
960 e99c4e10 Fabrice Bellard
is about as good as JPEG compression).
961 9181577c Fabrice Bellard
962 4c5f7207 Diego Biurrun
@item To have very low audio bitrates, reduce the sampling frequency
963 c27c66c3 Benoit Fouet
(down to 22050 Hz for MPEG audio, 22050 or 11025 for AC-3).
964 9181577c Fabrice Bellard
965
@item To have a constant quality (but a variable bitrate), use the option
966 e99c4e10 Fabrice Bellard
'-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
967
quality).
968 9181577c Fabrice Bellard
969
@item When converting video files, you can use the '-sameq' option which
970 4c5f7207 Diego Biurrun
uses the same quality factor in the encoder as in the decoder.
971
It allows almost lossless encoding.
972 9181577c Fabrice Bellard
973
@end itemize
974
975
@bye