Simple Webcam Capture

Introduction

At home I wanted to keep an eye on some builders who were carrying out some work on the house. I found a few freeware/shareware apps for webcam captures that worked pretty well, but then I realised how much CPU they were using. My server is only a 600Mhz box; it’s a fileserver and therefore doesn’t need to be beefy! It averaged out at about 80-90% utilisation which seemed excessive.

Despite taking snapshots from the camera every few seconds, it’s actually on all the time.. this is what’s causing the CPU usage to be so high. There didn’t seem to be any workarounds so I decided to code something up myself.

NOTE: I’m not actively maintaining this program and won’t answer emails about it not working for a particular webcam, or glitches in it’s capture. The code to read data from the webcams is generic stuff & if it doesn’t work I can’t do anything about it I’m afraid.

Features

It’s a simple app with some simple features:

  • Lowers CPU usage by switching off the webcam between snapshots
  • Use any standard windows capture device
  • Capture to a file as a BMP or JPEG image
  • Specify a flexible filename
  • Give the image a caption
  • Specify the frequency of snapshots
  • Can be used via the command line
  • Captures can be triggered via hotkey
  • Execute a file after each snapshot is taken (optional of course)

This last feature is great for those of you who love scripting & macros. You can pass through the name of the snapshot that’s just been taken (by specifying %1) and do whatever you like.. FTP the file, SMS it to your phone, run a batch conversion so that a bunch of JPEG images are compiled into an AVI… it’s up to you. File Mover also has this feature with an example .VBS script.

Downloads (for Windows 9x/200x/XP)

Simple Capture Install Kit v1.3 (177k)
Zipped .exe
(100k) - for those people who don’t like install kits ;-)
VB6 Runtimes for anyone who doesn’t already have them installed
comdlg32.ocx for anyone who doesn’t have it

Changelog

Version 1.3 - Added hotkey and command line support
Version 1.2 - Fixed further filename suffix bugs and added validation
Version 1.1 - Fixed filename suffix bug
Version 1.0 - Initial release

Command Line Arguments

/filename “<full path and filename, e.g. c:\temp\cam.jpg>”
/suffix dd-mm-yyyy
/jpgquality 40
/imgperfect 500
/imgcaption Command line test

Another (free) Alernative

If Simple Webcam Capture isn’t any good for your needs (or plain and simple doesn’t work), then I can recommend Yawcam which I have running when I don’t need the camera to power down after each snapshot.

It’s a free piece of software (always makes a product more likeable!) and has a raft of features including FTP uploads etc etc etc.

License

Simple Webcam Capture is freeware, but if you find it useful, a small donation via PayPal (no matter how small) would really make my day!

Make payments with PayPal - it's fast, free and secure!

DISCLAIMER: A user of this software acknowledges that he or she is receiving this software on an “as is” basis and the user is not relying on the accuracy or functionality of the software for any purpose. The user further acknowledges that any use of this software will be at the user’s own risk and the copyright owner - Matt Collinge - accepts no responsibility whatsoever arising from the use or application of the software.

