3 Replies Latest reply on Jul 4, 2007 12:06 PM by Newsgroup_User

    Synchronizing 2 simultainious videos

    ArtKohn
      Our current project needs to simultaneously present two videos and keep them synchronized. We are using ActionScript 3 and we use one controller (play, pause, stop, hSlider). Our controller is able to start, pause and stop the two videos just fine. They start simultaneously, but as they are playing, the two videos fall out of sync.

      There does not seem to be anything systematic about the loss of sync. That is, sometimes video 1 gets ahead, other times video 2 gets ahead. This loss of sync can be anywhere from 1 frame of video up to more than a full second of video.

      Both videos are running at 15 FPS and have the same key frames. (In fact, the loss of sync occurs even when we are running the identical video in the two VideoDisplays.)

      We will appreciate any suggestions about keeping these two videos synchronized while playing.

        • 1. Re: Synchronizing 2 simultainious videos
          Level 7
          There is no practical way to synch two independent movieClips, let alone
          two video clips. You are decompressing the files at runtime. The amount
          of work that the computer has to do is directly proportional to the
          amount of data that is in the files.

          Using a third party compressor, like Squeeze, you can set a data rate
          for the finished, compressed file. With a low enough data rate, you can
          usually get reliable playback of at least one .swf video or .flv video
          file. This is the same methodology that's used for compressing real
          video files like Quicktime.

          When you add a second file to be played simultaneously, you are more
          than doubling the amount of work to be done.

          With judicious use of a third party compressor you may be able to get
          acceptable playback on most computers, but there's no way to guarantee
          consistent results.

          If there is no sound in these videos, you might be able to lock step
          them by playing each frame by frame, but that may make the process worse.

          One sure solution is to re-edit the two original files into one video
          and then save that out as an .swf or .flv.
          • 2. Re: Synchronizing 2 simultainious videos
            ArtKohn Level 1
            Rob,
            Thanks for your reply. But...
            I understand your idea that you can't sync FLVs because of thier variable decompressing rates. However, I have seen web sites where the programmers were able to keep two flv videos in sync. For example, in the Pirates of the Caribbean promo site ( http://www.ilm.com/theshow/) they are able to sync up two flv videos. In turn, the user can look through the foreground video (which contains the special effects) and see the background video which contains only the original footage.
            Any ideas how they might have done this?
            • 3. Re: Synchronizing 2 simultainious videos
              Level 7
              Sure, they're not in synch. At least on my computer. They're close but I
              can see differences in movement in the "Davy Jones" clip in the
              "Experience" section of the site. I'm guessing that's the section that
              you're referring to.

              One of the tricks used on sites like this, is to use very short shots.
              At every cut there's an opportunity to resynch the two clips. Since each
              one, in this example, has the same number of frames, the clips can be
              re-set at each cut frame.