ac3 and ac3_fixed


AC-3 audio encoders.

These encoders implement part of ATSC A/52:2010 and ETSI TS 102 366, as well as the undocumented RealAudio 3 (a.k.a. dnet).

The ac3 encoder uses floating-point math, while the ac3_fixed encoder only uses fixed-point integer math. This does not mean that one is always faster, just that one or the other may be better suited to a particular system. The floating-point encoder will generally produce better quality audio for a given bitrate. The ac3_fixed encoder is not the default codec for any of the output formats, so it must be specified explicitly using the option -acodec ac3_fixed in order to use it.

The AC-3 metadata options are used to set parameters that describe the audio, but in most cases do not affect the audio encoding itself. Some of the options do directly affect or influence the decoding and playback of the resulting bitstream, while others are just for informational purposes. A few of the options will add bits to the output stream that could otherwise be used for audio data, and will thus affect the quality of the output. Those will be indicated accordingly with a note in the option list below.

These parameters are described in detail in several publicly-available documents.

'-per_frame_metadata boolean'

Allow Per-Frame Metadata. Specifies if the encoder should check for changing metadata for each frame.

'0'

The metadata values set at initialization will be used for every frame in the stream. (default)

'1'

Metadata values can be changed before encoding each frame.

'-center_mixlev level'

Center Mix Level. The amount of gain the decoder should apply to the center channel when downmixing to stereo. This field will only be written to the bitstream if a center channel is present. The value is specified as a scale factor. There are 3 valid values:

'0.707'

Apply -3dB gain

'0.595'

Apply -4.5dB gain (default)

'0.500'

Apply -6dB gain

'-surround_mixlev level'

Surround Mix Level. The amount of gain the decoder should apply to the surround channel(s) when downmixing to stereo. This field will only be written to the bitstream if one or more surround channels are present. The value is specified as a scale factor. There are 3 valid values:

'0.707'

Apply -3dB gain

'0.500'

Apply -6dB gain (default)

'0.000'

Silence Surround Channel(s)

Audio Production Information is optional information describing the mixing environment. Either none or both of the fields are written to the bitstream.

'-mixing_level number'

Mixing Level. Specifies peak sound pressure level (SPL) in the production environment when the mix was mastered. Valid values are 80 to 111, or -1 for unknown or not indicated. The default value is -1, but that value cannot be used if the Audio Production Information is written to the bitstream. Therefore, if the room_type option is not the default value, the mixing_level option must not be -1.

'-room_type type'

Room Type. Describes the equalization used during the final mixing session at the studio or on the dubbing stage. A large room is a dubbing stage with the industry standard X-curve equalization; a small room has flat equalization. This field will not be written to the bitstream if both the mixing_level option and the room_type option have the default values.

'0'
'notindicated'

Not Indicated (default)

'1'
'large'

Large Room

'2'
'small'

Small Room

'-copyright boolean'

Copyright Indicator. Specifies whether a copyright exists for this audio.

'0'
'off'

No Copyright Exists (default)

'1'
'on'

Copyright Exists

'-dialnorm value'

Dialogue Normalization. Indicates how far the average dialogue level of the program is below digital 100% full scale (0 dBFS). This parameter determines a level shift during audio reproduction that sets the average volume of the dialogue to a preset level. The goal is to match volume level between program sources. A value of -31dB will result in no volume level change, relative to the source volume, during audio reproduction. Valid values are whole numbers in the range -31 to -1, with -31 being the default.

'-dsur_mode mode'

Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround (Pro Logic). This field will only be written to the bitstream if the audio stream is stereo. Using this option does NOT mean the encoder will actually apply Dolby Surround processing.

'0'
'notindicated'

Not Indicated (default)

'1'
'off'

Not Dolby Surround Encoded

'2'
'on'

Dolby Surround Encoded

'-original boolean'

Original Bit Stream Indicator. Specifies whether this audio is from the original source and not a copy.

'0'
'off'

Not Original Source

'1'
'on'

Original Source (default)

The extended bitstream options are part of the Alternate Bit Stream Syntax as specified in Annex D of the A/52:2010 standard. It is grouped into 2 parts. If any one parameter in a group is specified, all values in that group will be written to the bitstream. Default values are used for those that are written but have not been specified. If the mixing levels are written, the decoder will use these values instead of the ones specified in the center_mixlev and surround_mixlev options if it supports the Alternate Bit Stream Syntax.

'-dmix_mode mode'

Preferred Stereo Downmix Mode. Allows the user to select either Lt/Rt (Dolby Surround) or Lo/Ro (normal stereo) as the preferred stereo downmix mode.

