Download

Download lessgif

The same encoder as this website, as a command-line app. It has no limits on file size or length, uses all your processor's cores, and is free and open source.

All files and checksums · Older versions · Source code

Using it

Unpack the download and run lessgif from a terminal. Making GIFs from videos needs ffmpeg installed as well (winget install ffmpeg on Windows, brew install ffmpeg on macOS, or your Linux package manager). GIFs and folders of PNG frames work without it.

lessgif clip.mp4 clip.gif                     # video to GIF, 15 fps, up to 480 px
lessgif clip.mp4 clip.gif --quality 85 --fps 20 --max-side 640
lessgif big.gif small.gif --quality 70        # re-compress a GIF
lessgif big.gif small.gif --max-size 8M       # best quality that fits in 8 MB
lessgif frames/ anim.gif --fps 12             # a folder of PNG frames
lessgif --help                                # every option

"Unknown developer" warnings

The apps aren't signed with a paid certificate yet. On macOS, if it says the app can't be checked, run xattr -d com.apple.quarantine lessgif once in the folder you unpacked it to. On Windows, SmartScreen may ask you to confirm with More info, then Run anyway. To check that a file is the one this project built, compare it with SHA256SUMS.txt on the release page, or run gh attestation verify <file> --repo moonjuho11/lessgif with the GitHub CLI.

For developers

Rust

Build the app from source with cargo install --git https://github.com/moonjuho11/lessgif, or use the encoder as a library. Without its default cli feature it has no dependencies.

[dependencies]
lessgif = { git = "https://github.com/moonjuho11/lessgif", default-features = false }

In a web page

The browser build is about 70 KB compressed and gives the same bytes as the app. Download lessgif-wasm.zip, put lessgif.js and lessgif.wasm next to your page, and call it from a worker:

import { loadLessGif, delaysForFps } from './lessgif.js';
const encoder = await loadLessGif();
const { gif } = encoder.encode({ w, h, n, getFrame: (i) => frames[i], delays: delaysForFps(n, 15), quality: 70 });

The README on GitHub explains the settings, the size-limit search and how the encoder works.