A codec doesn't just shrink video. It discards what the eye won't notice. Learn what H.264, HEVC and AV1 standards define, and why encoders differ.
Welcome. This course is a seminar for people who want to work with codecs for a living. It doesn't just restate the specs. Instead, each lesson picks one concept that's actually used in the field and asks: why was it designed this way?
Since this is the first lesson, let's sketch the big picture. The word codec (short for COder + DECoder) already tells you what it is: one agreement made of two matching halves.
Video codec standards (H.264, HEVC, AV1 …) do not specify the encoder. All a standard specifies is the 'syntax of the bitstream' and 'how to decode it.' In other words, the decoder has exactly one right answer, while the encoder is free.
This asymmetry shapes the structure of the whole industry. As long as you follow the spec, you can build any encoder you like, so even for the same H.264, x264 and a hardware encoder inside a smartphone chip can differ enormously in quality. A codec company's competitive edge mostly lives in its encoder. The decoder is where you can't be wrong; the encoder is where doing better wins.
Even within the single AV1 standard, the encoder matters: SVT-AV1 and libaom need different file sizes and encoding times for the same quality. See our hands-on measurement.
"How far does a codec standard's scope go?" is a classic interview question. The answer: bitstream syntax and the decoding process. The encoder's mode decisions, rate control, and preprocessing are all left to the implementation.
Compression is possible because video data is enormously wasteful. The waste falls into three kinds, and these three are the root of every technique you'll learn from here on.
There's one more on top of these: psychovisual redundancy. Information the human eye can't see is simply discarded. That is what 'lossy compression' really is.
A codec is a stenographer. Instead of writing down a lecture word for word, they use agreed-upon symbols like 'same as the previous sentence' or 'repeat that earlier word.' Filler the listener wouldn't notice isn't written down at all. The agreed-upon symbol book is the codec standard.
Coder + Decoder. An agreement on how video is compressed and restored.
The compressed bit sequence the encoder emits and the decoder consumes. The actual thing a standard defines.
Whether the original can be restored exactly. Video is almost always lossy.
Verifying that a decoder produces output bit-for-bit identical to what the standard specifies.
Information the human eye can't perceive. Discarding it is what 'lossy compression' really is.
Which of the following does the H.264 standard 'specify'?
Which redundancy exploits the property that 'the previous frame and the current frame are almost the same'?