Why it matters

Codec choice affects bandwidth cost, storage, and playback compatibility. Understanding basics helps make informed choices.

Advertisement

The architecture

Intra-frame (I-frame) compression: JPEG-like within a frame. Discrete cosine transform + quantization.

Inter-frame (P/B-frame): predict from previous/future frames. Motion compensation.

Video codec pipelineIntra (I-frame)spatial compressionInter (P/B)motion predictionEntropy codingfinal compressionGOP (Group of Pictures): I-frame then P/B-frames referring to it
Codec compression stages.
Advertisement

How it works end to end

GOP structure: I-frame + P/B-frames until next I-frame. Larger GOP = better compression, worse seeking.

Motion estimation: for each block, find best match in reference frame. Store motion vector + residual.

Rate control: target bitrate or quality. CBR, VBR, CRF modes.