Skip to content
Browser Media Studio

Convert video to GIF

Open the studio

Free, no sign-up, and nothing is uploaded.

Worked example

GIF is a 256-colour format from 1987, and getting a good one out of video is mostly about the palette.

Extension.gif
MIME typeimage/gif
PlaybackPlays everywhere
From MP4 without re-encodingNo
Video codecgif

The equivalent command

ffmpeg -i holiday-clip.mp4 -vf fps=12,scale=480:-2:flags=lanczos,palettegen -y palette.png && \
  ffmpeg -i holiday-clip.mp4 -i palette.png -lavfi 'fps=12,scale=480:-2:flags=lanczos[x];[x][1:v]paletteuse=dither=bayer:bayer_scale=5' -an -loop 0 -y out-holiday-clip.gif

This is exactly what runs in the browser. Copy it to run the same job locally on a file too large for a tab.

What to expect

Size is only predictable when you set a bitrate. These figures are for the bitrate example above:

At 1500 kbps for 60s12.1 MB
Rough encode time6:45

At a constant quality the encoder lets the bitrate follow the content, so the output size genuinely cannot be predicted in advance — a slide deck and handheld footage of leaves differ by an order of magnitude at the same setting.

Why it matters

Everything that makes GIF awkward follows from two facts: 256 colours per frame, and no real motion compression. The colour limit is handled by computing a palette from your own clip rather than using a generic one. The lack of motion compression cannot be fixed at all, which is why GIFs are routinely ten to fifty times the size of the equivalent MP4 and why keeping the frame rate and width down matters so much.

Related tools