This tutorial will take you step-by-step through setting up your PC and Webcam to act as a motion-detecting and recording security camera system. And the software required to do this is open source (free).
Why?
What?
How?
Advanced includes: Multiple Webcams, Sending pictures to a remote location (FTP), How to duct-tape the light off your webcam (super-stealth)
Examples
Coming soon: How to do the same thing, with a Mac.
6 Reasons to set up a motion activated web-cam
- Maybe you live in a questionable (at best) part of East Vancouver and you’ve already been broken into (while you were doing the dishes). It would be helpful next time to have pictures of the intruder.
- Maybe you’re trying to prove to your landlord that some of the more questionable members of the general East Vancouver public are using the pathway between your building and the one next door as a shortcut between streets. Often with very large bags of cans (it’s a Vancouver thing). Loudly. At all hours of the day and night.
- Perhaps you want to catch someone using your PC after you’ve asked them repeatedly not to use it (because they seem to go out of their way to install spyware, toolbars you don’t want, and leave behind Britney Spears mp3s on your desktop)
- You’re bored?
- You want to get pictures of the pretty birdies eating from your new bird feeder.
- Yeah I know what you were expecting here, that’s lewd. Get your mind out of the gutter, this is a family site.
For this tutorial you’ll need:
- a PC running Windows 98, ME, 2000, XP (the software is untested on Windows 95 and NT, but should work)
- a webcam (or two, see advanced)
- Dorgem – an open source (free) webcam utility. Update: Though Dorgem has been discontinued, the download links still work, as does the software. The author will not be updating it anymore, and won’t be answering email support questions.
To upload images ‘off-site’ (in case someone steals your computer) you’ll need an FTP account. See the Advanced section when you’re done the initial setup.
- Install (if it isn’t already) your webcam. If you’re pulling one out of the closet and have long since lost the install CD, here are links to download the drivers for some of the most common webcam vendors:
- Download and install Dorgem. The installation is very straight forward, you’ll mostly click Next a bunch of times.
- Launch Dorgem and select your Webcam from the Camera selection drop-down list.
- Click the Preview button to display the view your webcam has. Physically adjust the camera to face the area you want to monitor.
- Click the Source button and make any adjustments to the Brightness, Contrast and/or other settings. Click OK when you’re happy with the results.
- Click the Options button
- Place a check in the box labeled Use motion detection. Certain Webcams (most often Labtec) can require Dorgem to “reconnect” after a certain period of no motion being detected. For now leave this box unchecked. If you notice that your Webcam isn’t capturing any images even though it should have, revisit this section and place a check in the box. It should be noted that if you do need to use this setting, your cam will likely take a picture every time Dorgem “reconnects” to it, so try using 5 minute (or higher) intervals. Otherwise you’ll end out with a LOT of pictures, most of which won’t have captured actual “motion”.
- Click OK after you have enabled motion detection to return to the main Dorgem window. Now you’ll need to create a ‘profile’ – which Dorgem refers to as Storage events. Click the Store settings button to create an event.
- Choose File and click OK (adding an FTP event is covered in the Advanced section, set a local file first to make sure everything works)
- Enter a Name: for this event, make sure Enable is checked, and then set an interval. Since you’ll be using motion detection, you probably want to capture images fairly “closely together” – so try 1 or 2 seconds. If you know for certain that this camera will detect a lot of motion (your camera faces an area with a lot of movement) you may want to set this somewhat higher. This setting can always be changed later, so experiment a bit. Click the … button next to Filename:
- Here you’ll be setting the folder to save images to, and the actual filename for each image. Dorgem allows special characters in file names so that each name is unique (otherwise each time your camera detected motion it would take a picture and over-write the previous one). Somewhere in the file name, enter the characters %g – which will give your file name a time-stamp. If you use %G in the file name, it will also add the current year.
Because my camera is taking pictures of movement on my patio, I named the file patio-camera%G%g. This results with images being saved as patio-camera20060926165001.jpg. Broken down that’s patio-camera – the current year – the current month, day, hour, minute and second. Click Save after you’ve selected a folder and file name.
- Click OK
- Click Close to return to the main Dorgem widow
- Wave your hand in front of the camera. Or throw something within its view. Jump around in front of it like an idiot. If everything was set correctly, you should now have some images in the folder you specified. Go take a look..
- If it didn’t work, start again at step 3 and double-check everything. The built-in Help file included with Dorgem is actually pretty helpful – use it for troubleshooting. Feel free to leave a comment below and include as much info as possible and I’ll try to help as well.




Multiple Webcams
If you can get more than one Webcam to work in Windows (not always an easy task, esp. if they’re Labtec), Dorgem can support them all. You don’t need to install another copy of Dorgem, but you do need to start each instance differently. To do so, follow the steps below..
- Right-click on your current Dorgem desktop icon and select Create Shortcut
- You should see a new Dorgem (2) icon on your desktop – right-click on it this time, and choose Properties
- Make sure the Shortcut tab is selected, and change the Target: to:
“C:\Program Files\Dorgem\Dorgem.exe” /c:cam2
If you installed Dorgem to somewhere other than the default location, make the appropriate changes.
- Click Apply and then
to return to your desktop. Double-click the Dorgem (2) icon. When it launches, notice that it’s titled Dorgem (cam2). Repeat the same steps you did for the first camera (though choose a different file name to save the image as).
Sending pictures to a remote location (FTP)
If you’re using this as a personal security system for your residence, you may want to store the files off-site, in case someone steals your computer (rendering your security totally useless). To do so, follow these steps.. (note: you’ll need an FTP account – check to see if your ISP provides one for you, eg. Personal Web Space/storage).
- Click the Store settings button and then click Add.
- This time select FTP and then click OK
- Enter in the required information. The file name can use special characters (see step 11 in the first How part of this tutorial). You may have to experiment with some of these settings. For example, I have to use Passive mode because of the way my home network is set up. You may not. Click OKwhen all of the required info has been entered.
- Wave your hand in front of the webcam (or throw something through its field of view). Check your FTP site and you should see a new file (or files) there. Note: when I have both save to my local hard drive and save to FTP enabled, only one works. You may need to disable the local copy if you want FTP to work. If you figure out a way for both to work, by all means let me know.

How to duct tape the light off your webcam (super-stealth)
- Does your webcam have an annoying light that gives away its location when you try to hide it?
- Find some duct tape that matches the colour of your camera. Or, masking tape and a marker.
- Place tape over the light.
- Your camera will now blend in like a ninja. Extra bonus: use the duct tape to hold your hidden camera in place.



Examples (from the first day I set this up)
Yes, birds will trigger the motion sensing webcam.


Seriously, this isn’t a shortcut for you to use.


How patio furniture gets stolen.


I don’t care if you’re practicing your tight-rope walking, stop using this area as a shortcut.



You too.




My webcam lets me know when not to open my blinds. AKA get an unrequested view of some carpenters crotch.

–
Try out RegistryBooster 2009 to speed up your PC – sometimes drastically!




































