[c5c522c] | 1 | <?xml version="1.0"?> |
---|
| 2 | <!-- $Id: camsource.conf.example,v 1.56 2003/05/01 10:29:11 dfx Exp $ --> |
---|
| 3 | |
---|
| 4 | <!-- |
---|
| 5 | As there isn't any real documentation, this file is how to find out |
---|
| 6 | how to configure and use camsource. Most of it is module and filter |
---|
| 7 | config, but the first part (<camdev>) is crucial if you're having |
---|
| 8 | any kind of problems, so be sure you read it carefully. |
---|
| 9 | --> |
---|
| 10 | |
---|
| 11 | <camsourceconfig> |
---|
| 12 | |
---|
| 13 | <!-- Global config options --> |
---|
| 14 | <camdev> |
---|
| 15 | <!-- |
---|
| 16 | This section gives config options for the |
---|
| 17 | camera device. It instructs the hardware to |
---|
| 18 | grab the frames at a certain size, at a |
---|
| 19 | certain frame rate and from a certain input |
---|
| 20 | channel. Note that not all hardware supports |
---|
| 21 | every frame size, and not all hardware supports |
---|
| 22 | setting the frame rate (and if it does, not |
---|
| 23 | all frame rates are supported either). You will |
---|
| 24 | see a warning message if any of the settings here |
---|
| 25 | are incorrect. |
---|
| 26 | |
---|
| 27 | - The "plugin" tag defines which module should be |
---|
| 28 | used for this device entry. See below for |
---|
| 29 | for the <module> entries for the input plugins. |
---|
| 30 | Most of the other options given here are specific |
---|
| 31 | to a certain plugin type and will be different |
---|
| 32 | for other input plugins. |
---|
| 33 | - Path defaults to /dev/video0. |
---|
| 34 | - Width and height default to the maximum size |
---|
| 35 | as reported by the driver. You can specify |
---|
| 36 | "max" or "default" for the same effect, |
---|
| 37 | or "min" for the minimum size. |
---|
| 38 | - Fps and channel default to unchanged/not set. |
---|
| 39 | You can specify "default" for the same effect. |
---|
| 40 | - Norm can be "ntsc", "pal", "secam", or "auto". |
---|
| 41 | If not specified, it is undefined which norm |
---|
| 42 | will be used. Note that the norm setting will |
---|
| 43 | only be used if a channel is specified as well. |
---|
| 44 | - Brightness, hue, colour (note the spelling), |
---|
| 45 | contrast and whiteness are unsigned 16-bit |
---|
| 46 | integers (0-65535) which are passed verbatim to |
---|
| 47 | the video4linux layer if specified. The meaning |
---|
| 48 | of these fields is more or less driver-dependent, |
---|
| 49 | feel free to play around with them. If not |
---|
| 50 | specified or commented out, the default value |
---|
| 51 | will be left unchanged. Not all values are |
---|
| 52 | meaningful in all cases (for example 'whiteness' |
---|
| 53 | is normally only used for grayscale images). |
---|
| 54 | --> |
---|
| 55 | |
---|
| 56 | <plugin>input_v4l</plugin> |
---|
| 57 | |
---|
| 58 | <path>/dev/video0</path> |
---|
| 59 | <width>max</width> |
---|
| 60 | <height>max</height> |
---|
| 61 | <fps>15</fps> |
---|
| 62 | <channel>0</channel> |
---|
| 63 | <norm>auto</norm> |
---|
| 64 | |
---|
| 65 | <!-- <brightness>32767</brightness> --> |
---|
| 66 | <!-- <hue>32767</hue> --> |
---|
| 67 | <!-- <colour>32767</colour> --> |
---|
| 68 | <!-- <contrast>32767</contrast> --> |
---|
| 69 | <!-- <whiteness>32767</whiteness> --> |
---|
| 70 | |
---|
| 71 | <!-- |
---|
| 72 | The "autobrightness" setting controls a special algorithm |
---|
| 73 | within camsource to dynamically adjust the camera's |
---|
| 74 | brightness level. The value specifies the desired average |
---|
| 75 | brightness of the output images, in the range 0 through |
---|
| 76 | about 85. Values around 35 seem to produce good results. |
---|
| 77 | --> |
---|
| 78 | <!-- <autobrightness>35</autobrightness> --> |
---|
| 79 | |
---|
| 80 | <!-- |
---|
| 81 | You can define a command to be run when something or |
---|
| 82 | someone is requesting frames from this device. The first |
---|
| 83 | time a frame is requested, the program will get a 'start' |
---|
| 84 | event. The 'end' event will be fired after there has been |
---|
| 85 | no request for a frame for a certain time period, which |
---|
| 86 | you can specify with the <cmdtimeout> tag, in seconds. |
---|
| 87 | Note that the command will be run asynchronously in the |
---|
| 88 | background. Also note that these two tags are not |
---|
| 89 | specific to a certain input plugin, but can be used with |
---|
| 90 | every input plugin universally. |
---|
| 91 | The command gets the following arguments: |
---|
| 92 | - Event type, either 'start' or 'end'. |
---|
| 93 | - Camdev device name, either "default" or whatever name |
---|
| 94 | you gave it. |
---|
| 95 | - The name of the /dev/videoX device file. |
---|
| 96 | --> |
---|
| 97 | <!-- <cmd>~/bin/grabevent.sh</cmd> |
---|
| 98 | <cmdtimeout>5</cmdtimeout> --> |
---|
| 99 | |
---|
| 100 | <!-- |
---|
| 101 | Filters specified here will be applied to every framed grabbed |
---|
| 102 | by this device. More information about filters and filter |
---|
| 103 | modules can be found below. There is also a section with filters |
---|
| 104 | to apply to every frame, independent of device. |
---|
| 105 | |
---|
| 106 | This flip filter is here because my webcam produces mirrored |
---|
| 107 | images. If yours doesn't do this, you should probably remove this |
---|
| 108 | filter. |
---|
| 109 | --> |
---|
| 110 | <!-- |
---|
| 111 | <filter name="flip"> |
---|
| 112 | <horiz>yes</horiz> |
---|
| 113 | <vert>no</vert> |
---|
| 114 | </filter> |
---|
| 115 | --> |
---|
| 116 | </camdev> |
---|
| 117 | |
---|
| 118 | <!-- |
---|
| 119 | It is possible to have more than one input device active |
---|
| 120 | at the same time. Below is an example for how to grab |
---|
| 121 | from a second v4l device. The specified "name" attribute |
---|
| 122 | is used to uniquely identify this device; no two <camdev> |
---|
| 123 | sections can have the same name. The name defaults to |
---|
| 124 | "default". Use this name in the module configs to specify |
---|
| 125 | which device to grab images from. See the http module and |
---|
| 126 | one of the wc_serv module definitions below for examples. |
---|
| 127 | |
---|
| 128 | This example makes use of the "active" attribute of the |
---|
| 129 | <camdev> tag. If not specified, it defaults to "yes", for |
---|
| 130 | backwards compatibility. |
---|
| 131 | --> |
---|
| 132 | <camdev name="second" active="no"> |
---|
| 133 | <plugin>input_v4l</plugin> |
---|
| 134 | <path>/dev/video1</path> |
---|
| 135 | <width>max</width> |
---|
| 136 | <height>max</height> |
---|
| 137 | </camdev> |
---|
| 138 | |
---|
| 139 | <!-- |
---|
| 140 | This input plugin uses the "xwd" program to make screenshots |
---|
| 141 | of a local or remote x11 desktop, and uses those images |
---|
| 142 | as input to camsource. Currently this plugin only supports |
---|
| 143 | xwd dumps with 24 or 32 bits per pixel. |
---|
| 144 | --> |
---|
| 145 | <camdev name="xwd" active="no"> |
---|
| 146 | <plugin>input_xwd</plugin> |
---|
| 147 | <command>DISPLAY=:0 /usr/X11R6/bin/xwd -root -silent</command> |
---|
| 148 | </camdev> |
---|
| 149 | |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | |
---|
| 156 | <!-- |
---|
| 157 | If no logfile is given (or tag is empty), camsource |
---|
| 158 | will log to stdout only and not go into background. |
---|
| 159 | The prefix "~/" has the usual meaning. |
---|
| 160 | --> |
---|
| 161 | <logfile>~/.camsource.log</logfile> |
---|
| 162 | |
---|
| 163 | <!-- |
---|
| 164 | Available modules. A module will only be loaded |
---|
| 165 | if its "active" attribute is set to "yes", or if |
---|
| 166 | it's a dependency of another module. In any case, |
---|
| 167 | any module config given here is used. |
---|
| 168 | --> |
---|
| 169 | |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | <!-- This is the default video4linux input plugin. It has no |
---|
| 177 | global config options. --> |
---|
| 178 | <module name="input_v4l" active="yes"/> |
---|
| 179 | |
---|
| 180 | <!-- This is the xwd input plugin referenced above. --> |
---|
| 181 | <module name="input_xwd" active="no"/> |
---|
| 182 | |
---|
| 183 | |
---|
| 184 | |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | |
---|
| 188 | |
---|
| 189 | <module name="wc_serv" active="no"> |
---|
| 190 | <port>8888</port> |
---|
| 191 | |
---|
| 192 | <!-- |
---|
| 193 | Per-module filter. Works exactly the same as |
---|
| 194 | the global filters, only that the per-module |
---|
| 195 | filters are called from within the module's |
---|
| 196 | worker thread. |
---|
| 197 | The resize filter can either take a <height> |
---|
| 198 | and a <width> option, to resize the image |
---|
| 199 | to a fixed size, or a <scale> option to |
---|
| 200 | resize the image to a certain percentage of |
---|
| 201 | the original size. |
---|
| 202 | --> |
---|
| 203 | <filter name="resize"> |
---|
| 204 | <scale>50</scale> |
---|
| 205 | </filter> |
---|
| 206 | |
---|
| 207 | <!-- |
---|
| 208 | Another filter. But where is its config? The |
---|
| 209 | "text" module supports having and using a global |
---|
| 210 | config, specified in its <module> section. Any |
---|
| 211 | config options that are missing in the <filter> |
---|
| 212 | definition will be used from that global config, |
---|
| 213 | and those options that are specified here will |
---|
| 214 | override the global ones. See below for an |
---|
| 215 | example for this overriding. |
---|
| 216 | --> |
---|
| 217 | <filter name="text"/> |
---|
| 218 | </module> |
---|
| 219 | |
---|
| 220 | <!-- |
---|
| 221 | A second incarnation of the "wc_serv" module. It is |
---|
| 222 | possible to run the same worker module multiple times, |
---|
| 223 | each incarnation in its own thread. Each instance |
---|
| 224 | must have a unique name (the "alias" attribute). If |
---|
| 225 | no alias name is given, the actual module name is |
---|
| 226 | used as alias name. The actual module will always |
---|
| 227 | be loaded exactly once, if at least one of the aliased |
---|
| 228 | modules have "active" set to "yes". A module that is |
---|
| 229 | not active won't be run. A running worker module |
---|
| 230 | will receive a context pointer to the correct config |
---|
| 231 | to use, so it's possible to use the same module with |
---|
| 232 | different parameters/filters. |
---|
| 233 | --> |
---|
| 234 | <module name="wc_serv" alias="noresizewc" active="no"> |
---|
| 235 | <port>8889</port> |
---|
| 236 | |
---|
| 237 | <!-- |
---|
| 238 | Here's the example for option overriding in the |
---|
| 239 | text module. This filter will work the same as |
---|
| 240 | the above text filter, only that the text will |
---|
| 241 | be located in the top right corner. (Which doesn't |
---|
| 242 | make much sense, but hey, it's just an exmaple.) |
---|
| 243 | For a full description of all config options to |
---|
| 244 | the text module, see below in its <module> section. |
---|
| 245 | --> |
---|
| 246 | <filter name="text"> |
---|
| 247 | <pos>tr</pos> |
---|
| 248 | </filter> |
---|
| 249 | </module> |
---|
| 250 | |
---|
| 251 | <module name="wc_serv" alias="seconddev" active="no"> |
---|
| 252 | <!-- |
---|
| 253 | This instance of wc_serv would grab images not |
---|
| 254 | from the "default" device, but from another. |
---|
| 255 | The <grabdev> tag can be used universally. |
---|
| 256 | --> |
---|
| 257 | <grabdev>second</grabdev> |
---|
| 258 | <port>8890</port> |
---|
| 259 | </module> |
---|
| 260 | |
---|
| 261 | <!-- |
---|
| 262 | The http module. It lets you create virtual paths to |
---|
| 263 | serve various variants of the current image. The main |
---|
| 264 | section includes global config options (such as the |
---|
| 265 | port to listen on), and can also include filter definitions. |
---|
| 266 | Those global filters will be applied to every image |
---|
| 267 | served. |
---|
| 268 | In the main section, there should be one or more <vpath> |
---|
| 269 | sections. Each of these sections describes another |
---|
| 270 | variation of the image, with different properties, |
---|
| 271 | using different filters. When requesting a certain vpath |
---|
| 272 | from the http server, you can append a query string |
---|
| 273 | to the patch, which will be stripped and ignored when |
---|
| 274 | looking for the matching vpath. For example, you can |
---|
| 275 | put "http://somehost/pic?dummy=123" into your browser, |
---|
| 276 | and it will display the image with the "/pic" vpath |
---|
| 277 | setting. |
---|
| 278 | If you want to specify a custom jpeg compression quality |
---|
| 279 | with a <jpegqual> tag, you must specify it within |
---|
| 280 | the <vpath> definitions. There is no global config |
---|
| 281 | tag for this. |
---|
| 282 | Each vpath definition should contain one or more <path> |
---|
| 283 | tags, each of which can be used to access this image |
---|
| 284 | variant (those paths can be thought of as aliases). |
---|
| 285 | If a vpath section include an <fps> tag, the image |
---|
| 286 | will be served as multipart-jpeg stream, usable for |
---|
| 287 | plugin- and applet-less streaming on netscape/mozilla |
---|
| 288 | browsers. Without fps specification, only a single |
---|
| 289 | image will be served. |
---|
| 290 | --> |
---|
| 291 | <module name="http" active="yes"> |
---|
| 292 | <port>9192</port> |
---|
| 293 | |
---|
| 294 | <vpath> |
---|
| 295 | <path>/</path> |
---|
| 296 | <path>/small</path> |
---|
| 297 | |
---|
| 298 | <filter name="resize"> |
---|
| 299 | <scale>50</scale> |
---|
| 300 | </filter> |
---|
| 301 | |
---|
| 302 | <filter name="text"/> |
---|
| 303 | </vpath> |
---|
| 304 | |
---|
| 305 | <vpath> |
---|
| 306 | <path>/big</path> |
---|
| 307 | <path>/large</path> |
---|
| 308 | <filter name="text"/> |
---|
| 309 | </vpath> |
---|
| 310 | |
---|
| 311 | <vpath> |
---|
| 312 | <path>/largequal</path> |
---|
| 313 | <filter name="text"/> |
---|
| 314 | <jpegqual>80</jpegqual> |
---|
| 315 | </vpath> |
---|
| 316 | |
---|
| 317 | <vpath> |
---|
| 318 | <path>/multipart</path> |
---|
| 319 | <fps>2</fps> |
---|
| 320 | <filter name="resize"> |
---|
| 321 | <scale>50</scale> |
---|
| 322 | </filter> |
---|
| 323 | |
---|
| 324 | <filter name="text"/> |
---|
| 325 | </vpath> |
---|
| 326 | |
---|
| 327 | <vpath> |
---|
| 328 | <path>/multipart-large</path> |
---|
| 329 | <fps>1</fps> |
---|
| 330 | <filter name="text"/> |
---|
| 331 | </vpath> |
---|
| 332 | |
---|
| 333 | <!-- This example also shows how to deactivate |
---|
| 334 | one vpath --> |
---|
| 335 | <vpath active="no"> |
---|
| 336 | <!-- You can use the <grabdev> tag here too --> |
---|
| 337 | <grabdev>second</grabdev> |
---|
| 338 | <path>/othercam</path> |
---|
| 339 | </vpath> |
---|
| 340 | |
---|
| 341 | <vpath active="no"> |
---|
| 342 | <grabdev>xwd</grabdev> |
---|
| 343 | <path>/screenshot</path> |
---|
| 344 | <jpegqual>40</jpegqual> |
---|
| 345 | <!-- Can only be viewed if the correct login and password is given --> |
---|
| 346 | <auth>screen:shot</auth> |
---|
| 347 | </vpath> |
---|
| 348 | |
---|
| 349 | <vpath active="no"> |
---|
| 350 | <grabdev>xwd</grabdev> |
---|
| 351 | <path>/smallshot</path> |
---|
| 352 | <jpegqual>40</jpegqual> |
---|
| 353 | <auth>screen:shot</auth> |
---|
| 354 | <filter name="resize"> |
---|
| 355 | <scale>50</scale> |
---|
| 356 | </filter> |
---|
| 357 | </vpath> |
---|
| 358 | |
---|
| 359 | <vpath active="yes"> |
---|
| 360 | <!-- |
---|
| 361 | You can make the http module serve raw |
---|
| 362 | image data instead of jpegs with the |
---|
| 363 | <raw> tag. If enabled, the returned data |
---|
| 364 | will be X*Y*3 bytes of rgb data. The http |
---|
| 365 | headers will include the size of the image |
---|
| 366 | (X and Y). There's an example of how to use |
---|
| 367 | this data included with the camsource |
---|
| 368 | distribution as scripts/camsource2bmp.pl. |
---|
| 369 | --> |
---|
| 370 | <path>/raw</path> |
---|
| 371 | <raw>yes</raw> |
---|
| 372 | </vpath> |
---|
| 373 | </module> |
---|
| 374 | |
---|
| 375 | <!-- |
---|
| 376 | The "filewrite" module does what its name suggests: it |
---|
| 377 | writes files. More specifically, it writes a snapshot |
---|
| 378 | jpeg periodically to a certain file location. The write |
---|
| 379 | happens in a "safe" fashion, meaning the image will |
---|
| 380 | first be written to a temporary file, and then moved |
---|
| 381 | over the real destination file. |
---|
| 382 | --> |
---|
| 383 | <module name="filewrite" active="no"> |
---|
| 384 | <!-- |
---|
| 385 | Supported options: |
---|
| 386 | |
---|
| 387 | - path: Destination filename. The prefix "~/" has |
---|
| 388 | the usual meaning. The filename is passed to |
---|
| 389 | strftime(), so you can include a timestamp in |
---|
| 390 | the filename. Check your strftime man page for |
---|
| 391 | a list of % substitutions you can do. |
---|
| 392 | - interval: Delay between writing snapshot files. |
---|
| 393 | This tag can take an attribute "unit" which |
---|
| 394 | can be one of "sec", "min", "hour" or "day". |
---|
| 395 | Default is "sec". The meaning should be obvious. |
---|
| 396 | If you put a negative value for interval (such |
---|
| 397 | as -1), the module will write a snapshot file |
---|
| 398 | once, then sleep a few seconds (allowing other |
---|
| 399 | threads to complete), and then force camsource |
---|
| 400 | to exit. Use this feature with care. |
---|
| 401 | - chmod: Unix file mode to give the new file, in |
---|
| 402 | octal numeric notation. Don't forget the leading |
---|
| 403 | zero. If not specified, no chmod will be done |
---|
| 404 | (meaning the file will have mode 0666 minus umask). |
---|
| 405 | - cmd: Optional command to execute when the |
---|
| 406 | snapshot is created. The command will get the |
---|
| 407 | filename as its first argument. Note that |
---|
| 408 | the command will be run on the temporary |
---|
| 409 | file, before it is moved to the final location, |
---|
| 410 | but after the chmod is done. |
---|
| 411 | If the command (shell script) deletes the file, |
---|
| 412 | the moving step will be skipped. Note the |
---|
| 413 | the value of this tag is executed literally |
---|
| 414 | and not passed to a shell to interpret. The |
---|
| 415 | stdout and stderr fds will be redirected |
---|
| 416 | to the logfile. If you need to have anything |
---|
| 417 | fancy for a command, make a shell script. |
---|
| 418 | - Of course you can add filters here too. |
---|
| 419 | - And, like with all worker modules, you can |
---|
| 420 | have multiple instances/aliases of it too, |
---|
| 421 | each with different configurations. |
---|
| 422 | --> |
---|
| 423 | <path>/usr/local/apache/htdocs/camera.jpg</path> |
---|
| 424 | <interval unit="sec">30</interval> |
---|
| 425 | <chmod>0644</chmod> |
---|
| 426 | <!-- <cmd>~/bin/snapshot.sh</cmd> --> |
---|
| 427 | <jpegqual>75</jpegqual> |
---|
| 428 | <!-- For a description of the <jpegqual> tag, see |
---|
| 429 | the jpeg_comp module entry --> |
---|
| 430 | |
---|
| 431 | <!-- |
---|
| 432 | A simple motion detection filter (not active by |
---|
| 433 | default), which simply swallows the frame if |
---|
| 434 | no motion was detected, making the receiving |
---|
| 435 | module wait for a more interesting picture. |
---|
| 436 | Useful for filewrite of ftpup uses, and not so |
---|
| 437 | useful for live viewing modules. |
---|
| 438 | |
---|
| 439 | "Pixeldiff" is the value which is used to decide |
---|
| 440 | whether one pixel of the new image is different |
---|
| 441 | from the same pixel of the previous image. The |
---|
| 442 | value is a tolerance value in percent. 0 means |
---|
| 443 | the pixel will only be considered equal if it |
---|
| 444 | is indeed exactly equal, otherwise it will be |
---|
| 445 | considered different. 100 means the pixel will |
---|
| 446 | always be considered equal. Raise this value if |
---|
| 447 | your camera produces a lot of noise. |
---|
| 448 | |
---|
| 449 | "Minthres" and "maxthres" specify how many |
---|
| 450 | percent of the pixels of the image must be |
---|
| 451 | different to trigger the motion detection. If |
---|
| 452 | the percentage is outside this range, the |
---|
| 453 | detection won't trigger. There's an upper limit |
---|
| 454 | to tag massive image changes (such as the light |
---|
| 455 | being switched on or off) as uninteresting. |
---|
| 456 | Raise maxthres to 100 to disable this behavior. |
---|
| 457 | |
---|
| 458 | If no motion is detected, the filter will wait |
---|
| 459 | "delay" milliseconds (1/1000 seconds) before |
---|
| 460 | grabbing another image and checking it for |
---|
| 461 | motion. |
---|
| 462 | --> |
---|
| 463 | <filter name="motiondetect"> |
---|
| 464 | <pixeldiff>10.0</pixeldiff> |
---|
| 465 | <minthres>0.1</minthres> |
---|
| 466 | <maxthres>45.0</maxthres> |
---|
| 467 | <delay>1000</delay> |
---|
| 468 | </filter> |
---|
| 469 | |
---|
| 470 | <filter name="text"/> |
---|
| 471 | </module> |
---|
| 472 | |
---|
| 473 | <module name="ftpup" active="no"> |
---|
| 474 | <!-- |
---|
| 475 | Ftpup works like the filewrite module, only that |
---|
| 476 | it doesn't save a file locally, but uploads it |
---|
| 477 | to a site via ftp. Supported options are: |
---|
| 478 | - host: Host to connect to. Can be either in |
---|
| 479 | dotted ip notation or a hostname. |
---|
| 480 | - port: optional, defaults to 21. |
---|
| 481 | - username & password: Login information. If |
---|
| 482 | not specified, anonymous login will be done. |
---|
| 483 | Alternate spellings are "user" and "pass". |
---|
| 484 | - dir: Path for the destination file, |
---|
| 485 | excluding the actual filename. The module |
---|
| 486 | will do the inital chdir to this dir. This |
---|
| 487 | can be an absolute or relative pathname. If |
---|
| 488 | not specified, the file will be put into |
---|
| 489 | whatever dir is the current dir after login. |
---|
| 490 | - file: Destination filename. As in the filewrite |
---|
| 491 | module, you can put % format specifiers here, |
---|
| 492 | which will be interpreted by strftime(). |
---|
| 493 | - passive: A yes/no option, whether to use |
---|
| 494 | passive or active mode. Defaults to active |
---|
| 495 | mode ("no"). |
---|
| 496 | - safemode: Another yes/no option. If set to |
---|
| 497 | yes, a "safe" file write will be done, |
---|
| 498 | meaning the snapshot will first be uploaded |
---|
| 499 | to a temporary file, which will then be |
---|
| 500 | renamed to final destination file. Defaults |
---|
| 501 | to "no". The ftp server must support the |
---|
| 502 | renaming commands RNFR and RNTO. |
---|
| 503 | - interval: Same as filewrite's interval. |
---|
| 504 | Specifying a negative interval works here |
---|
| 505 | too. |
---|
| 506 | --> |
---|
| 507 | <host>some.host.name</host> |
---|
| 508 | <port>21</port> |
---|
| 509 | <user>snapshot</user> |
---|
| 510 | <pass>snapup</pass> |
---|
| 511 | <dir>incoming</dir> |
---|
| 512 | <file>snapshot.jpg</file> |
---|
| 513 | <passive>no</passive> |
---|
| 514 | <safemode>yes</safemode> |
---|
| 515 | <interval unit="sec">30</interval> |
---|
| 516 | |
---|
| 517 | <jpegqual>75</jpegqual> |
---|
| 518 | |
---|
| 519 | <!-- |
---|
| 520 | The regrab filter (not active by default) takes the |
---|
| 521 | grabbed image, throws it away, waits "delay" |
---|
| 522 | milliseconds (1/1000 seconds) and then grabs |
---|
| 523 | another image. It does this "times" times. After |
---|
| 524 | that, the receiving thread finally gets an image |
---|
| 525 | to use. This is useful to give the camera time to |
---|
| 526 | do brightness auto-adjusting before actually using |
---|
| 527 | the grabbed image. |
---|
| 528 | --> |
---|
| 529 | <filter name="regrab"> |
---|
| 530 | <times>3</times> |
---|
| 531 | <delay>1000</delay> |
---|
| 532 | </filter> |
---|
| 533 | |
---|
| 534 | <filter name="text"/> |
---|
| 535 | </module> |
---|
| 536 | |
---|
| 537 | <module name="vloopback" active="no"> |
---|
| 538 | <!-- |
---|
| 539 | This module is able to act as an input channel |
---|
| 540 | for the kernel video loopback device driver, |
---|
| 541 | available from <http://tibit.org/video/>. This |
---|
| 542 | lets you run camsource on your "real" video device |
---|
| 543 | and at the same time other v4l programs on the |
---|
| 544 | looped back device. |
---|
| 545 | --> |
---|
| 546 | <width>640</width> |
---|
| 547 | <height>480</height> |
---|
| 548 | <device>/dev/video1</device> |
---|
| 549 | |
---|
| 550 | <filter name="text"/> |
---|
| 551 | </module> |
---|
| 552 | |
---|
| 553 | |
---|
| 554 | |
---|
| 555 | |
---|
| 556 | |
---|
| 557 | |
---|
| 558 | |
---|
| 559 | <module name="jpeg_comp" active="yes"> |
---|
| 560 | <!-- quality: default compression quality, 1-100. |
---|
| 561 | If not specified, defaults to 75. --> |
---|
| 562 | <quality>40</quality> |
---|
| 563 | <!-- |
---|
| 564 | The modules which use jpeg_comp may pass a pointer |
---|
| 565 | to an xml tree to it, which can include a <jpegqual> |
---|
| 566 | tag. This tag, if present, specifies a quality |
---|
| 567 | override. Usually you can put this tag into the |
---|
| 568 | main <module> config section. |
---|
| 569 | --> |
---|
| 570 | </module> |
---|
| 571 | |
---|
| 572 | |
---|
| 573 | |
---|
| 574 | |
---|
| 575 | |
---|
| 576 | |
---|
| 577 | |
---|
| 578 | <!-- |
---|
| 579 | The following two modules are filters which are described |
---|
| 580 | elsewhere. The flip filter by default is applied to all |
---|
| 581 | images, see its <filter> tag near the bottom of this |
---|
| 582 | file. The resize filter is applied to certain worker |
---|
| 583 | module/configurations, see there for a description. |
---|
| 584 | --> |
---|
| 585 | <module name="flip" active="yes"/> |
---|
| 586 | <module name="resize" active="yes"/> |
---|
| 587 | |
---|
| 588 | <module name="text" active="yes"> |
---|
| 589 | <!-- |
---|
| 590 | Options to this filter module: |
---|
| 591 | - text: Text to display. Duh. Mandatory option. |
---|
| 592 | The text here is passed into the strftime() |
---|
| 593 | function, so the usual % substitutions are |
---|
| 594 | performed. Check the strftime man page for |
---|
| 595 | details. |
---|
| 596 | - cmd and file: Ok, so I lied about "text" being |
---|
| 597 | mandatory. You must specify at least one of |
---|
| 598 | text, cmd or file. "cmd" is the name of a |
---|
| 599 | command to run, and the first line of its |
---|
| 600 | output (on stdout) will be used as text. |
---|
| 601 | Similarily, "file" is a file to open, and its |
---|
| 602 | contents will be used as text. The "~/" prefix |
---|
| 603 | works as expected. The % substitutions are |
---|
| 604 | performed as with the "text" tag, unless you |
---|
| 605 | specify the 'nosubst="yes"' attribute in the |
---|
| 606 | tag. If more than one of these tags is specified, |
---|
| 607 | the last specified will be used (useful for |
---|
| 608 | setting a default <text> in the global section, |
---|
| 609 | and then overriding it with a <cmd> or <file> |
---|
| 610 | in a per-filter config). |
---|
| 611 | - color: Text color, in html format. The leading |
---|
| 612 | # sign is optional. No symbolic color names |
---|
| 613 | are accepted. Defaults to white (ffffff). |
---|
| 614 | - bgcolor: Same as color, only for the background |
---|
| 615 | color. It can have the special value "trans" |
---|
| 616 | to specify no background drawing (transparent), |
---|
| 617 | which is also the default. |
---|
| 618 | - pos: In which corner of the image to put the |
---|
| 619 | text. It can be "tr" for top right corner, |
---|
| 620 | "bl" for bottom left or any combination |
---|
| 621 | thereof. Defaults to "bl". |
---|
| 622 | --> |
---|
| 623 | <text>[Syn-3] %b %d %Y %H:%M:%S</text> |
---|
| 624 | <color>ffffff</color> |
---|
| 625 | <bgcolor>trans</bgcolor> |
---|
| 626 | <pos>bl</pos> |
---|
| 627 | </module> |
---|
| 628 | |
---|
| 629 | <!-- This filter swaps the red and blue channels --> |
---|
| 630 | <module name="rgbbgr" active="no"/> |
---|
| 631 | |
---|
| 632 | <!-- |
---|
| 633 | A filter capable of rotating the image right (90 degrees) |
---|
| 634 | or left (270 degrees). Rotating by 180 degrees is not |
---|
| 635 | supported, as the flip filter with both horiz and vert |
---|
| 636 | set to yes does exactly that. See below for an example |
---|
| 637 | config (filter disabled by default). |
---|
| 638 | --> |
---|
| 639 | <module name="rotate" active="no"/> |
---|
| 640 | |
---|
| 641 | <!-- This filter converts the image into bw (grayscale) --> |
---|
| 642 | <module name="bw" active="no"/> |
---|
| 643 | |
---|
| 644 | <!-- See the filewrite module config for a description of regrab --> |
---|
| 645 | <module name="motiondetect" active="no"/> |
---|
| 646 | |
---|
| 647 | <!-- See the ftpup module config for a description of regrab --> |
---|
| 648 | <module name="regrab" active="no"/> |
---|
| 649 | |
---|
| 650 | <!-- A simple invert filter --> |
---|
| 651 | <module name="invert" active="no"/> |
---|
| 652 | |
---|
| 653 | |
---|
| 654 | |
---|
| 655 | |
---|
| 656 | |
---|
| 657 | |
---|
| 658 | |
---|
| 659 | |
---|
| 660 | <!-- |
---|
| 661 | Global filters to use. Any filter given here |
---|
| 662 | will be applied to every grabbed frame. If |
---|
| 663 | a given filter module is not loaded, the filter |
---|
| 664 | will be ignored silently. (TODO: is that a good idea?) |
---|
| 665 | Filters are always applied in order. You can |
---|
| 666 | give the same filter multiple times to apply |
---|
| 667 | it to the image several times. |
---|
| 668 | |
---|
| 669 | Global filters are applied first, then per-device |
---|
| 670 | filters (given in the <camdev> sections), then any |
---|
| 671 | possible per-module filters. |
---|
| 672 | --> |
---|
| 673 | |
---|
| 674 | <!-- Module not active by default --> |
---|
| 675 | <filter name="rgbbgr"/> |
---|
| 676 | |
---|
| 677 | <!-- |
---|
| 678 | Ditto. If active, it would rotate the image right |
---|
| 679 | (= 90 degrees clockwise). The only other possible |
---|
| 680 | direction is "left". |
---|
| 681 | --> |
---|
| 682 | <filter name="rotate"> |
---|
| 683 | <direction>right</direction> |
---|
| 684 | </filter> |
---|
| 685 | |
---|
| 686 | <!-- Also not active by default --> |
---|
| 687 | <filter name="bw"/> |
---|
| 688 | |
---|
| 689 | <!-- Ditto --> |
---|
| 690 | <filter name="invert"/> |
---|
| 691 | |
---|
| 692 | </camsourceconfig> |
---|
| 693 | |
---|