[MPlayer-users] controlling multiple instances of MPlayer (Win7)

Rolf Ernst rolf.ernst at silverlightning.org
Fri Nov 5 21:08:17 CET 2010


On 11/5/2010 2:58 PM, Lobster wrote:
> On 5/11/2010 11:44 p.m., Wybe Horsman wrote:
>> Hi,
>>
>> I digitally restore 8mm films. That often means changing a certain 
>> filter or processing parameter (sometime multi-pass processing) and 
>> see if the result is better than the original (or previous version). 
>> So I have to compare movies. The tricky part is to view multiple 
>> movies simultaneously and let them be controlled by a single 
>> commanding source (keyboard e.g.)
>> I discovered that I can control MPlayer via external commands in 
>> slave mode. But how can I control multiple instances, all in slave 
>> mode, simultaneously?
>> I think in Unix it should't be so hard: you define a named pipe 
>> (fifo) as input and, from the command line, you pipe the keyboard to 
>> that fifo device/file. You then let all MPlayer instances use that 
>> fifo as controlling input (option -input)
>> But how can I do that in Windows? Or is there another way to control 
>> multiple instances?
>
> This might be of use, how ever I am unsure how the windows support is,
>
> The following is taken from the man page
>
> -udp-ip <ip>
> Sets the destination address for datagrams sent by the -udp-mas‐
> ter. Setting it to a broadcast address allows multiple slaves
> having the same broadcast address to sync to the master (de‐
> fault: 127.0.0.1).
>
> -udp-master
> Send a datagram to -udp-ip on -udp-port just before playing each
> frame. The datagram indicates the master’s position in the
> file.
>
> -udp-port <port>
> Sets the destination port for datagrams sent by the -udp-master,
> and the port a -udp-slave listens on (default: 23867).
>
> -udp-seek-threshold <sec>
> When the master seeks, the slave has to decide whether to seek
> as well, or to catch up by decoding frames without pausing be‐
> tween frames. If the master is more than <sec> seconds away
> from the slave, the slave seeks. Otherwise, it "runs" to catch
> up or waits for the master. This should almost always be left
> at its default setting of 1 second.
>
> -udp-slave
> Listen on -udp-port and match the master’s position.
>
>
> using the above options will allow you to have a master MPlayer, and all
> others will slave to it.
>
> Have a play and see how you go.
> I would be interested to know how well that works on windows (if it 
> does).
>
Don't know how handy you are writing a few lines of code but if you 
spawn multiple instances you can grab stdin for each instance and feed 
it keystrokes separately. However, I found slave mode a bit coarse in 
terms of controlling the player but you might give it a shot. It's 
really just a few lines of code, whatever language you use.

-- 
/re

"My friends, watch out for the little fellow with an idea"

Tommy Douglass



More information about the MPlayer-users mailing list