[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Anyone know how to do a "timed program" with mplayer?



On Monday 17 October 2005 17:50, Oliver Lupton wrote:

> I guess this isn't the neatest either, but how about using mplayer's
> slave mode (-slave), so it reads for commands from stdin. And have a
> simple script which sleeps for 1:30 and then prints whatever mplayer's
> stop command is to mplayer?

Interesting, thanks.

> As I said it's not the neatest, but it's neater than killall mplayer
> :)

Actually, a friend sent me a link to this site

  http://osl.iu.edu/~tveldhui/radio/
  "Linux Radio Timeshift HOWTO"

which includes the following slightly more sophisticated version of
killall in a sample script.

vsound realplay http://www.bbc.co.uk/cgi-bin/... &
VSOUND_PID=$!
sleep 3660
kill `ps | grep realplay | awk '{ print $1 }'`

# Wait for vsound to terminate, creating vsound.wav
wait $VSOUND_PID

-- 
Adam



Reply to: