Reference

Codec

A codec is the method used to compress and decompress video or audio — it decides how much detail is kept and how small the file becomes. Common video codecs are H.264 and HEVC (H.265); common audio codecs are AAC and MP3. The codec, not the file extension, controls quality and size.

Files & formatsGeneral

Codec

Also known as: video codec, audio codec, H.264, HEVC, encoder decoder

A codec is the method used to compress and decompress video or audio — it decides how much detail is kept and how small the file becomes. Common video codecs are H.264 and HEVC (H.265); common audio codecs are AAC and MP3. The codec, not the file extension, controls quality and size.

  • The compression method, not the file extension
  • H.264 and HEVC are the common video codecs
  • HEVC stores roughly the same video in half the space

Codec vs container

These two terms get mixed up constantly. The codec is the compression engine that encodes the actual video or audio data. The container (like MP4, MOV, or MKV) is just the box that holds those encoded streams together with subtitles and metadata.

So a single .mp4 file might contain H.264 video and AAC audio. Change the container and compatibility changes; change the codec and the file size and quality change.

Why the codec drives file size

Newer codecs compress more efficiently. HEVC (H.265) stores the same footage in roughly half the space of the older H.264, which is why iPhones default to HEVC capture. For audio, AAC beats MP3 at the same size.

When a video is far larger than expected, an inefficient or uncompressed codec is usually why. Re-encoding to a modern codec is the most effective way to shrink long clips without visibly hurting quality.

Related terms

Keep reading the reference.

Act on it

Guides and tools for this topic.