On Friday 14 Apr 2006 21:02, Petter Gundersen wrote:
> 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
>
Hi Peter,

I really like your script and will definitely be using it myself, would you 
mind if I post it on the ivtv wiki so that other people like myself can take 
advantage of using it.

Best Regards

Trev

_______________________________________________
ivtv-users mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-users

Reply via email to