'0'
'notindicated'

Not Indicated (default)

'1'
'ltrt'

Lt/Rt Downmix Preferred

'2'
'loro'

Lo/Ro Downmix Preferred

'-ltrt_cmixlev level'

Lt/Rt Center Mix Level. The amount of gain the decoder should apply to the center channel when downmixing to stereo in Lt/Rt mode.

'1.414'

Apply +3dB gain

'1.189'

Apply +1.5dB gain

'1.000'

Apply 0dB gain

'0.841'

Apply -1.5dB gain

'0.707'

Apply -3.0dB gain

'0.595'

Apply -4.5dB gain (default)

'0.500'

Apply -6.0dB gain

'0.000'

Silence Center Channel

'-ltrt_surmixlev level'

Lt/Rt Surround Mix Level. The amount of gain the decoder should apply to the surround channel(s) when downmixing to stereo in Lt/Rt mode.

'0.841'

Apply -1.5dB gain

'0.707'

Apply -3.0dB gain

'0.595'

Apply -4.5dB gain

'0.500'

Apply -6.0dB gain (default)

'0.000'

Silence Surround Channel(s)

'-loro_cmixlev level'

Lo/Ro Center Mix Level. The amount of gain the decoder should apply to the center channel when downmixing to stereo in Lo/Ro mode.

'1.414'

Apply +3dB gain

'1.189'

Apply +1.5dB gain

'1.000'

Apply 0dB gain

'0.841'

Apply -1.5dB gain

'0.707'

Apply -3.0dB gain

'0.595'

Apply -4.5dB gain (default)

'0.500'

Apply -6.0dB gain

'0.000'

Silence Center Channel

'-loro_surmixlev level'

Lo/Ro Surround Mix Level. The amount of gain the decoder should apply to the surround channel(s) when downmixing to stereo in Lo/Ro mode.

'0.841'

Apply -1.5dB gain

'0.707'

Apply -3.0dB gain

'0.595'

Apply -4.5dB gain

'0.500'

Apply -6.0dB gain (default)

'0.000'

Silence Surround Channel(s)

'-dsurex_mode mode'

Dolby Surround EX Mode. Indicates whether the stream uses Dolby Surround EX (7.1 matrixed to 5.1). Using this option does NOT mean the encoder will actually apply Dolby Surround EX processing.

'0'
'notindicated'

Not Indicated (default)

'1'
'on'

Dolby Surround EX Off

'2'
'off'

Dolby Surround EX On

'-dheadphone_mode mode'

Dolby Headphone Mode. Indicates whether the stream uses Dolby Headphone encoding (multi-channel matrixed to 2.0 for use with headphones). Using this option does NOT mean the encoder will actually apply Dolby Headphone processing.

'0'
'notindicated'

Not Indicated (default)

'1'
'on'

Dolby Headphone Off

'2'
'off'

Dolby Headphone On

'-ad_conv_type type'

A/D Converter Type. Indicates whether the audio has passed through HDCD A/D conversion.

'0'
'standard'

Standard A/D Converter (default)

'1'
'hdcd'

HDCD A/D Converter

'-stereo_rematrixing boolean'

Stereo Rematrixing. Enables/Disables use of rematrixing for stereo input. This is an optional AC-3 feature that increases quality by selectively encoding the left/right channels as mid/side. This option is enabled by default, and it is highly recommended that it be left as enabled except for testing purposes.

'cutoff frequency'

Set lowpass cutoff frequency. If unspecified, the encoder selects a default determined by various other encoding parameters.

These options are only valid for the floating-point encoder and do not exist for the fixed-point encoder due to the corresponding features not being implemented in fixed-point.

'-channel_coupling boolean'

Enables/Disables use of channel coupling, which is an optional AC-3 feature that increases quality by combining high frequency information from multiple channels into a single channel. The per-channel high frequency information is sent with less accuracy in both the frequency and time domains. This allows more bits to be used for lower frequencies while preserving enough information to reconstruct the high frequencies. This option is enabled by default for the floating-point encoder and should generally be left as enabled except for testing purposes or to increase encoding speed.

'-1'
'auto'

Selected by Encoder (default)

'0'
'off'

Disable Channel Coupling

'1'
'on'

Enable Channel Coupling

'-cpl_start_band number'

Coupling Start Band. Sets the channel coupling start band, from 1 to 15. If a value higher than the bandwidth is used, it will be reduced to 1 less than the coupling end band. If auto is used, the start band will be determined by the encoder based on the bit rate, sample rate, and channel layout. This option has no effect if channel coupling is disabled.

'-1'
'auto'

Selected by Encoder (default)