[MPlayer-users] Re: sending mplayer signals
jfabregas at onelinkpr.net
Tue Aug 22 01:11:03 CEST 2006
On Thursday 17 August 2006 2:07 pm, Corey Hickey wrote:
> 1. at time X: $ mencoder ..... or mplayer -dumpstream .....
> 2. at time Y: $ kill -SIGINT `pidof mencoder`
What I usually do (in order to record a stream for certain amount of time) is,
mplayer -dumpstream http://blabla/link/to/stream.asf &
sleep 120m # will grab stream for 2 hours
kill $! # will kill the most recently backgrounded job
Notice the ampersand at the end of mplayer line. I just placed mplayer in the
background so I could run the sleep command next. After sleep ends I'll kill
> SIGINT will let mencoder exit cleanly and leave a complete file. You'll
> probably want a better way of specifying the mencoder PID; that's just a
> very rough example.
SIGINT...that's interesting. I always used plain kill (SIGTERM, same as -15).
Any difference at all Corey that you might think? Does mplayer handles SIGINT
better than SIGTERM?
More information about the MPlayer-users