Friday, November 1, 2013

Rapspberry Pi Webcam

Next trial with RP, this time setting up a webcam over HTTP.

I followed the steps:

1. Connect webcam to USB port, check device is recognized


lsusb
I got:

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 046d:0802 Logitech, Inc. Webcam C200
Bus 001 Device 005: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter


2. Install Motion



sudo apt-get install motion
3. configure Motion



sudo nano /etc/motion/motion.conf
This is my file:

daemon=on
norm=3
input=8
auto_brightness=on
framerate=2
height=480
width=640
jpeg_filename=motion/%Y%m%d/%v-%H%M%S-%q
noise_tune=on
output_all=off
output_motion=off
output_normal=on
quality=100
snapshot_interval=300
target_dir=/home/pi
text_left=(c) Nestcam
text_right=%d %b %Y\n%k:%M:%S
threshold=500
v4l2_palette=6
videodevice=/dev/video0
webcam_localhost=off
webcam_maxrate=2
webcam_port=8080
wecam_quality=100

sudo nano /etc/default/motion
It should be:

start_motion_daemon=yes

4. Start motion daemon:

sudo /etc/init.d/motion start

Check logfile for any errors:

tail -f /var/log/syslog

If all is fine open in browser http://<your Raspberry Pi IP address>:8080



No comments:

Post a Comment