Skip to content
dashutils

Video

How to Convert MP4 to GIF Without a Huge File (We Measured It)

We turned screen recordings into GIFs at different widths and frame rates: what makes a GIF big, the settings that keep it small, and when to send an MP4.

Photo of Muhammad AfanMuhammad Afan · · 5 min read

An 8-second clip as a 145 KB MP4 next to a 2.5 MB GIF of the same clip

Key takeaways

  • Width matters most. On our 8-second test clip, the GIF went from 1.2 MB at 320 pixels wide to 6 MB at 800 pixels, with everything else the same.
  • Frame rate only matters much when the whole picture moves. On a recording that pauses a lot, 15 fps was only 11% bigger than 8 fps. On one that scrolled constantly, 24 fps was two and a half times the size of 8 fps.
  • Trim before you convert. GIF has no real compression between frames, so every extra second costs roughly the same as the last.
  • The same clip as an MP4 was about 17 times smaller. If the place you're posting plays video, send the video.

GIFs are still the easiest way to show a short animation anywhere: README files, bug reports, docs, chats and email all display them without a player. The problem is size. A few seconds of video can turn into a 10 MB GIF that won't upload. Here's what drives the size, measured rather than guessed.

How we tested

We recorded two clips of a web page in a browser at 1280 × 720, the kind of screen recording people most often turn into GIFs:

  • Clip A, 8 seconds of constant motion: a page scrolling smoothly the whole time, so every frame is different.
  • Clip B, 16 seconds with pauses: the page loads, scrolls in steps, stops, then scrolls back. Much of the screen stays still between steps.

We converted each one with the same FFmpeg settings the MP4 to GIF converter uses: a colour palette built from the clip itself, then ordered dithering, at the converter's defaults of 480 pixels wide and 12 frames per second. Then we changed one setting at a time.

Width: the biggest lever

All at 12 fps.

Width Clip A (8 s, constant motion) Clip B (16 s, with pauses)
320 px 1.20 MB 0.92 MB
480 px (default) 2.47 MB 1.98 MB
640 px 3.96 MB 3.09 MB
800 px 6.04 MB 5.02 MB
Clip A as a GIF at 12 fps, by width
  • 320 px1.20 MB
  • 480 px2.47 MB
  • 640 px3.96 MB
  • 800 px6.04 MB

Every frame of a GIF is a full picture, so the size follows the number of pixels. Going from 480 to 800 pixels wide nearly triples the pixel count, and the files grew about two and a half times.

For screen recordings with text, 480 to 640 pixels is usually the sweet spot: wide enough to read menus and buttons, small enough to upload. Below 400 pixels, small text turns to mush.

Frame rate: depends on what's moving

All at 480 pixels wide.

Frame rate Clip A (constant motion) Clip B (with pauses)
8 fps 1.73 MB 1.78 MB
12 fps (default) 2.47 MB 1.98 MB
15 fps 3.08 MB 1.98 MB
24 fps 4.28 MB –

On Clip B, going from 8 to 15 fps added only 11%, and 12 and 15 fps came out the same size. When part of the screen stays still, FFmpeg only stores the pixels that changed in each frame, so extra frames of a still screen are nearly free.

On Clip A, where the whole page moves every frame, size rose steadily with the frame rate: 24 fps was about two and a half times 8 fps.

So:

  • Software demos, UI clicks, slides: frame rate barely affects size, so 12 fps for smoothness is fine.
  • Camera footage, gameplay, scrolling: every frame is new. Drop to 8 or 10 fps before you drop the width.

The MP4 is far smaller

Clip A as an H.264 MP4 at the same 480-pixel width came to 145 KB. The 480-pixel GIF was 2.47 MB, about 17 times larger.

145 KB

Clip A as a 480p MP4

2.47 MB

The same clip as a 480 px GIF

17×

How much bigger the GIF was

Video codecs store only what changes between frames, and they do it far more efficiently than GIF. GIF is also limited to 256 colours per frame, which is why gradients and photos look grainy.

So check whether you need a GIF at all. Discord, Slack, X, WhatsApp and most chat apps play short MP4s inline. X, for example, turns uploaded GIFs into video anyway. Keep GIF for places that only show images: GitHub READMEs and issues, documentation, email and some forums.

Step by step: a small GIF from a video

  1. Trim first. Open the video trimmer, or use the Start and End fields on the converter, and keep only the 2 to 6 seconds that show the point.
  2. Open the MP4 to GIF converter. For other formats, use MOV to GIF, WebM to GIF or the general video to GIF converter.
  3. Set the width. 480 px for chat and docs, 640 px if there's small text, 320 px for tiny reaction GIFs.
  4. Set the frame rate. Keep 12 fps for screen recordings; use 8 to 10 fps for footage with lots of movement.
  5. Convert, check the size shown, and adjust if it's over your limit. Lower the width first, then the frame rate, then shorten the clip.

The conversion runs in your browser, so the video isn't uploaded anywhere.

Common size limits

  • GitHub: images and GIFs attached to issues, pull requests and comments can be up to 10 MB.
  • Discord: 20 MB per file on the free plan (see our Discord compression guide).
  • Email: no fixed rule, but a GIF over 1 to 2 MB makes a message slow to load, especially on phones.

If you're just over a limit, lowering the width by one step usually fixes it. In our tests, going from 640 to 480 pixels cut the size by more than a third.

Frequently asked questions

Why is my GIF bigger than the video?

GIF compresses each frame on its own and only has 256 colours, while MP4 stores only the changes between frames. A GIF is often 10 to 20 times larger than the same clip as an MP4; ours was 17 times larger.

What's the best frame rate for a GIF?

12 fps looks smooth for most clips. For screen recordings with pauses, a higher rate costs almost nothing. For footage where everything moves, 8 to 10 fps keeps the size down without looking choppy.

How do I make a GIF smaller without making it blurry?

Shorten it first, then lower the frame rate, then the width. Cutting length and frame rate doesn't make anything blurry; only reducing the width does.

Can I turn a GIF back into an MP4?

Yes. The GIF to MP4 converter does it, and the MP4 is usually much smaller. It can't restore colours the GIF lost.

Does a GIF have sound?

No. GIF is an image format, so any audio in the video is dropped. If you need sound, share an MP4.

Photo of Muhammad Afan

Written by

Muhammad Afan

Founder & Software Engineer, DashUtils

Software engineer who builds and tests every tool on DashUtils. He writes the guides from conversions he runs himself, so the numbers you read are numbers he measured.

More guides

All guides