~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/doc/ffmpeg.1

  • Committer: Bazaar Package Importer
  • Author(s): Christian Marillat
  • Date: 2004-08-29 10:53:42 UTC
  • Revision ID: james.westby@ubuntu.com-20040829105342-qgmnry37eadfkoxx
Tags: upstream-1.1.3
ImportĀ upstreamĀ versionĀ 1.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
 
2
.\"
 
3
.\" Standard preamble:
 
4
.\" ========================================================================
 
5
.de Sh \" Subsection heading
 
6
.br
 
7
.if t .Sp
 
8
.ne 5
 
9
.PP
 
10
\fB\\$1\fR
 
11
.PP
 
12
..
 
13
.de Sp \" Vertical space (when we can't use .PP)
 
14
.if t .sp .5v
 
15
.if n .sp
 
16
..
 
17
.de Vb \" Begin verbatim text
 
18
.ft CW
 
19
.nf
 
20
.ne \\$1
 
21
..
 
22
.de Ve \" End verbatim text
 
23
.ft R
 
24
.fi
 
25
..
 
26
.\" Set up some character translations and predefined strings.  \*(-- will
 
27
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
 
28
.\" double quote, and \*(R" will give a right double quote.  | will give a
 
29
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
 
30
.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
 
31
.\" expand to `' in nroff, nothing in troff, for use with C<>.
 
