Video to GIF Converter
Trim a video down to the good bit, and save it as a GIF or a shorter clip.
Loading…
About the Video to GIF converter
Drop in a video, drag the two handles to the part you want, and save it — as a GIF, or as a shorter video with the sound still on it.
Nothing is uploaded. The file is read straight off your disk into the page and every frame is drawn and packed on your own machine, which is why there is no size limit, no queue and no watermark.
Why a GIF of a video is so enormous
GIF is from 1987 and it never learned to compare one frame with the next. Every frame is stored complete and on its own, where a video codec stores one frame properly and then only what changed between it and the next. That single difference is why the same five seconds can be three hundred kilobytes as a video and eight megabytes as a GIF.
It also allows only 256 colours in a frame, and a frame of video has tens of thousands. Everything that makes a GIF look like a GIF — banded skies, blotchy skin, muddy shadows — comes from that limit rather than from the compression.
Choosing the 256 colours
Which 256 is most of the work. A fixed palette dividing the colour cube evenly wastes most of its entries on shades that never appear in your clip, and gives only a handful to the range that does.
The method used here is median cut. Every colour in the clip starts in one box; the box covering the widest range of any single channel is sorted along that channel and split at the middle; repeat until there are as many boxes as palette entries. Splitting at the median rather than the midpoint is what makes it adapt — a box holding a thousand near-identical greens and two reds splits between the greens, because that is where the eye will actually see the difference.
What dithering is for
Rounding each pixel to the nearest available colour makes smooth gradients collapse into visible bands, because a whole region of slightly different blues all round to the same blue. Dithering pushes each rounding error on to the neighbouring pixels not yet visited, so it averages out across an area instead of accumulating.
The trade is real and worth knowing: skies and skin improve considerably, and the fine speckle it leaves behind compresses much worse than a flat area, so the file grows. On footage with large smooth areas it is usually worth it; on busy handheld video it mostly just adds bytes.
The three controls, in order of effect
Width matters most by a wide margin, because it costs area: halving the width quarters the number of pixels and roughly quarters the file. If a GIF is too big, this is the control to reach for first.
Frames a second costs length, in direct proportion — twelve is smooth enough for almost anything and half the size of twenty-four. Colours cost the least of the three, but dropping from 256 to 64 is often invisible on video and still helps. Trimming a second off the clip is worth more than all of them.
How the frames are collected
By seeking to each moment and waiting for the picture to actually arrive, rather than playing the clip and grabbing whatever happens to be on screen. Playing is far easier to write, and it has three problems: it takes exactly as long as the clip, it drops frames whenever the tab is busy, and the spacing comes out uneven.
That last one matters more than it sounds, because a GIF stores a delay against every individual frame. A dropped frame does not make the animation shorter, it makes it stutter — and a viewer notices a stutter immediately even when they could not say what was wrong.
Saving a clip instead
If the sound matters, or the clip is more than a few seconds, a video is the better answer in every way: smaller, sharper, full colour, and it keeps the audio. The trim is the same — the same two handles — and the selection is saved as a video file.
That one does run in real time, because it plays the selection and records the output. Five seconds of clip takes five seconds. It is the honest cost of not loading a whole video encoder into a web page, and it buys a result with none of the compromises a GIF forces.
Frequently asked questions
Is there a file size limit?
None imposed. The video is read from your disk rather than uploaded, so the practical limit is your own machine. Long clips make very large GIFs, though, and the page estimates the size before you commit to it.
Is my video uploaded anywhere?
No. It never leaves the page. That is the main reason to use this rather than a site that asks you to upload first, especially for anything personal or unreleased.
Why is there no watermark?
Because there is no server to pay for. The conversion happens on your computer, so there is nothing to recover the cost of.
My GIF is far too big. What should I change?
The width, first and by a long way — it costs area, so halving it quarters the file. Then the length, then the frame rate, and lastly the number of colours. Sixty-four colours is often indistinguishable from 256 on video footage.
Does the GIF keep the sound?
No, and it cannot — the format has no provision for audio at all. If you need the sound, save it as a video clip instead.
Why does saving a clip take as long as the clip?
It is recorded by playing the selection and capturing the output, in real time. Doing it faster would mean shipping a full video encoder into the page, which would be a large download for every visitor to a tool most of them use once.