Guide · GIF

Making a GIF from a video: size, frame rate and quality

By NREX Group · Published · Sources last checked: · 12 min read
Drafted with AI assistance and checked against the sources listed at the end.

Illustration on a navy background of a browser window with a video-camera outline, a glowing film strip winding out of it toward a square button that carries a circular refresh-arrows icon.

An animated GIF is a stack of small pictures with a delay between them, and its size follows from three choices: how many pictures, how many pixels in each, and how hard each one is to compress. Two three-second clips with the same dimensions and frame count came out at 34 KiB and 2.1 MiB in testing, a 64-fold difference that no setting explains. This guide goes through the format well enough to predict that, measures the settings that do matter, and covers when WebP or a short video is the better container.

How a GIF is built

CompuServe introduced GIF in 1987 as a compressed graphics format.[2] Each pixel is a single 8-bit value that indexes a of 24-bit colors, so a frame can use at most 256 colors; a color table has 2 to the power of (N + 1) entries, where N is a three-bit field, so 256 at most.[1, 2] The indexes are then squeezed with variable-length , which turns repeated runs into table codes of up to 12 bits and is lossless.[1]

Nothing in that design predicts one frame from another. Each frame is its own image. What the format does allow is a frame that covers only a rectangle (an image descriptor carries its own left, top, width and height), together with one palette index marked transparent, which leaves the pixels beneath untouched.[1] That lets an encoder store only the part that changed, and FFmpeg’s documentation describes its option for this as a GIF cropping and offsetting mechanism.[8] Whether it is used is up to the encoder. The one behind the GoConvertFiles GIF tools writes every frame at full size with one shared palette, and the measurements below use that encoder.

The last piece is timing. A frame’s delay is stored in hundredths of a second (the standard’s unit), which is why not every frame rate can be represented exactly.[1]

Where the bytes go

Before compression a frame costs one byte per pixel. A 480 × 270 frame is 129,600 bytes of indexes, and 30 of them (3 seconds at 10 fps) are 3,888,000 bytes, 3.7 MiB. LZW then shrinks that by an amount that depends entirely on how repetitive the picture is.

Grainy pan, 3 seconds, 256 colors: GIF size by width and frame rate. MiB = 1,048,576 bytes.
Size (16:9)Frame rateFramesGIF bytesGIF sizePer frame
320 × 1805 fps15542,439530 KiB35 KiB
320 × 18010 fps301,092,3821.04 MiB36 KiB
320 × 18015 fps451,616,2841.54 MiB35 KiB
480 × 2705 fps151,126,4051.07 MiB73 KiB
480 × 27010 fps302,231,3062.13 MiB73 KiB
480 × 27015 fps453,360,1683.20 MiB73 KiB
640 × 3605 fps151,795,2631.71 MiB117 KiB
640 × 36010 fps303,579,9653.41 MiB117 KiB
640 × 36015 fps455,318,5585.07 MiB115 KiB
GIF size by width and frame rate for a 3-second grainy clip320 px wide at 5 fps: 530 KiB. 320 px wide at 10 fps: 1.04 MiB. 320 px wide at 15 fps: 1.54 MiB. 480 px wide at 5 fps: 1.07 MiB. 480 px wide at 10 fps: 2.13 MiB. 480 px wide at 15 fps: 3.20 MiB. 640 px wide at 5 fps: 1.71 MiB. 640 px wide at 10 fps: 3.41 MiB. 640 px wide at 15 fps: 5.07 MiB.0.521.041.54320 px wide1.072.133.20480 px wide1.713.415.07640 px wide5 fps10 fps15 fpsMiB, 3 seconds
Figure 1. The same nine results as bars. Size rises in step with frame rate and with width.

Four things stand out in the measurements:

  • Per-frame cost is steady. At each width the cost of one frame barely moved with frame rate (about 35 KiB, 73 KiB and 116 KiB at 320, 480 and 640 px), so size is frames times that figure. Six seconds at 480 × 270 and 10 fps came to 4,482,300 bytes, 2.01 times the 3-second result.
  • Width acts through pixels. At 10 fps, 480 px has 2.25 times the pixels of 320 px and cost 2.04 times as much per frame; 640 px has 4 times the pixels and cost 3.28 times. Halving the width removes three quarters of the pixels in every frame.
  • Content is the big lever. The flat slide at 480 × 270 and 10 fps came to 34,970 bytes (34 KiB), against 2,231,306 for the grainy pan: 64 times smaller with identical dimensions and frame count. At 640 × 360 and 15 fps the flat slide was 73,769 bytes (72 KiB).
  • Flat content is cheap. The flat slide cost about 1.1 KiB per frame, so for recordings made of flat color, length and legibility weigh more than bytes.