32
.tr \(*W-|\(bv\*(Tr
 
33
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
 
34
.ie n \{\
 
35
.    ds -- \(*W-
 
36
.    ds PI pi
 
37
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
 
38
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
 
39
.    ds L" ""
 
40
.    ds R" ""
 
41
.    ds C` ""
 
42
.    ds C' ""
 
43
'br\}
 
44
.el\{\
 
45
.    ds -- \|\(em\|
 
46
.    ds PI \(*p
 
47
.    ds L" ``
 
48
.    ds R" ''
 
49
'br\}
 
50
.\"
 
51
.\" If the F register is turned on, we'll generate index entries on stderr for
 
52
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
 
53
.\" entries marked with X<> in POD.  Of course, you'll have to process the
 
54
.\" output yourself in some meaningful fashion.
 
55
.if \nF \{\
 
56
.    de IX
 
57
.    tm Index:\\$1\t\\n%\t"\\$2"
 
58
..
 
59
.    nr % 0
 
60
.    rr F
 
61
.\}
 
62
.\"
 
63
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 
64
.\" way too many mistakes in technical documents.
 
65
.hy 0
 
66
.if n .na
 
67
.\"
 
68
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 
69
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 
70
.    \" fudge factors for nroff and troff
 
71
.if n \{\
 
72
.    ds #H 0
 
73
.    ds #V .8m
 
74
.    ds #F .3m
 
75
.    ds #[ \f1
 
76
.    ds #] \fP
 
77
.\}
 
78
.if t \{\
 
79
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
 
80
.    ds #V .6m
 
81
.    ds #F 0
 
82
.    ds #[ \&
 
83
.    ds #] \&
 
84
.\}
 
85
.    \" simple accents for nroff and troff
 
86
.if n \{\
 
87
.    ds ' \&
 
88
.    ds ` \&
 
89
.    ds ^ \&
 
90
.    ds , \&
 
91
.    ds ~ ~
 
92
.    ds /
 
93
.\}
 
94
.if t \{\
 
95
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
 
96
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
 
97
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
 
98
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
 
99
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
 
100
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
 
101
.\}
 
102
.    \" troff and (daisy-wheel) nroff accents
 
103
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
 
104
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
 
105
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
 
106
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
 
107
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
 
108
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
 
109
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
 
110
.ds ae a\h'-(\w'a'u*4/10)'e
 
111
.ds Ae A\h'-(\w'A'u*4/10)'E
 
112
.    \" corrections for vroff
 
113
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
 
114
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
 
115
.    \" for low resolution devices (crt and lpr)
 
116
.if \n(.H>23 .if \n(.V>19 \
 
117
\{\
 
118
.    ds : e
 
119
.    ds 8 ss
 
120
.    ds o a
 
121
.    ds d- d\h'-1'\(ga
 
122
.    ds D- D\h'-1'\(hy
 
123
.    ds th \o'bp'
 
124
.    ds Th \o'LP'
 
125
.    ds ae ae
 
126
.    ds Ae AE
 
127
.\}
 
128
.rm #[ #] #H #V #F C
 
129
.\" ========================================================================
 
130
.\"
 
131
.IX Title "FFMPEG 1"
 
132
.TH FFMPEG 1 "2003-09-16" " " " "
 
133
.SH "NAME"
 
134
ffmpeg \- FFmpeg video converter
 
135
.SH "SYNOPSIS"
 
136
.IX Header "SYNOPSIS"
 
137
ffmpeg [[options][\fB\-i\fR \fIinput_file\fR]]... {[options] \fIoutput_file\fR}...
 
138
.SH "DESCRIPTION"
 
139
.IX Header "DESCRIPTION"
 
140
If no input file is given, audio/video grabbing is done.
 
141
.PP
 
142
As a general rule, options are applied to the next specified
 
143
file. For example, if you give the \fB\-b 64\fR option, it sets the video
 
144
bitrate of the next file. Format option may be needed for raw input
 
145
files.
 
146
.PP
 
147
By default, ffmpeg tries to convert as losslessly as possible: it
 
148
uses the same audio and video parameter for the outputs as the one
 
149
specified for the inputs.
 
150
.SH "OPTIONS"
 
151
.IX Header "OPTIONS"
 
152
.Sh "Main options"
 
153
.IX Subsection "Main options"
 
154
.IP "\fB\-L\fR" 4
 
155
.IX Item "-L"
 
156
show license
 
157
.IP "\fB\-h\fR" 4
 
158
.IX Item "-h"
 
159
show help
 
160
.IP "\fB\-formats\fR" 4
 
161
.IX Item "-formats"
 
162
show available formats, codecs, protocols, ...
 
163
.IP "\fB\-f fmt\fR" 4
 
164
.IX Item "-f fmt"
 
165
force format
 
166
.IP "\fB\-i filename\fR" 4
 
167
.IX Item "-i filename"
 
168
input file name
 
169
.IP "\fB\-y\fR" 4
 
170
.IX Item "-y"
 
171
overwrite output files
 
172
.IP "\fB\-t duration\fR" 4
 
173
.IX Item "-t duration"
 
174
set the recording time in seconds. \f(CW\*(C`hh:mm:ss[.xxx]\*(C'\fR syntax is also
 
175
supported.
 
176
.IP "\fB\-title string\fR" 4
 
177
.IX Item "-title string"
 
178
set the title
 
179
.IP "\fB\-author string\fR" 4
 
180
.IX Item "-author string"
 
181
set the author
 
182
.IP "\fB\-copyright string\fR" 4
 
183
.IX Item "-copyright string"
 
184
set the copyright
 
185
.IP "\fB\-comment string\fR" 4
 
186
.IX Item "-comment string"
 
187
set the comment
 
188
.IP "\fB\-hq\fR" 4
 
189
.IX Item "-hq"
 
190
activate high quality settings
 
191
.Sh "Video Options"
 
192
.IX Subsection "Video Options"
 
193
.IP "\fB\-b bitrate\fR" 4
 
194
.IX Item "-b bitrate"
 
195
set the video bitrate in kbit/s (default = 200 kb/s)
 
196
.IP "\fB\-r fps\fR" 4
 
197
.IX Item "-r fps"
 
198
set frame rate (default = 25)
 
199
.IP "\fB\-s size\fR" 4
 
200
.IX Item "-s size"
 
201
set frame size. The format is \fBWxH\fR (default 160x128).  The
 
202
following abbreviations are recognized:
 
203
.RS 4
 
204
.IP "\fBsqcif\fR" 4
 
205
.IX Item "sqcif"
 
206
128x96
 
207
.IP "\fBqcif\fR" 4
 
208
.IX Item "qcif"
 
209
176x144
 
210
.IP "\fBcif\fR" 4
 
211
.IX Item "cif"
 
212
352x288
 
213
.IP "\fB4cif\fR" 4
 
214
.IX Item "4cif"
 
215
704x576
 
216
.RE
 
217
.RS 4
 
218
.RE
 
219
.IP "\fB\-aspect aspect\fR" 4
 
220
.IX Item "-aspect aspect"
 
221
set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
 
222
.IP "\fB\-croptop size\fR" 4
 
223
.IX Item "-croptop size"
 
224
set top crop band size (in pixels)
 
225
.IP "\fB\-cropbottom size\fR" 4
 
226
.IX Item "-cropbottom size"
 
227
set bottom crop band size (in pixels)
 
228
.IP "\fB\-cropleft size\fR" 4
 
229
.IX Item "-cropleft size"
 
230
set left crop band size (in pixels)
 
231
.IP "\fB\-cropright size\fR" 4
 
232
.IX Item "-cropright size"
 
233
set right crop band size (in pixels)
 
234
.IP "\fB\-vn\fR" 4
 
235
.IX Item "-vn"
 
236
disable video recording
 
237
.IP "\fB\-bt tolerance\fR" 4
 
238
.IX Item "-bt tolerance"
 
239
set video bitrate tolerance (in kbit/s)
 
240
.IP "\fB\-maxrate bitrate\fR" 4
 
241
.IX Item "-maxrate bitrate"
 
242
set max video bitrate tolerance (in kbit/s)
 
243
.IP "\fB\-minrate bitrate\fR" 4
 
244
.IX Item "-minrate bitrate"
 
245
set min video bitrate tolerance (in kbit/s)
 
246
.IP "\fB\-bufsize size\fR" 4
 
247
.IX Item "-bufsize size"
 
248
set ratecontrol buffere size (in kbit)
 
249
.IP "\fB\-vcodec codec\fR" 4
 
250
.IX Item "-vcodec codec"
 
251
force video codec to \fIcodec\fR. Use the \f(CW\*(C`copy\*(C'\fR special value to
 
252
tell that the raw codec data must be copied as is.
 
253
.IP "\fB\-sameq\fR" 4
 
254
.IX Item "-sameq"
 
255
use same video quality as source (implies \s-1VBR\s0)
 
256
.IP "\fB\-pass n\fR" 4
 
257
.IX Item "-pass n"
 
258
select the pass number (1 or 2). It is useful to do two pass
 
259
encoding. The statistics of the video are recorded in the first pass and
 
260
the video at the exact requested bit rate is generated in the second
 
261
pass.
 
262
.IP "\fB\-passlogfile file\fR" 4
 
263
.IX Item "-passlogfile file"
 
264
select two pass log file name to \fIfile\fR.
 
265
.Sh "Advanced Video Options"
 
266
.IX Subsection "Advanced Video Options"
 
267
.IP "\fB\-g gop_size\fR" 4
 
268
.IX Item "-g gop_size"
 
269
set the group of picture size
 
270
.IP "\fB\-intra\fR" 4
 
271
.IX Item "-intra"
 
272
use only intra frames
 
273
.IP "\fB\-qscale q\fR" 4
 
274
.IX Item "-qscale q"
 
275
use fixed video quantiser scale (\s-1VBR\s0)
 
276
.IP "\fB\-qmin q\fR" 4
 
277
.IX Item "-qmin q"
 
278
min video quantiser scale (\s-1VBR\s0)
 
279
.IP "\fB\-qmax q\fR" 4
 
280
.IX Item "-qmax q"
 
281
max video quantiser scale (\s-1VBR\s0)
 
282
.IP "\fB\-qdiff q\fR" 4
 
283
.IX Item "-qdiff q"
 
284
max difference between the quantiser scale (\s-1VBR\s0)
 
285
.IP "\fB\-qblur blur\fR" 4
 
286
.IX Item "-qblur blur"
 
287
video quantiser scale blur (\s-1VBR\s0)
 
288
.IP "\fB\-qcomp compression\fR" 4
 
289
.IX Item "-qcomp compression"
 
290
video quantiser scale compression (\s-1VBR\s0)
 
291
.IP "\fB\-rc_init_cplx complexity\fR" 4
 
292
.IX Item "-rc_init_cplx complexity"
 
293
initial complexity for 1\-pass encoding
 
294
.IP "\fB\-b_qfactor factor\fR" 4
 
295
.IX Item "-b_qfactor factor"
 
296
qp factor between p and b frames
 
297
.IP "\fB\-i_qfactor factor\fR" 4
 
298
.IX Item "-i_qfactor factor"
 
299
qp factor between p and i frames
 
300
.IP "\fB\-b_qoffset offset\fR" 4
 
301
.IX Item "-b_qoffset offset"
 
302
qp offset between p and b frames
 
303
.IP "\fB\-i_qoffset offset\fR" 4
 
304
.IX Item "-i_qoffset offset"
 
305
qp offset between p and i frames
 
306
.IP "\fB\-rc_eq equation\fR" 4
 
307
.IX Item "-rc_eq equation"
 
308
set rate control equation. Default is \f(CW\*(C`tex^qComp\*(C'\fR.
 
309
.IP "\fB\-rc_override override\fR" 4
 
310
.IX Item "-rc_override override"
 
311
rate control override for specific intervals
 
312
.IP "\fB\-me method\fR" 4
 
313
.IX Item "-me method"
 
314
set motion estimation method to \fImethod\fR. Available methods are
 
315
(from lower to best quality):
 
316
.RS 4
 
317
.IP "\fBzero\fR" 4
 
318
.IX Item "zero"
 
319
Try just the (0, 0) vector.
 
320
.IP "\fBphods\fR" 4
 
321
.IX Item "phods"
 
322
.PD 0
 
323
.IP "\fBlog\fR" 4
 
324
.IX Item "log"
 
325
.IP "\fBx1\fR" 4
 
326
.IX Item "x1"
 
327
.IP "\fBepzs\fR" 4
 
328
.IX Item "epzs"
 
329
.PD
 
330
(default method)
 
331
.IP "\fBfull\fR" 4
 
332
.IX Item "full"
 
333
exhaustive search (slow and marginally better than epzs)
 
334
.RE
 
335
.RS 4
 
336
.RE
 
337
.IP "\fB\-dct_algo algo\fR" 4
 
338
.IX Item "-dct_algo algo"
 
339
set dct algorithm to \fIalgo\fR. Available values are:
 
340
.RS 4
 
341
.IP "\fB0\fR" 4
 
342
.IX Item "0"
 
343
\&\s-1FF_DCT_AUTO\s0 (default)
 
344
.IP "\fB1\fR" 4
 
345
.IX Item "1"
 
346
\&\s-1FF_DCT_FASTINT\s0
 
347
.IP "\fB2\fR" 4
 
348
.IX Item "2"
 
349
\&\s-1FF_DCT_INT\s0
 
350
.IP "\fB3\fR" 4
 
351
.IX Item "3"
 
352
\&\s-1FF_DCT_MMX\s0
 
353
.IP "\fB4\fR" 4
 
354
.IX Item "4"
 
355
\&\s-1FF_DCT_MLIB\s0
 
356
.IP "\fB5\fR" 4
 
357
.IX Item "5"
 
358
\&\s-1FF_DCT_ALTIVEC\s0
 
359
.RE
 
360
.RS 4
 
361
.RE
 
362
.IP "\fB\-idct_algo algo\fR" 4
 
363
.IX Item "-idct_algo algo"
 
364
set idct algorithm to \fIalgo\fR. Available values are:
 
365
.RS 4
 
366
.IP "\fB0\fR" 4
 
367
.IX Item "0"
 
368
\&\s-1FF_IDCT_AUTO\s0 (default)
 
369
.IP "\fB1\fR" 4
 
370
.IX Item "1"
 
371
\&\s-1FF_IDCT_INT\s0          
 
372
.IP "\fB2\fR" 4
 
373
.IX Item "2"
 
374
\&\s-1FF_IDCT_SIMPLE\s0       
 
375
.IP "\fB3\fR" 4
 
376
.IX Item "3"
 
377
\&\s-1FF_IDCT_SIMPLEMMX\s0    
 
378
.IP "\fB4\fR" 4
 
379
.IX Item "4"
 
380
\&\s-1FF_IDCT_LIBMPEG2MMX\s0  
 
381
.IP "\fB5\fR" 4
 
382
.IX Item "5"
 
383
\&\s-1FF_IDCT_PS2\s0          
 
384
.IP "\fB6\fR" 4
 
385
.IX Item "6"
 
386
\&\s-1FF_IDCT_MLIB\s0         
 
387
.IP "\fB7\fR" 4
 
388
.IX Item "7"
 
389
\&\s-1FF_IDCT_ARM\s0          
 
390
.IP "\fB8\fR" 4
 
391
.IX Item "8"
 
392
\&\s-1FF_IDCT_ALTIVEC\s0      
 
393
.IP "\fB9\fR" 4
 
394
.IX Item "9"
 
395
\&\s-1FF_IDCT_SH4\s0          
 
396
.IP "\fB10\fR" 4
 
397
.IX Item "10"
 
398
\&\s-1FF_IDCT_SIMPLEARM\s0    
 
399
.RE
 
400
.RS 4
 
401
.RE
 
402
.IP "\fB\-er n\fR" 4
 
403
.IX Item "-er n"
 
404
set error resilience to \fIn\fR.
 
405
.RS 4
 
406
.IP "\fB1\fR" 4
 
407
.IX Item "1"
 
408
\&\s-1FF_ER_CAREFULL\s0 (default)
 
409
.IP "\fB2\fR" 4
 
410
.IX Item "2"
 
411
\&\s-1FF_ER_COMPLIANT\s0
 
412
.IP "\fB3\fR" 4
 
413
.IX Item "3"
 
414
\&\s-1FF_ER_AGGRESSIVE\s0
 
415
.IP "\fB4\fR" 4
 
416
.IX Item "4"
 
417
\&\s-1FF_ER_VERY_AGGRESSIVE\s0
 
418
.RE
 
419
.RS 4
 
420
.RE
 
421
.IP "\fB\-ec bit_mask\fR" 4
 
422
.IX Item "-ec bit_mask"
 
423
set error concealment to \fIbit_mask\fR. \fIbit_mask\fR is a bit mask of
 
424
the following values:
 
425
.RS 4
 
426
.IP "\fB1\fR" 4
 
427
.IX Item "1"
 
428
\&\s-1FF_EC_GUESS_MVS\s0 (default=enabled)
 
429
.IP "\fB2\fR" 4
 
430
.IX Item "2"
 
431
\&\s-1FF_EC_DEBLOCK\s0 (default=enabled)
 
432
.RE
 
433
.RS 4
 
434
.RE
 
435
.IP "\fB\-bf frames\fR" 4
 
436
.IX Item "-bf frames"
 
437
use 'frames' B frames (supported for \s-1MPEG\-1\s0, \s-1MPEG\-2\s0 and \s-1MPEG\-4\s0)
 
438
.IP "\fB\-mbd mode\fR" 4
 
439
.IX Item "-mbd mode"
 
440
macroblock decision
 
441
.RS 4
 
442
.IP "\fB0\fR" 4
 
443
.IX Item "0"
 
444
\&\s-1FF_MB_DECISION_SIMPLE:\s0 use mb_cmp (cannot change it yet in ffmpeg)
 
445
.IP "\fB1\fR" 4
 
446
.IX Item "1"
 
447
\&\s-1FF_MB_DECISION_BITS:\s0 chooses the one which needs the fewest bits
 
448
.IP "\fB2\fR" 4
 
449
.IX Item "2"
 
450
\&\s-1FF_MB_DECISION_RD:\s0 rate distoration
 
451
.RE
 
452
.RS 4
 
453
.RE
 
454
.IP "\fB\-4mv\fR" 4
 
455
.IX Item "-4mv"
 
456
use four motion vector by macroblock (only \s-1MPEG\-4\s0)
 
457
.IP "\fB\-part\fR" 4
 
458
.IX Item "-part"
 
459
use data partitioning (only \s-1MPEG\-4\s0)
 
460
.IP "\fB\-bug param\fR" 4
 
461
.IX Item "-bug param"
 
462
workaround not auto detected encoder bugs
 
463
.IP "\fB\-strict strictness\fR" 4
 
464
.IX Item "-strict strictness"
 
465
how strictly to follow the standarts
 
466
.IP "\fB\-aic\fR" 4
 
467
.IX Item "-aic"
 
468
enable Advanced intra coding (h263+)
 
469
.IP "\fB\-umv\fR" 4
 
470
.IX Item "-umv"
 
471
enable Unlimited Motion Vector (h263+)
 
472
.IP "\fB\-deinterlace\fR" 4
 
473
.IX Item "-deinterlace"
 
474
deinterlace pictures
 
475
.IP "\fB\-psnr\fR" 4
 
476
.IX Item "-psnr"
 
477
calculate \s-1PSNR\s0 of compressed frames
 
478
.IP "\fB\-vstats\fR" 4
 
479
.IX Item "-vstats"
 
480
dump video coding statistics to \fIvstats_HHMMSS.log\fR.
 
481
.IP "\fB\-vhook module\fR" 4
 
482
.IX Item "-vhook module"
 
483
insert video processing \fImodule\fR. \fImodule\fR contains the module
 
484
name and its parameters separated by spaces.
 
485
.Sh "Audio Options"
 
486
.IX Subsection "Audio Options"
 
487
.IP "\fB\-ab bitrate\fR" 4
 
488
.IX Item "-ab bitrate"
 
489
set audio bitrate (in kbit/s)
 
490
.IP "\fB\-ar freq\fR" 4
 
491
.IX Item "-ar freq"
 
492
set the audio sampling freq (default = 44100 Hz)
 
493
.IP "\fB\-ab bitrate\fR" 4
 
494
.IX Item "-ab bitrate"
 
495
set the audio bitrate in kbit/s (default = 64)
 
496
.IP "\fB\-ac channels\fR" 4
 
497
.IX Item "-ac channels"
 
498
set the number of audio channels (default = 1)
 
499
.IP "\fB\-an\fR" 4
 
500
.IX Item "-an"
 
501
disable audio recording
 
502
.IP "\fB\-acodec codec\fR" 4
 
503
.IX Item "-acodec codec"
 
504
force audio codec to \fIcodec\fR. Use the \f(CW\*(C`copy\*(C'\fR special value to
 
505
tell that the raw codec data must be copied as is.
 
506
.Sh "Audio/Video grab options"
 
507
.IX Subsection "Audio/Video grab options"
 
508
.IP "\fB\-vd device\fR" 4
 
509
.IX Item "-vd device"
 
510
set video grab device (e.g. \fI/dev/video0\fR)
 
511
.IP "\fB\-vc channel\fR" 4
 
512
.IX Item "-vc channel"
 
513
set video grab channel (\s-1DV1394\s0 only)
 
514
.IP "\fB\-tvstd standard\fR" 4
 
515
.IX Item "-tvstd standard"
 
516
set television standard (\s-1NTSC\s0, \s-1PAL\s0 (\s-1SECAM\s0))
 
517
.IP "\fB\-dv1394\fR" 4
 
518
.IX Item "-dv1394"
 
519
set \s-1DV1394\s0 grab
 
520
.IP "\fB\-ad device\fR" 4
 
521
.IX Item "-ad device"
 
522
set audio device (e.g. \fI/dev/dsp\fR)
 
523
.Sh "Advanced options"
 
524
.IX Subsection "Advanced options"
 
525
.IP "\fB\-map file:stream\fR" 4
 
526
.IX Item "-map file:stream"
 
527
set input stream mapping
 
528
.IP "\fB\-debug\fR" 4
 
529
.IX Item "-debug"
 
530
print specific debug info
 
531
.IP "\fB\-benchmark\fR" 4
 
532
.IX Item "-benchmark"
 
533
add timings for benchmarking
 
534
.IP "\fB\-hex\fR" 4
 
535
.IX Item "-hex"
 
536
dump each input packet
 
537
.IP "\fB\-bitexact\fR" 4
 
538
.IX Item "-bitexact"
 
539
only use bit exact algorithms (for codec testing)
 
540
.IP "\fB\-ps size\fR" 4
 
541
.IX Item "-ps size"
 
542
set packet size in bits
 
543
.IP "\fB\-re\fR" 4
 
544
.IX Item "-re"
 
545
read input at native frame rate. Mainly used to simulate a grab device.
 
546
.IP "\fB\-loop\fR" 4
 
547
.IX Item "-loop"
 
548
loop over the input stream. Currently it works only for image
 
549
streams. This option is used for ffserver automatic testing.
 
550
.Sh "FFmpeg formula evaluator"
 
551
.IX Subsection "FFmpeg formula evaluator"
 
552
When evaluating a rate control string, FFmpeg uses an internal formula
 
553
evaluator. 
 
554
.PP
 
555
The following binary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR,
 
556
\&\f(CW\*(C`*\*(C'\fR, \f(CW\*(C`/\*(C'\fR, \f(CW\*(C`^\*(C'\fR.
 
557
.PP
 
558
The following unary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR,
 
559
\&\f(CW\*(C`(...)\*(C'\fR.
 
560
.PP
 
561
The following functions are available:
 
562
.IP "\fIsinh(x)\fR" 4
 
563
.IX Item "sinh(x)"
 
564
.PD 0
 
565
.IP "\fIcosh(x)\fR" 4
 
566
.IX Item "cosh(x)"
 
567
.IP "\fItanh(x)\fR" 4
 
568
.IX Item "tanh(x)"
 
569
.IP "\fIsin(x)\fR" 4
 
570
.IX Item "sin(x)"
 
571
.IP "\fIcos(x)\fR" 4
 
572
.IX Item "cos(x)"
 
573
.IP "\fItan(x)\fR" 4
 
574
.IX Item "tan(x)"
 
575
.IP "\fIexp(x)\fR" 4
 
576
.IX Item "exp(x)"
 
577
.IP "\fIlog(x)\fR" 4
 
578
.IX Item "log(x)"
 
579
.IP "\fIsquish(x)\fR" 4
 
580
.IX Item "squish(x)"
 
581
.IP "\fIgauss(x)\fR" 4
 
582
.IX Item "gauss(x)"
 
583
.IP "\fIabs(x)\fR" 4
 
584
.IX Item "abs(x)"
 
585
.IP "\fImax(x, y)\fR" 4
 
586
.IX Item "max(x, y)"
 
587
.IP "\fImin(x, y)\fR" 4
 
588
.IX Item "min(x, y)"
 
589
.IP "\fIgt(x, y)\fR" 4
 
590
.IX Item "gt(x, y)"
 
591
.IP "\fIlt(x, y)\fR" 4
 
592
.IX Item "lt(x, y)"
 
593
.IP "\fIeq(x, y)\fR" 4
 
594
.IX Item "eq(x, y)"
 
595
.IP "\fIbits2qp(bits)\fR" 4
 
596
.IX Item "bits2qp(bits)"
 
597
.IP "\fIqp2bits(qp)\fR" 4
 
598
.IX Item "qp2bits(qp)"
 
599
.PD
 
600
.PP
 
601
The following constants are available:
 
602
.IP "\fI\s-1PI\s0\fR" 4
 
603
.IX Item "PI"
 
604
.PD 0
 
605
.IP "\fIE\fR" 4
 
606
.IX Item "E"
 
607
.IP "\fIiTex\fR" 4
 
608
.IX Item "iTex"
 
609
.IP "\fIpTex\fR" 4
 
610
.IX Item "pTex"
 
611
.IP "\fItex\fR" 4
 
612
.IX Item "tex"
 
613
.IP "\fImv\fR" 4
 
614
.IX Item "mv"
 
615
.IP "\fIfCode\fR" 4
 
616
.IX Item "fCode"
 
617
.IP "\fIiCount\fR" 4
 
618
.IX Item "iCount"
 
619
.IP "\fImcVar\fR" 4
 
620
.IX Item "mcVar"
 
621
.IP "\fIvar\fR" 4
 
622
.IX Item "var"
 
623
.IP "\fIisI\fR" 4
 
624
.IX Item "isI"
 
625
.IP "\fIisP\fR" 4
 
626
.IX Item "isP"
 
627
.IP "\fIisB\fR" 4
 
628
.IX Item "isB"
 
629
.IP "\fIavgQP\fR" 4
 
630
.IX Item "avgQP"
 
631
.IP "\fIqComp\fR" 4
 
632
.IX Item "qComp"
 
633
.IP "\fIavgIITex\fR" 4
 
634
.IX Item "avgIITex"
 
635
.IP "\fIavgPITex\fR" 4
 
636
.IX Item "avgPITex"
 
637
.IP "\fIavgPPTex\fR" 4
 
638
.IX Item "avgPPTex"
 
639
.IP "\fIavgBPTex\fR" 4
 
640
.IX Item "avgBPTex"
 
641
.IP "\fIavgTex\fR" 4
 
642
.IX Item "avgTex"
 
643
.PD
 
644
.SH "EXAMPLES"
 
645
.IX Header "EXAMPLES"
 
646
.Sh "Video and Audio grabbing"
 
647
.IX Subsection "Video and Audio grabbing"
 
648
FFmpeg can use a video4linux compatible video source and any Open Sound
 
649
System audio source:
 
650
.PP
 
651
.Vb 1
 
652
\&        ffmpeg /tmp/out.mpg
 
653
.Ve
 
654
.PP
 
655
Note that you must activate the right video source and channel before
 
656
launching ffmpeg. You can use any \s-1TV\s0 viewer such as xawtv
 
657
(<\fBhttp://bytesex.org/xawtv/\fR>) by Gerd Knorr which I find very
 
658
good. You must also set correctly the audio recording levels with a
 
659
standard mixer.
 
660
.Sh "Video and Audio file format conversion"
 
661
.IX Subsection "Video and Audio file format conversion"
 
662
* ffmpeg can use any supported file format and protocol as input: 
 
663
.PP
 
664
Examples:
 
665
.PP
 
666
* You can input from \s-1YUV\s0 files:
 
667
.PP
 
668
.Vb 1
 
669
\&        ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
 
670
.Ve
 
671
.PP
 
672
It will use the files: 
 
673
.PP
 
674
.Vb 2
 
675
\&        /tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
 
676
\&        /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
 
677
.Ve
 
678
.PP
 
679
The Y files use twice the resolution of the U and V files. They are
 
680
raw files, without header. They can be generated by all decent video
 
681
decoders. You must specify the size of the image with the \fB\-s\fR option
 
682
if ffmpeg cannot guess it.
 
683
.PP
 
684
* You can input from a \s-1RAW\s0 \s-1YUV420P\s0 file:
 
685
.PP
 
686
.Vb 1
 
687
\&        ffmpeg -i /tmp/test.yuv /tmp/out.avi
 
688
.Ve
 
689
.PP
 
690
The \s-1RAW\s0 \s-1YUV420P\s0 is a file containing \s-1RAW\s0 \s-1YUV\s0 planar, for each frame first
 
691
come the Y plane followed by U and V planes, which are half vertical and
 
692
horizontal resolution.
 
693
.PP
 
694
* You can output to a \s-1RAW\s0 \s-1YUV420P\s0 file:
 
695
.PP
 
696
.Vb 1
 
697
\&        ffmpeg -i mydivx.avi -o hugefile.yuv
 
698
.Ve
 
699
.PP
 
700
* You can set several input files and output files:
 
701
.PP
 
702
.Vb 1
 
703
\&        ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
 
704
.Ve
 
705
.PP
 
706
Convert the audio file a.wav and the raw yuv video file a.yuv
 
707
to mpeg file a.mpg
 
708
.PP
 
709
* You can also do audio and video conversions at the same time:
 
710
.PP
 
711
.Vb 1
 
712
\&        ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
 
713
.Ve
 
714
.PP
 
715
Convert the sample rate of a.wav to 22050 Hz and encode it to \s-1MPEG\s0 audio.
 
716
.PP
 
717
* You can encode to several formats at the same time and define a
 
718
mapping from input stream to output streams:
 
719
.PP
 
720
.Vb 1
 
721
\&        ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0
 
722
.Ve
 
723
.PP
 
724
Convert a.wav to a.mp2 at 64 kbits and b.mp2 at 128 kbits. '\-map
 
725
file:index' specify which input stream is used for each output
 
726
stream, in the order of the definition of output streams.
 
727
.PP
 
728
* You can transcode decrypted VOBs
 
729
.PP
 
730
.Vb 1
 
731
\&        ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
 
732
.Ve
 
733
.PP
 
734
This is a typical \s-1DVD\s0 ripper example, input from a \s-1VOB\s0 file, output
 
735
to an \s-1AVI\s0 file with \s-1MPEG\-4\s0 video and \s-1MP3\s0 audio, note that in this
 
736
command we use B frames so the \s-1MPEG\-4\s0 stream is DivX5 compatible, \s-1GOP\s0
 
737
size is 300 that means an \s-1INTRA\s0 frame every 10 seconds for 29.97 fps
 
738
input video.  Also the audio stream is \s-1MP3\s0 encoded so you need \s-1LAME\s0
 
739
support which is enabled using \f(CW\*(C`\-\-enable\-mp3lame\*(C'\fR when
 
740
configuring.  The mapping is particularly useful for \s-1DVD\s0 transcoding
 
741
to get the desired audio language.
 
742
.PP
 
743
\&\s-1NOTE:\s0 to see the supported input formats, use \f(CW\*(C`ffmpeg \-formats\*(C'\fR.
 
744
.SH "SEE ALSO"
 
745
.IX Header "SEE ALSO"
 
746
\&\fIffserver\fR\|(1), \fIffplay\fR\|(1) and the html documentation of \fIffmpeg\fR.
 
747
.SH "AUTHOR"
 
748
.IX Header "AUTHOR"
 
749
Fabrice Bellard