Video Compression (Spatial & Temporal)
đź’ˇ The Core Idea
Raw video has a massive bitrate. Compression reduces size by exploiting Spatial Redundancy (pixels within a frame are similar) and Temporal Redundancy (adjacent frames are similar).
đź§ Mechanisms
Spatial (Image) Compression (JPEG)
- Transformation: Convert RGB to YCbCr (Luminance/Chrominance).
- DCT: Apply Discrete Cosine Transform to 8x8 blocks to separate high/low frequencies.
- Quantization: Divide coefficients by a quantization table () to reduce precision of high frequencies (Lossy step): .
Temporal Compression (MPEG)
Instead of sending every full image, send differences.
- I-Frame (Intra): A full, self-contained image (JPEG encoded).
- P-Frame (Predicted): Encodes only the changes from the previous frame.
- B-Frame (Bi-directional): Encodes changes relative to both past and future frames.
- GoP: A “Group of Pictures” is the sequence between I-frames.
đź”— Connections
- Source: Source - Multimedia Applications