[wuug-list] [Windsor Board] Paul: Re: To Learn Linux
Xavier Spriet
xavier at wuug.org
Wed Jan 24 07:49:55 CST 2007
Cron won't help you run your task every 5sec, but you can probably
accomplish this by using a little shell script to schedule itself for 5
seconds in the future using the 'at' command (man at for more details.
It's not the most user-friendly utility out there but it does the job).
There are probably cleaner ways out there to accomplish the same thing,
but this hack should get you going pretty quickly.
For the compression, you will likely need to use mencoder (it is
associated to the mplayer package and they are usually bundled together
in the distros I've used). Once again, man mencoder for the usage
details.
As for deleting anything older than 2 days, the 'find' command is what
you want to use for that. Something along the lines of:
find . -mtime +1 -exec rm -rf {} \;
Is probably what you would want to do.
Thanks,
Xavier
On Tue, 2007-23-01 at 23:42 -0500, Matthew Johnston wrote:
> I have a bit of a challenge for the group. I want to get a webcam and
> setup a cronjob or something so that it will take time-lapse pictures,
> ( 5 frames/second or so instead of the default 30 fps) save it in say
> 2-hour 'chunks' and then compress it (xvid). And at the end delete
> anything older then 2-days.
>
> Any suggestions? camera?
> I want to mount the camera in my vehicle so that it will record the
> entire trip so a automatic focus and long'ish view are important.
>
More information about the wuug-list
mailing list