[FFmpeg-devel] FAQ item on GIF demux
Sat Nov 3 12:01:38 CET 2007
On Sat, Nov 03, 2007 at 10:56:22AM +0100, Reimar D?ffinger wrote:
> On Fri, Nov 02, 2007 at 11:12:20PM +0100, Fran?ois Revol wrote:
> > I tried to convert an animated GIF file today, but the result was quite bad.
> > Checking the file with identify (ImageMagick) gave something like:
> > ALCHIMIE7_89.GIF GIF 164x104 164x104+0+0 PseudoClass 256c 1mb 20358.035u 1:08
> > ALCHIMIE7_89.GIF GIF 160x16 164x104+2+86 PseudoClass 256c 1mb 20355.665u 1:08
> > ALCHIMIE7_89.GIF GIF 160x100 164x104+2+2 PseudoClass 256c 1mb 20355.151u 1:08
> > ALCHIMIE7_89.GIF GIF 158x84 164x104+4+2 PseudoClass 256c 1mb 20352.767u 1:08
> > ALCHIMIE7_89.GIF GIF 155x83 164x104+7+2 PseudoClass 256c 1mb 20350.854u 1:08
> > ALCHIMIE7_89.GIF GIF 157x90 164x104+4+2 PseudoClass 256c 1mb 20348.928u 1:08
> > It turned out the file used delta-like images which ffmpeg doesn't handle.
> > It seems ImageMagick itself has difficulties processing this kind of files
> > directly.
> > Google came out with a nice workaround:
> > http://wiki.flux-cms.org/display/BLOG/Resizing+animated+GIFs+with+ImageMagick?focusedCommentId=4390991
> > Using convert -coalesce merges the deltas to each image (=makes them all
> > keyframes).
> > It could be a nice addition to the FAQ:
> > "I tried to convert a GIF animation, the first frame looks good but next
> > ones look inverted or distorted."
> > Could also fix the demuxer but it's probably not worth the pain.
> Btw. for those who really need it, MPlayer/Mencoder should be able to
> handle them all, if not I'd like to hear about it.
> And anyone who wants to improve ffmpeg: feel free to take anything from
> MPlayer's demux_gif.c that _I_ wrote and that is helpful and put it under
> LGPL for this.
I've looked at it and I'm quite sure it's transparency handling problem.
Transparency colour for subsequent images is really skipped pixels I believe.
> Reimar D?ffinger
More information about the ffmpeg-devel