Hacker News new | ask | show | jobs
by maxst 2723 days ago
> I just checked the Google homepage, and even the New Year's Eve Google Doodle currently being shown is a good ol' GIF, rather than a modern format such as WebP. And this is with me using a desktop Chrome browser that definitively supports WebP.

new-years-eve-2018-4995722058399744.2-law.gif

299 972 bytes

new-years-eve-2018-4995722058399744.2-law.webp

293 636 bytes

new-years-eve-2018-4995722058399744.2-law.apng

251 516 bytes

Interesting...

2 comments

Meanwhile using ffmpeg's default settings it's 63k as h.264 and 45k as h.265.
Starting a video in most browsers is pretty expensive (it usually loads up various GPU features for hardware video decoding).

On some old and buggy machines, that might cause the browser to crash too.

Not something Google wants to risk for a doodle - that's why all non-trivial doodles require a click to load.

> Starting a video in most browsers is pretty expensive (it usually loads up various GPU features for hardware video decoding).

OTOH it might be cheaper (relatively) on phones as they can offload the work to hardware components and ramp CPU down (or avoid ramping it up).

But that is lossy compression.
It doesn't matter. It will look the same.
chroma subsampling, shallow gradients, ringing, the lack of transparency are all quite visible issues when trying to encode cartoons, pixel graphics or screen captures with the standard profiles of lossy video codecs.
I used gif2webp -q 100 -m 6 -mt "new-years-eve-2018-4995722058399744.2-law.gif" -o out.webp

with the resulting out.webp being 285 932 bytes, so it seems apng does a very good job here, unless I'm using suboptimal options for webp.