I need to convert many small .mpg files to .gif files. I prefer freeware but pay-for-it software, if not too too expensive but works really good, is also acceptable. Anyone know of really good software to do this type of conversion?

Dani AI

Generated

As observed, the “blobby” GIF output almost always comes from color-quantization: GIF frames use an indexed palette (up to 256 colors), so a naive converter that doesn’t build a tailored palette or enable dithering will map millions of source colors into a tiny set and produce banding. (loc.gov)

A robust, repeatable pipeline is a two-pass method that builds a palette from the clip and then applies it when encoding the GIF. The common ffmpeg pattern is shown below (pick fps and width to balance smoothness, size, and quality):

ffmpeg -i input.mpg -vf "fps=12,scale=480:-1:flags=lanczos,palettegen" palette.png

ffmpeg -i input.mpg -i palette.png -filter_complex "fps=12,scale=480:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=sierra2_4a" -loop 0 output.gif

Use palettegen=stats_mode=diff for clips with static backgrounds and try different paletteuse dither modes (sierra2_4a, floyd_steinberg, bayer) to see which looks best. See the ffmpeg filters docs for options and details. (ffmpeg.org)

For many files, automation is useful. A simple bash loop (or a PowerShell/batch equivalent on Windows) will run the two-step per file; after that, run an optimizer to cut file size:

for f in *.mpg; do
  base="${f%.*}"
  ffmpeg -i "$f" -vf "fps=12,scale=480:-1:flags=lanczos,palettegen" "${base}_palette.png"
  ffmpeg -i "$f" -i "${base}_palette.png" -filter_complex "fps=12,scale=480:-1:flags=lanczos[x];[x][1:v]paletteuse" -loop 0 "${base}.gif"
  gifsicle -O3 --colors 128 "${base}.gif" -o "${base}.opt.gif"
done

Gifsicle is a solid optimizer for post-processing animated GIFs. (lcdf.org)

If capture-to-GIF is preferred (avoids an extra conversion step), consider lightweight recorders that export GIF directly (they also include simple editors). For quick tests or one-offs, online tools can help as well. See ScreenToGif (GitHub) and LICEcap for direct recording. (github.com)

Quick notes: reduce fps and resolution for much smaller files; prefer dithering + palettegen over forcing “256 colors” in one pass; consider modern animated formats (WebP or MP4) if file-size and color fidelity matter.

Recommended Answers

All 6 Replies

I need to convert many small .mpg files to .gif files. I prefer freeware but pay-for-it software, if not too too expensive but works really good, is also acceptable. Anyone know of really good software to do this type of conversion?

You could try SUPER. It is a nice freeware that I used to use to create .gif avatars:

http://www.erightsoft.com/SUPER.html

Not sure if it is "professional" enough, but it did the job for me.

Cheers :)
PP

Photoshop and GIMP has the addons to convert such files. While I prefer doing it manually, if you already have either one, you just need to find a good add-ons. And what's good about it, it capture frame by frame and you can just delete any frame which is unnecessary before it would convert to full .gif format...

If you prefer auto conversion, Phillie has provided the link for you...

I've tried SUPER a half dozen times now, set the properties to do 256 colors, but the output file looks like it's only using 8 or maybe 16 colors, & it makes the output file images look like just blobs of color. Am I doing something wrong, there doesn't seem to be any help with the program?

Am I doing something wrong, there doesn't seem to be any help with the program?

I do not know - I've never had a problem, but I use an older version of SUPER and manipulate the .gifs with Animation Shop.

If this is something really important to you, you might want to step up to - The trial period ought to be enough to determine whether it'd be a good investment.


Cheers :)
PP

I'll try that & let y'all know. Here, though, is a different take on the same question: does anyone know of software that will capture video to .gif format? Would cut out the need to convert files.

I'll try that & let y'all know. Here, though, is a different take on the same question: does anyone know of software that will capture video to .gif format? Would cut out the need to convert files.

I think some of the AvlanDesign apps will do that. I know that they do snapshot capture....

PP:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.