MPEG to GIF Converter

Turn an MPEG video into a silent looping GIF, right in your browser.

or drop files here

MP

MPEG Format

MPEG video

A file extension for MPEG-1 or MPEG-2 video and audio in an MPEG program stream. It was the standard for VCD and DVD video.

  • MPEG-1 or MPEG-2 video
  • MPEG program stream
  • Lossy compression
  • Legacy format
GI

GIF Format

Graphics Interchange Format

A raster image format introduced by CompuServe in 1987. It uses LZW compression, a palette of at most 256 colors per frame, and supports simple animation.

  • 256-color palette per frame
  • Lossless LZW compression
  • Animation
  • 1-bit transparency

How to convert MPEG to GIF

Follow these steps to convert MPEG to GIF online.

    1

    Choose your MPEG file, or several at once.

    2

    Wait while the converter turns each file into GIF.

    3

    Download each new GIF file. Your original file isn't changed.

What to know before converting MPEG to GIF

  • The GIF has no sound; only the pictures are kept.
  • It plays at 15 frames a second and loops forever.
  • Its longer side is at most 480 pixels, and a smaller video is not enlarged.
  • The page converts the whole video and has no trim control, so a long clip can give a very large GIF.
  • Colors come from a palette built from your clip, limited to 256 per frame.
  • Choose several MPEG files and each gives its own GIF.

About MPEG and GIF files

What is an MPEG file?

MPEG video takes its name from the Moving Picture Experts Group. The two usual endings are .mpeg and .mpg; the Library of Congress gives video/mpeg as the type. Television delivery was the original aim of MPEG-2, the version most people know, and DVDs adopted it afterward.

The MPEG systems layer arranges coded picture, sound and data into streams. One elementary stream carries a single coded media component, and packetized elementary streams cut each component into packets. An MPEG may be a full system stream or just raw video, and that matters to any reader choosing a demuxer.

Programs that open MPEG files

  • Windows, Mac and Linux: VLC media player accepts elementary, program and transport MPEG streams as input. ffplay, which ships with FFmpeg, plays MPEG through FFmpeg's decoders.
  • Mobile: on a phone, VLC for Android offers the decoding features found in the desktop version, and VLC for iOS handles local files through VLC's own playback engine.

MPEG and GIF compared

  • Names and types: .mpeg and .mpg go with video/mpeg, and .gif goes with image/gif.
  • Compression: MPEG is lossy, while a GIF compresses its images losslessly with LZW coding.
  • Color: every GIF image is limited to a 256-color palette. Transparency marks a single palette entry as clear, so there is no half-transparent pixel.
  • Display: every major browser displays a GIF.
  • Sound: a GIF stores pictures plus the pause after each one, so there is no audio track.
  • Timing: the delay between GIF images is set in hundredths of a second.
  • Origin: GIF was released by CompuServe in 1987. Its GIF89a revision of July 1990 introduced extension blocks for transparency, frame timing, comments and application data; the frame timing is what permits animation.
  • Licensing history: Unisys began charging license fees for LZW in 1994. The US patent ran out in 2003, and the European and Japanese ones in 2004.

Nearly everything changes. FFmpeg decodes the MPEG, deinterlaces the frames the file marks as interlaced, samples 15 frames a second, fits the picture within 480 pixels with even sides, and makes two passes: the first builds a 256-color palette from your clip and the second paints the frames with it. The result loops forever. The sound is discarded, and the whole video is converted, however long it is. Choose several MPEG files and each one gives its own GIF.

Other ways to convert MPEG to GIF

  • FFmpeg, one command (Windows, Mac, Linux): run ffmpeg -i clip.mpeg animation.gif. FFmpeg's GIF muxer loops the result indefinitely by default, and it cannot make the delay between frames smaller than one centisecond.
  • FFmpeg, the opening seconds (Windows, Mac, Linux): run ffmpeg -t 5 -i clip.mpeg short.gif. With -t written ahead of -i, FFmpeg reads only the first five seconds of the input.
  • FFmpeg with a palette (Windows, Mac, Linux): the first command is ffmpeg -i clip.mpeg -vf palettegen colors.png, then ffmpeg -i clip.mpeg -i colors.png -lavfi paletteuse animation.gif. The first command generates one palette for the whole video, and the second uses it to downsample the stream. This is the two-pass route the page follows, without its scaling and frame rate settings.

FFmpeg is the route when you want only a section of a longer video, since this page cannot trim.

Problems with MPEG files

  • Nothing plays: an MPEG file can be a full system stream or bare video, and working out which kind it is tells you which demuxer to use. VLC reads elementary, program and transport streams.
  • You hear nothing in the source: sound needs its own decoder in addition to the picture's, since sharing one file does not give them a shared codec. The GIF made here is silent regardless, because the page discards the sound.
  • The file is cut short or damaged: this page can still convert it. FFmpeg logs the error and writes what it could read, so the GIF is shorter.
  • Moving edges comb in the GIF: footage that is interlaced but unmarked gets no deinterlacing here, because only marked frames are filtered. An editor that deinterlaces should handle it beforehand.
  • Soft or blocky pictures: lossy MPEG encoding cannot keep every detail of the uncompressed picture, and a GIF cannot bring it back.

Frequently Asked Questions

Everything you need to know about our converter

How do I convert an MPEG to a GIF?

How big is the GIF?

What frame rate does the GIF use?

Does the GIF have sound?

Does the GIF loop?

Can I choose which part of the video becomes the GIF?

Why is my GIF so large?

Why do the colors look banded or spotted?

What if my MPEG is damaged or cut short?

What happens to an interlaced MPEG?