Home » API Reference » Encoding Settings » Format And Codecs » Audio Codec

audio_codec

:String permalink

API Versions: V1, V2

Parent: outputs

Default: Determined by the format, profile, or video_codec. aac if none are provided.

Valid Values: aac, ac3, amr, eac3, mp3, vorbis, and wma

Compatible Job Types: All

Example: mp3

Description:

The audio codec to use. Zencoder currently supports the following codecs: mp3, aac, vorbis, and wma. The default codec depends on the video codec and format selected.

Note that MP3 audio in a MP4 container is valid alongside H.264 video content, but does not play back in Quicktime.

Compatibility:

  • aac is compatible with h264 video (mp4, 3gp, or flv format), mpeg4 video (mp4 or 3gp format), and vp6 (flv format)
  • vorbis is compatible vp8 video (webm format) and theora video (ogg format)
  • wma is compatible with wmv video and the wmv format
  • mp3 is compatible with h264 video (mp4, 3gp, or flv format) and wmv video (wmv format). mp3, h264, and mp4 will not play back in Quicktime
{
  "input": "s3://zencodertesting/test.mov",
  "outputs": [
    {
      "audio_codec": "mp3"
    }
  ]
}
      
<api_request>
  <input>s3://zencodertesting/test.mov</input>
  <outputs type="array">
    <output>
      <audio_codec>mp3</audio_codec>
    </output>
  </outputs>
</api_request>