Restricting the changing part of an animated GIF
Posted: 2014-05-15T17:50:08-07:00
I have some gameplay footage that I want to turn into an animated GIF. I've done this successfully, but I'd like to optimize it.
I've tried the techniques in http://www.imagemagick.org/Usage/video/, and the ordered dither and -layers Optimize methods both produce significant optimization but not very acceptable results.
The background doesn't really change, but being the nature of gameplay footage, it appears to change to ImageMagick in subtle ways that mess with optimization. What I'd like to do is to find some way to make static everything but the small area in the center that does change. On a single frame basis, I could layer the first image over each other frame, using a mask to make the center area transparent.
My question is, can this be done without generating intermediate images that have to be stored on disk? That is to all in one fell swoop:
Generate the unchanging part by using mask to make the center area transparent (if the mask can be generated on the fly too, that would be awesome)
Step through each of the *.png images, layering the unchanging part over the frame.
Assembling the results into an animated gif, with whatever optimization takes advantage of the now unchanging parts of each frame.
I've tried the techniques in http://www.imagemagick.org/Usage/video/, and the ordered dither and -layers Optimize methods both produce significant optimization but not very acceptable results.
The background doesn't really change, but being the nature of gameplay footage, it appears to change to ImageMagick in subtle ways that mess with optimization. What I'd like to do is to find some way to make static everything but the small area in the center that does change. On a single frame basis, I could layer the first image over each other frame, using a mask to make the center area transparent.
My question is, can this be done without generating intermediate images that have to be stored on disk? That is to all in one fell swoop:
Generate the unchanging part by using mask to make the center area transparent (if the mask can be generated on the fly too, that would be awesome)
Step through each of the *.png images, layering the unchanging part over the frame.
Assembling the results into an animated gif, with whatever optimization takes advantage of the now unchanging parts of each frame.