📄 ffmpeg-doc.texi
字号:
Discard threshold.@item -qscale @var{q}Use fixed video quantizer scale (VBR).@item -qmin @var{q}minimum video quantizer scale (VBR)@item -qmax @var{q}maximum video quantizer scale (VBR)@item -qdiff @var{q}maximum difference between the quantizer scales (VBR)@item -qblur @var{blur}video quantizer scale blur (VBR)@item -qcomp @var{compression}video quantizer scale compression (VBR)@item -lmin @var{lambda}minimum video lagrange factor (VBR)@item -lmax @var{lambda}max video lagrange factor (VBR)@item -mblmin @var{lambda}minimum macroblock quantizer scale (VBR)@item -mblmax @var{lambda}maximum macroblock quantizer scale (VBR)These four options (lmin, lmax, mblmin, mblmax) use 'lambda' units,but you may use the QP2LAMBDA constant to easily convert from 'q' units:@exampleffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext@end example@item -rc_init_cplx @var{complexity}initial complexity for single pass encoding@item -b_qfactor @var{factor}qp factor between P- and B-frames@item -i_qfactor @var{factor}qp factor between P- and I-frames@item -b_qoffset @var{offset}qp offset between P- and B-frames@item -i_qoffset @var{offset}qp offset between P- and I-frames@item -rc_eq @var{equation}Set rate control equation (@pxref{FFmpeg formulaevaluator}) (default = @code{tex^qComp}).@item -rc_override @var{override}rate control override for specific intervals@item -me_method @var{method}Set motion estimation method to @var{method}.Available methods are (from lowest to best quality):@table @samp@item zeroTry just the (0, 0) vector.@item phods@item log@item x1@item hex@item umh@item epzs(default method)@item fullexhaustive search (slow and marginally better than epzs)@end table@item -dct_algo @var{algo}Set 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 5FF_DCT_ALTIVEC@end table@item -idct_algo @var{algo}Set IDCT algorithm to @var{algo}. Available values are:@table @samp@item 0FF_IDCT_AUTO (default)@item 1FF_IDCT_INT@item 2FF_IDCT_SIMPLE@item 3FF_IDCT_SIMPLEMMX@item 4FF_IDCT_LIBMPEG2MMX@item 5FF_IDCT_PS2@item 6FF_IDCT_MLIB@item 7FF_IDCT_ARM@item 8FF_IDCT_ALTIVEC@item 9FF_IDCT_SH4@item 10FF_IDCT_SIMPLEARM@end table@item -er @var{n}Set error resilience to @var{n}.@table @samp@item 1FF_ER_CAREFUL (default)@item 2FF_ER_COMPLIANT@item 3FF_ER_AGGRESSIVE@item 4FF_ER_VERY_AGGRESSIVE@end table@item -ec @var{bit_mask}Set error concealment to @var{bit_mask}. @var{bit_mask} is a bit mask ofthe following values:@table @samp@item 1FF_EC_GUESS_MVS (default = enabled)@item 2FF_EC_DEBLOCK (default = enabled)@end table@item -bf @var{frames}Use 'frames' B-frames (supported for MPEG-1, MPEG-2 and MPEG-4).@item -mbd @var{mode}macroblock decision@table @samp@item 0FF_MB_DECISION_SIMPLE: Use mb_cmp (cannot change it yet in FFmpeg).@item 1FF_MB_DECISION_BITS: Choose the one which needs the fewest bits.@item 2FF_MB_DECISION_RD: rate distortion@end table@item -4mvUse four motion vector by macroblock (MPEG-4 only).@item -partUse data partitioning (MPEG-4 only).@item -bug @var{param}Work around encoder bugs that are not auto-detected.@item -strict @var{strictness}How strictly to follow the standards.@item -aicEnable Advanced intra coding (h263+).@item -umvEnable Unlimited Motion Vector (h263+)@item -deinterlaceDeinterlace pictures.@item -ilmeForce interlacing support in encoder (MPEG-2 and MPEG-4 only).Use this option if your input file is interlaced and you wantto keep the interlaced format for minimum losses.The alternative is to deinterlace the input stream with@option{-deinterlace}, but deinterlacing introduces losses.@item -psnrCalculate PSNR of compressed frames.@item -vstatsDump video coding statistics to @file{vstats_HHMMSS.log}.@item -vstats_file @var{file}Dump video coding statistics to @var{file}.@item -vhook @var{module}Insert video processing @var{module}. @var{module} contains the modulename and its parameters separated by spaces.@item -top @var{n}top=1/bottom=0/auto=-1 field first@item -dc @var{precision}Intra_dc_precision.@item -vtag @var{fourcc/tag}Force video tag/fourcc.@item -qphistShow QP histogram.@item -vbsf @var{bitstream_filter}Bitstream filters available are "dump_extra", "remove_extra", "noise".@end table@section Audio Options@table @option@item -aframes @var{number}Set the number of audio frames to record.@item -ar @var{freq}Set the audio sampling frequency (default = 44100 Hz).@item -ab @var{bitrate}Set the audio bitrate in bit/s (default = 64k).@item -ac @var{channels}Set the number of audio channels (default = 1).@item -anDisable audio recording.@item -acodec @var{codec}Force audio codec to @var{codec}. Use the @code{copy} special value tospecify that the raw codec data must be copied as is.@item -newaudioAdd a new audio track to the output file. If you want to specify parameters,do so before @code{-newaudio} (@code{-acodec}, @code{-ab}, etc..).Mapping will be done automatically, if the number of output streams is equal tothe number of input streams, else it will pick the first one that matches. Youcan override the mapping using @code{-map} as usual.Example:@exampleffmpeg -i file.mpg -vcodec copy -acodec ac3 -ab 384k test.mpg -acodec mp2 -ab 192k -newaudio@end example@item -alang @var{code}Set the ISO 639 language code (3 letters) of the current audio stream.@end table@section Advanced Audio options:@table @option@item -atag @var{fourcc/tag}Force audio tag/fourcc.@item -absf @var{bitstream_filter}Bitstream filters available are "dump_extra", "remove_extra", "noise", "mp3comp", "mp3decomp".@end table@section Subtitle options:@table @option@item -scodec @var{codec}Force subtitle codec ('copy' to copy stream).@item -newsubtitleAdd a new subtitle stream to the current output stream.@item -slang @var{code}Set the ISO 639 language code (3 letters) of the current subtitle stream.@end table@section Audio/Video grab options@table @option@item -vc @var{channel}Set video grab channel (DV1394 only).@item -tvstd @var{standard}Set television standard (NTSC, PAL (SECAM)).@item -isyncSynchronize read on input.@end table@section Advanced options@table @option@item -map input stream id[:input stream id]Set stream mapping from input streams to output streams.Just enumerate the input streams in the order you want them in the output.[input stream id] sets the (input) stream to sync against.@item -map_meta_data @var{outfile}:@var{infile}Set meta data information of @var{outfile} from @var{infile}.@item -debugPrint specific debug info.@item -benchmarkAdd timings for benchmarking.@item -dumpDump each input packet.@item -hexWhen dumping packets, also dump the payload.@item -bitexactOnly use bit exact algorithms (for codec testing).@item -ps @var{size}Set packet size in bits.@item -reRead input at native frame rate. Mainly used to simulate a grab device.@item -loop_inputLoop over the input stream. Currently it works only for imagestreams. This option is used for automatic FFserver testing.@item -loop_output @var{number_of_times}Repeatedly loop output for formats that support looping such as animated GIF(0 will loop the output infinitely).@item -threads @var{count}Thread count.@item -vsync @var{parameter}Video sync method. Video will be stretched/squeezed to match the timestamps,it is done by duplicating and dropping frames. With -map you can select fromwhich stream the timestamps should be taken. You can leave either video oraudio unchanged and sync the remaining stream(s) to the unchanged one.@item -async @var{samples_per_second}Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps,the parameter is the maximum samples per second by which the audio is changed.-async 1 is a special case where only the start of the audio stream is correctedwithout any later correction.@item -copytsCopy timestamps from input to output.@item -shortestFinish encoding when the shortest input stream ends.@item -dts_delta_thresholdTimestamp discontinuity delta threshold.@item -muxdelay @var{seconds}Set the maximum demux-decode delay.@item -muxpreload @var{seconds}Set the initial demux-decode delay.@end table@node FFmpeg formula evaluator@section FFmpeg formula evaluatorWhen evaluating a rate control string, FFmpeg uses an internal formulaevaluator.The following binary operators are available: @code{+}, @code{-},@code{*}, @code{/}, @code{^}.The following unary operators are available: @code{+}, @code{-},@code{(...)}.The following functions are available:@table @var@item sinh(x)@item cosh(x)@item tanh(x)@item sin(x)@item cos(x)@item tan(x)@item exp(x)@item log(x)@item squish(x)@item gauss(x)@item abs(x)@item max(x, y)@item min(x, y)@item gt(x, y)@item lt(x, y)@item eq(x, y)@item bits2qp(bits)@item qp2bits(qp)@end tableThe following constants are available:@table @var@item PI@item E@item iTex@item pTex@item tex@item mv@item fCode@item iCount@item mcVar@item var@item isI@item isP@item isB@item avgQP@item qComp@item avgIITex@item avgPITex@item avgPPTex@item avgBPTex@item avgTex@end table@c man end@ignore@setfilename ffmpeg@settitle FFmpeg video converter@c man begin SEEALSOffserver(1), ffplay(1) and the HTML documentation of @file{ffmpeg}.@c man end@c man begin AUTHORFabrice Bellard@c man end@end ignore@section ProtocolsThe file name can be @file{-} to read from standard input or to writeto standard output.FFmpeg also handles many protocols specified with an URL syntax.Use 'ffmpeg -formats' to see a list of the supported protocols.The protocol @code{http:} is currently used only to communicate withFFserver (see the FFserver documentation). When FFmpeg will be avideo player it will also be used for streaming :-)@chapter Tips@itemize@item For streaming at very low bitrate application, use a low frame rateand a small GOP size. This is especially true for RealVideo wherethe Linux player does not seem to be very fast, so it can missframes. An example is:@exampleffmpeg -g 3 -r 3 -t 10 -b 50k -s qcif -f rv10 /tmp/b.rm@end example@item The parameter 'q' which is displayed while encoding is the currentquantizer. The value 1 indicates that a very good quality couldbe achieved. The value 31 indicates the worst quality. If q=31 appearstoo often, it means that the encoder cannot compress enough to meetyour bitrate. You must either increase the bitrate, decrease theframe rate or decrease the frame size.@item If your computer is not fast enough, you can speed up thecompression at the expense of the compression ratio. You can use'-me zero' to speed up motion estimation, and '-intra' to disablemotion estimation completely (you have only I-frames, which means itis about as good as JPEG compression).@item To have very low audio bitrates, reduce the sampling frequency(down to 22050 kHz for MPEG audio, 22050 or 11025 for AC3).@item To have a constant quality (but a variable bitrate), use the option'-qscale n' when 'n' is between 1 (excellent quality) and 31 (worstquality).@item When converting video files, you can use the '-sameq' option whichuses the same quality factor in the encoder as in the decoder.It allows almost lossless encoding.@end itemize@bye
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -