Skip to the tool
CALCPARK

Video to GIF Converter

Turn part of a video into an animated GIF in your browser: set the range, frame rate, width, speed, reverse or boomerang, quality and loop count, with a two-pass palette.

Files stay on your device
Loading the tool…

How to use it

  1. Drop a video. The first five seconds are selected; drag the handles or type exact times to pick the moment you want.
  2. Choose the frame rate and width. 12 fps and 480 px suit chat and social posts; go wider only for presentations.
  3. Optionally speed it up, reverse it or make a boomerang (forward then backward), pick a quality and the loop count.
  4. Press Create GIF, check the preview and size, then download.

Example

A 1080p phone clip, range 0:04 – 0:10, 480 px, 12 fps, balanced quality: FFmpeg samples 72 frames, scales them to 480 × 270, builds the palette in pass 1 and writes the GIF in pass 2 – about 15 s of work on a laptop and a file of roughly 2–3 MB. The same range as a boomerang doubles to 144 frames and 12 s of playback; at 240 px it shrinks to under 1 MB.

How the GIF is made

GIF stores at most 256 colours per frame, so the quality of a conversion depends almost entirely on the palette and the dithering. The tool runs FFmpeg (WebAssembly build, downloaded from the unpkg CDN once and cached) twice:

1) ffmpeg -ss START -t LENGTH -i input -filter_complex "[0:v]setpts=PTS/SPEED,fps=FPS,scale=W:-2:flags=lanczos,palettegen=max_colors=N:stats_mode=diff[p]" -map "[p]" palette.png
2) ffmpeg -ss START -t LENGTH -i input -i palette.png -filter_complex "[0:v]…same chain…[x];[x][1:v]paletteuse=dither=D" -loop L output.gif
  • setpts=PTS/SPEED retimes the frames before fps resamples them, so 2× speed really halves the frame count; scale=W:-2:flags=lanczos keeps the aspect ratio with a sharp Lanczos filter.
  • palettegen with stats_mode=diff weights pixels that change between frames, giving moving parts more colours than a static background. Best and Balanced use 256 colours; Smallest uses 128.
  • paletteuse maps each frame to the palette. Best uses sierra2_4a error diffusion (smooth gradients, larger files); Balanced and Smallest use ordered Bayer dithering (bayer_scale 4 and 5), which compresses better.
  • Reverse appends the reversefilter; boomerang splits the stream, reverses one copy and concatenates both – these buffer every frame, so keep such clips short.
  • The GIF muxer’s -loop is counter-intuitive: 0 loops forever, -1 writes no loop extension (one play), and N means N extra repeats, so “3 plays” is -loop 2.

Widths wider than the source fall back to the original size. GIF has no sound and no inter-frame compression beyond frame differencing, so length, width and frame rate drive the file size roughly linearly.

Sources: FFmpeg filters – palettegen and paletteuse, FFmpeg muxers – gif (-loop semantics), ffmpeg.wasm documentation.

Which settings make a small GIF?

In order of effect: shorter range, smaller width, lower frame rate, then the Smallest quality. A 3-second, 320 px, 10 fps GIF is usually under 1 MB; the same clip at 640 px and 24 fps is 6–8 times larger. If a platform limits uploads (many chat apps cap GIFs around 8 MB), drop the width before dropping the frame rate – motion stays readable at 10 fps, but a blurry 160 px GIF rarely does.

Questions

Why is my GIF so much bigger than the video?
Video codecs such as H.264 predict each frame from the previous ones; GIF stores near-complete frames with LZW compression and only 256 colours. Ten seconds of 480 px GIF at 12 fps is 120 frames of roughly 30–50 KB each. Use a shorter range, a lower width or 10 fps to shrink it.
Does the GIF keep the sound?
No – the GIF format has no audio track. If you need the sound, use the Video Trimmer to cut an MP4 instead, or extract it with Video to MP3.
What does boomerang do?
It plays the range forward and then backward in one loop, so the motion appears to bounce. The GIF is twice as long as the range; the tool shows the resulting length and frame count before you encode.
Is anything uploaded?
No. The only network request is the 32 MB FFmpeg engine fetched from the unpkg CDN on first use, which your browser caches. Your video stays in memory in this tab and the GIF is offered as a local download.