1289 lines · 29.7 KB · Text
RawDownload
@anchor{codec-options}@chapter Codec Options@c man begin CODEC OPTIONS libavcodec provides some generic global options, which can be set onall the encoders and decoders. In addition each codec may supportso-called private options, which are specific for a given codec. Sometimes, a global option may only affect a specific kind of codec,and may be nonsensical or ignored by another, so you need to be awareof the meaning of the specified options. Also some options aremeant only for decoding or encoding. Options may be set by specifying -@var{option} @var{value} in theFFmpeg tools, or by setting the value explicitly in the@code{AVCodecContext} options or using the @file{libavutil/opt.h} APIfor programmatic use. The list of supported options follow: @table @option@item b @var{integer} (@emph{encoding,audio,video})Set bitrate in bits/s. Default value is 200K. @item ab @var{integer} (@emph{encoding,audio})Set audio bitrate (in bits/s). Default value is 128K. @item bt @var{integer} (@emph{encoding,video})Set video bitrate tolerance (in bits/s). In 1-pass mode, bitratetolerance specifies how far ratecontrol is willing to deviate from thetarget average bitrate value. This is not related to min/maxbitrate. Lowering tolerance too much has an adverse effect on quality. @item flags @var{flags} (@emph{decoding/encoding,audio,video,subtitles})Set generic flags. Possible values:@table @samp@item mv4Use four motion vector by macroblock (mpeg4).@item qpelUse 1/4 pel motion compensation.@item loopUse loop filter.@item qscaleUse fixed qscale.@item gmcUse gmc.@item mv0Always try a mb with mv=<0,0>.@item input_preserved @item pass1Use internal 2pass ratecontrol in first pass mode.@item pass2Use internal 2pass ratecontrol in second pass mode.@item grayOnly decode/encode grayscale.@item emu_edgeDo not draw edges.@item psnrSet error[?] variables during encoding.@item truncated @item naqNormalize adaptive quantization.@item ildctUse interlaced DCT.@item low_delayForce low delay.@item global_headerPlace global headers in extradata instead of every keyframe.@item bitexactOnly write platform-, build- and time-independent data. (except (I)DCT).This ensures that file and data checksums are reproducible and match betweenplatforms. Its primary use is for regression testing.@item aicApply H263 advanced intra coding / mpeg4 ac prediction.@item cbpDeprecated, use mpegvideo private options instead.@item qprdDeprecated, use mpegvideo private options instead.@item ilmeApply interlaced motion estimation.@item cgopUse closed gop.@end table @item me_method @var{integer} (@emph{encoding,video})Set motion estimation method. Possible values:@table @samp@item zerozero motion estimation (fastest)@item fullfull motion estimation (slowest)@item epzsEPZS motion estimation (default)@item esaesa motion estimation (alias for full)@item tesatesa motion estimation@item diadia motion estimation (alias for epzs)@item loglog motion estimation@item phodsphods motion estimation@item x1X1 motion estimation@item hexhex motion estimation@item umhumh motion estimation@item iteriter motion estimation@end table @item extradata_size @var{integer}Set extradata size. @item time_base @var{rational number}Set codec time base. It is the fundamental unit of time (in seconds) in terms of whichframe timestamps are represented. For fixed-fps content, timebaseshould be @code{1 / frame_rate} and timestamp increments should beidentically 1. @item g @var{integer} (@emph{encoding,video})Set the group of picture (GOP) size. Default value is 12. @item ar @var{integer} (@emph{decoding/encoding,audio})Set audio sampling rate (in Hz). @item ac @var{integer} (@emph{decoding/encoding,audio})Set number of audio channels. @item cutoff @var{integer} (@emph{encoding,audio})Set cutoff bandwidth. (Supported only by selected encoders, seetheir respective documentation sections.) @item frame_size @var{integer} (@emph{encoding,audio})Set audio frame size. Each submitted frame except the last must contain exactly frame_sizesamples per channel. May be 0 when the codec hasCODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is notrestricted. It is set by some decoders to indicate constant framesize. @item frame_number @var{integer}Set the frame number. @item delay @var{integer} @item qcomp @var{float} (@emph{encoding,video})Set video quantizer scale compression (VBR). It is used as a constantin the ratecontrol equation. Recommended range for default rc_eq:0.0-1.0. @item qblur @var{float} (@emph{encoding,video})Set video quantizer scale blur (VBR). @item qmin @var{integer} (@emph{encoding,video})Set min video quantizer scale (VBR). Must be included between -1 and69, default value is 2. @item qmax @var{integer} (@emph{encoding,video})Set max video quantizer scale (VBR). Must be included between -1 and1024, default value is 31. @item qdiff @var{integer} (@emph{encoding,video})Set max difference between the quantizer scale (VBR). @item bf @var{integer} (@emph{encoding,video})Set max number of B frames between non-B-frames. Must be an integer between -1 and 16. 0 means that B-frames aredisabled. If a value of -1 is used, it will choose an automatic valuedepending on the encoder. Default value is 0. @item b_qfactor @var{float} (@emph{encoding,video})Set qp factor between P and B frames. @item rc_strategy @var{integer} (@emph{encoding,video})Set ratecontrol method. @item b_strategy @var{integer} (@emph{encoding,video})Set strategy to choose between I/P/B-frames. @item ps @var{integer} (@emph{encoding,video})Set RTP payload size in bytes. @item mv_bits @var{integer}@item header_bits @var{integer}@item i_tex_bits @var{integer}@item p_tex_bits @var{integer}@item i_count @var{integer}@item p_count @var{integer}@item skip_count @var{integer}@item misc_bits @var{integer}@item frame_bits @var{integer}@item codec_tag @var{integer}@item bug @var{flags} (@emph{decoding,video})Workaround not auto detected encoder bugs. Possible values:@table @samp@item autodetect @item old_msmpeg4some old lavc generated msmpeg4v3 files (no autodetection)@item xvid_ilaceXvid interlacing bug (autodetected if fourcc==XVIX)@item ump4(autodetected if fourcc==UMP4)@item no_paddingpadding bug (autodetected)@item amv @item ac_vlcillegal vlc bug (autodetected per fourcc)@item qpel_chroma @item std_qpelold standard qpel (autodetected per fourcc/version)@item qpel_chroma2 @item direct_blocksizedirect-qpel-blocksize bug (autodetected per fourcc/version)@item edgeedge padding bug (autodetected per fourcc/version)@item hpel_chroma @item dc_clip @item msWorkaround various bugs in microsoft broken decoders.@item trunctrancated frames@end table @item lelim @var{integer} (@emph{encoding,video})Set single coefficient elimination threshold for luminance (negativevalues also consider DC coefficient). @item celim @var{integer} (@emph{encoding,video})Set single coefficient elimination threshold for chrominance (negativevalues also consider dc coefficient) @item strict @var{integer} (@emph{decoding/encoding,audio,video})Specify how strictly to follow the standards. Possible values:@table @samp@item verystrictly conform to an older more strict version of the spec or reference software@item strictstrictly conform to all the things in the spec no matter what consequences@item normal @item unofficialallow unofficial extensions@item experimentalallow non standardized experimental things, experimental(unfinished/work in progress/not well tested) decoders and encoders.Note: experimental decoders can pose a security risk, do not use this fordecoding untrusted input.@end table @item b_qoffset @var{float} (@emph{encoding,video})Set QP offset between P and B frames. @item err_detect @var{flags} (@emph{decoding,audio,video})Set error detection flags. Possible values:@table @samp@item crccheckverify embedded CRCs@item bitstreamdetect bitstream specification deviations@item bufferdetect improper bitstream length@item explodeabort decoding on minor error detection@item ignore_errignore decoding errors, and continue decoding.This is useful if you want to analyze the content of a video and thus wanteverything to be decoded no matter what. This option will not result in a videothat is pleasing to watch in case of errors.@item carefulconsider things that violate the spec and have not been seen in the wild as errors@item compliantconsider all spec non compliancies as errors@item aggressiveconsider things that a sane encoder should not do as an error@end table @item has_b_frames @var{integer} @item block_align @var{integer} @item mpeg_quant @var{integer} (@emph{encoding,video})Use MPEG quantizers instead of H.263. @item qsquish @var{float} (@emph{encoding,video})How to keep quantizer between qmin and qmax (0 = clip, 1 = usedifferentiable function). @item rc_qmod_amp @var{float} (@emph{encoding,video})Set experimental quantizer modulation. @item rc_qmod_freq @var{integer} (@emph{encoding,video})Set experimental quantizer modulation. @item rc_override_count @var{integer} @item rc_eq @var{string} (@emph{encoding,video})Set rate control equation. When computing the expression, besides thestandard functions defined in the section 'Expression Evaluation', thefollowing functions are available: bits2qp(bits), qp2bits(qp). Alsothe following constants are available: iTex pTex tex mv fCode iCountmcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTexavgTex. @item maxrate @var{integer} (@emph{encoding,audio,video})Set max bitrate tolerance (in bits/s). Requires bufsize to be set. @item minrate @var{integer} (@emph{encoding,audio,video})Set min bitrate tolerance (in bits/s). Most useful in setting up a CBRencode. It is of little use elsewise. @item bufsize @var{integer} (@emph{encoding,audio,video})Set ratecontrol buffer size (in bits). @item rc_buf_aggressivity @var{float} (@emph{encoding,video})Currently useless. @item i_qfactor @var{float} (@emph{encoding,video})Set QP factor between P and I frames. @item i_qoffset @var{float} (@emph{encoding,video})Set QP offset between P and I frames. @item rc_init_cplx @var{float} (@emph{encoding,video})Set initial complexity for 1-pass encoding. @item dct @var{integer} (@emph{encoding,video})Set DCT algorithm. Possible values:@table @samp@item autoautoselect a good one (default)@item fastintfast integer@item intaccurate integer@item mmx @item altivec @item faanfloating point AAN DCT@end table @item lumi_mask @var{float} (@emph{encoding,video})Compress bright areas stronger than medium ones. @item tcplx_mask @var{float} (@emph{encoding,video})Set temporal complexity masking. @item scplx_mask @var{float} (@emph{encoding,video})Set spatial complexity masking. @item p_mask @var{float} (@emph{encoding,video})Set inter masking. @item dark_mask @var{float} (@emph{encoding,video})Compress dark areas stronger than medium ones. @item idct @var{integer} (@emph{decoding/encoding,video})Select IDCT implementation. Possible values:@table @samp@item auto @item int @item simple @item simplemmx @item simpleautoAutomatically pick a IDCT compatible with the simple one @item arm @item altivec @item sh4 @item simplearm @item simplearmv5te @item simplearmv6 @item simpleneon @item simplealpha @item ipp @item xvidmmx @item faanifloating point AAN IDCT@end table @item slice_count @var{integer} @item ec @var{flags} (@emph{decoding,video})Set error concealment strategy. Possible values:@table @samp@item guess_mvsiterative motion vector (MV) search (slow)@item deblockuse strong deblock filter for damaged MBs@item favor_interfavor predicting from the previous frame instead of the current@end table @item bits_per_coded_sample @var{integer} @item pred @var{integer} (@emph{encoding,video})Set prediction method. Possible values:@table @samp@item left @item plane @item median @end table @item aspect @var{rational number} (@emph{encoding,video})Set sample aspect ratio. @item sar @var{rational number} (@emph{encoding,video})Set sample aspect ratio. Alias to @var{aspect}. @item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles})Print specific debug info. Possible values:@table @samp@item pictpicture info@item rcrate control@item bitstream @item mb_typemacroblock (MB) type@item qpper-block quantization parameter (QP)@item mvmotion vector@item dct_coeff @item green_metadatadisplay complexity metadata for the upcoming frame, GoP or for a given duration. @item skip @item startcode @item pts @item ererror recognition@item mmcomemory management control operations (H.264)@item bugs @item vis_qpvisualize quantization parameter (QP), lower QP are tinted greener@item vis_mb_typevisualize block types

Lines 1–500 of 1289.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t