[MPlayer-users] stopping a dumpstream after a specified amount of time

Rainer Koehler koehler at mpia-hd.mpg.de
Wed Oct 20 16:55:40 CEST 2004


Hugo Gonz?lez Monteverde writes:

> Yes, you can open MPlayer in a pipe and send it the "quit" command, 
> after sleeping. In Python, I'd do:

> filep = popen("mplayer whatever",  "w") #pipe set to read your commands
> sleep (number of seconds you want to capture)
> filep.write("quit")
> filep.flush()
> filep.close()

> Anyone suggest how to say this in SH???

This works for me in csh:

(sleep 36; echo quit) | mplayer whatever

You might want more than 36 seconds, but I didn't want to wait longer
just to test it ;-)

Rainer




More information about the MPlayer-users mailing list