Archive for the RaspBerry-Pi Category

Raspberry-pi and CAM

Posted in RaspBerry-Pi with tags , , on May 10, 2013 by kiranopatil

Setup a webcam security system with Raspberry-pi

What you need:

•           Raspberry Pi with an OS installed

index

•           One or more USB web cameras

176-85-LOCC110

What you can do:

•           Motion detection – record video/and or frames if there is motion.

•           Taking snapshots of movement

•           Snapshot intervals – take time interval snapshots regardless of motion detection.

•           Live video IP stream in mjpeg format.

•           Watch multiple video devices at the same time using Google Chrome Extension

https://chrome.google.com/webstore/detail/cctv-view/oajmcmcpiboagipoflploplebgicaadj/reviews/

•           Specify recorded video to be saved in your choice mpeg, avi, flv, swf format.

Steps:

1.  Plugin your webcam.

For me, Logitech Webcam C110 worked fine.

Please ensuring that you have the latest software and drivers installed on pi by running

# sudo apt-get update

# sudo apt-get upgrade

2.  Install Motion and also following applications

# sudo apt-get install motion

#sudo apt-get install mplayer

#sudo apt-get install ffmpeg

#sudo apt-get install motion

#sudo apt-get install feh     (image viewer)

#sudo apt-get install screen

3. Plug in web cam

pi@raspberrypi ~ $ lsusb

Bus 001 Device 005: ID 046d:0829 Logitech, Inc.

4. Configure Motion

# vi /etc/motion/motion.conf

##########################START######################

daemon=on

norm=3

input=8

auto_brightness=on

framerate=5

height=240width=320

jpeg_filename=motion/%Y%m%d/%v-%H%M%S-%q

noise_tune=on

output_all=off

output_motion=on

output_normal=on

quality=1000

snapshot_interval=500

target_dir=/home/pi/motion

text_left=(c) Kiran

text_right=%d %b %Y\n%k:%M:%S

threshold=500

v4l2_palette=6

videodevice=/dev/video0

webcam_localhost=off

webcam_maxrate=50

webcam_port=8080

wecam_quality=100

##########################END######################

# sudo  /etc/init.d/motion restart

  1. Create a directory

# /home/pi/.motion.

In this directory, create the configuration file motion.conf for motion. When started with this configuration file, the webcam creates JPG images and AVI video, and start a web server on port 8080.

Setup the internal network to forward requests on a specific external port to the Raspberry Pi’s webcam port.

View the camera on the Pi through the web interface

to check it, visit http://PI_ip:8080 and you are able get a stream.

Rasp_Cam

Advertisements