26 Replies Latest reply on May 18, 2017 12:39 AM by Focusfilm.at

    Dropping Frame Rate

    Focusfilm.at Level 1

      Hi everyone, i have a test Project, its the very first Project i am doing in Animate or Flash and i have issues with dropping Frame Rates and therefor a few questions:

       

      my project contains three movie clip symbols, each with 100 Frames of flv Video Clips, and buttons to switch the Opacity from one clip to another, for instance, when i click btn1, clip 1 fades to 100% Opacity while clip 2 and clip 3 fade to 0% Opacity. In other words: there is, most of the time, only one clip visible at once, sometimes two, when visibility fades from one clip to the next.

       

      When i test my SWF with cmd+ENTER, i am experiencing serious lag. I am aware, that Animate is built to work with vectors and that playing multiple layers of video with alpha needs processing power, but i would like to get this to work nonetheless...

       

      Question 1: is there a way, when testing my project with cmd+enter, to monitor the actual frame rate, my swf is running with? I didn't find it...

       

      Question 2: has anyone general suggestions on what i can do to increase performance and stabilise frame rate? Especially when working with bitmap movie clips? I tried, decreasing Project Resolution, decreasing flv clip resolution even more and blowing it up to Project resolution, decreasing project frame rate, setting clip.visibility == false, when a clip is at 0% opacity... Some of these improved things a little bit, but i am not happy...

       

      Qestion 3: when i first hit cmd+enter, the frame rate is nearly ok, but the longer the swf plays, the worse it gets. I don't understand why, because the same 100 frames are just looping over and over again...has anyone experienced this before?

       

      Thanks in advance and kind regards,

       

      PS: Frame Rate 25 FPS, Project resolution: 2048x1536 (Native iPad Air 2), Animate CC 2017.2, OSX 10.10.5

        • 1. Re: Dropping Frame Rate
          ClayUUID Adobe Community Professional

          Playing multiple video clips simultaneously is, in general, a terrible idea. At the very least you should be pausing the ones that aren't currently visible.

          • 2. Re: Dropping Frame Rate
            Focusfilm.at Level 1

            Thanks, I'll try that

            • 3. Re: Dropping Frame Rate
              Focusfilm.at Level 1

              Do you think, that instead if using flv clips, using PNGs and converting every PNG frame to vector by "trace bitmap" could help? and do you know if i could keep transparency when working this way?

              • 4. Re: Dropping Frame Rate
                ClayUUID Adobe Community Professional

                Umm... have you seen what trace bitmap does to photographic images?

                • 5. Re: Dropping Frame Rate
                  Colin Holgate MVP & Adobe Community Professional

                  One thought, there isn't any video source that would make sense to have as FLV at 2048x1536. Try having the video at 1024x768 or 640x480, and scale the movieclip up to fill the iPad Retina screen. That ought to perform better.

                   

                  Also, go for a lower data rate in the FLV if you can. The higher the data rate to more demanding it is.

                  • 6. Re: Dropping Frame Rate
                    Focusfilm.at Level 1

                    Clay...image tracing in Animate is kind of bad, you're right, but tracing in Illustrator with the "high fidelity photo" preset makes a vector image that looks exactly like the bitmap version. only thing is that my transparcy seems to be gone, in Animate transparancy is still there however...

                    • 7. Re: Dropping Frame Rate
                      Focusfilm.at Level 1

                      Colin... i tried scaling the content to a ridiculously small size...didn't help enough...the data rate thing i'll try though, thanks!!

                      • 8. Re: Dropping Frame Rate
                        ClayUUID Adobe Community Professional

                        If you do a trace bitmap at sufficient resolution that it looks like the original bitmap, you've just created a vector image with tens of thousands of lines. I shouldn't have to point out that that would a) consume far more memory than a raw bitmap, and b) render very slowly.

                        • 9. Re: Dropping Frame Rate
                          Focusfilm.at Level 1

                          Thanks for your help though, its much appreciated!

                          • 10. Re: Dropping Frame Rate
                            Focusfilm.at Level 1

                            Clay...You seem to know your way around Flash... do you, by any chance, have an answer to my Question #1? In After Effects (where i am coming from), it always tells you at what frame rate your sequence is playing back. Anything similar in animate when testing with cmd+enter? Or with some other swf player perhaps? Thanks

                            • 11. Re: Dropping Frame Rate
                              ClayUUID Adobe Community Professional

                              There is no frame rate benchmarking built in to Animate. You'll have to roll your own. Googling for "as3 calculate frame rate" yields many hits, like this one:

                              https://code.tutsplus.com/tutorials/quick-tip-how-to-build-a-frame-rate-counter-in-actions cript-30--active-3479

                               

                              You haven't mentioned what native resolution your FLVs are.

                              • 12. Re: Dropping Frame Rate
                                Colin Holgate MVP & Adobe Community Professional

                                Part of my question and answer from him implied that the FLV was 2048x1536, but that he has tried at smaller sizes and scaled them up, and it didn't help.

                                • 13. Re: Dropping Frame Rate
                                  ClayUUID Adobe Community Professional

                                  All other things considered, I'd tend to assume he meant he scaled the video within Animate, not that he natively rescaled the video file itself.

                                  • 14. Re: Dropping Frame Rate
                                    Focusfilm.at Level 1

                                    Thanks for your advice concerning frame rate benchmarking and for the link you provided.

                                     

                                    Sorry if i didn't communicate the resolution right, english is not my native language, but i prefer the english speaking community because its bigger and more knowledgeable imo...

                                     

                                    I first had the project (or i believe its called scene in animate) at native ipad resolution as well as my content.

                                    Then i tried decreasing Project resolution, and learned that apparently it does not make a big difference because after i hit cmd+enter i can scale the window with the animation while its running. When the window is smaller, the animation performs better, but changing the project resolution does only effect the "initial" size of the animation window (coming from AE, i expected everything to be pixelated when i scale the animation window up, because i thought that the content would be compiled with a smaller resolution)

                                     

                                    After that, i tried, just to see if it makes much difference, outputting the flv clips itself from AME CS6 with an 8th of native iPad res and reimporting to Animate. Scaled them to project res. Didn't make enough difference.

                                     

                                    Today i will try a few things, if they don't work, i will have to find another, vector based, approach to this project. I would like to keep this thread open for a while longer, then i will mark clays answer as the correct one for providing info on the frame rate benchmarking. But many thanks to you too, colin, for trying to help!

                                    • 15. Re: Dropping Frame Rate
                                      Focusfilm.at Level 1

                                      If someone would take a look at my .fla, i would be forever thankful...:)

                                       

                                      Dropbox - Test25.fla

                                       

                                      This is very weird (for me, as i said, i am a novice, i hope it is obvious to you):

                                       

                                      I paused all three movie clips on start: still the same problem

                                       

                                      When i click one of the three buttons in the middlefor the first time, everything works as intended. Every time i click a button again, performance gets worse. it seems to really depend on how often you click the buttons, not how long the animation is running.

                                       

                                      when you click a button, before the clip is fully opaque, everything becomes transparent, but that is another problem...

                                       

                                      This is probably due to bad code, but i cant find my mistake because sadly, i am not very good at coding yet.

                                       

                                      Anyways, if someone has time to look at it, i would greatly appreciate it...

                                      • 16. Re: Dropping Frame Rate
                                        Colin Holgate MVP & Adobe Community Professional

                                        Lots to tell you...

                                         

                                        The FLVs are 1920x1080, at 4 mbps, which means it's not testing either of our suggestions (use smaller video and use lower datarate). As you are using 16:9 that would mean trying say a 640x360 or a 960x540 version of the video. And try less than 1 mbps for datarate.

                                         

                                        It would be far less demanding if you had a grayscale FLV and just changed the tint of it. That way you wouldn't have to fade to black first, you could fade from any color to any other color. The code for doing tinting isn't trivial, but not too terrible either.

                                         

                                        While you are fading to black first there isn't any need to play the two FLVs that are currently not visible. You could get the time of the just faded out video, stop that one, and start another one at the same timecode.

                                         

                                        But like I suggested, learning how to tint one FLV would give you the best performance, especially if you could lower the datarate, and possibly the video size.

                                        1 person found this helpful
                                        • 17. Re: Dropping Frame Rate
                                          Focusfilm.at Level 1

                                          Thanks so much for looking at my file! I will try everything you suggest, especially using a grayscale video and tinting it, i didn't know this was possible.

                                           

                                          What i still not get though is why performance decreases with every click...when you first click any of the buttons, the first fade looks decent enough...

                                           

                                          Anyways i really appreciate you taking the time to help me, i am learning so much with this project... 

                                          • 18. Re: Dropping Frame Rate
                                            Colin Holgate MVP & Adobe Community Professional

                                            I think it may be because you only clear the listeners if alpha reaches 1. If you clicked sooner there would be multiple listeners going on.

                                             

                                            You could look into using tweens:

                                             

                                            Tween - Adobe ActionScript® 3 (AS3 Flash) API Reference

                                             

                                            with those you wouldn't need an enterframe script.

                                             

                                            BTW, you don't seem to ever set initializer to true, which may contribute to getting too many listeners.

                                            1 person found this helpful
                                            • 19. Re: Dropping Frame Rate
                                              Focusfilm.at Level 1

                                              Ok, i thought it would be something like the listeners. i just found out that alpha can go beyond 0 and 1 as well... completely new world for me... anyway i can't stress enough how thankful am for your help. Have a nice WE, kind regards

                                              • 20. Re: Dropping Frame Rate
                                                ClayUUID Adobe Community Professional

                                                What? The only meaningful alpha values are 0 to 1. Anything outside that range is a bug.

                                                1 person found this helpful
                                                • 21. Re: Dropping Frame Rate
                                                  Focusfilm.at Level 1

                                                  Really? Yesterday i did a test (not the one i posted but a later one). let alpha decrease/increase by 0.1 every frame for 10 frames when i hit a button. i did trace(clip.alpha) and some values are -2.5216531 or something and i have to hit the button several times for the clip to become opaque again.

                                                  • 22. Re: Dropping Frame Rate
                                                    Focusfilm.at Level 1

                                                    hey colin, in AME CS6 i can only find a setting for bitrate, not data rate. do you mean that? just exported a clip with 732 kb/s Bit rate...

                                                    • 23. Re: Dropping Frame Rate
                                                      Colin Holgate MVP & Adobe Community Professional

                                                      I will think about whether bitrate is more correct than datarate, but I'm sure you did the right setting. 700kbps is a good setting to try.

                                                      • 24. Re: Dropping Frame Rate
                                                        Colin Holgate MVP & Adobe Community Professional

                                                        Can you post another FLA that shows the alpha symptom you described?

                                                        1 person found this helpful
                                                        • 25. Re: Dropping Frame Rate
                                                          ClayUUID Adobe Community Professional

                                                          I'm guessing he had alpha become negative from duplicated event listeners decrementing it too many times.

                                                          2 people found this helpful
                                                          • 26. Re: Dropping Frame Rate
                                                            Focusfilm.at Level 1

                                                            Hey Colin, sorry, i was away for a few days. Thanks for offering to look at another fla of mine. I will send you a PM, as i don't want to post the current state of the project publicly without altering it.