[MPlayer-users] Mplayer and cron

Bill Moseley moseley at hank.org
Tue May 18 20:24:58 CEST 2004


I want to capture a few minutes of a stream using cron.  I'm wondering
what the best method is.

My idea is to use this in my crontab:

# 2am start recording
0 2 * * * mplayer -really-quiet -dumpstream -dumpfile $HOME/out.rm rtsp://<path>.rm

# stop at 3am
0 3 * * * killall mplayer

Is this how most people do that?  Or is there a better suggestion?


I though about doing this in cron, but I can't seem to get it to work:

   mplayer [...] & sleep 1h; killall mplayer

mplayer doesn't seem to work in the background, although I can ^Z and then run
in the background (bg).  

It works with other programs, for example I can do:

   mpg123 foo.mp3 & sleep 10s; killall mpg123

But, I admit my shell skills are not that great.

Thanks,


-- 
Bill Moseley
moseley at hank.org




More information about the MPlayer-users mailing list