Hacker News new | ask | show | jobs
by pornel 4380 days ago
I was able to halve size of GIFs with lossy LZW compression:

https://pornel.net/lossygif

With a good palette (which most software is terrible at) and proper delta frames (without artificial differences created by blindly applied diffusion) GIFs can be 1/4th of the size you get from an average GIF maker.

Still, it's a terrible video codec.

I think trauma caused by awful plugins like RealPlayer and QuickTime made people stuck thinking that "animated images" and "proper video" are completely different things. But with native video support in browsers IMHO there should be no divide between <video> and GIF at all. It's the same thing, except the latter wastes more bandwidth, needs more memory or CPU (to enable seeking, used when you switch tabs) and can't be hardware-accelerated.

1 comments

> needs more memory or CPU (to enable seeking, used when you switch tabs)

Gif is pretty bad, yes, but somehow I can browse pages with thousands of gifs. I can't browse pages with thousand of embedded videos.

> Gif is pretty bad, yes, but somehow I can browse pages with thousands of gifs. I can't browse pages with thousand of embedded videos.

That's true, but it's not limited by compression, only by assumptions/optimizations in the browsers.

For example browsers try very hard top stop decoding GIFs that are not currently visible on the screen. This could be done even better with a properly seekable video codec, but it's just not implemented.

No argument there. I was just stating a reason why gif-heavy site operators are reluctant to switch to video. It's chicken and the egg. They won't switch because video is not as optimised yet, the browser vendor has no reason to optimise video further because sites usually don't have that many embedded videos.