# Video to GIF

> Video to GIF captures frames from a short clip with a canvas and encodes them as an animated GIF using the gifenc library, all in your browser. You choose the start, end, frame rate and width.

URL: https://atechcraft.com/video-to-gif/
Category: Media Tools
Last updated: 2026-12-01
Author: Abdul Moid Khan, ATechCraft

Runs in your browser. Your data never leaves your device.

## How to use the Video to GIF

1. Choose a video file (MP4, WebM or MOV your browser can play).
2. Set the start and end time, ideally a few seconds apart.
3. Choose frame rate and width and check the size estimate.
4. Click Create GIF, preview it and download.

## What does Video to GIF do?

Video to GIF turns a short part of a video into an animated GIF image. You choose a video from your device, set the start and end time, pick the frame rate and width, and the tool builds the GIF in your browser. It shows an estimated file size before you start and the real size afterwards. Your video is never uploaded.

GIFs play automatically and loop in almost every app and email client, which makes them useful for reaction clips, product demos and short tutorials.

## How does the conversion work?

Many online converters use ffmpeg on a server. This tool avoids uploads by working directly with your browser's video player:

1. Your video is loaded into a hidden `<video>` element. The browser decodes it, so any format your browser can play (MP4 with H.264, WebM, and MOV in Safari) works.
2. For each frame, the tool **seeks** the video to the exact time (start + frame number ÷ frame rate), waits for the frame to be ready, and draws it on a canvas at your chosen width.
3. GIF can only show **256 colours per frame**, so each frame is reduced to its best 256 colours with the open-source [gifenc](https://github.com/mattdesl/gifenc) library (MIT), which picks a palette and maps every pixel to the nearest colour.
4. gifenc writes the frames into a GIF89a file with a delay of 1000 ÷ fps milliseconds between frames, set to loop forever ([GIF89a specification](https://www.w3.org/Graphics/GIF/spec-gif89a.txt)).

## How big will my GIF be?

GIF compression (LZW) is simple, so file size grows quickly with three things:

*Size ≈ number of frames × width × height × bytes per pixel*

The tool's estimate uses about 0.5 bytes per pixel, a rough middle value. Simple content (flat graphics, screen recordings) compresses better; busy video (trees, crowds, camera shake) compresses worse.

| Settings for a 4-second clip | Frames | Pixels per frame | Estimated size |
| --- | --- | --- | --- |
| 480 × 270 at 15 fps | 60 | 129,600 | about 3.7 MB |
| 360 × 202 at 10 fps | 40 | 72,720 | about 1.4 MB |
| 240 × 135 at 10 fps | 40 | 32,400 | about 0.6 MB |

Halving the width quarters the number of pixels, which is why width is the most powerful setting.

## Worked example

You recorded a 45-second screen video of an app, and want to show a 3-second button animation in a chat.

1. Choose the video. The player appears.
2. Set **Start** to 12.0 s and **End** to 15.0 s (3 seconds).
3. Set **Frame rate** to 12 fps and **Width** to 360 px.
4. The tool shows: 36 frames, estimated size around 1.3 MB for a 16:9 video.
5. Click **Create GIF**. The progress bar fills as frames are captured. Preview and download.

## Tips

1. **Keep it short.** 2 to 6 seconds is ideal; the tool allows up to 30 seconds.
2. **10 to 15 fps is enough** for most clips. Video is usually 30 fps, but GIFs look fine at half that.
3. **Reduce width before frame rate.** 360 px is a good size for chats.
4. **Pick a steady clip.** Camera movement changes every pixel in every frame and makes files huge.
5. **For a still preview image**, check it with the [YouTube Thumbnail Checker](https://atechcraft.com/youtube-thumbnail-checker/), or compress a frame with the [Image Compressor](https://atechcraft.com/image-compressor/).
6. **Need the sound?** GIF has no audio. Cut the audio separately with the [Audio Trimmer](https://atechcraft.com/audio-trimmer/).

## Limitations

- **Colour banding:** 256 colours per frame can cause bands in skies and skin tones. This is a limit of the GIF format.
- **No audio**, ever.
- **Browser codec support:** if your browser cannot play the file (for example some HEVC or MKV files), it cannot be converted. Try MP4 (H.264) or WebM.
- **Speed:** seeking frame by frame is slower than real-time playback. A 5-second clip at 15 fps usually takes a few seconds; long, wide clips take longer.
- **Size estimate is rough**, as explained above.
- **Modern alternatives:** many sites now accept short MP4 or WebM loops, which are far smaller than GIF. Use GIF when you need it to work everywhere.

## Key terms

- **Frame rate (fps):** how many pictures are shown per second.
- **Palette:** the list of up to 256 colours a GIF frame can use.
- **Dithering:** mixing dots of available colours to fake missing ones.

## Frequently asked questions

### Why is my GIF so large?

GIF stores every frame with only 256 colours and simple compression. Size grows with width × height × frames. Halving the width cuts the size by about three quarters.

### How long can the clip be?

Up to 30 seconds, but 2 to 6 seconds works best. Longer GIFs get very large and slow to load.

### Is there sound in the GIF?

No. GIF is an image format and cannot contain audio.

### Is my video uploaded?

No. Frames are captured and encoded on your device.
