Software that compresses and decompresses video data, determining the tradeoff between file size, quality, and processing power.
A video codec (coder-decoder) is an algorithm that compresses raw video into a smaller file for storage and transmission, then decompresses it for playback. Raw video is enormous — a single minute of uncompressed 1080p footage is about 10 GB. Codecs reduce this by 50x to 1000x while preserving visual quality. Think of it as a zip file for video, except the compression is specifically designed for moving images.
Codecs exploit two types of redundancy in video. Spatial redundancy means that neighboring pixels in a single frame often have similar colors — a blue sky does not need every pixel stored individually. Temporal redundancy means consecutive frames are usually very similar — if only a person's mouth moves between frames, the codec stores just the change, not the entire frame again.
Modern codecs like H.264 and H.265 use sophisticated prediction algorithms to minimize the data needed. They divide frames into blocks, predict each block from surrounding blocks or previous frames, and store only the difference. More advanced codecs like H.265 and AV1 achieve better compression ratios but require more processing power to encode and decode.
The codec is separate from the container format (like MP4 or WebM). The container is the package; the codec is how the contents are compressed. An MP4 file might use H.264 or H.265 internally — the container is the same, but the compression method differs.
Codec choice directly affects three things your viewers and your budget care about: file size (which determines bandwidth costs and load times), visual quality (which determines viewer experience), and compatibility (which determines who can actually watch). Choosing the wrong codec can mean serving bloated files that buffer constantly, or using a format that half your audience's devices cannot decode.
host.video handles codec selection automatically during transcoding. Every upload is encoded with widely compatible codecs and optimized for the best balance of quality and file size, so you never need to think about codec settings.