Webcam under linux
 
To use a webcam under linux, the simple program "webcam" can be used. In this example, Debian Lenny and the webcam "Mustik Wcam 3X" was used.
Start by installing required packages:
apt-get install webcam xawtv
The package "xawtv" includes "v4lctl".

To see what webcam you have connected to your computer, execute
v4lctl list:
attribute | type  | current | default | comment
-----------+--------+---------+---------+-------------------------------------
norm    | choice | NTSC-M | NTSC-M | NTSC-M NTSC-M-JP NTSC-443 PAL-BG PAL-I PAL-DK PAL-M PAL-N PAL-Nc PAL-60 SECAM-DK SECAM-L
input   | choice | Televis | Televis | Television for debug only Composite1 S-Video
audio mode | choice | mono  | mono  | mono stereo lang1 lang2
bright   | int  |   127 |   127 | range is 0 => 255
contrast  | int  |   63 |   63 | range is 0 => 255
color   | int  |   127 |   127 | range is 0 => 255
hue    | int  |   127 |   127 | range is 0 => 255
volume   | int  |   63 |   63 | range is 0 => 63
Balance  | int  |   64 |   64 | range is 0 => 127
mute    | bool  | on   | on   |
Chroma AGC | bool  | on   | on   |
Color kill | bool  | on   | on   |

In my example you see, that the "input"-parameter should be "Televis". Now knowing that, define a "~/.webcamrc"-file:
[grab]
device = /dev/video1
text = Home %d-%b-%Y %H:%M:%S
fg_red = 255
fg_green = 255
fg_blue = 255
width=640
height=480
delay = 1
wait = 1
rotate = 0
top = 0
left = 0
bottom = -1
right = -1
quality = 100
trigger = 180
once = 0

[local]
dir = /var/www
file = webcam.jpeg
tmp = uploading.jpeg
debug = 0
auto = 0
local = 1
ssh = 0


After executing webcam, the picture of your webcam should be saved in "/var/www/webcam.jpeg".

Source http://www.seismo2009.ethz.ch/linux/webcam.html
 
admin / Nov 01, 2009
   
 
 
Login: 
Pass: 
 
 
     
     
2004 - 2017 / lookass.ch
makememad@lookass.ch