Skip to main content
Participant
July 4, 2007
Question

Synchronizing 2 simultainious videos

  • July 4, 2007
  • 1 reply
  • 316 views
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.

This topic has been closed for replies.

1 reply

Inspiring
July 4, 2007
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.
ArtKohnAuthor
Participant
July 4, 2007
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?