MediaConvertAudio

更新时间:
复制 MD 格式

Parameter

Type

Description

Example

object

Parameters for audio transcoding.

Codec

string

The audio codec.

  • Valid values: AAC, AC3, EAC3, MP2, MP3, FLAC, OPUS, VORBIS, WMA-V1, WMA-V2, and pcm_s16le.

  • Default value: AAC.

AAC

Remove

boolean

Whether to remove the audio stream from the output.

  • true: removes the audio stream. All other Audio parameters are ignored.

  • false: retains the audio stream.

  • Default value: false.

Bitrate

integer

The audio bitrate of the output file.

  • Unit: Kbps.

  • Valid values: [8,1000].

  • Default value: 128.

  • Common values: 64, 128, and 256.

128

Samplerate

string

The sample rate.

  • Unit: Hz

  • Valid values: 22050, 32000, 44100, 48000, and 96000.

  • Default value: 44100.

Supported sample rates vary by container and codec format. For example, MP3 does not support 96000, and FLV supports only 22050 and 44100.

44100

Profile

string

The audio codec profile.

  • Takes effect only when Codec is set to AAC.

  • Valid values: aac_low, aac_he, aac_he_v2, aac_ld, and aac_eld.

  • Default value: aac_low.

aac_low

Channels

integer

The number of audio channels.

  • Valid values: 0, 1, 2, 4, 5, 6, and 8.

    • If Codec is set to MP3 or OPUS, valid values are 0, 1, and 2.

    • If Codec is set to AAC or FLAC, valid values are 0, 1, 2, 4, 5, 6, and 8.

    • If Codec is set to VORBIS, the only valid value is 2.

    • If Format is set to MPD, the value 8 is not supported.

  • Default value: 2.

  • Set to 0 to preserve the original channel count from the source file.

2