Convertur

Codec

/ˈkoʊdɛk/ · noun · compression · coder-decoder

The algorithm that compresses and decompresses media — the “engine” behind a format.

In more detail

A codec is the pair of algorithms that encode media into a compressed form and decode it back again. HEVC, AV1, and the JPEG algorithm are all codecs.

A file format is the container; the codec is what actually shrinks the data inside it.

Codec versus container

A codec defines how media is represented; a container packages that encoded media with tracks and metadata. MP4, WebM, and MOV are containers. H.264, HEVC, AV1, VP9, AAC, and Opus are codecs. Renaming a file extension does not change either one.

Two files with the same .mp4 extension can use different video or audio codecs. One may play everywhere while another fails in an older browser because the device can read the MP4 container but cannot decode the codec inside it.

Why codec choice matters

Codec choice controls the balance among quality, file size, encoding speed, playback support, and sometimes licensing. Newer codecs can compress more efficiently, while older codecs often work on more devices and benefit from dedicated hardware decoding.

When a file will not play, inspect both its container and its codecs before converting it. Remuxing changes only the container and can be lossless; transcoding decodes and re-encodes a track, takes longer, and may reduce quality.

Key points

Related terms