[MPlayer-users] Synching multiple instances of Mplayer on serparate machines
Saurabh Singhvi
saurabhsinghvi at gmail.com
Sat Apr 28 15:48:56 CEST 2007
On 4/28/07, Morris Beverly <morrisb at avpresentations.com> wrote:
>
> paul paradiso wrote:
> > Hello,
> > I am looking to find a way to sync multiple instances of mplayer running
> on
> > different machines, and possibly on the same machine, with a dual-head
> > card, I saw a conversion in the archives a few months back that seemed
> to
> > assure me that it would be possible, but didn't see much more. The
> videos
> > will have the same number of frames and the machines will be on a
> gigabit
> > lan. If anyone had a little advice on how to get started or where to
> look
> > for further information, that would be fantastic.
> >
>
> You can definitely do this, but you will definitely have to write some
> code yourself.
>
> Basically you create a server in whatever you write your software in,
> java, python, etc. You start mplayer within that server, in slave mode,
> with a stream open to send commands to it via mplayer's stdin. You send
> slave commands to the server, which then passes them on to the running
> instance of mplayer via that stream.
>
> I wrote a small server in java that starts up mplayer in slave mode and
> waits for commands from the network to forward to mplayer via a
> printstream connected to mplayers stdin. The server essentially echos
> the command to the printstream. The controller program sits on another
> machine & sends out the appropriate slave mode commands over the network
> to the server. I don't know what a realistic limit is on the number of
> mplayer servers you can control, but I can do 3 without any problem.
>
> My code is too much of a mess for anyone else to read, but if I ever get
> it cleaned up, I'll post it. You can email me directly with specific
> questions, but I don't really have time to write a piece of skeleton
> code right now - sorry. If you'd be writing it in java, google: "java
> process builder stdin".
>
> Here's a link to a piece of code that shows how to start mplayer in
> java & get a printstream to send commands over:
> http://www.avpresentations.com/code/java_mplayer_control_example.txt
>
> good luck,
>
> morris
>
>
>
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
>
or you could just stream the video files using vlc (simplest, you could
use something else) and play the stream on mplayers on the different
machines. No issues with sync as the video files in streams will be in
sync on their own and since it's a gigabit lan, you won't have to compromise
the quality of the videos either.
hth
Saurabh
More information about the MPlayer-users
mailing list