1FFMPEG-CODECS(1)                                              FFMPEG-CODECS(1)
2
3
4

NAME

6       ffmpeg-codecs - FFmpeg codecs
7

DESCRIPTION

9       This document describes the codecs (decoders and encoders) provided by
10       the libavcodec library.
11

CODEC OPTIONS

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

DECODERS

1060       Decoders are configured elements in FFmpeg which allow the decoding of
1061       multimedia streams.
1062
1063       When you configure your FFmpeg build, all the supported native decoders
1064       are enabled by default. Decoders requiring an external library must be
1065       enabled manually via the corresponding "--enable-lib" option. You can
1066       list all available decoders using the configure option
1067       "--list-decoders".
1068
1069       You can disable all the decoders with the configure option
1070       "--disable-decoders" and selectively enable / disable single decoders
1071       with the options "--enable-decoder=DECODER" /
1072       "--disable-decoder=DECODER".
1073
1074       The option "-decoders" of the ff* tools will display the list of
1075       enabled decoders.
1076

VIDEO DECODERS

1078       A description of some of the currently available video decoders
1079       follows.
1080
1081   av1
1082       AOMedia Video 1 (AV1) decoder.
1083
1084       Options
1085
1086       operating_point
1087           Select an operating point of a scalable AV1 bitstream (0 - 31).
1088           Default is 0.
1089
1090   rawvideo
1091       Raw video decoder.
1092
1093       This decoder decodes rawvideo streams.
1094
1095       Options
1096
1097       top top_field_first
1098           Specify the assumed field type of the input video.
1099
1100           -1  the video is assumed to be progressive (default)
1101
1102           0   bottom-field-first is assumed
1103
1104           1   top-field-first is assumed
1105
1106   libdav1d
1107       dav1d AV1 decoder.
1108
1109       libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
1110       Requires the presence of the libdav1d headers and library during
1111       configuration.  You need to explicitly configure the build with
1112       "--enable-libdav1d".
1113
1114       Options
1115
1116       The following options are supported by the libdav1d wrapper.
1117
1118       framethreads
1119           Set amount of frame threads to use during decoding. The default
1120           value is 0 (autodetect).  This option is deprecated for libdav1d >=
1121           1.0 and will be removed in the future. Use the global option
1122           "threads" instead.
1123
1124       tilethreads
1125           Set amount of tile threads to use during decoding. The default
1126           value is 0 (autodetect).  This option is deprecated for libdav1d >=
1127           1.0 and will be removed in the future. Use the global option
1128           "threads" instead.
1129
1130       filmgrain
1131           Apply film grain to the decoded video if present in the bitstream.
1132           Defaults to the internal default of the library.  This option is
1133           deprecated and will be removed in the future. See the global option
1134           "export_side_data" to export Film Grain parameters instead of
1135           applying it.
1136
1137       oppoint
1138           Select an operating point of a scalable AV1 bitstream (0 - 31).
1139           Defaults to the internal default of the library.
1140
1141       alllayers
1142           Output all spatial layers of a scalable AV1 bitstream. The default
1143           value is false.
1144
1145   libdavs2
1146       AVS2-P2/IEEE1857.4 video decoder wrapper.
1147
1148       This decoder allows libavcodec to decode AVS2 streams with davs2
1149       library.
1150
1151   libuavs3d
1152       AVS3-P2/IEEE1857.10 video decoder.
1153
1154       libuavs3d allows libavcodec to decode AVS3 streams.  Requires the
1155       presence of the libuavs3d headers and library during configuration.
1156       You need to explicitly configure the build with "--enable-libuavs3d".
1157
1158       Options
1159
1160       The following option is supported by the libuavs3d wrapper.
1161
1162       frame_threads
1163           Set amount of frame threads to use during decoding. The default
1164           value is 0 (autodetect).
1165

AUDIO DECODERS

1167       A description of some of the currently available audio decoders
1168       follows.
1169
1170   ac3
1171       AC-3 audio decoder.
1172
1173       This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as
1174       well as the undocumented RealAudio 3 (a.k.a. dnet).
1175
1176       AC-3 Decoder Options
1177
1178       -drc_scale value
1179           Dynamic Range Scale Factor. The factor to apply to dynamic range
1180           values from the AC-3 stream. This factor is applied exponentially.
1181           The default value is 1.  There are 3 notable scale factor ranges:
1182
1183           drc_scale == 0
1184               DRC disabled. Produces full range audio.
1185
1186           0 < drc_scale <= 1
1187               DRC enabled.  Applies a fraction of the stream DRC value.
1188               Audio reproduction is between full range and full compression.
1189
1190           drc_scale > 1
1191               DRC enabled. Applies drc_scale asymmetrically.  Loud sounds are
1192               fully compressed.  Soft sounds are enhanced.
1193
1194   flac
1195       FLAC audio decoder.
1196
1197       This decoder aims to implement the complete FLAC specification from
1198       Xiph.
1199
1200       FLAC Decoder options
1201
1202       -use_buggy_lpc
1203           The lavc FLAC encoder used to produce buggy streams with high lpc
1204           values (like the default value). This option makes it possible to
1205           decode such streams correctly by using lavc's old buggy lpc logic
1206           for decoding.
1207
1208   ffwavesynth
1209       Internal wave synthesizer.
1210
1211       This decoder generates wave patterns according to predefined sequences.
1212       Its use is purely internal and the format of the data it accepts is not
1213       publicly documented.
1214
1215   libcelt
1216       libcelt decoder wrapper.
1217
1218       libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio
1219       codec.  Requires the presence of the libcelt headers and library during
1220       configuration.  You need to explicitly configure the build with
1221       "--enable-libcelt".
1222
1223   libgsm
1224       libgsm decoder wrapper.
1225
1226       libgsm allows libavcodec to decode the GSM full rate audio codec.
1227       Requires the presence of the libgsm headers and library during
1228       configuration. You need to explicitly configure the build with
1229       "--enable-libgsm".
1230
1231       This decoder supports both the ordinary GSM and the Microsoft variant.
1232
1233   libilbc
1234       libilbc decoder wrapper.
1235
1236       libilbc allows libavcodec to decode the Internet Low Bitrate Codec
1237       (iLBC) audio codec. Requires the presence of the libilbc headers and
1238       library during configuration. You need to explicitly configure the
1239       build with "--enable-libilbc".
1240
1241       Options
1242
1243       The following option is supported by the libilbc wrapper.
1244
1245       enhance
1246           Enable the enhancement of the decoded audio when set to 1. The
1247           default value is 0 (disabled).
1248
1249   libopencore-amrnb
1250       libopencore-amrnb decoder wrapper.
1251
1252       libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
1253       Narrowband audio codec. Using it requires the presence of the
1254       libopencore-amrnb headers and library during configuration. You need to
1255       explicitly configure the build with "--enable-libopencore-amrnb".
1256
1257       An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
1258       without this library.
1259
1260   libopencore-amrwb
1261       libopencore-amrwb decoder wrapper.
1262
1263       libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
1264       Wideband audio codec. Using it requires the presence of the
1265       libopencore-amrwb headers and library during configuration. You need to
1266       explicitly configure the build with "--enable-libopencore-amrwb".
1267
1268       An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
1269       without this library.
1270
1271   libopus
1272       libopus decoder wrapper.
1273
1274       libopus allows libavcodec to decode the Opus Interactive Audio Codec.
1275       Requires the presence of the libopus headers and library during
1276       configuration. You need to explicitly configure the build with
1277       "--enable-libopus".
1278
1279       An FFmpeg native decoder for Opus exists, so users can decode Opus
1280       without this library.
1281

SUBTITLES DECODERS

1283   libaribb24
1284       ARIB STD-B24 caption decoder.
1285
1286       Implements profiles A and C of the ARIB STD-B24 standard.
1287
1288       libaribb24 Decoder Options
1289
1290       -aribb24-base-path path
1291           Sets the base path for the libaribb24 library. This is utilized for
1292           reading of configuration files (for custom unicode conversions),
1293           and for dumping of non-text symbols as images under that location.
1294
1295           Unset by default.
1296
1297       -aribb24-skip-ruby-text boolean
1298           Tells the decoder wrapper to skip text blocks that contain half-
1299           height ruby text.
1300
1301           Enabled by default.
1302
1303   dvbsub
1304       Options
1305
1306       compute_clut
1307           -2  Compute clut once if no matching CLUT is in the stream.
1308
1309           -1  Compute clut if no matching CLUT is in the stream.
1310
1311           0   Never compute CLUT
1312
1313           1   Always compute CLUT and override the one provided in the
1314               stream.
1315
1316       dvb_substream
1317           Selects the dvb substream, or all substreams if -1 which is
1318           default.
1319
1320   dvdsub
1321       This codec decodes the bitmap subtitles used in DVDs; the same
1322       subtitles can also be found in VobSub file pairs and in some Matroska
1323       files.
1324
1325       Options
1326
1327       palette
1328           Specify the global palette used by the bitmaps. When stored in
1329           VobSub, the palette is normally specified in the index file; in
1330           Matroska, the palette is stored in the codec extra-data in the same
1331           format as in VobSub. In DVDs, the palette is stored in the IFO
1332           file, and therefore not available when reading from dumped VOB
1333           files.
1334
1335           The format for this option is a string containing 16 24-bits
1336           hexadecimal numbers (without 0x prefix) separated by commas, for
1337           example "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b,
1338           0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c,
1339           7c127b".
1340
1341       ifo_palette
1342           Specify the IFO file from which the global palette is obtained.
1343           (experimental)
1344
1345       forced_subs_only
1346           Only decode subtitle entries marked as forced. Some titles have
1347           forced and non-forced subtitles in the same track. Setting this
1348           flag to 1 will only keep the forced subtitles. Default value is 0.
1349
1350   libzvbi-teletext
1351       Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
1352       subtitles. Requires the presence of the libzvbi headers and library
1353       during configuration. You need to explicitly configure the build with
1354       "--enable-libzvbi".
1355
1356       Options
1357
1358       txt_page
1359           List of teletext page numbers to decode. Pages that do not match
1360           the specified list are dropped. You may use the special "*" string
1361           to match all pages, or "subtitle" to match all subtitle pages.
1362           Default value is *.
1363
1364       txt_default_region
1365           Set default character set used for decoding, a value between 0 and
1366           87 (see ETS 300 706, Section 15, Table 32). Default value is -1,
1367           which does not override the libzvbi default. This option is needed
1368           for some legacy level 1.0 transmissions which cannot signal the
1369           proper charset.
1370
1371       txt_chop_top
1372           Discards the top teletext line. Default value is 1.
1373
1374       txt_format
1375           Specifies the format of the decoded subtitles.
1376
1377           bitmap
1378               The default format, you should use this for teletext pages,
1379               because certain graphics and colors cannot be expressed in
1380               simple text or even ASS.
1381
1382           text
1383               Simple text based output without formatting.
1384
1385           ass Formatted ASS output, subtitle pages and teletext pages are
1386               returned in different styles, subtitle pages are stripped down
1387               to text, but an effort is made to keep the text alignment and
1388               the formatting.
1389
1390       txt_left
1391           X offset of generated bitmaps, default is 0.
1392
1393       txt_top
1394           Y offset of generated bitmaps, default is 0.
1395
1396       txt_chop_spaces
1397           Chops leading and trailing spaces and removes empty lines from the
1398           generated text. This option is useful for teletext based subtitles
1399           where empty spaces may be present at the start or at the end of the
1400           lines or empty lines may be present between the subtitle lines
1401           because of double-sized teletext characters.  Default value is 1.
1402
1403       txt_duration
1404           Sets the display duration of the decoded teletext pages or
1405           subtitles in milliseconds. Default value is -1 which means infinity
1406           or until the next subtitle event comes.
1407
1408       txt_transparent
1409           Force transparent background of the generated teletext bitmaps.
1410           Default value is 0 which means an opaque background.
1411
1412       txt_opacity
1413           Sets the opacity (0-255) of the teletext background. If
1414           txt_transparent is not set, it only affects characters between a
1415           start box and an end box, typically subtitles. Default value is 0
1416           if txt_transparent is set, 255 otherwise.
1417

ENCODERS

1419       Encoders are configured elements in FFmpeg which allow the encoding of
1420       multimedia streams.
1421
1422       When you configure your FFmpeg build, all the supported native encoders
1423       are enabled by default. Encoders requiring an external library must be
1424       enabled manually via the corresponding "--enable-lib" option. You can
1425       list all available encoders using the configure option
1426       "--list-encoders".
1427
1428       You can disable all the encoders with the configure option
1429       "--disable-encoders" and selectively enable / disable single encoders
1430       with the options "--enable-encoder=ENCODER" /
1431       "--disable-encoder=ENCODER".
1432
1433       The option "-encoders" of the ff* tools will display the list of
1434       enabled encoders.
1435

AUDIO ENCODERS

