logoalt Hacker News

WhitneyLand • yesterday at 4:26 PM • 4 replies • view on HN

"The H.264 video, 300 frames long is 175KB. A single frame of that video in PNG is 1015KB. It looks like we're storing 300 times the amount of data in the video. But the file size is a fifth. So H.264 would seem to be 1500x as efficient as PNG. How is this even possible? All right, what's the trick?"

Mostly the trick is they're comparing lossy to lossless compression which doesn't even make any sense.


Replies

nomel • yesterday at 4:32 PM

Yes, as they explain shortly after, in the next section "shedding weight".

They're not actually confused here. It's a writing style, where you pose an interesting problem/scenario, then explain it.

➕ show 1 reply
rob74 • yesterday at 4:42 PM

Actually I had the same thought, but this is obviously an article for people who don't know the difference between lossless and lossy compression. Ok, you might argue that it's not a good fit for HN, but going by the many times it seems to have been posted here, some people disagree.

Dylan16807 • yesterday at 4:31 PM

It makes tons of sense to compare those numbers. It's a big part of how you benchmark lossy compression. I guess in some sense they should use BMP instead of PNG but it's arguable.

➕ show 1 reply
a3w • yesterday at 6:13 PM

Discussed elsewhere here: h.264 supports lossless storing.