Codecs
Transcodely supports four video codecs and three audio codecs. Each codec has different strengths in compression efficiency, encoding speed, and device compatibility.
Video Codecs
| Property | H.264 | H.265 | VP9 | AV1 |
|---|---|---|---|---|
| API value | h264 | h265 | vp9 | av1 |
| Encoder | libx264 | libx265 | libvpx-vp9 | libsvtav1 |
| Standard | ITU-T / ISO | ITU-T / ISO | Google / IETF | Alliance for Open Media |
| Licensing | Patent pools (MPEG LA) | Patent pools (MPEG LA) | Royalty-free | Royalty-free |
| Compression vs H.264 | Baseline | ~40% better | ~30% better | ~50% better |
| Encoding speed | Fast | Moderate | Slow | Moderate (SVT-AV1) |
| Hardware decode | Universal | Widespread | Chrome, Android, modern GPUs | Growing (2022+ devices) |
| Max resolution | 8K (with level 6.2) | 8K (with level 6.2) | 8K | 8K |
| 10-bit support | Limited (High10 profile) | Yes (Main10) | Yes (Profile 2) | Yes |
| HDR support | No | Yes | Yes | Yes |
Video Codec Enum Values
When specifying a codec in the API, use the lowercase string value:
{
"video": [
{
"codec": "h264",
"resolution": "1080p",
"quality": "standard"
}
]
}Valid values: h264, h265, vp9, av1
Audio Codecs
| Property | AAC | Opus | MP3 |
|---|---|---|---|
| API value | aac | opus | mp3 |
| Standard | ISO/IEC | IETF RFC 6716 | ISO/IEC |
| Licensing | Patent pools | Royalty-free | Patents expired |
| Best quality at | 128-256 kbps | 64-128 kbps | 192-320 kbps |
| Latency | Low | Very low | Moderate |
| Container support | MP4, MKV, MOV, TS | WebM, MKV | MP4, MKV, MOV, TS |
| Surround sound | Yes (up to 7.1) | Yes (up to 7.1) | No (stereo only) |
Audio Codec Selection
- AAC is the default for MP4 containers. It has universal playback support and good quality at moderate bitrates.
- Opus is required for WebM containers and delivers the best quality at low bitrates. Ideal for bandwidth-constrained delivery.
- MP3 is supported for legacy compatibility but is not recommended for new content. AAC provides better quality at the same bitrate.
Container Compatibility
Not every codec works with every container format. The API validates these combinations and rejects invalid pairings:
Video codecs:
| Container | H.264 | H.265 | VP9 | AV1 |
|---|---|---|---|---|
| MP4 | Yes | Yes | No | Yes |
| WebM | No | No | Yes | Yes |
| MKV | Yes | Yes | Yes | Yes |
| MOV | Yes | Yes | No | No |
| TS | Yes | Yes | No | No |
Audio codecs:
| Container | AAC | Opus | MP3 |
|---|---|---|---|
| MP4 | Yes | No | Yes |
| WebM | No | Yes | No |
| MKV | Yes | Yes | Yes |
| MOV | Yes | No | Yes |
| TS | Yes | No | Yes |
Streaming Format Codecs
For HLS and DASH streaming outputs, codecs are specified per video variant:
{
"type": "hls",
"video": [
{"codec": "h264", "resolution": "1080p", "quality": "standard"},
{"codec": "h264", "resolution": "720p", "quality": "standard"},
{"codec": "h264", "resolution": "480p", "quality": "economy"}
]
}Multi-codec ABR ladders are supported — you can mix H.264 and H.265 in the same output if the segment format supports it (fMP4/CMAF).
Codec-Specific Documentation
Each codec has its own page with detailed parameter reference: