This is one of the many occasions in which you wish you had a hidden security camera at hand (together with when you want to know if you roommate is really stealing your chocolate and when you suspect there are undesired animals in your room!).
But the solution is just in front of you, right now! Your computer's webcam is a hidden and usually unsuspectable object and it can be easily turned into a monitoring device.
And Linux helps us doing it very easily with a small program called motion.
Motion saves snapshots from your webcam whenever movement is detected by the webcam itself. Increasing the capture rate, it can produce decent videos as well.
Configure
Motion needs to be configured before it can be used. Configuration allows for a big list of customizations, as frame capture rate, image resolution of the frames, motion sensibility, webcam properties and many others. It is very easy as most of it is already configured.
First of all, copy the config file in your user account. From a terminal:
$ cd
$ mkdir .motion
$ sudo cp /etc/motion/motion.conf ./.motion
Then change the ownership of the file to your user (it was copied from root)
$ sudo chown [username] ./.motion/motion.conf
$ emacs ./.motion.conf
videodevice /dev/video0
target_dir /home/user/your_folder
Usage
$ motion
ctrl-c
No comments:
Post a Comment