Discussion:
ffmpeg BMP-GIF Conversion Quality Question
(too old to reply)
mimus
2014-01-20 22:03:05 UTC
Permalink
I'm new to multimedia processing, and have been playing with Gstreamer
and ffmpeg (which seems to be an app implementing everything in Gstreamer—
LOL) lately, and in creating an animated GIF from a sequence of BMP
images using

ffmpeg -f image2 -framerate 11 -i 'example-%03d.bmp' -pix_fmt rgb24
example.gif

the image-quality went from mediocre (the BMPs were from an AVI, but good
enough as is) to near-solarized.

Is there any tweaking on-the-fly possible in such an ffmpeg command, or
should one do the BMP-to-GIF in a separate preliminary conversion first,
or what?

Are there any disembodied spirits still wandering disconsolately around
cgm that might have a tip on this?
--
.sigzip:*
Willi
2014-01-21 01:11:35 UTC
Permalink
Post by mimus
I'm new to multimedia processing, and have been playing with Gstreamer
and ffmpeg (which seems to be an app implementing everything in Gstreamer—
LOL) lately, and in creating an animated GIF from a sequence of BMP
images using
ffmpeg -f image2 -framerate 11 -i 'example-%03d.bmp' -pix_fmt rgb24
example.gif
the image-quality went from mediocre (the BMPs were from an AVI, but good
enough as is) to near-solarized.
Is there any tweaking on-the-fly possible in such an ffmpeg command, or
should one do the BMP-to-GIF in a separate preliminary conversion first,
or what?
Are there any disembodied spirits still wandering disconsolately around
cgm that might have a tip on this?
Do you know that a gif is limited to 256 colors? The problem could be
that your movie-clip has too many different scenes so that the program
has difficulties to deal with the limited color range. That could be the
reason that the animation gets worse and worse. You could try to convert
all images to grayscale, this would solve the color problem and lead to
a better result in the end - at least regarding the kind of
solarization-effect.

Ok, just a thought. I don't know anything about ffmpeg except that a
friend used it once to create a mpeg from an image sequence.
Miles Bader
2015-09-27 04:36:11 UTC
Permalink
As Willi mentions, there are fundamental limitations to GIF that make it
hard to get really high-quality output.

It sounds like ffmpeg is not really the best tool to use for this, but
you might be able to make it a bit better by e.g. tweaking the
dithering. You're probably never going to get something really
attractive though.

I did a google search for: ffmpeg options dither -audio

...which returned a few promising looking hits.

-miles
--
Dawn, n. When men of reason go to bed.
Loading...