forked from fsphil/fswebcam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fswebcam.1
441 lines (363 loc) · 11.6 KB
/
fswebcam.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
.TH FSWEBCAM "1" "18 November 2010" "fswebcam 20101118" "User Commands"
.SH NAME
fswebcam \- Small and simple webcam for *nix.
.SH SYNOPSIS
.B fswebcam
[\fI<options>\fR] \fI<filename>\fR [[\fI<options>\fR] \fI<filename>\fR ... ]
.SH DESCRIPTION
.PP
fswebcam is a small and simple webcam app for *nix. It can capture images from a number of different sources and perform simple manipulation on the captured image. The image can be saved as one or more PNG or JPEG files.
.PP
The PNG or JPEG image can be sent to stdio using the filename "\-". The output filename is formatted by \fBstrftime\fR.
.SH CONFIGURATION
.SS
Configuration File
.TP
Config files use the long version of options without the "\-\-" prefix. Comments start with a # symbol at the beginning of the line.
.SS
General Options
.TP
\fB\-?\fR, \fB\-\-help\fR
Show a usage summary.
.TP
\fB\-c\fR, \fB\-\-config\fR
Load options from a file. You can load more than one config file, and can mix them with command\-line arguments.
Note: This option can not be used from within a configuration file.
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Hides all messages except errors.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Print extra information during the capture process.
.TP
\fB\-\-version\fR
Print the version number and exit.
.TP
\fB\-l\fR, \fB\-\-loop\fR \fI<frequency>\fR
Continually capture images. The time between images is specified in seconds.
.IP
Default behaviour is to capture a single image and exit.
.IP
\fINote\fR: The time to capture the next image is calculated relative to the epoch, so an image will not be captured immediately when the program is first started.
.TP
\fB\-\-offset\fR \fI<seconds>\fR
Sets the offset to use when calculating when the next image is due in loop mode. Value can be positive or negative.
.TP
\fB\-b\fR, \fB\-\-background\fR
Run in the background. In this mode \fIstdout\fR and console logging are unavailable.
.TP
\fB\-\-pid\fR \fI<filename>\fR
Saves the PID of the background process to the specified file. Ignored when not using background mode.
.TP
\fB\-\-log\fR \fI[file/syslog:]<filename>\fR
Redirect log messages to a file or syslog. For example
.IP
\-\-log output.log
.br
\-\-log file:output.log
.br
\-\-log syslog
.TP
\fB\-\-gmt\fR
Use GMT instead of the local timezone when formatting text with \fBstrftime\fR.
.SS
Capture Options
.TP
\fB\-d\fR, \fB\-\-device\fR \fI[<prefix>:]<device name>\fR
Set the source or device to use. The source module is selected automatically unless specified in the prefix.
.IP
Default is \fI/dev/video0\fR.
.IP
Available source modules, in order of preference:
.IP
V4L2 \- Capture images from a V4L2 compatible video device.
.br
V4L1 \- Capture images from a V4L1 compatible video device.
.br
FILE \- Capture an image from a JPEG or PNG image file.
.br
RAW \- Reads images straight from a device or file.
.br
TEST \- Draws colour bars.
.TP
\fB\-i\fR, \fB\-\-input\fR \fI<input number or name>\fR
Set the input to use. You may select an input by either it's number or name.
.IP
Default is "0".
.TP
\fB\-\-list\-inputs\fR
List available inputs for the selected source or device.
.IP
fswebcam \-d v4l2:/dev/video1 \-\-list\-inputs
.TP
\fB\-t\fR, \fB\-\-tuner\fR \fI<tuner number>\fR
Set the tuner to use.
.TP
\fB\-f\fR, \fB\-\-frequency\fR \fI<frequency>\fR
Set the frequency of the selected input or tuner. The value may be read as KHz or MHz depending on the input or tuner.
.TP
\fB\-p\fR, \fB\-\-palette\fR \fI<name>\fR
Try to use the specified image format when capturing the image.
.IP
Default is to select one automatically.
.IP
Supported formats:
.IP
PNG
.br
JPEG
.br
MJPEG
.br
S561
.br
RGB32
.br
RGB24
.br
BGR32
.br
BGR24
.br
YUYV
.br
UYVY
.br
YUV420P
.br
BAYER
.br
SGBRG8
.br
SGRBG8
.br
RGB565
.br
RGB555
.br
Y16
.br
GREY
.TP
\fB\-r\fR, \fB\-\-resolution\fR \fI<dimensions>\fR
Set the image resolution of the source or device. The actual resolution used may differ if the source or device cannot capture at the specified resolution.
.IP
Default is "384x288".
.TP
\fB\-\-fps\fR \fI<frames per second>\fR
Sets the frame rate of the capture device. This currently only works with certain V4L2 devices.
.IP
Default is "0", let the device decide.
.TP
\fB\-F\fR, \fB\-\-frames\fR \fI<number>\fR
Set the number of frames to capture. More frames mean less noise in the final image, however capture times will be longer and moving objects may appear blurred.
.IP
Default is "1".
.TP
\fB\-S\fR, \fB\-\-skip\fR \fI<number>\fR
Set the number of frames to skip. These frames will be captured but won't be use. Use this option if your camera sends some bad or corrupt frames when it first starts capturing.
.IP
Default is "0".
.TP
\fB\-D\fR, \fB\-\-delay\fR \fI<delay>\fR
Inserts a delay after the source or device has been opened and initialised, and before the capture begins. Some devices need this delay to let the image settle after a setting has changed. The delay time is specified in seconds.
.TP
\fB\-R\fR, \fB\-\-read\fR
Use read() to capture images. This can be slower but more stable with some devices.
.IP
Default is to use mmap(), falling back on read() if mmap() is unavailable.
.TP
\fB\-s\fR, \fB\-\-set\fR \fI<name=value>\fI
Set a control. These are used by the source modules to control image or device parameters. Numeric values can be expressed as a percentage of there maximum range or a literal value, for example:
.IP
\-\-set brightness=50%
\-\-set framerate=5
.IP
Non\-numeric controls are also supported:
.IP
\-\-set lights=on
.IP
V4L2 features a type of control called a 'button'. These controls do not take any value, but trigger an action. For example:
.IP
\-\-set "Restore Factory Settings"
.IP
Control names and values are not case sensitive.
.IP
\fINote\fR: Available controls will vary depending in the source module and devices used. For more information see the \fB\-\-list\-controls\fR option.
.TP
\fB\-\-list\-controls\fR
List available controls and their current values for the selected source module and device. For example:
.IP
fswebcam \-d v4l2:/dev/video2 \-\-list\-controls
.SS
Output Options
.TP
These options are performed in the order they appear on the command line, only effecting images output later on the command line. For example:
.IP
fswebcam \-r 640x480 output1.jpeg \-\-scale 320x240 output2.jpeg
.IP
Will create two images, "output1.jpeg" containing a full resolution copy of the captured image and "output2.jpeg" containing the same captured image but scaled to half the size.
.TP
\fB\-\-no\-banner\fR
Disable the banner.
.TP
\fB\-\-top\-banner\fR
Position the banner at the top of the image.
.TP
\fB\-\-bottom\-banner\fR
Position the banner at the bottom of the image.
.IP
This is the default.
.TP
\fB\-\-banner\-colour\fR \fI<#AARRGGBB>\fR
Set the colour of the banner. Uses the web\-style hexadecimal format (#RRGGBB) to describe the colour, and can support an alpha channel (#AARRGGBB). Examples:
.IP
"#FF0000" is pure red.
.br
"#80000000" is semi\-transparent black.
.br
"#FF000000" is invisible (alpha channel is at maximum).
.br
Default is "#40263A93".
.TP
\fB\-\-line\-colour\fR \fI<#AARRGGBB>\fR
Set the colour of the divider line. See \fB\-\-banner\-colour\fR for more information.
.IP
Default is "#00FF0000".
.TP
\fB\-\-text\-colour\fR \fI<#AARRGGBB>\fR
Set the colour of the text. See \fB\-\-banner\-colour\fR for more information.
.IP
Default is "#00FFFFFF".
.TP
\fB\-\-font\fR \fI<[file or font name]:[font size]>\fR
Set the font used in the banner. If no path is specified the path in the GDFONTPATH environment variable is searched for the font. Fontconfig names may also be used if the GD library has support.
.IP
If no font size is specified the default of "10" will be used.
.IP
Default is "sans:10".
.TP
\fB\-\-no\-shadow\fR
Disable the text shadow.
.TP
\fB\-\-shadow\fR
Enable the text shadow.
.IP
This is the default behaviour.
.TP
\fB\-\-title\fR \fI<text>\fR
Set the main text, located in the top left of the banner.
.TP
\fB\-\-no\-title\fR
Clear the main text.
.TP
\fB\-\-subtitle\fR \fI<text>\fR
Set the sub\-title text, located in the bottom left of the banner.
.TP
\fB\-\-no\-subtitle\fR
Clear the sub\-title text.
.TP
\fB\-\-timestamp\fR \fI<text>\fR
Set the timestamp text, located in the top right of the banner. This string is formatted by \fBstrftime\fP.
.IP
Default is "%Y\-%m\-%d %H:%M (%Z)".
.TP
\fB\-\-no\-timestamp\fR
Clear the timestamp text.
.TP
\fB\-\-info\fR \fI<text>\fR
Set the info text, located in the bottom right of the banner.
.TP
\fB\-\-no\-info\fR
Clear the info text.
.TP
\fB\-\-underlay\fR \fI<filename>\fR
Load a PNG image and overlay it on the image, below the banner. The image is aligned to the top left.
.IP
\fINote\fR: The underlay is only applied when saving an image and is not modified by any of the image options or effects.
.TP
\fB\-\-no\-underlay\fR
Clear the underlay image.
.TP
\fB\-\-overlay\fR \fI<filename>\fR
Load a PNG image and overlay on the image, above the banner. The image is aligned to the top left.
.IP
\fINote\fR: The overlay is only applied when saving an image and is not modified by any of the image options or effects.
.TP
\fB\-\-no\-overlay\fR
Remove the overlay image.
.TP
\fB\-\-jpeg\fR \fI<factor>\fR
Set JPEG as the output image format. The compression factor is a value between 0 and 95, or \-1 for automatic.
.IP
This is the default format, with a factor of "\-1".
.TP
\fB\-\-png\fR \fI<factor>\fR
Set PNG as the output image format. The compression factor can be a value between 0 and 9, or \-1 for automatic.
.TP
\fB\-\-save\fR \fI<filename>\fR
Saves the image to the specified filename.
Note: This isn't necessary on the command\-line where a filename alone is enough to save an image.
.TP
\fB\-\-revert\fR
Revert to the original captured image and resolution. This undoes all previous effects on the image.
Note: This only reverts the image itself, and not options such as font, colours and overlay.
.TP
\fB\-\-flip\fR \fI<direction[,direction]>\fI
Flips the image. Direction can be (h)orizontal or (v)ertical. Example:
.IP
\-\-flip h Flips the image horizontally.
.br
\-\-flip h,v Flips the image both horizontally and vertically.
.TP
\fB\-\-crop\fR \fI<dimensions[,offset]>\fR
Crop the image. With no offset the cropped area will be the center of the image. Example:
.IP
\-\-crop 320x240 Crops the center 320x240 area of the image.
.br
\-\-crop 10x10,0x0 Crops the 10x10 area at the top left corner of the image.
.TP
\fB\-\-scale\fR <dimensions>
Scale the image.
.IP
Example: "\-\-scale 640x480" scales the image up or down to 640x480.
.IP
\fINote:\fR The aspect ratio of the image is not maintained.
.TP
\fB\-\-rotate\fR \fI<angle>\fR
Rotate the image in right angles (90, 180 and 270 degrees).
.IP
\fINote:\fR Rotating the image 90 or 270 degrees will swap the dimensions.
.TP
\fB\-\-deinterlace\fR
Apply a simple deinterlacer to the image.
.TP
\fB\-\-invert\fR
Invert all the colours in the image, creating a negative.
.TP
\fB\-\-greyscale\fR
Remove all colour from the image.
.TP
\fB\-\-swapchannels\fR <c1c2>
Swap colour channels c1 and c2. Valid channels are R, G and B \-\- for Red, Green and Blue channels respectively.
Example: "\-\-swapchannels RB" will swap the red and blue channels.
.TP
\fB\-\-exec\fR <command>
Executes the specified command and waits for it to complete before continuing. The command line is formatted by \fBstrftime\fR.
.SH SIGNALS
.TP
\fBSIGHUP\fR
This causes fswebcam to reload it's configuration.
.TP
\fBSIGUSR1\fR
Causes fswebcam to capture an image immediately without waiting on the timer in loop mode.
.SH KNOWN BUGS
The spacing between letters may be incorrect. This is an issue with the GD library.
.SH REPORTING BUGS
Please report bugs to <[email protected]>.
.SH SEE ALSO
\fB
ncftpput(1), strftime(3)
\fP
.SH AUTHOR
Written by Philip Heron <[email protected]>.