FPS option part 2
[fswebcam.git] / fswebcam.1
blob45d435ecc36e7d792d29c91783b1d6d2f27eb757
1 .TH FSWEBCAM "1" "24 December 2009" "fswebcam 20091224" "User Commands"
2 .SH NAME
3 fswebcam \- Small and simple webcam for *nix.
4 .SH SYNOPSIS
5 .B fswebcam
6 [\fI<options>\fR] \fI<filename>\fR [[\fI<options>\fR] \fI<filename>\fR ... ]
7 .SH DESCRIPTION
8 .PP
9 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.
10 .PP
11 The PNG or JPEG image can be sent to stdio using the filename "\-". The output filename is formatted by \fBstrftime\fR.
13 .SH CONFIGURATION
15 .SS
16 Configuration File
18 .TP
19 Config files use the long version of options without the "\-\-" prefix. Comments start with a # symbol at the beginning of the line.
21 .SS
22 General Options
24 .TP
25 \fB\-?\fR, \fB\-\-help\fR
26 Show a usage summary.
28 .TP
29 \fB\-c\fR, \fB\-\-config\fR
30 Load options from a file. You can load more than one config file, and can mix them with command\-line arguments.
32 Note: This option can not be used from within a configuration file.
34 .TP
35 \fB\-q\fR, \fB\-\-quiet\fR
36 Hides all messages except errors.
38 .TP
39 \fB\-v\fR, \fB\-\-verbose\fR
40 Print extra information during the capture process.
42 .TP
43 \fB\-\-version\fR
44 Print the version number and exit.
46 .TP
47 \fB\-l\fR, \fB\-\-loop\fR \fI<frequency>\fR
48 Continually capture images. The time between images is specified in seconds.
49 .IP
50 Default behaviour is to capture a single image and exit.
51 .IP
52 \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.
54 .TP
55 \fB\-\-offset\fR \fI<seconds>\fR
56 Sets the offset to use when calculating when the next image is due in loop mode. Value can be positive or negative.
58 .TP
59 \fB\-b\fR, \fB\-\-background\fR
60 Run in the background. In this mode \fIstdout\fR and console logging are unavailable.
62 .TP
63 \fB\-\-pid\fR \fI<filename>\fR
64 Saves the PID of the background process to the specified file. Ignored when not using background mode.
66 .TP
67 \fB\-\-log\fR \fI[file/syslog:]<filename>\fR
68 Redirect log messages to a file or syslog. For example
69 .IP
70 \-\-log output.log
71 .br
72 \-\-log file:output.log
73 .br
74 \-\-log syslog
76 .TP
77 \fB\-\-gmt\fR
78 Use GMT instead of the local timezone when formatting text with \fBstrftime\fR.
80 .SS
81 Capture Options
83 .TP
84 \fB\-d\fR, \fB\-\-device\fR \fI[<prefix>:]<device name>\fR
85 Set the source or device to use. The source module is selected automatically unless specified in the prefix.
86 .IP
87 Default is \fI/dev/video0\fR.
88 .IP
89 Available source modules, in order of preference:
90 .IP
91 V4L2 \- Capture images from a V4L2 compatible video device.
92 .br
93 V4L1 \- Capture images from a V4L1 compatible video device.
94 .br
95 FILE \- Capture an image from a JPEG or PNG image file.
96 .br
97 RAW \- Reads images straight from a device or file.
98 .br
99 TEST \- Draws colour bars.
102 \fB\-i\fR, \fB\-\-input\fR \fI<input number or name>\fR
103 Set the input to use. You may select an input by either it's number or name.
105 Default is "0".
108 \fB\-\-list\-inputs\fR
109 List available inputs for the selected source or device.
111 fswebcam \-d v4l2:/dev/video1 \-\-list\-inputs
114 \fB\-t\fR, \fB\-\-tuner\fR \fI<tuner number>\fR
115 Set the tuner to use.
118 \fB\-f\fR, \fB\-\-frequency\fR \fI<frequency>\fR
119 Set the frequency of the selected input or tuner. The value may be read as KHz or MHz depending on the input or tuner.
122 \fB\-p\fR, \fB\-\-palette\fR \fI<name>\fR
123 Try to use the specified image format when capturing the image.
125 Default is to select one automatically.
127 Supported formats:
131 JPEG
133 MJPEG
135 RGB32
137 RGB24
139 BGR32
141 BGR24
143 YUYV
145 UYVY
147 YUV420P
149 BAYER
151 RGB565
153 RGB555
155 GREY
158 \fB\-r\fR, \fB\-\-resolution\fR \fI<dimensions>\fR
159 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.
161 Default is "384x288".
164 \fB\-\-fps\fR \fI<frames per second>\fR
165 Sets the frame rate of the capture device. This currently only works with certain V4L2 devices.
167 Default is "0", let the device decide.
170 \fB\-F\fR, \fB\-\-frames\fR \fI<number>\fR
171 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.
173 Default is "1".
176 \fB\-S\fR, \fB\-\-skip\fR \fI<number>\fR
177 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.
179 Default is "0".
182 \fB\-D\fR, \fB\-\-delay\fR \fI<delay>\fR
183 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.
186 \fB\-R\fR, \fB\-\-read\fR
187 Use read() to capture images. This can be slower but more stable with some devices.
189 Default is to use mmap(), falling back on read() if mmap() is unavailable.
192 \fB\-s\fR, \fB\-\-set\fR \fI<name=value>\fI
193 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:
195 \-\-set brightness=50%
196 \-\-set framerate=5
198 Non\-numeric controls are also supported:
200 \-\-set lights=on
202 V4L2 features a type of control called a 'button'. These controls do not take any value, but trigger an action. For example:
204 \-\-set "Restore Factory Settings"
206 Control names and values are not case sensitive.
208 \fINote\fR: Available controls will vary depending in the source module and devices used. For more information see the \fB\-\-list\-controls\fR option.
211 \fB\-\-list\-controls\fR
212 List available controls and their current values for the selected source module and device. For example:
214 fswebcam \-d v4l2:/dev/video2 \-\-list\-controls
217 Output Options
220 These options are performed in the order they appear on the command line, only effecting images output later on the command line. For example:
222 fswebcam \-r 640x480 output1.jpeg \-\-scale 320x240 output2.jpeg
224 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.
227 \fB\-\-no\-banner\fR
228 Disable the banner.
231 \fB\-\-top\-banner\fR
232 Position the banner at the top of the image.
235 \fB\-\-bottom\-banner\fR
236 Position the banner at the bottom of the image.
238 This is the default.
241 \fB\-\-banner\-colour\fR \fI<#AARRGGBB>\fR
242 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:
244 "#FF0000" is pure red.
246 "#80000000" is semi\-transparent black.
248 "#FF000000" is invisible (alpha channel is at maximum).
250 Default is "#40263A93".
253 \fB\-\-line\-colour\fR \fI<#AARRGGBB>\fR
254 Set the colour of the divider line. See \fB\-\-banner\-colour\fR for more information.
256 Default is "#00FF0000".
259 \fB\-\-text\-colour\fR \fI<#AARRGGBB>\fR
260 Set the colour of the text. See \fB\-\-banner\-colour\fR for more information.
262 Default is "#00FFFFFF".
265 \fB\-\-font\fR \fI<[file or font name]:[font size]>\fR
266 Set the font used in the banner. If no path is specified the path in the GDFONTPATH environment variable is searched for the font.
268 If no font size is specified the default of "10" will be used.
270 Default is "luxisr:10".
273 \fB\-\-no\-shadow\fR
274 Disable the text shadow.
277 \fB\-\-shadow\fR
278 Enable the text shadow.
280 This is the default behaviour.
283 \fB\-\-title\fR \fI<text>\fR
284 Set the main text, located in the top left of the banner.
287 \fB\-\-no\-title\fR
288 Clear the main text.
291 \fB\-\-subtitle\fR \fI<text>\fR
292 Set the sub\-title text, located in the bottom left of the banner.
295 \fB\-\-no\-subtitle\fR
296 Clear the sub\-title text.
299 \fB\-\-timestamp\fR \fI<text>\fR
300 Set the timestamp text, located in the top right of the banner. This string is formatted by \fBstrftime\fP.
302 Default is "%Y\-%m\-%d %H:%M (%Z)".
305 \fB\-\-no\-timestamp\fR
306 Clear the timestamp text.
309 \fB\-\-info\fR \fI<text>\fR
310 Set the info text, located in the bottom right of the banner.
313 \fB\-\-no\-info\fR
314 Clear the info text.
317 \fB\-\-underlay\fR \fI<filename>\fR
318 Load a PNG image and overlay it on the image, below the banner. The image is aligned to the top left.
320 \fINote\fR: The underlay is only applied when saving an image and is not modified by any of the image options or effects.
323 \fB\-\-no\-underlay\fR
324 Clear the underlay image.
327 \fB\-\-overlay\fR \fI<filename>\fR
328 Load a PNG image and overlay on the image, above the banner. The image is aligned to the top left.
330 \fINote\fR: The overlay is only applied when saving an image and is not modified by any of the image options or effects.
333 \fB\-\-no\-overlay\fR
334 Remove the overlay image.
337 \fB\-\-jpeg\fR \fI<factor>\fR
338 Set JPEG as the output image format. The compression factor is a value between 0 and 95, or \-1 for automatic.
340 This is the default format, with a factor of "\-1".
343 \fB\-\-png\fR \fI<factor>\fR
344 Set PNG as the output image format. The compression factor can be a value between 0 and 9, or \-1 for automatic.
347 \fB\-\-save\fR \fI<filename>\fR
348 Saves the image to the specified filename.
350 Note: This isn't necessary on the command\-line where a filename alone is enough to save an image.
353 \fB\-\-revert\fR
354 Revert to the original captured image and resolution. This undoes all previous effects on the image.
356 Note: This only reverts the image itself, and not options such as font, colours and overlay.
359 \fB\-\-flip\fR \fI<direction[,direction]>\fI
360 Flips the image. Direction can be (h)orizontal or (v)ertical. Example:
362 \-\-flip h    Flips the image horizontally.
364 \-\-flip h,v  Flips the image both horizontally and vertically.
367 \fB\-\-crop\fR \fI<dimensions[,offset]>\fR
368 Crop the image. With no offset the cropped area will be the center of the image. Example:
370 \-\-crop 320x240    Crops the center 320x240 area of the image.
372 \-\-crop 10x10,0x0  Crops the 10x10 area at the top left corner of the image.
375 \fB\-\-scale\fR <dimensions>
376 Scale the image.
378 Example: "\-\-scale 640x480" scales the image up or down to 640x480.
380 \fINote:\fR The aspect ratio of the image is not maintained.
383 \fB\-\-rotate\fR \fI<angle>\fR
384 Rotate the image in right angles (90, 180 and 270 degrees).
386 \fINote:\fR Rotating the image 90 or 270 degrees will swap the dimensions.
389 \fB\-\-deinterlace\fR
390 Apply a simple deinterlacer to the image.
393 \fB\-\-invert\fR
394 Invert all the colours in the image, creating a negative.
397 \fB\-\-exec\fR <command>
398 Executes the specified command and waits for it to complete before continuing. The command line is formatted by \fBstrftime\fR.
400 .SH SIGNALS
403 \fBSIGHUP\fR
404 This causes fswebcam to reload it's configuration.
407 \fBSIGUSR1\fR
408 Causes fswebcam to capture an image immediately without waiting on the timer in loop mode.
410 .SH KNOWN BUGS
411 The spacing between letters may be incorrect. This is an issue with the GD library.
413 .SH REPORTING BUGS
414 Please report bugs to <phil@firestorm.cx>.
416 .SH SEE ALSO
418 ncftpput(1), strftime(3)
421 .SH AUTHOR
422 Written by Philip Heron <phil@firestorm.cx>.