frame grabbing

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

frame grabbing

Post 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?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post 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.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
Post Reply