1437       A description of some of the currently available audio encoders
1438       follows.
1439
1440   aac
1441       Advanced Audio Coding (AAC) encoder.
1442
1443       This encoder is the default AAC encoder, natively implemented into
1444       FFmpeg.
1445
1446       Options
1447
1448       b   Set bit rate in bits/s. Setting this automatically activates
1449           constant bit rate (CBR) mode. If this option is unspecified it is
1450           set to 128kbps.
1451
1452       q   Set quality for variable bit rate (VBR) mode. This option is valid
1453           only using the ffmpeg command-line tool. For library interface
1454           users, use global_quality.
1455
1456       cutoff
1457           Set cutoff frequency. If unspecified will allow the encoder to
1458           dynamically adjust the cutoff to improve clarity on low bitrates.
1459
1460       aac_coder
1461           Set AAC encoder coding method. Possible values:
1462
1463           twoloop
1464               Two loop searching (TLS) method. This is the default method.
1465
1466               This method first sets quantizers depending on band thresholds
1467               and then tries to find an optimal combination by adding or
1468               subtracting a specific value from all quantizers and adjusting
1469               some individual quantizer a little.  Will tune itself based on
1470               whether aac_is, aac_ms and aac_pns are enabled.
1471
1472           anmr
1473               Average noise to mask ratio (ANMR) trellis-based solution.
1474
1475               This is an experimental coder which currently produces a lower
1476               quality, is more unstable and is slower than the default
1477               twoloop coder but has potential.  Currently has no support for
1478               the aac_is or aac_pns options.  Not currently recommended.
1479
1480           fast
1481               Constant quantizer method.
1482
1483               Uses a cheaper version of twoloop algorithm that doesn't try to
1484               do as many clever adjustments. Worse with low bitrates (less
1485               than 64kbps), but is better and much faster at higher bitrates.
1486
1487       aac_ms
1488           Sets mid/side coding mode. The default value of "auto" will
1489           automatically use M/S with bands which will benefit from such
1490           coding. Can be forced for all bands using the value "enable", which
1491           is mainly useful for debugging or disabled using "disable".
1492
1493       aac_is
1494           Sets intensity stereo coding tool usage. By default, it's enabled
1495           and will automatically toggle IS for similar pairs of stereo bands
1496           if it's beneficial.  Can be disabled for debugging by setting the
1497           value to "disable".
1498
1499       aac_pns
1500           Uses perceptual noise substitution to replace low entropy high
1501           frequency bands with imperceptible white noise during the decoding
1502           process. By default, it's enabled, but can be disabled for
1503           debugging purposes by using "disable".
1504
1505       aac_tns
1506           Enables the use of a multitap FIR filter which spans through the
1507           high frequency bands to hide quantization noise during the encoding
1508           process and is reverted by the decoder. As well as decreasing
1509           unpleasant artifacts in the high range this also reduces the
1510           entropy in the high bands and allows for more bits to be used by
1511           the mid-low bands. By default it's enabled but can be disabled for
1512           debugging by setting the option to "disable".
1513
1514       aac_ltp
1515           Enables the use of the long term prediction extension which
1516           increases coding efficiency in very low bandwidth situations such
1517           as encoding of voice or solo piano music by extending constant
1518           harmonic peaks in bands throughout frames. This option is implied
1519           by profile:a aac_low and is incompatible with aac_pred. Use in
1520           conjunction with -ar to decrease the samplerate.
1521
1522       aac_pred
1523           Enables the use of a more traditional style of prediction where the
1524           spectral coefficients transmitted are replaced by the difference of
1525           the current coefficients minus the previous "predicted"
1526           coefficients. In theory and sometimes in practice this can improve
1527           quality for low to mid bitrate audio.  This option implies the
1528           aac_main profile and is incompatible with aac_ltp.
1529
1530       profile
1531           Sets the encoding profile, possible values:
1532
1533           aac_low
1534               The default, AAC "Low-complexity" profile. Is the most
1535               compatible and produces decent quality.
1536
1537           mpeg2_aac_low
1538               Equivalent to "-profile:a aac_low -aac_pns 0". PNS was
1539               introduced with the MPEG4 specifications.
1540
1541           aac_ltp
1542               Long term prediction profile, is enabled by and will enable the
1543               aac_ltp option. Introduced in MPEG4.
1544
1545           aac_main
1546               Main-type prediction profile, is enabled by and will enable the
1547               aac_pred option. Introduced in MPEG2.
1548
1549           If this option is unspecified it is set to aac_low.
1550
1551   ac3 and ac3_fixed
1552       AC-3 audio encoders.
1553
1554       These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as
1555       well as the undocumented RealAudio 3 (a.k.a. dnet).
1556
1557       The ac3 encoder uses floating-point math, while the ac3_fixed encoder
1558       only uses fixed-point integer math. This does not mean that one is
1559       always faster, just that one or the other may be better suited to a
1560       particular system. The ac3_fixed encoder is not the default codec for
1561       any of the output formats, so it must be specified explicitly using the
1562       option "-acodec ac3_fixed" in order to use it.
1563
1564       AC-3 Metadata
1565
1566       The AC-3 metadata options are used to set parameters that describe the
1567       audio, but in most cases do not affect the audio encoding itself. Some
1568       of the options do directly affect or influence the decoding and
1569       playback of the resulting bitstream, while others are just for
1570       informational purposes. A few of the options will add bits to the
1571       output stream that could otherwise be used for audio data, and will
1572       thus affect the quality of the output. Those will be indicated
1573       accordingly with a note in the option list below.
1574
1575       These parameters are described in detail in several publicly-available
1576       documents.
1577
1578       *<<http://www.atsc.org/cms/standards/a_52-2010.pdf>>
1579       *<<http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf>>
1580       *<<http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf>>
1581       *<<http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf>>
1582
1583       Metadata Control Options
1584
1585       -per_frame_metadata boolean
1586           Allow Per-Frame Metadata. Specifies if the encoder should check for
1587           changing metadata for each frame.
1588
1589           0   The metadata values set at initialization will be used for
1590               every frame in the stream. (default)
1591
1592           1   Metadata values can be changed before encoding each frame.
1593
1594       Downmix Levels
1595
1596       -center_mixlev level
1597           Center Mix Level. The amount of gain the decoder should apply to
1598           the center channel when downmixing to stereo. This field will only
1599           be written to the bitstream if a center channel is present. The
1600           value is specified as a scale factor. There are 3 valid values:
1601
1602           0.707
1603               Apply -3dB gain
1604
1605           0.595
1606               Apply -4.5dB gain (default)
1607
1608           0.500
1609               Apply -6dB gain
1610
1611       -surround_mixlev level
1612           Surround Mix Level. The amount of gain the decoder should apply to
1613           the surround channel(s) when downmixing to stereo. This field will
1614           only be written to the bitstream if one or more surround channels
1615           are present. The value is specified as a scale factor.  There are 3
1616           valid values:
1617
1618           0.707
1619               Apply -3dB gain
1620
1621           0.500
1622               Apply -6dB gain (default)
1623
1624           0.000
1625               Silence Surround Channel(s)
1626
1627       Audio Production Information
1628
1629       Audio Production Information is optional information describing the
1630       mixing environment.  Either none or both of the fields are written to
1631       the bitstream.
1632
1633       -mixing_level number
1634           Mixing Level. Specifies peak sound pressure level (SPL) in the
1635           production environment when the mix was mastered. Valid values are
1636           80 to 111, or -1 for unknown or not indicated. The default value is
1637           -1, but that value cannot be used if the Audio Production
1638           Information is written to the bitstream. Therefore, if the
1639           "room_type" option is not the default value, the "mixing_level"
1640           option must not be -1.
1641
1642       -room_type type
1643           Room Type. Describes the equalization used during the final mixing
1644           session at the studio or on the dubbing stage. A large room is a
1645           dubbing stage with the industry standard X-curve equalization; a
1646           small room has flat equalization.  This field will not be written
1647           to the bitstream if both the "mixing_level" option and the
1648           "room_type" option have the default values.
1649
1650           0
1651           notindicated
1652               Not Indicated (default)
1653
1654           1
1655           large
1656               Large Room
1657
1658           2
1659           small
1660               Small Room
1661
1662       Other Metadata Options
1663
1664       -copyright boolean
1665           Copyright Indicator. Specifies whether a copyright exists for this
1666           audio.
1667
1668           0
1669           off No Copyright Exists (default)
1670
1671           1
1672           on  Copyright Exists
1673
1674       -dialnorm value
1675           Dialogue Normalization. Indicates how far the average dialogue
1676           level of the program is below digital 100% full scale (0 dBFS).
1677           This parameter determines a level shift during audio reproduction
1678           that sets the average volume of the dialogue to a preset level. The
1679           goal is to match volume level between program sources. A value of
1680           -31dB will result in no volume level change, relative to the source
1681           volume, during audio reproduction. Valid values are whole numbers
1682           in the range -31 to -1, with -31 being the default.
1683
1684       -dsur_mode mode
1685           Dolby Surround Mode. Specifies whether the stereo signal uses Dolby
1686           Surround (Pro Logic). This field will only be written to the
1687           bitstream if the audio stream is stereo. Using this option does NOT
1688           mean the encoder will actually apply Dolby Surround processing.
1689
1690           0
1691           notindicated
1692               Not Indicated (default)
1693
1694           1
1695           off Not Dolby Surround Encoded
1696
1697           2
1698           on  Dolby Surround Encoded
1699
1700       -original boolean
1701           Original Bit Stream Indicator. Specifies whether this audio is from
1702           the original source and not a copy.
1703
1704           0
1705           off Not Original Source
1706
1707           1
1708           on  Original Source (default)
1709
1710       Extended Bitstream Information
1711
1712       The extended bitstream options are part of the Alternate Bit Stream
1713       Syntax as specified in Annex D of the A/52:2010 standard. It is grouped
1714       into 2 parts.  If any one parameter in a group is specified, all values
1715       in that group will be written to the bitstream.  Default values are
1716       used for those that are written but have not been specified.  If the
1717       mixing levels are written, the decoder will use these values instead of
1718       the ones specified in the "center_mixlev" and "surround_mixlev" options
1719       if it supports the Alternate Bit Stream Syntax.
1720
1721       Extended Bitstream Information - Part 1
1722
1723       -dmix_mode mode
1724           Preferred Stereo Downmix Mode. Allows the user to select either
1725           Lt/Rt (Dolby Surround) or Lo/Ro (normal stereo) as the preferred
1726           stereo downmix mode.
1727
1728           0
1729           notindicated
1730               Not Indicated (default)
1731
1732           1
1733           ltrt
1734               Lt/Rt Downmix Preferred
1735
1736           2
1737           loro
1738               Lo/Ro Downmix Preferred
1739
1740       -ltrt_cmixlev level
1741           Lt/Rt Center Mix Level. The amount of gain the decoder should apply
1742           to the center channel when downmixing to stereo in Lt/Rt mode.
1743
1744           1.414
1745               Apply +3dB gain
1746
1747           1.189
1748               Apply +1.5dB gain
1749
1750           1.000
1751               Apply 0dB gain
1752
1753           0.841
1754               Apply -1.5dB gain
1755
1756           0.707
1757               Apply -3.0dB gain
1758
1759           0.595
1760               Apply -4.5dB gain (default)
1761
1762           0.500
1763               Apply -6.0dB gain
1764
1765           0.000
1766               Silence Center Channel
1767
1768       -ltrt_surmixlev level
1769           Lt/Rt Surround Mix Level. The amount of gain the decoder should
1770           apply to the surround channel(s) when downmixing to stereo in Lt/Rt
1771           mode.
1772
1773           0.841
1774               Apply -1.5dB gain
1775
1776           0.707
1777               Apply -3.0dB gain
1778
1779           0.595
1780               Apply -4.5dB gain
1781
1782           0.500
1783               Apply -6.0dB gain (default)
1784
1785           0.000
1786               Silence Surround Channel(s)
1787
1788       -loro_cmixlev level
1789           Lo/Ro Center Mix Level. The amount of gain the decoder should apply
1790           to the center channel when downmixing to stereo in Lo/Ro mode.
1791
1792           1.414
1793               Apply +3dB gain
1794
1795           1.189
1796               Apply +1.5dB gain
1797
1798           1.000
1799               Apply 0dB gain
1800
1801           0.841
1802               Apply -1.5dB gain
1803
1804           0.707
1805               Apply -3.0dB gain
1806
1807           0.595
1808               Apply -4.5dB gain (default)
1809
1810           0.500
1811               Apply -6.0dB gain
1812
1813           0.000
1814               Silence Center Channel
1815
1816       -loro_surmixlev level
1817           Lo/Ro Surround Mix Level. The amount of gain the decoder should
1818           apply to the surround channel(s) when downmixing to stereo in Lo/Ro
1819           mode.
1820
1821           0.841
1822               Apply -1.5dB gain
1823
1824           0.707
1825               Apply -3.0dB gain
1826
1827           0.595
1828               Apply -4.5dB gain
1829
1830           0.500
1831               Apply -6.0dB gain (default)
1832
1833           0.000
1834               Silence Surround Channel(s)
1835
1836       Extended Bitstream Information - Part 2
1837
1838       -dsurex_mode mode
1839           Dolby Surround EX Mode. Indicates whether the stream uses Dolby
1840           Surround EX (7.1 matrixed to 5.1). Using this option does NOT mean
1841           the encoder will actually apply Dolby Surround EX processing.
1842
1843           0
1844           notindicated
1845               Not Indicated (default)
1846
1847           1
1848           on  Dolby Surround EX Off
1849
1850           2
1851           off Dolby Surround EX On
1852
1853       -dheadphone_mode mode
1854           Dolby Headphone Mode. Indicates whether the stream uses Dolby
1855           Headphone encoding (multi-channel matrixed to 2.0 for use with
1856           headphones). Using this option does NOT mean the encoder will
1857           actually apply Dolby Headphone processing.
1858
1859           0
1860           notindicated
1861               Not Indicated (default)
1862
1863           1
1864           on  Dolby Headphone Off
1865
1866           2
1867           off Dolby Headphone On
1868
1869       -ad_conv_type type
1870           A/D Converter Type. Indicates whether the audio has passed through
1871           HDCD A/D conversion.
1872
1873           0
1874           standard
1875               Standard A/D Converter (default)
1876
1877           1
1878           hdcd
1879               HDCD A/D Converter
1880
1881       Other AC-3 Encoding Options
1882
1883       -stereo_rematrixing boolean
1884           Stereo Rematrixing. Enables/Disables use of rematrixing for stereo
1885           input. This is an optional AC-3 feature that increases quality by
1886           selectively encoding the left/right channels as mid/side. This
1887           option is enabled by default, and it is highly recommended that it
1888           be left as enabled except for testing purposes.
1889
1890       cutoff frequency
1891           Set lowpass cutoff frequency. If unspecified, the encoder selects a
1892           default determined by various other encoding parameters.
1893
1894       Floating-Point-Only AC-3 Encoding Options
1895
1896       These options are only valid for the floating-point encoder and do not
1897       exist for the fixed-point encoder due to the corresponding features not
1898       being implemented in fixed-point.
1899
1900       -channel_coupling boolean
1901           Enables/Disables use of channel coupling, which is an optional AC-3
1902           feature that increases quality by combining high frequency
1903           information from multiple channels into a single channel. The per-
1904           channel high frequency information is sent with less accuracy in
1905           both the frequency and time domains. This allows more bits to be
1906           used for lower frequencies while preserving enough information to
1907           reconstruct the high frequencies. This option is enabled by default
1908           for the floating-point encoder and should generally be left as
1909           enabled except for testing purposes or to increase encoding speed.
1910
1911           -1
1912           auto
1913               Selected by Encoder (default)
1914
1915           0
1916           off Disable Channel Coupling
1917
1918           1
1919           on  Enable Channel Coupling
1920
1921       -cpl_start_band number
1922           Coupling Start Band. Sets the channel coupling start band, from 1
1923           to 15. If a value higher than the bandwidth is used, it will be
1924           reduced to 1 less than the coupling end band. If auto is used, the
1925           start band will be determined by the encoder based on the bit rate,
1926           sample rate, and channel layout. This option has no effect if
1927           channel coupling is disabled.
1928
1929           -1
1930           auto
1931               Selected by Encoder (default)
1932
1933   flac
1934       FLAC (Free Lossless Audio Codec) Encoder
1935
1936       Options
1937
1938       The following options are supported by FFmpeg's flac encoder.
1939
1940       compression_level
1941           Sets the compression level, which chooses defaults for many other
1942           options if they are not set explicitly. Valid values are from 0 to
1943           12, 5 is the default.
1944
1945       frame_size
1946           Sets the size of the frames in samples per channel.
1947
1948       lpc_coeff_precision
1949           Sets the LPC coefficient precision, valid values are from 1 to 15,
1950           15 is the default.
1951
1952       lpc_type
1953           Sets the first stage LPC algorithm
1954
1955           none
1956               LPC is not used
1957
1958           fixed
1959               fixed LPC coefficients
1960
1961           levinson
1962           cholesky
1963       lpc_passes
1964           Number of passes to use for Cholesky factorization during LPC
1965           analysis
1966
1967       min_partition_order
1968           The minimum partition order
1969
1970       max_partition_order
1971           The maximum partition order
1972
1973       prediction_order_method
1974           estimation
1975           2level
1976           4level
1977           8level
1978           search
1979               Bruteforce search
1980
1981           log
1982       ch_mode
1983           Channel mode
1984
1985           auto
1986               The mode is chosen automatically for each frame
1987
1988           indep
1989               Channels are independently coded
1990
1991           left_side
1992           right_side
1993           mid_side
1994       exact_rice_parameters
1995           Chooses if rice parameters are calculated exactly or approximately.
1996           if set to 1 then they are chosen exactly, which slows the code down
1997           slightly and improves compression slightly.
1998
1999       multi_dim_quant
2000           Multi Dimensional Quantization. If set to 1 then a 2nd stage LPC
2001           algorithm is applied after the first stage to finetune the
2002           coefficients. This is quite slow and slightly improves compression.
2003
2004   opus
2005       Opus encoder.
2006
2007       This is a native FFmpeg encoder for the Opus format. Currently its in
2008       development and only implements the CELT part of the codec. Its quality
2009       is usually worse and at best is equal to the libopus encoder.
2010
2011       Options
2012
2013       b   Set bit rate in bits/s. If unspecified it uses the number of
2014           channels and the layout to make a good guess.
2015
2016       opus_delay
2017           Sets the maximum delay in milliseconds. Lower delays than 20ms will
2018           very quickly decrease quality.
2019
2020   libfdk_aac
2021       libfdk-aac AAC (Advanced Audio Coding) encoder wrapper.
2022
2023       The libfdk-aac library is based on the Fraunhofer FDK AAC code from the
2024       Android project.
2025
2026       Requires the presence of the libfdk-aac headers and library during
2027       configuration. You need to explicitly configure the build with
2028       "--enable-libfdk-aac". The library is also incompatible with GPL, so if
2029       you allow the use of GPL, you should configure with "--enable-gpl
2030       --enable-nonfree --enable-libfdk-aac".
2031
2032       This encoder has support for the AAC-HE profiles.
2033
2034       VBR encoding, enabled through the vbr or flags +qscale options, is
2035       experimental and only works with some combinations of parameters.
2036
2037       Support for encoding 7.1 audio is only available with libfdk-aac 0.1.3
2038       or higher.
2039
2040       For more information see the fdk-aac project at
2041       <http://sourceforge.net/p/opencore-amr/fdk-aac/>.
2042
2043       Options
2044
2045       The following options are mapped on the shared FFmpeg codec options.
2046
2047       b   Set bit rate in bits/s. If the bitrate is not explicitly specified,
2048           it is automatically set to a suitable value depending on the
2049           selected profile.
2050
2051           In case VBR mode is enabled the option is ignored.
2052
2053       ar  Set audio sampling rate (in Hz).
2054
2055       channels
2056           Set the number of audio channels.
2057
2058       flags +qscale
2059           Enable fixed quality, VBR (Variable Bit Rate) mode.  Note that VBR
2060           is implicitly enabled when the vbr value is positive.
2061
2062       cutoff
2063           Set cutoff frequency. If not specified (or explicitly set to 0) it
2064           will use a value automatically computed by the library. Default
2065           value is 0.
2066
2067       profile
2068           Set audio profile.
2069
2070           The following profiles are recognized:
2071
2072           aac_low
2073               Low Complexity AAC (LC)
2074
2075           aac_he
2076               High Efficiency AAC (HE-AAC)
2077
2078           aac_he_v2
2079               High Efficiency AAC version 2 (HE-AACv2)
2080
2081           aac_ld
2082               Low Delay AAC (LD)
2083
2084           aac_eld
2085               Enhanced Low Delay AAC (ELD)
2086
2087           If not specified it is set to aac_low.
2088
2089       The following are private options of the libfdk_aac encoder.
2090
2091       afterburner
2092           Enable afterburner feature if set to 1, disabled if set to 0. This
2093           improves the quality but also the required processing power.
2094
2095           Default value is 1.
2096
2097       eld_sbr
2098           Enable SBR (Spectral Band Replication) for ELD if set to 1,
2099           disabled if set to 0.
2100
2101           Default value is 0.
2102
2103       eld_v2
2104           Enable ELDv2 (LD-MPS extension for ELD stereo signals) for ELDv2 if
2105           set to 1, disabled if set to 0.
2106
2107           Note that option is available when fdk-aac version
2108           (AACENCODER_LIB_VL0.AACENCODER_LIB_VL1.AACENCODER_LIB_VL2) >
2109           (4.0.0).
2110
2111           Default value is 0.
2112
2113       signaling
2114           Set SBR/PS signaling style.
2115
2116           It can assume one of the following values:
2117
2118           default
2119               choose signaling implicitly (explicit hierarchical by default,
2120               implicit if global header is disabled)
2121
2122           implicit
2123               implicit backwards compatible signaling
2124
2125           explicit_sbr
2126               explicit SBR, implicit PS signaling
2127
2128           explicit_hierarchical
2129               explicit hierarchical signaling
2130
2131           Default value is default.
2132
2133       latm
2134           Output LATM/LOAS encapsulated data if set to 1, disabled if set to
2135           0.
2136
2137           Default value is 0.
2138
2139       header_period
2140           Set StreamMuxConfig and PCE repetition period (in frames) for
2141           sending in-band configuration buffers within LATM/LOAS transport
2142           layer.
2143
2144           Must be a 16-bits non-negative integer.
2145
2146           Default value is 0.
2147
2148       vbr Set VBR mode, from 1 to 5. 1 is lowest quality (though still pretty
2149           good) and 5 is highest quality. A value of 0 will disable VBR, and
2150           CBR (Constant Bit Rate) is enabled.
2151
2152           Currently only the aac_low profile supports VBR encoding.
2153
2154           VBR modes 1-5 correspond to roughly the following average bit
2155           rates:
2156
2157           1   32 kbps/channel
2158
2159           2   40 kbps/channel
2160
2161           3   48-56 kbps/channel
2162
2163           4   64 kbps/channel
2164
2165           5   about 80-96 kbps/channel
2166
2167           Default value is 0.
2168
2169       Examples
2170
2171       •   Use ffmpeg to convert an audio file to VBR AAC in an M4A (MP4)
2172           container:
2173
2174                   ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a
2175
2176       •   Use ffmpeg to convert an audio file to CBR 64k kbps AAC, using the
2177           High-Efficiency AAC profile:
2178
2179                   ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a
2180
2181   libmp3lame
2182       LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper.
2183
2184       Requires the presence of the libmp3lame headers and library during
2185       configuration. You need to explicitly configure the build with
2186       "--enable-libmp3lame".
2187
2188       See libshine for a fixed-point MP3 encoder, although with a lower
2189       quality.
2190
2191       Options
2192
2193       The following options are supported by the libmp3lame wrapper. The
2194       lame-equivalent of the options are listed in parentheses.
2195
2196       b (-b)
2197           Set bitrate expressed in bits/s for CBR or ABR. LAME "bitrate" is
2198           expressed in kilobits/s.
2199
2200       q (-V)
2201           Set constant quality setting for VBR. This option is valid only
2202           using the ffmpeg command-line tool. For library interface users,
2203           use global_quality.
2204
2205       compression_level (-q)
2206           Set algorithm quality. Valid arguments are integers in the 0-9
2207           range, with 0 meaning highest quality but slowest, and 9 meaning
2208           fastest while producing the worst quality.
2209
2210       cutoff (--lowpass)
2211           Set lowpass cutoff frequency. If unspecified, the encoder
2212           dynamically adjusts the cutoff.
2213
2214       reservoir
2215           Enable use of bit reservoir when set to 1. Default value is 1. LAME
2216           has this enabled by default, but can be overridden by use --nores
2217           option.
2218
2219       joint_stereo (-m j)
2220           Enable the encoder to use (on a frame by frame basis) either L/R
2221           stereo or mid/side stereo. Default value is 1.
2222
2223       abr (--abr)
2224           Enable the encoder to use ABR when set to 1. The lame --abr sets
2225           the target bitrate, while this options only tells FFmpeg to use ABR
2226           still relies on b to set bitrate.
2227
2228   libopencore-amrnb
2229       OpenCORE Adaptive Multi-Rate Narrowband encoder.
2230
2231       Requires the presence of the libopencore-amrnb headers and library
2232       during configuration. You need to explicitly configure the build with
2233       "--enable-libopencore-amrnb --enable-version3".
2234
2235       This is a mono-only encoder. Officially it only supports 8000Hz sample
2236       rate, but you can override it by setting strict to unofficial or lower.
2237
2238       Options
2239
2240       b   Set bitrate in bits per second. Only the following bitrates are
2241           supported, otherwise libavcodec will round to the nearest valid
2242           bitrate.
2243
2244           4750
2245           5150
2246           5900
2247           6700
2248           7400
2249           7950
2250           10200
2251           12200
2252       dtx Allow discontinuous transmission (generate comfort noise) when set
2253           to 1. The default value is 0 (disabled).
2254
2255   libopus
2256       libopus Opus Interactive Audio Codec encoder wrapper.
2257
2258       Requires the presence of the libopus headers and library during
2259       configuration. You need to explicitly configure the build with
2260       "--enable-libopus".
2261
2262       Option Mapping
2263
2264       Most libopus options are modelled after the opusenc utility from opus-
2265       tools. The following is an option mapping chart describing options
2266       supported by the libopus wrapper, and their opusenc-equivalent in
2267       parentheses.
2268
2269       b (bitrate)
2270           Set the bit rate in bits/s.  FFmpeg's b option is expressed in
2271           bits/s, while opusenc's bitrate in kilobits/s.
2272
2273       vbr (vbr, hard-cbr, and cvbr)
2274           Set VBR mode. The FFmpeg vbr option has the following valid
2275           arguments, with the opusenc equivalent options in parentheses:
2276
2277           off (hard-cbr)
2278               Use constant bit rate encoding.
2279
2280           on (vbr)
2281               Use variable bit rate encoding (the default).
2282
2283           constrained (cvbr)
2284               Use constrained variable bit rate encoding.
2285
2286       compression_level (comp)
2287           Set encoding algorithm complexity. Valid options are integers in
2288           the 0-10 range. 0 gives the fastest encodes but lower quality,
2289           while 10 gives the highest quality but slowest encoding. The
2290           default is 10.
2291
2292       frame_duration (framesize)
2293           Set maximum frame size, or duration of a frame in milliseconds. The
2294           argument must be exactly the following: 2.5, 5, 10, 20, 40, 60.
2295           Smaller frame sizes achieve lower latency but less quality at a
2296           given bitrate.  Sizes greater than 20ms are only interesting at
2297           fairly low bitrates.  The default is 20ms.
2298
2299       packet_loss (expect-loss)
2300           Set expected packet loss percentage. The default is 0.
2301
2302       fec (n/a)
2303           Enable inband forward error correction. packet_loss must be non-
2304           zero to take advantage - frequency of FEC 'side-data' is
2305           proportional to expected packet loss.  Default is disabled.
2306
2307       application (N.A.)
2308           Set intended application type. Valid options are listed below:
2309
2310           voip
2311               Favor improved speech intelligibility.
2312
2313           audio
2314               Favor faithfulness to the input (the default).
2315
2316           lowdelay
2317               Restrict to only the lowest delay modes.
2318
2319       cutoff (N.A.)
2320           Set cutoff bandwidth in Hz. The argument must be exactly one of the
2321           following: 4000, 6000, 8000, 12000, or 20000, corresponding to
2322           narrowband, mediumband, wideband, super wideband, and fullband
2323           respectively. The default is 0 (cutoff disabled).
2324
2325       mapping_family (mapping_family)
2326           Set channel mapping family to be used by the encoder. The default
2327           value of -1 uses mapping family 0 for mono and stereo inputs, and
2328           mapping family 1 otherwise. The default also disables the surround
2329           masking and LFE bandwidth optimzations in libopus, and requires
2330           that the input contains 8 channels or fewer.
2331
2332           Other values include 0 for mono and stereo, 1 for surround sound
2333           with masking and LFE bandwidth optimizations, and 255 for
2334           independent streams with an unspecified channel layout.
2335
2336       apply_phase_inv (N.A.) (requires libopus >= 1.2)
2337           If set to 0, disables the use of phase inversion for intensity
2338           stereo, improving the quality of mono downmixes, but slightly
2339           reducing normal stereo quality. The default is 1 (phase inversion
2340           enabled).
2341
2342   libshine
2343       Shine Fixed-Point MP3 encoder wrapper.
2344
2345       Shine is a fixed-point MP3 encoder. It has a far better performance on
2346       platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
2347       However, as it is more targeted on performance than quality, it is not
2348       on par with LAME and other production-grade encoders quality-wise.
2349       Also, according to the project's homepage, this encoder may not be free
2350       of bugs as the code was written a long time ago and the project was
2351       dead for at least 5 years.
2352
2353       This encoder only supports stereo and mono input. This is also CBR-
2354       only.
2355
2356       The original project (last updated in early 2007) is at
2357       <http://sourceforge.net/projects/libshine-fxp/>. We only support the
2358       updated fork by the Savonet/Liquidsoap project at
2359       <https://github.com/savonet/shine>.
2360
2361       Requires the presence of the libshine headers and library during
2362       configuration. You need to explicitly configure the build with
2363       "--enable-libshine".
2364
2365       See also libmp3lame.
2366
2367       Options
2368
2369       The following options are supported by the libshine wrapper. The
2370       shineenc-equivalent of the options are listed in parentheses.
2371
2372       b (-b)
2373           Set bitrate expressed in bits/s for CBR. shineenc -b option is
2374           expressed in kilobits/s.
2375
2376   libtwolame
2377       TwoLAME MP2 encoder wrapper.
2378
2379       Requires the presence of the libtwolame headers and library during
2380       configuration. You need to explicitly configure the build with
2381       "--enable-libtwolame".
2382
2383       Options
2384
2385       The following options are supported by the libtwolame wrapper. The
2386       twolame-equivalent options follow the FFmpeg ones and are in
2387       parentheses.
2388
2389       b (-b)
2390           Set bitrate expressed in bits/s for CBR. twolame b option is
2391           expressed in kilobits/s. Default value is 128k.
2392
2393       q (-V)
2394           Set quality for experimental VBR support. Maximum value range is
2395           from -50 to 50, useful range is from -10 to 10. The higher the
2396           value, the better the quality. This option is valid only using the
2397           ffmpeg command-line tool. For library interface users, use
2398           global_quality.
2399
2400       mode (--mode)
2401           Set the mode of the resulting audio. Possible values:
2402
2403           auto
2404               Choose mode automatically based on the input. This is the
2405               default.
2406
2407           stereo
2408               Stereo
2409
2410           joint_stereo
2411               Joint stereo
2412
2413           dual_channel
2414               Dual channel
2415
2416           mono
2417               Mono
2418
2419       psymodel (--psyc-mode)
2420           Set psychoacoustic model to use in encoding. The argument must be
2421           an integer between -1 and 4, inclusive. The higher the value, the
2422           better the quality. The default value is 3.
2423
2424       energy_levels (--energy)
2425           Enable energy levels extensions when set to 1. The default value is
2426           0 (disabled).
2427
2428       error_protection (--protect)
2429           Enable CRC error protection when set to 1. The default value is 0
2430           (disabled).
2431
2432       copyright (--copyright)
2433           Set MPEG audio copyright flag when set to 1. The default value is 0
2434           (disabled).
2435
2436       original (--original)
2437           Set MPEG audio original flag when set to 1. The default value is 0
2438           (disabled).
2439
2440   libvo-amrwbenc
2441       VisualOn Adaptive Multi-Rate Wideband encoder.
2442
2443       Requires the presence of the libvo-amrwbenc headers and library during
2444       configuration. You need to explicitly configure the build with
2445       "--enable-libvo-amrwbenc --enable-version3".
2446
2447       This is a mono-only encoder. Officially it only supports 16000Hz sample
2448       rate, but you can override it by setting strict to unofficial or lower.
2449
2450       Options
2451
2452       b   Set bitrate in bits/s. Only the following bitrates are supported,
2453           otherwise libavcodec will round to the nearest valid bitrate.
2454
2455           6600
2456           8850
2457           12650
2458           14250
2459           15850
2460           18250
2461           19850
2462           23050
2463           23850
2464       dtx Allow discontinuous transmission (generate comfort noise) when set
2465           to 1. The default value is 0 (disabled).
2466
2467   libvorbis
2468       libvorbis encoder wrapper.
2469
2470       Requires the presence of the libvorbisenc headers and library during
2471       configuration. You need to explicitly configure the build with
2472       "--enable-libvorbis".
2473
2474       Options
2475
2476       The following options are supported by the libvorbis wrapper. The
2477       oggenc-equivalent of the options are listed in parentheses.
2478
2479       To get a more accurate and extensive documentation of the libvorbis
2480       options, consult the libvorbisenc's and oggenc's documentations.  See
2481       <http://xiph.org/vorbis/>, <http://wiki.xiph.org/Vorbis-tools>, and
2482       oggenc(1).
2483
2484       b (-b)
2485           Set bitrate expressed in bits/s for ABR. oggenc -b is expressed in
2486           kilobits/s.
2487
2488       q (-q)
2489           Set constant quality setting for VBR. The value should be a float
2490           number in the range of -1.0 to 10.0. The higher the value, the
2491           better the quality. The default value is 3.0.
2492
2493           This option is valid only using the ffmpeg command-line tool.  For
2494           library interface users, use global_quality.
2495
2496       cutoff (--advanced-encode-option lowpass_frequency=N)
2497           Set cutoff bandwidth in Hz, a value of 0 disables cutoff. oggenc's
2498           related option is expressed in kHz. The default value is 0 (cutoff
2499           disabled).
2500
2501       minrate (-m)
2502           Set minimum bitrate expressed in bits/s. oggenc -m is expressed in
2503           kilobits/s.
2504
2505       maxrate (-M)
2506           Set maximum bitrate expressed in bits/s. oggenc -M is expressed in
2507           kilobits/s. This only has effect on ABR mode.
2508
2509       iblock (--advanced-encode-option impulse_noisetune=N)
2510           Set noise floor bias for impulse blocks. The value is a float
2511           number from -15.0 to 0.0. A negative bias instructs the encoder to
2512           pay special attention to the crispness of transients in the encoded
2513           audio. The tradeoff for better transient response is a higher
2514           bitrate.
2515
2516   mjpeg
2517       Motion JPEG encoder.
2518
2519       Options
2520
2521       huffman
2522           Set the huffman encoding strategy. Possible values:
2523
2524           default
2525               Use the default huffman tables. This is the default strategy.
2526
2527           optimal
2528               Compute and use optimal huffman tables.
2529
2530   wavpack
2531       WavPack lossless audio encoder.
2532
2533       Options
2534
2535       The equivalent options for wavpack command line utility are listed in
2536       parentheses.
2537
2538       Shared options
2539
2540       The following shared options are effective for this encoder. Only
2541       special notes about this particular encoder will be documented here.
2542       For the general meaning of the options, see the Codec Options chapter.
2543
2544       frame_size (--blocksize)
2545           For this encoder, the range for this option is between 128 and
2546           131072. Default is automatically decided based on sample rate and
2547           number of channel.
2548
2549           For the complete formula of calculating default, see
2550           libavcodec/wavpackenc.c.
2551
2552       compression_level (-f, -h, -hh, and -x)
2553
2554       Private options
2555
2556       joint_stereo (-j)
2557           Set whether to enable joint stereo. Valid values are:
2558
2559           on (1)
2560               Force mid/side audio encoding.
2561
2562           off (0)
2563               Force left/right audio encoding.
2564
2565           auto
2566               Let the encoder decide automatically.
2567
2568       optimize_mono
2569           Set whether to enable optimization for mono. This option is only
2570           effective for non-mono streams. Available values:
2571
2572           on  enabled
2573
2574           off disabled
2575

