Live data from Hacker News

Gifski: Optimized GIF Encoder

github.com

61–65 of 65 posts

Re: Gifski: Optimized GIF Encoder

#62
post #6

I've used this for years and it's the best out there. Definitely use it for converting videos for Google Slides and such. But it's such a travesty that we're in 2024 and still using GIFs in place of videos. I guess it's not necessary on the web directly anymore, but so many other platforms, like Google, support GIFs but not videos. So we're all stuck encoding into an insanely space/cpu inefficient format just to get…

Instead of GIF, use APNG or animated WebP, supported in almost all web browsers.

Re: Gifski: Optimized GIF Encoder

#63
post #6

I've used this for years and it's the best out there. Definitely use it for converting videos for Google Slides and such. But it's such a travesty that we're in 2024 and still using GIFs in place of videos. I guess it's not necessary on the web directly anymore, but so many other platforms, like Google, support GIFs but not videos. So we're all stuck encoding into an insanely space/cpu inefficient format just to get…

I wish there was some kind of small, soundless video supporting transparency for emojis, stickers, small animations, diagrams in slide shows, etc, that is guaranteed to autoplay and loop without issues. The problem with of course is that there's no way to tell if it's going to play an annoying sound, take a long time to load, change the screen brightness due to HDR features, require a weird proprietary codec, need th…

You can convert images/video to APNG at https://ezgif.com/apng-maker or to animated WebP at https://ezgif.com/webp-maker.

Re: Gifski: Optimized GIF Encoder

#64
post #61

GIF Optimizer at https://ezgif.com/optimize could further optimize a demo GIF image https://gif.ski/jazz-chromecast-ultra.gif by 23% using Lossy GIF Compression and by 27% using Optimize Transparency. So there is still much to improve in Gifski.

ezgif uses a lossy GIF compressor written by me — author of gif.ski.

I can run:

     gifski -Q50 jazz-chromecast-ultra.gif -o even-smaller.gif
and it reduces the same file by 65%. With -Q20 it can be 78% smaller: https://gif.ski/jazz-ultra-small.gif

By that measure, gif.ski is 78% better than itself!

With lossy compression it's always possible to make files smaller, and smaller, and smaller. Comparisons of lossy encoders without controlling for quality lead to such absurd results. See https://kornel.ski/en/faircomparison

Re: Gifski: Optimized GIF Encoder

#65
post #45

If you don't want to use something more composed like this, the main trick gifski is doing is using a two-pass approach to generate a palette for the gif. You can do this pretty easily with just ffmpeg / ffprobe. Here's my personal script I use for generation: #!/bin/sh SCALE=500 FPS=15 SCALEPROVIDED=false for arg in "$@" do case $arg in -s=*|--size=*) SCALE="${arg#*=}" SCALEPROVIDED=true shift ;; -f=*|--fps=*) FPS="…

aside: find it funny (genuinely), you describe this as "pretty easy" xD. ffmpeg is so impressive but so daunting from a cli perspective to me. how do you even know whats possible! I would never have imagined it could generate palettes

Highly recommend using an LLM for this actually! GPT is surprisingly good at generating ffmpeg commands. Agree it is super complex though.
Post reply on HN