VirtualBox

source: vbox/trunk/src/libs/ffmpeg-20060710/doc/ffmpeg.1@ 6184

最後變更 在這個檔案從6184是 5776,由 vboxsync 提交於 17 年 前

ffmpeg: exported to OSE

檔案大小: 22.0 KB
 
1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
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 "2006-06-30" " " " "
133.SH "NAME"
134ffmpeg \- FFmpeg video converter
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137ffmpeg [[infile options][\fB\-i\fR \fIinfile\fR]]... {[outfile options] \fIoutfile\fR}...
138.SH "DESCRIPTION"
139.IX Header "DESCRIPTION"
140If no input file is given, audio/video grabbing is done.
141.PP
142As a general rule, options are applied to the next specified
143file. For example, if you give the \fB\-b 64\fR option, it sets the video
144bitrate of the next file. The format option may be needed for raw input
145files.
146.PP
147By default, FFmpeg tries to convert as losslessly as possible: It
148uses the same audio and video parameters for the outputs as the one
149specified 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"
156Show license.
157.IP "\fB\-h\fR" 4
158.IX Item "-h"
159Show help.
160.IP "\fB\-formats\fR" 4
161.IX Item "-formats"
162Show available formats, codecs, protocols, ...
163.IP "\fB\-f fmt\fR" 4
164.IX Item "-f fmt"
165Force format.
166.IP "\fB\-i filename\fR" 4
167.IX Item "-i filename"
168input filename
169.IP "\fB\-y\fR" 4
170.IX Item "-y"
171Overwrite output files.
172.IP "\fB\-t duration\fR" 4
173.IX Item "-t duration"
174Set the recording time in seconds.
175\&\f(CW\*(C`hh:mm:ss[.xxx]\*(C'\fR syntax is also supported.
176.IP "\fB\-ss position\fR" 4
177.IX Item "-ss position"
178Seek to given time position in seconds.
179\&\f(CW\*(C`hh:mm:ss[.xxx]\*(C'\fR syntax is also supported.
180.IP "\fB\-title string\fR" 4
181.IX Item "-title string"
182Set the title.
183.IP "\fB\-author string\fR" 4
184.IX Item "-author string"
185Set the author.
186.IP "\fB\-copyright string\fR" 4
187.IX Item "-copyright string"
188Set the copyright.
189.IP "\fB\-comment string\fR" 4
190.IX Item "-comment string"
191Set the comment.
192.IP "\fB\-target type\fR" 4
193.IX Item "-target type"
194Specify target file type (\*(L"vcd\*(R", \*(L"svcd\*(R", \*(L"dvd\*(R", \*(L"dv\*(R", \*(L"pal\-vcd\*(R",
195\&\*(L"ntsc\-svcd\*(R", ... ). All the format options (bitrate, codecs,
196buffer sizes) are then set automatically. You can just type:
197.Sp
198.Vb 1
199\& ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg
200.Ve
201.Sp
202Nevertheless you can specify additional options as long as you know
203they do not conflict with the standard, as in:
204.Sp
205.Vb 1
206\& ffmpeg -i myfile.avi -target vcd -bf 2 /tmp/vcd.mpg
207.Ve
208.IP "\fB\-hq\fR" 4
209.IX Item "-hq"
210Activate high quality settings.
211.IP "\fB\-itsoffset offset\fR" 4
212.IX Item "-itsoffset offset"
213Set the input time offset in seconds.
214\&\f(CW\*(C`[\-]hh:mm:ss[.xxx]\*(C'\fR syntax is also supported.
215This option affects all the input files that follow it.
216The offset is added to the timestamps of the input files.
217Specifying a positive offset means that the corresponding
218streams are delayed by 'offset' seconds.
219.Sh "Video Options"
220.IX Subsection "Video Options"
221.IP "\fB\-b bitrate\fR" 4
222.IX Item "-b bitrate"
223Set the video bitrate in kbit/s (default = 200 kb/s).
224.IP "\fB\-r fps\fR" 4
225.IX Item "-r fps"
226Set frame rate (default = 25).
227.IP "\fB\-s size\fR" 4
228.IX Item "-s size"
229Set frame size. The format is \fBwxh\fR (default = 160x128).
230The following abbreviations are recognized:
231.RS 4
232.IP "\fBsqcif\fR" 4
233.IX Item "sqcif"
234128x96
235.IP "\fBqcif\fR" 4
236.IX Item "qcif"
237176x144
238.IP "\fBcif\fR" 4
239.IX Item "cif"
240352x288
241.IP "\fB4cif\fR" 4
242.IX Item "4cif"
243704x576
244.RE
245.RS 4
246.RE
247.IP "\fB\-aspect aspect\fR" 4
248.IX Item "-aspect aspect"
249Set aspect ratio (4:3, 16:9 or 1.3333, 1.7777).
250.IP "\fB\-croptop size\fR" 4
251.IX Item "-croptop size"
252Set top crop band size (in pixels).
253.IP "\fB\-cropbottom size\fR" 4
254.IX Item "-cropbottom size"
255Set bottom crop band size (in pixels).
256.IP "\fB\-cropleft size\fR" 4
257.IX Item "-cropleft size"
258Set left crop band size (in pixels).
259.IP "\fB\-cropright size\fR" 4
260.IX Item "-cropright size"
261Set right crop band size (in pixels).
262.IP "\fB\-padtop size\fR" 4
263.IX Item "-padtop size"
264Set top pad band size (in pixels).
265.IP "\fB\-padbottom size\fR" 4
266.IX Item "-padbottom size"
267Set bottom pad band size (in pixels).
268.IP "\fB\-padleft size\fR" 4
269.IX Item "-padleft size"
270Set left pad band size (in pixels).
271.IP "\fB\-padright size\fR" 4
272.IX Item "-padright size"
273Set right pad band size (in pixels).
274.IP "\fB\-padcolor (hex color)\fR" 4
275.IX Item "-padcolor (hex color)"
276Set color of padded bands. The value for padcolor is expressed
277as a six digit hexadecimal number where the first two digits
278represent red, the middle two digits green and last two digits
279blue (default = 000000 (black)).
280.IP "\fB\-vn\fR" 4
281.IX Item "-vn"
282Disable video recording.
283.IP "\fB\-bt tolerance\fR" 4
284.IX Item "-bt tolerance"
285Set video bitrate tolerance (in kbit/s).
286.IP "\fB\-maxrate bitrate\fR" 4
287.IX Item "-maxrate bitrate"
288Set max video bitrate tolerance (in kbit/s).
289.IP "\fB\-minrate bitrate\fR" 4
290.IX Item "-minrate bitrate"
291Set min video bitrate tolerance (in kbit/s).
292.IP "\fB\-bufsize size\fR" 4
293.IX Item "-bufsize size"
294Set rate control buffer size (in kbit).
295.IP "\fB\-vcodec codec\fR" 4
296.IX Item "-vcodec codec"
297Force video codec to \fIcodec\fR. Use the \f(CW\*(C`copy\*(C'\fR special value to
298tell that the raw codec data must be copied as is.
299.IP "\fB\-sameq\fR" 4
300.IX Item "-sameq"
301Use same video quality as source (implies \s-1VBR\s0).
302.IP "\fB\-pass n\fR" 4
303.IX Item "-pass n"
304Select the pass number (1 or 2). It is useful to do two pass
305encoding. The statistics of the video are recorded in the first
306pass and the video is generated at the exact requested bitrate
307in the second pass.
308.IP "\fB\-passlogfile file\fR" 4
309.IX Item "-passlogfile file"
310Set two pass logfile name to \fIfile\fR.
311.Sh "Advanced Video Options"
312.IX Subsection "Advanced Video Options"
313.IP "\fB\-g gop_size\fR" 4
314.IX Item "-g gop_size"
315Set the group of pictures size.
316.IP "\fB\-intra\fR" 4
317.IX Item "-intra"
318Use only intra frames.
319.IP "\fB\-qscale q\fR" 4
320.IX Item "-qscale q"
321Use fixed video quantiser scale (\s-1VBR\s0).
322.IP "\fB\-qmin q\fR" 4
323.IX Item "-qmin q"
324minimum video quantiser scale (\s-1VBR\s0)
325.IP "\fB\-qmax q\fR" 4
326.IX Item "-qmax q"
327maximum video quantiser scale (\s-1VBR\s0)
328.IP "\fB\-qdiff q\fR" 4
329.IX Item "-qdiff q"
330maximum difference between the quantiser scales (\s-1VBR\s0)
331.IP "\fB\-qblur blur\fR" 4
332.IX Item "-qblur blur"
333video quantiser scale blur (\s-1VBR\s0)
334.IP "\fB\-qcomp compression\fR" 4
335.IX Item "-qcomp compression"
336video quantiser scale compression (\s-1VBR\s0)
337.IP "\fB\-rc_init_cplx complexity\fR" 4
338.IX Item "-rc_init_cplx complexity"
339initial complexity for single pass encoding
340.IP "\fB\-b_qfactor factor\fR" 4
341.IX Item "-b_qfactor factor"
342qp factor between P\- and B\-frames
343.IP "\fB\-i_qfactor factor\fR" 4
344.IX Item "-i_qfactor factor"
345qp factor between P\- and I\-frames
346.IP "\fB\-b_qoffset offset\fR" 4
347.IX Item "-b_qoffset offset"
348qp offset between P\- and B\-frames
349.IP "\fB\-i_qoffset offset\fR" 4
350.IX Item "-i_qoffset offset"
351qp offset between P\- and I\-frames
352.IP "\fB\-rc_eq equation\fR" 4
353.IX Item "-rc_eq equation"
354Set rate control equation (default = \f(CW\*(C`tex^qComp\*(C'\fR).
355.IP "\fB\-rc_override override\fR" 4
356.IX Item "-rc_override override"
357rate control override for specific intervals
358.IP "\fB\-me method\fR" 4
359.IX Item "-me method"
360Set motion estimation method to \fImethod\fR.
361Available methods are (from lowest to best quality):
362.RS 4
363.IP "\fBzero\fR" 4
364.IX Item "zero"
365Try just the (0, 0) vector.
366.IP "\fBphods\fR" 4
367.IX Item "phods"
368.PD 0
369.IP "\fBlog\fR" 4
370.IX Item "log"
371.IP "\fBx1\fR" 4
372.IX Item "x1"
373.IP "\fBepzs\fR" 4
374.IX Item "epzs"
375.PD
376(default method)
377.IP "\fBfull\fR" 4
378.IX Item "full"
379exhaustive search (slow and marginally better than epzs)
380.RE
381.RS 4
382.RE
383.IP "\fB\-dct_algo algo\fR" 4
384.IX Item "-dct_algo algo"
385Set \s-1DCT\s0 algorithm to \fIalgo\fR. Available values are:
386.RS 4
387.IP "\fB0\fR" 4
388.IX Item "0"
389\&\s-1FF_DCT_AUTO\s0 (default)
390.IP "\fB1\fR" 4
391.IX Item "1"
392\&\s-1FF_DCT_FASTINT\s0
393.IP "\fB2\fR" 4
394.IX Item "2"
395\&\s-1FF_DCT_INT\s0
396.IP "\fB3\fR" 4
397.IX Item "3"
398\&\s-1FF_DCT_MMX\s0
399.IP "\fB4\fR" 4
400.IX Item "4"
401\&\s-1FF_DCT_MLIB\s0
402.IP "\fB5\fR" 4
403.IX Item "5"
404\&\s-1FF_DCT_ALTIVEC\s0
405.RE
406.RS 4
407.RE
408.IP "\fB\-idct_algo algo\fR" 4
409.IX Item "-idct_algo algo"
410Set \s-1IDCT\s0 algorithm to \fIalgo\fR. Available values are:
411.RS 4
412.IP "\fB0\fR" 4
413.IX Item "0"
414\&\s-1FF_IDCT_AUTO\s0 (default)
415.IP "\fB1\fR" 4
416.IX Item "1"
417\&\s-1FF_IDCT_INT\s0
418.IP "\fB2\fR" 4
419.IX Item "2"
420\&\s-1FF_IDCT_SIMPLE\s0
421.IP "\fB3\fR" 4
422.IX Item "3"
423\&\s-1FF_IDCT_SIMPLEMMX\s0
424.IP "\fB4\fR" 4
425.IX Item "4"
426\&\s-1FF_IDCT_LIBMPEG2MMX\s0
427.IP "\fB5\fR" 4
428.IX Item "5"
429\&\s-1FF_IDCT_PS2\s0
430.IP "\fB6\fR" 4
431.IX Item "6"
432\&\s-1FF_IDCT_MLIB\s0
433.IP "\fB7\fR" 4
434.IX Item "7"
435\&\s-1FF_IDCT_ARM\s0
436.IP "\fB8\fR" 4
437.IX Item "8"
438\&\s-1FF_IDCT_ALTIVEC\s0
439.IP "\fB9\fR" 4
440.IX Item "9"
441\&\s-1FF_IDCT_SH4\s0
442.IP "\fB10\fR" 4
443.IX Item "10"
444\&\s-1FF_IDCT_SIMPLEARM\s0
445.RE
446.RS 4
447.RE
448.IP "\fB\-er n\fR" 4
449.IX Item "-er n"
450Set error resilience to \fIn\fR.
451.RS 4
452.IP "\fB1\fR" 4
453.IX Item "1"
454\&\s-1FF_ER_CAREFUL\s0 (default)
455.IP "\fB2\fR" 4
456.IX Item "2"
457\&\s-1FF_ER_COMPLIANT\s0
458.IP "\fB3\fR" 4
459.IX Item "3"
460\&\s-1FF_ER_AGGRESSIVE\s0
461.IP "\fB4\fR" 4
462.IX Item "4"
463\&\s-1FF_ER_VERY_AGGRESSIVE\s0
464.RE
465.RS 4
466.RE
467.IP "\fB\-ec bit_mask\fR" 4
468.IX Item "-ec bit_mask"
469Set error concealment to \fIbit_mask\fR. \fIbit_mask\fR is a bit mask of
470the following values:
471.RS 4
472.IP "\fB1\fR" 4
473.IX Item "1"
474\&\s-1FF_EC_GUESS_MVS\s0 (default = enabled)
475.IP "\fB2\fR" 4
476.IX Item "2"
477\&\s-1FF_EC_DEBLOCK\s0 (default = enabled)
478.RE
479.RS 4
480.RE
481.IP "\fB\-bf frames\fR" 4
482.IX Item "-bf frames"
483Use 'frames' B\-frames (supported for \s-1MPEG\-1\s0, \s-1MPEG\-2\s0 and \s-1MPEG\-4\s0).
484.IP "\fB\-mbd mode\fR" 4
485.IX Item "-mbd mode"
486macroblock decision
487.RS 4
488.IP "\fB0\fR" 4
489.IX Item "0"
490\&\s-1FF_MB_DECISION_SIMPLE:\s0 Use mb_cmp (cannot change it yet in FFmpeg).
491.IP "\fB1\fR" 4
492.IX Item "1"
493\&\s-1FF_MB_DECISION_BITS:\s0 Choose the one which needs the fewest bits.
494.IP "\fB2\fR" 4
495.IX Item "2"
496\&\s-1FF_MB_DECISION_RD:\s0 rate distortion
497.RE
498.RS 4
499.RE
500.IP "\fB\-4mv\fR" 4
501.IX Item "-4mv"
502Use four motion vector by macroblock (\s-1MPEG\-4\s0 only).
503.IP "\fB\-part\fR" 4
504.IX Item "-part"
505Use data partitioning (\s-1MPEG\-4\s0 only).
506.IP "\fB\-bug param\fR" 4
507.IX Item "-bug param"
508Work around encoder bugs that are not auto\-detected.
509.IP "\fB\-strict strictness\fR" 4
510.IX Item "-strict strictness"
511How strictly to follow the standards.
512.IP "\fB\-aic\fR" 4
513.IX Item "-aic"
514Enable Advanced intra coding (h263+).
515.IP "\fB\-umv\fR" 4
516.IX Item "-umv"
517Enable Unlimited Motion Vector (h263+)
518.IP "\fB\-deinterlace\fR" 4
519.IX Item "-deinterlace"
520Deinterlace pictures.
521.IP "\fB\-interlace\fR" 4
522.IX Item "-interlace"
523Force interlacing support in encoder (\s-1MPEG\-2\s0 and \s-1MPEG\-4\s0 only).
524Use this option if your input file is interlaced and you want
525to keep the interlaced format for minimum losses.
526The alternative is to deinterlace the input stream with
527\&\fB\-deinterlace\fR, but deinterlacing introduces losses.
528.IP "\fB\-psnr\fR" 4
529.IX Item "-psnr"
530Calculate \s-1PSNR\s0 of compressed frames.
531.IP "\fB\-vstats\fR" 4
532.IX Item "-vstats"
533Dump video coding statistics to \fIvstats_HHMMSS.log\fR.
534.IP "\fB\-vhook module\fR" 4
535.IX Item "-vhook module"
536Insert video processing \fImodule\fR. \fImodule\fR contains the module
537name and its parameters separated by spaces.
538.Sh "Audio Options"
539.IX Subsection "Audio Options"
540.IP "\fB\-ar freq\fR" 4
541.IX Item "-ar freq"
542Set the audio sampling frequency (default = 44100 Hz).
543.IP "\fB\-ab bitrate\fR" 4
544.IX Item "-ab bitrate"
545Set the audio bitrate in kbit/s (default = 64).
546.IP "\fB\-ac channels\fR" 4
547.IX Item "-ac channels"
548Set the number of audio channels (default = 1).
549.IP "\fB\-an\fR" 4
550.IX Item "-an"
551Disable audio recording.
552.IP "\fB\-acodec codec\fR" 4
553.IX Item "-acodec codec"
554Force audio codec to \fIcodec\fR. Use the \f(CW\*(C`copy\*(C'\fR special value to
555specify that the raw codec data must be copied as is.
556.Sh "Audio/Video grab options"
557.IX Subsection "Audio/Video grab options"
558.IP "\fB\-vd device\fR" 4
559.IX Item "-vd device"
560sEt video grab device (e.g. \fI/dev/video0\fR).
561.IP "\fB\-vc channel\fR" 4
562.IX Item "-vc channel"
563Set video grab channel (\s-1DV1394\s0 only).
564.IP "\fB\-tvstd standard\fR" 4
565.IX Item "-tvstd standard"
566Set television standard (\s-1NTSC\s0, \s-1PAL\s0 (\s-1SECAM\s0)).
567.IP "\fB\-dv1394\fR" 4
568.IX Item "-dv1394"
569Set \s-1DV1394\s0 grab.
570.IP "\fB\-ad device\fR" 4
571.IX Item "-ad device"
572Set audio device (e.g. \fI/dev/dsp\fR).
573.Sh "Advanced options"
574.IX Subsection "Advanced options"
575.IP "\fB\-map file:stream\fR" 4
576.IX Item "-map file:stream"
577Set input stream mapping.
578.IP "\fB\-debug\fR" 4
579.IX Item "-debug"
580Print specific debug info.
581.IP "\fB\-benchmark\fR" 4
582.IX Item "-benchmark"
583Add timings for benchmarking.
584.IP "\fB\-hex\fR" 4
585.IX Item "-hex"
586Dump each input packet.
587.IP "\fB\-bitexact\fR" 4
588.IX Item "-bitexact"
589Only use bit exact algorithms (for codec testing).
590.IP "\fB\-ps size\fR" 4
591.IX Item "-ps size"
592Set packet size in bits.
593.IP "\fB\-re\fR" 4
594.IX Item "-re"
595Read input at native frame rate. Mainly used to simulate a grab device.
596.IP "\fB\-loop\fR" 4
597.IX Item "-loop"
598Loop over the input stream. Currently it works only for image
599streams. This option is used for automatic FFserver testing.
600.IP "\fB\-loop_output number_of_times\fR" 4
601.IX Item "-loop_output number_of_times"
602Repeatedly loop output for formats that support looping such as animated \s-1GIF\s0
603(0 will loop the output infinitely).
604.Sh "FFmpeg formula evaluator"
605.IX Subsection "FFmpeg formula evaluator"
606When evaluating a rate control string, FFmpeg uses an internal formula
607evaluator.
608.PP
609The following binary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR,
610\&\f(CW\*(C`*\*(C'\fR, \f(CW\*(C`/\*(C'\fR, \f(CW\*(C`^\*(C'\fR.
611.PP
612The following unary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR,
613\&\f(CW\*(C`(...)\*(C'\fR.
614.PP
615The following functions are available:
616.IP "\fIsinh(x)\fR" 4
617.IX Item "sinh(x)"
618.PD 0
619.IP "\fIcosh(x)\fR" 4
620.IX Item "cosh(x)"
621.IP "\fItanh(x)\fR" 4
622.IX Item "tanh(x)"
623.IP "\fIsin(x)\fR" 4
624.IX Item "sin(x)"
625.IP "\fIcos(x)\fR" 4
626.IX Item "cos(x)"
627.IP "\fItan(x)\fR" 4
628.IX Item "tan(x)"
629.IP "\fIexp(x)\fR" 4
630.IX Item "exp(x)"
631.IP "\fIlog(x)\fR" 4
632.IX Item "log(x)"
633.IP "\fIsquish(x)\fR" 4
634.IX Item "squish(x)"
635.IP "\fIgauss(x)\fR" 4
636.IX Item "gauss(x)"
637.IP "\fIabs(x)\fR" 4
638.IX Item "abs(x)"
639.IP "\fImax(x, y)\fR" 4
640.IX Item "max(x, y)"
641.IP "\fImin(x, y)\fR" 4
642.IX Item "min(x, y)"
643.IP "\fIgt(x, y)\fR" 4
644.IX Item "gt(x, y)"
645.IP "\fIlt(x, y)\fR" 4
646.IX Item "lt(x, y)"
647.IP "\fIeq(x, y)\fR" 4
648.IX Item "eq(x, y)"
649.IP "\fIbits2qp(bits)\fR" 4
650.IX Item "bits2qp(bits)"
651.IP "\fIqp2bits(qp)\fR" 4
652.IX Item "qp2bits(qp)"
653.PD
654.PP
655The following constants are available:
656.IP "\fI\s-1PI\s0\fR" 4
657.IX Item "PI"
658.PD 0
659.IP "\fIE\fR" 4
660.IX Item "E"
661.IP "\fIiTex\fR" 4
662.IX Item "iTex"
663.IP "\fIpTex\fR" 4
664.IX Item "pTex"
665.IP "\fItex\fR" 4
666.IX Item "tex"
667.IP "\fImv\fR" 4
668.IX Item "mv"
669.IP "\fIfCode\fR" 4
670.IX Item "fCode"
671.IP "\fIiCount\fR" 4
672.IX Item "iCount"
673.IP "\fImcVar\fR" 4
674.IX Item "mcVar"
675.IP "\fIvar\fR" 4
676.IX Item "var"
677.IP "\fIisI\fR" 4
678.IX Item "isI"
679.IP "\fIisP\fR" 4
680.IX Item "isP"
681.IP "\fIisB\fR" 4
682.IX Item "isB"
683.IP "\fIavgQP\fR" 4
684.IX Item "avgQP"
685.IP "\fIqComp\fR" 4
686.IX Item "qComp"
687.IP "\fIavgIITex\fR" 4
688.IX Item "avgIITex"
689.IP "\fIavgPITex\fR" 4
690.IX Item "avgPITex"
691.IP "\fIavgPPTex\fR" 4
692.IX Item "avgPPTex"
693.IP "\fIavgBPTex\fR" 4
694.IX Item "avgBPTex"
695.IP "\fIavgTex\fR" 4
696.IX Item "avgTex"
697.PD
698.SH "EXAMPLES"
699.IX Header "EXAMPLES"
700.Sh "Video and Audio grabbing"
701.IX Subsection "Video and Audio grabbing"
702FFmpeg can use a video4linux compatible video source and any Open Sound
703System audio source:
704.PP
705.Vb 1
706\& ffmpeg /tmp/out.mpg
707.Ve
708.PP
709Note that you must activate the right video source and channel before
710launching FFmpeg with any \s-1TV\s0 viewer such as xawtv
711(<\fBhttp://bytesex.org/xawtv/\fR>) by Gerd Knorr. You also
712have to set the audio recording levels correctly with a
713standard mixer.
714.Sh "Video and Audio file format conversion"
715.IX Subsection "Video and Audio file format conversion"
716* FFmpeg can use any supported file format and protocol as input:
717.PP
718Examples:
719.PP
720* You can use \s-1YUV\s0 files as input:
721.PP
722.Vb 1
723\& ffmpeg -i /tmp/test%d.Y /tmp/out.mpg
724.Ve
725.PP
726It will use the files:
727.PP
728.Vb 2
729\& /tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,
730\& /tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...
731.Ve
732.PP
733The Y files use twice the resolution of the U and V files. They are
734raw files, without header. They can be generated by all decent video
735decoders. You must specify the size of the image with the \fB\-s\fR option
736if FFmpeg cannot guess it.
737.PP
738* You can input from a raw \s-1YUV420P\s0 file:
739.PP
740.Vb 1
741\& ffmpeg -i /tmp/test.yuv /tmp/out.avi
742.Ve
743.PP
744test.yuv is a file containing raw \s-1YUV\s0 planar data. Each frame is composed
745of the Y plane followed by the U and V planes at half vertical and
746horizontal resolution.
747.PP
748* You can output to a raw \s-1YUV420P\s0 file:
749.PP
750.Vb 1
751\& ffmpeg -i mydivx.avi hugefile.yuv
752.Ve
753.PP
754* You can set several input files and output files:
755.PP
756.Vb 1
757\& ffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg
758.Ve
759.PP
760Converts the audio file a.wav and the raw \s-1YUV\s0 video file a.yuv
761to \s-1MPEG\s0 file a.mpg.
762.PP
763* You can also do audio and video conversions at the same time:
764.PP
765.Vb 1
766\& ffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2
767.Ve
768.PP
769Converts a.wav to \s-1MPEG\s0 audio at 22050Hz sample rate.
770.PP
771* You can encode to several formats at the same time and define a
772mapping from input stream to output streams:
773.PP
774.Vb 1
775\& ffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0
776.Ve
777.PP
778Converts a.wav to a.mp2 at 64 kbits and to b.mp2 at 128 kbits. '\-map
779file:index' specifies which input stream is used for each output
780stream, in the order of the definition of output streams.
781.PP
782* You can transcode decrypted VOBs
783.PP
784.Vb 1
785\& ffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi
786.Ve
787.PP
788This is a typical \s-1DVD\s0 ripping example; the input is a \s-1VOB\s0 file, the
789output an \s-1AVI\s0 file with \s-1MPEG\-4\s0 video and \s-1MP3\s0 audio. Note that in this
790command we use B\-frames so the \s-1MPEG\-4\s0 stream is DivX5 compatible, and
791\&\s-1GOP\s0 size is 300 which means one intra frame every 10 seconds for 29.97fps
792input video. Furthermore, the audio stream is MP3\-encoded so you need
793to enable \s-1LAME\s0 support by passing \f(CW\*(C`\-\-enable\-mp3lame\*(C'\fR to configure.
794The mapping is particularly useful for \s-1DVD\s0 transcoding
795to get the desired audio language.
796.PP
797\&\s-1NOTE:\s0 To see the supported input formats, use \f(CW\*(C`ffmpeg \-formats\*(C'\fR.
798.SH "SEE ALSO"
799.IX Header "SEE ALSO"
800\&\fIffserver\fR\|(1), \fIffplay\fR\|(1) and the \s-1HTML\s0 documentation of \fIffmpeg\fR.
801.SH "AUTHOR"
802.IX Header "AUTHOR"
803Fabrice Bellard
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette