views:

215

answers:

3

How can I play two or more video files/streams in different windows with frame-level synchronism?

What tools, libraries or APIs could I use to do that?

By frame-level synchronism I mean that my solution must guarantee that each frame of each video file must be shown at the same time its corresponding frames (from the other files) are shown.

Eg:

            in sync         out of sync
Time     -+-+-+-+-+-+ ... +-+-+-+-+-+-+         
video 1   fr1 fr2 fr3     fr1  fr2  fr3
video 2   fr1 fr2 fr3 ...   fr2 fr3 fr4
video N   fr1 fr2 fr3      fr1   fr2  fr3
A: 

On OS X, the Core Video framework will do the job. Core Video's express purpose is to provide a link between QuickTime media (such as audio and video) and the Quartz compositing system with frame-level synchronization.

Barry Wark
A: 

Could you expand a little on what you mean by "frame-level synchronism"?

compiz does this when multiple videos are playing and you spin the desktop

opengl can render multiple videos simultaneously on the sides of a cube, etc

warren
+1  A: 

On windows it should be possible to create custom directshow filters/components to do this. We use c# and directshow.net to achieve something similar, however we do not yet have "true" frame synchronization and I am in fact searching for a solution as well. The caveat here is that you can not just use the default/provided directshow filters, I fear one would have to write some new filters or perhaps modify the base classes a bit.

Øystein E. Krog