FFmpeg Cookbook

Video to GIF Converter

Convert a video clip into a high-quality animated GIF. Adjust FPS and width to balance quality vs file size.

Fully local processing — your file never leaves the browser
🎞️
Drag & drop a video here, or click to select
Supported: MP4, MOV, AVI, MKV, WebM, and more / Max 200 MB
🎞️
e.g. 5.5 = 5 seconds 500 ms
Max 30 s recommended (longer = larger file)
Height is calculated automatically
Converting… 0%

Visual concept

Width × FPS dominate GIF file size240×10fps~ 1.5 MB320×15fps~ 4 MB(recommended)480×20fps~ 12 MB640×25fps~ 22 MBApprox for a 5-second clip; doubling duration roughly doubles size

* Actual results depend on source duration / complexity (illustrative example)

Popular uses
Short GIFs for chatAnimated blog previewsLooping social posts

What this tool does

  • Set start, end, width, FPS
  • palettegen pipeline for cleaner colors
  • Instant preview, click to download
  • Local processing — files stay on-device

How to use

  1. 1

    Pick a video

    MP4 / MOV / WebM. Trim to a short window for sane file sizes.

  2. 2

    Set start / end

    In seconds. Keep clips ≤10s to keep GIFs reasonable.

  3. 3

    Pick width / FPS

    320px / 15fps is a good default.

  4. 4

    Convert

    Preview appears — download from there.

What each setting means

Start / End
Range to convert. File grows quickly with duration.
Width
Pixels. 240–480 is typical for chat sharing.
FPS
10–15 is the GIF sweet spot. Above 20 grows fast.

Recommended settings

Slack / chat shareable
320px · 15fps · ≤10s
Stays light, plays inline.
Blog screencap
480–640px · 15fps · 5–8s
Readable in articles.
Smooth short loop
240px · 20fps · ≤3s
High FPS only viable for short clips.

Common pitfalls

Symptom: GIF >20MB

Cause: Long clip / high FPS / wide.

Fix: Cut to 5–10s, 320px wide, 10–15fps.

Symptom: Banding visible

Cause: GIF caps at 256 colors.

Fix: Reduce width or share as MP4 instead.

Symptom: Looks choppy

Cause: Source FPS too low, or target FPS too low.

Fix: Use ≥15fps and check the source.

Equivalent FFmpeg commands

Reference commands you can run on the desktop FFmpeg CLI.

Basic GIF
ffmpeg -i input.mp4 -ss 5 -to 10 -vf "fps=15,scale=320:-1:flags=lanczos" -loop 0 output.gif
palettegen pipeline
ffmpeg -i input.mp4 -ss 5 -to 10 -vf "fps=15,scale=320:-1:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse" -loop 0 output.gif

Browser support & limits

  • Max 200MB input
  • 256-color limit (no smooth gradients)
  • Recommended ≤30s clips

Privacy

This tool runs ffmpeg.wasm directly in your browser. Files never leave your device — everything runs locally. Read the privacy policy →

Frequently asked questions

GIF or MP4 — which is smaller?

MP4 by a wide margin at the same quality. Most chat platforms autoplay MP4 too — prefer it for size.

Can I make a transparent GIF?

No — this tool converts video → GIF, which loses transparency. Use APNG / WebP / WebM for transparent animation.

Why ≤30s recommendation?

Above 30s the GIF often crosses 50MB and may exceed browser memory limits.

How is this different from naked split / palettegen?

Internally we run palettegen + paletteuse for less banding than basic conversions.

Mobile?

Yes, but ≤50MB sources are recommended — trim or compress first for larger clips.

GIF looks heavy / blurry on Slack or Discord

GIF is capped at 256 colors so gradients suffer. Aim for 320px width and 12-15 fps; if it still looks bad, sharing as MP4 will usually win on both size and quality.

Can I make it play once instead of looping?

No — output is loop=0 (infinite). For one-shot playback, post-process with ImageMagick: `convert in.gif -loop 1 out.gif`.

Does vertical / portrait video work?

Yes, aspect ratio is preserved. A 9:16 source at 320px width becomes ~568px tall, which can clip on Twitter — drop width to 240px for vertical clips.

Related tools

Related FFmpeg recipes

What to do next