How to Convert a Video to a Clear, Looping GIF
Convert a selected video action to GIF with FFmpeg. Choose the interval, width, fps and palette, then check loop joins, file size, colors and playback.

To convert a video to GIF, choose a short action, set its start and end, reduce the picture to a useful size, then export with an appropriate frame rate and palette. GIF carries no sound, so the action should make sense without a spoken explanation.
CutNow is an AI video editing product for footage you already have: it finds relevant passages and organizes first cuts. That helps when you still need to find the useful moment in a longer recording. Once the moment is chosen, GIF conversion is a separate delivery step. This guide gives a complete local FFmpeg method for that step.
Choose an action that works without sound
A GIF works well as an inline demonstration: a latch opening, a fold taking shape or a small repeated motion. Keep the source master and use footage you own or have permission to adapt. If the meaning depends on hearing a sentence, a short video is the more useful delivery.
In this original teaching example, a paper fan opens and closes between 12 and 15 seconds in a longer recording. The intended GIF shows one complete cycle. Those are example settings for your own file, not a measured conversion result.
If the useful passage is not chosen yet, start with the long-video selection guide. If you know its boundaries, the timestamp-trimming guide explains how to attach them to the right source version.
Set the loop before reducing the file
Watch the candidate section with sound off. Start where the object is recognizable, retain the important movement, and finish where the return to the beginning is understandable. For the fan example, closed–open–closed gives the loop a clear shape.
An infinite-loop setting does not make mismatched endpoints seamless. If the last view jumps to a different hand position at the restart, change the selected boundary or accept a deliberate pause. Do not extend the clip with unrelated preparation just to make it longer.
Choose size, frame rate and crop for the placement
| Decision | What to look at | A practical starting choice |
|---|---|---|
| Length | Is the complete action present? | Keep one useful cycle, not the whole recording |
| Width | Can the detail be read where it will appear? | Try 480 pixels wide, then inspect at the intended size |
| Frame rate | Is the movement understandable? | Try 12 frames per second; compare another setting if needed |
| Crop | Is empty space using most of the picture? | Remove unnecessary edges while keeping the whole action |
| Palette | Do colors and gradients remain acceptable? | Generate a palette from the selected pictures |
These starting settings are choices, not a universal quality preset or a file-size promise. A smaller width reduces spatial detail. A lower frame rate uses fewer moments to describe movement. Cropping removes content; scaling changes its size. The framing guide helps with that distinction.
Export the selected section with FFmpeg
FFmpeg’s official download page provides source and links to compiled packages. With FFmpeg available in your terminal, use your actual input filename and boundaries. This example normalizes the source clock, keeps seconds 12 through just before 15, resets the kept section to zero, then prepares the GIF:
ffmpeg -n -i "source.mp4" -filter_complex "[0:v:0]setpts=PTS-STARTPTS,trim=start=12:end=15,setpts=PTS-STARTPTS,fps=12,scale=480:-1:flags=lanczos,split[a][b];[a]palettegen[p];[b][p]paletteuse[out]" -map "[out]" -an -loop 0 "fan-loop-v01.gif"
The filter documentation explains trim, setpts, fps, scale, split, palettegen and paletteuse. Here one branch generates the palette; the other uses it. 480:-1 keeps the proportional height for the chosen width. For a source already narrower than 480 pixels, choose a smaller width instead of enlarging it unnecessarily.
The GIF muxer documentation defines -loop 0 as indefinite looping; -loop -1 requests no loop. -an excludes audio. The main command reference documents -n, which stops if the output already exists. Use a new version name when adjusting settings.
For a 1920×1080 square-pixel source, crop=1080:1080:420:0 selects a centred square. Use it only when that square keeps the action, and place it before fps and scale in this example. Other source dimensions need their own valid rectangle.
Make a large GIF more useful
Open the actual GIF and check its file size. If it is too large for the destination, shorten unnecessary time first, then compare a smaller width or a lower frame rate. Change one choice at a time so you can see which trade-off helped.
Three seconds at 12 fps suggests roughly 36 frames, but the actual exported timing and frame count should be checked in the file. The GIF format uses centisecond timing, so nominal frame rate is not a promise that every delay has an identical duration. There is no reliable file-size formula based only on length and width: picture detail, changing pixels and palette choices matter too.
For dense motion, small text or photographic gradients, compare keeping a short MP4 rather than forcing GIF into the placement. Select the format that communicates the action within the destination’s actual limits.
Check playback, color and transparency
If the GIF appears static, open it in a viewer that supports animation and check the actual output rather than its thumbnail. If nothing was exported, confirm that the selected interval exists, the input has a video stream and the output filename does not already exist.
A palette reduces the available colors; gradients or complex textures can show visible changes. Dithering trades color patterning against appearance, so inspect the actual export before trying more advanced palette settings. Transparency also needs suitable source information: conversion does not remove a background automatically. FFmpeg’s palette-use alpha threshold maps transparency to fully opaque or fully transparent pixels, rather than preserving arbitrary soft transparency.
Finally, watch several restarts at the intended display size. The viewer should recognize the action, follow its middle and understand the return. Keep the GIF with its source filename and selected range so a later edit can reproduce the same moment.
Explore CutNow when the work starts earlier—with finding and shaping useful moments in existing footage.