Toolyard

How to Convert a Video to GIF

In your browser

  1. Open Video to GIF and drop in the video. It appears in a player.
  2. Play it and pause where the GIF should start; the start time fills in. Set the length in seconds.
  3. Choose a width and frame rate, click Make GIF, check the preview and download it.

The conversion runs on your computer with FFmpeg; the first use downloads the converter (about 30 MB).

Keeping the GIF small

  • Length matters most: every second adds frames. Keep it to a few seconds.
  • Width: 480 px suits chats and most websites.
  • Frame rate: 10–12 fps looks smooth enough for most clips and is much smaller than 24 fps.

A GIF is always far larger than the same clip as MP4, because GIF has no real video compression. If the place you are posting accepts video, a short MP4 looks better and loads faster.

With FFmpeg

This makes a 480-pixel-wide GIF at 12 fps with its own color palette:

ffmpeg -ss 5 -t 4 -i video.mp4 -vf "fps=12,scale=480:-2:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse" clip.gif

A worked example

Four seconds at 12 fps is 48 frames. At 24 fps it would be 96 frames, twice as many, for motion that looks only a little smoother. Halving the width from 960 to 480 pixels leaves a quarter of the pixels in every frame. Together, those two changes make the GIF several times smaller.

Common problems

  • Smooth gradients look banded or speckled. A GIF frame can hold at most 256 colors, so skies and soft shadows break into steps. Clips with flat colors, text and screen recordings look best.
  • There is no sound. GIF cannot store audio. Use a short MP4 if the sound matters.
  • The GIF is too big to post. Shorten it first, then lower the frame rate, then the width.

Tools in this guide

More guides