Theres Been theese little punks running around the neighborhood vandalizing and ding dong ditching people. NOW IM GONNA CATCH THEM! Thanks!
heyy!! thank u very much, but I don’t know what’s the problem: it take just one pic every one minute and at the 2nd minute. the 1st pic changed with the 2nd
:(
can u help me in that??
thanks again
Very good article. Thanks.
fati:
This is from step 11 on the How? section:
“Because my camera is taking pictures of movement on my patio, I named the file patio-camera%G%g. This results with images being saved as patio-camera20060926165001.jpg.”
When you provide a file name, make sure you end the file name with a time stamp by entering %G or %g so that your picture files won’t write the file as the same name after each second/minute/hour.
Billy wrote:
> “I was wondering if this will work as a service”
I don’t know how to make Dorgem run as a service. But what I did do is put the program into the startup folder in my start menu, set it to start as just a tray icon, and have the tray icon hidden by default. Which isn’t quite the same thing, but I’m happy with it and it means that Dorgem is basically always running in the background.
How I did that: I put this batch file in the startup folder of the start menu (i.e. created a text file called ‘dorgem.bat’ with the following contents):
> rem @echo off
> start C:\Progra~1\Dorgem\Dorgem.exe /m
> exit
(where the path on the second line is the path to Dorgem using 8.3 file names)
after i launched dorgem but the drop down only had one option. when i enter it, a box came up saying failed to connect. how do i get it to provide the option of the webcam I have? thanks.
i’m not a computer person.
Someone earlier asked what camera would be best to use and I didn’t see a response.
Also, is motion detection a standard feature of the suggested webcam.
Thanks,
Dave
Thank you, I just tested this software and it works great! We will be using this every time we leave the house!
We just had our house broken into 2 days ago. We only went to Wal-mart for 15 minutes and came right back to find our Xbox 360, all of our video games and xbox accessories, digital camera, and mp3 player were missing! They even took my electric razor that was charging in the bathroom! It all happened in the middle of the afternoon too! It all came our to around $1,000 worth of electronics. Luckily they didn’t take our huge flatscreen hdtv or my gaming computer that I just built which are worth far more than what they stole.
We’ll definitely be ready for them next time as I have it set for motion sensor and to upload them via ftp to my website’s server. We’re leaving for Las Vegas next week for 6 days and we’ll be able to download the pictures from the hotel.
My only gripe with this software is that there is no way to adjust the motion sensor sensitivity and this software is REALLY sensitive, so it takes hundreds of pictures of the light moving through the windows.
very nice tutorial, no hassle getting setup, all very easy and dummy-proof. only wish i wasnt running a webcam made back in 1998
Josh Prowse wrote
How I did that: I put this batch file in the startup folder of the start menu (i.e. created a text file called ‘dorgem.bat’ with the following contents):
> rem @echo off
> start C:\Progra~1\Dorgem\Dorgem.exe /m
> exit
(where the path on the second line is the path to Dorgem using 8.3 file names)
Hi, what is 8.3 file names?
Hi will this work using a laptop? I intend to use this inside my car and a laptop
will be more compact than a computer plus will not drain the battery. Can it be hooked up to a switch so that when ignition the key is taken off the laptop turns on and starts motion sensing? I’m not too good w computers but hope
I can use this for my car? Thanks for the help
Bernardo
When I do this it says “Couldn’t capture to temporary BMP file.” And I can’t even click the source button! =(. Please help! I’m using a Webcam VX 3000. I really need this. ._.”
So here goes.
I need to set up a camera to take a pic of which cat of mine (I have 4) enters a section of the house (Dining room- a particular section about 2′x 19′long). I guess it need to be motion activated to take a pic/ short movie of the area…day and night. I must find out which cat has been using a part of my house as a litter box. I already had to remove that section of oak flooring (there since 1927) due to soiling. Now, it has returned on the new subfloor I installed. I want to identify the culprit.
Where would I start my search for such an item…
I don’t need to spend a lot…this is a one-shot deal, just to find the ‘pissy cat’.
Alan Seglin
Sea Cliff, New York
Hahaha…
I’ve been programming motion detection games… but that’s an idea that I didn’t have!
Nice job!
works
Caught the window guy going through my dresser and nightstand. He’s fired. Thanks!
Thnx for this tutorial!
It works but now I only have to get a better webcam, my webcam is only 2 megapixels. XD
Greetings from Holland.
i’m doing my BE PROJECT IN SAME AREA. WOULD U PLZ HELP ME
I found your site and am very much interested. I found a system that uses a mini-camera and like the system.
Question I have dial up, but an adjacent neighbor has a Yi-Fi and allows me to use it. Will the system you describe send me videos that I can download while I am away?
When I am away, the maintenance people come in with a passkey and I found some videos missing, I’d like to catch them in the act.
Your information is great, but tell me what system I need to make it work, i.e. my own Yi-Fi or can I use my neighbors Yi-Fi using a USB N-series Wireless PC in the recording DVR unit [I personally have dial up but like I said, I have access to my adjacent neighbor's Yi-Fi]?
Vin
Thank you so much for the tutorial! My building manager is stalking me and I need proof that he’s been coming into my apartment when I’m not here.
Thank you so much for the tutorial!
I’ve been looking for something like this for almost a year and now just devided to really Google it and here I am. I forgot to say it works!
Zee
Thanks, i got some thieving T**T with a master key robbing me all the time, now i can finally catch him in the act and beat the living p*ss out of him.
Works great.
Thanks again.
Excellent software, and great instructions – thanks! I set this up on an old IBM Thinkpad 600E with no problem at all, including getting it to use the AVI function. Dorgem does create the AVI file, but doesn’t give it the .avi file extension, so before you can view it you need to edit the filename and add the extension yourself. Note, before you can edit the filename, you need to disable the AVI function in Dorgem (or maybe just close Dorgem, I didn’t try that).
I wanted to monitor my son’s new Leopard Gecko pet, which is mainly nocturnal – we wanted to make sure it was feeding OK, so I left this running for most of the night – brilliant, it worked an absolute treat. All I need to do now is fit a wide angle lens to the Philips Toucam I am using, so I can see more of the vivarium. I uploaded the video to YouTube if you are interested in seeing it – the first 20 seconds are not motion, they are caused by light fluctuations outside the viv triggering the camera.
http://www.youtube.com/watch?v=giw2npSeUjE
Thanks again.
Just thanks a huge lot
What are some good, free ftp sites? I keep coming home to my apartment to find it messed with. Nothing has been stolen YET but i think they might be looking at what all I have and trying to decide what to take. I have a laptop so i need some sort of off-site storage.
Nice one. Works like a dream, Thanks. I need it to spy on myself. I have been sleepwalking but I only know I have been doing it if I hurt myself or wake up somewhere other than my bed. This will let me know how often I really do it and how big of a problem I have. So thanks. This might just save me from falling down the stairs and breaking my neck in the future….
Mine takes photo’s even with no real motion! Everything is good, but the can=mera is just a tad grainy… what should I do? Is there a sensitivity slider?
I Know this might sound weird..But we just got robbed by our own farm helps here in Kenya…I setup up everything with a total of 7 web cams handled wirelessly around the farm house…today after lunch in town we came back and clothes were missing!!! From the drying line got pictures of the farm help picking clothes from the line…that settled his story and now my dad wants me to link up the system with his hone and computer at work!!! Thanks Guyz
@Killian – try clicking the ‘Source’ button, that should take you to a set of camera controls (but I think what you get will be dependent upon what camera you are using).
genius now i can give my friend the security that he needs in his room… halloween night someone stole 160 dollars from his room now we will catch the guy Thanks!
Thanks I love the tutorial, I live in a house with 8 guys in college and when I got on vacation sometime the get a lil drunk. Its a great way to keep an eye on my room. I only have one question, I have 2 cams but I cannot get Dorgem to work with them. When i try step 3 in the advanced section I keep getting the error “The name ‘C:\Program’ specified in the Target box is not valid. Make sure the path and file name are correct”. I followed all the steps to a T but i keep getting this error, I even tried uninstalling and reinstalling it a few times but sill the same error. Sorry if this is lengthy but I looked all over to try and fix this.
Thank you for any help!!
I downloaded dorgem but it wont give me the first option ‘creative’??.. help please?
When I enable it it take a pic every 2 seconds even if there is no motion? I know I have set something wrong but I can figure it
Thanks
IR automated home application for turning on lights and music and such?
it works 100% but there is no way to adjust the motion sensor sensitivity and this software is REALLY sensitive, so it takes hundreds of pictures of the trees moving?
thank
shane
me and my housemates have been a victim of burglary these couple of weeks. He (since we saw him peeping through our apt window 2 times already) stole shoes, slippers, and maybe other items we still don’t know about. And just a couple of minutes ago, we think he broke in again because I got money stolen from my wallet. This really sucks.
next time, if I catch him, I will rip out his guts and make him drink muriatic acid. I will be monitoring our apt tonight, hoping to catch him and give a peice of my mind.
and thanks for your post, i’ll try to do that
I have 2 questions.Hope somebody can answer.I use gmail drive to store my dorgem files.The problem is eveytime a new file is added,gmail will try to connect to internet.A pop up will flash with “gmail query, connecting to gmail and sending files’My questions are:
1. How can I program my gmail drive to run in hide mode? So that, the pop up won’t be visible.
2.Is there any way to make the gmail to auto detect the present of internet connection before it tries to connect to internet?
Dorgem on my computer does sometimes work,but most of the times when i have to connect the webcam to dorgem,it just always says :,,fail to connect to device”! What do i do!?
o,i have a windows 7 by the way,just to let you know! e-mail me back as soon as you can! Thanks!
“Scott wrote: My only gripe with this software is that there is no way to adjust the motion sensor sensitivity and this software is REALLY sensitive, so it takes hundreds of pictures of the light moving through the windows.”
Yes, but if you choose something like “use outdoor” in the options (also if you using inside) of the cam (click “source”), it´s not so sensitive. Worked with a cheap logilink pretty well.
Thanks to this, i was able to figure out which dog would grab food off the counter. I was sure which one it was, but the wife thought it was the other dog. now I have proof
how to see opponent side video r pic in my webcam …? help me ……
excelente programa