Wed May 12 19:01:51 DST 2004
CMplayer is a patch for MPlayer which lets you synchronise several players running on several computers (hence the name, Cluster MPlayer; but I may change it in the future) connected to a dedicated LAN.
So, every host will load a movie from its internal storage media, and all of them will be played at the same speed, i.e., all of them will start at the same moment and after some time, all of them will have played the same number of frames at a fixed framerate.
Applications could be:
First, you need to get the system clocks of all of your computers synchronised. I'd sugest to use NTP for this purpose.
According to my experiments, using NTP, gettimeofday() returns differences below 40 ms; which is good enough for the usual 25 fps movies:
# sec:usec = 1069231417:653136 # sec:usec = 1069231417:653433 # sec:usec = 1069231417:656074 # sec:usec = 1069231417:653073 # sec:usec = 1069231417:653663 # sec:usec = 1069231417:653664
Then, you need a modified mplayer which can:
So, in short, cmplayer project patches mplayer so it will be able to behave this way.
We will use a computer as "master". This computer will take care of
master slave1 slave2 ... slaveN runs "cmplayers" runs remote mplayer --- rsh --> mplayer1 mplayer2 mplayerN | | | | v [cmplayers waits] <-- ["ready" tcp/ip packet ] | <----------------------- ["ready" tcp/ip packet ] | <------------- ["ready" tcp/ip packet ] | | | | we have N answers | | | so cmplayers exits [wait] [wait] [wait] | . . . runs cmplayerc . . . | . . . ---[ "start" TCP/UDP bcast ] -->----------->-----------> | | | <------ | | [ OK || "Too Late" answer ] <------------------- | <------------------------------- | | | | cmplayerc exits [play] [play] [play]