On 4/14/06, Kyrre Ness Sjobak <[EMAIL PROTECTED]> wrote:
> Hello!
>
> How can i time when a "cat" recording is about to start, and how long it
> should continue - without killing and starting it manually?
>
> Is there any bash command that could kill it for me after a set time, or
> some built-in tool in ivtv that does this (ivtv-encoder? What does this
> do?)
>
See the simple bash script below. It waits one hour, and makes a 30
min recording.
----------------------
#!/bin/bash
sleep 1h # Instead of using sleep here, you can start the script by using
# the at command, see 'man at'.
cat /dev/video0 > /path/to/some/filename.mpg &
CAT_PID=$!
# $! is PID of last job running in background.
sleep 30m
# You should add some check here to make sure cat is still running,
# otherwise you might accidentally kill some other process.
kill $CAT_PID
Regards,
Petter
_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users