[FFmpeg-devel] FAQ item on GIF demux

Reimar Döffinger Reimar.Doeffinger
Sat Nov 3 10:56:22 CET 2007


Hello,
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[0] GIF 164x104 164x104+0+0 PseudoClass 256c 1mb 20358.035u 1:08
> ALCHIMIE7_89.GIF[1] GIF 160x16 164x104+2+86 PseudoClass 256c 1mb 20355.665u 1:08
> ALCHIMIE7_89.GIF[2] GIF 160x100 164x104+2+2 PseudoClass 256c 1mb 20355.151u 1:08
> ALCHIMIE7_89.GIF[3] GIF 158x84 164x104+4+2 PseudoClass 256c 1mb 20352.767u 1:08
> ALCHIMIE7_89.GIF[4] GIF 155x83 164x104+7+2 PseudoClass 256c 1mb 20350.854u 1:08
> ALCHIMIE7_89.GIF[5] 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.

Greetings,
Reimar D?ffinger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071103/37541903/attachment.pgp>



More information about the ffmpeg-devel mailing list