Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do something similar with ffmpeg’s palettegen/paletteuse or imagemagick’s fuzz option. Generally speaking, fuzz/IM does well for recompressing GIFs, especially high-noise or static background. If you still have the source video, nothing can beat ffmpeg though.

(Those options usually require a bit of tweaking though. I can’t compare these at work, might give it a go later.)



This is absolutely not similar to any ffmpeg/IM's options. This doesn't change the palette, and doesn't rely on static backgrounds.

Instead, it integrates very deeply into LZW compression to make dictionary matching visually approximate in a way that maximizes compression. The only other implementation of this that I'm aware of is in Photoshop.


Hi Pornel, thanks a lot for the amazing tool.

If you are doing the animation from scratch, which would be the preferred workflow for smallest size with as few artifacts as possible?

Photoshop Save for Web 256? Which dithering algorithm works best with giflossy?

Would exporting every frame as an individual GIF with its own pallet help?

Generating an MP4 first then run it through some other quantizer?

Thanks


Lowering pixel resolution and frame rate will reduce file size the most.

Make the gif straight from the original lossless source if possible, since any JPEG-like video compression artifacts will inflate file size in gif.

If the input is a video already, use gif.ski

And then giflossy.

Of course ideally avoid the gif format entirely, since even the best possible compression in it is still horribly awful compared to H.26x and VP9.


Thanks, maybe a more specific question: how does it compare to Photoshop’s lossy option in Save for Web?

Which dither and color reduction algorithms would be better suited for giflossy?


That’s an (impressive) implementation detail. By similar, I mean the result is a smaller GIF.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: