1@anchor{codec-options} 2@chapter Codec Options 3@c man begin CODEC OPTIONS 4 5libavcodec provides some generic global options, which can be set on 6all the encoders and decoders. In addition each codec may support 7so-called private options, which are specific for a given codec. 8 9Sometimes, a global option may only affect a specific kind of codec, 10and may be nonsensical or ignored by another, so you need to be aware 11of the meaning of the specified options. Also some options are 12meant only for decoding or encoding. 13 14Options may be set by specifying -@var{option} @var{value} in the 15FFmpeg tools, or by setting the value explicitly in the 16@code{AVCodecContext} options or using the @file{libavutil/opt.h} API 17for programmatic use. 18 19The list of supported options follow: 20 21@table @option 22@item b @var{integer} (@emph{encoding,audio,video}) 23Set bitrate in bits/s. Default value is 200K. 24 25@item ab @var{integer} (@emph{encoding,audio}) 26Set audio bitrate (in bits/s). Default value is 128K. 27 28@item bt @var{integer} (@emph{encoding,video}) 29Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate 30tolerance specifies how far ratecontrol is willing to deviate from the 31target average bitrate value. This is not related to min/max 32bitrate. Lowering tolerance too much has an adverse effect on quality. 33 34@item flags @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) 35Set generic flags. 36 37Possible values: 38@table @samp 39@item mv4 40Use four motion vector by macroblock (mpeg4). 41@item qpel 42Use 1/4 pel motion compensation. 43@item loop 44Use loop filter. 45@item qscale 46Use fixed qscale. 47@item pass1 48Use internal 2pass ratecontrol in first pass mode. 49@item pass2 50Use internal 2pass ratecontrol in second pass mode. 51@item gray 52Only decode/encode grayscale. 53@item emu_edge 54Do not draw edges. 55@item psnr 56Set error[?] variables during encoding. 57@item truncated 58Input bitstream might be randomly truncated. 59@item drop_changed 60Don't output frames whose parameters differ from first decoded frame in stream. 61Error AVERROR_INPUT_CHANGED is returned when a frame is dropped. 62 63@item ildct 64Use interlaced DCT. 65@item low_delay 66Force low delay. 67@item global_header 68Place global headers in extradata instead of every keyframe. 69@item bitexact 70Only write platform-, build- and time-independent data. (except (I)DCT). 71This ensures that file and data checksums are reproducible and match between 72platforms. Its primary use is for regression testing. 73@item aic 74Apply H263 advanced intra coding / mpeg4 ac prediction. 75@item cbp 76Deprecated, use mpegvideo private options instead. 77@item qprd 78Deprecated, use mpegvideo private options instead. 79@item ilme 80Apply interlaced motion estimation. 81@item cgop 82Use closed gop. 83@item output_corrupt 84Output even potentially corrupted frames. 85@end table 86 87@item me_method @var{integer} (@emph{encoding,video}) 88Set motion estimation method. 89 90Possible values: 91@table @samp 92@item zero 93zero motion estimation (fastest) 94@item full 95full motion estimation (slowest) 96@item epzs 97EPZS motion estimation (default) 98@item esa 99esa motion estimation (alias for full) 100@item tesa 101tesa motion estimation 102@item dia 103dia motion estimation (alias for epzs) 104@item log 105log motion estimation 106@item phods 107phods motion estimation 108@item x1 109X1 motion estimation 110@item hex 111hex motion estimation 112@item umh 113umh motion estimation 114@item iter 115iter motion estimation 116@end table 117 118@item extradata_size @var{integer} 119Set extradata size. 120 121@item time_base @var{rational number} 122Set codec time base. 123 124It is the fundamental unit of time (in seconds) in terms of which 125frame timestamps are represented. For fixed-fps content, timebase 126should be @code{1 / frame_rate} and timestamp increments should be 127identically 1. 128 129@item g @var{integer} (@emph{encoding,video}) 130Set the group of picture (GOP) size. Default value is 12. 131 132@item ar @var{integer} (@emph{decoding/encoding,audio}) 133Set audio sampling rate (in Hz). 134 135@item ac @var{integer} (@emph{decoding/encoding,audio}) 136Set number of audio channels. 137 138@item cutoff @var{integer} (@emph{encoding,audio}) 139Set cutoff bandwidth. (Supported only by selected encoders, see 140their respective documentation sections.) 141 142@item frame_size @var{integer} (@emph{encoding,audio}) 143Set audio frame size. 144 145Each submitted frame except the last must contain exactly frame_size 146samples per channel. May be 0 when the codec has 147CODEC_CAP_VARIABLE_FRAME_SIZE set, in that case the frame size is not 148restricted. It is set by some decoders to indicate constant frame 149size. 150 151@item frame_number @var{integer} 152Set the frame number. 153 154@item delay @var{integer} 155 156@item qcomp @var{float} (@emph{encoding,video}) 157Set video quantizer scale compression (VBR). It is used as a constant 158in the ratecontrol equation. Recommended range for default rc_eq: 1590.0-1.0. 160 161@item qblur @var{float} (@emph{encoding,video}) 162Set video quantizer scale blur (VBR). 163 164@item qmin @var{integer} (@emph{encoding,video}) 165Set min video quantizer scale (VBR). Must be included between -1 and 16669, default value is 2. 167 168@item qmax @var{integer} (@emph{encoding,video}) 169Set max video quantizer scale (VBR). Must be included between -1 and 1701024, default value is 31. 171 172@item qdiff @var{integer} (@emph{encoding,video}) 173Set max difference between the quantizer scale (VBR). 174 175@item bf @var{integer} (@emph{encoding,video}) 176Set max number of B frames between non-B-frames. 177 178Must be an integer between -1 and 16. 0 means that B-frames are 179disabled. If a value of -1 is used, it will choose an automatic value 180depending on the encoder. 181 182Default value is 0. 183 184@item b_qfactor @var{float} (@emph{encoding,video}) 185Set qp factor between P and B frames. 186 187@item rc_strategy @var{integer} (@emph{encoding,video}) 188Set ratecontrol method. 189 190@item b_strategy @var{integer} (@emph{encoding,video}) 191Set strategy to choose between I/P/B-frames. 192 193@item ps @var{integer} (@emph{encoding,video}) 194Set RTP payload size in bytes. 195 196@item mv_bits @var{integer} 197@item header_bits @var{integer} 198@item i_tex_bits @var{integer} 199@item p_tex_bits @var{integer} 200@item i_count @var{integer} 201@item p_count @var{integer} 202@item skip_count @var{integer} 203@item misc_bits @var{integer} 204@item frame_bits @var{integer} 205@item codec_tag @var{integer} 206@item bug @var{flags} (@emph{decoding,video}) 207Workaround not auto detected encoder bugs. 208 209Possible values: 210@table @samp 211@item autodetect 212 213@item old_msmpeg4 214some old lavc generated msmpeg4v3 files (no autodetection) 215@item xvid_ilace 216Xvid interlacing bug (autodetected if fourcc==XVIX) 217@item ump4 218(autodetected if fourcc==UMP4) 219@item no_padding 220padding bug (autodetected) 221@item amv 222 223@item ac_vlc 224illegal vlc bug (autodetected per fourcc) 225@item qpel_chroma 226 227@item std_qpel 228old standard qpel (autodetected per fourcc/version) 229@item qpel_chroma2 230 231@item direct_blocksize 232direct-qpel-blocksize bug (autodetected per fourcc/version) 233@item edge 234edge padding bug (autodetected per fourcc/version) 235@item hpel_chroma 236 237@item dc_clip 238 239@item ms 240Workaround various bugs in microsoft broken decoders. 241@item trunc 242trancated frames 243@end table 244 245@item lelim @var{integer} (@emph{encoding,video}) 246Set single coefficient elimination threshold for luminance (negative 247values also consider DC coefficient). 248 249@item celim @var{integer} (@emph{encoding,video}) 250Set single coefficient elimination threshold for chrominance (negative 251values also consider dc coefficient) 252 253@item strict @var{integer} (@emph{decoding/encoding,audio,video}) 254Specify how strictly to follow the standards. 255 256Possible values: 257@table @samp 258@item very 259strictly conform to an older more strict version of the spec or reference software 260@item strict 261strictly conform to all the things in the spec no matter what consequences 262@item normal 263 264@item unofficial 265allow unofficial extensions 266@item experimental 267allow non standardized experimental things, experimental 268(unfinished/work in progress/not well tested) decoders and encoders. 269Note: experimental decoders can pose a security risk, do not use this for 270decoding untrusted input. 271@end table 272 273@item b_qoffset @var{float} (@emph{encoding,video}) 274Set QP offset between P and B frames. 275 276@item err_detect @var{flags} (@emph{decoding,audio,video}) 277Set error detection flags. 278 279Possible values: 280@table @samp 281@item crccheck 282verify embedded CRCs 283@item bitstream 284detect bitstream specification deviations 285@item buffer 286detect improper bitstream length 287@item explode 288abort decoding on minor error detection 289@item ignore_err 290ignore decoding errors, and continue decoding. 291This is useful if you want to analyze the content of a video and thus want 292everything to be decoded no matter what. This option will not result in a video 293that is pleasing to watch in case of errors. 294@item careful 295consider things that violate the spec and have not been seen in the wild as errors 296@item compliant 297consider all spec non compliancies as errors 298@item aggressive 299consider things that a sane encoder should not do as an error 300@end table 301 302@item has_b_frames @var{integer} 303 304@item block_align @var{integer} 305 306@item mpeg_quant @var{integer} (@emph{encoding,video}) 307Use MPEG quantizers instead of H.263. 308 309@item qsquish @var{float} (@emph{encoding,video}) 310How to keep quantizer between qmin and qmax (0 = clip, 1 = use 311differentiable function). 312 313@item rc_qmod_amp @var{float} (@emph{encoding,video}) 314Set experimental quantizer modulation. 315 316@item rc_qmod_freq @var{integer} (@emph{encoding,video}) 317Set experimental quantizer modulation. 318 319@item rc_override_count @var{integer} 320 321@item rc_eq @var{string} (@emph{encoding,video}) 322Set rate control equation. When computing the expression, besides the 323standard functions defined in the section 'Expression Evaluation', the 324following functions are available: bits2qp(bits), qp2bits(qp). Also 325the following constants are available: iTex pTex tex mv fCode iCount 326mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex 327avgTex. 328 329@item maxrate @var{integer} (@emph{encoding,audio,video}) 330Set max bitrate tolerance (in bits/s). Requires bufsize to be set. 331 332@item minrate @var{integer} (@emph{encoding,audio,video}) 333Set min bitrate tolerance (in bits/s). Most useful in setting up a CBR 334encode. It is of little use elsewise. 335 336@item bufsize @var{integer} (@emph{encoding,audio,video}) 337Set ratecontrol buffer size (in bits). 338 339@item rc_buf_aggressivity @var{float} (@emph{encoding,video}) 340Currently useless. 341 342@item i_qfactor @var{float} (@emph{encoding,video}) 343Set QP factor between P and I frames. 344 345@item i_qoffset @var{float} (@emph{encoding,video}) 346Set QP offset between P and I frames. 347 348@item rc_init_cplx @var{float} (@emph{encoding,video}) 349Set initial complexity for 1-pass encoding. 350 351@item dct @var{integer} (@emph{encoding,video}) 352Set DCT algorithm. 353 354Possible values: 355@table @samp 356@item auto 357autoselect a good one (default) 358@item fastint 359fast integer 360@item int 361accurate integer 362@item mmx 363 364@item altivec 365 366@item faan 367floating point AAN DCT 368@end table 369 370@item lumi_mask @var{float} (@emph{encoding,video}) 371Compress bright areas stronger than medium ones. 372 373@item tcplx_mask @var{float} (@emph{encoding,video}) 374Set temporal complexity masking. 375 376@item scplx_mask @var{float} (@emph{encoding,video}) 377Set spatial complexity masking. 378 379@item p_mask @var{float} (@emph{encoding,video}) 380Set inter masking. 381 382@item dark_mask @var{float} (@emph{encoding,video}) 383Compress dark areas stronger than medium ones. 384 385@item idct @var{integer} (@emph{decoding/encoding,video}) 386Select IDCT implementation. 387 388Possible values: 389@table @samp 390@item auto 391 392@item int 393 394@item simple 395 396@item simplemmx 397 398@item simpleauto 399Automatically pick a IDCT compatible with the simple one 400 401@item arm 402 403@item altivec 404 405@item sh4 406 407@item simplearm 408 409@item simplearmv5te 410 411@item simplearmv6 412 413@item simpleneon 414 415@item simplealpha 416 417@item ipp 418 419@item xvidmmx 420 421@item faani 422floating point AAN IDCT 423@end table 424 425@item slice_count @var{integer} 426 427@item ec @var{flags} (@emph{decoding,video}) 428Set error concealment strategy. 429 430Possible values: 431@table @samp 432@item guess_mvs 433iterative motion vector (MV) search (slow) 434@item deblock 435use strong deblock filter for damaged MBs 436@item favor_inter 437favor predicting from the previous frame instead of the current 438@end table 439 440@item bits_per_coded_sample @var{integer} 441 442@item pred @var{integer} (@emph{encoding,video}) 443Set prediction method. 444 445Possible values: 446@table @samp 447@item left 448 449@item plane 450 451@item median 452 453@end table 454 455@item aspect @var{rational number} (@emph{encoding,video}) 456Set sample aspect ratio. 457 458@item sar @var{rational number} (@emph{encoding,video}) 459Set sample aspect ratio. Alias to @var{aspect}. 460 461@item debug @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) 462Print specific debug info. 463 464Possible values: 465@table @samp 466@item pict 467picture info 468@item rc 469rate control 470@item bitstream 471 472@item mb_type 473macroblock (MB) type 474@item qp 475per-block quantization parameter (QP) 476@item dct_coeff 477 478@item green_metadata 479display complexity metadata for the upcoming frame, GoP or for a given duration. 480 481@item skip 482 483@item startcode 484 485@item er 486error recognition 487@item mmco 488memory management control operations (H.264) 489@item bugs 490 491@item buffers 492picture buffer allocations 493@item thread_ops 494threading operations 495@item nomc 496skip motion compensation 497@end table 498 499@item cmp @var{integer} (@emph{encoding,video}) 500Set full pel me compare function. 501 502Possible values: 503@table @samp 504@item sad 505sum of absolute differences, fast (default) 506@item sse 507sum of squared errors 508@item satd 509sum of absolute Hadamard transformed differences 510@item dct 511sum of absolute DCT transformed differences 512@item psnr 513sum of squared quantization errors (avoid, low quality) 514@item bit 515number of bits needed for the block 516@item rd 517rate distortion optimal, slow 518@item zero 5190 520@item vsad 521sum of absolute vertical differences 522@item vsse 523sum of squared vertical differences 524@item nsse 525noise preserving sum of squared differences 526@item w53 5275/3 wavelet, only used in snow 528@item w97 5299/7 wavelet, only used in snow 530@item dctmax 531 532@item chroma 533 534@end table 535 536@item subcmp @var{integer} (@emph{encoding,video}) 537Set sub pel me compare function. 538 539Possible values: 540@table @samp 541@item sad 542sum of absolute differences, fast (default) 543@item sse 544sum of squared errors 545@item satd 546sum of absolute Hadamard transformed differences 547@item dct 548sum of absolute DCT transformed differences 549@item psnr 550sum of squared quantization errors (avoid, low quality) 551@item bit 552number of bits needed for the block 553@item rd 554rate distortion optimal, slow 555@item zero 5560 557@item vsad 558sum of absolute vertical differences 559@item vsse 560sum of squared vertical differences 561@item nsse 562noise preserving sum of squared differences 563@item w53 5645/3 wavelet, only used in snow 565@item w97 5669/7 wavelet, only used in snow 567@item dctmax 568 569@item chroma 570 571@end table 572 573@item mbcmp @var{integer} (@emph{encoding,video}) 574Set macroblock compare function. 575 576Possible values: 577@table @samp 578@item sad 579sum of absolute differences, fast (default) 580@item sse 581sum of squared errors 582@item satd 583sum of absolute Hadamard transformed differences 584@item dct 585sum of absolute DCT transformed differences 586@item psnr 587sum of squared quantization errors (avoid, low quality) 588@item bit 589number of bits needed for the block 590@item rd 591rate distortion optimal, slow 592@item zero 5930 594@item vsad 595sum of absolute vertical differences 596@item vsse 597sum of squared vertical differences 598@item nsse 599noise preserving sum of squared differences 600@item w53 6015/3 wavelet, only used in snow 602@item w97 6039/7 wavelet, only used in snow 604@item dctmax 605 606@item chroma 607 608@end table 609 610@item ildctcmp @var{integer} (@emph{encoding,video}) 611Set interlaced dct compare function. 612 613Possible values: 614@table @samp 615@item sad 616sum of absolute differences, fast (default) 617@item sse 618sum of squared errors 619@item satd 620sum of absolute Hadamard transformed differences 621@item dct 622sum of absolute DCT transformed differences 623@item psnr 624sum of squared quantization errors (avoid, low quality) 625@item bit 626number of bits needed for the block 627@item rd 628rate distortion optimal, slow 629@item zero 6300 631@item vsad 632sum of absolute vertical differences 633@item vsse 634sum of squared vertical differences 635@item nsse 636noise preserving sum of squared differences 637@item w53 6385/3 wavelet, only used in snow 639@item w97 6409/7 wavelet, only used in snow 641@item dctmax 642 643@item chroma 644 645@end table 646 647@item dia_size @var{integer} (@emph{encoding,video}) 648Set diamond type & size for motion estimation. 649@table @samp 650@item (1024, INT_MAX) 651full motion estimation(slowest) 652@item (768, 1024] 653umh motion estimation 654@item (512, 768] 655hex motion estimation 656@item (256, 512] 657l2s diamond motion estimation 658@item [2,256] 659var diamond motion estimation 660@item (-1, 2) 661small diamond motion estimation 662@item -1 663funny diamond motion estimation 664@item (INT_MIN, -1) 665sab diamond motion estimation 666@end table 667 668@item last_pred @var{integer} (@emph{encoding,video}) 669Set amount of motion predictors from the previous frame. 670 671@item preme @var{integer} (@emph{encoding,video}) 672Set pre motion estimation. 673 674@item precmp @var{integer} (@emph{encoding,video}) 675Set pre motion estimation compare function. 676 677Possible values: 678@table @samp 679@item sad 680sum of absolute differences, fast (default) 681@item sse 682sum of squared errors 683@item satd 684sum of absolute Hadamard transformed differences 685@item dct 686sum of absolute DCT transformed differences 687@item psnr 688sum of squared quantization errors (avoid, low quality) 689@item bit 690number of bits needed for the block 691@item rd 692rate distortion optimal, slow 693@item zero 6940 695@item vsad 696sum of absolute vertical differences 697@item vsse 698sum of squared vertical differences 699@item nsse 700noise preserving sum of squared differences 701@item w53 7025/3 wavelet, only used in snow 703@item w97 7049/7 wavelet, only used in snow 705@item dctmax 706 707@item chroma 708 709@end table 710 711@item pre_dia_size @var{integer} (@emph{encoding,video}) 712Set diamond type & size for motion estimation pre-pass. 713 714@item subq @var{integer} (@emph{encoding,video}) 715Set sub pel motion estimation quality. 716 717@item dtg_active_format @var{integer} 718 719@item me_range @var{integer} (@emph{encoding,video}) 720Set limit motion vectors range (1023 for DivX player). 721 722@item ibias @var{integer} (@emph{encoding,video}) 723Set intra quant bias. 724 725@item pbias @var{integer} (@emph{encoding,video}) 726Set inter quant bias. 727 728@item color_table_id @var{integer} 729 730@item global_quality @var{integer} (@emph{encoding,audio,video}) 731 732@item coder @var{integer} (@emph{encoding,video}) 733 734Possible values: 735@table @samp 736@item vlc 737variable length coder / huffman coder 738@item ac 739arithmetic coder 740@item raw 741raw (no encoding) 742@item rle 743run-length coder 744@item deflate 745deflate-based coder 746@end table 747 748@item context @var{integer} (@emph{encoding,video}) 749Set context model. 750 751@item slice_flags @var{integer} 752 753@item mbd @var{integer} (@emph{encoding,video}) 754Set macroblock decision algorithm (high quality mode). 755 756Possible values: 757@table @samp 758@item simple 759use mbcmp (default) 760@item bits 761use fewest bits 762@item rd 763use best rate distortion 764@end table 765 766@item stream_codec_tag @var{integer} 767 768@item sc_threshold @var{integer} (@emph{encoding,video}) 769Set scene change threshold. 770 771@item lmin @var{integer} (@emph{encoding,video}) 772Set min lagrange factor (VBR). 773 774@item lmax @var{integer} (@emph{encoding,video}) 775Set max lagrange factor (VBR). 776 777@item nr @var{integer} (@emph{encoding,video}) 778Set noise reduction. 779 780@item rc_init_occupancy @var{integer} (@emph{encoding,video}) 781Set number of bits which should be loaded into the rc buffer before 782decoding starts. 783 784@item flags2 @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) 785 786Possible values: 787@table @samp 788@item fast 789Allow non spec compliant speedup tricks. 790@item noout 791Skip bitstream encoding. 792@item ignorecrop 793Ignore cropping information from sps. 794@item local_header 795Place global headers at every keyframe instead of in extradata. 796@item chunks 797Frame data might be split into multiple chunks. 798@item showall 799Show all frames before the first keyframe. 800@item export_mvs 801Export motion vectors into frame side-data (see @code{AV_FRAME_DATA_MOTION_VECTORS}) 802for codecs that support it. See also @file{doc/examples/export_mvs.c}. 803@item skip_manual 804Do not skip samples and export skip information as frame side data. 805@item ass_ro_flush_noop 806Do not reset ASS ReadOrder field on flush. 807@end table 808 809@item export_side_data @var{flags} (@emph{decoding/encoding,audio,video,subtitles}) 810 811Possible values: 812@table @samp 813@item mvs 814Export motion vectors into frame side-data (see @code{AV_FRAME_DATA_MOTION_VECTORS}) 815for codecs that support it. See also @file{doc/examples/export_mvs.c}. 816@item prft 817Export encoder Producer Reference Time into packet side-data (see @code{AV_PKT_DATA_PRFT}) 818for codecs that support it. 819@end table 820 821@item error @var{integer} (@emph{encoding,video}) 822 823@item qns @var{integer} (@emph{encoding,video}) 824Deprecated, use mpegvideo private options instead. 825 826@item threads @var{integer} (@emph{decoding/encoding,video}) 827Set the number of threads to be used, in case the selected codec 828implementation supports multi-threading. 829 830Possible values: 831@table @samp 832@item auto, 0 833automatically select the number of threads to set 834@end table 835 836Default value is @samp{auto}. 837 838@item me_threshold @var{integer} (@emph{encoding,video}) 839Set motion estimation threshold. 840 841@item mb_threshold @var{integer} (@emph{encoding,video}) 842Set macroblock threshold. 843 844@item dc @var{integer} (@emph{encoding,video}) 845Set intra_dc_precision. 846 847@item nssew @var{integer} (@emph{encoding,video}) 848Set nsse weight. 849 850@item skip_top @var{integer} (@emph{decoding,video}) 851Set number of macroblock rows at the top which are skipped. 852 853@item skip_bottom @var{integer} (@emph{decoding,video}) 854Set number of macroblock rows at the bottom which are skipped. 855 856@item profile @var{integer} (@emph{encoding,audio,video}) 857 858Set encoder codec profile. Default value is @samp{unknown}. Encoder specific 859profiles are documented in the relevant encoder documentation. 860 861@item level @var{integer} (@emph{encoding,audio,video}) 862 863Possible values: 864@table @samp 865@item unknown 866 867@end table 868 869@item lowres @var{integer} (@emph{decoding,audio,video}) 870Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions. 871 872@item skip_threshold @var{integer} (@emph{encoding,video}) 873Set frame skip threshold. 874 875@item skip_factor @var{integer} (@emph{encoding,video}) 876Set frame skip factor. 877 878@item skip_exp @var{integer} (@emph{encoding,video}) 879Set frame skip exponent. 880Negative values behave identical to the corresponding positive ones, except 881that the score is normalized. 882Positive values exist primarily for compatibility reasons and are not so useful. 883 884@item skipcmp @var{integer} (@emph{encoding,video}) 885Set frame skip compare function. 886 887Possible values: 888@table @samp 889@item sad 890sum of absolute differences, fast (default) 891@item sse 892sum of squared errors 893@item satd 894sum of absolute Hadamard transformed differences 895@item dct 896sum of absolute DCT transformed differences 897@item psnr 898sum of squared quantization errors (avoid, low quality) 899@item bit 900number of bits needed for the block 901@item rd 902rate distortion optimal, slow 903@item zero 9040 905@item vsad 906sum of absolute vertical differences 907@item vsse 908sum of squared vertical differences 909@item nsse 910noise preserving sum of squared differences 911@item w53 9125/3 wavelet, only used in snow 913@item w97 9149/7 wavelet, only used in snow 915@item dctmax 916 917@item chroma 918 919@end table 920 921@item border_mask @var{float} (@emph{encoding,video}) 922Increase the quantizer for macroblocks close to borders. 923 924@item mblmin @var{integer} (@emph{encoding,video}) 925Set min macroblock lagrange factor (VBR). 926 927@item mblmax @var{integer} (@emph{encoding,video}) 928Set max macroblock lagrange factor (VBR). 929 930@item mepc @var{integer} (@emph{encoding,video}) 931Set motion estimation bitrate penalty compensation (1.0 = 256). 932 933@item skip_loop_filter @var{integer} (@emph{decoding,video}) 934@item skip_idct @var{integer} (@emph{decoding,video}) 935@item skip_frame @var{integer} (@emph{decoding,video}) 936 937Make decoder discard processing depending on the frame type selected 938by the option value. 939 940@option{skip_loop_filter} skips frame loop filtering, @option{skip_idct} 941skips frame IDCT/dequantization, @option{skip_frame} skips decoding. 942 943Possible values: 944@table @samp 945@item none 946Discard no frame. 947 948@item default 949Discard useless frames like 0-sized frames. 950 951@item noref 952Discard all non-reference frames. 953 954@item bidir 955Discard all bidirectional frames. 956 957@item nokey 958Discard all frames excepts keyframes. 959 960@item nointra 961Discard all frames except I frames. 962 963@item all 964Discard all frames. 965@end table 966 967Default value is @samp{default}. 968 969@item bidir_refine @var{integer} (@emph{encoding,video}) 970Refine the two motion vectors used in bidirectional macroblocks. 971 972@item brd_scale @var{integer} (@emph{encoding,video}) 973Downscale frames for dynamic B-frame decision. 974 975@item keyint_min @var{integer} (@emph{encoding,video}) 976Set minimum interval between IDR-frames. 977 978@item refs @var{integer} (@emph{encoding,video}) 979Set reference frames to consider for motion compensation. 980 981@item chromaoffset @var{integer} (@emph{encoding,video}) 982Set chroma qp offset from luma. 983 984@item trellis @var{integer} (@emph{encoding,audio,video}) 985Set rate-distortion optimal quantization. 986 987@item mv0_threshold @var{integer} (@emph{encoding,video}) 988@item b_sensitivity @var{integer} (@emph{encoding,video}) 989Adjust sensitivity of b_frame_strategy 1. 990 991@item compression_level @var{integer} (@emph{encoding,audio,video}) 992@item min_prediction_order @var{integer} (@emph{encoding,audio}) 993@item max_prediction_order @var{integer} (@emph{encoding,audio}) 994@item timecode_frame_start @var{integer} (@emph{encoding,video}) 995Set GOP timecode frame start number, in non drop frame format. 996 997@item request_channels @var{integer} (@emph{decoding,audio}) 998Set desired number of audio channels. 999 1000@item bits_per_raw_sample @var{integer} 1001@item channel_layout @var{integer} (@emph{decoding/encoding,audio}) 1002 1003Possible values: 1004@table @samp 1005@end table 1006@item request_channel_layout @var{integer} (@emph{decoding,audio}) 1007 1008Possible values: 1009@table @samp 1010@end table 1011@item rc_max_vbv_use @var{float} (@emph{encoding,video}) 1012@item rc_min_vbv_use @var{float} (@emph{encoding,video}) 1013@item ticks_per_frame @var{integer} (@emph{decoding/encoding,audio,video}) 1014 1015@item color_primaries @var{integer} (@emph{decoding/encoding,video}) 1016Possible values: 1017@table @samp 1018@item bt709 1019BT.709 1020@item bt470m 1021BT.470 M 1022@item bt470bg 1023BT.470 BG 1024@item smpte170m 1025SMPTE 170 M 1026@item smpte240m 1027SMPTE 240 M 1028@item film 1029Film 1030@item bt2020 1031BT.2020 1032@item smpte428 1033@item smpte428_1 1034SMPTE ST 428-1 1035@item smpte431 1036SMPTE 431-2 1037@item smpte432 1038SMPTE 432-1 1039@item jedec-p22 1040JEDEC P22 1041@end table 1042 1043@item color_trc @var{integer} (@emph{decoding/encoding,video}) 1044Possible values: 1045@table @samp 1046@item bt709 1047BT.709 1048@item gamma22 1049BT.470 M 1050@item gamma28 1051BT.470 BG 1052@item smpte170m 1053SMPTE 170 M 1054@item smpte240m 1055SMPTE 240 M 1056@item linear 1057Linear 1058@item log 1059@item log100 1060Log 1061@item log_sqrt 1062@item log316 1063Log square root 1064@item iec61966_2_4 1065@item iec61966-2-4 1066IEC 61966-2-4 1067@item bt1361 1068@item bt1361e 1069BT.1361 1070@item iec61966_2_1 1071@item iec61966-2-1 1072IEC 61966-2-1 1073@item bt2020_10 1074@item bt2020_10bit 1075BT.2020 - 10 bit 1076@item bt2020_12 1077@item bt2020_12bit 1078BT.2020 - 12 bit 1079@item smpte2084 1080SMPTE ST 2084 1081@item smpte428 1082@item smpte428_1 1083SMPTE ST 428-1 1084@item arib-std-b67 1085ARIB STD-B67 1086@end table 1087 1088@item colorspace @var{integer} (@emph{decoding/encoding,video}) 1089Possible values: 1090@table @samp 1091@item rgb 1092RGB 1093@item bt709 1094BT.709 1095@item fcc 1096FCC 1097@item bt470bg 1098BT.470 BG 1099@item smpte170m 1100SMPTE 170 M 1101@item smpte240m 1102SMPTE 240 M 1103@item ycocg 1104YCOCG 1105@item bt2020nc 1106@item bt2020_ncl 1107BT.2020 NCL 1108@item bt2020c 1109@item bt2020_cl 1110BT.2020 CL 1111@item smpte2085 1112SMPTE 2085 1113@item chroma-derived-nc 1114Chroma-derived NCL 1115@item chroma-derived-c 1116Chroma-derived CL 1117@item ictcp 1118ICtCp 1119@end table 1120 1121@item color_range @var{integer} (@emph{decoding/encoding,video}) 1122If used as input parameter, it serves as a hint to the decoder, which 1123color_range the input has. 1124Possible values: 1125@table @samp 1126@item tv 1127@item mpeg 1128MPEG (219*2^(n-8)) 1129@item pc 1130@item jpeg 1131JPEG (2^n-1) 1132@end table 1133 1134@item chroma_sample_location @var{integer} (@emph{decoding/encoding,video}) 1135Possible values: 1136@table @samp 1137@item left 1138 1139@item center 1140 1141@item topleft 1142 1143@item top 1144 1145@item bottomleft 1146 1147@item bottom 1148 1149@end table 1150 1151@item log_level_offset @var{integer} 1152Set the log level offset. 1153 1154@item slices @var{integer} (@emph{encoding,video}) 1155Number of slices, used in parallelized encoding. 1156 1157@item thread_type @var{flags} (@emph{decoding/encoding,video}) 1158Select which multithreading methods to use. 1159 1160Use of @samp{frame} will increase decoding delay by one frame per 1161thread, so clients which cannot provide future frames should not use 1162it. 1163 1164Possible values: 1165@table @samp 1166@item slice 1167Decode more than one part of a single frame at once. 1168 1169Multithreading using slices works only when the video was encoded with 1170slices. 1171 1172@item frame 1173Decode more than one frame at once. 1174@end table 1175 1176Default value is @samp{slice+frame}. 1177 1178@item audio_service_type @var{integer} (@emph{encoding,audio}) 1179Set audio service type. 1180 1181Possible values: 1182@table @samp 1183@item ma 1184Main Audio Service 1185@item ef 1186Effects 1187@item vi 1188Visually Impaired 1189@item hi 1190Hearing Impaired 1191@item di 1192Dialogue 1193@item co 1194Commentary 1195@item em 1196Emergency 1197@item vo 1198Voice Over 1199@item ka 1200Karaoke 1201@end table 1202 1203@item request_sample_fmt @var{sample_fmt} (@emph{decoding,audio}) 1204Set sample format audio decoders should prefer. Default value is 1205@code{none}. 1206 1207@item pkt_timebase @var{rational number} 1208 1209@item sub_charenc @var{encoding} (@emph{decoding,subtitles}) 1210Set the input subtitles character encoding. 1211 1212@item field_order @var{field_order} (@emph{video}) 1213Set/override the field order of the video. 1214Possible values: 1215@table @samp 1216@item progressive 1217Progressive video 1218@item tt 1219Interlaced video, top field coded and displayed first 1220@item bb 1221Interlaced video, bottom field coded and displayed first 1222@item tb 1223Interlaced video, top coded first, bottom displayed first 1224@item bt 1225Interlaced video, bottom coded first, top displayed first 1226@end table 1227 1228@item skip_alpha @var{bool} (@emph{decoding,video}) 1229Set to 1 to disable processing alpha (transparency). This works like the 1230@samp{gray} flag in the @option{flags} option which skips chroma information 1231instead of alpha. Default is 0. 1232 1233@item codec_whitelist @var{list} (@emph{input}) 1234"," separated list of allowed decoders. By default all are allowed. 1235 1236@item dump_separator @var{string} (@emph{input}) 1237Separator used to separate the fields printed on the command line about the 1238Stream parameters. 1239For example, to separate the fields with newlines and indentation: 1240@example 1241ffprobe -dump_separator " 1242 " -i ~/videos/matrixbench_mpeg2.mpg 1243@end example 1244 1245@item max_pixels @var{integer} (@emph{decoding/encoding,video}) 1246Maximum number of pixels per image. This value can be used to avoid out of 1247memory failures due to large images. 1248 1249@item apply_cropping @var{bool} (@emph{decoding,video}) 1250Enable cropping if cropping parameters are multiples of the required 1251alignment for the left and top parameters. If the alignment is not met the 1252cropping will be partially applied to maintain alignment. 1253Default is 1 (enabled). 1254Note: The required alignment depends on if @code{AV_CODEC_FLAG_UNALIGNED} is set and the 1255CPU. @code{AV_CODEC_FLAG_UNALIGNED} cannot be changed from the command line. Also hardware 1256decoders will not apply left/top Cropping. 1257 1258 1259@end table 1260 1261@c man end CODEC OPTIONS 1262 1263@ifclear config-writeonly 1264@include decoders.texi 1265@end ifclear 1266@ifclear config-readonly 1267@include encoders.texi 1268@end ifclear 1269