9 Replies Latest reply on Jan 20, 2012 10:49 AM by socalkev

    Black Frames at end of animated gifs

    socalkev Level 1

      When making banners using AE to convert 3-5 seconds of video to animated gifs, I have noticed that there are always black frames at the end which appear every time the banner is looped. However, these frames do not seem to appear if the output is swf files. Is there a way or source format to get around the black frames issue with animated gifs? I have not encountered this problem with other animated gif software I have used, but the quality of AE is better, other than this issue. Would really appreciate any help with this.

        • 1. Re: Black Frames at end of animated gifs
          Mylenium Most Valuable Participant

          But are they actualyl real frames? Have you verified them e.g. in Photoshop's animation panel? That would also be an easy way to remove them...

           

          Mylenium

          • 2. Re: Black Frames at end of animated gifs
            socalkev Level 1

            No, they are not in the actual video, nor does this problem appear when the export to swf option is selected. But every animated gif has a flash of black at the end before it loops, as if the adobe media encoder turns the last frames to black.

            • 3. Re: Black Frames at end of animated gifs
              Rick Gerard Adobe Community Professional & MVP

              Try this. You'll get much better results. Add your comp to the render cue or add your comp to the Adobe Media Encoder and select custom or PNG sequence from the options. Create a new folder for your png sequence and render away.

               

              Open Photoshop or Fireworks.

               

              Import the rendered sequence as an Image Sequence in Photoshop by selecting the first image and checking the box Import as Image sequence, or by selecting all of the rendered files in Fireworks and checking Import as animation.

               

              In Photoshop you can open the Animation window (Window>Animation) and set the duration for each frame. In Fireworks you open up the States tab and select all frames. Make any timing adjustments you want there.

               

              Then in Photoshop, use the save for web option or in Fireworks just Save As and select Animated Gif as the format.

               

              Your results will be so much better than using AE's render Cue to generate an animated gif that you won't believe it.

               

              One last note. If you're going to use Photoshop instead of Fireworks and you need transparency, you can render as an Animation Codec QuickTime with RGB+Alpha and Straight Alpha and open that .mov file up in Photoshop and save for web as an animated gif. That's what I usually do unless I specifically need functions and features only available in Fireworks because Fireworks doesn't see Alpha Channel info when it imports a .mov file.

               

              EDIT: AME doesn't have an export to animated gif format option that I know of. It kind of sounds like you're using AME to generate the animated gif. Am I wrong?

               

              Message was edited by: Rick Gerard

              • 4. Re: Black Frames at end of animated gifs
                Mylenium Most Valuable Participant

                That may simply be an issue with AME adding an extra frame at the end or not setting the duration per frame correctly. Anyway, this is something that most people prefer to do in other programs. Even re-saving your images from Photoshop via Save for Web without actualyl changing anything would probably fix the issue....

                 

                Mylenium

                • 5. Re: Black Frames at end of animated gifs
                  socalkev Level 1

                  Hello Rick,

                   

                     I am not sure if it is something new or not, but Adobe Media Encoder CS 5.5 has animated gif as the very first format option, at 320x 240 at 10 frames per second, with an option to customize. I was saving out of After Effects as a comp then using Media Encoder to make an animated gif. As I use actual video segments, and most gif making software will not import video, I was trying to use AE for this purpose, as it seems the newest Media Encoder supported this. I also do not own Photoshop, but did use your idea of making an image sequence to make a gif in another piece of software. Thank you for the advice.

                   

                  Hello Mylenium,

                   

                     I opened the animated gif that AME made in virtualdub and noticed that three black frames had been added to the end of the gif. It does seem the AME is adding black frames to the end. But it does not do this for the SWF file made for the same footage. Is there a way to report this to Adobe as a potential bug?

                  • 6. Re: Black Frames at end of animated gifs
                    Mylenium Most Valuable Participant

                    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

                     

                    Still, first investigate the matter thoroughly. You may simply introduce a framerate mismatch.

                     

                    Mylenium

                    • 7. Re: Black Frames at end of animated gifs
                      socalkev Level 1

                      Hello Mylenium,

                       

                         As I was using 29.97 video, then converting to 10 fps, I did a test with a wmv file already converted to 10 fps. The gif made by AME was better, but still had 2 black frames at the end, while the SWF file was 2 frames shorter with no black frames added and loops perfectly.

                      • 8. Re: Black Frames at end of animated gifs
                        Rick Gerard Adobe Community Professional & MVP

                        Just checked the Help files and AME does support animated gifs but only on Windows. Sorry I missed that.

                         

                        If you're getting black frames at the end then just adjust the out point in AME. You're probably seeing a frame rate mis match. You fix that in AE not AME.

                         

                        Useful Animated Gifs should have a very low number of frames and a low frame rate to be useful. 3 seconds at 29.97 fps is going to make a pretty big file size for a banner. Not seeing the project, but looking at the description I wondering if your comp is 29.97 fps but you're rendering your gifs at 15 fps or even lower. If that's the case the black frames at the end could easily be the result of some funky things going on with the gif rendering engine.

                         

                        I still stand by my suggestion of using a movie in Photoshop. Most of the animated gifs that I've created require different durations for different frames. I'll start with 5 frames at .1 seconds for a transition, then hold the 6th frame for 6 seconds, then transition to slide 2 with 1 more frames at .1 seconds, then h frame 17 for 6 seconds and 12 second animated gif with 17 frames. You can't do that with AME, You'd end up with an animated gif with 120 frames for the same thing.

                        • 9. Re: Black Frames at end of animated gifs
                          socalkev Level 1

                          Hello Rick,

                           

                              Your suggestion worked - I changed the outpoint by a few frames before saving the comp and AME made a perfect gif from it. I will just try and remember to add a few frames that I will cut off before saving. Thank you so much for the advice.