1 エンコーダー

エンコーダーは、 Libav 上でマルチメディアストリームをエンコードするための 構成された要素です。

Libav のビルドを構成(configure)する際は、既定ではサポートされている全ての ネイティブのエンコーダーが有効になっています。外部のライブラリを要するエンコーダー は対応する --enable-lib オプションによって手動で有効にしなければなりません。 configure オプション --list-encoders を使うと、全ての利用可能なエンコーダーが リストアップされます。

configure オプション --disable-encoders を使えば全てのエンコーダーを 無効にすることができ、--enable-encoder=ENCODER / --disable-encoder=ENCODER で特定のエンコーダーを選択して有効/ 無効にできます。

ff* ツールのオプション -codecs は有効になっているエンコーダー のリストを表示します。

2 音声エンコーダー

以下は現在利用可能なエンコーダーのうちのいくつかの説明です。

2.1 ac3 および ac3_fixed

AC-3 音声エンコーダー。

これらエンコーダーは ATSC A/52:2010 および ETSI TS 102 366 の一部と、 (dnet として知られている)文書化されていない RealAudio 3 を実装しています。

ac3 エンコーダーは浮動小数点数の演算を用いており、ac3_fixed エンコーダーは固定長整数演算のみを用いています。これはどちらかがいつも 速いという意味ではなく、単に特定のシステムにはどちらかがより適しているかも しれないという意味があります。浮動小数点数エンコーダーは一般には、 与えられたビットレートに対してより品質の良い音声を生成します。ac3_fixed エンコーダーはどの出力フォーマットについても既定のコーデックではなく、 そのため使うにはオプション -acodec ac3_fixed を明示的に使って 指定されなければなりません。

2.1.1 AC-3 メタデータ

AC-3 メタデータオプションは音声を表現するパラメータを設定するために 用いられ、ほとんどの場合音声エンコーディングそのものには影響を与えません。 いくつかのオプションが結果として出てくるビットストリームのデコーディング および再生に影響を与える一方、その他は単に通知目的のものです。少数の オプションは出力ストリームにビットを加え、それらは場合によっては 音声データとして用いられます。このため出力の品質に影響します。これらは 以下のオプションリストで注記によって示されています。

これらのパラメータはいろいろな公開されて利用可能な文書で詳細に記述されて います。

2.1.1.1 メタデータ制御オプション

‘-per_frame_metadata boolean’

フレームごとのメタデータを許可します。各フレームについてメタデータが 変わったかどうか確認するべきかどうかを指定します。

‘0’

初期化時に設定されたメタデータの値がストリーム内の全てのフレームに対して 用いられます(既定値)

‘1’

各フレームをエンコーディングする前にメタデータの値が変わります。

2.1.1.2 Downmix Level

‘-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)

2.1.1.3 Audio Production Information

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

2.1.1.4 Other Metadata Options

‘-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)

2.1.1.5 Extended Bitstream Information

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.

2.1.1.6 Extended Bitstream Information - Part 1

‘-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)

2.1.1.7 Extended Bitstream Information - Part 2

‘-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

2.1.2 Other AC-3 Encoding Options

‘-stereo_rematrixing boolean’

ステレオ再行列化。ステレオ入力のための再行列化を有効/無効にします。 これは、mid/side として左/右チャンネルを選択的にエンコードする ことによって品質を高めるという省略可能な AC-3 の機能です。 既定ではこのオプションは有効になっており、テスト目的のためを除いて 有効のままにしておくことを強く奨めます。

2.1.3 浮動小数点限定 AC-3 エンコーディングオプション

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)