All Products
Search
Document Center

Intelligent Media Management:TargetAudio

Last Updated:Dec 11, 2024
ParameterTypeDescriptionExample
object

The audio processing settings.

DisableAudioboolean

Specifies whether to disable audio stream generation. Valid values:

  • true: disables audio stream generation. No audio stream is included in the output file.
  • false: does not disable audio stream generation. This is the default value.
false
Streamarray

The index numbers of audio streams. If you do not specify this parameter, the first audio stream (the one with the smallest index number) is processed. If the array contains an element greater than 100, all audio streams are processed.

  • For example, you can set the parameter to [0,1] to process audio streams with index numbers 0 and 1, [1] to process only the audio stream with the index number 1, or [101] to process all audio streams.
Note If you specify an index number but no audio stream with the index number is found, the index number is ignored.
long

The index number of the audio stream.

0
TranscodeAudioobject

The audio transcoding settings. If you do not specify this parameter, no audio streams are included in the output file.

Note We recommend that you do not use this parameter to disable audio stream generation.
Codecstring

The codec. Valid values:

  • copy, mp3, vorbis, aac, flac, ac3, opus, and amr for the CreateMediaConvert operation. The default value is copy.
  • aac for the GenerateVideoPlaylist operation. The default value is aac.
Note When you set the parameter to copy, the audio stream is directly copied into the output file and all other parameters in TranscodeAudio do not take effect. The copy value is commonly used in container format conversion scenarios. You cannot use this value in audio merging scenarios.
aac
BitrateOptionstring

The audio bitrate option. Valid values:

  • fixed: always uses the target bitrate.
  • adaptive: uses the source bitrate when the source bitrate is smaller than the target bitrate.
  • fall: returns a failure when the source bitrate is smaller than the target bitrate.

Default value:

  • fixed for the CreateMediaConvert operation.
  • adaptive for the GenerateVideoPlaylist operation.
Note This parameter must be used in conjunction with the Bitrate parameter.
fixed
Bitrateinteger

The bitrate of the audio stream. Unit: bit/s. This parameter and the Quality parameter are mutually exclusive. Valid values: 1000 to 10000000.

64000
Qualityinteger

The audio quality. Valid values: 0 to 100. The greater the value, the higher the quality. This parameter and the Bitrate parameter are mutually exclusive.

6
SampleRateOptionstring

The sampling rate option. Valid values:

  • fixed: always uses the target sampling rate.
  • adaptive: uses the source sampling rate when the source sampling rate is smaller than the target sampling rate.
  • fall: returns a failure when the source sampling rate is smaller than the target sampling rate.

Default value:

  • fixed for the CreateMediaConvert operation.
  • adaptive for the GenerateVideoPlaylist operation.
Note This parameter must be used in conjunction with the SampleRate parameter.
fixed
SampleRateinteger

The audio sampling rate. Unit: Hz. By default, the source sampling rate is used. Valid values: 8000, 12025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, and 96000.

Note Supported sampling rates vary with formats: 48 kHz and lower for MP3, 8 kHz, 12 kHz, 16 kHz, 24 kHz, and 48 kHz for Opus, 32 kHz, 44.1 kHz, and 48 kHz for AC3, and 8 kHz and 16 kHz for AMR.
12050
Channelinteger

The number of sound channels. By default, the audio stream has the same number of sound channels as the source audio. Valid values: [1,8].

Note The number of sound channels varies with audio formats: one or two for MP3, up to six for AC3 5.1, and one for AMR.
2
BitsPerSampleinteger

The audio bit depth. Valid values: 16 and 24.

Note This parameter takes effect only when Codec is set to flac.
FilterAudioobject

The audio processing settings. This parameter is invalid if TranscodeAudio is left empty or TranscodeAudio.Codec is set to copy.

Note This parameter is not available to the GenerateVideoPlaylist operation.
Mixingboolean

Specifies whether to mix all sound tracks into a single track. Valid values:

  • false (default)
  • true
false