Video webcam
I received a wireless webcam for my birthday and this is how I integrated the stream into my webpage. You can see the result here , it is the “Front door webcam”.
First you need a TV card with an RCA Video input, this is a yellow coaxial connector. Connect the yellow male RCA connector from your webcam to the video input of the TV card and then using a tv viewer such as tvtime or Xawtv change the input source to S-Video. You should now see a video stream from the camera. If you are using an nVidia card use the command xawtv -noxv to start Xawtv otherwise you will only see a blue screen.
Using synaptic (or whatever) install “Motion”, which is a pretty powerful motion detecting software which has lots of great features that you can experiment with. For this exercise I will only really be using the built in web-server. Here is a link to the Motion Wiki.
You will now need to place a motion.conf file in your home folder, below is a copy of my basic configuration file. Motion delivers a Motion jpeg or MJPEG which doesn’t work in Internet Explorer although it works fine in the Mozilla browsers. Andy Wilcock has written a nice Java applet called Cambozola that enables MJPEG streams to be viewed in IE. Here is a link to Cambozola.
# Minimal motion example config file for webserver provided by Steve Young
daemon off
quiet on
# You may very well need to change this (check with 'dmesg'
# after plugging in your webcam).
videodevice /dev/video0
# Image size in pixels (valid range is camera dependent).
width 640
height 480
framerate 2
quality 100
#auto_brightness off
# General threshold level and noise threshold
# level (for distinguishing between noise and motion).
#threshold 30000
#noise_level 64
# Initial brightness, contrast, hue (NTSC), and saturation.
# 0 = disabled (valid range 0-255).
brightness 180
contrast 150
saturation 100
hue 0
# Encode movies in real-time (install ffmpeg before enabling).
#ffmpeg_cap_new off
# Codec to be used by ffmpeg for the video compression.
# Supported formats: mpeg4, msmpeg4.
#ffmpeg_video_codec msmpeg4
# Target base directory for pictures and films (you may need
# to change this (or change its permissions) depending on
# which system user runs motion).
#target_dir /home/steve/webcamTest
# Define a port number (e.g. 8000) to enable the mini-http server.
# 0 = disabled.
webcam_port 8081
# Set to 'off' to allow anybody (not just localhost) to view the
# webcam via the mini-http server (http://hostname:port).
webcam_localhost off
webcam_quality 100
webcam_maxrate 1
#Steves Options
text_double on
minimum_gap 100
control_port 8082
snapshot_interval 20000
snapshot_filename snap
output_normal off
#jpeg_filename motionjpg
rotate 90
Text_left "My Street"
very informative thanks very much.
Hosts Gate – Hosting – Reviews – Top 10 Hosts
I’m afraid the one webcam is offline at the moment. It is a wireless webcam (2.4GHz) and is interfering with my Wireless LAN!
Excellent! I’ve set up my webcam using this guide! thanks!