Back to list
Image5 min readUpdated 11/2/2026

How to Convert Video to GIF: Complete Guide

Learn how to convert MP4, MOV, and other video files to high-quality GIF animations with optimization tips.

By webgyver

Why Convert Videos to GIF?

GIF animations auto-play and are compatible everywhere. They play instantly without a separate player on social media, messaging apps, emails, and web pages. This is why GIFs are still widely used for short reaction images, product demos, and tutorial clips.

Videos are large and can face compatibility issues across different playback environments. GIFs, on the other hand, are lightweight and universal, often more efficient than video for sharing short scenes.

GIF conversion is particularly useful when showing specific sections of screen recordings in technical documentation, sharing funny moments on Slack or Discord, or including animated images in email newsletters.

Essential Settings for GIF Conversion

FPS (frame rate) determines GIF smoothness and file size. Standard videos run at 24-30fps, but GIFs look natural enough at 10-15fps. Cutting fps in half nearly halves the file size.

Resolution should match the intended use. 480px width for web use, 320px for social media sharing is usually sufficient. Converting a 1080p video directly to GIF produces an enormous file of dozens of MB.

Segment selection is key to GIF quality. Shorter is better for GIFs. 3-5 seconds is ideal, and exceeding 10 seconds causes rapid file size increase. The secret to a good GIF is precisely trimming to just the essential moment.

Conversion Characteristics by Video Format

MP4 is the most widely used video format with H.264 codec. Most GIF conversion tools natively support MP4, offering the highest conversion compatibility.

MOV is primarily used on Apple devices. iPhone recordings are often in MOV format, and some tools have limited MOV support. TheWebGyver's converter uses FFmpeg WebAssembly, providing full MOV support.

WebM is Google's web-optimized format. Videos downloaded from YouTube may be in WebM format, which can also be converted to GIF. Regardless of format, the key is that higher quality source video produces better conversion results.

GIF File Size Optimization Strategies

Reducing the color palette is the most effective approach. GIF supports up to 256 colors, but simple screen recordings work fine with 64-128 colors. Halving the colors reduces file size by 20-30%.

Remove unnecessary frames. Skipping frames in low-motion sections reduces file size without visual difference. In most cases, keeping every 2-3 frames still looks smooth.

Pre-trimming and resizing the video before conversion is also effective. Smaller source files convert faster and make final GIF quality management easier.

Converting Video to GIF with TheWebGyver

TheWebGyver's video to GIF converter uses FFmpeg WebAssembly to process directly in the browser. Video files are never uploaded to servers, so you can safely convert personal videos.

Segment selection, FPS adjustment, resolution change, and quality settings are all handled on one screen. Real-time preview lets you adjust settings while checking results, making it easy to create GIFs with the desired quality and size.

Once conversion is complete, you can download immediately or copy to clipboard. Without installing any software, you can convert videos to GIF anytime, anywhere with just a web browser.

If It Goes on a Web Page, Video Beats GIF

Before converting to GIF, ask where the result will be used. The web.dev article on replacing animated GIFs with video shows one animation as a 3.7 MB GIF, a 551 KB MP4 and a 341 KB WebM, and explains that converting large GIFs to videos can save users a great deal of bandwidth. Lighthouse also has an audit, titled Use video formats for animated content, that flags such GIFs.

To make a video behave like a GIF, give the video element the autoplay, loop, muted and playsinline attributes together. Chrome's autoplay policy documentation says muted autoplay is always allowed, while autoplay with sound requires conditions such as the user having interacted with the site. If the video stands in for a GIF, do not forget muted.

web.dev advises offering both WebM and MP4. Browsers do not pick the optimal source; they use the first playable one in the list, so to prefer WebM you must list it first among the source elements. FFmpeg can do the conversion, and the article gives example commands: libx264 with the yuv420p pixel format and crf 25 for MP4, and vp9 with crf 41 for WebM. It also warns that libx264 needs even dimensions, so odd sizes must be adjusted with a crop filter.

On the other hand, for places that only accept images or where you cannot add code, such as email, documents and chat, GIF is still the practical choice. In the end, where the result will be placed decides the format.

The GIF Time Unit and Counting Frames

The GIF specification sets how long a frame is shown in hundredths of a second. Frame rates that divide evenly into that unit include 10 fps (delay 10), 20 fps (delay 5), 25 fps (delay 4) and 50 fps (delay 2). 15 fps, by contrast, works out to about 6.67 per frame and 30 fps to about 3.33, which cannot be expressed as whole numbers. Rounding 6.67 up to 7 gives about 14.3 fps, and rounding down to 6 gives about 16.7 fps, so the real playback speed can differ slightly from the setting. Tools handle this differently, so it is worth checking the duration of the result.

The frame count is the segment length in seconds multiplied by fps. Three seconds at 10 fps is 30 frames, five seconds at 15 fps is 75 frames, and ten seconds at 15 fps is 150. At the same 15 fps, doubling the segment doubles the frames, so the earlier advice to stay at 3-5 seconds is really about managing frame count. TheWebGyver's converter can convert up to 60 seconds, but that is a limit, not a recommended length.

FFmpeg has a palettegen filter that builds a palette suited to a video and a paletteuse filter that reduces colors with it. According to FFmpeg's built-in help, palettegen takes a maximum color count from 2 to 256 (default 256) and a statistics mode of full, diff (only the part that differs from the previous frame) or single (per frame), while paletteuse defaults to sierra2_4a dithering and also offers others such as bayer. In other words, even with the same color count, how the palette is built and how dithering is applied can change the resulting quality.

Scenarios: Which Videos Suit GIF

Take a screen recording that demonstrates software. A video of a nearly flat-colored UI where only some regions change has few colors and small changing areas, which fits the structure of GIF well. Choose the resolution at the point where text is still legible; shrink too far and the file gets smaller but the menu names become unreadable.

Videos with people, landscapes or many gradients are different. MDN warns that converting full-color images to GIF can produce unsatisfactory dithering. Such clips are both large and disappointing in quality, so if the destination allows it, using MP4 or WebM directly is better. The same goes when you need sound: GIF is an image format and cannot carry audio.

After conversion, check three things. First, confirm that the file size fits the limit of the place you will upload to; limits differ by service, so verify them yourself. Second, look at the point where the last scene loops back to the first and see whether it feels awkward. Third, compare the playback speed with the original. TheWebGyver's converter lets you change the segment, fps and width on one screen while checking the preview, and supports uploads up to 100 MB, so you can adjust the settings and compare these three points.

References

Try It Yourself

Experience what you learned in this article with Video to GIF Converter.

Video to GIF Converter