Frame rate and length

turns into a delay in hundredths of a second. 5 fps is 20 hundredths and 10 fps is 10, both exact. 15 fps would be 6.67, which rounds to 7 and plays at 14.3 fps, so a 30-second clip lasts 31.5 seconds.[1] The video-to-GIF converters here cap a GIF at 450 frames, so the frame rate decides how long a clip fits: 90 seconds at 5 fps, 45 at 10 and 30 at 15, counted from the start of the video.

The tool pages describe 10 fps as smooth enough for menus, clicks and typing, 15 fps as costing half again as many frames and mainly useful for scrolling or animation, and 5 fps as suited to slow demonstrations. Those are judgement calls, and the measurements above show what each costs: 5 fps was a third of the 15 fps size at every width.

Length has a second cost that is not about bytes. Moving content that starts by itself, lasts more than five seconds and sits beside other content falls under WCAG 2.2 criterion 2.2.2, which asks for a way to pause, stop or hide it unless the movement is essential.[7] A GIF has no controls of its own; a video element can show them.

Memory is the third cost. Frames are captured before they are encoded, so they sit in memory at 4 bytes per pixel. A full 450 frames of a portrait 1080 × 1920 recording at 480 px wide (480 × 853) is about 737 MB, which is why a phone may stall before a desktop does. The Video to GIF page tabulates this for several shapes, and 10 seconds at 10 fps is about 22% of each figure.

Palette, dithering and color depth

is the bit budget per pixel. Three 8-bit channels give 24 bits and about 16.7 million colors; a GIF frame has an 8-bit index into a palette, so at most 256. A photograph or a sky gradient has far more distinct colors than that, and the encoder has to choose which 256 to keep.

Tools differ in how they choose and apply the palette. FFmpeg’s palettegen builds one palette for a whole video stream, and its paletteuse filter offers ordered (Bayer) dithering, several error-diffusion algorithms and no dithering at all.[8] mixes nearby palette colors in a pattern so the eye averages them; MDN notes it is generally used to simulate more than 256 colors.[2] It trades banding for grain, and the grain costs bytes: FFmpeg’s own note says that confining the dither to the rectangle that moves gives less moving noise and better GIF compression.[8]

The GIF tools on this site use a median-cut palette shared by all frames and no dithering. That adds no grain, which helps compression, but gradients such as sky or skin can band. Shrinking the palette is also a size lever, measured here on the grainy clip at 480 × 270, 10 fps, 3 seconds:

Grainy pan, 480 × 270, 10 fps, 3 seconds: size by palette size.
ColorsGIF bytesGIF sizeChange vs 256
2562,231,3062.13 MiBbaseline
1281,812,4611.73 MiB-18.8%
641,398,0931.33 MiB-37.3%
321,090,4251.04 MiB-51.1%

Halving the palette saved 19%, quartering it 37%, and going to 32 colors 51%. The saving is not free: each step merges more shades, and flat artwork gains less than noisy footage because it uses few colors to begin with.

Shrinking an existing GIF

GIF Compressor never drops frames. It decodes the GIF into full frames, optionally scales each, rebuilds one shared palette with fewer colors and writes it again with the original delays. The presets set two values: Best quality is 256 colors at 100%, Medium is 128 at 100%, High Compression is 64 at 75%. The 75% setting keeps about 56% of the pixels, and 50% keeps 25%. The tool page reports a synthetic 60-frame, 480 × 270 test animation at 2.8 MB with 256 colors, 1.6 MB with 64 colors and 1.0 MB at 50% scale, the same order of effect as measured above: scale removed more than the palette did.

