📄 camsource.conf.example
字号:
<?xml version="1.0"?><!-- $Id: camsource.conf.example,v 1.56 2003/05/01 10:29:11 dfx Exp $ --><!-- As there isn't any real documentation, this file is how to find out how to configure and use camsource. Most of it is module and filter config, but the first part (<camdev>) is crucial if you're having any kind of problems, so be sure you read it carefully.--><camsourceconfig> <!-- Global config options --> <camdev> <!-- This section gives config options for the camera device. It instructs the hardware to grab the frames at a certain size, at a certain frame rate and from a certain input channel. Note that not all hardware supports every frame size, and not all hardware supports setting the frame rate (and if it does, not all frame rates are supported either). You will see a warning message if any of the settings here are incorrect. - The "plugin" tag defines which module should be used for this device entry. See below for for the <module> entries for the input plugins. Most of the other options given here are specific to a certain plugin type and will be different for other input plugins. - Path defaults to /dev/video0. - Width and height default to the maximum size as reported by the driver. You can specify "max" or "default" for the same effect, or "min" for the minimum size. - Fps and channel default to unchanged/not set. You can specify "default" for the same effect. - Norm can be "ntsc", "pal", "secam", or "auto". If not specified, it is undefined which norm will be used. Note that the norm setting will only be used if a channel is specified as well. - Brightness, hue, colour (note the spelling), contrast and whiteness are unsigned 16-bit integers (0-65535) which are passed verbatim to the video4linux layer if specified. The meaning of these fields is more or less driver-dependent, feel free to play around with them. If not specified or commented out, the default value will be left unchanged. Not all values are meaningful in all cases (for example 'whiteness' is normally only used for grayscale images). --> <plugin>input_v4l</plugin> <path>/dev/video0</path> <width>max</width> <height>max</height> <fps>15</fps> <channel>0</channel> <norm>auto</norm> <!-- <brightness>32767</brightness> --> <!-- <hue>32767</hue> --> <!-- <colour>32767</colour> --> <!-- <contrast>32767</contrast> --> <!-- <whiteness>32767</whiteness> --> <!-- The "autobrightness" setting controls a special algorithm within camsource to dynamically adjust the camera's brightness level. The value specifies the desired average brightness of the output images, in the range 0 through about 85. Values around 35 seem to produce good results. --> <!-- <autobrightness>35</autobrightness> --> <!-- You can define a command to be run when something or someone is requesting frames from this device. The first time a frame is requested, the program will get a 'start' event. The 'end' event will be fired after there has been no request for a frame for a certain time period, which you can specify with the <cmdtimeout> tag, in seconds. Note that the command will be run asynchronously in the background. Also note that these two tags are not specific to a certain input plugin, but can be used with every input plugin universally. The command gets the following arguments: - Event type, either 'start' or 'end'. - Camdev device name, either "default" or whatever name you gave it. - The name of the /dev/videoX device file. --> <!-- <cmd>~/bin/grabevent.sh</cmd> <cmdtimeout>5</cmdtimeout> --> <!-- Filters specified here will be applied to every framed grabbed by this device. More information about filters and filter modules can be found below. There is also a section with filters to apply to every frame, independent of device. This flip filter is here because my webcam produces mirrored images. If yours doesn't do this, you should probably remove this filter. --> <filter name="flip"> <horiz>yes</horiz> <vert>no</vert> </filter> </camdev> <!-- It is possible to have more than one input device active at the same time. Below is an example for how to grab from a second v4l device. The specified "name" attribute is used to uniquely identify this device; no two <camdev> sections can have the same name. The name defaults to "default". Use this name in the module configs to specify which device to grab images from. See the http module and one of the wc_serv module definitions below for examples. This example makes use of the "active" attribute of the <camdev> tag. If not specified, it defaults to "yes", for backwards compatibility. --> <camdev name="second" active="no"> <plugin>input_v4l</plugin> <path>/dev/video1</path> <width>max</width> <height>max</height> </camdev> <!-- This input plugin uses the "xwd" program to make screenshots of a local or remote x11 desktop, and uses those images as input to camsource. Currently this plugin only supports xwd dumps with 24 or 32 bits per pixel. --> <camdev name="xwd" active="no"> <plugin>input_xwd</plugin> <command>DISPLAY=:0 /usr/X11R6/bin/xwd -root -silent</command> </camdev> <!-- If no logfile is given (or tag is empty), camsource will log to stdout only and not go into background. The prefix "~/" has the usual meaning. --> <logfile>~/.camsource.log</logfile> <!-- Available modules. A module will only be loaded if its "active" attribute is set to "yes", or if it's a dependency of another module. In any case, any module config given here is used. --> <!-- This is the default video4linux input plugin. It has no global config options. --> <module name="input_v4l" active="yes"/> <!-- This is the xwd input plugin referenced above. --> <module name="input_xwd" active="no"/> <module name="wc_serv" active="yes"> <port>8888</port> <!-- Per-module filter. Works exactly the same as the global filters, only that the per-module filters are called from within the module's worker thread. The resize filter can either take a <height> and a <width> option, to resize the image to a fixed size, or a <scale> option to resize the image to a certain percentage of the original size. --> <filter name="resize"> <scale>50</scale> </filter> <!-- Another filter. But where is its config? The "text" module supports having and using a global config, specified in its <module> section. Any config options that are missing in the <filter> definition will be used from that global config, and those options that are specified here will override the global ones. See below for an example for this overriding. --> <filter name="text"/> </module> <!-- A second incarnation of the "wc_serv" module. It is possible to run the same worker module multiple times, each incarnation in its own thread. Each instance must have a unique name (the "alias" attribute). If no alias name is given, the actual module name is used as alias name. The actual module will always be loaded exactly once, if at least one of the aliased modules have "active" set to "yes". A module that is not active won't be run. A running worker module will receive a context pointer to the correct config to use, so it's possible to use the same module with different parameters/filters. --> <module name="wc_serv" alias="noresizewc" active="yes"> <port>8889</port> <!-- Here's the example for option overriding in the text module. This filter will work the same as the above text filter, only that the text will be located in the top right corner. (Which doesn't make much sense, but hey, it's just an exmaple.) For a full description of all config options to the text module, see below in its <module> section. --> <filter name="text"> <pos>tr</pos> </filter> </module> <module name="wc_serv" alias="seconddev" active="no"> <!-- This instance of wc_serv would grab images not from the "default" device, but from another. The <grabdev> tag can be used universally. --> <grabdev>second</grabdev> <port>8890</port> </module> <!-- The http module. It lets you create virtual paths to serve various variants of the current image. The main section includes global config options (such as the port to listen on), and can also include filter definitions. Those global filters will be applied to every image served. In the main section, there should be one or more <vpath> sections. Each of these sections describes another variation of the image, with different properties, using different filters. When requesting a certain vpath from the http server, you can append a query string to the patch, which will be stripped and ignored when looking for the matching vpath. For example, you can put "http://somehost/pic?dummy=123" into your browser, and it will display the image with the "/pic" vpath setting. If you want to specify a custom jpeg compression quality with a <jpegqual> tag, you must specify it within the <vpath> definitions. There is no global config tag for this. Each vpath definition should contain one or more <path> tags, each of which can be used to access this image variant (those paths can be thought of as aliases). If a vpath section include an <fps> tag, the image will be served as multipart-jpeg stream, usable for plugin- and applet-less streaming on netscape/mozilla browsers. Without fps specification, only a single image will be served. --> <module name="http" active="yes"> <port>9192</port> <vpath> <path>/</path> <path>/small</path> <filter name="resize"> <scale>50</scale> </filter> <filter name="text"/> </vpath> <vpath> <path>/big</path> <path>/large</path> <filter name="text"/> </vpath> <vpath> <path>/largequal</path> <filter name="text"/> <jpegqual>80</jpegqual> </vpath> <vpath> <path>/multipart</path> <fps>2</fps> <filter name="resize"> <scale>50</scale> </filter> <filter name="text"/> </vpath> <vpath> <path>/multipart-large</path> <fps>1</fps> <filter name="text"/> </vpath> <!-- This example also shows how to deactivate one vpath --> <vpath active="no"> <!-- You can use the <grabdev> tag here too --> <grabdev>second</grabdev> <path>/othercam</path> </vpath> <vpath active="no"> <grabdev>xwd</grabdev> <path>/screenshot</path> <jpegqual>40</jpegqual> <!-- Can only be viewed if the correct login and password is given --> <auth>screen:shot</auth> </vpath>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -