7 Replies Latest reply on May 16, 2011 10:43 AM by qpidity72

    Video advice

    qpidity72 Level 1

      Hi,

       

      I have a small video project which requires me to import into Flash, add credits and several other small timeline events, and then export as an SWF for publishing on a website. I started by following advice I've gleaned from various sources including Adobe, stating to avoid embedding the video directly into the SWF:

       

      "Embed in SWF is recommended only if the clip is short and has no audio as synchronization errors can occur with this method"

       

      So I started using the progressive download method, i.e. import into Flash using the "Load external video with playback component". Problem however is that it doesn't appear easy to incorporate timeline events. The video is approx 60 seconds with a filesize of 11MB.

       

      Should I change tack and embed into the SWF ? Can anyone advise best approach from experience ?

       

      Many thanks in advance.

        • 1. Re: Video advice
          qpidity72 Level 1

          Tried importing the video into the timeline and the result was quite poor. So have decided to stick to the progressive download method. There were a few graphics which I had needed to incorporate and managed to do that by using the timeline of the individual movie clips (knowing the duration of the video I was able to incorporate more or less where needed. Only problem is that using the seek bar seems to remove those elements at playback.

           

          Can anyone please help ?

           

          Many thanks in advance.

          • 2. Re: Video advice
            Darshan Rane Level 3

            I think you are trying to sync video with timeline elements

             

            There are cuepoints option in flv video, u can use that to trigger the elements.

             

            http://help.adobe.com/en_US/AdobeMediaEncoder/4.0/WSC039D82B-0C0E-4c53-BEBA-4C6C4B400160.h tml

             

            http://help.adobe.com/en_US/mediaencoder/cs/using/WS2bacbdf8d487e582-30a3408e12f8ee21458-7 fe6.html

             

             

            --

            http://www.darshanrane.com

            • 3. Re: Video advice
              qpidity72 Level 1

              Thanks so much for providing this info. I've read through the info contained in those links and now can see the benefit of using cue points, though I wonder if someone might be able to give me a few extra pointers in how best to set up.

               

              I've added 4 cue points using the adobe media encoder and have the video incorporated using the flv component.

               

              My rudimentary understanding is I need to add a listener to the flv to listen for the 4 cue points and then I could use each of these cue point events to trigger an animation on the stage.

               

              Would anyone be able to help me out with a quick example for CS4/AS3, if at say cuepoint one I wanted to fade in a movie clip?

               

              Many thanks in advance

              • 4. Re: Video advice
                adninjastrator Level 4

                Just wanted to make a quick comment about audio syncing for embedded video clips... while I rarely embed video directly into the main timeline, I have on occasion done so without any audio sync issues. The trick is to set the framerate of the Flash doc to exactly match the framerate that the video was originally shot at. So for example, if the video was shot at 29.97 frames per second, the Flash doc must be set at 29.97 also.

                There is further discussion and a sample timeline embedded video posted in this thread:

                http://forums.adobe.com/thread/851982?tstart=30

                As for using cue points, yes, it's a very good suggestion, one I've used a number of times (but as AS2). They can be a little picky about exactly how to access them... but keep at it, they work just great!

                Best wishes,

                Adninjastrator

                • 5. Re: Video advice
                  qpidity72 Level 1

                  I've progressed a little further but still in need of some help on this.

                   

                  My goal is to fade one movie clip in at the first cue point, fade it out on the second cue point, in again on the 3rd and out again on the 4th.

                   

                  So set up 2 functions for these events, one to fade the mc in and one to fade it out again.

                   

                  Then set up event listener to catch the cue points and also a function to execute the fadein and fadeout functions based on the cue point names.

                   

                  See code below - so far no joy at all. Strangely no error messages either. Can anyone advise what I've missed ??

                   

                  I added the 4 cue points using the adobe media encoder.

                   

                   

                  import caurina.transitions.*;

                  import fl.video.FLVPlayback;
                  import fl.video.VideoEvent;
                  import fl.video.MetadataEvent;

                   

                  //set up functions for credits fading in and out
                  mc_credit.alpha = 0;

                   

                  function fadeCreditIn():void
                  {
                  Tweener.addTween(mc_credit, {alpha:1, time:3, transition:"easeInOut" });
                     
                      }
                     
                  function fadeCreditOut():void
                  {
                  Tweener.addTween(mc_credit, {alpha:0, time:3, transition:"easeInOut" });
                     
                      }
                     
                  my_flv.addEventListener(MetadataEvent.CUE_POINT, cueFunction1);

                   

                  function cueFunction1(evt:MetadataEvent):void{

                   

                  if(evt.info.name == "01CreditIn")
                  { fadeCreditIn();}
                  if(evt.info.name=="01CreditOut")
                  { fadeCreditOut();}
                  if(evt.info.name == "01CreditIn")
                  { fadeCreditIn();}
                  if(evt.info.name=="01CreditOut")
                  { fadeCreditOut();}
                  }

                  • 6. Re: Video advice
                    adninjastrator Level 4

                    Have you tried adding a "trace" message to let you know when cue point is reached?

                    Have you tested the functions separately to varify that they work?

                    Also I wonder about using

                     

                    if(evt.info.name == "01CreditIn")

                    The .info part...

                     

                    Here's a working example that on a certain "event" type cue point, fires a trace message and then loads a second movie

                     

                    ns.onCuePoint = function(evt:Object){
                        trace(evt.name);
                        trace(evt.time);
                        if(evt.name == "play_vid1") {
                            trace("YO!Loading wide_holder!");
                            wide_holder.loadMovie("rm/images/black_bear.swf");
                        }

                        if(evt.name == "play_vid2") {
                      trace("YO!Loading standard_holder!");
                            standard_holder.loadMovie("rm/images/sqis.swf");
                        }
                    };

                     

                    Perhaps you can glean something from this.

                    Best wishes,

                    Adninjastrator

                    • 7. Re: Video advice
                      qpidity72 Level 1

                      Hi,

                       

                      I actually got this to work - issue was ( on closer inspection ) that I had linked the flv component to the f4v format and not the flv format of the video.

                       

                      Also yes, I did make an error with the naming of the second two cue points.

                       

                      All working now - thanks again for your help in pointing me in the right direction !