⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ffmpeg-doc.texi

📁 FFmpeg is an audio/video conversion tool. It includes libavcodec, the leading open source codec libr
💻 TEXI
📖 第 1 页 / 共 3 页
字号:
\input texinfo @c -*- texinfo -*-@settitle FFmpeg Documentation@titlepage@sp 7@center @titlefont{FFmpeg Documentation}@sp 3@end titlepage@chapter IntroductionFFmpeg is a very fast video and audio converter. It can also grab froma live audio/video source.  The command line interface is designed to be intuitive, in the sensethat ffmpeg tries to figure out all the parameters, whenpossible. You have usually to give only the target bitrate you want.FFmpeg can also convert from any sample rate to any other, and resizevideo on the fly with a high quality polyphase filter.@chapter Quick Start@c man begin EXAMPLES@section Video and Audio grabbingFFmpeg can use a video4linux compatible video source and any Open SoundSystem audio source:@exampleffmpeg /tmp/out.mpg @end exampleNote that you must activate the right video source and channel beforelaunching ffmpeg. You can use any TV viewer such as xawtv(@url{http://bytesex.org/xawtv/}) by Gerd Knorr which I find verygood. You must also set correctly the audio recording levels with astandard mixer.@section Video and Audio file format conversion* ffmpeg can use any supported file format and protocol as input: Examples:* You can input from YUV files:@exampleffmpeg -i /tmp/test%d.Y /tmp/out.mpg @end exampleIt will use the files: @example/tmp/test0.Y, /tmp/test0.U, /tmp/test0.V,/tmp/test1.Y, /tmp/test1.U, /tmp/test1.V, etc...@end exampleThe Y files use twice the resolution of the U and V files. They areraw files, without header. They can be generated by all decent videodecoders. You must specify the size of the image with the @option{-s} optionif ffmpeg cannot guess it.* You can input from a RAW YUV420P file:@exampleffmpeg -i /tmp/test.yuv /tmp/out.avi@end exampleThe RAW YUV420P is a file containing RAW YUV planar, for each frame firstcome the Y plane followed by U and V planes, which are half vertical andhorizontal resolution.* You can output to a RAW YUV420P file:@exampleffmpeg -i mydivx.avi -o hugefile.yuv@end example* You can set several input files and output files:@exampleffmpeg -i /tmp/a.wav -s 640x480 -i /tmp/a.yuv /tmp/a.mpg@end exampleConvert the audio file a.wav and the raw yuv video file a.yuvto mpeg file a.mpg* You can also do audio and video conversions at the same time:@exampleffmpeg -i /tmp/a.wav -ar 22050 /tmp/a.mp2@end exampleConvert the sample rate of a.wav to 22050 Hz and encode it to MPEG audio.* You can encode to several formats at the same time and define amapping from input stream to output streams:@exampleffmpeg -i /tmp/a.wav -ab 64 /tmp/a.mp2 -ab 128 /tmp/b.mp2 -map 0:0 -map 0:0@end exampleConvert a.wav to a.mp2 at 64 kbits and b.mp2 at 128 kbits. '-mapfile:index' specify which input stream is used for each outputstream, in the order of the definition of output streams.* You can transcode decrypted VOBs@exampleffmpeg -i snatch_1.vob -f avi -vcodec mpeg4 -b 800 -g 300 -bf 2 -acodec mp3 -ab 128 snatch.avi@end exampleThis is a typical DVD ripper example, input from a VOB file, outputto an AVI file with MPEG-4 video and MP3 audio, note that in thiscommand we use B frames so the MPEG-4 stream is DivX5 compatible, GOPsize is 300 that means an INTRA frame every 10 seconds for 29.97 fpsinput video.  Also the audio stream is MP3 encoded so you need LAMEsupport which is enabled using @code{--enable-mp3lame} whenconfiguring.  The mapping is particularly useful for DVD transcodingto get the desired audio language.NOTE: to see the supported input formats, use @code{ffmpeg -formats}.@c man end@chapter Invocation@section SyntaxThe generic syntax is:@example @c man begin SYNOPSISffmpeg [[options][@option{-i} @var{input_file}]]... @{[options] @var{output_file}@}...@c man end@end example@c man begin DESCRIPTIONIf no input file is given, audio/video grabbing is done.As a general rule, options are applied to the next specifiedfile. For example, if you give the @option{-b 64} option, it sets the videobitrate of the next file. Format option may be needed for raw inputfiles.By default, ffmpeg tries to convert as losslessly as possible: ituses the same audio and video parameter for the outputs as the onespecified for the inputs.@c man end@c man begin OPTIONS@section Main options@table @option@item -Lshow license@item -hshow help@item -formatsshow available formats, codecs, protocols, ...@item -f fmt              force format@item -i filename         input file name@item -y                  overwrite output files@item -t duration         set the recording time in seconds. @code{hh:mm:ss[.xxx]} syntax is alsosupported.@item -ss positionseek to given time position. @code{hh:mm:ss[.xxx]} syntax is alsosupported.@item -title string       set the title@item -author string      set the author@item -copyright string   set the copyright@item -comment string     set the comment@item -target typespecify target file type ("vcd", "svcd" or "dvd"). All the formatoptions (bitrate, codecs, buffer sizes) are automatically set by thisoption. You can just type:@exampleffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg@end example@item -hqactivate high quality settings@item -itsoffset offsetset the input time offset in seconds. @code{[-]hh:mm:ss[.xxx]} syntaxis also supported.  This option affects all the input files thatfollow it.  The offset is added to the input files' timestamps;specifying a positive offset means that the corresponding streams aredelayed by 'offset' seconds.@end table@section Video Options@table @option@item -b bitrateset the video bitrate in kbit/s (default = 200 kb/s)@item -r fps           set frame rate (default = 25)@item -s size             set frame size. The format is @samp{WxH} (default 160x128).  Thefollowing abbreviations are recognized:@table @samp@item sqcif128x96@item qcif176x144@item cif352x288@item 4cif704x576@end table@item -aspect aspectset aspect ratio (4:3, 16:9 or 1.3333, 1.7777)@item -croptop sizeset top crop band size (in pixels)@item -cropbottom sizeset bottom crop band size (in pixels)@item -cropleft sizeset left crop band size (in pixels)@item -cropright sizeset right crop band size (in pixels)@item -padtop sizeset top pad band size (in pixels)@item -padbottom sizeset bottom pad band size (in pixels)@item -padleft sizeset left pad band size (in pixels)@item -padright sizeset right pad band size (in pixels)@item -padcolor colorset right pad band size (hex). 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)@item -vndisable video recording@item -bt tolerance       set video bitrate tolerance (in kbit/s)@item -maxrate bitrateset max video bitrate tolerance (in kbit/s)@item -minrate bitrateset min video bitrate tolerance (in kbit/s)@item -bufsize sizeset ratecontrol buffere size (in kbit)@item -vcodec codec       force video codec to @var{codec}. Use the @code{copy} special value totell that the raw codec data must be copied as is.@item -samequse same video quality as source (implies VBR)@item -pass n  select the pass number (1 or 2). It is useful to do two passencoding. The statistics of the video are recorded in the first pass andthe video at the exact requested bit rate is generated in the secondpass.@item -passlogfile file   select two pass log file name to @var{file}.@end table@section Advanced Video Options@table @option@item -g gop_size         set the group of picture size@item -intra              use only intra frames@item -qscale q           use fixed video quantiser scale (VBR)@item -qmin q             min video quantiser scale (VBR)@item -qmax q             max video quantiser scale (VBR)@item -qdiff q            max difference between the quantiser scale (VBR)@item -qblur blur         video quantiser scale blur (VBR)@item -qcomp compression  video quantiser scale compression (VBR)@item -rc_init_cplx complexityinitial complexity for 1-pass encoding@item -b_qfactor factorqp factor between p and b frames@item -i_qfactor factorqp factor between p and i frames@item -b_qoffset offsetqp offset between p and b frames@item -i_qoffset offsetqp offset between p and i frames@item -rc_eq equationset rate control equation (@pxref{FFmpeg formulaevaluator}). Default is @code{tex^qComp}.@item -rc_override overriderate control override for specific intervals@item -me methodset motion estimation method to @var{method}. Available methods are(from lower to best quality):@table @samp@item zeroTry just the (0, 0) vector.@item phods@item log@item x1@item epzs(default method)@item fullexhaustive search (slow and marginally better than epzs)@end table@item -dct_algo algoset dct algorithm to @var{algo}. Available values are:@table @samp@item 0FF_DCT_AUTO (default)@item 1FF_DCT_FASTINT@item 2FF_DCT_INT@item 3FF_DCT_MMX@item 4FF_DCT_MLIB@item 5

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -