1webcam(1) General Commands Manual webcam(1)
2
3
4
6 webcam - capture images and upload them to a webserver using ftp
7
9 webcam [ config file ]
10
12 webcam captures images from a video4linux device like bttv, annotates
13 them and and uploads them to a webserver using ftp in a endless loop.
14
16 At startup webcam reads the configuration from the given config file or
17 ~/.webcamrc if none is specified in the command line.
18
19 The config file has at least two sections. The "grab" section holds
20 the capture parameters. Any other section describes where the image
21 should be uploaded. Older versions used "ftp" as name for that sec‐
22 tion. Recently the webcam utility got support for multiple connec‐
23 tions, thus any section name is accepted and you can have more than one
24 ftp section (you have to use another name for each section througth,
25 name them by upload servers for example).
26
27 Here is an sample config file (the given values are the defaults):
28
29 [grab]
30 device = /dev/video0
31 driver = libv4l
32 text = "webcam %Y-%m-%d %H:%M:%S"
33 infofile = filename
34 fg_red = 255
35 fg_green = 255
36 fg_blue = 255
37 width = 320
38 height = 240
39 delay = 3
40 wait = 0
41 input = composite1
42 norm = pal
43 rotate = 0
44 top = 0
45 left = 0
46 bottom = -1
47 right = -1
48 quality = 75
49 trigger = 0
50 once = 0
51
52 [ftp]
53 host = www
54 user = webcam
55 pass = xxxxxx
56 dir = public_html/images
57 file = webcam.jpeg
58 tmp = uploading.jpeg
59 passive = 1
60 debug = 0
61 auto = 0
62 local = 0
63 ssh = 0
64
65 The annotation text is processed with strftime. Check the strftime(3)
66 or date(1) manpage to see how you can format the timestamps. The text
67 can also be read from a extern file (use infofile for that). The
68 default color for the text overlay is white (RGB=255,255,255). Entries
69 in the range of 0 through 255 for fg_red, fg_green, and fg_blue can be
70 used to define a different color. Likewise bg_red, bg_green, and
71 bg_blue can be used to set the background color (which defaults to
72 transparent).
73
74 input is the video source (TV/composite/whatever), norm the TV norm.
75 delay is the delay between two images in seconds. wait is the initial
76 delay before the first image is grabbed (some cameras need some time
77 for adapting to lightning, thus don't return images with reasonable
78 quality within the first few seconds ...). quality is the JPEG quality
79 for the stored images.
80
81 top, bottom, left, and right in the grab section allow cropping the
82 image after it is grabbed. They should satisfy 0<=top<bottom<=height
83 and 0<=left<right<=width. (0,0 is the top, left corner.) If rotate is
84 positive, the output image will be rotated counter-clockwise 90 degrees
85 that number of times (1, 2, or 3).
86
87 With trigger set to a non-zero value webcam will upload the image only
88 if the content of the image has changed. It just looks for the maximum
89 difference between the last uploaded and current image and if it is
90 greater than the specified value the image will be uploaded. If once
91 is set to 1 webcam will upload a single frame and quit.
92
93 archive can be used to create a (local) archive of the webcam images.
94 Just specify the filename for the files as argument. The filename will
95 be processed with strftime(3), so you can use the place the usual time
96 format controls into the string to get unique filenames. Non-existing
97 directories are created if needed.
98
99 If debug in the ftp section is set to 1 the complete communication
100 between webcam and the ftp utility is printed to stderr. auto enables
101 autologin via ~/.netrc (starts the ftp utility without the '-n' switch,
102 check the ftp(1) man page for more info about the ~/.netrc file). If
103 local in the ftp section is non-zero, files will be stored locally
104 (using the dir, tmp, and file parameters) rather than ftped. ssh set
105 to non-zero makes webcam use ssh instead of ftp.
106
108 contributed by Frederic Helin, the parameters belong into the [grab]
109 section of the config file too.
110
111 distor = 1
112 If distor param is set to 1, the correction of distortion works.
113
114 distor_k = 700
115 This is the coefficient of distortion. This algorithm is based
116 on the paper "Correcting Distortion of Image by Image Registra‐
117 tion" of Toru Tamaki, Tsuyoshi Yamamura and Noboru Ahnishi. More
118 your lens has an important distortion, more 'distor_k' must be
119 neared of 0. 700 is the default value. Coefficient k of program
120 is x100 than article.
121
122 distor_cx = 192
123
124 distor_cy = 144
125 Coordinates of the lens optical axis: width/2 and height/2 are
126 the default values. The axis doesn't go through the image cen‐
127 ter. So, you can change its coordinates around the center of
128 image to affine correction.
129
130 distor_zoom = 30
131 Zoom parameter is used to cache the distorted borders of image,
132 if you don't like this. Default value is 100.
133
134 distor_sensorw = 320
135
136 distor_sensorh = 240
137 Dimensions of camera sensor. Default values are for 1/4p sensor.
138 This parameters used to have the same k coefficient than arti‐
139 cle.
140
142 Gerd Knorr <kraxel@bytesex.org>
143
145 Copyright (C) 1997-2002 Gerd Knorr
146 This program is distributed in the hope that it will be useful, but
147 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
148 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
149
150
151
152 (c) 1998-2000 Gerd Knorr webcam(1)