4 Encoders are configured elements in FFmpeg which allow the encoding of
7 When you configure your FFmpeg build, all the supported native encoders
8 are enabled by default. Encoders requiring an external library must be enabled
9 manually via the corresponding @code{--enable-lib} option. You can list all
10 available encoders using the configure option @code{--list-encoders}.
12 You can disable all the encoders with the configure option
13 @code{--disable-encoders} and selectively enable / disable single encoders
14 with the options @code{--enable-encoder=@var{ENCODER}} /
15 @code{--disable-encoder=@var{ENCODER}}.
17 The option @code{-encoders} of the ff* tools will display the list of
22 @chapter Audio Encoders
23 @c man begin AUDIO ENCODERS
25 A description of some of the currently available audio encoders
31 Advanced Audio Coding (AAC) encoder.
33 This encoder is an experimental FFmpeg-native AAC encoder. Currently only the
34 low complexity (AAC-LC) profile is supported. To use this encoder, you must set
35 @option{strict} option to @samp{experimental} or lower.
37 As this encoder is experimental, unexpected behavior may exist from time to
38 time. For a more stable AAC encoder, see @ref{libvo-aacenc}. However, be warned
39 that it has a worse quality reported by some users.
41 @c todo @ref{libaacplus}
42 See also @ref{libfdk-aac-enc,,libfdk_aac} and @ref{libfaac}.
48 Set bit rate in bits/s. Setting this automatically activates constant bit rate
52 Set quality for variable bit rate (VBR) mode. This option is valid only using
53 the @command{ffmpeg} command-line tool. For library interface users, use
54 @option{global_quality}.
57 Set stereo encoding mode. Possible values:
61 Automatically selected by the encoder.
64 Disable middle/side encoding. This is the default.
67 Force middle/side encoding.
71 Set AAC encoder coding method. Possible values:
77 This method is a simplified reimplementation of the method used in FAAC, which
78 sets thresholds proportional to the band energies, and then decreases all the
79 thresholds with quantizer steps to find the appropriate quantization with
80 distortion below threshold band by band.
82 The quality of this method is comparable to the two loop searching method
83 described below, but somewhat a little better and slower.
86 Average noise to mask ratio (ANMR) trellis-based solution.
88 This has a theoretic best quality out of all the coding methods, but at the
89 cost of the slowest speed.
92 Two loop searching (TLS) method.
94 This method first sets quantizers depending on band thresholds and then tries
95 to find an optimal combination by adding or subtracting a specific value from
96 all quantizers and adjusting some individual quantizer a little.
98 This method produces similar quality with the FAAC method and is the default.
101 Constant quantizer method.
103 This method sets a constant quantizer for all bands. This is the fastest of all
104 the methods, yet produces the worst quality.
110 @section ac3 and ac3_fixed
114 These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
115 the undocumented RealAudio 3 (a.k.a. dnet).
117 The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed}
118 encoder only uses fixed-point integer math. This does not mean that one is
119 always faster, just that one or the other may be better suited to a
120 particular system. The floating-point encoder will generally produce better
121 quality audio for a given bitrate. The @var{ac3_fixed} encoder is not the
122 default codec for any of the output formats, so it must be specified explicitly
123 using the option @code{-acodec ac3_fixed} in order to use it.
125 @subsection AC-3 Metadata
127 The AC-3 metadata options are used to set parameters that describe the audio,
128 but in most cases do not affect the audio encoding itself. Some of the options
129 do directly affect or influence the decoding and playback of the resulting
130 bitstream, while others are just for informational purposes. A few of the
131 options will add bits to the output stream that could otherwise be used for
132 audio data, and will thus affect the quality of the output. Those will be
133 indicated accordingly with a note in the option list below.
135 These parameters are described in detail in several publicly-available
138 @item @uref{http://www.atsc.org/cms/standards/a_52-2010.pdf,A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard}
139 @item @uref{http://www.atsc.org/cms/standards/a_54a_with_corr_1.pdf,A/54 - Guide to the Use of the ATSC Digital Television Standard}
140 @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf,Dolby Metadata Guide}
141 @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf,Dolby Digital Professional Encoding Guidelines}
144 @subsubsection Metadata Control Options
148 @item -per_frame_metadata @var{boolean}
149 Allow Per-Frame Metadata. Specifies if the encoder should check for changing
150 metadata for each frame.
153 The metadata values set at initialization will be used for every frame in the
156 Metadata values can be changed before encoding each frame.
161 @subsubsection Downmix Levels
165 @item -center_mixlev @var{level}
166 Center Mix Level. The amount of gain the decoder should apply to the center
167 channel when downmixing to stereo. This field will only be written to the
168 bitstream if a center channel is present. The value is specified as a scale
169 factor. There are 3 valid values:
174 Apply -4.5dB gain (default)
179 @item -surround_mixlev @var{level}
180 Surround Mix Level. The amount of gain the decoder should apply to the surround
181 channel(s) when downmixing to stereo. This field will only be written to the
182 bitstream if one or more surround channels are present. The value is specified
183 as a scale factor. There are 3 valid values:
188 Apply -6dB gain (default)
190 Silence Surround Channel(s)
195 @subsubsection Audio Production Information
196 Audio Production Information is optional information describing the mixing
197 environment. Either none or both of the fields are written to the bitstream.
201 @item -mixing_level @var{number}
202 Mixing Level. Specifies peak sound pressure level (SPL) in the production
203 environment when the mix was mastered. Valid values are 80 to 111, or -1 for
204 unknown or not indicated. The default value is -1, but that value cannot be
205 used if the Audio Production Information is written to the bitstream. Therefore,
206 if the @code{room_type} option is not the default value, the @code{mixing_level}
207 option must not be -1.
209 @item -room_type @var{type}
210 Room Type. Describes the equalization used during the final mixing session at
211 the studio or on the dubbing stage. A large room is a dubbing stage with the
212 industry standard X-curve equalization; a small room has flat equalization.
213 This field will not be written to the bitstream if both the @code{mixing_level}
214 option and the @code{room_type} option have the default values.
218 Not Indicated (default)
229 @subsubsection Other Metadata Options
233 @item -copyright @var{boolean}
234 Copyright Indicator. Specifies whether a copyright exists for this audio.
238 No Copyright Exists (default)
244 @item -dialnorm @var{value}
245 Dialogue Normalization. Indicates how far the average dialogue level of the
246 program is below digital 100% full scale (0 dBFS). This parameter determines a
247 level shift during audio reproduction that sets the average volume of the
248 dialogue to a preset level. The goal is to match volume level between program
249 sources. A value of -31dB will result in no volume level change, relative to
250 the source volume, during audio reproduction. Valid values are whole numbers in
251 the range -31 to -1, with -31 being the default.
253 @item -dsur_mode @var{mode}
254 Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
255 (Pro Logic). This field will only be written to the bitstream if the audio
256 stream is stereo. Using this option does @b{NOT} mean the encoder will actually
257 apply Dolby Surround processing.
261 Not Indicated (default)
264 Not Dolby Surround Encoded
267 Dolby Surround Encoded
270 @item -original @var{boolean}
271 Original Bit Stream Indicator. Specifies whether this audio is from the
272 original source and not a copy.
279 Original Source (default)
284 @subsection Extended Bitstream Information
285 The extended bitstream options are part of the Alternate Bit Stream Syntax as
286 specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
287 If any one parameter in a group is specified, all values in that group will be
288 written to the bitstream. Default values are used for those that are written
289 but have not been specified. If the mixing levels are written, the decoder
290 will use these values instead of the ones specified in the @code{center_mixlev}
291 and @code{surround_mixlev} options if it supports the Alternate Bit Stream
294 @subsubsection Extended Bitstream Information - Part 1
298 @item -dmix_mode @var{mode}
299 Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
300 (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
304 Not Indicated (default)
307 Lt/Rt Downmix Preferred
310 Lo/Ro Downmix Preferred
313 @item -ltrt_cmixlev @var{level}
314 Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
315 center channel when downmixing to stereo in Lt/Rt mode.
328 Apply -4.5dB gain (default)
332 Silence Center Channel
335 @item -ltrt_surmixlev @var{level}
336 Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
337 surround channel(s) when downmixing to stereo in Lt/Rt mode.
346 Apply -6.0dB gain (default)
348 Silence Surround Channel(s)
351 @item -loro_cmixlev @var{level}
352 Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
353 center channel when downmixing to stereo in Lo/Ro mode.
366 Apply -4.5dB gain (default)
370 Silence Center Channel
373 @item -loro_surmixlev @var{level}
374 Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
375 surround channel(s) when downmixing to stereo in Lo/Ro mode.
384 Apply -6.0dB gain (default)
386 Silence Surround Channel(s)
391 @subsubsection Extended Bitstream Information - Part 2
395 @item -dsurex_mode @var{mode}
396 Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
397 (7.1 matrixed to 5.1). Using this option does @b{NOT} mean the encoder will actually
398 apply Dolby Surround EX processing.
402 Not Indicated (default)
405 Dolby Surround EX Off
411 @item -dheadphone_mode @var{mode}
412 Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
413 encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
414 option does @b{NOT} mean the encoder will actually apply Dolby Headphone
419 Not Indicated (default)
428 @item -ad_conv_type @var{type}
429 A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
434 Standard A/D Converter (default)
442 @subsection Other AC-3 Encoding Options
446 @item -stereo_rematrixing @var{boolean}
447 Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
448 is an optional AC-3 feature that increases quality by selectively encoding
449 the left/right channels as mid/side. This option is enabled by default, and it
450 is highly recommended that it be left as enabled except for testing purposes.
454 @subsection Floating-Point-Only AC-3 Encoding Options
456 These options are only valid for the floating-point encoder and do not exist
457 for the fixed-point encoder due to the corresponding features not being
458 implemented in fixed-point.
462 @item -channel_coupling @var{boolean}
463 Enables/Disables use of channel coupling, which is an optional AC-3 feature
464 that increases quality by combining high frequency information from multiple
465 channels into a single channel. The per-channel high frequency information is
466 sent with less accuracy in both the frequency and time domains. This allows
467 more bits to be used for lower frequencies while preserving enough information
468 to reconstruct the high frequencies. This option is enabled by default for the
469 floating-point encoder and should generally be left as enabled except for
470 testing purposes or to increase encoding speed.
474 Selected by Encoder (default)
477 Disable Channel Coupling
480 Enable Channel Coupling
483 @item -cpl_start_band @var{number}
484 Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a
485 value higher than the bandwidth is used, it will be reduced to 1 less than the
486 coupling end band. If @var{auto} is used, the start band will be determined by
487 the encoder based on the bit rate, sample rate, and channel layout. This option
488 has no effect if channel coupling is disabled.
492 Selected by Encoder (default)
500 libfaac AAC (Advanced Audio Coding) encoder wrapper.
502 Requires the presence of the libfaac headers and library during
503 configuration. You need to explicitly configure the build with
504 @code{--enable-libfaac --enable-nonfree}.
506 This encoder is considered to be of higher quality with respect to the
507 @ref{aacenc,,the native experimental FFmpeg AAC encoder}.
509 For more information see the libfaac project at
510 @url{http://www.audiocoding.com/faac.html/}.
514 The following shared FFmpeg codec options are recognized.
516 The following options are supported by the libfaac wrapper. The
517 @command{faac}-equivalent of the options are listed in parentheses.
521 Set bit rate in bits/s for ABR (Average Bit Rate) mode. If the bit rate
522 is not explicitly specified, it is automatically set to a suitable
523 value depending on the selected profile. @command{faac} bitrate is
524 expressed in kilobits/s.
526 Note that libfaac does not support CBR (Constant Bit Rate) but only
527 ABR (Average Bit Rate).
529 If VBR mode is enabled this option is ignored.
532 Set audio sampling rate (in Hz).
535 Set the number of audio channels.
537 @item cutoff (@emph{-C})
538 Set cutoff frequency. If not specified (or explicitly set to 0) it
539 will use a value automatically computed by the library. Default value
545 The following profiles are recognized:
551 Low Complexity AAC (LC)
554 Scalable Sample Rate (SSR)
557 Long Term Prediction (LTP)
560 If not specified it is set to @samp{aac_low}.
563 Set constant quality VBR (Variable Bit Rate) mode.
566 Set quality in VBR mode as an integer number of lambda units.
568 Only relevant when VBR mode is enabled with @code{flags +qscale}. The
569 value is converted to QP units by dividing it by @code{FF_QP2LAMBDA},
570 and used to set the quality value used by libfaac. A reasonable range
571 for the option value in QP units is [10-500], the higher the value the
575 Enable VBR mode when set to a non-negative value, and set constant
576 quality value as a double floating point value in QP units.
578 The value sets the quality value used by libfaac. A reasonable range
579 for the option value is [10-500], the higher the value the higher the
582 This option is valid only using the @command{ffmpeg} command-line
583 tool. For library interface users, use @option{global_quality}.
590 Use @command{ffmpeg} to convert an audio file to ABR 128 kbps AAC in an M4A (MP4)
593 ffmpeg -i input.wav -codec:a libfaac -b:a 128k -output.m4a
597 Use @command{ffmpeg} to convert an audio file to VBR AAC, using the
600 ffmpeg -i input.wav -c:a libfaac -profile:a aac_ltp -q:a 100 output.m4a
604 @anchor{libfdk-aac-enc}
607 libfdk-aac AAC (Advanced Audio Coding) encoder wrapper.
609 The libfdk-aac library is based on the Fraunhofer FDK AAC code from
612 Requires the presence of the libfdk-aac headers and library during
613 configuration. You need to explicitly configure the build with
614 @code{--enable-libfdk-aac}. The library is also incompatible with GPL,
615 so if you allow the use of GPL, you should configure with
616 @code{--enable-gpl --enable-nonfree --enable-libfdk-aac}.
618 This encoder is considered to be of higher quality with respect to
619 both @ref{aacenc,,the native experimental FFmpeg AAC encoder} and
622 VBR encoding, enabled through the @option{vbr} or @option{flags
623 +qscale} options, is experimental and only works with some
624 combinations of parameters.
626 Support for encoding 7.1 audio is only available with libfdk-aac 0.1.3 or
629 For more information see the fdk-aac project at
630 @url{http://sourceforge.net/p/opencore-amr/fdk-aac/}.
634 The following options are mapped on the shared FFmpeg codec options.
638 Set bit rate in bits/s. If the bitrate is not explicitly specified, it
639 is automatically set to a suitable value depending on the selected
642 In case VBR mode is enabled the option is ignored.
645 Set audio sampling rate (in Hz).
648 Set the number of audio channels.
651 Enable fixed quality, VBR (Variable Bit Rate) mode.
652 Note that VBR is implicitly enabled when the @option{vbr} value is
656 Set cutoff frequency. If not specified (or explicitly set to 0) it
657 will use a value automatically computed by the library. Default value
663 The following profiles are recognized:
666 Low Complexity AAC (LC)
669 High Efficiency AAC (HE-AAC)
672 High Efficiency AAC version 2 (HE-AACv2)
678 Enhanced Low Delay AAC (ELD)
681 If not specified it is set to @samp{aac_low}.
684 The following are private options of the libfdk_aac encoder.
688 Enable afterburner feature if set to 1, disabled if set to 0. This
689 improves the quality but also the required processing power.
694 Enable SBR (Spectral Band Replication) for ELD if set to 1, disabled
700 Set SBR/PS signaling style.
702 It can assume one of the following values:
705 choose signaling implicitly (explicit hierarchical by default,
706 implicit if global header is disabled)
709 implicit backwards compatible signaling
712 explicit SBR, implicit PS signaling
714 @item explicit_hierarchical
715 explicit hierarchical signaling
718 Default value is @samp{default}.
721 Output LATM/LOAS encapsulated data if set to 1, disabled if set to 0.
726 Set StreamMuxConfig and PCE repetition period (in frames) for sending
727 in-band configuration buffers within LATM/LOAS transport layer.
729 Must be a 16-bits non-negative integer.
734 Set VBR mode, from 1 to 5. 1 is lowest quality (though still pretty
735 good) and 5 is highest quality. A value of 0 will disable VBR, and CBR
736 (Constant Bit Rate) is enabled.
738 Currently only the @samp{aac_low} profile supports VBR encoding.
740 VBR modes 1-5 correspond to roughly the following average bit rates:
752 about 80-96 kbps/channel
762 Use @command{ffmpeg} to convert an audio file to VBR AAC in an M4A (MP4)
765 ffmpeg -i input.wav -codec:a libfdk_aac -vbr 3 output.m4a
769 Use @command{ffmpeg} to convert an audio file to CBR 64k kbps AAC, using the
770 High-Efficiency AAC profile:
772 ffmpeg -i input.wav -c:a libfdk_aac -profile:a aac_he -b:a 64k output.m4a
779 LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper.
781 Requires the presence of the libmp3lame headers and library during
782 configuration. You need to explicitly configure the build with
783 @code{--enable-libmp3lame}.
785 See @ref{libshine} for a fixed-point MP3 encoder, although with a
790 The following options are supported by the libmp3lame wrapper. The
791 @command{lame}-equivalent of the options are listed in parentheses.
795 Set bitrate expressed in bits/s for CBR or ABR. LAME @code{bitrate} is
796 expressed in kilobits/s.
799 Set constant quality setting for VBR. This option is valid only
800 using the @command{ffmpeg} command-line tool. For library interface
801 users, use @option{global_quality}.
803 @item compression_level (@emph{-q})
804 Set algorithm quality. Valid arguments are integers in the 0-9 range,
805 with 0 meaning highest quality but slowest, and 9 meaning fastest
806 while producing the worst quality.
809 Enable use of bit reservoir when set to 1. Default value is 1. LAME
810 has this enabled by default, but can be overridden by use
811 @option{--nores} option.
813 @item joint_stereo (@emph{-m j})
814 Enable the encoder to use (on a frame by frame basis) either L/R
815 stereo or mid/side stereo. Default value is 1.
817 @item abr (@emph{--abr})
818 Enable the encoder to use ABR when set to 1. The @command{lame}
819 @option{--abr} sets the target bitrate, while this options only
820 tells FFmpeg to use ABR still relies on @option{b} to set bitrate.
824 @section libopencore-amrnb
826 OpenCORE Adaptive Multi-Rate Narrowband encoder.
828 Requires the presence of the libopencore-amrnb headers and library during
829 configuration. You need to explicitly configure the build with
830 @code{--enable-libopencore-amrnb --enable-version3}.
832 This is a mono-only encoder. Officially it only supports 8000Hz sample rate,
833 but you can override it by setting @option{strict} to @samp{unofficial} or
841 Set bitrate in bits per second. Only the following bitrates are supported,
842 otherwise libavcodec will round to the nearest valid bitrate.
856 Allow discontinuous transmission (generate comfort noise) when set to 1. The
857 default value is 0 (disabled).
864 Shine Fixed-Point MP3 encoder wrapper.
866 Shine is a fixed-point MP3 encoder. It has a far better performance on
867 platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
868 However, as it is more targeted on performance than quality, it is not on par
869 with LAME and other production-grade encoders quality-wise. Also, according to
870 the project's homepage, this encoder may not be free of bugs as the code was
871 written a long time ago and the project was dead for at least 5 years.
873 This encoder only supports stereo and mono input. This is also CBR-only.
875 The original project (last updated in early 2007) is at
876 @url{http://sourceforge.net/projects/libshine-fxp/}. We only support the
877 updated fork by the Savonet/Liquidsoap project at @url{https://github.com/savonet/shine}.
879 Requires the presence of the libshine headers and library during
880 configuration. You need to explicitly configure the build with
881 @code{--enable-libshine}.
883 See also @ref{libmp3lame}.
887 The following options are supported by the libshine wrapper. The
888 @command{shineenc}-equivalent of the options are listed in parentheses.
892 Set bitrate expressed in bits/s for CBR. @command{shineenc} @option{-b} option
893 is expressed in kilobits/s.
899 TwoLAME MP2 encoder wrapper.
901 Requires the presence of the libtwolame headers and library during
902 configuration. You need to explicitly configure the build with
903 @code{--enable-libtwolame}.
907 The following options are supported by the libtwolame wrapper. The
908 @command{twolame}-equivalent options follow the FFmpeg ones and are in
913 Set bitrate expressed in bits/s for CBR. @command{twolame} @option{b}
914 option is expressed in kilobits/s. Default value is 128k.
917 Set quality for experimental VBR support. Maximum value range is
918 from -50 to 50, useful range is from -10 to 10. The higher the
919 value, the better the quality. This option is valid only using the
920 @command{ffmpeg} command-line tool. For library interface users,
921 use @option{global_quality}.
923 @item mode (@emph{--mode})
924 Set the mode of the resulting audio. Possible values:
928 Choose mode automatically based on the input. This is the default.
939 @item psymodel (@emph{--psyc-mode})
940 Set psychoacoustic model to use in encoding. The argument must be
941 an integer between -1 and 4, inclusive. The higher the value, the
942 better the quality. The default value is 3.
944 @item energy_levels (@emph{--energy})
945 Enable energy levels extensions when set to 1. The default value is
948 @item error_protection (@emph{--protect})
949 Enable CRC error protection when set to 1. The default value is 0
952 @item copyright (@emph{--copyright})
953 Set MPEG audio copyright flag when set to 1. The default value is 0
956 @item original (@emph{--original})
957 Set MPEG audio original flag when set to 1. The default value is 0
962 @anchor{libvo-aacenc}
963 @section libvo-aacenc
965 VisualOn AAC encoder.
967 Requires the presence of the libvo-aacenc headers and library during
968 configuration. You need to explicitly configure the build with
969 @code{--enable-libvo-aacenc --enable-version3}.
971 This encoder is considered to be worse than the
972 @ref{aacenc,,native experimental FFmpeg AAC encoder}, according to
977 The VisualOn AAC encoder only support encoding AAC-LC and up to 2
978 channels. It is also CBR-only.
983 Set bit rate in bits/s.
987 @section libvo-amrwbenc
989 VisualOn Adaptive Multi-Rate Wideband encoder.
991 Requires the presence of the libvo-amrwbenc headers and library during
992 configuration. You need to explicitly configure the build with
993 @code{--enable-libvo-amrwbenc --enable-version3}.
995 This is a mono-only encoder. Officially it only supports 16000Hz sample
996 rate, but you can override it by setting @option{strict} to
997 @samp{unofficial} or lower.
1004 Set bitrate in bits/s. Only the following bitrates are supported, otherwise
1005 libavcodec will round to the nearest valid bitrate.
1020 Allow discontinuous transmission (generate comfort noise) when set to 1. The
1021 default value is 0 (disabled).
1027 libopus Opus Interactive Audio Codec encoder wrapper.
1029 Requires the presence of the libopus headers and library during
1030 configuration. You need to explicitly configure the build with
1031 @code{--enable-libopus}.
1033 @subsection Option Mapping
1035 Most libopus options are modeled after the @command{opusenc} utility from
1036 opus-tools. The following is an option mapping chart describing options
1037 supported by the libopus wrapper, and their @command{opusenc}-equivalent
1042 @item b (@emph{bitrate})
1043 Set the bit rate in bits/s. FFmpeg's @option{b} option is
1044 expressed in bits/s, while @command{opusenc}'s @option{bitrate} in
1047 @item vbr (@emph{vbr}, @emph{hard-cbr}, and @emph{cvbr})
1048 Set VBR mode. The FFmpeg @option{vbr} option has the following
1049 valid arguments, with the their @command{opusenc} equivalent options
1053 @item off (@emph{hard-cbr})
1054 Use constant bit rate encoding.
1056 @item on (@emph{vbr})
1057 Use variable bit rate encoding (the default).
1059 @item constrained (@emph{cvbr})
1060 Use constrained variable bit rate encoding.
1063 @item compression_level (@emph{comp})
1064 Set encoding algorithm complexity. Valid options are integers in
1065 the 0-10 range. 0 gives the fastest encodes but lower quality, while 10
1066 gives the highest quality but slowest encoding. The default is 10.
1068 @item frame_duration (@emph{framesize})
1069 Set maximum frame size, or duration of a frame in milliseconds. The
1070 argument must be exactly the following: 2.5, 5, 10, 20, 40, 60. Smaller
1071 frame sizes achieve lower latency but less quality at a given bitrate.
1072 Sizes greater than 20ms are only interesting at fairly low bitrates.
1073 The default is 20ms.
1075 @item packet_loss (@emph{expect-loss})
1076 Set expected packet loss percentage. The default is 0.
1078 @item application (N.A.)
1079 Set intended application type. Valid options are listed below:
1083 Favor improved speech intelligibility.
1085 Favor faithfulness to the input (the default).
1087 Restrict to only the lowest delay modes.
1091 Set cutoff bandwidth in Hz. The argument must be exactly one of the
1092 following: 4000, 6000, 8000, 12000, or 20000, corresponding to
1093 narrowband, mediumband, wideband, super wideband, and fullband
1094 respectively. The default is 0 (cutoff disabled).
1100 libvorbis encoder wrapper.
1102 Requires the presence of the libvorbisenc headers and library during
1103 configuration. You need to explicitly configure the build with
1104 @code{--enable-libvorbis}.
1108 The following options are supported by the libvorbis wrapper. The
1109 @command{oggenc}-equivalent of the options are listed in parentheses.
1111 To get a more accurate and extensive documentation of the libvorbis
1112 options, consult the libvorbisenc's and @command{oggenc}'s documentations.
1113 See @url{http://xiph.org/vorbis/},
1114 @url{http://wiki.xiph.org/Vorbis-tools}, and oggenc(1).
1118 Set bitrate expressed in bits/s for ABR. @command{oggenc} @option{-b} is
1119 expressed in kilobits/s.
1122 Set constant quality setting for VBR. The value should be a float
1123 number in the range of -1.0 to 10.0. The higher the value, the better
1124 the quality. The default value is @samp{3.0}.
1126 This option is valid only using the @command{ffmpeg} command-line tool.
1127 For library interface users, use @option{global_quality}.
1129 @item cutoff (@emph{--advanced-encode-option lowpass_frequency=N})
1130 Set cutoff bandwidth in Hz, a value of 0 disables cutoff. @command{oggenc}'s
1131 related option is expressed in kHz. The default value is @samp{0} (cutoff
1134 @item minrate (@emph{-m})
1135 Set minimum bitrate expressed in bits/s. @command{oggenc} @option{-m} is
1136 expressed in kilobits/s.
1138 @item maxrate (@emph{-M})
1139 Set maximum bitrate expressed in bits/s. @command{oggenc} @option{-M} is
1140 expressed in kilobits/s. This only has effect on ABR mode.
1142 @item iblock (@emph{--advanced-encode-option impulse_noisetune=N})
1143 Set noise floor bias for impulse blocks. The value is a float number from
1144 -15.0 to 0.0. A negative bias instructs the encoder to pay special attention
1145 to the crispness of transients in the encoded audio. The tradeoff for better
1146 transient response is a higher bitrate.
1153 A wrapper providing WavPack encoding through libwavpack.
1155 Only lossless mode using 32-bit integer samples is supported currently.
1157 Requires the presence of the libwavpack headers and library during
1158 configuration. You need to explicitly configure the build with
1159 @code{--enable-libwavpack}.
1161 Note that a libavcodec-native encoder for the WavPack codec exists so users can
1162 encode audios with this codec without using this encoder. See @ref{wavpackenc}.
1166 @command{wavpack} command line utility's corresponding options are listed in
1167 parentheses, if any.
1170 @item frame_size (@emph{--blocksize})
1173 @item compression_level
1174 Set speed vs. compression tradeoff. Acceptable arguments are listed below:
1181 Normal (default) settings.
1186 @item 3 (@emph{-hh})
1189 @item 4-8 (@emph{-hh -x}@var{EXTRAPROC})
1190 Same as @samp{3}, but with extra processing enabled.
1192 @samp{4} is the same as @option{-x2} and @samp{8} is the same as @option{-x6}.
1200 WavPack lossless audio encoder.
1202 This is a libavcodec-native WavPack encoder. There is also an encoder based on
1203 libwavpack, but there is virtually no reason to use that encoder.
1205 See also @ref{libwavpack}.
1209 The equivalent options for @command{wavpack} command line utility are listed in
1212 @subsubsection Shared options
1214 The following shared options are effective for this encoder. Only special notes
1215 about this particular encoder will be documented here. For the general meaning
1216 of the options, see @ref{codec-options,,the Codec Options chapter}.
1219 @item frame_size (@emph{--blocksize})
1220 For this encoder, the range for this option is between 128 and 131072. Default
1221 is automatically decided based on sample rate and number of channel.
1223 For the complete formula of calculating default, see
1224 @file{libavcodec/wavpackenc.c}.
1226 @item compression_level (@emph{-f}, @emph{-h}, @emph{-hh}, and @emph{-x})
1227 This option's syntax is consistent with @ref{libwavpack}'s.
1230 @subsubsection Private options
1233 @item joint_stereo (@emph{-j})
1234 Set whether to enable joint stereo. Valid values are:
1238 Force mid/side audio encoding.
1239 @item off (@emph{0})
1240 Force left/right audio encoding.
1242 Let the encoder decide automatically.
1246 Set whether to enable optimization for mono. This option is only effective for
1247 non-mono streams. Available values:
1258 @c man end AUDIO ENCODERS
1260 @chapter Video Encoders
1261 @c man begin VIDEO ENCODERS
1263 A description of some of the currently available video encoders
1268 libtheora Theora encoder wrapper.
1270 Requires the presence of the libtheora headers and library during
1271 configuration. You need to explicitly configure the build with
1272 @code{--enable-libtheora}.
1274 For more information about the libtheora project see
1275 @url{http://www.theora.org/}.
1279 The following global options are mapped to internal libtheora options
1280 which affect the quality and the bitrate of the encoded stream.
1284 Set the video bitrate in bit/s for CBR (Constant Bit Rate) mode. In
1285 case VBR (Variable Bit Rate) mode is enabled this option is ignored.
1288 Used to enable constant quality mode (VBR) encoding through the
1289 @option{qscale} flag, and to enable the @code{pass1} and @code{pass2}
1295 @item global_quality
1296 Set the global quality as an integer in lambda units.
1298 Only relevant when VBR mode is enabled with @code{flags +qscale}. The
1299 value is converted to QP units by dividing it by @code{FF_QP2LAMBDA},
1300 clipped in the [0 - 10] range, and then multiplied by 6.3 to get a
1301 value in the native libtheora range [0-63]. A higher value corresponds
1302 to a higher quality.
1305 Enable VBR mode when set to a non-negative value, and set constant
1306 quality value as a double floating point value in QP units.
1308 The value is clipped in the [0-10] range, and then multiplied by 6.3
1309 to get a value in the native libtheora range [0-63].
1311 This option is valid only using the @command{ffmpeg} command-line
1312 tool. For library interface users, use @option{global_quality}.
1315 @subsection Examples
1319 Set maximum constant quality (VBR) encoding with @command{ffmpeg}:
1321 ffmpeg -i INPUT -codec:v libtheora -q:v 10 OUTPUT.ogg
1325 Use @command{ffmpeg} to convert a CBR 1000 kbps Theora video stream:
1327 ffmpeg -i INPUT -codec:v libtheora -b:v 1000k OUTPUT.ogg
1333 VP8 format supported through libvpx.
1335 Requires the presence of the libvpx headers and library during configuration.
1336 You need to explicitly configure the build with @code{--enable-libvpx}.
1340 Mapping from FFmpeg to libvpx options with conversion notes in parentheses.
1367 @code{(bufsize * 1000 / vb)}
1370 @code{(bufsize * 1000 / vb * 5 / 6)}
1372 @item rc_init_occupancy, vb
1374 @code{(rc_init_occupancy * 1000 / vb)}
1376 @item rc_buffer_aggressivity
1379 @item skip_threshold
1383 rc_2pass_vbr_bias_pct
1386 rc_2pass_vbr_maxsection_pct
1387 @code{(maxrate * 100 / vb)}
1390 rc_2pass_vbr_minsection_pct
1391 @code{(minrate * 100 / vb)}
1393 @item minrate, maxrate, vb
1395 @code{(minrate == maxrate == vb)}
1398 @code{VPX_CQ}, @code{VP8E_SET_CQ_LEVEL}
1403 @code{VPX_DL_BEST_QUALITY}
1405 @code{VPX_DL_GOOD_QUALITY}
1406 @item @var{realtime}
1407 @code{VPX_DL_REALTIME}
1411 @code{VP8E_SET_CPUUSED}
1414 @code{VP8E_SET_NOISE_SENSITIVITY}
1417 @code{VP8E_SET_STATIC_THRESHOLD}
1420 @code{VP8E_SET_TOKEN_PARTITIONS}
1422 @item max-intra-rate
1423 @code{VP8E_SET_MAX_INTRA_BITRATE_PCT}
1425 @item force_key_frames
1426 @code{VPX_EFLAG_FORCE_KF}
1428 @item Alternate reference frame related
1430 @item vp8flags altref
1431 @code{VP8E_SET_ENABLEAUTOALTREF}
1432 @item @var{arnr_max_frames}
1433 @code{VP8E_SET_ARNR_MAXFRAMES}
1434 @item @var{arnr_type}
1435 @code{VP8E_SET_ARNR_TYPE}
1436 @item @var{arnr_strength}
1437 @code{VP8E_SET_ARNR_STRENGTH}
1438 @item @var{rc_lookahead}
1442 @item vp8flags error_resilient
1447 For more information about libvpx see:
1448 @url{http://www.webmproject.org/}
1453 libwebp WebP Image encoder wrapper
1455 libwebp is Google's official encoder for WebP images. It can encode in either
1456 lossy or lossless mode. Lossy images are essentially a wrapper around a VP8
1457 frame. Lossless images are a separate codec developed by Google.
1459 @subsection Pixel Format
1461 Currently, libwebp only supports YUV420 for lossy and RGB for lossless due
1462 to limitations of the format and libwebp. Alpha is supported for either mode.
1463 Because of API limitations, if RGB is passed in when encoding lossy or YUV is
1464 passed in for encoding lossless, the pixel format will automatically be
1465 converted using functions from libwebp. This is not ideal and is done only for
1472 @item -lossless @var{boolean}
1473 Enables/Disables use of lossless mode. Default is 0.
1475 @item -compression_level @var{integer}
1476 For lossy, this is a quality/speed tradeoff. Higher values give better quality
1477 for a given size at the cost of increased encoding time. For lossless, this is
1478 a size/speed tradeoff. Higher values give smaller size at the cost of increased
1479 encoding time. More specifically, it controls the number of extra algorithms
1480 and compression tools used, and varies the combination of these tools. This
1481 maps to the @var{method} option in libwebp. The valid range is 0 to 6.
1484 @item -qscale @var{float}
1485 For lossy encoding, this controls image quality, 0 to 100. For lossless
1486 encoding, this controls the effort and time spent at compressing more. The
1487 default value is 75. Note that for usage via libavcodec, this option is called
1488 @var{global_quality} and must be multiplied by @var{FF_QP2LAMBDA}.
1490 @item -preset @var{type}
1491 Configuration preset. This does some automatic settings based on the general
1495 Do not use a preset.
1497 Use the encoder default.
1499 Digital picture, like portrait, inner shot
1501 Outdoor photograph, with natural lighting
1503 Hand or line drawing, with high-contrast details
1505 Small-sized colorful images
1512 @section libx264, libx264rgb
1514 x264 H.264/MPEG-4 AVC encoder wrapper.
1516 This encoder requires the presence of the libx264 headers and library
1517 during configuration. You need to explicitly configure the build with
1518 @code{--enable-libx264}.
1520 libx264 supports an impressive number of features, including 8x8 and
1521 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
1522 entropy coding, interlacing (MBAFF), lossless mode, psy optimizations
1523 for detail retention (adaptive quantization, psy-RD, psy-trellis).
1525 Many libx264 encoder options are mapped to FFmpeg global codec
1526 options, while unique encoder options are provided through private
1527 options. Additionally the @option{x264opts} and @option{x264-params}
1528 private options allows one to pass a list of key=value tuples as accepted
1529 by the libx264 @code{x264_param_parse} function.
1531 The x264 project website is at
1532 @url{http://www.videolan.org/developers/x264.html}.
1534 The libx264rgb encoder is the same as libx264, except it accepts packed RGB
1535 pixel formats as input instead of YUV.
1537 @subsection Supported Pixel Formats
1539 x264 supports 8- to 10-bit color spaces. The exact bit depth is controlled at
1540 x264's configure time. FFmpeg only supports one bit depth in one particular
1541 build. In other words, it is not possible to build one FFmpeg with multiple
1542 versions of x264 with different bit depths.
1546 The following options are supported by the libx264 wrapper. The
1547 @command{x264}-equivalent options or values are listed in parentheses
1550 To reduce the duplication of documentation, only the private options
1551 and some others requiring special attention are documented here. For
1552 the documentation of the undocumented generic options, see
1553 @ref{codec-options,,the Codec Options chapter}.
1555 To get a more accurate and extensive documentation of the libx264
1556 options, invoke the command @command{x264 --full-help} or consult
1557 the libx264 documentation.
1560 @item b (@emph{bitrate})
1561 Set bitrate in bits/s. Note that FFmpeg's @option{b} option is
1562 expressed in bits/s, while @command{x264}'s @option{bitrate} is in
1565 @item bf (@emph{bframes})
1567 @item g (@emph{keyint})
1569 @item qmin (@emph{qpmin})
1570 Minimum quantizer scale.
1572 @item qmax (@emph{qpmax})
1573 Maximum quantizer scale.
1575 @item qdiff (@emph{qpstep})
1576 Maximum difference between quantizer scales.
1578 @item qblur (@emph{qblur})
1579 Quantizer curve blur
1581 @item qcomp (@emph{qcomp})
1582 Quantizer curve compression factor
1584 @item refs (@emph{ref})
1585 Number of reference frames each P-frame can use. The range is from @var{0-16}.
1587 @item sc_threshold (@emph{scenecut})
1588 Sets the threshold for the scene change detection.
1590 @item trellis (@emph{trellis})
1591 Performs Trellis quantization to increase efficiency. Enabled by default.
1593 @item nr (@emph{nr})
1595 @item me_range (@emph{merange})
1596 Maximum range of the motion search in pixels.
1598 @item me_method (@emph{me})
1599 Set motion estimation method. Possible values in the decreasing order
1603 @item dia (@emph{dia})
1604 @item epzs (@emph{dia})
1605 Diamond search with radius 1 (fastest). @samp{epzs} is an alias for
1607 @item hex (@emph{hex})
1608 Hexagonal search with radius 2.
1609 @item umh (@emph{umh})
1610 Uneven multi-hexagon search.
1611 @item esa (@emph{esa})
1613 @item tesa (@emph{tesa})
1614 Hadamard exhaustive search (slowest).
1617 @item subq (@emph{subme})
1618 Sub-pixel motion estimation method.
1620 @item b_strategy (@emph{b-adapt})
1621 Adaptive B-frame placement decision algorithm. Use only on first-pass.
1623 @item keyint_min (@emph{min-keyint})
1627 Set entropy encoder. Possible values:
1634 Enable CAVLC and disable CABAC. It generates the same effect as
1635 @command{x264}'s @option{--no-cabac} option.
1639 Set full pixel motion estimation comparation algorithm. Possible values:
1643 Enable chroma in motion estimation.
1646 Ignore chroma in motion estimation. It generates the same effect as
1647 @command{x264}'s @option{--no-chroma-me} option.
1650 @item threads (@emph{threads})
1651 Number of encoding threads.
1654 Set multithreading technique. Possible values:
1658 Slice-based multithreading. It generates the same effect as
1659 @command{x264}'s @option{--sliced-threads} option.
1661 Frame-based multithreading.
1665 Set encoding flags. It can be used to disable closed GOP and enable
1666 open GOP by setting it to @code{-cgop}. The result is similar to
1667 the behavior of @command{x264}'s @option{--open-gop} option.
1669 @item rc_init_occupancy (@emph{vbv-init})
1671 @item preset (@emph{preset})
1672 Set the encoding preset.
1674 @item tune (@emph{tune})
1675 Set tuning of the encoding params.
1677 @item profile (@emph{profile})
1678 Set profile restrictions.
1681 Enable fast settings when encoding first pass, when set to 1. When set
1682 to 0, it has the same effect of @command{x264}'s
1683 @option{--slow-firstpass} option.
1685 @item crf (@emph{crf})
1686 Set the quality for constant quality mode.
1688 @item crf_max (@emph{crf-max})
1689 In CRF mode, prevents VBV from lowering quality beyond this point.
1691 @item qp (@emph{qp})
1692 Set constant quantization rate control method parameter.
1694 @item aq-mode (@emph{aq-mode})
1695 Set AQ method. Possible values:
1698 @item none (@emph{0})
1701 @item variance (@emph{1})
1702 Variance AQ (complexity mask).
1704 @item autovariance (@emph{2})
1705 Auto-variance AQ (experimental).
1708 @item aq-strength (@emph{aq-strength})
1709 Set AQ strength, reduce blocking and blurring in flat and textured areas.
1712 Use psychovisual optimizations when set to 1. When set to 0, it has the
1713 same effect as @command{x264}'s @option{--no-psy} option.
1715 @item psy-rd (@emph{psy-rd})
1716 Set strength of psychovisual optimization, in
1717 @var{psy-rd}:@var{psy-trellis} format.
1719 @item rc-lookahead (@emph{rc-lookahead})
1720 Set number of frames to look ahead for frametype and ratecontrol.
1723 Enable weighted prediction for B-frames when set to 1. When set to 0,
1724 it has the same effect as @command{x264}'s @option{--no-weightb} option.
1726 @item weightp (@emph{weightp})
1727 Set weighted prediction method for P-frames. Possible values:
1730 @item none (@emph{0})
1732 @item simple (@emph{1})
1733 Enable only weighted refs
1734 @item smart (@emph{2})
1735 Enable both weighted refs and duplicates
1738 @item ssim (@emph{ssim})
1739 Enable calculation and printing SSIM stats after the encoding.
1741 @item intra-refresh (@emph{intra-refresh})
1742 Enable the use of Periodic Intra Refresh instead of IDR frames when set
1745 @item bluray-compat (@emph{bluray-compat})
1746 Configure the encoder to be compatible with the bluray standard.
1747 It is a shorthand for setting "bluray-compat=1 force-cfr=1".
1749 @item b-bias (@emph{b-bias})
1750 Set the influence on how often B-frames are used.
1752 @item b-pyramid (@emph{b-pyramid})
1753 Set method for keeping of some B-frames as references. Possible values:
1756 @item none (@emph{none})
1758 @item strict (@emph{strict})
1759 Strictly hierarchical pyramid.
1760 @item normal (@emph{normal})
1761 Non-strict (not Blu-ray compatible).
1765 Enable the use of one reference per partition, as opposed to one
1766 reference per macroblock when set to 1. When set to 0, it has the
1767 same effect as @command{x264}'s @option{--no-mixed-refs} option.
1770 Enable adaptive spatial transform (high profile 8x8 transform)
1771 when set to 1. When set to 0, it has the same effect as
1772 @command{x264}'s @option{--no-8x8dct} option.
1775 Enable early SKIP detection on P-frames when set to 1. When set
1776 to 0, it has the same effect as @command{x264}'s
1777 @option{--no-fast-pskip} option.
1779 @item aud (@emph{aud})
1780 Enable use of access unit delimiters when set to 1.
1783 Enable use macroblock tree ratecontrol when set to 1. When set
1784 to 0, it has the same effect as @command{x264}'s
1785 @option{--no-mbtree} option.
1787 @item deblock (@emph{deblock})
1788 Set loop filter parameters, in @var{alpha}:@var{beta} form.
1790 @item cplxblur (@emph{cplxblur})
1791 Set fluctuations reduction in QP (before curve compression).
1793 @item partitions (@emph{partitions})
1794 Set partitions to consider as a comma-separated list of. Possible
1799 8x8 P-frame partition.
1801 4x4 P-frame partition.
1803 4x4 B-frame partition.
1805 8x8 I-frame partition.
1807 4x4 I-frame partition.
1808 (Enabling @samp{p4x4} requires @samp{p8x8} to be enabled. Enabling
1809 @samp{i8x8} requires adaptive spatial transform (@option{8x8dct}
1810 option) to be enabled.)
1811 @item none (@emph{none})
1812 Do not consider any partitions.
1813 @item all (@emph{all})
1814 Consider every partition.
1817 @item direct-pred (@emph{direct})
1818 Set direct MV prediction mode. Possible values:
1821 @item none (@emph{none})
1822 Disable MV prediction.
1823 @item spatial (@emph{spatial})
1824 Enable spatial predicting.
1825 @item temporal (@emph{temporal})
1826 Enable temporal predicting.
1827 @item auto (@emph{auto})
1828 Automatically decided.
1831 @item slice-max-size (@emph{slice-max-size})
1832 Set the limit of the size of each slice in bytes. If not specified
1833 but RTP payload size (@option{ps}) is specified, that is used.
1835 @item stats (@emph{stats})
1836 Set the file name for multi-pass stats.
1838 @item nal-hrd (@emph{nal-hrd})
1839 Set signal HRD information (requires @option{vbv-bufsize} to be set).
1843 @item none (@emph{none})
1844 Disable HRD information signaling.
1845 @item vbr (@emph{vbr})
1847 @item cbr (@emph{cbr})
1848 Constant bit rate (not allowed in MP4 container).
1851 @item x264opts (N.A.)
1852 Set any x264 option, see @command{x264 --fullhelp} for a list.
1854 Argument is a list of @var{key}=@var{value} couples separated by
1855 ":". In @var{filter} and @var{psy-rd} options that use ":" as a separator
1856 themselves, use "," instead. They accept it as well since long ago but this
1857 is kept undocumented for some reason.
1859 For example to specify libx264 encoding options with @command{ffmpeg}:
1861 ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
1864 @item x264-params (N.A.)
1865 Override the x264 configuration using a :-separated list of key=value
1868 This option is functionally the same as the @option{x264opts}, but is
1869 duplicated for compatibility with the Libav fork.
1871 For example to specify libx264 encoding options with @command{ffmpeg}:
1873 ffmpeg -i INPUT -c:v libx264 -x264-params level=30:bframes=0:weightp=0:\
1874 cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:\
1875 no-fast-pskip=1:subq=6:8x8dct=0:trellis=0 OUTPUT
1879 Encoding ffpresets for common usages are provided so they can be used with the
1880 general presets system (e.g. passing the @option{pre} option).
1884 Xvid MPEG-4 Part 2 encoder wrapper.
1886 This encoder requires the presence of the libxvidcore headers and library
1887 during configuration. You need to explicitly configure the build with
1888 @code{--enable-libxvid --enable-gpl}.
1890 The native @code{mpeg4} encoder supports the MPEG-4 Part 2 format, so
1891 users can encode to this format without this library.
1895 The following options are supported by the libxvid wrapper. Some of
1896 the following options are listed but are not documented, and
1897 correspond to shared codec options. See @ref{codec-options,,the Codec
1898 Options chapter} for their documentation. The other shared options
1899 which are not listed have no effect for the libxvid encoder.
1921 Set specific encoding flags. Possible values:
1926 Use four motion vector by macroblock.
1929 Enable high quality AC prediction.
1932 Only encode grayscale.
1935 Enable the use of global motion compensation (GMC).
1938 Enable quarter-pixel motion compensation.
1944 Place global headers in extradata instead of every keyframe.
1951 Set motion estimation method. Possible values in decreasing order of
1952 speed and increasing order of quality:
1956 Use no motion estimation (default).
1961 Enable advanced diamond zonal search for 16x16 blocks and half-pixel
1962 refinement for 16x16 blocks. @samp{x1} and @samp{log} are aliases for
1966 Enable all of the things described above, plus advanced diamond zonal
1967 search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
1968 estimation on chroma planes.
1971 Enable all of the things described above, plus extended 16x16 and 8x8
1976 Set macroblock decision algorithm. Possible values in the increasing
1981 Use macroblock comparing function algorithm (default).
1984 Enable rate distortion-based half pixel and quarter pixel refinement for
1988 Enable all of the things described above, plus rate distortion-based
1989 half pixel and quarter pixel refinement for 8x8 blocks, and rate
1990 distortion-based search using square pattern.
1994 Enable lumi masking adaptive quantization when set to 1. Default is 0
1998 Enable variance adaptive quantization when set to 1. Default is 0
2001 When combined with @option{lumi_aq}, the resulting quality will not
2002 be better than any of the two specified individually. In other
2003 words, the resulting quality will be the worse one of the two
2007 Set structural similarity (SSIM) displaying method. Possible values:
2011 Disable displaying of SSIM information.
2014 Output average SSIM at the end of encoding to stdout. The format of
2015 showing the average SSIM is:
2021 For users who are not familiar with C, %f means a float number, or
2022 a decimal (e.g. 0.939232).
2025 Output both per-frame SSIM data during encoding and average SSIM at
2026 the end of encoding to stdout. The format of per-frame information
2030 SSIM: avg: %1.3f min: %1.3f max: %1.3f
2033 For users who are not familiar with C, %1.3f means a float number
2034 rounded to 3 digits after the dot (e.g. 0.932).
2039 Set SSIM accuracy. Valid options are integers within the range of
2040 0-4, while 0 gives the most accurate result and 4 computes the
2047 MPEG-2 video encoder.
2052 @item seq_disp_ext @var{integer}
2053 Specifies if the encoder should write a sequence_display_extension to the
2058 Decide automatically to write it or not (this is the default) by checking if
2059 the data to be written is different from the default or unspecified values.
2073 @subsection Private options
2076 @item dpi @var{integer}
2077 Set physical density of pixels, in dots per inch, unset by default
2078 @item dpm @var{integer}
2079 Set physical density of pixels, in dots per meter, unset by default
2084 Apple ProRes encoder.
2086 FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
2087 The used encoder can be chosen with the @code{-vcodec} option.
2089 @subsection Private Options for prores-ks
2092 @item profile @var{integer}
2093 Select the ProRes profile to encode
2102 @item quant_mat @var{integer}
2103 Select quantization matrix.
2112 If set to @var{auto}, the matrix matching the profile will be picked.
2113 If not set, the matrix providing the highest quality, @var{default}, will be
2116 @item bits_per_mb @var{integer}
2117 How many bits to allot for coding one macroblock. Different profiles use
2118 between 200 and 2400 bits per macroblock, the maximum is 8000.
2120 @item mbs_per_slice @var{integer}
2121 Number of macroblocks in each slice (1-8); the default value (8)
2122 should be good in almost all situations.
2124 @item vendor @var{string}
2125 Override the 4-byte vendor ID.
2126 A custom vendor ID like @var{apl0} would claim the stream was produced by
2129 @item alpha_bits @var{integer}
2130 Specify number of bits for alpha component.
2131 Possible values are @var{0}, @var{8} and @var{16}.
2132 Use @var{0} to disable alpha plane coding.
2136 @subsection Speed considerations
2138 In the default mode of operation the encoder has to honor frame constraints
2139 (i.e. not produc frames with size bigger than requested) while still making
2140 output picture as good as possible.
2141 A frame containing a lot of small details is harder to compress and the encoder
2142 would spend more time searching for appropriate quantizers for each slice.
2144 Setting a higher @option{bits_per_mb} limit will improve the speed.
2146 For the fastest encoding speed set the @option{qscale} parameter (4 is the
2147 recommended value) and do not set a size constraint.
2149 @c man end VIDEO ENCODERS