Convertur

Codec

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

A codec is the method that compresses and decompresses audio, video or images inside a file format.

In more detail

The word codec is short for coder-decoder. A codec encodes media into a smaller form and decodes it again for playback. HEVC, AV1, AAC and JPEG are all codecs.

A file format is the container. The codec is what shrinks the data inside it. When people talk about video codecs or audio codecs, they mean these methods, not the file extension.

Codecs vs containers

A codec sets how the media is encoded. A container packs that encoded media together with tracks and metadata. MP4, WebM and MOV are containers. H.264, HEVC, AV1, VP9, AAC and Opus are codecs. Renaming the file extension changes neither.

Two .mp4 files can use different video or audio codecs. One may play everywhere while the other fails in an older browser. The device can open the MP4 container but can't decode the codec inside.

Common video and audio codecs

H.264 is the most widely supported video codec. HEVC, also called H.265, makes smaller files and is common on iPhones. VP9 and AV1 are open codecs used a lot on the web, and AV1 compresses best of the three. For audio, AAC is the usual partner for MP4 video, Opus is common in WebM, and MP3 is the old standard for music files.

Why codec choice matters

Codec choice sets the balance between quality, file size, encoding speed and playback support. Licensing can matter too. Newer codecs compress better. Older codecs play on more devices and often have hardware support for smooth playback.

If a file won't play, check both its container and its codecs before you convert it. Remuxing changes only the container and loses no quality. Transcoding decodes and re-encodes a track. It takes longer and can lower quality.

Key points

Related terms