Containers
A container format packages video, audio, subtitles, and metadata into a single file. The container you choose determines which codecs you can use and how the file can be delivered to viewers.
Transcodely supports five container formats for file-based outputs, plus HLS and DASH for adaptive streaming (covered in Streaming).
Container Overview
| Container | API Value | File Extension | Primary Use Case |
|---|---|---|---|
| MP4 | mp4 | .mp4 | General-purpose delivery, progressive download |
| WebM | webm | .webm | Web-optimized delivery, open-source workflows |
| MKV | mkv | .mkv | Archival, maximum codec flexibility |
| MOV | mov | .mov | Apple ecosystem, professional editing workflows |
| TS | ts | .ts | Broadcast, legacy streaming infrastructure |
Codec Compatibility
Video codecs by container:
| 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 by container:
| Container | AAC | Opus | MP3 |
|---|---|---|---|
| MP4 | Yes | No | Yes |
| WebM | No | Yes | No |
| MKV | Yes | Yes | Yes |
| MOV | Yes | No | Yes |
| TS | Yes | No | Yes |
The API validates codec-container combinations and returns a validation_error if you specify an unsupported pairing.
MP4
The most widely supported container format. MP4 files play natively in every browser, operating system, and media player.
Features:
- Supports
moovatom at the start (faststart) for progressive playback without downloading the full file - Chapter markers, subtitle tracks, and metadata
- Broad tool and editor support
Best for: General delivery, social media uploads, progressive download, mobile playback
{
"type": "mp4",
"video": [
{"codec": "h264", "resolution": "1080p", "quality": "standard"}
]
}WebM
Google’s open container format, designed for web delivery. WebM is the native container for VP9 and AV1 content on the web.
Features:
- Based on Matroska (MKV) container
- Royalty-free, no licensing costs
- Natively supported in Chrome, Firefox, and Edge
- Smaller overhead than MP4 for web delivery
Best for: Web-first delivery, open-source projects, VP9/AV1 content
{
"type": "webm",
"video": [
{"codec": "vp9", "resolution": "1080p", "quality": "standard"}
]
}MKV
Matroska is the most flexible container format, supporting every codec Transcodely offers. It is the only container that accepts all four video codecs and all three audio codecs.
Features:
- Supports unlimited audio, video, and subtitle tracks
- Chapter markers and rich metadata
- No codec restrictions
- Not natively supported in most browsers (requires a player like VLC)
Best for: Archival, internal processing, maximum flexibility, multi-track content
{
"type": "mkv",
"video": [
{"codec": "av1", "resolution": "2160p", "quality": "premium"}
]
}MOV
Apple’s QuickTime container format. MOV is commonly used in professional video production workflows and is natively supported on macOS and iOS.
Features:
- Native support in Final Cut Pro, Motion, and other Apple tools
- ProRes support (source format, not transcoding target)
- Timecode tracks for professional editing
- Limited to H.264 and H.265 video codecs
Best for: Apple ecosystem, professional editing, Final Cut Pro workflows
{
"type": "mov",
"video": [
{"codec": "h265", "resolution": "2160p", "quality": "premium"}
]
}TS (MPEG Transport Stream)
The broadcast industry standard for reliable video transport. TS is designed for environments where data loss is expected (satellite, cable TV).
Features:
- Error resilience — playback can recover from data corruption
- Fixed-size packets (188 bytes) for broadcast compatibility
- Limited to H.264/H.265 video and AAC/MP3 audio
- Commonly used as HLS segment format (legacy)
Best for: Broadcast workflows, legacy HLS infrastructure, satellite distribution
{
"type": "ts",
"video": [
{"codec": "h264", "resolution": "1080p", "quality": "standard"}
]
}Choosing a Container
| Requirement | Recommended Container |
|---|---|
| Maximum browser compatibility | MP4 |
| VP9 or web-first delivery | WebM |
| Archival or multi-codec storage | MKV |
| Apple ecosystem delivery | MOV |
| Broadcast or satellite | TS |
| Adaptive streaming | HLS or DASH (see Streaming) |
For most web applications, MP4 with H.264 is the safest choice. If you need better compression for modern browsers, use WebM with VP9 or MP4 with AV1 as a secondary format.