Page 1 of 1

frame grabbing

Posted: Tue Aug 01, 2006 9:41 am
by jameswilson
Hi all im trying to grab a single frame and save as a jpeg every 30 seconds say. I cant use cron to do this im going to need some sort of script i suppose. Id like to cycle trhough a list of urls and save as jpeg ie site1-cam1.jpg, site2-cam1.jpg etc
Id like these jpegs to be overwritten say every 10 seconds to 5 minutes dependant upon settings. I can write a windows app to do this but not a linux one! so anyone any clues?

Posted: Tue Aug 01, 2006 11:47 am
by Flash_
First idea is to use cron, calling a simple wget command. I do this on a couple of axis cameras to get an image for a website

crontab entry, once a minute. Requires wget.

* * * * * wget http://10.0.0.108:1108/axis-cgi/jpg/ima ... on=320x240 -O /var/www/Stables.jpg &>/dev/null

That creates a 320x480 file "Stables.jpg". (As seen by the world as: http://www.mareandfoal.org/webcam )

Downside of that, no incrementing of filename. So maybe some way of furthering that line to test for a file and add to it, maybe bash or perl to inrement that line.

Anyway, hope it's of use as a starting point to you.

Posted: Wed Aug 09, 2006 2:04 pm
by zoneminder
If you have a quick look at zm_monitor and zm_camera.cpp it might also help as that is pretty much what they do, just normally a bit faster. They capture Image objects which have a Write method and so are easy to write out.