A codec, short for coder-decoder, is a method for compressing (encoding) video or audio data for storage and transmission and decompressing (decoding) it for playback, or the software or hardware that implements such a method. Widely used video codecs include H.264, H.265 (HEVC), VP9, AV1, and ProRes; common audio codecs include AAC, MP3, and Opus.
A codec is distinct from a container format such as MP4, MOV, WebM, or MKV, which holds the encoded data. Two MP4 files may use different video codecs, and the choice of codec determines file size, visual quality, support for transparency, and which devices can play the file.