[MPlayer-users] problems with slave mode in Windows

The Wanderer inverseparadox at comcast.net
Sun Jul 23 03:18:55 CEST 2006


Alec Bennett wrote:

> I"m trying to control mplayer from a Python script under Windows.
> There seems to be some quirks?
> 
> For example, running mplayer with the -slave switch does nothing:
> 
> mplayer -slave c:/whatever.wav
> 
> (c:/whatever.wav plays normally, mplayer exits when done, not in
> slave mode)

How did you determine that it was not in slave mode?

> This on the other hand successfully puts mplayer into slave mode:
> 
> mplayer -
> 
> However it doesn't seem to respond to commands.

That would probably be because it's not really in slave mode - it's
waiting for a file (not a filename!) to be sent to stdin so that it can
play that file. The special "filename" '-' on the command line tells
MPlayer to read its input data from stdin.

> For example, typing "fileopen c:/whatever.wav" does nothing

Even if you had been in slave mode at this point, 'fileopen' is not a
valid slave command (except maybe under severely outdated MPlayer
versions), and so is ignored; you probably want 'loadfile'. See
DOCS/tech/slave.txt for details.

> and typing "fileopen c:/whatever.wav\n" returns the error
> "Cannot seek backwards in linear stream!"
> 
> This command does the same as "mplayer -":
> 
> mplayer - c:/whatever.wav

Except that when the file sent to stdin finishes (i.e. the EOF character
is sent to stdin), it will play 'c:/whatever.wav', since that's the next
file specified on the command line.

-- 
       The Wanderer

Warning: Simply because I argue an issue does not mean I agree with any
side of it.

Secrecy is the beginning of tyranny.



More information about the MPlayer-users mailing list