H.264 Is Magic (2016)

474 points · 155 comments on HN · read original →

Points and comments are a snapshot, not live.

H.264 video compression can shrink a 1.2 GB raw clip to 175 KB using lossy and temporal tricks.

The author explains H.264's efficiency via quantization in the frequency domain (discarding high-frequency detail), chroma subsampling (halving color resolution), and motion compensation (encoding only motion vectors between full I-frames, plus P- and B-frames).

A 5-second 1080p60 uncompressed stream requires ~370 MB/sec. The example Apple homepage video (300 frames) compresses to 175 KB, versus 1015 KB for a single PNG frame, roughly 1500x the efficiency of lossless PNG. An analogy: a 3000 lb car would weigh 6.5 oz under the same ratio.

What commenters are saying

Commenters note the article (2016) is dated; AV1 is now widespread and often preferred over H.264 for size/quality, though hardware decode support varies (e.g., missing on Nvidia Shield, causing thermal issues on Firestick). Some debate the apples-to-oranges comparison of lossy vs. lossless compression, while others defend it as a pedagogical device.

A camp argues AV1 software decode works well on old devices; others counter that 4K AV1 software decoding taxes hardware. The thread also references future codecs (AV2) and learned/neural video codecs as the next frontier.