VIDEO ENCODERS

2577       A description of some of the currently available video encoders
2578       follows.
2579
2580   a64_multi, a64_multi5
2581       A64 / Commodore 64 multicolor charset encoder. "a64_multi5" is extended
2582       with 5th color (colram).
2583
2584   GIF
2585       GIF image/animation encoder.
2586
2587       Options
2588
2589       gifflags integer
2590           Sets the flags used for GIF encoding.
2591
2592           offsetting
2593               Enables picture offsetting.
2594
2595               Default is enabled.
2596
2597           transdiff
2598               Enables transparency detection between frames.
2599
2600               Default is enabled.
2601
2602       gifimage integer
2603           Enables encoding one full GIF image per frame, rather than an
2604           animated GIF.
2605
2606           Default value is 0.
2607
2608       global_palette integer
2609           Writes a palette to the global GIF header where feasible.
2610
2611           If disabled, every frame will always have a palette written, even
2612           if there is a global palette supplied.
2613
2614           Default value is 1.
2615
2616   Hap
2617       Vidvox Hap video encoder.
2618
2619       Options
2620
2621       format integer
2622           Specifies the Hap format to encode.
2623
2624           hap
2625           hap_alpha
2626           hap_q
2627
2628           Default value is hap.
2629
2630       chunks integer
2631           Specifies the number of chunks to split frames into, between 1 and
2632           64. This permits multithreaded decoding of large frames,
2633           potentially at the cost of data-rate. The encoder may modify this
2634           value to divide frames evenly.
2635
2636           Default value is 1.
2637
2638       compressor integer
2639           Specifies the second-stage compressor to use. If set to none,
2640           chunks will be limited to 1, as chunked uncompressed frames offer
2641           no benefit.
2642
2643           none
2644           snappy
2645
2646           Default value is snappy.
2647
2648   jpeg2000
2649       The native jpeg 2000 encoder is lossy by default, the "-q:v" option can
2650       be used to set the encoding quality. Lossless encoding can be selected
2651       with "-pred 1".
2652
2653       Options
2654
2655       format integer
2656           Can be set to either "j2k" or "jp2" (the default) that makes it
2657           possible to store non-rgb pix_fmts.
2658
2659       tile_width integer
2660           Sets tile width. Range is 1 to 1073741824. Default is 256.
2661
2662       tile_height integer
2663           Sets tile height. Range is 1 to 1073741824. Default is 256.
2664
2665       pred integer
2666           Allows setting the discrete wavelet transform (DWT) type
2667
2668           dwt97int (Lossy)
2669           dwt53 (Lossless)
2670
2671           Default is "dwt97int"
2672
2673       sop boolean
2674           Enable this to add SOP marker at the start of each packet. Disabled
2675           by default.
2676
2677       eph boolean
2678           Enable this to add EPH marker at the end of each packet header.
2679           Disabled by default.
2680
2681       prog integer
2682           Sets the progression order to be used by the encoder.  Possible
2683           values are:
2684
2685           lrcp
2686           rlcp
2687           rpcl
2688           pcrl
2689           cprl
2690
2691           Set to "lrcp" by default.
2692
2693       layer_rates string
2694           By default, when this option is not used, compression is done using
2695           the quality metric.  This option allows for compression using
2696           compression ratio. The compression ratio for each level could be
2697           specified. The compression ratio of a layer "l" species the what
2698           ratio of total file size is contained in the first "l" layers.
2699
2700           Example usage:
2701
2702                   ffmpeg -i input.bmp -c:v jpeg2000 -layer_rates "100,10,1" output.j2k
2703
2704           This would compress the image to contain 3 layers, where the data
2705           contained in the first layer would be compressed by 1000 times,
2706           compressed by 100 in the first two layers, and shall contain all
2707           data while using all 3 layers.
2708
2709   librav1e
2710       rav1e AV1 encoder wrapper.
2711
2712       Requires the presence of the rav1e headers and library during
2713       configuration.  You need to explicitly configure the build with
2714       "--enable-librav1e".
2715
2716       Options
2717
2718       qmax
2719           Sets the maximum quantizer to use when using bitrate mode.
2720
2721       qmin
2722           Sets the minimum quantizer to use when using bitrate mode.
2723
2724       qp  Uses quantizer mode to encode at the given quantizer (0-255).
2725
2726       speed
2727           Selects the speed preset (0-10) to encode with.
2728
2729       tiles
2730           Selects how many tiles to encode with.
2731
2732       tile-rows
2733           Selects how many rows of tiles to encode with.
2734
2735       tile-columns
2736           Selects how many columns of tiles to encode with.
2737
2738       rav1e-params
2739           Set rav1e options using a list of key=value pairs separated by ":".
2740           See rav1e --help for a list of options.
2741
2742           For example to specify librav1e encoding options with
2743           -rav1e-params:
2744
2745                   ffmpeg -i input -c:v librav1e -b:v 500K -rav1e-params speed=5:low_latency=true output.mp4
2746
2747   libaom-av1
2748       libaom AV1 encoder wrapper.
2749
2750       Requires the presence of the libaom headers and library during
2751       configuration.  You need to explicitly configure the build with
2752       "--enable-libaom".
2753
2754       Options
2755
2756       The wrapper supports the following standard libavcodec options:
2757
2758       b   Set bitrate target in bits/second.  By default this will use
2759           variable-bitrate mode.  If maxrate and minrate are also set to the
2760           same value then it will use constant-bitrate mode, otherwise if crf
2761           is set as well then it will use constrained-quality mode.
2762
2763       g keyint_min
2764           Set key frame placement.  The GOP size sets the maximum distance
2765           between key frames; if zero the output stream will be intra-only.
2766           The minimum distance is ignored unless it is the same as the GOP
2767           size, in which case key frames will always appear at a fixed
2768           interval.  Not set by default, so without this option the library
2769           has completely free choice about where to place key frames.
2770
2771       qmin qmax
2772           Set minimum/maximum quantisation values.  Valid range is from 0 to
2773           63 (warning: this does not match the quantiser values actually used
2774           by AV1 - divide by four to map real quantiser values to this
2775           range).  Defaults to min/max (no constraint).
2776
2777       minrate maxrate bufsize rc_init_occupancy
2778           Set rate control buffering parameters.  Not used if not set -
2779           defaults to unconstrained variable bitrate.
2780
2781       threads
2782           Set the number of threads to use while encoding.  This may require
2783           the tiles or row-mt options to also be set to actually use the
2784           specified number of threads fully. Defaults to the number of
2785           hardware threads supported by the host machine.
2786
2787       profile
2788           Set the encoding profile.  Defaults to using the profile which
2789           matches the bit depth and chroma subsampling of the input.
2790
2791       The wrapper also has some specific options:
2792
2793       cpu-used
2794           Set the quality/encoding speed tradeoff.  Valid range is from 0 to
2795           8, higher numbers indicating greater speed and lower quality.  The
2796           default value is 1, which will be slow and high quality.
2797
2798       auto-alt-ref
2799           Enable use of alternate reference frames.  Defaults to the internal
2800           default of the library.
2801
2802       arnr-max-frames (frames)
2803           Set altref noise reduction max frame count. Default is -1.
2804
2805       arnr-strength (strength)
2806           Set altref noise reduction filter strength. Range is -1 to 6.
2807           Default is -1.
2808
2809       aq-mode (aq-mode)
2810           Set adaptive quantization mode. Possible values:
2811
2812           none (0)
2813               Disabled.
2814
2815           variance (1)
2816               Variance-based.
2817
2818           complexity (2)
2819               Complexity-based.
2820
2821           cyclic (3)
2822               Cyclic refresh.
2823
2824       tune (tune)
2825           Set the distortion metric the encoder is tuned with. Default is
2826           "psnr".
2827
2828           psnr (0)
2829           ssim (1)
2830       lag-in-frames
2831           Set the maximum number of frames which the encoder may keep in
2832           flight at any one time for lookahead purposes.  Defaults to the
2833           internal default of the library.
2834
2835       error-resilience
2836           Enable error resilience features:
2837
2838           default
2839               Improve resilience against losses of whole frames.
2840
2841           Not enabled by default.
2842
2843       crf Set the quality/size tradeoff for constant-quality (no bitrate
2844           target) and constrained-quality (with maximum bitrate target)
2845           modes. Valid range is 0 to 63, higher numbers indicating lower
2846           quality and smaller output size.  Only used if set; by default only
2847           the bitrate target is used.
2848
2849       static-thresh
2850           Set a change threshold on blocks below which they will be skipped
2851           by the encoder.  Defined in arbitrary units as a nonnegative
2852           integer, defaulting to zero (no blocks are skipped).
2853
2854       drop-threshold
2855           Set a threshold for dropping frames when close to rate control
2856           bounds.  Defined as a percentage of the target buffer - when the
2857           rate control buffer falls below this percentage, frames will be
2858           dropped until it has refilled above the threshold.  Defaults to
2859           zero (no frames are dropped).
2860
2861       denoise-noise-level (level)
2862           Amount of noise to be removed for grain synthesis. Grain synthesis
2863           is disabled if this option is not set or set to 0.
2864
2865       denoise-block-size (pixels)
2866           Block size used for denoising for grain synthesis. If not set, AV1
2867           codec uses the default value of 32.
2868
2869       undershoot-pct (pct)
2870           Set datarate undershoot (min) percentage of the target bitrate.
2871           Range is -1 to 100.  Default is -1.
2872
2873       overshoot-pct (pct)
2874           Set datarate overshoot (max) percentage of the target bitrate.
2875           Range is -1 to 1000.  Default is -1.
2876
2877       minsection-pct (pct)
2878           Minimum percentage variation of the GOP bitrate from the target
2879           bitrate. If minsection-pct is not set, the libaomenc wrapper
2880           computes it as follows: "(minrate * 100 / bitrate)".  Range is -1
2881           to 100. Default is -1 (unset).
2882
2883       maxsection-pct (pct)
2884           Maximum percentage variation of the GOP bitrate from the target
2885           bitrate. If maxsection-pct is not set, the libaomenc wrapper
2886           computes it as follows: "(maxrate * 100 / bitrate)".  Range is -1
2887           to 5000. Default is -1 (unset).
2888
2889       frame-parallel (boolean)
2890           Enable frame parallel decodability features. Default is true.
2891
2892       tiles
2893           Set the number of tiles to encode the input video with, as columns
2894           x rows.  Larger numbers allow greater parallelism in both encoding
2895           and decoding, but may decrease coding efficiency.  Defaults to the
2896           minimum number of tiles required by the size of the input video
2897           (this is 1x1 (that is, a single tile) for sizes up to and including
2898           4K).
2899
2900       tile-columns tile-rows
2901           Set the number of tiles as log2 of the number of tile rows and
2902           columns.  Provided for compatibility with libvpx/VP9.
2903
2904       row-mt (Requires libaom >= 1.0.0-759-g90a15f4f2)
2905           Enable row based multi-threading. Disabled by default.
2906
2907       enable-cdef (boolean)
2908           Enable Constrained Directional Enhancement Filter. The libaom-av1
2909           encoder enables CDEF by default.
2910
2911       enable-restoration (boolean)
2912           Enable Loop Restoration Filter. Default is true for libaom-av1.
2913
2914       enable-global-motion (boolean)
2915           Enable the use of global motion for block prediction. Default is
2916           true.
2917
2918       enable-intrabc (boolean)
2919           Enable block copy mode for intra block prediction. This mode is
2920           useful for screen content. Default is true.
2921
2922       enable-rect-partitions (boolean) (Requires libaom >= v2.0.0)
2923           Enable rectangular partitions. Default is true.
2924
2925       enable-1to4-partitions (boolean) (Requires libaom >= v2.0.0)
2926           Enable 1:4/4:1 partitions. Default is true.
2927
2928       enable-ab-partitions (boolean) (Requires libaom >= v2.0.0)
2929           Enable AB shape partitions. Default is true.
2930
2931       enable-angle-delta (boolean) (Requires libaom >= v2.0.0)
2932           Enable angle delta intra prediction. Default is true.
2933
2934       enable-cfl-intra (boolean) (Requires libaom >= v2.0.0)
2935           Enable chroma predicted from luma intra prediction. Default is
2936           true.
2937
2938       enable-filter-intra (boolean) (Requires libaom >= v2.0.0)
2939           Enable filter intra predictor. Default is true.
2940
2941       enable-intra-edge-filter (boolean) (Requires libaom >= v2.0.0)
2942           Enable intra edge filter. Default is true.
2943
2944       enable-smooth-intra (boolean) (Requires libaom >= v2.0.0)
2945           Enable smooth intra prediction mode. Default is true.
2946
2947       enable-paeth-intra (boolean) (Requires libaom >= v2.0.0)
2948           Enable paeth predictor in intra prediction. Default is true.
2949
2950       enable-palette (boolean) (Requires libaom >= v2.0.0)
2951           Enable palette prediction mode. Default is true.
2952
2953       enable-flip-idtx (boolean) (Requires libaom >= v2.0.0)
2954           Enable extended transform type, including FLIPADST_DCT,
2955           DCT_FLIPADST, FLIPADST_FLIPADST, ADST_FLIPADST, FLIPADST_ADST,
2956           IDTX, V_DCT, H_DCT, V_ADST, H_ADST, V_FLIPADST, H_FLIPADST. Default
2957           is true.
2958
2959       enable-tx64 (boolean) (Requires libaom >= v2.0.0)
2960           Enable 64-pt transform. Default is true.
2961
2962       reduced-tx-type-set (boolean) (Requires libaom >= v2.0.0)
2963           Use reduced set of transform types. Default is false.
2964
2965       use-intra-dct-only (boolean) (Requires libaom >= v2.0.0)
2966           Use DCT only for INTRA modes. Default is false.
2967
2968       use-inter-dct-only (boolean) (Requires libaom >= v2.0.0)
2969           Use DCT only for INTER modes. Default is false.
2970
2971       use-intra-default-tx-only (boolean) (Requires libaom >= v2.0.0)
2972           Use Default-transform only for INTRA modes. Default is false.
2973
2974       enable-ref-frame-mvs (boolean) (Requires libaom >= v2.0.0)
2975           Enable temporal mv prediction. Default is true.
2976
2977       enable-reduced-reference-set (boolean) (Requires libaom >= v2.0.0)
2978           Use reduced set of single and compound references. Default is
2979           false.
2980
2981       enable-obmc (boolean) (Requires libaom >= v2.0.0)
2982           Enable obmc. Default is true.
2983
2984       enable-dual-filter (boolean) (Requires libaom >= v2.0.0)
2985           Enable dual filter. Default is true.
2986
2987       enable-diff-wtd-comp (boolean) (Requires libaom >= v2.0.0)
2988           Enable difference-weighted compound. Default is true.
2989
2990       enable-dist-wtd-comp (boolean) (Requires libaom >= v2.0.0)
2991           Enable distance-weighted compound. Default is true.
2992
2993       enable-onesided-comp (boolean) (Requires libaom >= v2.0.0)
2994           Enable one sided compound. Default is true.
2995
2996       enable-interinter-wedge (boolean) (Requires libaom >= v2.0.0)
2997           Enable interinter wedge compound. Default is true.
2998
2999       enable-interintra-wedge (boolean) (Requires libaom >= v2.0.0)
3000           Enable interintra wedge compound. Default is true.
3001
3002       enable-masked-comp (boolean) (Requires libaom >= v2.0.0)
3003           Enable masked compound. Default is true.
3004
3005       enable-interintra-comp (boolean) (Requires libaom >= v2.0.0)
3006           Enable interintra compound. Default is true.
3007
3008       enable-smooth-interintra (boolean) (Requires libaom >= v2.0.0)
3009           Enable smooth interintra mode. Default is true.
3010
3011       aom-params
3012           Set libaom options using a list of key=value pairs separated by
3013           ":". For a list of supported options, see aomenc --help under the
3014           section "AV1 Specific Options".
3015
3016           For example to specify libaom encoding options with -aom-params:
3017
3018                   ffmpeg -i input -c:v libaom-av1 -b:v 500K -aom-params tune=psnr:enable-tpl-model=1 output.mp4
3019
3020   libsvtav1
3021       SVT-AV1 encoder wrapper.
3022
3023       Requires the presence of the SVT-AV1 headers and library during
3024       configuration.  You need to explicitly configure the build with
3025       "--enable-libsvtav1".
3026
3027       Options
3028
3029       profile
3030           Set the encoding profile.
3031
3032           main
3033           high
3034           professional
3035       level
3036           Set the operating point level. For example: '4.0'
3037
3038       hielevel
3039           Set the Hierarchical prediction levels.
3040
3041           3level
3042           4level
3043               This is the default.
3044
3045       tier
3046           Set the operating point tier.
3047
3048           main
3049               This is the default.
3050
3051           high
3052       rc  Set the rate control mode to use.
3053
3054           Possible modes:
3055
3056           cqp Constant quantizer: use fixed values of qindex (dependent on
3057               the frame type) throughout the stream.  This mode is the
3058               default.
3059
3060           vbr Variable bitrate: use a target bitrate for the whole stream.
3061
3062           cvbr
3063               Constrained variable bitrate: use a target bitrate for each
3064               GOP.
3065
3066       qmax
3067           Set the maximum quantizer to use when using a bitrate mode.
3068
3069       qmin
3070           Set the minimum quantizer to use when using a bitrate mode.
3071
3072       qp  Set the quantizer used in cqp rate control mode (0-63).
3073
3074       sc_detection
3075           Enable scene change detection.
3076
3077       la_depth
3078           Set number of frames to look ahead (0-120).
3079
3080       preset
3081           Set the quality-speed tradeoff, in the range 0 to 8.  Higher values
3082           are faster but lower quality.  Defaults to 8 (highest speed).
3083
3084       tile_rows
3085           Set log2 of the number of rows of tiles to use (0-6).
3086
3087       tile_columns
3088           Set log2 of the number of columns of tiles to use (0-4).
3089
3090   libkvazaar
3091       Kvazaar H.265/HEVC encoder.
3092
3093       Requires the presence of the libkvazaar headers and library during
3094       configuration. You need to explicitly configure the build with
3095       --enable-libkvazaar.
3096
3097       Options
3098
3099       b   Set target video bitrate in bit/s and enable rate control.
3100
3101       kvazaar-params
3102           Set kvazaar parameters as a list of name=value pairs separated by
3103           commas (,). See kvazaar documentation for a list of options.
3104
3105   libopenh264
3106       Cisco libopenh264 H.264/MPEG-4 AVC encoder wrapper.
3107
3108       This encoder requires the presence of the libopenh264 headers and
3109       library during configuration. You need to explicitly configure the
3110       build with "--enable-libopenh264". The library is detected using pkg-
3111       config.
3112
3113       For more information about the library see <http://www.openh264.org>.
3114
3115       Options
3116
3117       The following FFmpeg global options affect the configurations of the
3118       libopenh264 encoder.
3119
3120       b   Set the bitrate (as a number of bits per second).
3121
3122       g   Set the GOP size.
3123
3124       maxrate
3125           Set the max bitrate (as a number of bits per second).
3126
3127       flags +global_header
3128           Set global header in the bitstream.
3129
3130       slices
3131           Set the number of slices, used in parallelized encoding. Default
3132           value is 0. This is only used when slice_mode is set to fixed.
3133
3134       slice_mode
3135           Set slice mode. Can assume one of the following possible values:
3136
3137           fixed
3138               a fixed number of slices
3139
3140           rowmb
3141               one slice per row of macroblocks
3142
3143           auto
3144               automatic number of slices according to number of threads
3145
3146           dyn dynamic slicing
3147
3148           Default value is auto.
3149
3150       loopfilter
3151           Enable loop filter, if set to 1 (automatically enabled). To disable
3152           set a value of 0.
3153
3154       profile
3155           Set profile restrictions. If set to the value of main enable CABAC
3156           (set the "SEncParamExt.iEntropyCodingModeFlag" flag to 1).
3157
3158       max_nal_size
3159           Set maximum NAL size in bytes.
3160
3161       allow_skip_frames
3162           Allow skipping frames to hit the target bitrate if set to 1.
3163
3164   libtheora
3165       libtheora Theora encoder wrapper.
3166
3167       Requires the presence of the libtheora headers and library during
3168       configuration. You need to explicitly configure the build with
3169       "--enable-libtheora".
3170
3171       For more information about the libtheora project see
3172       <http://www.theora.org/>.
3173
3174       Options
3175
3176       The following global options are mapped to internal libtheora options
3177       which affect the quality and the bitrate of the encoded stream.
3178
3179       b   Set the video bitrate in bit/s for CBR (Constant Bit Rate) mode.
3180           In case VBR (Variable Bit Rate) mode is enabled this option is
3181           ignored.
3182
3183       flags
3184           Used to enable constant quality mode (VBR) encoding through the
3185           qscale flag, and to enable the "pass1" and "pass2" modes.
3186
3187       g   Set the GOP size.
3188
3189       global_quality
3190           Set the global quality as an integer in lambda units.
3191
3192           Only relevant when VBR mode is enabled with "flags +qscale". The
3193           value is converted to QP units by dividing it by "FF_QP2LAMBDA",
3194           clipped in the [0 - 10] range, and then multiplied by 6.3 to get a
3195           value in the native libtheora range [0-63]. A higher value
3196           corresponds to a higher quality.
3197
3198       q   Enable VBR mode when set to a non-negative value, and set constant
3199           quality value as a double floating point value in QP units.
3200
3201           The value is clipped in the [0-10] range, and then multiplied by
3202           6.3 to get a value in the native libtheora range [0-63].
3203
3204           This option is valid only using the ffmpeg command-line tool. For
3205           library interface users, use global_quality.
3206
3207       Examples
3208
3209       •   Set maximum constant quality (VBR) encoding with ffmpeg:
3210
3211                   ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg
3212
3213       •   Use ffmpeg to convert a CBR 1000 kbps Theora video stream:
3214
3215                   ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg
3216
3217   libvpx
3218       VP8/VP9 format supported through libvpx.
3219
3220       Requires the presence of the libvpx headers and library during
3221       configuration.  You need to explicitly configure the build with
3222       "--enable-libvpx".
3223
3224       Options
3225
3226       The following options are supported by the libvpx wrapper. The
3227       vpxenc-equivalent options or values are listed in parentheses for easy
3228       migration.
3229
3230       To reduce the duplication of documentation, only the private options
3231       and some others requiring special attention are documented here. For
3232       the documentation of the undocumented generic options, see the Codec
3233       Options chapter.
3234
3235       To get more documentation of the libvpx options, invoke the command
3236       ffmpeg -h encoder=libvpx, ffmpeg -h encoder=libvpx-vp9 or vpxenc
3237       --help. Further information is available in the libvpx API
3238       documentation.
3239
3240       b (target-bitrate)
3241           Set bitrate in bits/s. Note that FFmpeg's b option is expressed in
3242           bits/s, while vpxenc's target-bitrate is in kilobits/s.
3243
3244       g (kf-max-dist)
3245       keyint_min (kf-min-dist)
3246       qmin (min-q)
3247       qmax (max-q)
3248       bufsize (buf-sz, buf-optimal-sz)
3249           Set ratecontrol buffer size (in bits). Note vpxenc's options are
3250           specified in milliseconds, the libvpx wrapper converts this value
3251           as follows: "buf-sz = bufsize * 1000 / bitrate", "buf-optimal-sz =
3252           bufsize * 1000 / bitrate * 5 / 6".
3253
3254       rc_init_occupancy (buf-initial-sz)
3255           Set number of bits which should be loaded into the rc buffer before
3256           decoding starts. Note vpxenc's option is specified in milliseconds,
3257           the libvpx wrapper converts this value as follows:
3258           "rc_init_occupancy * 1000 / bitrate".
3259
3260       undershoot-pct
3261           Set datarate undershoot (min) percentage of the target bitrate.
3262
3263       overshoot-pct
3264           Set datarate overshoot (max) percentage of the target bitrate.
3265
3266       skip_threshold (drop-frame)
3267       qcomp (bias-pct)
3268       maxrate (maxsection-pct)
3269           Set GOP max bitrate in bits/s. Note vpxenc's option is specified as
3270           a percentage of the target bitrate, the libvpx wrapper converts
3271           this value as follows: "(maxrate * 100 / bitrate)".
3272
3273       minrate (minsection-pct)
3274           Set GOP min bitrate in bits/s. Note vpxenc's option is specified as
3275           a percentage of the target bitrate, the libvpx wrapper converts
3276           this value as follows: "(minrate * 100 / bitrate)".
3277
3278       minrate, maxrate, b end-usage=cbr
3279           "(minrate == maxrate == bitrate)".
3280
3281       crf (end-usage=cq, cq-level)
3282       tune (tune)
3283           psnr (psnr)
3284           ssim (ssim)
3285       quality, deadline (deadline)
3286           best
3287               Use best quality deadline. Poorly named and quite slow, this
3288               option should be avoided as it may give worse quality output
3289               than good.
3290
3291           good
3292               Use good quality deadline. This is a good trade-off between
3293               speed and quality when used with the cpu-used option.
3294
3295           realtime
3296               Use realtime quality deadline.
3297
3298       speed, cpu-used (cpu-used)
3299           Set quality/speed ratio modifier. Higher values speed up the encode
3300           at the cost of quality.
3301
3302       nr (noise-sensitivity)
3303       static-thresh
3304           Set a change threshold on blocks below which they will be skipped
3305           by the encoder.
3306
3307       slices (token-parts)
3308           Note that FFmpeg's slices option gives the total number of
3309           partitions, while vpxenc's token-parts is given as
3310           "log2(partitions)".
3311
3312       max-intra-rate
3313           Set maximum I-frame bitrate as a percentage of the target bitrate.
3314           A value of 0 means unlimited.
3315
3316       force_key_frames
3317           "VPX_EFLAG_FORCE_KF"
3318
3319       Alternate reference frame related
3320           auto-alt-ref
3321               Enable use of alternate reference frames (2-pass only).  Values
3322               greater than 1 enable multi-layer alternate reference frames
3323               (VP9 only).
3324
3325           arnr-maxframes
3326               Set altref noise reduction max frame count.
3327
3328           arnr-type
3329               Set altref noise reduction filter type: backward, forward,
3330               centered.
3331
3332           arnr-strength
3333               Set altref noise reduction filter strength.
3334
3335           rc-lookahead, lag-in-frames (lag-in-frames)
3336               Set number of frames to look ahead for frametype and
3337               ratecontrol.
3338
3339       error-resilient
3340           Enable error resiliency features.
3341
3342       sharpness integer
3343           Increase sharpness at the expense of lower PSNR.  The valid range
3344           is [0, 7].
3345
3346       ts-parameters
3347           Sets the temporal scalability configuration using a :-separated
3348           list of key=value pairs. For example, to specify temporal
3349           scalability parameters with "ffmpeg":
3350
3351                   ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
3352                   ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
3353                   ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
3354
3355           Below is a brief explanation of each of the parameters, please
3356           refer to "struct vpx_codec_enc_cfg" in "vpx/vpx_encoder.h" for more
3357           details.
3358
3359           ts_number_layers
3360               Number of temporal coding layers.
3361
3362           ts_target_bitrate
3363               Target bitrate for each temporal layer (in kbps).  (bitrate
3364               should be inclusive of the lower temporal layer).
3365
3366           ts_rate_decimator
3367               Frame rate decimation factor for each temporal layer.
3368
3369           ts_periodicity
3370               Length of the sequence defining frame temporal layer
3371               membership.
3372
3373           ts_layer_id
3374               Template defining the membership of frames to temporal layers.
3375
3376           ts_layering_mode
3377               (optional) Selecting the temporal structure from a set of pre-
3378               defined temporal layering modes.  Currently supports the
3379               following options.
3380
3381               0   No temporal layering flags are provided internally, relies
3382                   on flags being passed in using "metadata" field in
3383                   "AVFrame" with following keys.
3384
3385                   vp8-flags
3386                       Sets the flags passed into the encoder to indicate the
3387                       referencing scheme for the current frame.  Refer to
3388                       function "vpx_codec_encode" in "vpx/vpx_encoder.h" for
3389                       more details.
3390
3391                   temporal_id
3392                       Explicitly sets the temporal id of the current frame to
3393                       encode.
3394
3395               2   Two temporal layers. 0-1...
3396
3397               3   Three temporal layers. 0-2-1-2...; with single reference
3398                   frame.
3399
3400               4   Same as option "3", except there is a dependency between
3401                   the two temporal layer 2 frames within the temporal period.
3402
3403       VP9-specific options
3404           lossless
3405               Enable lossless mode.
3406
3407           tile-columns
3408               Set number of tile columns to use. Note this is given as
3409               "log2(tile_columns)". For example, 8 tile columns would be
3410               requested by setting the tile-columns option to 3.
3411
3412           tile-rows
3413               Set number of tile rows to use. Note this is given as
3414               "log2(tile_rows)".  For example, 4 tile rows would be requested
3415               by setting the tile-rows option to 2.
3416
3417           frame-parallel
3418               Enable frame parallel decodability features.
3419
3420           aq-mode
3421               Set adaptive quantization mode (0: off (default), 1: variance
3422               2: complexity, 3: cyclic refresh, 4: equator360).
3423
3424           colorspace color-space
3425               Set input color space. The VP9 bitstream supports signaling the
3426               following colorspaces:
3427
3428               rgb sRGB
3429               bt709 bt709
3430               unspecified unknown
3431               bt470bg bt601
3432               smpte170m smpte170
3433               smpte240m smpte240
3434               bt2020_ncl bt2020
3435           row-mt boolean
3436               Enable row based multi-threading.
3437
3438           tune-content
3439               Set content type: default (0), screen (1), film (2).
3440
3441           corpus-complexity
3442               Corpus VBR mode is a variant of standard VBR where the
3443               complexity distribution midpoint is passed in rather than
3444               calculated for a specific clip or chunk.
3445
3446               The valid range is [0, 10000]. 0 (default) uses standard VBR.
3447
3448           enable-tpl boolean
3449               Enable temporal dependency model.
3450
3451           ref-frame-config
3452               Using per-frame metadata, set members of the structure
3453               "vpx_svc_ref_frame_config_t" in "vpx/vp8cx.h" to fine-control
3454               referencing schemes and frame buffer management.  Use a
3455               :-separated list of key=value pairs.  For example,
3456
3457                       av_dict_set(&av_frame->metadata, "ref-frame-config", \
3458                       "rfc_update_buffer_slot=7:rfc_lst_fb_idx=0:rfc_gld_fb_idx=1:rfc_alt_fb_idx=2:rfc_reference_last=0:rfc_reference_golden=0:rfc_reference_alt_ref=0");
3459
3460               rfc_update_buffer_slot
3461                   Indicates the buffer slot number to update
3462
3463               rfc_update_last
3464                   Indicates whether to update the LAST frame
3465
3466               rfc_update_golden
3467                   Indicates whether to update GOLDEN frame
3468
3469               rfc_update_alt_ref
3470                   Indicates whether to update ALT_REF frame
3471
3472               rfc_lst_fb_idx
3473                   LAST frame buffer index
3474
3475               rfc_gld_fb_idx
3476                   GOLDEN frame buffer index
3477
3478               rfc_alt_fb_idx
3479                   ALT_REF frame buffer index
3480
3481               rfc_reference_last
3482                   Indicates whether to reference LAST frame
3483
3484               rfc_reference_golden
3485                   Indicates whether to reference GOLDEN frame
3486
3487               rfc_reference_alt_ref
3488                   Indicates whether to reference ALT_REF frame
3489
3490               rfc_reference_duration
3491                   Indicates frame duration
3492
3493       For more information about libvpx see: <http://www.webmproject.org/>
3494
3495   libwebp
3496       libwebp WebP Image encoder wrapper
3497
3498       libwebp is Google's official encoder for WebP images. It can encode in
3499       either lossy or lossless mode. Lossy images are essentially a wrapper
3500       around a VP8 frame. Lossless images are a separate codec developed by
3501       Google.
3502
3503       Pixel Format
3504
3505       Currently, libwebp only supports YUV420 for lossy and RGB for lossless
3506       due to limitations of the format and libwebp. Alpha is supported for
3507       either mode.  Because of API limitations, if RGB is passed in when
3508       encoding lossy or YUV is passed in for encoding lossless, the pixel
3509       format will automatically be converted using functions from libwebp.
3510       This is not ideal and is done only for convenience.
3511
3512       Options
3513
3514       -lossless boolean
3515           Enables/Disables use of lossless mode. Default is 0.
3516
3517       -compression_level integer
3518           For lossy, this is a quality/speed tradeoff. Higher values give
3519           better quality for a given size at the cost of increased encoding
3520           time. For lossless, this is a size/speed tradeoff. Higher values
3521           give smaller size at the cost of increased encoding time. More
3522           specifically, it controls the number of extra algorithms and
3523           compression tools used, and varies the combination of these tools.
3524           This maps to the method option in libwebp. The valid range is 0 to
3525           6.  Default is 4.
3526
3527       -qscale float
3528           For lossy encoding, this controls image quality, 0 to 100. For
3529           lossless encoding, this controls the effort and time spent at
3530           compressing more. The default value is 75. Note that for usage via
3531           libavcodec, this option is called global_quality and must be
3532           multiplied by FF_QP2LAMBDA.
3533
3534       -preset type
3535           Configuration preset. This does some automatic settings based on
3536           the general type of the image.
3537
3538           none
3539               Do not use a preset.
3540
3541           default
3542               Use the encoder default.
3543
3544           picture
3545               Digital picture, like portrait, inner shot
3546
3547           photo
3548               Outdoor photograph, with natural lighting
3549
3550           drawing
3551               Hand or line drawing, with high-contrast details
3552
3553           icon
3554               Small-sized colorful images
3555
3556           text
3557               Text-like
3558
3559   libx264, libx264rgb
3560       x264 H.264/MPEG-4 AVC encoder wrapper.
3561
3562       This encoder requires the presence of the libx264 headers and library
3563       during configuration. You need to explicitly configure the build with
3564       "--enable-libx264".
3565
3566       libx264 supports an impressive number of features, including 8x8 and
3567       4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
3568       entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
3569       for detail retention (adaptive quantization, psy-RD, psy-trellis).
3570
3571       Many libx264 encoder options are mapped to FFmpeg global codec options,
3572       while unique encoder options are provided through private options.
3573       Additionally the x264opts and x264-params private options allows one to
3574       pass a list of key=value tuples as accepted by the libx264
3575       "x264_param_parse" function.
3576
3577       The x264 project website is at
3578       <http://www.videolan.org/developers/x264.html>.
3579
3580       The libx264rgb encoder is the same as libx264, except it accepts packed
3581       RGB pixel formats as input instead of YUV.
3582
3583       Supported Pixel Formats
3584
3585       x264 supports 8- to 10-bit color spaces. The exact bit depth is
3586       controlled at x264's configure time.
3587
3588       Options
3589
3590       The following options are supported by the libx264 wrapper. The
3591       x264-equivalent options or values are listed in parentheses for easy
3592       migration.
3593
3594       To reduce the duplication of documentation, only the private options
3595       and some others requiring special attention are documented here. For
3596       the documentation of the undocumented generic options, see the Codec
3597       Options chapter.
3598
3599       To get a more accurate and extensive documentation of the libx264
3600       options, invoke the command x264 --fullhelp or consult the libx264
3601       documentation.
3602
3603       b (bitrate)
3604           Set bitrate in bits/s. Note that FFmpeg's b option is expressed in
3605           bits/s, while x264's bitrate is in kilobits/s.
3606
3607       bf (bframes)
3608       g (keyint)
3609       qmin (qpmin)
3610           Minimum quantizer scale.
3611
3612       qmax (qpmax)
3613           Maximum quantizer scale.
3614
3615       qdiff (qpstep)
3616           Maximum difference between quantizer scales.
3617
3618       qblur (qblur)
3619           Quantizer curve blur
3620
3621       qcomp (qcomp)
3622           Quantizer curve compression factor
3623
3624       refs (ref)
3625           Number of reference frames each P-frame can use. The range is from
3626           0-16.
3627
3628       sc_threshold (scenecut)
3629           Sets the threshold for the scene change detection.
3630
3631       trellis (trellis)
3632           Performs Trellis quantization to increase efficiency. Enabled by
3633           default.
3634
3635       nr  (nr)
3636       me_range (merange)
3637           Maximum range of the motion search in pixels.
3638
3639       me_method (me)
3640           Set motion estimation method. Possible values in the decreasing
3641           order of speed:
3642
3643           dia (dia)
3644           epzs (dia)
3645               Diamond search with radius 1 (fastest). epzs is an alias for
3646               dia.
3647
3648           hex (hex)
3649               Hexagonal search with radius 2.
3650
3651           umh (umh)
3652               Uneven multi-hexagon search.
3653
3654           esa (esa)
3655               Exhaustive search.
3656
3657           tesa (tesa)
3658               Hadamard exhaustive search (slowest).
3659
3660       forced-idr
3661           Normally, when forcing a I-frame type, the encoder can select any
3662           type of I-frame. This option forces it to choose an IDR-frame.
3663
3664       subq (subme)
3665           Sub-pixel motion estimation method.
3666
3667       b_strategy (b-adapt)
3668           Adaptive B-frame placement decision algorithm. Use only on first-
3669           pass.
3670
3671       keyint_min (min-keyint)
3672           Minimum GOP size.
3673
3674       coder
3675           Set entropy encoder. Possible values:
3676
3677           ac  Enable CABAC.
3678
3679           vlc Enable CAVLC and disable CABAC. It generates the same effect as
3680               x264's --no-cabac option.
3681
3682       cmp Set full pixel motion estimation comparison algorithm. Possible
3683           values:
3684
3685           chroma
3686               Enable chroma in motion estimation.
3687
3688           sad Ignore chroma in motion estimation. It generates the same
3689               effect as x264's --no-chroma-me option.
3690
3691       threads (threads)
3692           Number of encoding threads.
3693
3694       thread_type
3695           Set multithreading technique. Possible values:
3696
3697           slice
3698               Slice-based multithreading. It generates the same effect as
3699               x264's --sliced-threads option.
3700
3701           frame
3702               Frame-based multithreading.
3703
3704       flags
3705           Set encoding flags. It can be used to disable closed GOP and enable
3706           open GOP by setting it to "-cgop". The result is similar to the
3707           behavior of x264's --open-gop option.
3708
3709       rc_init_occupancy (vbv-init)
3710       preset (preset)
3711           Set the encoding preset.
3712
3713       tune (tune)
3714           Set tuning of the encoding params.
3715
3716       profile (profile)
3717           Set profile restrictions.
3718
3719       fastfirstpass
3720           Enable fast settings when encoding first pass, when set to 1. When
3721           set to 0, it has the same effect of x264's --slow-firstpass option.
3722
3723       crf (crf)
3724           Set the quality for constant quality mode.
3725
3726       crf_max (crf-max)
3727           In CRF mode, prevents VBV from lowering quality beyond this point.
3728
3729       qp (qp)
3730           Set constant quantization rate control method parameter.
3731
3732       aq-mode (aq-mode)
3733           Set AQ method. Possible values:
3734
3735           none (0)
3736               Disabled.
3737
3738           variance (1)
3739               Variance AQ (complexity mask).
3740
3741           autovariance (2)
3742               Auto-variance AQ (experimental).
3743
3744       aq-strength (aq-strength)
3745           Set AQ strength, reduce blocking and blurring in flat and textured
3746           areas.
3747
3748       psy Use psychovisual optimizations when set to 1. When set to 0, it has
3749           the same effect as x264's --no-psy option.
3750
3751       psy-rd  (psy-rd)
3752           Set strength of psychovisual optimization, in psy-rd:psy-trellis
3753           format.
3754
3755       rc-lookahead (rc-lookahead)
3756           Set number of frames to look ahead for frametype and ratecontrol.
3757
3758       weightb
3759           Enable weighted prediction for B-frames when set to 1. When set to
3760           0, it has the same effect as x264's --no-weightb option.
3761
3762       weightp (weightp)
3763           Set weighted prediction method for P-frames. Possible values:
3764
3765           none (0)
3766               Disabled
3767
3768           simple (1)
3769               Enable only weighted refs
3770
3771           smart (2)
3772               Enable both weighted refs and duplicates
3773
3774       ssim (ssim)
3775           Enable calculation and printing SSIM stats after the encoding.
3776
3777       intra-refresh (intra-refresh)
3778           Enable the use of Periodic Intra Refresh instead of IDR frames when
3779           set to 1.
3780
3781       avcintra-class (class)
3782           Configure the encoder to generate AVC-Intra.  Valid values are
3783           50,100 and 200
3784
3785       bluray-compat (bluray-compat)
3786           Configure the encoder to be compatible with the bluray standard.
3787           It is a shorthand for setting "bluray-compat=1 force-cfr=1".
3788
3789       b-bias (b-bias)
3790           Set the influence on how often B-frames are used.
3791
3792       b-pyramid (b-pyramid)
3793           Set method for keeping of some B-frames as references. Possible
3794           values:
3795
3796           none (none)
3797               Disabled.
3798
3799           strict (strict)
3800               Strictly hierarchical pyramid.
3801
3802           normal (normal)
3803               Non-strict (not Blu-ray compatible).
3804
3805       mixed-refs
3806           Enable the use of one reference per partition, as opposed to one
3807           reference per macroblock when set to 1. When set to 0, it has the
3808           same effect as x264's --no-mixed-refs option.
3809
3810       8x8dct
3811           Enable adaptive spatial transform (high profile 8x8 transform) when
3812           set to 1. When set to 0, it has the same effect as x264's
3813           --no-8x8dct option.
3814
3815       fast-pskip
3816           Enable early SKIP detection on P-frames when set to 1. When set to
3817           0, it has the same effect as x264's --no-fast-pskip option.
3818
3819       aud (aud)
3820           Enable use of access unit delimiters when set to 1.
3821
3822       mbtree
3823           Enable use macroblock tree ratecontrol when set to 1. When set to
3824           0, it has the same effect as x264's --no-mbtree option.
3825
3826       deblock (deblock)
3827           Set loop filter parameters, in alpha:beta form.
3828
3829       cplxblur (cplxblur)
3830           Set fluctuations reduction in QP (before curve compression).
3831
3832       partitions (partitions)
3833           Set partitions to consider as a comma-separated list of. Possible
3834           values in the list:
3835
3836           p8x8
3837               8x8 P-frame partition.
3838
3839           p4x4
3840               4x4 P-frame partition.
3841
3842           b8x8
3843               4x4 B-frame partition.
3844
3845           i8x8
3846               8x8 I-frame partition.
3847
3848           i4x4
3849               4x4 I-frame partition.  (Enabling p4x4 requires p8x8 to be
3850               enabled. Enabling i8x8 requires adaptive spatial transform
3851               (8x8dct option) to be enabled.)
3852
3853           none (none)
3854               Do not consider any partitions.
3855
3856           all (all)
3857               Consider every partition.
3858
3859       direct-pred (direct)
3860           Set direct MV prediction mode. Possible values:
3861
3862           none (none)
3863               Disable MV prediction.
3864
3865           spatial (spatial)
3866               Enable spatial predicting.
3867
3868           temporal (temporal)
3869               Enable temporal predicting.
3870
3871           auto (auto)
3872               Automatically decided.
3873
3874       slice-max-size (slice-max-size)
3875           Set the limit of the size of each slice in bytes. If not specified
3876           but RTP payload size (ps) is specified, that is used.
3877
3878       stats (stats)
3879           Set the file name for multi-pass stats.
3880
3881       nal-hrd (nal-hrd)
3882           Set signal HRD information (requires vbv-bufsize to be set).
3883           Possible values:
3884
3885           none (none)
3886               Disable HRD information signaling.
3887
3888           vbr (vbr)
3889               Variable bit rate.
3890
3891           cbr (cbr)
3892               Constant bit rate (not allowed in MP4 container).
3893
3894       x264opts (N.A.)
3895           Set any x264 option, see x264 --fullhelp for a list.
3896
3897           Argument is a list of key=value couples separated by ":". In filter
3898           and psy-rd options that use ":" as a separator themselves, use ","
3899           instead. They accept it as well since long ago but this is kept
3900           undocumented for some reason.
3901
3902           For example to specify libx264 encoding options with ffmpeg:
3903
3904                   ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
3905
3906       a53cc boolean
3907           Import closed captions (which must be ATSC compatible format) into
3908           output.  Only the mpeg2 and h264 decoders provide these. Default is
3909           1 (on).
3910
3911       udu_sei boolean
3912           Import user data unregistered SEI if available into output. Default
3913           is 0 (off).
3914
3915       x264-params (N.A.)
3916           Override the x264 configuration using a :-separated list of
3917           key=value parameters.
3918
3919           This option is functionally the same as the x264opts, but is
3920           duplicated for compatibility with the Libav fork.
3921
3922           For example to specify libx264 encoding options with ffmpeg:
3923
3924                   ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
3925                   cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
3926                   no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
3927
3928       Encoding ffpresets for common usages are provided so they can be used
3929       with the general presets system (e.g. passing the pre option).
3930
3931   libx265
3932       x265 H.265/HEVC encoder wrapper.
3933
3934       This encoder requires the presence of the libx265 headers and library
3935       during configuration. You need to explicitly configure the build with
3936       --enable-libx265.
3937
3938       Options
3939
3940       b   Sets target video bitrate.
3941
3942       bf
3943       g   Set the GOP size.
3944
3945       keyint_min
3946           Minimum GOP size.
3947
3948       refs
3949           Number of reference frames each P-frame can use. The range is from
3950           1-16.
3951
3952       preset
3953           Set the x265 preset.
3954
3955       tune
3956           Set the x265 tune parameter.
3957
3958       profile
3959           Set profile restrictions.
3960
3961       crf Set the quality for constant quality mode.
3962
3963       qp  Set constant quantization rate control method parameter.
3964
3965       qmin
3966           Minimum quantizer scale.
3967
3968       qmax
3969           Maximum quantizer scale.
3970
3971       qdiff
3972           Maximum difference between quantizer scales.
3973
3974       qblur
3975           Quantizer curve blur
3976
3977       qcomp
3978           Quantizer curve compression factor
3979
3980       i_qfactor
3981       b_qfactor
3982       forced-idr
3983           Normally, when forcing a I-frame type, the encoder can select any
3984           type of I-frame. This option forces it to choose an IDR-frame.
3985
3986       udu_sei boolean
3987           Import user data unregistered SEI if available into output. Default
3988           is 0 (off).
3989
3990       x265-params
3991           Set x265 options using a list of key=value couples separated by
3992           ":". See x265 --help for a list of options.
3993
3994           For example to specify libx265 encoding options with -x265-params:
3995
3996                   ffmpeg -i input -c:v libx265 -x265-params crf=26:psy-rd=1 output.mp4
3997
3998   libxavs2
3999       xavs2 AVS2-P2/IEEE1857.4 encoder wrapper.
4000
4001       This encoder requires the presence of the libxavs2 headers and library
4002       during configuration. You need to explicitly configure the build with
4003       --enable-libxavs2.
4004
4005       The following standard libavcodec options are used:
4006
4007b / bit_rate
4008
4009g / gop_size
4010
4011bf / max_b_frames
4012
4013       The encoder also has its own specific options:
4014
4015       Options
4016
4017       lcu_row_threads
4018           Set the number of parallel threads for rows from 1 to 8 (default
4019           5).
4020
4021       initial_qp
4022           Set the xavs2 quantization parameter from 1 to 63 (default 34).
4023           This is used to set the initial qp for the first frame.
4024
4025       qp  Set the xavs2 quantization parameter from 1 to 63 (default 34).
4026           This is used to set the qp value under constant-QP mode.
4027
4028       max_qp
4029           Set the max qp for rate control from 1 to 63 (default 55).
4030
4031       min_qp
4032           Set the min qp for rate control from 1 to 63 (default 20).
4033
4034       speed_level
4035           Set the Speed level from 0 to 9 (default 0). Higher is better but
4036           slower.
4037
4038       log_level
4039           Set the log level from -1 to 3 (default 0). -1: none, 0: error, 1:
4040           warning, 2: info, 3: debug.
4041
4042       xavs2-params
4043           Set xavs2 options using a list of key=value couples separated by
4044           ":".
4045
4046           For example to specify libxavs2 encoding options with
4047           -xavs2-params:
4048
4049                   ffmpeg -i input -c:v libxavs2 -xavs2-params RdoqLevel=0 output.avs2
4050
4051   libxvid
4052       Xvid MPEG-4 Part 2 encoder wrapper.
4053
4054       This encoder requires the presence of the libxvidcore headers and
4055       library during configuration. You need to explicitly configure the
4056       build with "--enable-libxvid --enable-gpl".
4057
4058       The native "mpeg4" encoder supports the MPEG-4 Part 2 format, so users
4059       can encode to this format without this library.
4060
4061       Options
4062
4063       The following options are supported by the libxvid wrapper. Some of the
4064       following options are listed but are not documented, and correspond to
4065       shared codec options. See the Codec Options chapter for their
4066       documentation. The other shared options which are not listed have no
4067       effect for the libxvid encoder.
4068
4069       b
4070       g
4071       qmin
4072       qmax
4073       mpeg_quant
4074       threads
4075       bf
4076       b_qfactor
4077       b_qoffset
4078       flags
4079           Set specific encoding flags. Possible values:
4080
4081           mv4 Use four motion vector by macroblock.
4082
4083           aic Enable high quality AC prediction.
4084
4085           gray
4086               Only encode grayscale.
4087
4088           gmc Enable the use of global motion compensation (GMC).
4089
4090           qpel
4091               Enable quarter-pixel motion compensation.
4092
4093           cgop
4094               Enable closed GOP.
4095
4096           global_header
4097               Place global headers in extradata instead of every keyframe.
4098
4099       trellis
4100       me_method
4101           Set motion estimation method. Possible values in decreasing order
4102           of speed and increasing order of quality:
4103
4104           zero
4105               Use no motion estimation (default).
4106
4107           phods
4108           x1
4109           log Enable advanced diamond zonal search for 16x16 blocks and half-
4110               pixel refinement for 16x16 blocks. x1 and log are aliases for
4111               phods.
4112
4113           epzs
4114               Enable all of the things described above, plus advanced diamond
4115               zonal search for 8x8 blocks, half-pixel refinement for 8x8
4116               blocks, and motion estimation on chroma planes.
4117
4118           full
4119               Enable all of the things described above, plus extended 16x16
4120               and 8x8 blocks search.
4121
4122       mbd Set macroblock decision algorithm. Possible values in the
4123           increasing order of quality:
4124
4125           simple
4126               Use macroblock comparing function algorithm (default).
4127
4128           bits
4129               Enable rate distortion-based half pixel and quarter pixel
4130               refinement for 16x16 blocks.
4131
4132           rd  Enable all of the things described above, plus rate distortion-
4133               based half pixel and quarter pixel refinement for 8x8 blocks,
4134               and rate distortion-based search using square pattern.
4135
4136       lumi_aq
4137           Enable lumi masking adaptive quantization when set to 1. Default is
4138           0 (disabled).
4139
4140       variance_aq
4141           Enable variance adaptive quantization when set to 1. Default is 0
4142           (disabled).
4143
4144           When combined with lumi_aq, the resulting quality will not be
4145           better than any of the two specified individually. In other words,
4146           the resulting quality will be the worse one of the two effects.
4147
4148       ssim
4149           Set structural similarity (SSIM) displaying method. Possible
4150           values:
4151
4152           off Disable displaying of SSIM information.
4153
4154           avg Output average SSIM at the end of encoding to stdout. The
4155               format of showing the average SSIM is:
4156
4157                       Average SSIM: %f
4158
4159               For users who are not familiar with C, %f means a float number,
4160               or a decimal (e.g. 0.939232).
4161
4162           frame
4163               Output both per-frame SSIM data during encoding and average
4164               SSIM at the end of encoding to stdout. The format of per-frame
4165               information is:
4166
4167                              SSIM: avg: %1.3f min: %1.3f max: %1.3f
4168
4169               For users who are not familiar with C, %1.3f means a float
4170               number rounded to 3 digits after the dot (e.g. 0.932).
4171
4172       ssim_acc
4173           Set SSIM accuracy. Valid options are integers within the range of
4174           0-4, while 0 gives the most accurate result and 4 computes the
4175           fastest.
4176
4177   MediaFoundation
4178       This provides wrappers to encoders (both audio and video) in the
4179       MediaFoundation framework. It can access both SW and HW encoders.
4180       Video encoders can take input in either of nv12 or yuv420p form (some
4181       encoders support both, some support only either - in practice, nv12 is
4182       the safer choice, especially among HW encoders).
4183
4184   mpeg2
4185       MPEG-2 video encoder.
4186
4187       Options
4188
4189       profile
4190           Select the mpeg2 profile to encode:
4191
4192           422
4193           high
4194           ss  Spatially Scalable
4195
4196           snr SNR Scalable
4197
4198           main
4199           simple
4200       level
4201           Select the mpeg2 level to encode:
4202
4203           high
4204           high1440
4205           main
4206           low
4207       seq_disp_ext integer
4208           Specifies if the encoder should write a sequence_display_extension
4209           to the output.
4210
4211           -1
4212           auto
4213               Decide automatically to write it or not (this is the default)
4214               by checking if the data to be written is different from the
4215               default or unspecified values.
4216
4217           0
4218           never
4219               Never write it.
4220
4221           1
4222           always
4223               Always write it.
4224
4225       video_format integer
4226           Specifies the video_format written into the sequence display
4227           extension indicating the source of the video pictures. The default
4228           is unspecified, can be component, pal, ntsc, secam or mac.  For
4229           maximum compatibility, use component.
4230
4231       a53cc boolean
4232           Import closed captions (which must be ATSC compatible format) into
4233           output.  Default is 1 (on).
4234
4235   png
4236       PNG image encoder.
4237
4238       Private options
4239
4240       dpi integer
4241           Set physical density of pixels, in dots per inch, unset by default
4242
4243       dpm integer
4244           Set physical density of pixels, in dots per meter, unset by default
4245
4246   ProRes
4247       Apple ProRes encoder.
4248
4249       FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
4250       The used encoder can be chosen with the "-vcodec" option.
4251
4252       Private Options for prores-ks
4253
4254       profile integer
4255           Select the ProRes profile to encode
4256
4257           proxy
4258           lt
4259           standard
4260           hq
4261           4444
4262           4444xq
4263       quant_mat integer
4264           Select quantization matrix.
4265
4266           auto
4267           default
4268           proxy
4269           lt
4270           standard
4271           hq
4272
4273           If set to auto, the matrix matching the profile will be picked.  If
4274           not set, the matrix providing the highest quality, default, will be
4275           picked.
4276
4277       bits_per_mb integer
4278           How many bits to allot for coding one macroblock. Different
4279           profiles use between 200 and 2400 bits per macroblock, the maximum
4280           is 8000.
4281
4282       mbs_per_slice integer
4283           Number of macroblocks in each slice (1-8); the default value (8)
4284           should be good in almost all situations.
4285
4286       vendor string
4287           Override the 4-byte vendor ID.  A custom vendor ID like apl0 would
4288           claim the stream was produced by the Apple encoder.
4289
4290       alpha_bits integer
4291           Specify number of bits for alpha component.  Possible values are 0,
4292           8 and 16.  Use 0 to disable alpha plane coding.
4293
4294       Speed considerations
4295
4296       In the default mode of operation the encoder has to honor frame
4297       constraints (i.e. not produce frames with size bigger than requested)
4298       while still making output picture as good as possible.  A frame
4299       containing a lot of small details is harder to compress and the encoder
4300       would spend more time searching for appropriate quantizers for each
4301       slice.
4302
4303       Setting a higher bits_per_mb limit will improve the speed.
4304
4305       For the fastest encoding speed set the qscale parameter (4 is the
4306       recommended value) and do not set a size constraint.
4307
4308   QSV encoders
4309       The family of Intel QuickSync Video encoders (MPEG-2, H.264, HEVC,
4310       JPEG/MJPEG and VP9)
4311
4312       The ratecontrol method is selected as follows:
4313
4314       •   When global_quality is specified, a quality-based mode is used.
4315           Specifically this means either
4316
4317           -   CQP - constant quantizer scale, when the qscale codec flag is
4318               also set (the -qscale ffmpeg option).
4319
4320           -   LA_ICQ - intelligent constant quality with lookahead, when the
4321               look_ahead option is also set.
4322
4323           -   ICQ -- intelligent constant quality otherwise. For the ICQ
4324               modes, global quality range is 1 to 51, with 1 being the best
4325               quality.
4326
4327       •   Otherwise, a bitrate-based mode is used. For all of those, you
4328           should specify at least the desired average bitrate with the b
4329           option.
4330
4331           -   LA - VBR with lookahead, when the look_ahead option is
4332               specified.
4333
4334           -   VCM - video conferencing mode, when the vcm option is set.
4335
4336           -   CBR - constant bitrate, when maxrate is specified and equal to
4337               the average bitrate.
4338
4339           -   VBR - variable bitrate, when maxrate is specified, but is
4340               higher than the average bitrate.
4341
4342           -   AVBR - average VBR mode, when maxrate is not specified. This
4343               mode is further configured by the avbr_accuracy and
4344               avbr_convergence options.
4345
4346       Note that depending on your system, a different mode than the one you
4347       specified may be selected by the encoder. Set the verbosity level to
4348       verbose or higher to see the actual settings used by the QSV runtime.
4349
4350       Additional libavcodec global options are mapped to MSDK options as
4351       follows:
4352
4353g/gop_size -> GopPicSize
4354
4355bf/max_b_frames+1 -> GopRefDist
4356
4357rc_init_occupancy/rc_initial_buffer_occupancy -> InitialDelayInKB
4358
4359slices -> NumSlice
4360
4361refs -> NumRefFrame
4362
4363b_strategy/b_frame_strategy -> BRefType
4364
4365cgop/CLOSED_GOP codec flag -> GopOptFlag
4366
4367       •   For the CQP mode, the i_qfactor/i_qoffset and b_qfactor/b_qoffset
4368           set the difference between QPP and QPI, and QPP and QPB
4369           respectively.
4370
4371       •   Setting the coder option to the value vlc will make the H.264
4372           encoder use CAVLC instead of CABAC.
4373
4374   snow
4375       Options
4376
4377       iterative_dia_size
4378           dia size for the iterative motion estimation
4379
4380   VAAPI encoders
4381       Wrappers for hardware encoders accessible via VAAPI.
4382
4383       These encoders only accept input in VAAPI hardware surfaces.  If you
4384       have input in software frames, use the hwupload filter to upload them
4385       to the GPU.
4386
4387       The following standard libavcodec options are used:
4388
4389g / gop_size
4390
4391bf / max_b_frames
4392
4393profile
4394
4395           If not set, this will be determined automatically from the format
4396           of the input frames and the profiles supported by the driver.
4397
4398level
4399
4400b / bit_rate
4401
4402maxrate / rc_max_rate
4403
4404bufsize / rc_buffer_size
4405
4406rc_init_occupancy / rc_initial_buffer_occupancy
4407
4408compression_level
4409
4410           Speed / quality tradeoff: higher values are faster / worse quality.
4411
4412q / global_quality
4413
4414           Size / quality tradeoff: higher values are smaller / worse quality.
4415
4416qmin
4417
4418qmax
4419
4420i_qfactor / i_quant_factor
4421
4422i_qoffset / i_quant_offset
4423
4424b_qfactor / b_quant_factor
4425
4426b_qoffset / b_quant_offset
4427
4428slices
4429
4430       All encoders support the following options:
4431
4432       low_power
4433           Some drivers/platforms offer a second encoder for some codecs
4434           intended to use less power than the default encoder; setting this
4435           option will attempt to use that encoder.  Note that it may support
4436           a reduced feature set, so some other options may not be available
4437           in this mode.
4438
4439       idr_interval
4440           Set the number of normal intra frames between full-refresh (IDR)
4441           frames in open-GOP mode.  The intra frames are still IRAPs, but
4442           will not include global headers and may have non-decodable leading
4443           pictures.
4444
4445       b_depth
4446           Set the B-frame reference depth.  When set to one (the default),
4447           all B-frames will refer only to P- or I-frames.  When set to
4448           greater values multiple layers of B-frames will be present, frames
4449           in each layer only referring to frames in higher layers.
4450
4451       rc_mode
4452           Set the rate control mode to use.  A given driver may only support
4453           a subset of modes.
4454
4455           Possible modes:
4456
4457           auto
4458               Choose the mode automatically based on driver support and the
4459               other options.  This is the default.
4460
4461           CQP Constant-quality.
4462
4463           CBR Constant-bitrate.
4464
4465           VBR Variable-bitrate.
4466
4467           ICQ Intelligent constant-quality.
4468
4469           QVBR
4470               Quality-defined variable-bitrate.
4471
4472           AVBR
4473               Average variable bitrate.
4474
4475       Each encoder also has its own specific options:
4476
4477       h264_vaapi
4478           profile sets the value of profile_idc and the
4479           constraint_set*_flags.  level sets the value of level_idc.
4480
4481           coder
4482               Set entropy encoder (default is cabac).  Possible values:
4483
4484               ac
4485               cabac
4486                   Use CABAC.
4487
4488               vlc
4489               cavlc
4490                   Use CAVLC.
4491
4492           aud Include access unit delimiters in the stream (not included by
4493               default).
4494
4495           sei Set SEI message types to include.  Some combination of the
4496               following values:
4497
4498               identifier
4499                   Include a user_data_unregistered message containing
4500                   information about the encoder.
4501
4502               timing
4503                   Include picture timing parameters (buffering_period and
4504                   pic_timing messages).
4505
4506               recovery_point
4507                   Include recovery points where appropriate (recovery_point
4508                   messages).
4509
4510       hevc_vaapi
4511           profile and level set the values of general_profile_idc and
4512           general_level_idc respectively.
4513
4514           aud Include access unit delimiters in the stream (not included by
4515               default).
4516
4517           tier
4518               Set general_tier_flag.  This may affect the level chosen for
4519               the stream if it is not explicitly specified.
4520
4521           sei Set SEI message types to include.  Some combination of the
4522               following values:
4523
4524               hdr Include HDR metadata if the input frames have it
4525                   (mastering_display_colour_volume and content_light_level
4526                   messages).
4527
4528           tiles
4529               Set the number of tiles to encode the input video with, as
4530               columns x rows.  Larger numbers allow greater parallelism in
4531               both encoding and decoding, but may decrease coding efficiency.
4532
4533       mjpeg_vaapi
4534           Only baseline DCT encoding is supported.  The encoder always uses
4535           the standard quantisation and huffman tables - global_quality
4536           scales the standard quantisation table (range 1-100).
4537
4538           For YUV, 4:2:0, 4:2:2 and 4:4:4 subsampling modes are supported.
4539           RGB is also supported, and will create an RGB JPEG.
4540
4541           jfif
4542               Include JFIF header in each frame (not included by default).
4543
4544           huffman
4545               Include standard huffman tables (on by default).  Turning this
4546               off will save a few hundred bytes in each output frame, but may
4547               lose compatibility with some JPEG decoders which don't fully
4548               handle MJPEG.
4549
4550       mpeg2_vaapi
4551           profile and level set the value of profile_and_level_indication.
4552
4553       vp8_vaapi
4554           B-frames are not supported.
4555
4556           global_quality sets the q_idx used for non-key frames (range
4557           0-127).
4558
4559           loop_filter_level
4560           loop_filter_sharpness
4561               Manually set the loop filter parameters.
4562
4563       vp9_vaapi
4564           global_quality sets the q_idx used for P-frames (range 0-255).
4565
4566           loop_filter_level
4567           loop_filter_sharpness
4568               Manually set the loop filter parameters.
4569
4570           B-frames are supported, but the output stream is always in encode
4571           order rather than display order.  If B-frames are enabled, it may
4572           be necessary to use the vp9_raw_reorder bitstream filter to modify
4573           the output stream to display frames in the correct order.
4574
4575           Only normal frames are produced - the vp9_superframe bitstream
4576           filter may be required to produce a stream usable with all
4577           decoders.
4578
4579   vc2
4580       SMPTE VC-2 (previously BBC Dirac Pro). This codec was primarily aimed
4581       at professional broadcasting but since it supports yuv420, yuv422 and
4582       yuv444 at 8 (limited range or full range), 10 or 12 bits, this makes it
4583       suitable for other tasks which require low overhead and low compression
4584       (like screen recording).
4585
4586       Options
4587
4588       b   Sets target video bitrate. Usually that's around 1:6 of the
4589           uncompressed video bitrate (e.g. for 1920x1080 50fps yuv422p10
4590           that's around 400Mbps). Higher values (close to the uncompressed
4591           bitrate) turn on lossless compression mode.
4592
4593       field_order
4594           Enables field coding when set (e.g. to tt - top field first) for
4595           interlaced inputs. Should increase compression with interlaced
4596           content as it splits the fields and encodes each separately.
4597
4598       wavelet_depth
4599           Sets the total amount of wavelet transforms to apply, between 1 and
4600           5 (default).  Lower values reduce compression and quality. Less
4601           capable decoders may not be able to handle values of wavelet_depth
4602           over 3.
4603
4604       wavelet_type
4605           Sets the transform type. Currently only 5_3 (LeGall) and 9_7
4606           (Deslauriers-Dubuc) are implemented, with 9_7 being the one with
4607           better compression and thus is the default.
4608
4609       slice_width
4610       slice_height
4611           Sets the slice size for each slice. Larger values result in better
4612           compression.  For compatibility with other more limited decoders
4613           use slice_width of 32 and slice_height of 8.
4614
4615       tolerance
4616           Sets the undershoot tolerance of the rate control system in
4617           percent. This is to prevent an expensive search from being run.
4618
4619       qm  Sets the quantization matrix preset to use by default or when
4620           wavelet_depth is set to 5
4621
4622           -   default Uses the default quantization matrix from the
4623               specifications, extended with values for the fifth level. This
4624               provides a good balance between keeping detail and omitting
4625               artifacts.
4626
4627           -   flat Use a completely zeroed out quantization matrix. This
4628               increases PSNR but might reduce perception. Use in bogus
4629               benchmarks.
4630
4631           -   color Reduces detail but attempts to preserve color at
4632               extremely low bitrates.
4633

