20 Replies Latest reply on Jun 24, 2009 6:15 PM by AttaBoy2

    Video in video

    dokterdr

      I would like to load a video into a video at certain cue points along the main video.  Does anyone know how to do that?

        • 1. Re: Video in video
          kglad Adobe Community Professional & MVP

          what do you mean?

          • 2. Re: Video in video
            marieg15

            This sounds like a process that could easily be accomplished using windows movie maker or similar software with video editing.

            If video is imported into existing movie maker project and the storyboard method is used, then new video could be incorporated anyplace you want by splitting first video and dragging portion of second video where 1st video was split. Hope I've explained this clearly, it is my first response ever to any forum. I am certainly no expert, so please correct me if this solution is ridiculous. Good luck, I know there is an expert out there with the right answer.

            • 3. Re: Video in video
              AttaBoy2 Level 4

              If you mean load a small video so it overlays a corner of the other video I thing a simple addChild could handle that.

              • 4. Re: Video in video
                dokterdr Level 1
                • 5. Re: Video in video
                  dokterdr Level 1
                  • 6. Re: Video in video
                    dokterdr Level 1
                    • 7. Re: Video in video
                      dokterdr Level 1

                      In Flash you mean?  And how do you make the link to the small video?  Use

                      cue points?

                       

                      *******************************

                      Christina Dokter, PhD

                      Clerkship Curriculum Coordinator

                      A322E East Fee Hall

                      Michigan State University

                      517-432-5424 (office)

                      517-303-3646 (cell)

                       

                      • 8. Re: Video in video
                        AttaBoy2 Level 4

                        If your actionscript version is 3 you should see this video http://www.lynda.com/home/DisplayCourse.aspx?lpk2=347 I think it will help you. I'd offer more specific advice but when I took the Advanced Actionscript course I stopped after completeing chapter 7 and the one on video is the last chapter ch8.  Now that you reminded me of cue points I think I'll go ahead and finish the course as I have video questions of my own.  If you haven't solved you issue by the time I'm done (probably a day or 2 I'l try to help you then. If you use as2 I can't help much as I never learned it well.

                         

                         

                         

                        *************************************

                        Jim East

                        Out of Work Bum

                        Department of Dog Entertainment

                        University of Hard Knocks

                        Boulder Creek, CA.

                        • 9. Re: Video in video
                          AttaBoy2 Level 4

                          I went through the tutorial I mentioned last time.  It showed how to use cue points to co closed captioning and how to seek from 1 cue point to another.

                          I used On2 flix Pro to convert an AVI to FLV and to add cue points when I was adding cue points I noticed it had the abality to add parameters and url's but the help file offered no hint ad to how.  If you saw the tutorial you saw that the metadata object can dispatch an onCuePoint event so it would be in the function that you write to handle that event that you could include code to do whatever it is you're trying to do.  I'm still unclear what you're trying to do.  If you literally mena video in video then you'll need to use some video editing software like Adobe Premiere or the Microsoft software mentioned in one of the other replies.

                          • 10. Re: Video in video
                            dokterdr Level 1

                            If you look at this link:

                            http://webcampus.drexelmed.edu/interactive/headache/module_01_migraine/text/

                            index.htm

                             

                            You will see that as the video plays, menu items show up on the right side.

                            When you click the menu item, a video plays on top of the original video.  I

                            am trying to figure out how to do this.

                             

                            Christina

                            • 11. Re: Video in video
                              AttaBoy2 Level 4

                              Ok now I get it.  I think.  You have a video with cue points.  At the cue points you want the video to pause and another video to overlay the first video until that video finishes at which time the overlay disappears and the original resumes.  Is that correct?  What version of actionscript do you use?  Your  flv file was it compressed from an AVI?  If so there is free software for editing avi's  you could just splice your AVI and insert your other video(assuming you have an avi version of that) otherwise you run a function that pauses the video then you addChild(the other video) and on COMPLETE you have your onComplete handler close and remove the new video as well ad any associated event handlers then resume the first video.  It all sounds pretty straightforeward and simple and I sure with experience it is, but as they say the devil is in the details.  My experience with with cue points goes back one day, my experience with AS3 goes back 3 months and 2 days.  If I weren't so busy trying to get a business started I'd offer to do it myself.  As I said my experience is limited so even if I did it I don't know how long it would take.  Hopefully someone with a little more experience will read this and offer an exact solution.  In any case if you do go the flash route someone will to need to know what version Actionscript you use.  Good Luck

                              • 12. Re: Video in video
                                dokterdr Level 1

                                I have Flash CS3 and Flash 8.  I have not started on this project.  The

                                video overlay should not play until the menu link to the overlay is clicked.

                                So, I am presuming you put the menu items on the cue points and then how

                                does the video come in?  That's where I am confused.

                                 

                                *******************************

                                Christina Dokter, PhD

                                Clerkship Curriculum Coordinator

                                A322E East Fee Hall

                                Michigan State University

                                517-432-5424 (office)

                                517-303-3646 (cell)

                                 

                                • 13. Re: Video in video
                                  kglad Adobe Community Professional & MVP

                                  christina, edit your last message and remove your telephone numbers.

                                  • 14. Re: Video in video
                                    AttaBoy2 Level 4

                                    If you're going to be using a CLICK event then you don't need cue points at

                                    all.  It's starting to look more doable.  If you use CS3 and select

                                    actionscript 3 I can help.  I'll make you an example video.  The only part I

                                    might find challenging is that feathering effect the curved shape.

                                    • 15. Re: Video in video
                                      AttaBoy2 Level 4

                                      Christine here's a very simple example

                                      http://www.cybermountainwebservices.com/client0/picNpic/


                                      here's the code:

                                       

                                      import fl.controls.ComboBox;
                                      import fl.video.*;
                                      import flash.filters.*;

                                       

                                      var duration:Number;
                                      var connection:NetConnection = new NetConnection();
                                      var connection1:NetConnection = new NetConnection();
                                      var stream:NetStream;
                                      var stream1:NetStream;
                                      var md_obj:Object = new Object();
                                      var md_obj1:Object = new Object();

                                       

                                      var dsObject:DropShadowFilter = new DropShadowFilter();
                                      var bvlObject:BevelFilter = new BevelFilter();

                                       

                                      var vidContainer:MovieClip = new MovieClip();

                                       

                                      var vid:Video = new Video(320,240);
                                      var vid1:Video = new Video(200,150);

                                       

                                      var one_btn:One = new One();
                                      var two_btn:Two = new Two();
                                      var three_btn:Three = new Three();

                                       

                                      one_btn.addEventListener(MouseEvent.CLICK, onOne);
                                      two_btn.addEventListener(MouseEvent.CLICK, onTwo);
                                      three_btn.addEventListener(MouseEvent.CLICK, onThree);

                                       


                                      one_btn.x = stage.stageWidth * .75;
                                      one_btn.y = 50;
                                      two_btn.x = stage.stageWidth * .75;
                                      two_btn.y = 75;
                                      three_btn.x = stage.stageWidth * .75;
                                      three_btn.y = 100;

                                       

                                      one_btn.filters = [dsObject, bvlObject];
                                      two_btn.filters = [dsObject, bvlObject];
                                      three_btn.filters = [dsObject, bvlObject];

                                       

                                      addChild(one_btn);
                                      addChild(two_btn);
                                      addChild(three_btn);

                                       

                                      connection.connect(null);

                                       

                                      stream = new NetStream(connection);

                                       

                                      vid.attachNetStream(stream);
                                      vid1.attachNetStream(stream1);

                                       

                                      md_obj1.onMetaData = onMetaData;
                                      md_obj.onMetaData = onMetaData;
                                      stream.client = md_obj;
                                      //stream1.client = md_obj1;

                                       

                                      stream.play("http://jimslounge.com/publicDomain/plan9FromOuterSpace.flv");

                                       


                                      vidContainer.x = 25;
                                      vidContainer.y = 25;
                                      addChild(vidContainer);
                                      vidContainer.addChild(vid);

                                       

                                      function onMetaData(info:Object):void
                                      {
                                      // trace("metadata: duration=" + info.duration + " width=" + info.width + " height=" + info.height + " framerate=" + info.framerate);

                                       

                                      // set the duration so we can check completion status
                                      duration=info.duration;
                                      }

                                       

                                      function onOne(e:MouseEvent):void {
                                          vid1.x = vid.x + 100;
                                          vid1.y = vid.y + 100;
                                          vid1.width = vid.width - 100;
                                          vid1.height = vid.height - 100;
                                         
                                          stream.pause();
                                      //    stream1.play("BnBshortSnd.flv");
                                          connection1.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                                          connection1.connect(null);
                                          vidContainer.addChild(vid1);
                                      }

                                       

                                      function netStatusHandler(event:NetStatusEvent):void
                                      {
                                      switch (event.info.code)
                                      {
                                          case "NetConnection.Connect.Success":
                                           stream1 = new NetStream(connection1);
                                           stream1.play("BnBshortSnd.flv");
                                           stream1.client = this;
                                           startPoll();
                                           vid1.attachNetStream(stream1);
                                           break;
                                      }
                                      }

                                       

                                      var poll:Timer;

                                       

                                      function startPoll():void
                                      {
                                      poll=new Timer(500);
                                      poll.addEventListener(TimerEvent.TIMER, pollHandler);
                                      poll.start();
                                      }

                                       

                                      function stopPoll()
                                      {
                                      if(poll==null){return;}
                                      poll.stop();
                                      poll.removeEventListener(TimerEvent.TIMER, pollHandler);
                                      }
                                      function pollHandler(event:TimerEvent)
                                      {
                                      // trace(stream1.time, "of", duration);
                                      if(stream1.time >= Math.floor(duration))
                                      {
                                          stopPoll();
                                         
                                      //    dispatchEvent(new Event(Event.COMPLETE));
                                          stream1.close();
                                          vidContainer.removeChild(vid1);
                                          connection1.removeEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                                          stream.resume();
                                      }
                                      }

                                       


                                      function onTwo(e:MouseEvent):void {
                                          stream1.close();
                                          vidContainer.removeChild(vid1);
                                          stream.resume();
                                      }
                                      function onThree(e:MouseEvent):void {
                                      }

                                       

                                      button ONE will pause the main video, insert a small one unload itself on completion and resume the main video.  button two just unloads the small vid.

                                      • 16. Re: Video in video
                                        dokterdr Level 1

                                        Thanks very much. Do you work for adobe?  Is this why you are helping me? 

                                         

                                        What if I want the clickable links to appear as the video is playing.  So,

                                        when the doctor is talking, the menu item appears and in the second video,

                                        the doctor explains what's happening in the first movie.

                                         

                                        Christina

                                        • 17. Re: Video in video
                                          AttaBoy2 Level 4

                                          I suppose you want a menu of videos and as each video is selected a menu of secondary videos appears as in the example you showed.  That shouldn't be too dificult.  Will I do it?........mmmm..maybe.

                                          I don't work for Adobe.  I don't work at all, or to be more exact I work but recieve no monitary compensation.  I'm piss poor in layman's terms.  I help people when I can because I'm a nice guy and beyond that it's like a self imposed internship for me.  When I reach a point where I can complete projects like yours in fairly short order then I'll be ready to compete for contracts on the internet.  Your project is really well suited for me.  For one it involves video which is something I like working with.  For another it's challenging but not too challenging so if you're not in a big rush I'll keep working on it. :-)

                                          • 18. Re: Video in video
                                            dokterdr Level 1

                                            So are you one of those young geeks hooked on Flash?

                                             

                                            CD

                                            • 19. Re: Video in video
                                              AttaBoy2 Level 4

                                              No it's been a few decades since I was young. :-)

                                              • 20. Re: Video in video
                                                AttaBoy2 Level 4

                                                I have an updated version but it's now coded properly it doesn't stand up to a stress test.  The cue points bring up a Textfield and button.  When you press the button a comentary video is launched I could've done a list of buttons as easily.

                                                http://www.cybermountainwebservices.com/client0/Vid1/