Compress GIF to Size searches for a target. For each scale from 100% down to 10% in 10% steps it tries palettes of 256, 128, 64, 32, 16 and 8 colors and stops at the first file that fits, so the palette shrinks at full size before any pixels are removed. On a 36-frame 480 × 270 test GIF of 2,784,074 bytes:

Compress GIF to Size on a 2,784,074-byte test GIF, from the tool page.
TargetResultColorsScale
1 MB874,863 B16100%
512 KB501,162 B890%
200 KB160,944 B840%
100 KB82,369 B1620%
10 KB20,920 B, target missed810%

The last row shows the limit: at 10% scale and 8 colors the tool had nothing left to remove and reported a miss. Resize GIF is the plain version of the scale lever. It scales every frame with an averaging filter, keeps each frame’s delay and the loop count, and offers 128, 64 or 32 colors. It rebuilds from complete frames, so a GIF that was already well optimized can come out larger than the original when shrunk only a little.

When WebP or video is smaller

WebP supports animation, lossy and lossless frames and real per-pixel alpha; frame durations are in 1-millisecond units, and the specification notes that many tools and browsers assign a minimum duration similar to GIF’s.[3] Google’s page says animated WebP can provide reduced file sizes compared to GIF and APNG.[4] Support in current browsers is broad: Chrome from 32, Firefox from 65, Edge from 18, Safari from 14 on macOS 11 or later and from 16 everywhere.[5]

The result still depends on the content. GIF to WebP on a photographic 36-frame test GIF turned 2,784,074 bytes into 1,810,386 (35% smaller). On a flat 30-frame cartoon it turned 41,022 bytes into 55,222 (35% larger), probably because GIF’s lossless LZW is already efficient on flat color while WebP re-encodes frames as lossy pictures. Video to WebP makes the animation straight from a video: on a 5-second 1280 × 720 test clip (720 × 405 output, standard quality) it produced 415 KB at 5 fps, 831 KB at 10 fps and 1.25 MB at 15 fps, a grainy panning clip that is hard for a still-picture codec.

Video is the other alternative. web.dev’s guide gives one example: a 3.7 MB GIF against 551 KB as MP4 and 341 KB as WebM, and shows markup that imitates a GIF: autoplay loop muted playsinline.[6] The muted part matters, because modern browsers block autoplay of video with an unmuted audio track.[9] GIF to MP4 records a GIF into an MP4 in real time, capped at 30 seconds, and its size follows the bitrate: a 3-second loop at 6, 2.5 and 0.8 Mbps is 2.25, 0.94 and 0.30 MB, as targets rather than guarantees.

Where a destination accepts only a .gif file, none of that applies. Upload limits for specific platforms change and differ, so they are not listed here; the platform’s current help page is the place to check.

Worked example: a phone screen recording

Take a 10-second iPhone screen recording at 1080 × 1920. The MOV to GIF page lists the frame sizes it produces at 320, 480 and 640 px wide: 320 × 569, 480 × 853 and 640 × 1138. With three combinations of width and frame rate, the pixel counts differ by a factor of twelve.

Pixels in a 10-second recording at three settings, with a size bracket from the two measured clips (about 0.009 and 0.57 bytes per pixel).
SettingFramesTotal pixelsFlat endGrainy end
320 px, 5 fps509,104,00080 KiB4.98 MiB
480 px, 10 fps10040,944,000360 KiB22.4 MiB
640 px, 15 fps150109,248,000960 KiB59.8 MiB

The bracket is an extrapolation: the flat and grainy rates measured above applied to a different frame size, so it shows the range rather than predicting a result. A recording of an app interface sits near the flat end. Footage of scrolling photographs sits near the grainy end, where the largest setting reaches tens of megabytes. Across both clips the pattern was the same: frames times pixels times a content factor, with the first two under the converter’s control. The MP4 to GIF, WebM to GIF and AVI to GIF converters take the same settings. AVI is the odd one out: it is a container from the early 1990s that the browser may not be able to play at all, depending on the codec inside, so that page warns before converting.

Questions

Why is a GIF so much bigger than the video it was made from?

A GIF has no motion prediction: each frame is a separate palette image compressed on its own, and a frame can be limited to a changed rectangle only if the encoder does that. In one example in Google's web.dev guide, a 3.7 MB animated GIF became a 551 KB MP4 or a 341 KB WebM. One example is not a guarantee.[1, 6]