SUBTITLES ENCODERS

4635   dvdsub
4636       This codec encodes the bitmap subtitle format that is used in DVDs.
4637       Typically they are stored in VOBSUB file pairs (*.idx + *.sub), and
4638       they can also be used in Matroska files.
4639
4640       Options
4641
4642       palette
4643           Specify the global palette used by the bitmaps.
4644
4645           The format for this option is a string containing 16 24-bits
4646           hexadecimal numbers (without 0x prefix) separated by commas, for
4647           example "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b,
4648           0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c,
4649           7c127b".
4650
4651       even_rows_fix
4652           When set to 1, enable a work-around that makes the number of pixel
4653           rows even in all subtitles.  This fixes a problem with some players
4654           that cut off the bottom row if the number is odd.  The work-around
4655           just adds a fully transparent row if needed.  The overhead is low,
4656           typically one byte per subtitle on average.
4657
4658           By default, this work-around is disabled.
4659

SEE ALSO

4661       ffmpeg(1), ffplay(1), ffprobe(1), libavcodec(3)
4662

AUTHORS

4664       The FFmpeg developers.
4665
4666       For details about the authorship, see the Git history of the project
4667       (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
4668       the FFmpeg source directory, or browsing the online repository at
4669       <http://source.ffmpeg.org>.
4670
4671       Maintainers for the specific components are listed in the file
4672       MAINTAINERS in the source code tree.
4673
4674
4675
4676                                                              FFMPEG-CODECS(1)
Impressum