How to set up a Linux webcam server
Do you have webcamera at home for no use? The camera is never used but you have thought about getting some home surveillance? If you want to do something with your old camera you can with almost no money at all set up a server which uploads pictures to an FTP server and you can see what is going on on your street when you are out traveling or at your work. Remember not to misuse the setup for illegal purposes, do not blame me when someone said that you should not have sneak peeked at your neighbor with a webcam!
You will need:
- A webcam (Linux compatible)
- A copy of webcam
- A web server
If you’re on Debian or Ubuntu you can simply install webcam with:
~$ apt-get install webcam
To configure the program we change the config file (.webcamrc), use your favorite texteditor:
~$ vi .webcamrc
Add the following:
[grab]
device = /dev/video0
text = "MyCamera %H:%M:%S"
fg_red = 255
fg_green = 255
fg_blue = 255
width = 320
height = 240
delay = 3
wait = 0
norm = pal
rotate = 0
top = 0
left = 0
bottom = -1
right = -1
quality = 100
trigger = 0
once = 0
[ftp]
host = example.com
user = youruser
pass = yourpassword
dir = /var/www/cam/
file = webcam.jpg
tmp = uploading.jpg
passive = 1
debug = 0
auto = 0
local = 0
ssh = 0
Replace example.com with your own hostname, youruser with your username and yourpassword with the password at your FTP server.
In your console, type:
~$ webcam
And the program will be started, this should do it and if you have done this right you will be able to see an image from your webcam at http://example.com/cam/webcam.jpg
All done! Tell me, what did you point your camera at?



Mm.. det låter faktiskt lite kul o ha en egen cctv kamera på sin gata. Lite ork att sätta ihop skiten men det går nog om man vill!
Bra inlägg!
Alm
May 23, 2008 at 20:05