explaingit

imageoptim/gifski

Analysis updated 2026-07-03

5,509RustAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

A command-line tool and C library that converts video or PNG frames into high-quality animated GIFs using per-frame color optimization and dithering to maximize visual quality.

Mindmap

mindmap
  root((gifski))
    What it does
      Convert video to GIF
      Per-frame palette optimization
      Dithering for more colors
    Inputs
      Video via ffmpeg
      PNG image sequences
    Outputs
      Animated GIF
      Estimated file size
    Deployment
      CLI tool
      C library
      WebAssembly
      iOS cross-compile
    License
      AGPL 3
      Commercial option available
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Convert a screen recording into a high-quality animated GIF for embedding in a README or documentation page.

USE CASE 2

Pipe ffmpeg video frames into gifski to batch-produce GIFs from a video library.

USE CASE 3

Embed gifski as a C library inside a desktop app to give users an in-app GIF export feature.

USE CASE 4

Use the WebAssembly build to add browser-side GIF conversion to a web app without a server.

What is it built with?

RustCWebAssemblyffmpeg

How does it compare?

imageoptim/gifskilibp2p/rust-libp2pserenity-rs/serenity
Stars5,5095,5105,504
LanguageRustRustRust
Setup difficultymoderatemoderatemoderate
Complexity2/54/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires ffmpeg installed for video input, AGPL license requires open-source compliance for embedded use.

Free to use but any software that includes or links gifski must also be released as open source, commercial licenses are available if you cannot meet this requirement.

In plain English

Gifski is a tool for converting video into high-quality animated GIF files. GIF is an old image format that many sites and apps still use for short looping animations, but its main limitation is a 256-color palette per frame. Gifski gets around this by generating a separate optimized palette for each frame and using dithering (a technique that blends nearby pixels to simulate colors the palette cannot represent directly). The result is GIFs that appear to use thousands of colors rather than the standard 256. The tool works from the command line. You feed it either a video file (using ffmpeg to pipe frames in) or a folder of PNG images exported from any video or animation software, and it produces a single animated GIF. If you are not comfortable with a terminal, GUI versions are available for Windows and macOS as separate downloads linked in the README. File size is the main trade-off with GIF, and the README is direct about this: GIF compresses poorly no matter what settings you use. The main controls for reducing file size are reducing the width and height of the output and lowering the quality settings. The tool displays an estimated file size during compression, though it warns the estimate is imprecise. For very large inputs the tool will automatically shrink the output to keep sizes reasonable unless you override it. Beyond the command-line tool, gifski can be compiled as a C library for use inside other applications. It also supports WebAssembly for use in browser-based tools and can be cross-compiled for iOS. The iOS version is used by at least one Mac and iOS app, which is linked in the README. The project is written in Rust and licensed under AGPL 3, which requires any software that uses it to also be open source. Commercial licensing is available for products that cannot use the AGPL license.

Copy-paste prompts

Prompt 1
Show me the ffmpeg + gifski command to convert a 10-second MP4 clip into a 480px-wide animated GIF at quality 80 with a reasonable file size.
Prompt 2
I have a folder of PNG frames exported from After Effects. Write the gifski command to combine them into a looping GIF at 24fps and 720px width.
Prompt 3
Help me write a Rust program that calls the gifski C library to convert a Vec of RGBA image frames into an animated GIF and save it to disk.
Prompt 4
I want to reduce my gifski GIF output from 8MB to under 2MB without changing the content. What quality, width, and fps settings should I try first?
Prompt 5
Walk me through compiling gifski for iOS so I can use it inside my Swift app to let users export GIFs from their camera roll.

Frequently asked questions

What is gifski?

A command-line tool and C library that converts video or PNG frames into high-quality animated GIFs using per-frame color optimization and dithering to maximize visual quality.

What language is gifski written in?

Mainly Rust. The stack also includes Rust, C, WebAssembly.

What license does gifski use?

Free to use but any software that includes or links gifski must also be released as open source, commercial licenses are available if you cannot meet this requirement.

How hard is gifski to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is gifski for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub imageoptim on gitmyhub

Verify against the repo before relying on details.