1FFMPEG-CODECS(1) FFMPEG-CODECS(1)
2
3
4
6 ffmpeg-codecs - FFmpeg codecs
7
9 This document describes the codecs (decoders and encoders) provided by
10 the libavcodec library.
11
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 icc_profiles
683 Generate/parse embedded ICC profiles from/to colorimetry tags.
684
685 export_side_data flags (decoding/encoding,audio,video,subtitles)
686 Possible values:
687
688 mvs Export motion vectors into frame side-data (see
689 "AV_FRAME_DATA_MOTION_VECTORS") for codecs that support it. See
690 also doc/examples/export_mvs.c.
691
692 prft
693 Export encoder Producer Reference Time into packet side-data
694 (see "AV_PKT_DATA_PRFT") for codecs that support it.
695
696 venc_params
697 Export video encoding parameters through frame side data (see
698 "AV_FRAME_DATA_VIDEO_ENC_PARAMS") for codecs that support it.
699 At present, those are H.264 and VP9.
700
701 film_grain
702 Export film grain parameters through frame side data (see
703 "AV_FRAME_DATA_FILM_GRAIN_PARAMS"). Supported at present by
704 AV1 decoders.
705
706 threads integer (decoding/encoding,video)
707 Set the number of threads to be used, in case the selected codec
708 implementation supports multi-threading.
709
710 Possible values:
711
712 auto, 0
713 automatically select the number of threads to set
714
715 Default value is auto.
716
717 dc integer (encoding,video)
718 Set intra_dc_precision.
719
720 nssew integer (encoding,video)
721 Set nsse weight.
722
723 skip_top integer (decoding,video)
724 Set number of macroblock rows at the top which are skipped.
725
726 skip_bottom integer (decoding,video)
727 Set number of macroblock rows at the bottom which are skipped.
728
729 profile integer (encoding,audio,video)
730 Set encoder codec profile. Default value is unknown. Encoder
731 specific profiles are documented in the relevant encoder
732 documentation.
733
734 level integer (encoding,audio,video)
735 Possible values:
736
737 unknown
738 lowres integer (decoding,audio,video)
739 Decode at 1= 1/2, 2=1/4, 3=1/8 resolutions.
740
741 mblmin integer (encoding,video)
742 Set min macroblock lagrange factor (VBR).
743
744 mblmax integer (encoding,video)
745 Set max macroblock lagrange factor (VBR).
746
747 skip_loop_filter integer (decoding,video)
748 skip_idct integer (decoding,video)
749 skip_frame integer (decoding,video)
750 Make decoder discard processing depending on the frame type
751 selected by the option value.
752
753 skip_loop_filter skips frame loop filtering, skip_idct skips frame
754 IDCT/dequantization, skip_frame skips decoding.
755
756 Possible values:
757
758 none
759 Discard no frame.
760
761 default
762 Discard useless frames like 0-sized frames.
763
764 noref
765 Discard all non-reference frames.
766
767 bidir
768 Discard all bidirectional frames.
769
770 nokey
771 Discard all frames excepts keyframes.
772
773 nointra
774 Discard all frames except I frames.
775
776 all Discard all frames.
777
778 Default value is default.
779
780 bidir_refine integer (encoding,video)
781 Refine the two motion vectors used in bidirectional macroblocks.
782
783 keyint_min integer (encoding,video)
784 Set minimum interval between IDR-frames.
785
786 refs integer (encoding,video)
787 Set reference frames to consider for motion compensation.
788
789 trellis integer (encoding,audio,video)
790 Set rate-distortion optimal quantization.
791
792 mv0_threshold integer (encoding,video)
793 compression_level integer (encoding,audio,video)
794 bits_per_raw_sample integer
795 channel_layout integer (decoding/encoding,audio)
796 Possible values:
797
798 request_channel_layout integer (decoding,audio)
799 Possible values:
800
801 rc_max_vbv_use float (encoding,video)
802 rc_min_vbv_use float (encoding,video)
803 ticks_per_frame integer (decoding/encoding,audio,video)
804 color_primaries integer (decoding/encoding,video)
805 Possible values:
806
807 bt709
808 BT.709
809
810 bt470m
811 BT.470 M
812
813 bt470bg
814 BT.470 BG
815
816 smpte170m
817 SMPTE 170 M
818
819 smpte240m
820 SMPTE 240 M
821
822 film
823 Film
824
825 bt2020
826 BT.2020
827
828 smpte428
829 smpte428_1
830 SMPTE ST 428-1
831
832 smpte431
833 SMPTE 431-2
834
835 smpte432
836 SMPTE 432-1
837
838 jedec-p22
839 JEDEC P22
840
841 color_trc integer (decoding/encoding,video)
842 Possible values:
843
844 bt709
845 BT.709
846
847 gamma22
848 BT.470 M
849
850 gamma28
851 BT.470 BG
852
853 smpte170m
854 SMPTE 170 M
855
856 smpte240m
857 SMPTE 240 M
858
859 linear
860 Linear
861
862 log
863 log100
864 Log
865
866 log_sqrt
867 log316
868 Log square root
869
870 iec61966_2_4
871 iec61966-2-4
872 IEC 61966-2-4
873
874 bt1361
875 bt1361e
876 BT.1361
877
878 iec61966_2_1
879 iec61966-2-1
880 IEC 61966-2-1
881
882 bt2020_10
883 bt2020_10bit
884 BT.2020 - 10 bit
885
886 bt2020_12
887 bt2020_12bit
888 BT.2020 - 12 bit
889
890 smpte2084
891 SMPTE ST 2084
892
893 smpte428
894 smpte428_1
895 SMPTE ST 428-1
896
897 arib-std-b67
898 ARIB STD-B67
899
900 colorspace integer (decoding/encoding,video)
901 Possible values:
902
903 rgb RGB
904
905 bt709
906 BT.709
907
908 fcc FCC
909
910 bt470bg
911 BT.470 BG
912
913 smpte170m
914 SMPTE 170 M
915
916 smpte240m
917 SMPTE 240 M
918
919 ycocg
920 YCOCG
921
922 bt2020nc
923 bt2020_ncl
924 BT.2020 NCL
925
926 bt2020c
927 bt2020_cl
928 BT.2020 CL
929
930 smpte2085
931 SMPTE 2085
932
933 chroma-derived-nc
934 Chroma-derived NCL
935
936 chroma-derived-c
937 Chroma-derived CL
938
939 ictcp
940 ICtCp
941
942 color_range integer (decoding/encoding,video)
943 If used as input parameter, it serves as a hint to the decoder,
944 which color_range the input has. Possible values:
945
946 tv
947 mpeg
948 MPEG (219*2^(n-8))
949
950 pc
951 jpeg
952 JPEG (2^n-1)
953
954 chroma_sample_location integer (decoding/encoding,video)
955 Possible values:
956
957 left
958 center
959 topleft
960 top
961 bottomleft
962 bottom
963 log_level_offset integer
964 Set the log level offset.
965
966 slices integer (encoding,video)
967 Number of slices, used in parallelized encoding.
968
969 thread_type flags (decoding/encoding,video)
970 Select which multithreading methods to use.
971
972 Use of frame will increase decoding delay by one frame per thread,
973 so clients which cannot provide future frames should not use it.
974
975 Possible values:
976
977 slice
978 Decode more than one part of a single frame at once.
979
980 Multithreading using slices works only when the video was
981 encoded with slices.
982
983 frame
984 Decode more than one frame at once.
985
986 Default value is slice+frame.
987
988 audio_service_type integer (encoding,audio)
989 Set audio service type.
990
991 Possible values:
992
993 ma Main Audio Service
994
995 ef Effects
996
997 vi Visually Impaired
998
999 hi Hearing Impaired
1000
1001 di Dialogue
1002
1003 co Commentary
1004
1005 em Emergency
1006
1007 vo Voice Over
1008
1009 ka Karaoke
1010
1011 request_sample_fmt sample_fmt (decoding,audio)
1012 Set sample format audio decoders should prefer. Default value is
1013 "none".
1014
1015 pkt_timebase rational number
1016 sub_charenc encoding (decoding,subtitles)
1017 Set the input subtitles character encoding.
1018
1019 field_order field_order (video)
1020 Set/override the field order of the video. Possible values:
1021
1022 progressive
1023 Progressive video
1024
1025 tt Interlaced video, top field coded and displayed first
1026
1027 bb Interlaced video, bottom field coded and displayed first
1028
1029 tb Interlaced video, top coded first, bottom displayed first
1030
1031 bt Interlaced video, bottom coded first, top displayed first
1032
1033 skip_alpha bool (decoding,video)
1034 Set to 1 to disable processing alpha (transparency). This works
1035 like the gray flag in the flags option which skips chroma
1036 information instead of alpha. Default is 0.
1037
1038 codec_whitelist list (input)
1039 "," separated list of allowed decoders. By default all are allowed.
1040
1041 dump_separator string (input)
1042 Separator used to separate the fields printed on the command line
1043 about the Stream parameters. For example, to separate the fields
1044 with newlines and indentation:
1045
1046 ffprobe -dump_separator "
1047 " -i ~/videos/matrixbench_mpeg2.mpg
1048
1049 max_pixels integer (decoding/encoding,video)
1050 Maximum number of pixels per image. This value can be used to avoid
1051 out of memory failures due to large images.
1052
1053 apply_cropping bool (decoding,video)
1054 Enable cropping if cropping parameters are multiples of the
1055 required alignment for the left and top parameters. If the
1056 alignment is not met the cropping will be partially applied to
1057 maintain alignment. Default is 1 (enabled). Note: The required
1058 alignment depends on if "AV_CODEC_FLAG_UNALIGNED" is set and the
1059 CPU. "AV_CODEC_FLAG_UNALIGNED" cannot be changed from the command
1060 line. Also hardware decoders will not apply left/top Cropping.
1061
1063 Decoders are configured elements in FFmpeg which allow the decoding of
1064 multimedia streams.
1065
1066 When you configure your FFmpeg build, all the supported native decoders
1067 are enabled by default. Decoders requiring an external library must be
1068 enabled manually via the corresponding "--enable-lib" option. You can
1069 list all available decoders using the configure option
1070 "--list-decoders".
1071
1072 You can disable all the decoders with the configure option
1073 "--disable-decoders" and selectively enable / disable single decoders
1074 with the options "--enable-decoder=DECODER" /
1075 "--disable-decoder=DECODER".
1076
1077 The option "-decoders" of the ff* tools will display the list of
1078 enabled decoders.
1079
1081 A description of some of the currently available video decoders
1082 follows.
1083
1084 av1
1085 AOMedia Video 1 (AV1) decoder.
1086
1087 Options
1088
1089 operating_point
1090 Select an operating point of a scalable AV1 bitstream (0 - 31).
1091 Default is 0.
1092
1093 rawvideo
1094 Raw video decoder.
1095
1096 This decoder decodes rawvideo streams.
1097
1098 Options
1099
1100 top top_field_first
1101 Specify the assumed field type of the input video.
1102
1103 -1 the video is assumed to be progressive (default)
1104
1105 0 bottom-field-first is assumed
1106
1107 1 top-field-first is assumed
1108
1109 libdav1d
1110 dav1d AV1 decoder.
1111
1112 libdav1d allows libavcodec to decode the AOMedia Video 1 (AV1) codec.
1113 Requires the presence of the libdav1d headers and library during
1114 configuration. You need to explicitly configure the build with
1115 "--enable-libdav1d".
1116
1117 Options
1118
1119 The following options are supported by the libdav1d wrapper.
1120
1121 framethreads
1122 Set amount of frame threads to use during decoding. The default
1123 value is 0 (autodetect). This option is deprecated for libdav1d >=
1124 1.0 and will be removed in the future. Use the option
1125 "max_frame_delay" and the global option "threads" instead.
1126
1127 tilethreads
1128 Set amount of tile threads to use during decoding. The default
1129 value is 0 (autodetect). This option is deprecated for libdav1d >=
1130 1.0 and will be removed in the future. Use the global option
1131 "threads" instead.
1132
1133 max_frame_delay
1134 Set max amount of frames the decoder may buffer internally. The
1135 default value is 0 (autodetect).
1136
1137 filmgrain
1138 Apply film grain to the decoded video if present in the bitstream.
1139 Defaults to the internal default of the library. This option is
1140 deprecated and will be removed in the future. See the global option
1141 "export_side_data" to export Film Grain parameters instead of
1142 applying it.
1143
1144 oppoint
1145 Select an operating point of a scalable AV1 bitstream (0 - 31).
1146 Defaults to the internal default of the library.
1147
1148 alllayers
1149 Output all spatial layers of a scalable AV1 bitstream. The default
1150 value is false.
1151
1152 libdavs2
1153 AVS2-P2/IEEE1857.4 video decoder wrapper.
1154
1155 This decoder allows libavcodec to decode AVS2 streams with davs2
1156 library.
1157
1158 libuavs3d
1159 AVS3-P2/IEEE1857.10 video decoder.
1160
1161 libuavs3d allows libavcodec to decode AVS3 streams. Requires the
1162 presence of the libuavs3d headers and library during configuration.
1163 You need to explicitly configure the build with "--enable-libuavs3d".
1164
1165 Options
1166
1167 The following option is supported by the libuavs3d wrapper.
1168
1169 frame_threads
1170 Set amount of frame threads to use during decoding. The default
1171 value is 0 (autodetect).
1172
1173 QSV Decoders
1174 The family of Intel QuickSync Video decoders (VC1, MPEG-2, H.264, HEVC,
1175 JPEG/MJPEG, VP8, VP9, AV1).
1176
1177 Common Options
1178
1179 The following options are supported by all qsv decoders.
1180
1181 async_depth
1182 Internal parallelization depth, the higher the value the higher the
1183 latency.
1184
1185 gpu_copy
1186 A GPU-accelerated copy between video and system memory
1187
1188 default
1189 on
1190 off
1191
1192 HEVC Options
1193
1194 Extra options for hevc_qsv.
1195
1196 load_plugin
1197 A user plugin to load in an internal session
1198
1199 none
1200 hevc_sw
1201 hevc_hw
1202 load_plugins
1203 A :-separate list of hexadecimal plugin UIDs to load in an internal
1204 session
1205
1206 v210
1207 Uncompressed 4:2:2 10-bit decoder.
1208
1209 Options
1210
1211 custom_stride
1212 Set the line size of the v210 data in bytes. The default value is 0
1213 (autodetect). You can use the special -1 value for a strideless
1214 v210 as seen in BOXX files.
1215
1217 A description of some of the currently available audio decoders
1218 follows.
1219
1220 ac3
1221 AC-3 audio decoder.
1222
1223 This decoder implements part of ATSC A/52:2010 and ETSI TS 102 366, as
1224 well as the undocumented RealAudio 3 (a.k.a. dnet).
1225
1226 AC-3 Decoder Options
1227
1228 -drc_scale value
1229 Dynamic Range Scale Factor. The factor to apply to dynamic range
1230 values from the AC-3 stream. This factor is applied exponentially.
1231 The default value is 1. There are 3 notable scale factor ranges:
1232
1233 drc_scale == 0
1234 DRC disabled. Produces full range audio.
1235
1236 0 < drc_scale <= 1
1237 DRC enabled. Applies a fraction of the stream DRC value.
1238 Audio reproduction is between full range and full compression.
1239
1240 drc_scale > 1
1241 DRC enabled. Applies drc_scale asymmetrically. Loud sounds are
1242 fully compressed. Soft sounds are enhanced.
1243
1244 flac
1245 FLAC audio decoder.
1246
1247 This decoder aims to implement the complete FLAC specification from
1248 Xiph.
1249
1250 FLAC Decoder options
1251
1252 -use_buggy_lpc
1253 The lavc FLAC encoder used to produce buggy streams with high lpc
1254 values (like the default value). This option makes it possible to
1255 decode such streams correctly by using lavc's old buggy lpc logic
1256 for decoding.
1257
1258 ffwavesynth
1259 Internal wave synthesizer.
1260
1261 This decoder generates wave patterns according to predefined sequences.
1262 Its use is purely internal and the format of the data it accepts is not
1263 publicly documented.
1264
1265 libcelt
1266 libcelt decoder wrapper.
1267
1268 libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio
1269 codec. Requires the presence of the libcelt headers and library during
1270 configuration. You need to explicitly configure the build with
1271 "--enable-libcelt".
1272
1273 libgsm
1274 libgsm decoder wrapper.
1275
1276 libgsm allows libavcodec to decode the GSM full rate audio codec.
1277 Requires the presence of the libgsm headers and library during
1278 configuration. You need to explicitly configure the build with
1279 "--enable-libgsm".
1280
1281 This decoder supports both the ordinary GSM and the Microsoft variant.
1282
1283 libilbc
1284 libilbc decoder wrapper.
1285
1286 libilbc allows libavcodec to decode the Internet Low Bitrate Codec
1287 (iLBC) audio codec. Requires the presence of the libilbc headers and
1288 library during configuration. You need to explicitly configure the
1289 build with "--enable-libilbc".
1290
1291 Options
1292
1293 The following option is supported by the libilbc wrapper.
1294
1295 enhance
1296 Enable the enhancement of the decoded audio when set to 1. The
1297 default value is 0 (disabled).
1298
1299 libopencore-amrnb
1300 libopencore-amrnb decoder wrapper.
1301
1302 libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
1303 Narrowband audio codec. Using it requires the presence of the
1304 libopencore-amrnb headers and library during configuration. You need to
1305 explicitly configure the build with "--enable-libopencore-amrnb".
1306
1307 An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
1308 without this library.
1309
1310 libopencore-amrwb
1311 libopencore-amrwb decoder wrapper.
1312
1313 libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
1314 Wideband audio codec. Using it requires the presence of the
1315 libopencore-amrwb headers and library during configuration. You need to
1316 explicitly configure the build with "--enable-libopencore-amrwb".
1317
1318 An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
1319 without this library.
1320
1321 libopus
1322 libopus decoder wrapper.
1323
1324 libopus allows libavcodec to decode the Opus Interactive Audio Codec.
1325 Requires the presence of the libopus headers and library during
1326 configuration. You need to explicitly configure the build with
1327 "--enable-libopus".
1328
1329 An FFmpeg native decoder for Opus exists, so users can decode Opus
1330 without this library.
1331
1333 libaribb24
1334 ARIB STD-B24 caption decoder.
1335
1336 Implements profiles A and C of the ARIB STD-B24 standard.
1337
1338 libaribb24 Decoder Options
1339
1340 -aribb24-base-path path
1341 Sets the base path for the libaribb24 library. This is utilized for
1342 reading of configuration files (for custom unicode conversions),
1343 and for dumping of non-text symbols as images under that location.
1344
1345 Unset by default.
1346
1347 -aribb24-skip-ruby-text boolean
1348 Tells the decoder wrapper to skip text blocks that contain half-
1349 height ruby text.
1350
1351 Enabled by default.
1352
1353 dvbsub
1354 Options
1355
1356 compute_clut
1357 -2 Compute clut once if no matching CLUT is in the stream.
1358
1359 -1 Compute clut if no matching CLUT is in the stream.
1360
1361 0 Never compute CLUT
1362
1363 1 Always compute CLUT and override the one provided in the
1364 stream.
1365
1366 dvb_substream
1367 Selects the dvb substream, or all substreams if -1 which is
1368 default.
1369
1370 dvdsub
1371 This codec decodes the bitmap subtitles used in DVDs; the same
1372 subtitles can also be found in VobSub file pairs and in some Matroska
1373 files.
1374
1375 Options
1376
1377 palette
1378 Specify the global palette used by the bitmaps. When stored in
1379 VobSub, the palette is normally specified in the index file; in
1380 Matroska, the palette is stored in the codec extra-data in the same
1381 format as in VobSub. In DVDs, the palette is stored in the IFO
1382 file, and therefore not available when reading from dumped VOB
1383 files.
1384
1385 The format for this option is a string containing 16 24-bits
1386 hexadecimal numbers (without 0x prefix) separated by commas, for
1387 example "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b,
1388 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c,
1389 7c127b".
1390
1391 ifo_palette
1392 Specify the IFO file from which the global palette is obtained.
1393 (experimental)
1394
1395 forced_subs_only
1396 Only decode subtitle entries marked as forced. Some titles have
1397 forced and non-forced subtitles in the same track. Setting this
1398 flag to 1 will only keep the forced subtitles. Default value is 0.
1399
1400 libzvbi-teletext
1401 Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
1402 subtitles. Requires the presence of the libzvbi headers and library
1403 during configuration. You need to explicitly configure the build with
1404 "--enable-libzvbi".
1405
1406 Options
1407
1408 txt_page
1409 List of teletext page numbers to decode. Pages that do not match
1410 the specified list are dropped. You may use the special "*" string
1411 to match all pages, or "subtitle" to match all subtitle pages.
1412 Default value is *.
1413
1414 txt_default_region
1415 Set default character set used for decoding, a value between 0 and
1416 87 (see ETS 300 706, Section 15, Table 32). Default value is -1,
1417 which does not override the libzvbi default. This option is needed
1418 for some legacy level 1.0 transmissions which cannot signal the
1419 proper charset.
1420
1421 txt_chop_top
1422 Discards the top teletext line. Default value is 1.
1423
1424 txt_format
1425 Specifies the format of the decoded subtitles.
1426
1427 bitmap
1428 The default format, you should use this for teletext pages,
1429 because certain graphics and colors cannot be expressed in
1430 simple text or even ASS.
1431
1432 text
1433 Simple text based output without formatting.
1434
1435 ass Formatted ASS output, subtitle pages and teletext pages are
1436 returned in different styles, subtitle pages are stripped down
1437 to text, but an effort is made to keep the text alignment and
1438 the formatting.
1439
1440 txt_left
1441 X offset of generated bitmaps, default is 0.
1442
1443 txt_top
1444 Y offset of generated bitmaps, default is 0.
1445
1446 txt_chop_spaces
1447 Chops leading and trailing spaces and removes empty lines from the
1448 generated text. This option is useful for teletext based subtitles
1449 where empty spaces may be present at the start or at the end of the
1450 lines or empty lines may be present between the subtitle lines
1451 because of double-sized teletext characters. Default value is 1.
1452
1453 txt_duration
1454 Sets the display duration of the decoded teletext pages or
1455 subtitles in milliseconds. Default value is -1 which means infinity
1456 or until the next subtitle event comes.
1457
1458 txt_transparent
1459 Force transparent background of the generated teletext bitmaps.
1460 Default value is 0 which means an opaque background.
1461
1462 txt_opacity
1463 Sets the opacity (0-255) of the teletext background. If
1464 txt_transparent is not set, it only affects characters between a
1465 start box and an end box, typically subtitles. Default value is 0
1466 if txt_transparent is set, 255 otherwise.
1467
1469 Encoders are configured elements in FFmpeg which allow the encoding of
1470 multimedia streams.
1471
1472 When you configure your FFmpeg build, all the supported native encoders
1473 are enabled by default. Encoders requiring an external library must be
1474 enabled manually via the corresponding "--enable-lib" option. You can
1475 list all available encoders using the configure option
1476 "--list-encoders".
1477
1478 You can disable all the encoders with the configure option
1479 "--disable-encoders" and selectively enable / disable single encoders
1480 with the options "--enable-encoder=ENCODER" /
1481 "--disable-encoder=ENCODER".
1482
1483 The option "-encoders" of the ff* tools will display the list of
1484 enabled encoders.
1485
1487 A description of some of the currently available audio encoders
1488 follows.
1489
1490 aac
1491 Advanced Audio Coding (AAC) encoder.
1492
1493 This encoder is the default AAC encoder, natively implemented into
1494 FFmpeg.
1495
1496 Options
1497
1498 b Set bit rate in bits/s. Setting this automatically activates
1499 constant bit rate (CBR) mode. If this option is unspecified it is
1500 set to 128kbps.
1501
1502 q Set quality for variable bit rate (VBR) mode. This option is valid
1503 only using the ffmpeg command-line tool. For library interface
1504 users, use global_quality.
1505
1506 cutoff
1507 Set cutoff frequency. If unspecified will allow the encoder to
1508 dynamically adjust the cutoff to improve clarity on low bitrates.
1509
1510 aac_coder
1511 Set AAC encoder coding method. Possible values:
1512
1513 twoloop
1514 Two loop searching (TLS) method. This is the default method.
1515
1516 This method first sets quantizers depending on band thresholds
1517 and then tries to find an optimal combination by adding or
1518 subtracting a specific value from all quantizers and adjusting
1519 some individual quantizer a little. Will tune itself based on
1520 whether aac_is, aac_ms and aac_pns are enabled.
1521
1522 anmr
1523 Average noise to mask ratio (ANMR) trellis-based solution.
1524
1525 This is an experimental coder which currently produces a lower
1526 quality, is more unstable and is slower than the default
1527 twoloop coder but has potential. Currently has no support for
1528 the aac_is or aac_pns options. Not currently recommended.
1529
1530 fast
1531 Constant quantizer method.
1532
1533 Uses a cheaper version of twoloop algorithm that doesn't try to
1534 do as many clever adjustments. Worse with low bitrates (less
1535 than 64kbps), but is better and much faster at higher bitrates.
1536
1537 aac_ms
1538 Sets mid/side coding mode. The default value of "auto" will
1539 automatically use M/S with bands which will benefit from such
1540 coding. Can be forced for all bands using the value "enable", which
1541 is mainly useful for debugging or disabled using "disable".
1542
1543 aac_is
1544 Sets intensity stereo coding tool usage. By default, it's enabled
1545 and will automatically toggle IS for similar pairs of stereo bands
1546 if it's beneficial. Can be disabled for debugging by setting the
1547 value to "disable".
1548
1549 aac_pns
1550 Uses perceptual noise substitution to replace low entropy high
1551 frequency bands with imperceptible white noise during the decoding
1552 process. By default, it's enabled, but can be disabled for
1553 debugging purposes by using "disable".
1554
1555 aac_tns
1556 Enables the use of a multitap FIR filter which spans through the
1557 high frequency bands to hide quantization noise during the encoding
1558 process and is reverted by the decoder. As well as decreasing
1559 unpleasant artifacts in the high range this also reduces the
1560 entropy in the high bands and allows for more bits to be used by
1561 the mid-low bands. By default it's enabled but can be disabled for
1562 debugging by setting the option to "disable".
1563
1564 aac_ltp
1565 Enables the use of the long term prediction extension which
1566 increases coding efficiency in very low bandwidth situations such
1567 as encoding of voice or solo piano music by extending constant
1568 harmonic peaks in bands throughout frames. This option is implied
1569 by profile:a aac_low and is incompatible with aac_pred. Use in
1570 conjunction with -ar to decrease the samplerate.
1571
1572 aac_pred
1573 Enables the use of a more traditional style of prediction where the
1574 spectral coefficients transmitted are replaced by the difference of
1575 the current coefficients minus the previous "predicted"
1576 coefficients. In theory and sometimes in practice this can improve
1577 quality for low to mid bitrate audio. This option implies the
1578 aac_main profile and is incompatible with aac_ltp.
1579
1580 profile
1581 Sets the encoding profile, possible values:
1582
1583 aac_low
1584 The default, AAC "Low-complexity" profile. Is the most
1585 compatible and produces decent quality.
1586
1587 mpeg2_aac_low
1588 Equivalent to "-profile:a aac_low -aac_pns 0". PNS was
1589 introduced with the MPEG4 specifications.
1590
1591 aac_ltp
1592 Long term prediction profile, is enabled by and will enable the
1593 aac_ltp option. Introduced in MPEG4.
1594
1595 aac_main
1596 Main-type prediction profile, is enabled by and will enable the
1597 aac_pred option. Introduced in MPEG2.
1598
1599 If this option is unspecified it is set to aac_low.
1600
1601 ac3 and ac3_fixed
1602 AC-3 audio encoders.
1603
1604 These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as
1605 well as the undocumented RealAudio 3 (a.k.a. dnet).
1606
1607 The ac3 encoder uses floating-point math, while the ac3_fixed encoder
1608 only uses fixed-point integer math. This does not mean that one is
1609 always faster, just that one or the other may be better suited to a
1610 particular system. The ac3_fixed encoder is not the default codec for
1611 any of the output formats, so it must be specified explicitly using the
1612 option "-acodec ac3_fixed" in order to use it.
1613
1614 AC-3 Metadata
1615
1616 The AC-3 metadata options are used to set parameters that describe the
1617 audio, but in most cases do not affect the audio encoding itself. Some
1618 of the options do directly affect or influence the decoding and
1619 playback of the resulting bitstream, while others are just for
1620 informational purposes. A few of the options will add bits to the
1621 output stream that could otherwise be used for audio data, and will
1622 thus affect the quality of the output. Those will be indicated
1623 accordingly with a note in the option list below.
1624
1625 These parameters are described in detail in several publicly-available
1626 documents.
1627
1628 *<<http://www.atsc.org/cms/standards/a_52-2010.pdf>>
1629 *<<http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf>>
1630 *<<http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf>>
1631 *<<http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf>>
1632
1633 Metadata Control Options
1634
1635 -per_frame_metadata boolean
1636 Allow Per-Frame Metadata. Specifies if the encoder should check for
1637 changing metadata for each frame.
1638
1639 0 The metadata values set at initialization will be used for
1640 every frame in the stream. (default)
1641
1642 1 Metadata values can be changed before encoding each frame.
1643
1644 Downmix Levels
1645
1646 -center_mixlev level
1647 Center Mix Level. The amount of gain the decoder should apply to
1648 the center channel when downmixing to stereo. This field will only
1649 be written to the bitstream if a center channel is present. The
1650 value is specified as a scale factor. There are 3 valid values:
1651
1652 0.707
1653 Apply -3dB gain
1654
1655 0.595
1656 Apply -4.5dB gain (default)
1657
1658 0.500
1659 Apply -6dB gain
1660
1661 -surround_mixlev level
1662 Surround Mix Level. The amount of gain the decoder should apply to
1663 the surround channel(s) when downmixing to stereo. This field will
1664 only be written to the bitstream if one or more surround channels
1665 are present. The value is specified as a scale factor. There are 3
1666 valid values:
1667
1668 0.707
1669 Apply -3dB gain
1670
1671 0.500
1672 Apply -6dB gain (default)
1673
1674 0.000
1675 Silence Surround Channel(s)
1676
1677 Audio Production Information
1678
1679 Audio Production Information is optional information describing the
1680 mixing environment. Either none or both of the fields are written to
1681 the bitstream.
1682
1683 -mixing_level number
1684 Mixing Level. Specifies peak sound pressure level (SPL) in the
1685 production environment when the mix was mastered. Valid values are
1686 80 to 111, or -1 for unknown or not indicated. The default value is
1687 -1, but that value cannot be used if the Audio Production
1688 Information is written to the bitstream. Therefore, if the
1689 "room_type" option is not the default value, the "mixing_level"
1690 option must not be -1.
1691
1692 -room_type type
1693 Room Type. Describes the equalization used during the final mixing
1694 session at the studio or on the dubbing stage. A large room is a
1695 dubbing stage with the industry standard X-curve equalization; a
1696 small room has flat equalization. This field will not be written
1697 to the bitstream if both the "mixing_level" option and the
1698 "room_type" option have the default values.
1699
1700 0
1701 notindicated
1702 Not Indicated (default)
1703
1704 1
1705 large
1706 Large Room
1707
1708 2
1709 small
1710 Small Room
1711
1712 Other Metadata Options
1713
1714 -copyright boolean
1715 Copyright Indicator. Specifies whether a copyright exists for this
1716 audio.
1717
1718 0
1719 off No Copyright Exists (default)
1720
1721 1
1722 on Copyright Exists
1723
1724 -dialnorm value
1725 Dialogue Normalization. Indicates how far the average dialogue
1726 level of the program is below digital 100% full scale (0 dBFS).
1727 This parameter determines a level shift during audio reproduction
1728 that sets the average volume of the dialogue to a preset level. The
1729 goal is to match volume level between program sources. A value of
1730 -31dB will result in no volume level change, relative to the source
1731 volume, during audio reproduction. Valid values are whole numbers
1732 in the range -31 to -1, with -31 being the default.
1733
1734 -dsur_mode mode
1735 Dolby Surround Mode. Specifies whether the stereo signal uses Dolby
1736 Surround (Pro Logic). This field will only be written to the
1737 bitstream if the audio stream is stereo. Using this option does NOT
1738 mean the encoder will actually apply Dolby Surround processing.
1739
1740 0
1741 notindicated
1742 Not Indicated (default)
1743
1744 1
1745 off Not Dolby Surround Encoded
1746
1747 2
1748 on Dolby Surround Encoded
1749
1750 -original boolean
1751 Original Bit Stream Indicator. Specifies whether this audio is from
1752 the original source and not a copy.
1753
1754 0
1755 off Not Original Source
1756
1757 1
1758 on Original Source (default)
1759
1760 Extended Bitstream Information
1761
1762 The extended bitstream options are part of the Alternate Bit Stream
1763 Syntax as specified in Annex D of the A/52:2010 standard. It is grouped
1764 into 2 parts. If any one parameter in a group is specified, all values
1765 in that group will be written to the bitstream. Default values are
1766 used for those that are written but have not been specified. If the
1767 mixing levels are written, the decoder will use these values instead of
1768 the ones specified in the "center_mixlev" and "surround_mixlev" options
1769 if it supports the Alternate Bit Stream Syntax.
1770
1771 Extended Bitstream Information - Part 1
1772
1773 -dmix_mode mode
1774 Preferred Stereo Downmix Mode. Allows the user to select either
1775 Lt/Rt (Dolby Surround) or Lo/Ro (normal stereo) as the preferred
1776 stereo downmix mode.
1777
1778 0
1779 notindicated
1780 Not Indicated (default)
1781
1782 1
1783 ltrt
1784 Lt/Rt Downmix Preferred
1785
1786 2
1787 loro
1788 Lo/Ro Downmix Preferred
1789
1790 -ltrt_cmixlev level
1791 Lt/Rt Center Mix Level. The amount of gain the decoder should apply
1792 to the center channel when downmixing to stereo in Lt/Rt mode.
1793
1794 1.414
1795 Apply +3dB gain
1796
1797 1.189
1798 Apply +1.5dB gain
1799
1800 1.000
1801 Apply 0dB gain
1802
1803 0.841
1804 Apply -1.5dB gain
1805
1806 0.707
1807 Apply -3.0dB gain
1808
1809 0.595
1810 Apply -4.5dB gain (default)
1811
1812 0.500
1813 Apply -6.0dB gain
1814
1815 0.000
1816 Silence Center Channel
1817
1818 -ltrt_surmixlev level
1819 Lt/Rt Surround Mix Level. The amount of gain the decoder should
1820 apply to the surround channel(s) when downmixing to stereo in Lt/Rt
1821 mode.
1822
1823 0.841
1824 Apply -1.5dB gain
1825
1826 0.707
1827 Apply -3.0dB gain
1828
1829 0.595
1830 Apply -4.5dB gain
1831
1832 0.500
1833 Apply -6.0dB gain (default)
1834
1835 0.000
1836 Silence Surround Channel(s)
1837
1838 -loro_cmixlev level
1839 Lo/Ro Center Mix Level. The amount of gain the decoder should apply
1840 to the center channel when downmixing to stereo in Lo/Ro mode.
1841
1842 1.414
1843 Apply +3dB gain
1844
1845 1.189
1846 Apply +1.5dB gain
1847
1848 1.000
1849 Apply 0dB gain
1850
1851 0.841
1852 Apply -1.5dB gain
1853
1854 0.707
1855 Apply -3.0dB gain
1856
1857 0.595
1858 Apply -4.5dB gain (default)
1859
1860 0.500
1861 Apply -6.0dB gain
1862
1863 0.000
1864 Silence Center Channel
1865
1866 -loro_surmixlev level
1867 Lo/Ro Surround Mix Level. The amount of gain the decoder should
1868 apply to the surround channel(s) when downmixing to stereo in Lo/Ro
1869 mode.
1870
1871 0.841
1872 Apply -1.5dB gain
1873
1874 0.707
1875 Apply -3.0dB gain
1876
1877 0.595
1878 Apply -4.5dB gain
1879
1880 0.500
1881 Apply -6.0dB gain (default)
1882
1883 0.000
1884 Silence Surround Channel(s)
1885
1886 Extended Bitstream Information - Part 2
1887
1888 -dsurex_mode mode
1889 Dolby Surround EX Mode. Indicates whether the stream uses Dolby
1890 Surround EX (7.1 matrixed to 5.1). Using this option does NOT mean
1891 the encoder will actually apply Dolby Surround EX processing.
1892
1893 0
1894 notindicated
1895 Not Indicated (default)
1896
1897 1
1898 on Dolby Surround EX Off
1899
1900 2
1901 off Dolby Surround EX On
1902
1903 -dheadphone_mode mode
1904 Dolby Headphone Mode. Indicates whether the stream uses Dolby
1905 Headphone encoding (multi-channel matrixed to 2.0 for use with
1906 headphones). Using this option does NOT mean the encoder will
1907 actually apply Dolby Headphone processing.
1908
1909 0
1910 notindicated
1911 Not Indicated (default)
1912
1913 1
1914 on Dolby Headphone Off
1915
1916 2
1917 off Dolby Headphone On
1918
1919 -ad_conv_type type
1920 A/D Converter Type. Indicates whether the audio has passed through
1921 HDCD A/D conversion.
1922
1923 0
1924 standard
1925 Standard A/D Converter (default)
1926
1927 1
1928 hdcd
1929 HDCD A/D Converter
1930
1931 Other AC-3 Encoding Options
1932
1933 -stereo_rematrixing boolean
1934 Stereo Rematrixing. Enables/Disables use of rematrixing for stereo
1935 input. This is an optional AC-3 feature that increases quality by
1936 selectively encoding the left/right channels as mid/side. This
1937 option is enabled by default, and it is highly recommended that it
1938 be left as enabled except for testing purposes.
1939
1940 cutoff frequency
1941 Set lowpass cutoff frequency. If unspecified, the encoder selects a
1942 default determined by various other encoding parameters.
1943
1944 Floating-Point-Only AC-3 Encoding Options
1945
1946 These options are only valid for the floating-point encoder and do not
1947 exist for the fixed-point encoder due to the corresponding features not
1948 being implemented in fixed-point.
1949
1950 -channel_coupling boolean
1951 Enables/Disables use of channel coupling, which is an optional AC-3
1952 feature that increases quality by combining high frequency
1953 information from multiple channels into a single channel. The per-
1954 channel high frequency information is sent with less accuracy in
1955 both the frequency and time domains. This allows more bits to be
1956 used for lower frequencies while preserving enough information to
1957 reconstruct the high frequencies. This option is enabled by default
1958 for the floating-point encoder and should generally be left as
1959 enabled except for testing purposes or to increase encoding speed.
1960
1961 -1
1962 auto
1963 Selected by Encoder (default)
1964
1965 0
1966 off Disable Channel Coupling
1967
1968 1
1969 on Enable Channel Coupling
1970
1971 -cpl_start_band number
1972 Coupling Start Band. Sets the channel coupling start band, from 1
1973 to 15. If a value higher than the bandwidth is used, it will be
1974 reduced to 1 less than the coupling end band. If auto is used, the
1975 start band will be determined by the encoder based on the bit rate,
1976 sample rate, and channel layout. This option has no effect if
1977 channel coupling is disabled.
1978
1979 -1
1980 auto
1981 Selected by Encoder (default)
1982
1983 flac
1984 FLAC (Free Lossless Audio Codec) Encoder
1985
1986 Options
1987
1988 The following options are supported by FFmpeg's flac encoder.
1989
1990 compression_level
1991 Sets the compression level, which chooses defaults for many other
1992 options if they are not set explicitly. Valid values are from 0 to
1993 12, 5 is the default.
1994
1995 frame_size
1996 Sets the size of the frames in samples per channel.
1997
1998 lpc_coeff_precision
1999 Sets the LPC coefficient precision, valid values are from 1 to 15,
2000 15 is the default.
2001
2002 lpc_type
2003 Sets the first stage LPC algorithm
2004
2005 none
2006 LPC is not used
2007
2008 fixed
2009 fixed LPC coefficients
2010
2011 levinson
2012 cholesky
2013 lpc_passes
2014 Number of passes to use for Cholesky factorization during LPC
2015 analysis
2016
2017 min_partition_order
2018 The minimum partition order
2019
2020 max_partition_order
2021 The maximum partition order
2022
2023 prediction_order_method
2024 estimation
2025 2level
2026 4level
2027 8level
2028 search
2029 Bruteforce search
2030
2031 log
2032 ch_mode
2033 Channel mode
2034
2035 auto
2036 The mode is chosen automatically for each frame
2037
2038 indep
2039 Channels are independently coded
2040
2041 left_side
2042 right_side
2043 mid_side
2044 exact_rice_parameters
2045 Chooses if rice parameters are calculated exactly or approximately.
2046 if set to 1 then they are chosen exactly, which slows the code down
2047 slightly and improves compression slightly.
2048
2049 multi_dim_quant
2050 Multi Dimensional Quantization. If set to 1 then a 2nd stage LPC
2051 algorithm is applied after the first stage to finetune the
2052 coefficients. This is quite slow and slightly improves compression.
2053
2054 opus
2055 Opus encoder.
2056
2057 This is a native FFmpeg encoder for the Opus format. Currently its in
2058 development and only implements the CELT part of the codec. Its quality
2059 is usually worse and at best is equal to the libopus encoder.
2060
2061 Options
2062
2063 b Set bit rate in bits/s. If unspecified it uses the number of
2064 channels and the layout to make a good guess.
2065
2066 opus_delay
2067 Sets the maximum delay in milliseconds. Lower delays than 20ms will
2068 very quickly decrease quality.
2069
2070 libfdk_aac
2071 libfdk-aac AAC (Advanced Audio Coding) encoder wrapper.
2072
2073 The libfdk-aac library is based on the Fraunhofer FDK AAC code from the
2074 Android project.
2075
2076 Requires the presence of the libfdk-aac headers and library during
2077 configuration. You need to explicitly configure the build with
2078 "--enable-libfdk-aac". The library is also incompatible with GPL, so if
2079 you allow the use of GPL, you should configure with "--enable-gpl
2080 --enable-nonfree --enable-libfdk-aac".
2081
2082 This encoder has support for the AAC-HE profiles.
2083
2084 VBR encoding, enabled through the vbr or flags +qscale options, is
2085 experimental and only works with some combinations of parameters.
2086
2087 Support for encoding 7.1 audio is only available with libfdk-aac 0.1.3
2088 or higher.
2089
2090 For more information see the fdk-aac project at
2091 <http://sourceforge.net/p/opencore-amr/fdk-aac/>.
2092
2093 Options
2094
2095 The following options are mapped on the shared FFmpeg codec options.
2096
2097 b Set bit rate in bits/s. If the bitrate is not explicitly specified,
2098 it is automatically set to a suitable value depending on the
2099 selected profile.
2100
2101 In case VBR mode is enabled the option is ignored.
2102
2103 ar Set audio sampling rate (in Hz).
2104
2105 channels
2106 Set the number of audio channels.
2107
2108 flags +qscale
2109 Enable fixed quality, VBR (Variable Bit Rate) mode. Note that VBR
2110 is implicitly enabled when the vbr value is positive.
2111
2112 cutoff
2113 Set cutoff frequency. If not specified (or explicitly set to 0) it
2114 will use a value automatically computed by the library. Default
2115 value is 0.
2116
2117 profile
2118 Set audio profile.
2119
2120 The following profiles are recognized:
2121
2122 aac_low
2123 Low Complexity AAC (LC)
2124
2125 aac_he
2126 High Efficiency AAC (HE-AAC)
2127
2128 aac_he_v2
2129 High Efficiency AAC version 2 (HE-AACv2)
2130
2131 aac_ld
2132 Low Delay AAC (LD)
2133
2134 aac_eld
2135 Enhanced Low Delay AAC (ELD)
2136
2137 If not specified it is set to aac_low.
2138
2139 The following are private options of the libfdk_aac encoder.
2140
2141 afterburner
2142 Enable afterburner feature if set to 1, disabled if set to 0. This
2143 improves the quality but also the required processing power.
2144
2145 Default value is 1.
2146
2147 eld_sbr
2148 Enable SBR (Spectral Band Replication) for ELD if set to 1,
2149 disabled if set to 0.
2150
2151 Default value is 0.
2152
2153 eld_v2
2154 Enable ELDv2 (LD-MPS extension for ELD stereo signals) for ELDv2 if
2155 set to 1, disabled if set to 0.
2156
2157 Note that option is available when fdk-aac version
2158 (AACENCODER_LIB_VL0.AACENCODER_LIB_VL1.AACENCODER_LIB_VL2) >
2159 (4.0.0).
2160
2161 Default value is 0.
2162
2163 signaling
2164 Set SBR/PS signaling style.
2165
2166 It can assume one of the following values:
2167
2168 default
2169 choose signaling implicitly (explicit hierarchical by default,
2170 implicit if global header is disabled)
2171
2172 implicit
2173 implicit backwards compatible signaling
2174
2175 explicit_sbr
2176 explicit SBR, implicit PS signaling
2177
2178 explicit_hierarchical
2179 explicit hierarchical signaling
2180
2181 Default value is default.
2182
2183 latm
2184 Output LATM/LOAS encapsulated data if set to 1, disabled if set to
2185 0.
2186
2187 Default value is 0.
2188
2189 header_period
2190 Set StreamMuxConfig and PCE repetition period (in frames) for
2191 sending in-band configuration buffers within LATM/LOAS transport
2192 layer.
2193
2194 Must be a 16-bits non-negative integer.
2195
2196 Default value is 0.
2197
2198 vbr Set VBR mode, from 1 to 5. 1 is lowest quality (though still pretty
2199 good) and 5 is highest quality. A value of 0 will disable VBR, and
2200 CBR (Constant Bit Rate) is enabled.
2201
2202 Currently only the aac_low profile supports VBR encoding.
2203
2204 VBR modes 1-5 correspond to roughly the following average bit
2205 rates:
2206
2207 1 32 kbps/channel
2208
2209 2 40 kbps/channel
2210
2211 3 48-56 kbps/channel
2212
2213 4 64 kbps/channel
2214
2215 5 about 80-96 kbps/channel
2216
2217 Default value is 0.
2218
2219 Examples
2220
2221 • Use ffmpeg to convert an audio file to VBR AAC in an M4A (MP4)
2222 container:
2223
2224 ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a
2225
2226 • Use ffmpeg to convert an audio file to CBR 64k kbps AAC, using the
2227 High-Efficiency AAC profile:
2228
2229 ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a
2230
2231 libmp3lame
2232 LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper.
2233
2234 Requires the presence of the libmp3lame headers and library during
2235 configuration. You need to explicitly configure the build with
2236 "--enable-libmp3lame".
2237
2238 See libshine for a fixed-point MP3 encoder, although with a lower
2239 quality.
2240
2241 Options
2242
2243 The following options are supported by the libmp3lame wrapper. The
2244 lame-equivalent of the options are listed in parentheses.
2245
2246 b (-b)
2247 Set bitrate expressed in bits/s for CBR or ABR. LAME "bitrate" is
2248 expressed in kilobits/s.
2249
2250 q (-V)
2251 Set constant quality setting for VBR. This option is valid only
2252 using the ffmpeg command-line tool. For library interface users,
2253 use global_quality.
2254
2255 compression_level (-q)
2256 Set algorithm quality. Valid arguments are integers in the 0-9
2257 range, with 0 meaning highest quality but slowest, and 9 meaning
2258 fastest while producing the worst quality.
2259
2260 cutoff (--lowpass)
2261 Set lowpass cutoff frequency. If unspecified, the encoder
2262 dynamically adjusts the cutoff.
2263
2264 reservoir
2265 Enable use of bit reservoir when set to 1. Default value is 1. LAME
2266 has this enabled by default, but can be overridden by use --nores
2267 option.
2268
2269 joint_stereo (-m j)
2270 Enable the encoder to use (on a frame by frame basis) either L/R
2271 stereo or mid/side stereo. Default value is 1.
2272
2273 abr (--abr)
2274 Enable the encoder to use ABR when set to 1. The lame --abr sets
2275 the target bitrate, while this options only tells FFmpeg to use ABR
2276 still relies on b to set bitrate.
2277
2278 libopencore-amrnb
2279 OpenCORE Adaptive Multi-Rate Narrowband encoder.
2280
2281 Requires the presence of the libopencore-amrnb headers and library
2282 during configuration. You need to explicitly configure the build with
2283 "--enable-libopencore-amrnb --enable-version3".
2284
2285 This is a mono-only encoder. Officially it only supports 8000Hz sample
2286 rate, but you can override it by setting strict to unofficial or lower.
2287
2288 Options
2289
2290 b Set bitrate in bits per second. Only the following bitrates are
2291 supported, otherwise libavcodec will round to the nearest valid
2292 bitrate.
2293
2294 4750
2295 5150
2296 5900
2297 6700
2298 7400
2299 7950
2300 10200
2301 12200
2302 dtx Allow discontinuous transmission (generate comfort noise) when set
2303 to 1. The default value is 0 (disabled).
2304
2305 libopus
2306 libopus Opus Interactive Audio Codec encoder wrapper.
2307
2308 Requires the presence of the libopus headers and library during
2309 configuration. You need to explicitly configure the build with
2310 "--enable-libopus".
2311
2312 Option Mapping
2313
2314 Most libopus options are modelled after the opusenc utility from opus-
2315 tools. The following is an option mapping chart describing options
2316 supported by the libopus wrapper, and their opusenc-equivalent in
2317 parentheses.
2318
2319 b (bitrate)
2320 Set the bit rate in bits/s. FFmpeg's b option is expressed in
2321 bits/s, while opusenc's bitrate in kilobits/s.
2322
2323 vbr (vbr, hard-cbr, and cvbr)
2324 Set VBR mode. The FFmpeg vbr option has the following valid
2325 arguments, with the opusenc equivalent options in parentheses:
2326
2327 off (hard-cbr)
2328 Use constant bit rate encoding.
2329
2330 on (vbr)
2331 Use variable bit rate encoding (the default).
2332
2333 constrained (cvbr)
2334 Use constrained variable bit rate encoding.
2335
2336 compression_level (comp)
2337 Set encoding algorithm complexity. Valid options are integers in
2338 the 0-10 range. 0 gives the fastest encodes but lower quality,
2339 while 10 gives the highest quality but slowest encoding. The
2340 default is 10.
2341
2342 frame_duration (framesize)
2343 Set maximum frame size, or duration of a frame in milliseconds. The
2344 argument must be exactly the following: 2.5, 5, 10, 20, 40, 60.
2345 Smaller frame sizes achieve lower latency but less quality at a
2346 given bitrate. Sizes greater than 20ms are only interesting at
2347 fairly low bitrates. The default is 20ms.
2348
2349 packet_loss (expect-loss)
2350 Set expected packet loss percentage. The default is 0.
2351
2352 fec (n/a)
2353 Enable inband forward error correction. packet_loss must be non-
2354 zero to take advantage - frequency of FEC 'side-data' is
2355 proportional to expected packet loss. Default is disabled.
2356
2357 application (N.A.)
2358 Set intended application type. Valid options are listed below:
2359
2360 voip
2361 Favor improved speech intelligibility.
2362
2363 audio
2364 Favor faithfulness to the input (the default).
2365
2366 lowdelay
2367 Restrict to only the lowest delay modes.
2368
2369 cutoff (N.A.)
2370 Set cutoff bandwidth in Hz. The argument must be exactly one of the
2371 following: 4000, 6000, 8000, 12000, or 20000, corresponding to
2372 narrowband, mediumband, wideband, super wideband, and fullband
2373 respectively. The default is 0 (cutoff disabled).
2374
2375 mapping_family (mapping_family)
2376 Set channel mapping family to be used by the encoder. The default
2377 value of -1 uses mapping family 0 for mono and stereo inputs, and
2378 mapping family 1 otherwise. The default also disables the surround
2379 masking and LFE bandwidth optimzations in libopus, and requires
2380 that the input contains 8 channels or fewer.
2381
2382 Other values include 0 for mono and stereo, 1 for surround sound
2383 with masking and LFE bandwidth optimizations, and 255 for
2384 independent streams with an unspecified channel layout.
2385
2386 apply_phase_inv (N.A.) (requires libopus >= 1.2)
2387 If set to 0, disables the use of phase inversion for intensity
2388 stereo, improving the quality of mono downmixes, but slightly
2389 reducing normal stereo quality. The default is 1 (phase inversion
2390 enabled).
2391
2392 libshine
2393 Shine Fixed-Point MP3 encoder wrapper.
2394
2395 Shine is a fixed-point MP3 encoder. It has a far better performance on
2396 platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
2397 However, as it is more targeted on performance than quality, it is not
2398 on par with LAME and other production-grade encoders quality-wise.
2399 Also, according to the project's homepage, this encoder may not be free
2400 of bugs as the code was written a long time ago and the project was
2401 dead for at least 5 years.
2402
2403 This encoder only supports stereo and mono input. This is also CBR-
2404 only.
2405
2406 The original project (last updated in early 2007) is at
2407 <http://sourceforge.net/projects/libshine-fxp/>. We only support the
2408 updated fork by the Savonet/Liquidsoap project at
2409 <https://github.com/savonet/shine>.
2410
2411 Requires the presence of the libshine headers and library during
2412 configuration. You need to explicitly configure the build with
2413 "--enable-libshine".
2414
2415 See also libmp3lame.
2416
2417 Options
2418
2419 The following options are supported by the libshine wrapper. The
2420 shineenc-equivalent of the options are listed in parentheses.
2421
2422 b (-b)
2423 Set bitrate expressed in bits/s for CBR. shineenc -b option is
2424 expressed in kilobits/s.
2425
2426 libtwolame
2427 TwoLAME MP2 encoder wrapper.
2428
2429 Requires the presence of the libtwolame headers and library during
2430 configuration. You need to explicitly configure the build with
2431 "--enable-libtwolame".
2432
2433 Options
2434
2435 The following options are supported by the libtwolame wrapper. The
2436 twolame-equivalent options follow the FFmpeg ones and are in
2437 parentheses.
2438
2439 b (-b)
2440 Set bitrate expressed in bits/s for CBR. twolame b option is
2441 expressed in kilobits/s. Default value is 128k.
2442
2443 q (-V)
2444 Set quality for experimental VBR support. Maximum value range is
2445 from -50 to 50, useful range is from -10 to 10. The higher the
2446 value, the better the quality. This option is valid only using the
2447 ffmpeg command-line tool. For library interface users, use
2448 global_quality.
2449
2450 mode (--mode)
2451 Set the mode of the resulting audio. Possible values:
2452
2453 auto
2454 Choose mode automatically based on the input. This is the
2455 default.
2456
2457 stereo
2458 Stereo
2459
2460 joint_stereo
2461 Joint stereo
2462
2463 dual_channel
2464 Dual channel
2465
2466 mono
2467 Mono
2468
2469 psymodel (--psyc-mode)
2470 Set psychoacoustic model to use in encoding. The argument must be
2471 an integer between -1 and 4, inclusive. The higher the value, the
2472 better the quality. The default value is 3.
2473
2474 energy_levels (--energy)
2475 Enable energy levels extensions when set to 1. The default value is
2476 0 (disabled).
2477
2478 error_protection (--protect)
2479 Enable CRC error protection when set to 1. The default value is 0
2480 (disabled).
2481
2482 copyright (--copyright)
2483 Set MPEG audio copyright flag when set to 1. The default value is 0
2484 (disabled).
2485
2486 original (--original)
2487 Set MPEG audio original flag when set to 1. The default value is 0
2488 (disabled).
2489
2490 libvo-amrwbenc
2491 VisualOn Adaptive Multi-Rate Wideband encoder.
2492
2493 Requires the presence of the libvo-amrwbenc headers and library during
2494 configuration. You need to explicitly configure the build with
2495 "--enable-libvo-amrwbenc --enable-version3".
2496
2497 This is a mono-only encoder. Officially it only supports 16000Hz sample
2498 rate, but you can override it by setting strict to unofficial or lower.
2499
2500 Options
2501
2502 b Set bitrate in bits/s. Only the following bitrates are supported,
2503 otherwise libavcodec will round to the nearest valid bitrate.
2504
2505 6600
2506 8850
2507 12650
2508 14250
2509 15850
2510 18250
2511 19850
2512 23050
2513 23850
2514 dtx Allow discontinuous transmission (generate comfort noise) when set
2515 to 1. The default value is 0 (disabled).
2516
2517 libvorbis
2518 libvorbis encoder wrapper.
2519
2520 Requires the presence of the libvorbisenc headers and library during
2521 configuration. You need to explicitly configure the build with
2522 "--enable-libvorbis".
2523
2524 Options
2525
2526 The following options are supported by the libvorbis wrapper. The
2527 oggenc-equivalent of the options are listed in parentheses.
2528
2529 To get a more accurate and extensive documentation of the libvorbis
2530 options, consult the libvorbisenc's and oggenc's documentations. See
2531 <http://xiph.org/vorbis/>, <http://wiki.xiph.org/Vorbis-tools>, and
2532 oggenc(1).
2533
2534 b (-b)
2535 Set bitrate expressed in bits/s for ABR. oggenc -b is expressed in
2536 kilobits/s.
2537
2538 q (-q)
2539 Set constant quality setting for VBR. The value should be a float
2540 number in the range of -1.0 to 10.0. The higher the value, the
2541 better the quality. The default value is 3.0.
2542
2543 This option is valid only using the ffmpeg command-line tool. For
2544 library interface users, use global_quality.
2545
2546 cutoff (--advanced-encode-option lowpass_frequency=N)
2547 Set cutoff bandwidth in Hz, a value of 0 disables cutoff. oggenc's
2548 related option is expressed in kHz. The default value is 0 (cutoff
2549 disabled).
2550
2551 minrate (-m)
2552 Set minimum bitrate expressed in bits/s. oggenc -m is expressed in
2553 kilobits/s.
2554
2555 maxrate (-M)
2556 Set maximum bitrate expressed in bits/s. oggenc -M is expressed in
2557 kilobits/s. This only has effect on ABR mode.
2558
2559 iblock (--advanced-encode-option impulse_noisetune=N)
2560 Set noise floor bias for impulse blocks. The value is a float
2561 number from -15.0 to 0.0. A negative bias instructs the encoder to
2562 pay special attention to the crispness of transients in the encoded
2563 audio. The tradeoff for better transient response is a higher
2564 bitrate.
2565
2566 mjpeg
2567 Motion JPEG encoder.
2568
2569 Options
2570
2571 huffman
2572 Set the huffman encoding strategy. Possible values:
2573
2574 default
2575 Use the default huffman tables. This is the default strategy.
2576
2577 optimal
2578 Compute and use optimal huffman tables.
2579
2580 wavpack
2581 WavPack lossless audio encoder.
2582
2583 Options
2584
2585 The equivalent options for wavpack command line utility are listed in
2586 parentheses.
2587
2588 Shared options
2589
2590 The following shared options are effective for this encoder. Only
2591 special notes about this particular encoder will be documented here.
2592 For the general meaning of the options, see the Codec Options chapter.
2593
2594 frame_size (--blocksize)
2595 For this encoder, the range for this option is between 128 and
2596 131072. Default is automatically decided based on sample rate and
2597 number of channel.
2598
2599 For the complete formula of calculating default, see
2600 libavcodec/wavpackenc.c.
2601
2602 compression_level (-f, -h, -hh, and -x)
2603
2604 Private options
2605
2606 joint_stereo (-j)
2607 Set whether to enable joint stereo. Valid values are:
2608
2609 on (1)
2610 Force mid/side audio encoding.
2611
2612 off (0)
2613 Force left/right audio encoding.
2614
2615 auto
2616 Let the encoder decide automatically.
2617
2618 optimize_mono
2619 Set whether to enable optimization for mono. This option is only
2620 effective for non-mono streams. Available values:
2621
2622 on enabled
2623
2624 off disabled
2625
2627 A description of some of the currently available video encoders
2628 follows.
2629
2630 a64_multi, a64_multi5
2631 A64 / Commodore 64 multicolor charset encoder. "a64_multi5" is extended
2632 with 5th color (colram).
2633
2634 Cinepak
2635 Cinepak aka CVID encoder. Compatible with Windows 3.1 and vintage
2636 MacOS.
2637
2638 Options
2639
2640 g integer
2641 Keyframe interval. A keyframe is inserted at least every "-g"
2642 frames, sometimes sooner.
2643
2644 q:v integer
2645 Quality factor. Lower is better. Higher gives lower bitrate. The
2646 following table lists bitrates when encoding akiyo_cif.y4m for
2647 various values of "-q:v" with "-g 100":
2648
2649 "-q:v 1" 1918 kb/s
2650 "-q:v 2" 1735 kb/s
2651 "-q:v 4" 1500 kb/s
2652 "-q:v 10" 1041 kb/s
2653 "-q:v 20" 826 kb/s
2654 "-q:v 40" 553 kb/s
2655 "-q:v 100" 394 kb/s
2656 "-q:v 200" 312 kb/s
2657 "-q:v 400" 266 kb/s
2658 "-q:v 1000" 237 kb/s
2659 max_extra_cb_iterations integer
2660 Max extra codebook recalculation passes, more is better and slower.
2661
2662 skip_empty_cb boolean
2663 Avoid wasting bytes, ignore vintage MacOS decoder.
2664
2665 max_strips integer
2666 min_strips integer
2667 The minimum and maximum number of strips to use. Wider range
2668 sometimes improves quality. More strips is generally better
2669 quality but costs more bits. Fewer strips tend to yield more
2670 keyframes. Vintage compatible is 1..3.
2671
2672 strip_number_adaptivity integer
2673 How much number of strips is allowed to change between frames.
2674 Higher is better but slower.
2675
2676 GIF
2677 GIF image/animation encoder.
2678
2679 Options
2680
2681 gifflags integer
2682 Sets the flags used for GIF encoding.
2683
2684 offsetting
2685 Enables picture offsetting.
2686
2687 Default is enabled.
2688
2689 transdiff
2690 Enables transparency detection between frames.
2691
2692 Default is enabled.
2693
2694 gifimage integer
2695 Enables encoding one full GIF image per frame, rather than an
2696 animated GIF.
2697
2698 Default value is 0.
2699
2700 global_palette integer
2701 Writes a palette to the global GIF header where feasible.
2702
2703 If disabled, every frame will always have a palette written, even
2704 if there is a global palette supplied.
2705
2706 Default value is 1.
2707
2708 Hap
2709 Vidvox Hap video encoder.
2710
2711 Options
2712
2713 format integer
2714 Specifies the Hap format to encode.
2715
2716 hap
2717 hap_alpha
2718 hap_q
2719
2720 Default value is hap.
2721
2722 chunks integer
2723 Specifies the number of chunks to split frames into, between 1 and
2724 64. This permits multithreaded decoding of large frames,
2725 potentially at the cost of data-rate. The encoder may modify this
2726 value to divide frames evenly.
2727
2728 Default value is 1.
2729
2730 compressor integer
2731 Specifies the second-stage compressor to use. If set to none,
2732 chunks will be limited to 1, as chunked uncompressed frames offer
2733 no benefit.
2734
2735 none
2736 snappy
2737
2738 Default value is snappy.
2739
2740 jpeg2000
2741 The native jpeg 2000 encoder is lossy by default, the "-q:v" option can
2742 be used to set the encoding quality. Lossless encoding can be selected
2743 with "-pred 1".
2744
2745 Options
2746
2747 format integer
2748 Can be set to either "j2k" or "jp2" (the default) that makes it
2749 possible to store non-rgb pix_fmts.
2750
2751 tile_width integer
2752 Sets tile width. Range is 1 to 1073741824. Default is 256.
2753
2754 tile_height integer
2755 Sets tile height. Range is 1 to 1073741824. Default is 256.
2756
2757 pred integer
2758 Allows setting the discrete wavelet transform (DWT) type
2759
2760 dwt97int (Lossy)
2761 dwt53 (Lossless)
2762
2763 Default is "dwt97int"
2764
2765 sop boolean
2766 Enable this to add SOP marker at the start of each packet. Disabled
2767 by default.
2768
2769 eph boolean
2770 Enable this to add EPH marker at the end of each packet header.
2771 Disabled by default.
2772
2773 prog integer
2774 Sets the progression order to be used by the encoder. Possible
2775 values are:
2776
2777 lrcp
2778 rlcp
2779 rpcl
2780 pcrl
2781 cprl
2782
2783 Set to "lrcp" by default.
2784
2785 layer_rates string
2786 By default, when this option is not used, compression is done using
2787 the quality metric. This option allows for compression using
2788 compression ratio. The compression ratio for each level could be
2789 specified. The compression ratio of a layer "l" species the what
2790 ratio of total file size is contained in the first "l" layers.
2791
2792 Example usage:
2793
2794 ffmpeg -i input.bmp -c:v jpeg2000 -layer_rates "100,10,1" output.j2k
2795
2796 This would compress the image to contain 3 layers, where the data
2797 contained in the first layer would be compressed by 1000 times,
2798 compressed by 100 in the first two layers, and shall contain all
2799 data while using all 3 layers.
2800
2801 librav1e
2802 rav1e AV1 encoder wrapper.
2803
2804 Requires the presence of the rav1e headers and library during
2805 configuration. You need to explicitly configure the build with
2806 "--enable-librav1e".
2807
2808 Options
2809
2810 qmax
2811 Sets the maximum quantizer to use when using bitrate mode.
2812
2813 qmin
2814 Sets the minimum quantizer to use when using bitrate mode.
2815
2816 qp Uses quantizer mode to encode at the given quantizer (0-255).
2817
2818 speed
2819 Selects the speed preset (0-10) to encode with.
2820
2821 tiles
2822 Selects how many tiles to encode with.
2823
2824 tile-rows
2825 Selects how many rows of tiles to encode with.
2826
2827 tile-columns
2828 Selects how many columns of tiles to encode with.
2829
2830 rav1e-params
2831 Set rav1e options using a list of key=value pairs separated by ":".
2832 See rav1e --help for a list of options.
2833
2834 For example to specify librav1e encoding options with
2835 -rav1e-params:
2836
2837 ffmpeg -i input -c:v librav1e -b:v 500K -rav1e-params speed=5:low_latency=true output.mp4
2838
2839 libaom-av1
2840 libaom AV1 encoder wrapper.
2841
2842 Requires the presence of the libaom headers and library during
2843 configuration. You need to explicitly configure the build with
2844 "--enable-libaom".
2845
2846 Options
2847
2848 The wrapper supports the following standard libavcodec options:
2849
2850 b Set bitrate target in bits/second. By default this will use
2851 variable-bitrate mode. If maxrate and minrate are also set to the
2852 same value then it will use constant-bitrate mode, otherwise if crf
2853 is set as well then it will use constrained-quality mode.
2854
2855 g keyint_min
2856 Set key frame placement. The GOP size sets the maximum distance
2857 between key frames; if zero the output stream will be intra-only.
2858 The minimum distance is ignored unless it is the same as the GOP
2859 size, in which case key frames will always appear at a fixed
2860 interval. Not set by default, so without this option the library
2861 has completely free choice about where to place key frames.
2862
2863 qmin qmax
2864 Set minimum/maximum quantisation values. Valid range is from 0 to
2865 63 (warning: this does not match the quantiser values actually used
2866 by AV1 - divide by four to map real quantiser values to this
2867 range). Defaults to min/max (no constraint).
2868
2869 minrate maxrate bufsize rc_init_occupancy
2870 Set rate control buffering parameters. Not used if not set -
2871 defaults to unconstrained variable bitrate.
2872
2873 threads
2874 Set the number of threads to use while encoding. This may require
2875 the tiles or row-mt options to also be set to actually use the
2876 specified number of threads fully. Defaults to the number of
2877 hardware threads supported by the host machine.
2878
2879 profile
2880 Set the encoding profile. Defaults to using the profile which
2881 matches the bit depth and chroma subsampling of the input.
2882
2883 The wrapper also has some specific options:
2884
2885 cpu-used
2886 Set the quality/encoding speed tradeoff. Valid range is from 0 to
2887 8, higher numbers indicating greater speed and lower quality. The
2888 default value is 1, which will be slow and high quality.
2889
2890 auto-alt-ref
2891 Enable use of alternate reference frames. Defaults to the internal
2892 default of the library.
2893
2894 arnr-max-frames (frames)
2895 Set altref noise reduction max frame count. Default is -1.
2896
2897 arnr-strength (strength)
2898 Set altref noise reduction filter strength. Range is -1 to 6.
2899 Default is -1.
2900
2901 aq-mode (aq-mode)
2902 Set adaptive quantization mode. Possible values:
2903
2904 none (0)
2905 Disabled.
2906
2907 variance (1)
2908 Variance-based.
2909
2910 complexity (2)
2911 Complexity-based.
2912
2913 cyclic (3)
2914 Cyclic refresh.
2915
2916 tune (tune)
2917 Set the distortion metric the encoder is tuned with. Default is
2918 "psnr".
2919
2920 psnr (0)
2921 ssim (1)
2922 lag-in-frames
2923 Set the maximum number of frames which the encoder may keep in
2924 flight at any one time for lookahead purposes. Defaults to the
2925 internal default of the library.
2926
2927 error-resilience
2928 Enable error resilience features:
2929
2930 default
2931 Improve resilience against losses of whole frames.
2932
2933 Not enabled by default.
2934
2935 crf Set the quality/size tradeoff for constant-quality (no bitrate
2936 target) and constrained-quality (with maximum bitrate target)
2937 modes. Valid range is 0 to 63, higher numbers indicating lower
2938 quality and smaller output size. Only used if set; by default only
2939 the bitrate target is used.
2940
2941 static-thresh
2942 Set a change threshold on blocks below which they will be skipped
2943 by the encoder. Defined in arbitrary units as a nonnegative
2944 integer, defaulting to zero (no blocks are skipped).
2945
2946 drop-threshold
2947 Set a threshold for dropping frames when close to rate control
2948 bounds. Defined as a percentage of the target buffer - when the
2949 rate control buffer falls below this percentage, frames will be
2950 dropped until it has refilled above the threshold. Defaults to
2951 zero (no frames are dropped).
2952
2953 denoise-noise-level (level)
2954 Amount of noise to be removed for grain synthesis. Grain synthesis
2955 is disabled if this option is not set or set to 0.
2956
2957 denoise-block-size (pixels)
2958 Block size used for denoising for grain synthesis. If not set, AV1
2959 codec uses the default value of 32.
2960
2961 undershoot-pct (pct)
2962 Set datarate undershoot (min) percentage of the target bitrate.
2963 Range is -1 to 100. Default is -1.
2964
2965 overshoot-pct (pct)
2966 Set datarate overshoot (max) percentage of the target bitrate.
2967 Range is -1 to 1000. Default is -1.
2968
2969 minsection-pct (pct)
2970 Minimum percentage variation of the GOP bitrate from the target
2971 bitrate. If minsection-pct is not set, the libaomenc wrapper
2972 computes it as follows: "(minrate * 100 / bitrate)". Range is -1
2973 to 100. Default is -1 (unset).
2974
2975 maxsection-pct (pct)
2976 Maximum percentage variation of the GOP bitrate from the target
2977 bitrate. If maxsection-pct is not set, the libaomenc wrapper
2978 computes it as follows: "(maxrate * 100 / bitrate)". Range is -1
2979 to 5000. Default is -1 (unset).
2980
2981 frame-parallel (boolean)
2982 Enable frame parallel decodability features. Default is true.
2983
2984 tiles
2985 Set the number of tiles to encode the input video with, as columns
2986 x rows. Larger numbers allow greater parallelism in both encoding
2987 and decoding, but may decrease coding efficiency. Defaults to the
2988 minimum number of tiles required by the size of the input video
2989 (this is 1x1 (that is, a single tile) for sizes up to and including
2990 4K).
2991
2992 tile-columns tile-rows
2993 Set the number of tiles as log2 of the number of tile rows and
2994 columns. Provided for compatibility with libvpx/VP9.
2995
2996 row-mt (Requires libaom >= 1.0.0-759-g90a15f4f2)
2997 Enable row based multi-threading. Disabled by default.
2998
2999 enable-cdef (boolean)
3000 Enable Constrained Directional Enhancement Filter. The libaom-av1
3001 encoder enables CDEF by default.
3002
3003 enable-restoration (boolean)
3004 Enable Loop Restoration Filter. Default is true for libaom-av1.
3005
3006 enable-global-motion (boolean)
3007 Enable the use of global motion for block prediction. Default is
3008 true.
3009
3010 enable-intrabc (boolean)
3011 Enable block copy mode for intra block prediction. This mode is
3012 useful for screen content. Default is true.
3013
3014 enable-rect-partitions (boolean) (Requires libaom >= v2.0.0)
3015 Enable rectangular partitions. Default is true.
3016
3017 enable-1to4-partitions (boolean) (Requires libaom >= v2.0.0)
3018 Enable 1:4/4:1 partitions. Default is true.
3019
3020 enable-ab-partitions (boolean) (Requires libaom >= v2.0.0)
3021 Enable AB shape partitions. Default is true.
3022
3023 enable-angle-delta (boolean) (Requires libaom >= v2.0.0)
3024 Enable angle delta intra prediction. Default is true.
3025
3026 enable-cfl-intra (boolean) (Requires libaom >= v2.0.0)
3027 Enable chroma predicted from luma intra prediction. Default is
3028 true.
3029
3030 enable-filter-intra (boolean) (Requires libaom >= v2.0.0)
3031 Enable filter intra predictor. Default is true.
3032
3033 enable-intra-edge-filter (boolean) (Requires libaom >= v2.0.0)
3034 Enable intra edge filter. Default is true.
3035
3036 enable-smooth-intra (boolean) (Requires libaom >= v2.0.0)
3037 Enable smooth intra prediction mode. Default is true.
3038
3039 enable-paeth-intra (boolean) (Requires libaom >= v2.0.0)
3040 Enable paeth predictor in intra prediction. Default is true.
3041
3042 enable-palette (boolean) (Requires libaom >= v2.0.0)
3043 Enable palette prediction mode. Default is true.
3044
3045 enable-flip-idtx (boolean) (Requires libaom >= v2.0.0)
3046 Enable extended transform type, including FLIPADST_DCT,
3047 DCT_FLIPADST, FLIPADST_FLIPADST, ADST_FLIPADST, FLIPADST_ADST,
3048 IDTX, V_DCT, H_DCT, V_ADST, H_ADST, V_FLIPADST, H_FLIPADST. Default
3049 is true.
3050
3051 enable-tx64 (boolean) (Requires libaom >= v2.0.0)
3052 Enable 64-pt transform. Default is true.
3053
3054 reduced-tx-type-set (boolean) (Requires libaom >= v2.0.0)
3055 Use reduced set of transform types. Default is false.
3056
3057 use-intra-dct-only (boolean) (Requires libaom >= v2.0.0)
3058 Use DCT only for INTRA modes. Default is false.
3059
3060 use-inter-dct-only (boolean) (Requires libaom >= v2.0.0)
3061 Use DCT only for INTER modes. Default is false.
3062
3063 use-intra-default-tx-only (boolean) (Requires libaom >= v2.0.0)
3064 Use Default-transform only for INTRA modes. Default is false.
3065
3066 enable-ref-frame-mvs (boolean) (Requires libaom >= v2.0.0)
3067 Enable temporal mv prediction. Default is true.
3068
3069 enable-reduced-reference-set (boolean) (Requires libaom >= v2.0.0)
3070 Use reduced set of single and compound references. Default is
3071 false.
3072
3073 enable-obmc (boolean) (Requires libaom >= v2.0.0)
3074 Enable obmc. Default is true.
3075
3076 enable-dual-filter (boolean) (Requires libaom >= v2.0.0)
3077 Enable dual filter. Default is true.
3078
3079 enable-diff-wtd-comp (boolean) (Requires libaom >= v2.0.0)
3080 Enable difference-weighted compound. Default is true.
3081
3082 enable-dist-wtd-comp (boolean) (Requires libaom >= v2.0.0)
3083 Enable distance-weighted compound. Default is true.
3084
3085 enable-onesided-comp (boolean) (Requires libaom >= v2.0.0)
3086 Enable one sided compound. Default is true.
3087
3088 enable-interinter-wedge (boolean) (Requires libaom >= v2.0.0)
3089 Enable interinter wedge compound. Default is true.
3090
3091 enable-interintra-wedge (boolean) (Requires libaom >= v2.0.0)
3092 Enable interintra wedge compound. Default is true.
3093
3094 enable-masked-comp (boolean) (Requires libaom >= v2.0.0)
3095 Enable masked compound. Default is true.
3096
3097 enable-interintra-comp (boolean) (Requires libaom >= v2.0.0)
3098 Enable interintra compound. Default is true.
3099
3100 enable-smooth-interintra (boolean) (Requires libaom >= v2.0.0)
3101 Enable smooth interintra mode. Default is true.
3102
3103 aom-params
3104 Set libaom options using a list of key=value pairs separated by
3105 ":". For a list of supported options, see aomenc --help under the
3106 section "AV1 Specific Options".
3107
3108 For example to specify libaom encoding options with -aom-params:
3109
3110 ffmpeg -i input -c:v libaom-av1 -b:v 500K -aom-params tune=psnr:enable-tpl-model=1 output.mp4
3111
3112 libsvtav1
3113 SVT-AV1 encoder wrapper.
3114
3115 Requires the presence of the SVT-AV1 headers and library during
3116 configuration. You need to explicitly configure the build with
3117 "--enable-libsvtav1".
3118
3119 Options
3120
3121 profile
3122 Set the encoding profile.
3123
3124 main
3125 high
3126 professional
3127 level
3128 Set the operating point level. For example: '4.0'
3129
3130 hielevel
3131 Set the Hierarchical prediction levels.
3132
3133 3level
3134 4level
3135 This is the default.
3136
3137 tier
3138 Set the operating point tier.
3139
3140 main
3141 This is the default.
3142
3143 high
3144 qmax
3145 Set the maximum quantizer to use when using a bitrate mode.
3146
3147 qmin
3148 Set the minimum quantizer to use when using a bitrate mode.
3149
3150 crf Constant rate factor value used in crf rate control mode (0-63).
3151
3152 qp Set the quantizer used in cqp rate control mode (0-63).
3153
3154 sc_detection
3155 Enable scene change detection.
3156
3157 la_depth
3158 Set number of frames to look ahead (0-120).
3159
3160 preset
3161 Set the quality-speed tradeoff, in the range 0 to 13. Higher
3162 values are faster but lower quality.
3163
3164 tile_rows
3165 Set log2 of the number of rows of tiles to use (0-6).
3166
3167 tile_columns
3168 Set log2 of the number of columns of tiles to use (0-4).
3169
3170 svtav1-params
3171 Set SVT-AV1 options using a list of key=value pairs separated by
3172 ":". See the SVT-AV1 encoder user guide for a list of accepted
3173 parameters.
3174
3175 libjxl
3176 libjxl JPEG XL encoder wrapper.
3177
3178 Requires the presence of the libjxl headers and library during
3179 configuration. You need to explicitly configure the build with
3180 "--enable-libjxl".
3181
3182 Options
3183
3184 The libjxl wrapper supports the following options:
3185
3186 distance
3187 Set the target Butteraugli distance. This is a quality setting:
3188 lower distance yields higher quality, with distance=1.0 roughly
3189 comparable to libjpeg Quality 90 for photographic content. Setting
3190 distance=0.0 yields true lossless encoding. Valid values range
3191 between 0.0 and 15.0, and sane values rarely exceed 5.0. Setting
3192 distance=0.1 usually attains transparency for most input. The
3193 default is 1.0.
3194
3195 effort
3196 Set the encoding effort used. Higher effort values produce more
3197 consistent quality and usually produces a better quality/bpp curve,
3198 at the cost of more CPU time required. Valid values range from 1 to
3199 9, and the default is 7.
3200
3201 modular
3202 Force the encoder to use Modular mode instead of choosing
3203 automatically. The default is to use VarDCT for lossy encoding and
3204 Modular for lossless. VarDCT is generally superior to Modular for
3205 lossy encoding but does not support lossless encoding.
3206
3207 libkvazaar
3208 Kvazaar H.265/HEVC encoder.
3209
3210 Requires the presence of the libkvazaar headers and library during
3211 configuration. You need to explicitly configure the build with
3212 --enable-libkvazaar.
3213
3214 Options
3215
3216 b Set target video bitrate in bit/s and enable rate control.
3217
3218 kvazaar-params
3219 Set kvazaar parameters as a list of name=value pairs separated by
3220 commas (,). See kvazaar documentation for a list of options.
3221
3222 libopenh264
3223 Cisco libopenh264 H.264/MPEG-4 AVC encoder wrapper.
3224
3225 This encoder requires the presence of the libopenh264 headers and
3226 library during configuration. You need to explicitly configure the
3227 build with "--enable-libopenh264". The library is detected using pkg-
3228 config.
3229
3230 For more information about the library see <http://www.openh264.org>.
3231
3232 Options
3233
3234 The following FFmpeg global options affect the configurations of the
3235 libopenh264 encoder.
3236
3237 b Set the bitrate (as a number of bits per second).
3238
3239 g Set the GOP size.
3240
3241 maxrate
3242 Set the max bitrate (as a number of bits per second).
3243
3244 flags +global_header
3245 Set global header in the bitstream.
3246
3247 slices
3248 Set the number of slices, used in parallelized encoding. Default
3249 value is 0. This is only used when slice_mode is set to fixed.
3250
3251 loopfilter
3252 Enable loop filter, if set to 1 (automatically enabled). To disable
3253 set a value of 0.
3254
3255 profile
3256 Set profile restrictions. If set to the value of main enable CABAC
3257 (set the "SEncParamExt.iEntropyCodingModeFlag" flag to 1).
3258
3259 max_nal_size
3260 Set maximum NAL size in bytes.
3261
3262 allow_skip_frames
3263 Allow skipping frames to hit the target bitrate if set to 1.
3264
3265 libtheora
3266 libtheora Theora encoder wrapper.
3267
3268 Requires the presence of the libtheora headers and library during
3269 configuration. You need to explicitly configure the build with
3270 "--enable-libtheora".
3271
3272 For more information about the libtheora project see
3273 <http://www.theora.org/>.
3274
3275 Options
3276
3277 The following global options are mapped to internal libtheora options
3278 which affect the quality and the bitrate of the encoded stream.
3279
3280 b Set the video bitrate in bit/s for CBR (Constant Bit Rate) mode.
3281 In case VBR (Variable Bit Rate) mode is enabled this option is
3282 ignored.
3283
3284 flags
3285 Used to enable constant quality mode (VBR) encoding through the
3286 qscale flag, and to enable the "pass1" and "pass2" modes.
3287
3288 g Set the GOP size.
3289
3290 global_quality
3291 Set the global quality as an integer in lambda units.
3292
3293 Only relevant when VBR mode is enabled with "flags +qscale". The
3294 value is converted to QP units by dividing it by "FF_QP2LAMBDA",
3295 clipped in the [0 - 10] range, and then multiplied by 6.3 to get a
3296 value in the native libtheora range [0-63]. A higher value
3297 corresponds to a higher quality.
3298
3299 q Enable VBR mode when set to a non-negative value, and set constant
3300 quality value as a double floating point value in QP units.
3301
3302 The value is clipped in the [0-10] range, and then multiplied by
3303 6.3 to get a value in the native libtheora range [0-63].
3304
3305 This option is valid only using the ffmpeg command-line tool. For
3306 library interface users, use global_quality.
3307
3308 Examples
3309
3310 • Set maximum constant quality (VBR) encoding with ffmpeg:
3311
3312 ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg
3313
3314 • Use ffmpeg to convert a CBR 1000 kbps Theora video stream:
3315
3316 ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg
3317
3318 libvpx
3319 VP8/VP9 format supported through libvpx.
3320
3321 Requires the presence of the libvpx headers and library during
3322 configuration. You need to explicitly configure the build with
3323 "--enable-libvpx".
3324
3325 Options
3326
3327 The following options are supported by the libvpx wrapper. The
3328 vpxenc-equivalent options or values are listed in parentheses for easy
3329 migration.
3330
3331 To reduce the duplication of documentation, only the private options
3332 and some others requiring special attention are documented here. For
3333 the documentation of the undocumented generic options, see the Codec
3334 Options chapter.
3335
3336 To get more documentation of the libvpx options, invoke the command
3337 ffmpeg -h encoder=libvpx, ffmpeg -h encoder=libvpx-vp9 or vpxenc
3338 --help. Further information is available in the libvpx API
3339 documentation.
3340
3341 b (target-bitrate)
3342 Set bitrate in bits/s. Note that FFmpeg's b option is expressed in
3343 bits/s, while vpxenc's target-bitrate is in kilobits/s.
3344
3345 g (kf-max-dist)
3346 keyint_min (kf-min-dist)
3347 qmin (min-q)
3348 Minimum (Best Quality) Quantizer.
3349
3350 qmax (max-q)
3351 Maximum (Worst Quality) Quantizer. Can be changed per-frame.
3352
3353 bufsize (buf-sz, buf-optimal-sz)
3354 Set ratecontrol buffer size (in bits). Note vpxenc's options are
3355 specified in milliseconds, the libvpx wrapper converts this value
3356 as follows: "buf-sz = bufsize * 1000 / bitrate", "buf-optimal-sz =
3357 bufsize * 1000 / bitrate * 5 / 6".
3358
3359 rc_init_occupancy (buf-initial-sz)
3360 Set number of bits which should be loaded into the rc buffer before
3361 decoding starts. Note vpxenc's option is specified in milliseconds,
3362 the libvpx wrapper converts this value as follows:
3363 "rc_init_occupancy * 1000 / bitrate".
3364
3365 undershoot-pct
3366 Set datarate undershoot (min) percentage of the target bitrate.
3367
3368 overshoot-pct
3369 Set datarate overshoot (max) percentage of the target bitrate.
3370
3371 skip_threshold (drop-frame)
3372 qcomp (bias-pct)
3373 maxrate (maxsection-pct)
3374 Set GOP max bitrate in bits/s. Note vpxenc's option is specified as
3375 a percentage of the target bitrate, the libvpx wrapper converts
3376 this value as follows: "(maxrate * 100 / bitrate)".
3377
3378 minrate (minsection-pct)
3379 Set GOP min bitrate in bits/s. Note vpxenc's option is specified as
3380 a percentage of the target bitrate, the libvpx wrapper converts
3381 this value as follows: "(minrate * 100 / bitrate)".
3382
3383 minrate, maxrate, b end-usage=cbr
3384 "(minrate == maxrate == bitrate)".
3385
3386 crf (end-usage=cq, cq-level)
3387 tune (tune)
3388 psnr (psnr)
3389 ssim (ssim)
3390 quality, deadline (deadline)
3391 best
3392 Use best quality deadline. Poorly named and quite slow, this
3393 option should be avoided as it may give worse quality output
3394 than good.
3395
3396 good
3397 Use good quality deadline. This is a good trade-off between
3398 speed and quality when used with the cpu-used option.
3399
3400 realtime
3401 Use realtime quality deadline.
3402
3403 speed, cpu-used (cpu-used)
3404 Set quality/speed ratio modifier. Higher values speed up the encode
3405 at the cost of quality.
3406
3407 nr (noise-sensitivity)
3408 static-thresh
3409 Set a change threshold on blocks below which they will be skipped
3410 by the encoder.
3411
3412 slices (token-parts)
3413 Note that FFmpeg's slices option gives the total number of
3414 partitions, while vpxenc's token-parts is given as
3415 log2(partitions).
3416
3417 max-intra-rate
3418 Set maximum I-frame bitrate as a percentage of the target bitrate.
3419 A value of 0 means unlimited.
3420
3421 force_key_frames
3422 "VPX_EFLAG_FORCE_KF"
3423
3424 Alternate reference frame related
3425 auto-alt-ref
3426 Enable use of alternate reference frames (2-pass only). Values
3427 greater than 1 enable multi-layer alternate reference frames
3428 (VP9 only).
3429
3430 arnr-maxframes
3431 Set altref noise reduction max frame count.
3432
3433 arnr-type
3434 Set altref noise reduction filter type: backward, forward,
3435 centered.
3436
3437 arnr-strength
3438 Set altref noise reduction filter strength.
3439
3440 rc-lookahead, lag-in-frames (lag-in-frames)
3441 Set number of frames to look ahead for frametype and
3442 ratecontrol.
3443
3444 min-gf-interval
3445 Set minimum golden/alternate reference frame interval (VP9
3446 only).
3447
3448 error-resilient
3449 Enable error resiliency features.
3450
3451 sharpness integer
3452 Increase sharpness at the expense of lower PSNR. The valid range
3453 is [0, 7].
3454
3455 ts-parameters
3456 Sets the temporal scalability configuration using a :-separated
3457 list of key=value pairs. For example, to specify temporal
3458 scalability parameters with "ffmpeg":
3459
3460 ffmpeg -i INPUT -c:v libvpx -ts-parameters ts_number_layers=3:\
3461 ts_target_bitrate=250,500,1000:ts_rate_decimator=4,2,1:\
3462 ts_periodicity=4:ts_layer_id=0,2,1,2:ts_layering_mode=3 OUTPUT
3463
3464 Below is a brief explanation of each of the parameters, please
3465 refer to "struct vpx_codec_enc_cfg" in "vpx/vpx_encoder.h" for more
3466 details.
3467
3468 ts_number_layers
3469 Number of temporal coding layers.
3470
3471 ts_target_bitrate
3472 Target bitrate for each temporal layer (in kbps). (bitrate
3473 should be inclusive of the lower temporal layer).
3474
3475 ts_rate_decimator
3476 Frame rate decimation factor for each temporal layer.
3477
3478 ts_periodicity
3479 Length of the sequence defining frame temporal layer
3480 membership.
3481
3482 ts_layer_id
3483 Template defining the membership of frames to temporal layers.
3484
3485 ts_layering_mode
3486 (optional) Selecting the temporal structure from a set of pre-
3487 defined temporal layering modes. Currently supports the
3488 following options.
3489
3490 0 No temporal layering flags are provided internally, relies
3491 on flags being passed in using "metadata" field in
3492 "AVFrame" with following keys.
3493
3494 vp8-flags
3495 Sets the flags passed into the encoder to indicate the
3496 referencing scheme for the current frame. Refer to
3497 function "vpx_codec_encode" in "vpx/vpx_encoder.h" for
3498 more details.
3499
3500 temporal_id
3501 Explicitly sets the temporal id of the current frame to
3502 encode.
3503
3504 2 Two temporal layers. 0-1...
3505
3506 3 Three temporal layers. 0-2-1-2...; with single reference
3507 frame.
3508
3509 4 Same as option "3", except there is a dependency between
3510 the two temporal layer 2 frames within the temporal period.
3511
3512 VP9-specific options
3513 lossless
3514 Enable lossless mode.
3515
3516 tile-columns
3517 Set number of tile columns to use. Note this is given as
3518 log2(tile_columns). For example, 8 tile columns would be
3519 requested by setting the tile-columns option to 3.
3520
3521 tile-rows
3522 Set number of tile rows to use. Note this is given as
3523 log2(tile_rows). For example, 4 tile rows would be requested
3524 by setting the tile-rows option to 2.
3525
3526 frame-parallel
3527 Enable frame parallel decodability features.
3528
3529 aq-mode
3530 Set adaptive quantization mode (0: off (default), 1: variance
3531 2: complexity, 3: cyclic refresh, 4: equator360).
3532
3533 colorspace color-space
3534 Set input color space. The VP9 bitstream supports signaling the
3535 following colorspaces:
3536
3537 rgb sRGB
3538 bt709 bt709
3539 unspecified unknown
3540 bt470bg bt601
3541 smpte170m smpte170
3542 smpte240m smpte240
3543 bt2020_ncl bt2020
3544 row-mt boolean
3545 Enable row based multi-threading.
3546
3547 tune-content
3548 Set content type: default (0), screen (1), film (2).
3549
3550 corpus-complexity
3551 Corpus VBR mode is a variant of standard VBR where the
3552 complexity distribution midpoint is passed in rather than
3553 calculated for a specific clip or chunk.
3554
3555 The valid range is [0, 10000]. 0 (default) uses standard VBR.
3556
3557 enable-tpl boolean
3558 Enable temporal dependency model.
3559
3560 ref-frame-config
3561 Using per-frame metadata, set members of the structure
3562 "vpx_svc_ref_frame_config_t" in "vpx/vp8cx.h" to fine-control
3563 referencing schemes and frame buffer management. Use a
3564 :-separated list of key=value pairs. For example,
3565
3566 av_dict_set(&av_frame->metadata, "ref-frame-config", \
3567 "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");
3568
3569 rfc_update_buffer_slot
3570 Indicates the buffer slot number to update
3571
3572 rfc_update_last
3573 Indicates whether to update the LAST frame
3574
3575 rfc_update_golden
3576 Indicates whether to update GOLDEN frame
3577
3578 rfc_update_alt_ref
3579 Indicates whether to update ALT_REF frame
3580
3581 rfc_lst_fb_idx
3582 LAST frame buffer index
3583
3584 rfc_gld_fb_idx
3585 GOLDEN frame buffer index
3586
3587 rfc_alt_fb_idx
3588 ALT_REF frame buffer index
3589
3590 rfc_reference_last
3591 Indicates whether to reference LAST frame
3592
3593 rfc_reference_golden
3594 Indicates whether to reference GOLDEN frame
3595
3596 rfc_reference_alt_ref
3597 Indicates whether to reference ALT_REF frame
3598
3599 rfc_reference_duration
3600 Indicates frame duration
3601
3602 For more information about libvpx see: <http://www.webmproject.org/>
3603
3604 libwebp
3605 libwebp WebP Image encoder wrapper
3606
3607 libwebp is Google's official encoder for WebP images. It can encode in
3608 either lossy or lossless mode. Lossy images are essentially a wrapper
3609 around a VP8 frame. Lossless images are a separate codec developed by
3610 Google.
3611
3612 Pixel Format
3613
3614 Currently, libwebp only supports YUV420 for lossy and RGB for lossless
3615 due to limitations of the format and libwebp. Alpha is supported for
3616 either mode. Because of API limitations, if RGB is passed in when
3617 encoding lossy or YUV is passed in for encoding lossless, the pixel
3618 format will automatically be converted using functions from libwebp.
3619 This is not ideal and is done only for convenience.
3620
3621 Options
3622
3623 -lossless boolean
3624 Enables/Disables use of lossless mode. Default is 0.
3625
3626 -compression_level integer
3627 For lossy, this is a quality/speed tradeoff. Higher values give
3628 better quality for a given size at the cost of increased encoding
3629 time. For lossless, this is a size/speed tradeoff. Higher values
3630 give smaller size at the cost of increased encoding time. More
3631 specifically, it controls the number of extra algorithms and
3632 compression tools used, and varies the combination of these tools.
3633 This maps to the method option in libwebp. The valid range is 0 to
3634 6. Default is 4.
3635
3636 -quality float
3637 For lossy encoding, this controls image quality. For lossless
3638 encoding, this controls the effort and time spent in compression.
3639 Range is 0 to 100. Default is 75.
3640
3641 -preset type
3642 Configuration preset. This does some automatic settings based on
3643 the general type of the image.
3644
3645 none
3646 Do not use a preset.
3647
3648 default
3649 Use the encoder default.
3650
3651 picture
3652 Digital picture, like portrait, inner shot
3653
3654 photo
3655 Outdoor photograph, with natural lighting
3656
3657 drawing
3658 Hand or line drawing, with high-contrast details
3659
3660 icon
3661 Small-sized colorful images
3662
3663 text
3664 Text-like
3665
3666 libx264, libx264rgb
3667 x264 H.264/MPEG-4 AVC encoder wrapper.
3668
3669 This encoder requires the presence of the libx264 headers and library
3670 during configuration. You need to explicitly configure the build with
3671 "--enable-libx264".
3672
3673 libx264 supports an impressive number of features, including 8x8 and
3674 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
3675 entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
3676 for detail retention (adaptive quantization, psy-RD, psy-trellis).
3677
3678 Many libx264 encoder options are mapped to FFmpeg global codec options,
3679 while unique encoder options are provided through private options.
3680 Additionally the x264opts and x264-params private options allows one to
3681 pass a list of key=value tuples as accepted by the libx264
3682 "x264_param_parse" function.
3683
3684 The x264 project website is at
3685 <http://www.videolan.org/developers/x264.html>.
3686
3687 The libx264rgb encoder is the same as libx264, except it accepts packed
3688 RGB pixel formats as input instead of YUV.
3689
3690 Supported Pixel Formats
3691
3692 x264 supports 8- to 10-bit color spaces. The exact bit depth is
3693 controlled at x264's configure time.
3694
3695 Options
3696
3697 The following options are supported by the libx264 wrapper. The
3698 x264-equivalent options or values are listed in parentheses for easy
3699 migration.
3700
3701 To reduce the duplication of documentation, only the private options
3702 and some others requiring special attention are documented here. For
3703 the documentation of the undocumented generic options, see the Codec
3704 Options chapter.
3705
3706 To get a more accurate and extensive documentation of the libx264
3707 options, invoke the command x264 --fullhelp or consult the libx264
3708 documentation.
3709
3710 b (bitrate)
3711 Set bitrate in bits/s. Note that FFmpeg's b option is expressed in
3712 bits/s, while x264's bitrate is in kilobits/s.
3713
3714 bf (bframes)
3715 g (keyint)
3716 qmin (qpmin)
3717 Minimum quantizer scale.
3718
3719 qmax (qpmax)
3720 Maximum quantizer scale.
3721
3722 qdiff (qpstep)
3723 Maximum difference between quantizer scales.
3724
3725 qblur (qblur)
3726 Quantizer curve blur
3727
3728 qcomp (qcomp)
3729 Quantizer curve compression factor
3730
3731 refs (ref)
3732 Number of reference frames each P-frame can use. The range is from
3733 0-16.
3734
3735 sc_threshold (scenecut)
3736 Sets the threshold for the scene change detection.
3737
3738 trellis (trellis)
3739 Performs Trellis quantization to increase efficiency. Enabled by
3740 default.
3741
3742 nr (nr)
3743 me_range (merange)
3744 Maximum range of the motion search in pixels.
3745
3746 me_method (me)
3747 Set motion estimation method. Possible values in the decreasing
3748 order of speed:
3749
3750 dia (dia)
3751 epzs (dia)
3752 Diamond search with radius 1 (fastest). epzs is an alias for
3753 dia.
3754
3755 hex (hex)
3756 Hexagonal search with radius 2.
3757
3758 umh (umh)
3759 Uneven multi-hexagon search.
3760
3761 esa (esa)
3762 Exhaustive search.
3763
3764 tesa (tesa)
3765 Hadamard exhaustive search (slowest).
3766
3767 forced-idr
3768 Normally, when forcing a I-frame type, the encoder can select any
3769 type of I-frame. This option forces it to choose an IDR-frame.
3770
3771 subq (subme)
3772 Sub-pixel motion estimation method.
3773
3774 b_strategy (b-adapt)
3775 Adaptive B-frame placement decision algorithm. Use only on first-
3776 pass.
3777
3778 keyint_min (min-keyint)
3779 Minimum GOP size.
3780
3781 coder
3782 Set entropy encoder. Possible values:
3783
3784 ac Enable CABAC.
3785
3786 vlc Enable CAVLC and disable CABAC. It generates the same effect as
3787 x264's --no-cabac option.
3788
3789 cmp Set full pixel motion estimation comparison algorithm. Possible
3790 values:
3791
3792 chroma
3793 Enable chroma in motion estimation.
3794
3795 sad Ignore chroma in motion estimation. It generates the same
3796 effect as x264's --no-chroma-me option.
3797
3798 threads (threads)
3799 Number of encoding threads.
3800
3801 thread_type
3802 Set multithreading technique. Possible values:
3803
3804 slice
3805 Slice-based multithreading. It generates the same effect as
3806 x264's --sliced-threads option.
3807
3808 frame
3809 Frame-based multithreading.
3810
3811 flags
3812 Set encoding flags. It can be used to disable closed GOP and enable
3813 open GOP by setting it to "-cgop". The result is similar to the
3814 behavior of x264's --open-gop option.
3815
3816 rc_init_occupancy (vbv-init)
3817 preset (preset)
3818 Set the encoding preset.
3819
3820 tune (tune)
3821 Set tuning of the encoding params.
3822
3823 profile (profile)
3824 Set profile restrictions.
3825
3826 fastfirstpass
3827 Enable fast settings when encoding first pass, when set to 1. When
3828 set to 0, it has the same effect of x264's --slow-firstpass option.
3829
3830 crf (crf)
3831 Set the quality for constant quality mode.
3832
3833 crf_max (crf-max)
3834 In CRF mode, prevents VBV from lowering quality beyond this point.
3835
3836 qp (qp)
3837 Set constant quantization rate control method parameter.
3838
3839 aq-mode (aq-mode)
3840 Set AQ method. Possible values:
3841
3842 none (0)
3843 Disabled.
3844
3845 variance (1)
3846 Variance AQ (complexity mask).
3847
3848 autovariance (2)
3849 Auto-variance AQ (experimental).
3850
3851 aq-strength (aq-strength)
3852 Set AQ strength, reduce blocking and blurring in flat and textured
3853 areas.
3854
3855 psy Use psychovisual optimizations when set to 1. When set to 0, it has
3856 the same effect as x264's --no-psy option.
3857
3858 psy-rd (psy-rd)
3859 Set strength of psychovisual optimization, in psy-rd:psy-trellis
3860 format.
3861
3862 rc-lookahead (rc-lookahead)
3863 Set number of frames to look ahead for frametype and ratecontrol.
3864
3865 weightb
3866 Enable weighted prediction for B-frames when set to 1. When set to
3867 0, it has the same effect as x264's --no-weightb option.
3868
3869 weightp (weightp)
3870 Set weighted prediction method for P-frames. Possible values:
3871
3872 none (0)
3873 Disabled
3874
3875 simple (1)
3876 Enable only weighted refs
3877
3878 smart (2)
3879 Enable both weighted refs and duplicates
3880
3881 ssim (ssim)
3882 Enable calculation and printing SSIM stats after the encoding.
3883
3884 intra-refresh (intra-refresh)
3885 Enable the use of Periodic Intra Refresh instead of IDR frames when
3886 set to 1.
3887
3888 avcintra-class (class)
3889 Configure the encoder to generate AVC-Intra. Valid values are
3890 50,100 and 200
3891
3892 bluray-compat (bluray-compat)
3893 Configure the encoder to be compatible with the bluray standard.
3894 It is a shorthand for setting "bluray-compat=1 force-cfr=1".
3895
3896 b-bias (b-bias)
3897 Set the influence on how often B-frames are used.
3898
3899 b-pyramid (b-pyramid)
3900 Set method for keeping of some B-frames as references. Possible
3901 values:
3902
3903 none (none)
3904 Disabled.
3905
3906 strict (strict)
3907 Strictly hierarchical pyramid.
3908
3909 normal (normal)
3910 Non-strict (not Blu-ray compatible).
3911
3912 mixed-refs
3913 Enable the use of one reference per partition, as opposed to one
3914 reference per macroblock when set to 1. When set to 0, it has the
3915 same effect as x264's --no-mixed-refs option.
3916
3917 8x8dct
3918 Enable adaptive spatial transform (high profile 8x8 transform) when
3919 set to 1. When set to 0, it has the same effect as x264's
3920 --no-8x8dct option.
3921
3922 fast-pskip
3923 Enable early SKIP detection on P-frames when set to 1. When set to
3924 0, it has the same effect as x264's --no-fast-pskip option.
3925
3926 aud (aud)
3927 Enable use of access unit delimiters when set to 1.
3928
3929 mbtree
3930 Enable use macroblock tree ratecontrol when set to 1. When set to
3931 0, it has the same effect as x264's --no-mbtree option.
3932
3933 deblock (deblock)
3934 Set loop filter parameters, in alpha:beta form.
3935
3936 cplxblur (cplxblur)
3937 Set fluctuations reduction in QP (before curve compression).
3938
3939 partitions (partitions)
3940 Set partitions to consider as a comma-separated list of. Possible
3941 values in the list:
3942
3943 p8x8
3944 8x8 P-frame partition.
3945
3946 p4x4
3947 4x4 P-frame partition.
3948
3949 b8x8
3950 4x4 B-frame partition.
3951
3952 i8x8
3953 8x8 I-frame partition.
3954
3955 i4x4
3956 4x4 I-frame partition. (Enabling p4x4 requires p8x8 to be
3957 enabled. Enabling i8x8 requires adaptive spatial transform
3958 (8x8dct option) to be enabled.)
3959
3960 none (none)
3961 Do not consider any partitions.
3962
3963 all (all)
3964 Consider every partition.
3965
3966 direct-pred (direct)
3967 Set direct MV prediction mode. Possible values:
3968
3969 none (none)
3970 Disable MV prediction.
3971
3972 spatial (spatial)
3973 Enable spatial predicting.
3974
3975 temporal (temporal)
3976 Enable temporal predicting.
3977
3978 auto (auto)
3979 Automatically decided.
3980
3981 slice-max-size (slice-max-size)
3982 Set the limit of the size of each slice in bytes. If not specified
3983 but RTP payload size (ps) is specified, that is used.
3984
3985 stats (stats)
3986 Set the file name for multi-pass stats.
3987
3988 nal-hrd (nal-hrd)
3989 Set signal HRD information (requires vbv-bufsize to be set).
3990 Possible values:
3991
3992 none (none)
3993 Disable HRD information signaling.
3994
3995 vbr (vbr)
3996 Variable bit rate.
3997
3998 cbr (cbr)
3999 Constant bit rate (not allowed in MP4 container).
4000
4001 x264opts (N.A.)
4002 Set any x264 option, see x264 --fullhelp for a list.
4003
4004 Argument is a list of key=value couples separated by ":". In filter
4005 and psy-rd options that use ":" as a separator themselves, use ","
4006 instead. They accept it as well since long ago but this is kept
4007 undocumented for some reason.
4008
4009 For example to specify libx264 encoding options with ffmpeg:
4010
4011 ffmpeg -i foo.mpg -c:v libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
4012
4013 a53cc boolean
4014 Import closed captions (which must be ATSC compatible format) into
4015 output. Only the mpeg2 and h264 decoders provide these. Default is
4016 1 (on).
4017
4018 udu_sei boolean
4019 Import user data unregistered SEI if available into output. Default
4020 is 0 (off).
4021
4022 x264-params (N.A.)
4023 Override the x264 configuration using a :-separated list of
4024 key=value parameters.
4025
4026 This option is functionally the same as the x264opts, but is
4027 duplicated for compatibility with the Libav fork.
4028
4029 For example to specify libx264 encoding options with ffmpeg:
4030
4031 ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
4032 cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
4033 no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
4034
4035 Encoding ffpresets for common usages are provided so they can be used
4036 with the general presets system (e.g. passing the pre option).
4037
4038 libx265
4039 x265 H.265/HEVC encoder wrapper.
4040
4041 This encoder requires the presence of the libx265 headers and library
4042 during configuration. You need to explicitly configure the build with
4043 --enable-libx265.
4044
4045 Options
4046
4047 b Sets target video bitrate.
4048
4049 bf
4050 g Set the GOP size.
4051
4052 keyint_min
4053 Minimum GOP size.
4054
4055 refs
4056 Number of reference frames each P-frame can use. The range is from
4057 1-16.
4058
4059 preset
4060 Set the x265 preset.
4061
4062 tune
4063 Set the x265 tune parameter.
4064
4065 profile
4066 Set profile restrictions.
4067
4068 crf Set the quality for constant quality mode.
4069
4070 qp Set constant quantization rate control method parameter.
4071
4072 qmin
4073 Minimum quantizer scale.
4074
4075 qmax
4076 Maximum quantizer scale.
4077
4078 qdiff
4079 Maximum difference between quantizer scales.
4080
4081 qblur
4082 Quantizer curve blur
4083
4084 qcomp
4085 Quantizer curve compression factor
4086
4087 i_qfactor
4088 b_qfactor
4089 forced-idr
4090 Normally, when forcing a I-frame type, the encoder can select any
4091 type of I-frame. This option forces it to choose an IDR-frame.
4092
4093 udu_sei boolean
4094 Import user data unregistered SEI if available into output. Default
4095 is 0 (off).
4096
4097 x265-params
4098 Set x265 options using a list of key=value couples separated by
4099 ":". See x265 --help for a list of options.
4100
4101 For example to specify libx265 encoding options with -x265-params:
4102
4103 ffmpeg -i input -c:v libx265 -x265-params crf=26:psy-rd=1 output.mp4
4104
4105 libxavs2
4106 xavs2 AVS2-P2/IEEE1857.4 encoder wrapper.
4107
4108 This encoder requires the presence of the libxavs2 headers and library
4109 during configuration. You need to explicitly configure the build with
4110 --enable-libxavs2.
4111
4112 The following standard libavcodec options are used:
4113
4114 • b / bit_rate
4115
4116 • g / gop_size
4117
4118 • bf / max_b_frames
4119
4120 The encoder also has its own specific options:
4121
4122 Options
4123
4124 lcu_row_threads
4125 Set the number of parallel threads for rows from 1 to 8 (default
4126 5).
4127
4128 initial_qp
4129 Set the xavs2 quantization parameter from 1 to 63 (default 34).
4130 This is used to set the initial qp for the first frame.
4131
4132 qp Set the xavs2 quantization parameter from 1 to 63 (default 34).
4133 This is used to set the qp value under constant-QP mode.
4134
4135 max_qp
4136 Set the max qp for rate control from 1 to 63 (default 55).
4137
4138 min_qp
4139 Set the min qp for rate control from 1 to 63 (default 20).
4140
4141 speed_level
4142 Set the Speed level from 0 to 9 (default 0). Higher is better but
4143 slower.
4144
4145 log_level
4146 Set the log level from -1 to 3 (default 0). -1: none, 0: error, 1:
4147 warning, 2: info, 3: debug.
4148
4149 xavs2-params
4150 Set xavs2 options using a list of key=value couples separated by
4151 ":".
4152
4153 For example to specify libxavs2 encoding options with
4154 -xavs2-params:
4155
4156 ffmpeg -i input -c:v libxavs2 -xavs2-params RdoqLevel=0 output.avs2
4157
4158 libxvid
4159 Xvid MPEG-4 Part 2 encoder wrapper.
4160
4161 This encoder requires the presence of the libxvidcore headers and
4162 library during configuration. You need to explicitly configure the
4163 build with "--enable-libxvid --enable-gpl".
4164
4165 The native "mpeg4" encoder supports the MPEG-4 Part 2 format, so users
4166 can encode to this format without this library.
4167
4168 Options
4169
4170 The following options are supported by the libxvid wrapper. Some of the
4171 following options are listed but are not documented, and correspond to
4172 shared codec options. See the Codec Options chapter for their
4173 documentation. The other shared options which are not listed have no
4174 effect for the libxvid encoder.
4175
4176 b
4177 g
4178 qmin
4179 qmax
4180 mpeg_quant
4181 threads
4182 bf
4183 b_qfactor
4184 b_qoffset
4185 flags
4186 Set specific encoding flags. Possible values:
4187
4188 mv4 Use four motion vector by macroblock.
4189
4190 aic Enable high quality AC prediction.
4191
4192 gray
4193 Only encode grayscale.
4194
4195 gmc Enable the use of global motion compensation (GMC).
4196
4197 qpel
4198 Enable quarter-pixel motion compensation.
4199
4200 cgop
4201 Enable closed GOP.
4202
4203 global_header
4204 Place global headers in extradata instead of every keyframe.
4205
4206 trellis
4207 me_method
4208 Set motion estimation method. Possible values in decreasing order
4209 of speed and increasing order of quality:
4210
4211 zero
4212 Use no motion estimation (default).
4213
4214 phods
4215 x1
4216 log Enable advanced diamond zonal search for 16x16 blocks and half-
4217 pixel refinement for 16x16 blocks. x1 and log are aliases for
4218 phods.
4219
4220 epzs
4221 Enable all of the things described above, plus advanced diamond
4222 zonal search for 8x8 blocks, half-pixel refinement for 8x8
4223 blocks, and motion estimation on chroma planes.
4224
4225 full
4226 Enable all of the things described above, plus extended 16x16
4227 and 8x8 blocks search.
4228
4229 mbd Set macroblock decision algorithm. Possible values in the
4230 increasing order of quality:
4231
4232 simple
4233 Use macroblock comparing function algorithm (default).
4234
4235 bits
4236 Enable rate distortion-based half pixel and quarter pixel
4237 refinement for 16x16 blocks.
4238
4239 rd Enable all of the things described above, plus rate distortion-
4240 based half pixel and quarter pixel refinement for 8x8 blocks,
4241 and rate distortion-based search using square pattern.
4242
4243 lumi_aq
4244 Enable lumi masking adaptive quantization when set to 1. Default is
4245 0 (disabled).
4246
4247 variance_aq
4248 Enable variance adaptive quantization when set to 1. Default is 0
4249 (disabled).
4250
4251 When combined with lumi_aq, the resulting quality will not be
4252 better than any of the two specified individually. In other words,
4253 the resulting quality will be the worse one of the two effects.
4254
4255 ssim
4256 Set structural similarity (SSIM) displaying method. Possible
4257 values:
4258
4259 off Disable displaying of SSIM information.
4260
4261 avg Output average SSIM at the end of encoding to stdout. The
4262 format of showing the average SSIM is:
4263
4264 Average SSIM: %f
4265
4266 For users who are not familiar with C, %f means a float number,
4267 or a decimal (e.g. 0.939232).
4268
4269 frame
4270 Output both per-frame SSIM data during encoding and average
4271 SSIM at the end of encoding to stdout. The format of per-frame
4272 information is:
4273
4274 SSIM: avg: %1.3f min: %1.3f max: %1.3f
4275
4276 For users who are not familiar with C, %1.3f means a float
4277 number rounded to 3 digits after the dot (e.g. 0.932).
4278
4279 ssim_acc
4280 Set SSIM accuracy. Valid options are integers within the range of
4281 0-4, while 0 gives the most accurate result and 4 computes the
4282 fastest.
4283
4284 MediaFoundation
4285 This provides wrappers to encoders (both audio and video) in the
4286 MediaFoundation framework. It can access both SW and HW encoders.
4287 Video encoders can take input in either of nv12 or yuv420p form (some
4288 encoders support both, some support only either - in practice, nv12 is
4289 the safer choice, especially among HW encoders).
4290
4291 mpeg2
4292 MPEG-2 video encoder.
4293
4294 Options
4295
4296 profile
4297 Select the mpeg2 profile to encode:
4298
4299 422
4300 high
4301 ss Spatially Scalable
4302
4303 snr SNR Scalable
4304
4305 main
4306 simple
4307 level
4308 Select the mpeg2 level to encode:
4309
4310 high
4311 high1440
4312 main
4313 low
4314 seq_disp_ext integer
4315 Specifies if the encoder should write a sequence_display_extension
4316 to the output.
4317
4318 -1
4319 auto
4320 Decide automatically to write it or not (this is the default)
4321 by checking if the data to be written is different from the
4322 default or unspecified values.
4323
4324 0
4325 never
4326 Never write it.
4327
4328 1
4329 always
4330 Always write it.
4331
4332 video_format integer
4333 Specifies the video_format written into the sequence display
4334 extension indicating the source of the video pictures. The default
4335 is unspecified, can be component, pal, ntsc, secam or mac. For
4336 maximum compatibility, use component.
4337
4338 a53cc boolean
4339 Import closed captions (which must be ATSC compatible format) into
4340 output. Default is 1 (on).
4341
4342 png
4343 PNG image encoder.
4344
4345 Private options
4346
4347 dpi integer
4348 Set physical density of pixels, in dots per inch, unset by default
4349
4350 dpm integer
4351 Set physical density of pixels, in dots per meter, unset by default
4352
4353 ProRes
4354 Apple ProRes encoder.
4355
4356 FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
4357 The used encoder can be chosen with the "-vcodec" option.
4358
4359 Private Options for prores-ks
4360
4361 profile integer
4362 Select the ProRes profile to encode
4363
4364 proxy
4365 lt
4366 standard
4367 hq
4368 4444
4369 4444xq
4370 quant_mat integer
4371 Select quantization matrix.
4372
4373 auto
4374 default
4375 proxy
4376 lt
4377 standard
4378 hq
4379
4380 If set to auto, the matrix matching the profile will be picked. If
4381 not set, the matrix providing the highest quality, default, will be
4382 picked.
4383
4384 bits_per_mb integer
4385 How many bits to allot for coding one macroblock. Different
4386 profiles use between 200 and 2400 bits per macroblock, the maximum
4387 is 8000.
4388
4389 mbs_per_slice integer
4390 Number of macroblocks in each slice (1-8); the default value (8)
4391 should be good in almost all situations.
4392
4393 vendor string
4394 Override the 4-byte vendor ID. A custom vendor ID like apl0 would
4395 claim the stream was produced by the Apple encoder.
4396
4397 alpha_bits integer
4398 Specify number of bits for alpha component. Possible values are 0,
4399 8 and 16. Use 0 to disable alpha plane coding.
4400
4401 Speed considerations
4402
4403 In the default mode of operation the encoder has to honor frame
4404 constraints (i.e. not produce frames with size bigger than requested)
4405 while still making output picture as good as possible. A frame
4406 containing a lot of small details is harder to compress and the encoder
4407 would spend more time searching for appropriate quantizers for each
4408 slice.
4409
4410 Setting a higher bits_per_mb limit will improve the speed.
4411
4412 For the fastest encoding speed set the qscale parameter (4 is the
4413 recommended value) and do not set a size constraint.
4414
4415 QSV Encoders
4416 The family of Intel QuickSync Video encoders (MPEG-2, H.264, HEVC,
4417 JPEG/MJPEG and VP9)
4418
4419 Ratecontrol Method
4420
4421 The ratecontrol method is selected as follows:
4422
4423 • When global_quality is specified, a quality-based mode is used.
4424 Specifically this means either
4425
4426 - CQP - constant quantizer scale, when the qscale codec flag is
4427 also set (the -qscale ffmpeg option).
4428
4429 - LA_ICQ - intelligent constant quality with lookahead, when the
4430 look_ahead option is also set.
4431
4432 - ICQ -- intelligent constant quality otherwise. For the ICQ
4433 modes, global quality range is 1 to 51, with 1 being the best
4434 quality.
4435
4436 • Otherwise, a bitrate-based mode is used. For all of those, you
4437 should specify at least the desired average bitrate with the b
4438 option.
4439
4440 - LA - VBR with lookahead, when the look_ahead option is
4441 specified.
4442
4443 - VCM - video conferencing mode, when the vcm option is set.
4444
4445 - CBR - constant bitrate, when maxrate is specified and equal to
4446 the average bitrate.
4447
4448 - VBR - variable bitrate, when maxrate is specified, but is
4449 higher than the average bitrate.
4450
4451 - AVBR - average VBR mode, when maxrate is not specified, both
4452 avbr_accuracy and avbr_convergence are set to non-zero. This
4453 mode is available for H264 and HEVC on Windows.
4454
4455 Note that depending on your system, a different mode than the one you
4456 specified may be selected by the encoder. Set the verbosity level to
4457 verbose or higher to see the actual settings used by the QSV runtime.
4458
4459 Global Options -> MSDK Options
4460
4461 Additional libavcodec global options are mapped to MSDK options as
4462 follows:
4463
4464 • g/gop_size -> GopPicSize
4465
4466 • bf/max_b_frames+1 -> GopRefDist
4467
4468 • rc_init_occupancy/rc_initial_buffer_occupancy -> InitialDelayInKB
4469
4470 • slices -> NumSlice
4471
4472 • refs -> NumRefFrame
4473
4474 • b_strategy/b_frame_strategy -> BRefType
4475
4476 • cgop/CLOSED_GOP codec flag -> GopOptFlag
4477
4478 • For the CQP mode, the i_qfactor/i_qoffset and b_qfactor/b_qoffset
4479 set the difference between QPP and QPI, and QPP and QPB
4480 respectively.
4481
4482 • Setting the coder option to the value vlc will make the H.264
4483 encoder use CAVLC instead of CABAC.
4484
4485 Common Options
4486
4487 Following options are used by all qsv encoders.
4488
4489 async_depth
4490 Specifies how many asynchronous operations an application performs
4491 before the application explicitly synchronizes the result. If zero,
4492 the value is not specified.
4493
4494 preset
4495 This option itemizes a range of choices from veryfast (best speed)
4496 to veryslow (best quality).
4497
4498 veryfast
4499 faster
4500 fast
4501 medium
4502 slow
4503 slower
4504 veryslow
4505 forced_idr
4506 Forcing I frames as IDR frames.
4507
4508 low_power
4509 For encoders set this flag to ON to reduce power consumption and
4510 GPU usage.
4511
4512 Runtime Options
4513
4514 Following options can be used durning qsv encoding.
4515
4516 global_quality
4517 i_quant_factor
4518 i_quant_offset
4519 b_quant_factor
4520 b_quant_offset
4521 Supported in h264_qsv and hevc_qsv. Change these value to reset
4522 qsv codec's qp configuration.
4523
4524 max_frame_size
4525 Supported in h264_qsv and hevc_qsv. Change this value to reset qsv
4526 codec's MaxFrameSize configuration.
4527
4528 gop_size
4529 Change this value to reset qsv codec's gop configuration.
4530
4531 int_ref_type
4532 int_ref_cycle_size
4533 int_ref_qp_delta
4534 int_ref_cycle_dist
4535 Supported in h264_qsv and hevc_qsv. Change these value to reset
4536 qsv codec's Intra Refresh configuration.
4537
4538 qmax
4539 qmin
4540 max_qp_i
4541 min_qp_i
4542 max_qp_p
4543 min_qp_p
4544 max_qp_b
4545 min_qp_b
4546 Supported in h264_qsv. Change these value to reset qsv codec's
4547 max/min qp configuration.
4548
4549 low_delay_brc
4550 Supported in h264_qsv and hevc_qsv. Change this value to reset qsv
4551 codec's low_delay_brc configuration.
4552
4553 framerate
4554 Change this value to reset qsv codec's framerate configuration.
4555
4556 bit_rate
4557 rc_buffer_size
4558 rc_initial_buffer_occupancy
4559 rc_max_rate
4560 Change these value to reset qsv codec's bitrate control
4561 configuration.
4562
4563 pic_timing_sei
4564 Supported in h264_qsv and hevc_qsv. Change this value to reset qsv
4565 codec's pic_timing_sei configuration.
4566
4567 H264 options
4568
4569 These options are used by h264_qsv
4570
4571 extbrc
4572 Extended bitrate control.
4573
4574 recovery_point_sei
4575 Set this flag to insert the recovery point SEI message at the
4576 beginning of every intra refresh cycle.
4577
4578 rdo Enable rate distortion optimization.
4579
4580 max_frame_size
4581 Maximum encoded frame size in bytes.
4582
4583 max_frame_size_i
4584 Maximum encoded frame size for I frames in bytes. If this value is
4585 set as larger than zero, then for I frames the value set by
4586 max_frame_size is ignored.
4587
4588 max_frame_size_p
4589 Maximum encoded frame size for P frames in bytes. If this value is
4590 set as larger than zero, then for P frames the value set by
4591 max_frame_size is ignored.
4592
4593 max_slice_size
4594 Maximum encoded slice size in bytes.
4595
4596 bitrate_limit
4597 Toggle bitrate limitations. Modifies bitrate to be in the range
4598 imposed by the QSV encoder. Setting this flag off may lead to
4599 violation of HRD conformance. Mind that specifying bitrate below
4600 the QSV encoder range might significantly affect quality. If on
4601 this option takes effect in non CQP modes: if bitrate is not in the
4602 range imposed by the QSV encoder, it will be changed to be in the
4603 range.
4604
4605 mbbrc
4606 Setting this flag enables macroblock level bitrate control that
4607 generally improves subjective visual quality. Enabling this flag
4608 may have negative impact on performance and objective visual
4609 quality metric.
4610
4611 low_delay_brc
4612 Setting this flag turns on or off LowDelayBRC feautre in qsv
4613 plugin, which provides more accurate bitrate control to minimize
4614 the variance of bitstream size frame by frame. Value: -1-default
4615 0-off 1-on
4616
4617 adaptive_i
4618 This flag controls insertion of I frames by the QSV encoder. Turn
4619 ON this flag to allow changing of frame type from P and B to I.
4620
4621 adaptive_b
4622 This flag controls changing of frame type from B to P.
4623
4624 p_strategy
4625 Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to
4626 0).
4627
4628 b_strategy
4629 This option controls usage of B frames as reference.
4630
4631 dblk_idc
4632 This option disable deblocking. It has value in range 0~2.
4633
4634 cavlc
4635 If set, CAVLC is used; if unset, CABAC is used for encoding.
4636
4637 vcm Video conferencing mode, please see ratecontrol method.
4638
4639 idr_interval
4640 Distance (in I-frames) between IDR frames.
4641
4642 pic_timing_sei
4643 Insert picture timing SEI with pic_struct_syntax element.
4644
4645 single_sei_nal_unit
4646 Put all the SEI messages into one NALU.
4647
4648 max_dec_frame_buffering
4649 Maximum number of frames buffered in the DPB.
4650
4651 look_ahead
4652 Use VBR algorithm with look ahead.
4653
4654 look_ahead_depth
4655 Depth of look ahead in number frames.
4656
4657 look_ahead_downsampling
4658 Downscaling factor for the frames saved for the lookahead analysis.
4659
4660 unknown
4661 auto
4662 off
4663 2x
4664 4x
4665 int_ref_type
4666 Specifies intra refresh type. The major goal of intra refresh is
4667 improvement of error resilience without significant impact on
4668 encoded bitstream size caused by I frames. The SDK encoder achieves
4669 this by encoding part of each frame in refresh cycle using intra
4670 MBs. none means no refresh. vertical means vertical refresh, by
4671 column of MBs. horizontal means horizontal refresh, by rows of MBs.
4672 slice means horizontal refresh by slices without overlapping. In
4673 case of slice, in_ref_cycle_size is ignored. To enable intra
4674 refresh, B frame should be set to 0.
4675
4676 int_ref_cycle_size
4677 Specifies number of pictures within refresh cycle starting from 2.
4678 0 and 1 are invalid values.
4679
4680 int_ref_qp_delta
4681 Specifies QP difference for inserted intra MBs. This is signed
4682 value in [-51, 51] range if target encoding bit-depth for luma
4683 samples is 8 and this range is [-63, 63] for 10 bit-depth or [-75,
4684 75] for 12 bit-depth respectively.
4685
4686 int_ref_cycle_dist
4687 Distance between the beginnings of the intra-refresh cycles in
4688 frames.
4689
4690 profile
4691 unknown
4692 baseline
4693 main
4694 high
4695 a53cc
4696 Use A53 Closed Captions (if available).
4697
4698 aud Insert the Access Unit Delimiter NAL.
4699
4700 mfmode
4701 Multi-Frame Mode.
4702
4703 off
4704 auto
4705 repeat_pps
4706 Repeat pps for every frame.
4707
4708 max_qp_i
4709 Maximum video quantizer scale for I frame.
4710
4711 min_qp_i
4712 Minimum video quantizer scale for I frame.
4713
4714 max_qp_p
4715 Maximum video quantizer scale for P frame.
4716
4717 min_qp_p
4718 Minimum video quantizer scale for P frame.
4719
4720 max_qp_b
4721 Maximum video quantizer scale for B frame.
4722
4723 min_qp_b
4724 Minimum video quantizer scale for B frame.
4725
4726 scenario
4727 Provides a hint to encoder about the scenario for the encoding
4728 session.
4729
4730 unknown
4731 displayremoting
4732 videoconference
4733 archive
4734 livestreaming
4735 cameracapture
4736 videosurveillance
4737 gamestreaming
4738 remotegaming
4739 avbr_accuracy
4740 Accuracy of the AVBR ratecontrol (unit of tenth of percent).
4741
4742 avbr_convergence
4743 Convergence of the AVBR ratecontrol (unit of 100 frames)
4744
4745 The parameters avbr_accuracy and avbr_convergence are for the
4746 average variable bitrate control (AVBR) algorithm. The algorithm
4747 focuses on overall encoding quality while meeting the specified
4748 bitrate, target_bitrate, within the accuracy range avbr_accuracy,
4749 after a avbr_Convergence period. This method does not follow HRD
4750 and the instant bitrate is not capped or padded.
4751
4752 skip_frame
4753 Use per-frame metadata "qsv_skip_frame" to skip frame when
4754 encoding. This option defines the usage of this metadata.
4755
4756 no_skip
4757 Frame skipping is disabled.
4758
4759 insert_dummy
4760 Encoder inserts into bitstream frame where all macroblocks are
4761 encoded as skipped.
4762
4763 insert_nothing
4764 Similar to insert_dummy, but encoder inserts nothing into
4765 bitstream. The skipped frames are still used in brc. For
4766 example, gop still include skipped frames, and the frames after
4767 skipped frames will be larger in size.
4768
4769 brc_only
4770 skip_frame metadata indicates the number of missed frames
4771 before the current frame.
4772
4773 HEVC Options
4774
4775 These options are used by hevc_qsv
4776
4777 extbrc
4778 Extended bitrate control.
4779
4780 recovery_point_sei
4781 Set this flag to insert the recovery point SEI message at the
4782 beginning of every intra refresh cycle.
4783
4784 rdo Enable rate distortion optimization.
4785
4786 max_frame_size
4787 Maximum encoded frame size in bytes.
4788
4789 max_frame_size_i
4790 Maximum encoded frame size for I frames in bytes. If this value is
4791 set as larger than zero, then for I frames the value set by
4792 max_frame_size is ignored.
4793
4794 max_frame_size_p
4795 Maximum encoded frame size for P frames in bytes. If this value is
4796 set as larger than zero, then for P frames the value set by
4797 max_frame_size is ignored.
4798
4799 max_slice_size
4800 Maximum encoded slice size in bytes.
4801
4802 mbbrc
4803 Setting this flag enables macroblock level bitrate control that
4804 generally improves subjective visual quality. Enabling this flag
4805 may have negative impact on performance and objective visual
4806 quality metric.
4807
4808 low_delay_brc
4809 Setting this flag turns on or off LowDelayBRC feautre in qsv
4810 plugin, which provides more accurate bitrate control to minimize
4811 the variance of bitstream size frame by frame. Value: -1-default
4812 0-off 1-on
4813
4814 adaptive_i
4815 This flag controls insertion of I frames by the QSV encoder. Turn
4816 ON this flag to allow changing of frame type from P and B to I.
4817
4818 adaptive_b
4819 This flag controls changing of frame type from B to P.
4820
4821 p_strategy
4822 Enable P-pyramid: 0-default 1-simple 2-pyramid(bf need to be set to
4823 0).
4824
4825 b_strategy
4826 This option controls usage of B frames as reference.
4827
4828 dblk_idc
4829 This option disable deblocking. It has value in range 0~2.
4830
4831 idr_interval
4832 Distance (in I-frames) between IDR frames.
4833
4834 begin_only
4835 Output an IDR-frame only at the beginning of the stream.
4836
4837 load_plugin
4838 A user plugin to load in an internal session.
4839
4840 none
4841 hevc_sw
4842 hevc_hw
4843 load_plugins
4844 A :-separate list of hexadecimal plugin UIDs to load in an internal
4845 session.
4846
4847 look_ahead_depth
4848 Depth of look ahead in number frames, available when extbrc option
4849 is enabled.
4850
4851 profile
4852 Set the encoding profile (scc requires libmfx >= 1.32).
4853
4854 unknown
4855 main
4856 main10
4857 mainsp
4858 rext
4859 scc
4860 tier
4861 Set the encoding tier (only level >= 4 can support high tier).
4862 This option only takes effect when the level option is specified.
4863
4864 main
4865 high
4866 gpb 1: GPB (generalized P/B frame)
4867
4868 0: regular P frame.
4869
4870 tile_cols
4871 Number of columns for tiled encoding.
4872
4873 tile_rows
4874 Number of rows for tiled encoding.
4875
4876 aud Insert the Access Unit Delimiter NAL.
4877
4878 pic_timing_sei
4879 Insert picture timing SEI with pic_struct_syntax element.
4880
4881 transform_skip
4882 Turn this option ON to enable transformskip. It is supported on
4883 platform equal or newer than ICL.
4884
4885 int_ref_type
4886 Specifies intra refresh type. The major goal of intra refresh is
4887 improvement of error resilience without significant impact on
4888 encoded bitstream size caused by I frames. The SDK encoder achieves
4889 this by encoding part of each frame in refresh cycle using intra
4890 MBs. none means no refresh. vertical means vertical refresh, by
4891 column of MBs. horizontal means horizontal refresh, by rows of MBs.
4892 slice means horizontal refresh by slices without overlapping. In
4893 case of slice, in_ref_cycle_size is ignored. To enable intra
4894 refresh, B frame should be set to 0.
4895
4896 int_ref_cycle_size
4897 Specifies number of pictures within refresh cycle starting from 2.
4898 0 and 1 are invalid values.
4899
4900 int_ref_qp_delta
4901 Specifies QP difference for inserted intra MBs. This is signed
4902 value in [-51, 51] range if target encoding bit-depth for luma
4903 samples is 8 and this range is [-63, 63] for 10 bit-depth or [-75,
4904 75] for 12 bit-depth respectively.
4905
4906 int_ref_cycle_dist
4907 Distance between the beginnings of the intra-refresh cycles in
4908 frames.
4909
4910 max_qp_i
4911 Maximum video quantizer scale for I frame.
4912
4913 min_qp_i
4914 Minimum video quantizer scale for I frame.
4915
4916 max_qp_p
4917 Maximum video quantizer scale for P frame.
4918
4919 min_qp_p
4920 Minimum video quantizer scale for P frame.
4921
4922 max_qp_b
4923 Maximum video quantizer scale for B frame.
4924
4925 min_qp_b
4926 Minimum video quantizer scale for B frame.
4927
4928 scenario
4929 Provides a hint to encoder about the scenario for the encoding
4930 session.
4931
4932 unknown
4933 displayremoting
4934 videoconference
4935 archive
4936 livestreaming
4937 cameracapture
4938 videosurveillance
4939 gamestreaming
4940 remotegaming
4941 avbr_accuracy
4942 Accuracy of the AVBR ratecontrol (unit of tenth of percent).
4943
4944 avbr_convergence
4945 Convergence of the AVBR ratecontrol (unit of 100 frames)
4946
4947 The parameters avbr_accuracy and avbr_convergence are for the
4948 average variable bitrate control (AVBR) algorithm. The algorithm
4949 focuses on overall encoding quality while meeting the specified
4950 bitrate, target_bitrate, within the accuracy range avbr_accuracy,
4951 after a avbr_Convergence period. This method does not follow HRD
4952 and the instant bitrate is not capped or padded.
4953
4954 skip_frame
4955 Use per-frame metadata "qsv_skip_frame" to skip frame when
4956 encoding. This option defines the usage of this metadata.
4957
4958 no_skip
4959 Frame skipping is disabled.
4960
4961 insert_dummy
4962 Encoder inserts into bitstream frame where all macroblocks are
4963 encoded as skipped.
4964
4965 insert_nothing
4966 Similar to insert_dummy, but encoder inserts nothing into
4967 bitstream. The skipped frames are still used in brc. For
4968 example, gop still include skipped frames, and the frames after
4969 skipped frames will be larger in size.
4970
4971 brc_only
4972 skip_frame metadata indicates the number of missed frames
4973 before the current frame.
4974
4975 MPEG2 Options
4976
4977 These options are used by mpeg2_qsv
4978
4979 profile
4980 unknown
4981 simple
4982 main
4983 high
4984
4985 VP9 Options
4986
4987 These options are used by vp9_qsv
4988
4989 profile
4990 unknown
4991 profile0
4992 profile1
4993 profile2
4994 profile3
4995 tile_cols
4996 Number of columns for tiled encoding (requires libmfx >= 1.29).
4997
4998 tile_rows
4999 Number of rows for tiled encoding (requires libmfx >= 1.29).
5000
5001 AV1 Options
5002
5003 These options are used by av1_qsv (requires libvpl).
5004
5005 profile
5006 unknown
5007 main
5008 tile_cols
5009 Number of columns for tiled encoding.
5010
5011 tile_rows
5012 Number of rows for tiled encoding.
5013
5014 adaptive_i
5015 This flag controls insertion of I frames by the QSV encoder. Turn
5016 ON this flag to allow changing of frame type from P and B to I.
5017
5018 adaptive_b
5019 This flag controls changing of frame type from B to P.
5020
5021 b_strategy
5022 This option controls usage of B frames as reference.
5023
5024 extbrc
5025 Extended bitrate control.
5026
5027 look_ahead_depth
5028 Depth of look ahead in number frames, available when extbrc option
5029 is enabled.
5030
5031 low_delay_brc
5032 Setting this flag turns on or off LowDelayBRC feautre in qsv
5033 plugin, which provides more accurate bitrate control to minimize
5034 the variance of bitstream size frame by frame. Value: -1-default
5035 0-off 1-on
5036
5037 max_frame_size
5038 Set the allowed max size in bytes for each frame. If the frame size
5039 exceeds the limitation, encoder will adjust the QP value to control
5040 the frame size. Invalid in CQP rate control mode.
5041
5042 snow
5043 Options
5044
5045 iterative_dia_size
5046 dia size for the iterative motion estimation
5047
5048 VAAPI encoders
5049 Wrappers for hardware encoders accessible via VAAPI.
5050
5051 These encoders only accept input in VAAPI hardware surfaces. If you
5052 have input in software frames, use the hwupload filter to upload them
5053 to the GPU.
5054
5055 The following standard libavcodec options are used:
5056
5057 • g / gop_size
5058
5059 • bf / max_b_frames
5060
5061 • profile
5062
5063 If not set, this will be determined automatically from the format
5064 of the input frames and the profiles supported by the driver.
5065
5066 • level
5067
5068 • b / bit_rate
5069
5070 • maxrate / rc_max_rate
5071
5072 • bufsize / rc_buffer_size
5073
5074 • rc_init_occupancy / rc_initial_buffer_occupancy
5075
5076 • compression_level
5077
5078 Speed / quality tradeoff: higher values are faster / worse quality.
5079
5080 • q / global_quality
5081
5082 Size / quality tradeoff: higher values are smaller / worse quality.
5083
5084 • qmin
5085
5086 • qmax
5087
5088 • i_qfactor / i_quant_factor
5089
5090 • i_qoffset / i_quant_offset
5091
5092 • b_qfactor / b_quant_factor
5093
5094 • b_qoffset / b_quant_offset
5095
5096 • slices
5097
5098 All encoders support the following options:
5099
5100 low_power
5101 Some drivers/platforms offer a second encoder for some codecs
5102 intended to use less power than the default encoder; setting this
5103 option will attempt to use that encoder. Note that it may support
5104 a reduced feature set, so some other options may not be available
5105 in this mode.
5106
5107 idr_interval
5108 Set the number of normal intra frames between full-refresh (IDR)
5109 frames in open-GOP mode. The intra frames are still IRAPs, but
5110 will not include global headers and may have non-decodable leading
5111 pictures.
5112
5113 b_depth
5114 Set the B-frame reference depth. When set to one (the default),
5115 all B-frames will refer only to P- or I-frames. When set to
5116 greater values multiple layers of B-frames will be present, frames
5117 in each layer only referring to frames in higher layers.
5118
5119 async_depth
5120 Maximum processing parallelism. Increase this to improve single
5121 channel performance. This option doesn't work if driver doesn't
5122 implement vaSyncBuffer function. Please make sure there are enough
5123 hw_frames allocated if a large number of async_depth is used.
5124
5125 max_frame_size
5126 Set the allowed max size in bytes for each frame. If the frame size
5127 exceeds the limitation, encoder will adjust the QP value to control
5128 the frame size. Invalid in CQP rate control mode.
5129
5130 rc_mode
5131 Set the rate control mode to use. A given driver may only support
5132 a subset of modes.
5133
5134 Possible modes:
5135
5136 auto
5137 Choose the mode automatically based on driver support and the
5138 other options. This is the default.
5139
5140 CQP Constant-quality.
5141
5142 CBR Constant-bitrate.
5143
5144 VBR Variable-bitrate.
5145
5146 ICQ Intelligent constant-quality.
5147
5148 QVBR
5149 Quality-defined variable-bitrate.
5150
5151 AVBR
5152 Average variable bitrate.
5153
5154 Each encoder also has its own specific options:
5155
5156 av1_vaapi
5157 profile sets the value of seq_profile. tier sets the value of
5158 seq_tier. level sets the value of seq_level_idx.
5159
5160 tiles
5161 Set the number of tiles to encode the input video with, as
5162 columns x rows. (default is auto, which means use minimal tile
5163 column/row number).
5164
5165 tile_groups
5166 Set tile groups number. All the tiles will be distributed as
5167 evenly as possible to each tile group. (default is 1).
5168
5169 h264_vaapi
5170 profile sets the value of profile_idc and the
5171 constraint_set*_flags. level sets the value of level_idc.
5172
5173 coder
5174 Set entropy encoder (default is cabac). Possible values:
5175
5176 ac
5177 cabac
5178 Use CABAC.
5179
5180 vlc
5181 cavlc
5182 Use CAVLC.
5183
5184 aud Include access unit delimiters in the stream (not included by
5185 default).
5186
5187 sei Set SEI message types to include. Some combination of the
5188 following values:
5189
5190 identifier
5191 Include a user_data_unregistered message containing
5192 information about the encoder.
5193
5194 timing
5195 Include picture timing parameters (buffering_period and
5196 pic_timing messages).
5197
5198 recovery_point
5199 Include recovery points where appropriate (recovery_point
5200 messages).
5201
5202 hevc_vaapi
5203 profile and level set the values of general_profile_idc and
5204 general_level_idc respectively.
5205
5206 aud Include access unit delimiters in the stream (not included by
5207 default).
5208
5209 tier
5210 Set general_tier_flag. This may affect the level chosen for
5211 the stream if it is not explicitly specified.
5212
5213 sei Set SEI message types to include. Some combination of the
5214 following values:
5215
5216 hdr Include HDR metadata if the input frames have it
5217 (mastering_display_colour_volume and content_light_level
5218 messages).
5219
5220 tiles
5221 Set the number of tiles to encode the input video with, as
5222 columns x rows. Larger numbers allow greater parallelism in
5223 both encoding and decoding, but may decrease coding efficiency.
5224
5225 mjpeg_vaapi
5226 Only baseline DCT encoding is supported. The encoder always uses
5227 the standard quantisation and huffman tables - global_quality
5228 scales the standard quantisation table (range 1-100).
5229
5230 For YUV, 4:2:0, 4:2:2 and 4:4:4 subsampling modes are supported.
5231 RGB is also supported, and will create an RGB JPEG.
5232
5233 jfif
5234 Include JFIF header in each frame (not included by default).
5235
5236 huffman
5237 Include standard huffman tables (on by default). Turning this
5238 off will save a few hundred bytes in each output frame, but may
5239 lose compatibility with some JPEG decoders which don't fully
5240 handle MJPEG.
5241
5242 mpeg2_vaapi
5243 profile and level set the value of profile_and_level_indication.
5244
5245 vp8_vaapi
5246 B-frames are not supported.
5247
5248 global_quality sets the q_idx used for non-key frames (range
5249 0-127).
5250
5251 loop_filter_level
5252 loop_filter_sharpness
5253 Manually set the loop filter parameters.
5254
5255 vp9_vaapi
5256 global_quality sets the q_idx used for P-frames (range 0-255).
5257
5258 loop_filter_level
5259 loop_filter_sharpness
5260 Manually set the loop filter parameters.
5261
5262 B-frames are supported, but the output stream is always in encode
5263 order rather than display order. If B-frames are enabled, it may
5264 be necessary to use the vp9_raw_reorder bitstream filter to modify
5265 the output stream to display frames in the correct order.
5266
5267 Only normal frames are produced - the vp9_superframe bitstream
5268 filter may be required to produce a stream usable with all
5269 decoders.
5270
5271 vbn
5272 Vizrt Binary Image encoder.
5273
5274 This format is used by the broadcast vendor Vizrt for quick texture
5275 streaming. Advanced features of the format such as LZW compression of
5276 texture data or generation of mipmaps are not supported.
5277
5278 Options
5279
5280 format string
5281 Sets the texture compression used by the VBN file. Can be dxt1,
5282 dxt5 or raw. Default is dxt5.
5283
5284 vc2
5285 SMPTE VC-2 (previously BBC Dirac Pro). This codec was primarily aimed
5286 at professional broadcasting but since it supports yuv420, yuv422 and
5287 yuv444 at 8 (limited range or full range), 10 or 12 bits, this makes it
5288 suitable for other tasks which require low overhead and low compression
5289 (like screen recording).
5290
5291 Options
5292
5293 b Sets target video bitrate. Usually that's around 1:6 of the
5294 uncompressed video bitrate (e.g. for 1920x1080 50fps yuv422p10
5295 that's around 400Mbps). Higher values (close to the uncompressed
5296 bitrate) turn on lossless compression mode.
5297
5298 field_order
5299 Enables field coding when set (e.g. to tt - top field first) for
5300 interlaced inputs. Should increase compression with interlaced
5301 content as it splits the fields and encodes each separately.
5302
5303 wavelet_depth
5304 Sets the total amount of wavelet transforms to apply, between 1 and
5305 5 (default). Lower values reduce compression and quality. Less
5306 capable decoders may not be able to handle values of wavelet_depth
5307 over 3.
5308
5309 wavelet_type
5310 Sets the transform type. Currently only 5_3 (LeGall) and 9_7
5311 (Deslauriers-Dubuc) are implemented, with 9_7 being the one with
5312 better compression and thus is the default.
5313
5314 slice_width
5315 slice_height
5316 Sets the slice size for each slice. Larger values result in better
5317 compression. For compatibility with other more limited decoders
5318 use slice_width of 32 and slice_height of 8.
5319
5320 tolerance
5321 Sets the undershoot tolerance of the rate control system in
5322 percent. This is to prevent an expensive search from being run.
5323
5324 qm Sets the quantization matrix preset to use by default or when
5325 wavelet_depth is set to 5
5326
5327 - default Uses the default quantization matrix from the
5328 specifications, extended with values for the fifth level. This
5329 provides a good balance between keeping detail and omitting
5330 artifacts.
5331
5332 - flat Use a completely zeroed out quantization matrix. This
5333 increases PSNR but might reduce perception. Use in bogus
5334 benchmarks.
5335
5336 - color Reduces detail but attempts to preserve color at
5337 extremely low bitrates.
5338
5340 dvdsub
5341 This codec encodes the bitmap subtitle format that is used in DVDs.
5342 Typically they are stored in VOBSUB file pairs (*.idx + *.sub), and
5343 they can also be used in Matroska files.
5344
5345 Options
5346
5347 palette
5348 Specify the global palette used by the bitmaps.
5349
5350 The format for this option is a string containing 16 24-bits
5351 hexadecimal numbers (without 0x prefix) separated by commas, for
5352 example "0d00ee, ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b,
5353 0d617a, 7b7b7b, d1d1d1, 7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c,
5354 7c127b".
5355
5356 even_rows_fix
5357 When set to 1, enable a work-around that makes the number of pixel
5358 rows even in all subtitles. This fixes a problem with some players
5359 that cut off the bottom row if the number is odd. The work-around
5360 just adds a fully transparent row if needed. The overhead is low,
5361 typically one byte per subtitle on average.
5362
5363 By default, this work-around is disabled.
5364
5366 ffmpeg(1), ffplay(1), ffprobe(1), libavcodec(3)
5367
5369 The FFmpeg developers.
5370
5371 For details about the authorship, see the Git history of the project
5372 (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
5373 the FFmpeg source directory, or browsing the online repository at
5374 <https://git.ffmpeg.org/ffmpeg>.
5375
5376 Maintainers for the specific components are listed in the file
5377 MAINTAINERS in the source code tree.
5378
5379
5380
5381 FFMPEG-CODECS(1)