How to convert a GIF to MP4 on a Mac and make it far smaller
To convert a GIF to MP4 on a Mac with nothing installed, build a three-step shortcut in the Shortcuts app around the Make Video from GIF action. For more control, use ffmpeg in Terminal, or drop the GIF into Manatee and pick MP4 as the target. Whichever you choose, the video is usually a fraction of the GIF’s size, because video formats store motion far more efficiently than GIF can.
Why bother converting a GIF
A GIF is a stack of complete pictures, each limited to 256 colors. An MP4 stores one full picture now and then, and describes the frames in between as changes from the one before. For anything with movement in it, that difference is enormous. Why a GIF is bigger than the video it came from goes through the reasons.
It matters in three common situations:
- An upload form or chat rejects the GIF for being over its size limit.
- A web page loads slowly because one animation outweighs everything else on it.
- You want to pause, scrub, or step through the animation, which a GIF does not allow and a video player does.
Option 1: the Shortcuts app
- Open Shortcuts and click the plus button to start a new shortcut.
- Search the action list for Select File and add it.
- Search for Make Video from GIF and add it underneath. Click the arrow on the action to show its Loop setting, which controls how many times the animation plays through in the video.
- Add Save File as the last action.
- Click the run button, choose the GIF, and choose where to save the result.
Shortcuts decides the details for you: there is no control over quality, dimensions, or frame rate. Check the extension of the file it saves. If the destination insists on MP4 and you got a different container, how to convert MOV to MP4 on a Mac covers that last step.
One thing that does not work is Preview. It opens a GIF as a list of separate frames, and exporting from there gives you a still image, not a video.
Option 2: ffmpeg in Terminal
If ffmpeg is installed, one command does it:
ffmpeg -i clip.gif -movflags +faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" clip.mp4
Each part is there for a reason.
-pix_fmt yuv420pchooses the color layout that QuickTime Player, phones, and TVs expect. Leave it out and the MP4 may play in a browser and nowhere else.- The
scalefilter rounds the width and height down to even numbers, which that color layout requires. A GIF that is 501 pixels wide would otherwise fail to encode. -movflags +faststartputs the index at the front of the file, so a web page can start playing before the whole video has downloaded.
Option 3: Manatee
If you would rather not build a shortcut or type a command, Manatee converts a GIF to MP4 from a window.
- Open Manatee and choose Convert.
- Drop the GIF in, or a folder of them. Dragging onto the menu bar icon works too.
- Pick MP4 (or MOV) as the target.
The video is written as a new file beside the GIF, and the GIF is never modified. Nothing is uploaded: the conversion runs on your Mac with the engine bundled in the app. Manatee is free for 24 hours with every feature, then $9 once.
Two honest limits. Manatee is not a video editor, so it will not trim the animation, crop it, or change its speed. And if the MP4 is still over a limit, that is a job for Shrink mode, which takes a size in MB and finds the quality that fits.
What does not survive the conversion
- Looping. A GIF repeats because of a flag inside the file. An MP4 has no such flag, so the player or the web page decides. On a web page, the video needs the right attributes to behave like a GIF:
<video autoplay loop muted playsinline src="clip.mp4"></video>. - Transparency. A GIF can have see-through areas. A standard MP4 cannot, so those areas become a solid background color. If the animation sits on top of other content, keep the GIF.
- Being an image. Some places accept images only: a signature block, an image field in a form, a document that will not embed video. An MP4 will not go there.
- The original colors. These were already gone. Turning footage into a GIF squeezed it to 256 colors and often added a speckled dither pattern. The MP4 reproduces that degraded picture faithfully; it does not restore what the GIF threw away.
Sound is the one thing you cannot lose, because a GIF never had any. The MP4 will be silent.
When to keep the GIF
Keep it when the destination needs an image file, when the animation relies on transparency, or when it is a few frames of flat color (a blinking cursor, a simple icon) and already only a few kilobytes. In that last case the MP4 may not be much smaller, and the GIF works in more places.
For everything else, especially anything filmed with a camera or recorded from a screen, the MP4 is the better file to send. If you still have the video the GIF was made from, use that instead of converting the GIF, since it has the full color and detail. Going the other way is covered in how to convert a video to GIF on a Mac.
Questions
Will the MP4 loop like the GIF did? Only if the player is told to loop. QuickTime Player has View, Loop, and web pages use the loop attribute. Many chat apps loop short silent videos by themselves, but that is their choice, not something stored in the file.
The MP4 plays in my browser but not in QuickTime Player. Why?
It was almost certainly encoded with a color layout QuickTime Player does not support, which is what ffmpeg picks for a GIF unless you add -pix_fmt yuv420p. Convert again from the GIF with that option.
Can I turn the MP4 back into a GIF later? Yes, but each trip costs quality, because the colors are reduced to a palette again. Keep the original GIF if you think you will need it.
Does converting change the speed of the animation? It should not. Each GIF frame can carry its own delay, and a converter turns those delays into video timing. If the result looks faster or slower, compare it against the GIF in Quick Look (select it in Finder and press Space), which plays the animation at its stored speed.