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{-codecs} of the ff* tools will display the list of
20 A description of some of the currently available encoders follows.
22 @section Audio Encoders
24 @subsection ac3 and ac3_fixed
28 These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as
29 the undocumented RealAudio 3 (a.k.a. dnet).
31 The @var{ac3} encoder uses floating-point math, while the @var{ac3_fixed}
32 encoder only uses fixed-point integer math. This does not mean that one is
33 always faster, just that one or the other may be better suited to a
34 particular system. The floating-point encoder will generally produce better
35 quality audio for a given bitrate. The @var{ac3_fixed} encoder is not the
36 default codec for any of the output formats, so it must be specified explicitly
37 using the option @code{-acodec ac3_fixed} in order to use it.
39 @subheading AC-3 Metadata
41 The AC-3 metadata options are used to set parameters that describe the audio,
42 but in most cases do not affect the audio encoding itself. Some of the options
43 do directly affect or influence the decoding and playback of the resulting
44 bitstream, while others are just for informational purposes. A few of the
45 options will add bits to the output stream that could otherwise be used for
46 audio data, and will thus affect the quality of the output. Those will be
47 indicated accordingly with a note in the option list below.
49 These parameters are described in detail in several publicly-available
52 @item @uref{http://www.atsc.org/cms/standards/a_52-2010.pdf,A/52:2010 - Digital Audio Compression (AC-3) (E-AC-3) Standard}
53 @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}
54 @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/18_Metadata.Guide.pdf,Dolby Metadata Guide}
55 @item @uref{http://www.dolby.com/uploadedFiles/zz-_Shared_Assets/English_PDFs/Professional/46_DDEncodingGuidelines.pdf,Dolby Digital Professional Encoding Guidelines}
58 @subsubheading Metadata Control Options
62 @item -per_frame_metadata @var{boolean}
63 Allow Per-Frame Metadata. Specifies if the encoder should check for changing
64 metadata for each frame.
67 The metadata values set at initialization will be used for every frame in the
70 Metadata values can be changed before encoding each frame.
75 @subsubheading Downmix Levels
79 @item -center_mixlev @var{level}
80 Center Mix Level. The amount of gain the decoder should apply to the center
81 channel when downmixing to stereo. This field will only be written to the
82 bitstream if a center channel is present. The value is specified as a scale
83 factor. There are 3 valid values:
88 Apply -4.5dB gain (default)
93 @item -surround_mixlev @var{level}
94 Surround Mix Level. The amount of gain the decoder should apply to the surround
95 channel(s) when downmixing to stereo. This field will only be written to the
96 bitstream if one or more surround channels are present. The value is specified
97 as a scale factor. There are 3 valid values:
102 Apply -6dB gain (default)
104 Silence Surround Channel(s)
109 @subsubheading Audio Production Information
110 Audio Production Information is optional information describing the mixing
111 environment. Either none or both of the fields are written to the bitstream.
115 @item -mixing_level @var{number}
116 Mixing Level. Specifies peak sound pressure level (SPL) in the production
117 environment when the mix was mastered. Valid values are 80 to 111, or -1 for
118 unknown or not indicated. The default value is -1, but that value cannot be
119 used if the Audio Production Information is written to the bitstream. Therefore,
120 if the @code{room_type} option is not the default value, the @code{mixing_level}
121 option must not be -1.
123 @item -room_type @var{type}
124 Room Type. Describes the equalization used during the final mixing session at
125 the studio or on the dubbing stage. A large room is a dubbing stage with the
126 industry standard X-curve equalization; a small room has flat equalization.
127 This field will not be written to the bitstream if both the @code{mixing_level}
128 option and the @code{room_type} option have the default values.
132 Not Indicated (default)
143 @subsubheading Other Metadata Options
147 @item -copyright @var{boolean}
148 Copyright Indicator. Specifies whether a copyright exists for this audio.
152 No Copyright Exists (default)
158 @item -dialnorm @var{value}
159 Dialogue Normalization. Indicates how far the average dialogue level of the
160 program is below digital 100% full scale (0 dBFS). This parameter determines a
161 level shift during audio reproduction that sets the average volume of the
162 dialogue to a preset level. The goal is to match volume level between program
163 sources. A value of -31dB will result in no volume level change, relative to
164 the source volume, during audio reproduction. Valid values are whole numbers in
165 the range -31 to -1, with -31 being the default.
167 @item -dsur_mode @var{mode}
168 Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround
169 (Pro Logic). This field will only be written to the bitstream if the audio
170 stream is stereo. Using this option does @b{NOT} mean the encoder will actually
171 apply Dolby Surround processing.
175 Not Indicated (default)
178 Not Dolby Surround Encoded
181 Dolby Surround Encoded
184 @item -original @var{boolean}
185 Original Bit Stream Indicator. Specifies whether this audio is from the
186 original source and not a copy.
193 Original Source (default)
198 @subsubheading Extended Bitstream Information
199 The extended bitstream options are part of the Alternate Bit Stream Syntax as
200 specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts.
201 If any one parameter in a group is specified, all values in that group will be
202 written to the bitstream. Default values are used for those that are written
203 but have not been specified. If the mixing levels are written, the decoder
204 will use these values instead of the ones specified in the @code{center_mixlev}
205 and @code{surround_mixlev} options if it supports the Alternate Bit Stream
208 @subsubheading Extended Bitstream Information - Part 1
212 @item -dmix_mode @var{mode}
213 Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt
214 (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.
218 Not Indicated (default)
221 Lt/Rt Downmix Preferred
224 Lo/Ro Downmix Preferred
227 @item -ltrt_cmixlev @var{level}
228 Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the
229 center channel when downmixing to stereo in Lt/Rt mode.
242 Apply -4.5dB gain (default)
246 Silence Center Channel
249 @item -ltrt_surmixlev @var{level}
250 Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the
251 surround channel(s) when downmixing to stereo in Lt/Rt mode.
260 Apply -6.0dB gain (default)
262 Silence Surround Channel(s)
265 @item -loro_cmixlev @var{level}
266 Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the
267 center channel when downmixing to stereo in Lo/Ro mode.
280 Apply -4.5dB gain (default)
284 Silence Center Channel
287 @item -loro_surmixlev @var{level}
288 Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the
289 surround channel(s) when downmixing to stereo in Lo/Ro mode.
298 Apply -6.0dB gain (default)
300 Silence Surround Channel(s)
305 @subsubheading Extended Bitstream Information - Part 2
309 @item -dsurex_mode @var{mode}
310 Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX
311 (7.1 matrixed to 5.1). Using this option does @b{NOT} mean the encoder will actually
312 apply Dolby Surround EX processing.
316 Not Indicated (default)
322 Dolby Surround EX Off
325 @item -dheadphone_mode @var{mode}
326 Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone
327 encoding (multi-channel matrixed to 2.0 for use with headphones). Using this
328 option does @b{NOT} mean the encoder will actually apply Dolby Headphone
333 Not Indicated (default)
342 @item -ad_conv_type @var{type}
343 A/D Converter Type. Indicates whether the audio has passed through HDCD A/D
348 Standard A/D Converter (default)
356 @subheading Other AC-3 Encoding Options
360 @item -stereo_rematrixing @var{boolean}
361 Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This
362 is an optional AC-3 feature that increases quality by selectively encoding
363 the left/right channels as mid/side. This option is enabled by default, and it
364 is highly recommended that it be left as enabled except for testing purposes.