16 Comments »

  1. harrystottle said,

    July 13, 2007 at 11:13 am

    Matt
    I’m looking for a webcam app which allows simple command line capture. Your “Simplecapture” looks like it is designed to do the job. However, I’ve installed it and get the following errors when I try to run it.

    here is my command line test:

    >\Program Files\Simple Webcam Capture\simplecapture.exe /filename “c:\mush.jpg”

    these are the errors that result:

    Error processing command line options (this comes up 4 times before the next error)

    Type mismatch

    Run-time error ‘13′: Type mismatch

    Suggestions?

  2. Matt Collinge said,

    July 16, 2007 at 8:52 pm

    You’ll need the other command line arguments for it to work… from what I remember they’re all required. Let me know if you still have problems. Matt.

  3. vincentkhoosh said,

    August 19, 2007 at 6:52 am

    Hi Matt,
    I have tested the Simple Webcam Capture program, it was exactly what i wanted., cos it can activate thru command. But i have an issue here, if i do capturing thru the program timer, it took the pictures exactly, but if i use the dos command capturing, like this : “Run c:\scap\simplecapture.exe /filename c:\scap\arc\test.jpg /suffix dd-mm-yyyy hh:nn:ss /jpgquality 80 /imgperfect 500 /imgcaption hh:nn:ss” , the picture capture only 25% of the whole image. What do you think is the problem? please advice.

    Thanks
    Vincent Khoo

  4. Matt Collinge said,

    August 19, 2007 at 7:03 pm

    Weird; I’ll try to test this out myself and see whether I can work out where the problem lies.. thanks for letting me know! :-)

  5. jpryor said,

    September 17, 2007 at 1:28 pm

    Any chance of making the source code available? I’m looking to capture images, move them to a server, delete them locally, and create a database entry linking the picture with some user input. I have everything working from the point that the image gets created on the local drive.

  6. Matt Collinge said,

    September 17, 2007 at 7:56 pm

    Hi! Thanks for your comment. I won’t be releasing the source, but you should be able to do everything you ask with the current version of the app. The feature you should explore is, ‘Execute file’ which you can use to run a script (batch, VBscript, PowerShell or whatever you like). That script can do everything you’re asking for & should be easy to implement. Let me know how you get on (email me directly if you like).

  7. vincentkhoosh said,

    September 22, 2007 at 3:43 pm

    Hi Matt,

    I have tried using another model of webcam and it works, it does not take 25% of the the picture any more. Now, there is another question i would like to ask. Some of the shots i taken are totally black screen, some are fine, could it be that the webcam needs some times to warm up? If so, how could we do about it? Please advice. Thanks

    Vincent Khoo

  8. Matt Collinge said,

    September 24, 2007 at 10:42 am

    Weird problem. The code I use isn’t fantastic and I’m thinking of a re-write in .NET at some point in the future…. that might be a long way off so don’t hold your breath :-)

    For a warm-up time, try increasing the ‘image perfect’ time, e.g. set it to 1000 for a second delay.

  9. nostraxxx said,

    November 29, 2007 at 10:27 am

    The application can not run in command line mode if some keys in the registry are not set. The keys must look something like this:

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\VB and VBA Program Settings\SimpleCapture]

    [HKEY_CURRENT_USER\Software\VB and VBA Program Settings\SimpleCapture\Options]
    “ImageCaptureDevice”=”Microsoft WDM Image Capture (Win32)”
    “Perfect”=”500″
    “ImageCaption”=”ttt”
    “FileEnabled”=”1″
    “FileName”=”d:\tmp\sc\capture.jpg”
    “FileSuffix”=”dd-mm-yy hh-nn-ss”
    “FileFrequency”=”1″
    “FileJPEGQuality”=”80″
    “Execute”=”"
    “AutoStartTimer”=”0″
    “HotKey”=”H”
    “HotKeyModifier”=”Shift + Ctrl”
    “AutoStartHotKey”=”0″

    The keys are set automaticaly when you run the application in window mode for the first time.
    Also it will be usefull to have the command line application resident and not to exit after capturing one image.

    Thanks!

  10. nostraxxx said,

    November 29, 2007 at 10:28 am

    Why even bother with .net ?
    .net is good only to write very fast a code that runs slow :)

  11. Matt Collinge said,

    November 29, 2007 at 10:58 am

    lol

  12. tailerteilor said,

    December 15, 2007 at 3:48 am

    Hello, what is the problem?
    Gui interface:
    http://img88.imageshack.us/my.php?image=error1guito9.jpg
    Command line:
    http://img69.imageshack.us/my.php?image=error2commandlinesy2.jpg

    My coomand line is:*** simplecapture.exe /filename c:\scap\arc\test.jpg /suffix dd-mm-yyyy hh:nn:ss /jpgquality 80 /imgperfect 500 /imgcaption hh:nn:ss” ***

    my e-mail is: tailerteilor@gmail.com
    Thanks

  13. Matt Collinge said,

    December 24, 2007 at 8:55 pm

    The problem in the command line above is that the suffix, which includes the time, has characters that are invalid for a filename in Windows. Once he’d removed the colon separators (painfull! ;-)) from the time it worked fine.

  14. peteshew said,

    June 19, 2008 at 11:55 am

    I like the command line feature, but SimpleCapture doesn’t seem to capture images larger then about 320 x 240. If I use VIDCAP32 and set the resolution of my camera to 640×480 SimpleCapture command line subsequently captures only the top left quarter (like vincentkhoosh’s problem, above).

    Is there a way of getting larger images?

    Pete

  15. Matt Collinge said,

    June 19, 2008 at 8:10 pm

    I’m afraid not. Give Yawcam a try; it’ll probably suit your needs a bit better.

  16. peteshew said,

    June 19, 2008 at 9:27 pm

    No, YawCam doesn’t do the job, it is the command line feature I need. Oh, well, I’ll start looking at the API’s

    thanks

Leave a Comment

You must be logged in to post a comment.