We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Hello, I'm exporting a 20 second animation from After Effects using Media Encoder. It needs to be an animated gif file.
Ideally I want the animation to loop 3 times then remain on the last frame.
I've tried the technique of importing the completed animation as an MP4, layering it three times but this increases the file size.
The final gif can't be larger than 10mb.
Searched for a solution but most answers are geared to making the animation infinitely loop (should I be using the term 'cycle'?).
There must be some code I can put in place that asks the entire animation to play 3 times then stop on the final frame.
Please can anyone help?
You'll need coding/programming to make this work and the code/language you use will depend on the platform where the GIF will be displayed. IOW, there is no way for AE-AME to render a GIF animation with a specified number of loops - this is done at the delivery stage via coding/programming.
No, no code, no tricks. AE is simply the wrong tool for this. You need to use Photoshop's Animation features or for that matter any otehr halfway decent GIF-generation tool that allows to define the number of loops and hold frames.
Hi both, thanks for you replies. It's not possible for me to create this in photoshop as the frames exceed 500.
But it's good to know that I can't export a gif from AE (using media encoder) with specified loops - I had been experimenting with the Remapping, LoopOut(); expression but now I know this isn't going to work I'll stop pursuing that!
Unfortunately it's not possible to add code to the platform this will sit. This is a very old CMS system so limited that I can't even place an MP4 asset which is why I've had to resort to an animated gif file no larger than 10mb.
As I said the layering technique worked (with a freeze on last frame) but this made the file huge.
Thanks for your help!
I've noticed in the past that photoshop loads all your frames into ram when you're rendering and doesn't have a handler for overflow. So if you exceed your ram limit on an animation of length (say 500 frames) it just gives up on the render. So I don't think it's that 500 is an exact limit, just a limit on what tessap can render.
Just one more thing!!
At the moment if I export the animation as a gif via Encoder the gif just iinfinitely loops can I get it to play just once and freeze on the last frame - it doesn't seem to work when I set this up using the split layer - freeze on last frame technique.
Is that going back to the platform needs the code rather than the exported asset?
The number of loops, frame durations and hold frames are all defined in the GIF file itself by ways of tags. none of that is supported in AME or AE. You really need to mangle this through another editor, even if you just open the AE-created GIF file in GIFgun or other such tools and re-save it.
Certain platforms, like Facebook; and I'm sure other popular Social Media platforms will strip these GIF tags/codes. For FB, any GIF below 40 seconds (if I recall the duration correctly), will loop automatically and the loop will occur for a system-defined number of times until it reaches a system-defined total duration. For a org's Website, those tags will of course work as tagged and deployed.
GIF gun is garbage. Don't use it. I did not work for me. Set it to loop 2 times and it loops infinately still.
I believe you can set it to do that in Photoshop and you should be able to go beyond 500 frames in Photoshop's video timeline.