But first, you will need these: a Linux box; a supported webcam; and a few free and open source software packages that I'm going to specify later on.
Now it's time to walk you through the process of installing your very own homemade security spy camera on Ubuntu. Take note that this can be done using other Linux distros as well. But before going on, I'm assuming that your webcam has the right driver and is fully working already.
So let's get down to business:
Step-1: Install the motion detector software that's appropriately called "Motion".
You can install it via Synaptic Package Manager GUI or via the terminal:
sudo apt-get install motion Step-2: After installation, you have officially converted your ordinary webcam into a motion-detecting camera. The only thing that you need to do now is to start tracking movement and capture images by running "Motion" from the terminal:
Saving captured images...
You can stop "Motion" by pressing CTRL+C.
The captured time stamped images are saved at "/tmp/motion" by default. However, you can configure and change the default settings by navigating to "/etc/motion" and editing "motion.conf". Like if you want to change the directory where the captured images are saved, just find and edit this line: "target_dir /tmp/motion"
You can go HERE to know about several “Motion” config file options.
Step-3: Actually we can stop at "Step 2" because we already have a reliable camera that can be used for security purposes. But that may sound boring to some of our adventure seeking advanced users. So let's go on and set-up "Motion" to send and save the captured images to a remote FTP server.
First, let's install "wput". --It's a command line FTP client:
sudo apt-get install wput
After it, edit “motion.conf” with your favorite text editor, and then add the following line at the end section:
on_picture_save wput ftp://username:password@yourserver %f
If you want to start Motion automatically with your server, just add Motion to your "Startup Programs".
Step-4: You will now be able to open the Motion web interface by typing in localhost:8000 from the server itself or XXX.XXX.X.XXX:8000 from a remote computer's web browser. To view a live stream of your webcam type localhost:8001 from the server or XXX.XXX.X.XXX:8001 from a web browser.
Let me add that it's possible to connect and use multiple webcams. You can go HERE for set-up instructions.
That's about it. Enjoy your new motion-detecting spy camera. Now it's your job to put that webcam on the right spot and perhaps apply a camouflage to hide it.
Always remember to be responsible and use that homemade spy camera for good things only. Like maybe catching that fried-chicken-eating thief :-)
Note:If You Have Problem With Start & Stop Motion Then Use Following Commands
sudo /etc/init.d/motion start
sudo /etc/init.d/motion stop