Skip to content
ClipTools
Video glossary

What is Container?

Definition

A container (or wrapper) is a file format that bundles one or more video, audio, subtitle, and metadata streams into a single file. Examples include MP4, MKV, WebM, MOV, and AVI. A container does not compress the data - that is the codec's job.

Share this tool

A container is the outer file format that holds your media streams together and describes how they fit. It defines how video, audio, subtitles, and metadata such as chapters, timestamps, and language tags are interleaved and synced, so a player knows how to read them. The file extension you see, such as .mp4 or .mkv, usually names the container, not the codec inside it.

The container is not the same as the codec. A codec such as H.264, AV1, or AAC compresses and decompresses the actual stream data, while the container just packages those streams. That is why the same H.264 video can live inside an MP4, MKV, or MOV file - the encoded video is identical, and only the wrapper changes. Moving streams to a new container without re-encoding is called remuxing, and it is fast and lossless.

Containers differ in which codecs and features they support. MP4 is the most widely compatible and the standard for web and mobile. MKV is flexible and handles many audio tracks, subtitles, and chapters. WebM is built for the web and royalty-free codecs. Choosing the wrong container can mean a file plays in one app but not another, even when the codecs are fine.

Quick facts

  • A container bundles video, audio, subtitle, and metadata streams into one file
  • Also called a wrapper; common examples are MP4, MKV, WebM, MOV, and AVI
  • A container does not compress data - the codec does
  • The same codec, such as H.264, can live in different containers like MP4, MKV, or MOV
  • The file extension usually names the container, not the codec inside

Frequently asked questions

What is the difference between a container and a codec?
A container is the file format that packages streams together, such as MP4 or MKV, while a codec is what compresses and decompresses the actual video or audio data, such as H.264 or AAC. A single container can hold streams encoded with several different codecs.
Is MP4 a container or a codec?
MP4 is a container. It commonly holds video encoded with the H.264 or H.265 codec and audio encoded with AAC, but the MP4 itself is just the wrapper, not the compression method.
Can I change a video's container without re-encoding it?
Yes. Moving streams from one container to another without re-compressing is called remuxing. It is fast and lossless because the encoded data stays the same and only the wrapper changes, for example from MKV to MP4.
Which container should I use for the web?
MP4 is the safest choice for broad browser and mobile compatibility. WebM is a good royalty-free alternative for web video, while MKV is better suited to flexible multi-track files that are not aimed at every browser.

Related tools

Related terms