File: ffmpeg.1

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