[MPlayer-dev-eng] Synchronization of players in LAN

D Richard Felker III dalias at aerifal.cx
Thu Nov 20 19:27:09 CET 2003


On Thu, Nov 20, 2003 at 10:14:24AM +0100, J.A. Gutierrez wrote:
> 
> 	Hello
> 
> 	I'm trying to synchronise several players running on several
> 	computers connected to a dedicated 10/100 Ethernet switch. Each
> 	one reads a different movie (video only) from its internal hard
> 	disk, and resolution will be 768x576.
> 
> 	I'm thinking of a simple solution:
> 
> 	- Add some code at mplayer startup so it will wait for an UDP
> 	broadcast packet (sent by a central master in the LAN). This
> 	way all the players would start at the same time.
> 
> 	- Use NTP to keep in sync all the computers' clocks, and trust
> 	mplayer's rtc synchronisation feature.
> 
> 
> 	With this simple setup, could we be sure all the players would
> 	keep the synchronisation? Or should the master computer track
> 	them all and take control on their speeds?
> 	How difficult would be to add code so all the player synchronise
> 	using the LAN? Or should I use some external clock connected to
> 	all serial ports? Or use a totally different approach?

In general this is very difficult, unless there's no sound. MPlayer's
core sync is based on the sound clock, so if the clock sources on the
sound cards vary even slightly, sync will drift over time. The only
real fix I know of is to use a common external clock source and add a
feature to mplayer to dynamically resample sound to adjust for sound
clock skew.

Rich



More information about the MPlayer-dev-eng mailing list