[MPlayer-users] script control of playback

Kevin DeKorte kdekorte at gmail.com
Sat Oct 28 00:10:43 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Morris Beverly wrote:
> 
> OK, I'm a complete dope.  I haven't been able to figure out how to send
> text commands (like pause, get_time_pos, etc) to the stdin so that I can
> control mplayer.
> 
> I'm using the -slave option, but I'm just not getting the commands to do
> anything.  I can get the -input commands to work fine with my input.conf
> file and keystroke input.  I've tried to use the run command in the
> input.conf file:    F5 run echo "pause".  I've also tried to run shell
> scripts with   echo "pause"  in them via the run command as in:   F5 run
> pause_script.sh  and it simply echos the text to the console without
> affecting mplayer.
> 
> The reason I need this is so I can run multiple commands with a single
> keystroke rather than having a separate keystroke for each command.
> 
> I assume this is a simple shell thing, possibly related to redirecting
> output, that I'm not getting.
> 
> Any ideas?

Morris,

Are you putting a \n (End of Line) at the end of each command. I know
when I pass commands to the slave interface in C I have to pass them
like this

write(mplayer_input,"pause\n",strlen("pause\n"));

Kevin

- --
Get my public GnuPG key from
http://keyserver.veridis.com:11371/export?id=-1509369771935935023
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFFQoPj6w2kMH0L1dERAlNIAJ9q60h71Q/Sxsj7hmK1ArRfmsJf6QCgjgwg
JD4wYlNiw7bdJLAmteHZD9g=
=Qz4m
-----END PGP SIGNATURE-----



More information about the MPlayer-users mailing list