Apex › Data & encoding

How video inter-frame compression works

The temporal counterpart to JPEG, and why an hour of video fits on a phone. Instead of coding every frame whole, a P-frame predicts this frame from the previous one: real block-matching motion estimation finds each block’s motion vector (the offset to its best match), and only the tiny leftover residual is coded — DCT-quantized like a JPEG block, but nearly empty. Pan the camera and watch the vectors track it and the frame shrink to ~1–2%; drop in a new object and watch the residual spike (that’s when the encoder codes a fresh I-frame).

More in Data & encoding