Skip to content
UniKit

Video to GIF

Sample, quantize and encode a real GIF89a animation in the browser; frame rate, longest edge and color count all change the output.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

The video is sampled and encoded to GIF locally in your browser; the GIF is generated locally too.

Pick a video file first.

Progress: Idle0 / 0 · 0%

Result

These are the real numbers from this run — play and download them right here.

Pick a video and set the options; the real result shows up here.

What this tool does

  • Turn a short slice of a video into a shareable GIF animation: real sampling, real quantization, real GIF89a
  • Shrink the file with the longest edge and the color count (GIF allows 256 colors at most — the main difference from video)
  • Convert only one range: pick it on the timeline, then cap how many frames are composed

Example

Input

clip.mp4 (160×120, 1.05 s, 24,000 bytes) · 10 fps sampling · max 24 frames · longest edge 320 · 64 colors

Output

Source video: 160×120 · duration 0:01 · 24.0 KB
Range: 0.000 → 1.050 s (1.050 s)
Sampling: one frame every 0.100 s (10 fps) → 10 frames
GIF size: 160×120 (scaled proportionally to a 320 px longest edge, shrink only)
Frame delay: 100 ms ≈ 10 fps (GIF delays are only accurate to 10 ms, so not every frame rate can be expressed exactly)
Palette: 64 colours (median-cut quantisation over all frames, one global palette) · loop: forever
GIF playback time: 1.00 s
Output file name: clip-10f-320px.gif

These are the lines the pure logic computes for the input above (the first lines of the result panel). The panel then appends the real palette size and GIF byte count — known only after encoding.

Frequently asked questions

How does the quality compare with ffmpeg palettegen + paletteuse?

This uses one global palette built from the merged histogram of all frames with median-cut quantization: the color count is controllable and the result is stable, but there are no per-frame palettes and no dithering, so large gradients band more than ffmpeg’s two-pass palette. Use local ffmpeg (palettegen + paletteuse) when quality is critical.

I asked for 12 fps, why does it say 12.5 fps?

GIF frame delays can only be multiples of 1/100 second; 12 fps needs 83.3 ms, which cannot be expressed, so the closest 80 ms (12.5 fps) is used. The tool prints the real delay in the result.

Why does it slow down so much with more frames?

Every frame goes through color quantization and LZW compression over the whole canvas, so the work scales with frames × pixels × colors. Lower the longest edge or the frame count if you need speed — those two also cut the file size the most.

Does the GIF have audio?

The GIF format has no audio track at all, so this animation is video only. Export a video instead (the site has video cut / flip tools) or use local ffmpeg for an mp4.

Keywords:GIFgif89a

Related tools