Which saves more: a lower frame rate or a smaller width?

Both scale file size directly. In the grainy 3-second test at 480 pixels wide, going from 15 to 5 fps cut the GIF from 3,360,168 to 1,126,405 bytes (a third). At 10 fps, going from 640 to 320 pixels wide cut it from 3,579,965 to 1,092,382 bytes (30.5%), which is more than the 25% of pixels that remain. Frame rate also changes how smooth the motion looks, and width changes how legible small text is.

Why does a 15 fps GIF play slightly slow?

A GIF stores each frame's delay in hundredths of a second. One fifteenth of a second is 6.67 hundredths and has to be a whole number, so it becomes 7, which is 14.3 frames per second. A 30-second clip then plays for 31.5 seconds. 5 and 10 fps divide evenly (20 and 10 hundredths) and stay exact.[1]

Why do gradients and skin tones look banded in a GIF?

A GIF frame can use at most 256 colors from a palette. A smooth gradient needs more steps than that, so neighbouring areas snap to the same color and form visible bands. Dithering hides the bands by mixing nearby palette colors in a pattern, at the cost of a speckled look and a larger file. The GoConvertFiles GIF tools use one shared palette and no dithering.[2, 8]

Is animated WebP always smaller than a GIF?

No. Google's WebP page says animated WebP can provide reduced file sizes compared to GIF, and a photographic 36-frame test GIF shrank by 35% (2,784,074 to 1,810,386 bytes). A flat 30-frame cartoon went the other way, from 41,022 to 55,222 bytes, 35% larger, because GIF's lossless compression is already efficient on flat color.[4]

Does a looping GIF on a web page need a pause control?

WCAG 2.2 success criterion 2.2.2 asks for a way to pause, stop or hide moving content that starts automatically, lasts more than five seconds and is shown alongside other content, unless the movement is essential. A GIF has no controls of its own, while a video element can show them. Under five seconds is outside that criterion.[7]

Sources

Every link below was opened and checked on November 8, 2026. The GIF sizes in this guide were measured on that date with the site’s own encoder; figures attributed to a tool page come from that page’s published tests.

  1. CompuServe, Graphics Interchange Format, Version 89a (hosted by W3C). Color tables sized 2 to the power of (field + 1), per-frame image descriptors with their own position and size, the transparency index, delay time in hundredths of a second, disposal methods, and variable-length LZW with codes of up to 12 bits. Accessed November 8, 2026.
  2. MDN, Image file type and format guide. GIF as lossless LZW on 8-bit indexed color, dithering to simulate more colors, animation as frames of the changed parts, and the guide’s comparison with WebP and AVIF. Accessed November 8, 2026.
  3. RFC 9649, WebP Image Format. WebP as lossy (VP8 intra-frame) and lossless compression with alpha and animation, and frame durations in 1-millisecond units. Accessed November 8, 2026.
  4. Google, WebP overview. Animated WebP described as able to provide reduced file sizes compared to GIF and APNG while supporting lossy, lossless and transparency. Accessed November 8, 2026.
  5. Can I use, WebP image format. Browser support for WebP, including animation: Chrome from 32, Firefox from 65, Edge from 18, Safari from 14 on macOS 11 or later and from 16 on every supported macOS, and iOS Safari from 14. Accessed November 8, 2026.
  6. web.dev, Replace animated GIFs with video for faster page loads. One example GIF of 3.7 MB against 551 KB as MP4 and 341 KB as WebM, and the autoplay, loop, muted, playsinline video markup that imitates a GIF. Accessed November 8, 2026.
  7. W3C, Understanding Success Criterion 2.2.2: Pause, Stop, Hide (WCAG 2.2). The requirement for a pause, stop or hide mechanism for auto-starting movement longer than five seconds. Accessed November 8, 2026.
  8. FFmpeg Filters Documentation, palettegen and paletteuse. One palette for a whole video stream, the dithering algorithms on offer, the bayer scale trade-off, and the note that confining dithering to the changing rectangle gives less moving noise and better GIF compression. Accessed November 8, 2026.
  9. MDN, The Video Embed element. The autoplay attribute and the rule that modern browsers block autoplay of video with an unmuted audio track. Accessed November 8, 2026.