Search Documentation
Search across all documentation pages
Audio

Audio

Transcodely supports three audio codecs: AAC, Opus, and MP3. Audio encoding is configured automatically based on your output container and codec selection, but you can control audio parameters through preset configuration.

Audio Codec Overview

PropertyAACOpusMP3
API valueaacopusmp3
StandardISO/IEC 14496-3IETF RFC 6716ISO/IEC 11172-3
LicensingPatent poolsRoyalty-freePatents expired
Sweet spot bitrate128-192 kbps64-128 kbps192-256 kbps
Min bitrate32 kbps6 kbps32 kbps
Max bitrate512 kbps510 kbps320 kbps
ChannelsUp to 7.1Up to 7.1Stereo only
Sample rates8-96 kHz8-48 kHz8-48 kHz
LatencyLowVery lowModerate

AAC

AAC (Advanced Audio Coding) is the default audio codec for MP4 containers and the most widely supported lossy audio format. It delivers transparent quality at 128-192 kbps for stereo content.

When to use: MP4 outputs, maximum device compatibility, Apple ecosystem

Recommended bitrates:

Use CaseStereo5.1 Surround
Low bandwidth64 kbps192 kbps
Standard quality128 kbps384 kbps
High quality192 kbps448 kbps
Transparent256 kbps512 kbps

AAC is automatically selected when your output container is MP4, MOV, or TS.

Container compatibility: MP4, MKV, MOV, TS, HLS, DASH

Opus

Opus is a royalty-free audio codec that provides the best quality-per-bit of any supported codec. It outperforms AAC at every bitrate, especially below 128 kbps.

When to use: WebM outputs, bandwidth-constrained delivery, highest quality at low bitrates

Recommended bitrates:

Use CaseStereo5.1 Surround
Voice/speech32 kbpsN/A
Low bandwidth48 kbps128 kbps
Standard quality96 kbps256 kbps
High quality128 kbps384 kbps
Transparent192 kbps448 kbps

Opus is automatically selected when your output container is WebM.

Container compatibility: WebM, MKV

MP3

MP3 is supported for legacy compatibility. It provides acceptable quality at higher bitrates but is outperformed by both AAC and Opus. New projects should prefer AAC or Opus.

When to use: Legacy system compatibility, audio-only deliverables

Recommended bitrates:

Use CaseStereo
Voice/speech64 kbps
Standard quality192 kbps
High quality256 kbps
Maximum320 kbps

MP3 is limited to stereo (2 channels). Surround sound content is downmixed to stereo when MP3 is used.

Container compatibility: MP4, MKV, MOV, TS

Audio Behavior

Transcodely automatically handles audio encoding based on your output configuration:

ScenarioBehavior
MP4 outputAudio encoded as AAC at 128 kbps stereo
WebM outputAudio encoded as Opus at 128 kbps stereo
MKV outputAudio codec matches the container default (AAC)
No audio in inputOutput has no audio track
Multi-channel inputPreserved if codec supports it, otherwise downmixed

Multi-Audio Tracks

For HLS and DASH streaming outputs, you can specify multiple audio tracks with different languages:

{
  "type": "hls",
  "video": [
    {"codec": "h264", "resolution": "1080p", "quality": "standard"}
  ],
  "audio": [
    {"language": "eng", "label": "English", "is_default": true},
    {"language": "spa", "label": "Spanish", "source_track": 1},
    {"language": "jpn", "label": "Japanese", "source_track": 2}
  ]
}

Each audio track configuration supports:

FieldRequiredDescription
languageYesISO 639-2 three-letter code (e.g., eng, spa, jpn)
labelNoHuman-readable name shown in player UI
source_trackNo0-based index of the audio track in the input file
is_defaultNoWhether this is the default audio track

Multi-audio tracks are only available for streaming output types (hls, dash, adaptive). File-based outputs (MP4, WebM, etc.) include only the primary audio track.

Sample Rates

Common sample rates and their use cases:

Sample RateUse Case
8,000 HzTelephone-quality voice
16,000 HzWideband voice (VoIP)
22,050 HzAM radio quality
44,100 HzCD quality (standard)
48,000 HzProfessional audio, video standard (default)
96,000 HzHigh-resolution audio

Transcodely preserves the input sample rate by default. If the input sample rate is higher than the codec supports, it is downsampled automatically.