GNOME Bugzilla – Bug 503249
Add GIF support
Last modified: 2007-12-17 20:38:16 UTC
Hi, the attached patch adds GIF support to gst-ffmpeg. This allows encoding a video to a GIF animation and decoding GIF animations (and single pictures). As gdkpixbufdec only allows decoding the first picture of a GIF animation (at least I couldn't decode more than the first here) the rank should maybe be marginal+1 to be higher than gdkpixbufdec.
Created attachment 100824 [details] [review] ffmpeg-gif.diff
Created attachment 100826 [details] [review] ffmpeg-gif.diff With stride conversion for the muxer too.
I have a patch to make gdkpixbufdec decode gif animations, but haven't applied it because GdkPixbufLoader will decode the entire animation into raw RGB frames before returning the first frame, which works fine for small smiley animations, but will just blow up if you try to watch, say, screencasts created by byzanz. I hope the ffmpeg decoder is a bit smarter than that.
The ffmpeg decoder seems to decode it frame by frame.
works fine, please commit !
2007-12-17 Sebastian Dröge <slomo@circular-chaos.org> * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), (gst_ffmpeg_formatid_get_codecids), (gst_ffmpeg_get_codecid_longname): * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop), (gst_ffmpegdemux_register): * ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_collected), (gst_ffmpegmux_register): Add GIF (animations and single images) decoding and encoding support. Fixes #503249.