2

I am trying to capture images when there is any movement involved using 2 webcams, each one pointing at different angles. I started to try motion but I am starting to believe is only for a single webcam. Is it for multiple? and if not, what other terminal or GUI app is there to capture only when movement is involved from 2 or more webcams?

3
  • 1
    It looks like zoneminder.com does what you want, but I haven't used it at all. Dec 27, 2012 at 13:34
  • Tried it right now. User friendliness was left for dead in a desert somewhere... at least it needs a lot of setup for a webcam capturing system. I need more time to configure everything. Looking for an easier solution before jumping towards that direction. Dec 27, 2012 at 13:40
  • +1 AbrahamVanHelpsing. I was configuring the whole thing up until one of the webcams did not work. Luckly thanks to you I found something in motion for multiple webcams. Dec 27, 2012 at 14:23

1 Answer 1

3

Trying out the suggestion from AbrahamVanHelpsing was good. Zoneminder which already comes in Ubuntu did work but after several minutes of configuration it was set up. Bad thing is, it did not detect one of the webcams, it only threw a black screen when probing it. Anyway it is recommended to use this one as it is more robust that motion.

Install it with sudo apt-get install zoneminder. Configuration information is in their website.

But after messing around with it I went back to motion because I felt it was strange that a app called MOTION did not have an option for multiple webcams. I was right.

Just in case, to install motion is as easy as sudo apt-get install motion

Now in the /etc/motion/motion.conf file the LAST options are for multiple webcams:

##############################################################
# Thread config files - One for each camera.
# Except if only one camera - You only need this config file.
# If you have more than one camera you MUST define one thread
# config file for each camera in addition to this config file.
##############################################################

# Remember: If you have more than one camera you must have one
# thread file for each camera. E.g. 2 cameras requires 3 files:
# This motion.conf file AND thread1.conf and thread2.conf.
# Only put the options that are unique to each camera in the
# thread config files. 
; thread /usr/local/etc/thread1.conf
; thread /usr/local/etc/thread2.conf    
; thread /usr/local/etc/thread3.conf
; thread /usr/local/etc/thread4.conf

So I edited the last lines so it looked like this:

thread /etc/motion/thread1.conf
thread /etc/motion/thread2.conf
; thread /usr/local/etc/thread3.conf
; thread /usr/local/etc/thread4.conf

Note that I changed the folder location since there is no thread.conf files in /usr/local/etc. They are found in the same place as motion.conf.

After that I had to go to each thread.conf file and change it to what I needed. There are 3 options that should be edited:

videodevice - Should be set to the /dev your webcam is using. To find out simply type find /dev -name video* in the terminal. It should show you the webcams you have. In my case it was video0 and video1.

input - This should be set to 8 if you are going to use a webcam, else use 1 if you are using a TV Card.

target_dir - It should be set to where you want the captured images to go.

Lastly all other options are in the motion.conf file like web server, amount of capture images when movement is detected, etc..

After that run motion with sudo sudo motion to start capturing.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .