RC RANDOM CHAOS

How H.264 Compresses Video 1500x More Efficiently Than Images

· via Hacker News

Original source

H.264 Is Magic (2016)

Hacker News →

H.264 dominates video delivery because it solves a fundamental problem: raw, uncompressed video demands impractical bandwidth—roughly 370 megabytes per second for 1080p at 60 frames per second. The author demonstrates the codec’s efficiency with a striking example: a 5-second video clocks in at 175KB while a single PNG screenshot of identical content requires 1015KB. Despite the video containing 300 frames to the image’s one, H.264 achieves roughly 1500x better compression.

This efficiency comes from lossy compression—aggressively discarding information humans cannot perceive. H.264 converts spatial image data into the frequency domain, where fine details emerge as high-frequency components and smooth color transitions appear as low-frequency content. By selectively removing high-frequency information through a process called quantization, the codec shrinks files to a fraction of the original while preserving imperceptible differences. The author shows that masking away high-frequency data down to just 2 percent of the original entropy produces images indistinguishable from the source at normal viewing distances. Additional techniques like chroma subsampling further exploit human perceptual limitations to reduce file sizes.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.