Capture still image on schedule

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
Posts: 69
Joined: Sat Aug 13, 2011 11:38 pm
Location: Melbourne, Australia

Capture still image on schedule

Post by gmar_87 » Wed Nov 23, 2011 7:07 am

I would like to capture one still image every hour to collate a time lapse video. Is this possible? If yes, how?

I currently have a camera in monitor mode saved as running state "1" and the same camera configured for record mode in running state "2". I have set up a cron job to change between the running states, but the minimum time in between cron jobs is 1 minute. Therefore i end up with a ~50 second event. I could script the change in run states with a short gap between commands and execute the script as a hourly cron job, but i this still creates an event with multiple stills.

I really want to capture a single still. Please help!

Posts: 14
Joined: Tue Oct 04, 2011 3:30 am

Re: Capture still image on schedule

Post by koolb » Sat Dec 03, 2011 1:49 am


I did this with a remote foscam (this as little to do with zm):

crontab -e # enter the following into the file:
# m h dom mon dow command
0,30 * * * * /var/www/src/ > /tmp/ 2>&1

Then create a script file, eg:
/usr/bin/wget -q " ... d=password" -O /var/www/src/$(date +"%Y-%m-%d_%H:%M:%S").jpg >> /tmp/getsnap.log 2>&1
chmod +x /var/www/src/

Finally to create an avi i just run the following (in a script):
[ -d $dstdir ] || mkdir -p $dstdir
for src in $srcdir/*.jpg
dstfn=$(printf "%03d.jpg" $i)
echo "src: $src -> $dst"
cp $src $dst
i=$((i + 1))
ffmpeg -r 10 -b 4800 -i "$dstdir/%03d.jpg" out.mjpg
rm -f $dstdir/*.jpg
chmod +x

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest