⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 camsource.conf.example

📁 网络摄像头的webserver
💻 EXAMPLE
📖 第 1 页 / 共 2 页
字号:
		<vpath active="no">			<grabdev>xwd</grabdev>			<path>/smallshot</path>			<jpegqual>40</jpegqual>			<auth>screen:shot</auth>                        <filter name="resize">                                <scale>50</scale>                        </filter>		</vpath>				<vpath active="yes">			<!--				You can make the http module serve raw				image data instead of jpegs with the				<raw> tag. If enabled, the returned data				will be X*Y*3 bytes of rgb data. The http				headers will include the size of the image				(X and Y). There's an example of how to use				this data included with the camsource				distribution as scripts/camsource2bmp.pl.			-->			<path>/raw</path>			<raw>yes</raw>		</vpath>	</module>		<!--		The "filewrite" module does what its name suggests: it		writes files. More specifically, it writes a snapshot		jpeg periodically to a certain file location. The write		happens in a "safe" fashion, meaning the image will		first be written to a temporary file, and then moved		over the real destination file.	-->	<module name="filewrite" active="no">		<!--			Supported options:						- path: Destination filename. The prefix "~/" has			  the usual meaning. The filename is passed to			  strftime(), so you can include a timestamp in			  the filename. Check your strftime man page for			  a list of % substitutions you can do.			- interval: Delay between writing snapshot files.			  This tag can take an attribute "unit" which			  can be one of "sec", "min", "hour" or "day".			  Default is "sec". The meaning should be obvious.			  If you put a negative value for interval (such			  as -1), the module will write a snapshot file			  once, then sleep a few seconds (allowing other			  threads to complete), and then force camsource			  to exit. Use this feature with care.			- chmod: Unix file mode to give the new file, in			  octal numeric notation. Don't forget the leading			  zero. If not specified, no chmod will be done			  (meaning the file will have mode 0666 minus umask).			- cmd: Optional command to execute when the			  snapshot is created. The command will get the			  filename as its first argument. Note that			  the command will be run on the temporary			  file, before it is moved to the final location,			  but after the chmod is done.			  If the command (shell script) deletes the file,			  the moving step will be skipped. Note the			  the value of this tag is executed literally			  and not passed to a shell to interpret. The			  stdout and stderr fds will be redirected			  to the logfile. If you need to have anything			  fancy for a command, make a shell script.			- Of course you can add filters here too.			- And, like with all worker modules, you can			  have multiple instances/aliases of it too,			  each with different configurations.		-->		<path>/usr/local/apache/htdocs/camera.jpg</path>		<interval unit="sec">30</interval>		<chmod>0644</chmod>		<!-- <cmd>~/bin/snapshot.sh</cmd> -->		<jpegqual>75</jpegqual>		<!-- For a description of the <jpegqual> tag, see			the jpeg_comp module entry -->				<!--			A simple motion detection filter (not active by			default), which simply swallows the frame if			no motion was detected, making the receiving			module wait for a more interesting picture.			Useful for filewrite of ftpup uses, and not so			useful for live viewing modules.						"Pixeldiff" is the value which is used to decide			whether one pixel of the new image is different			from the same pixel of the previous image. The			value is a tolerance value in percent. 0 means			the pixel will only be considered equal if it			is indeed exactly equal, otherwise it will be			considered different. 100 means	the pixel will			always be considered equal. Raise this value if			your camera produces a lot of noise.						"Minthres" and "maxthres" specify how many			percent of the pixels of the image must be			different to trigger the motion detection. If			the percentage is outside this range, the			detection won't trigger. There's an upper limit			to tag massive image changes (such as the light			being switched on or off) as uninteresting.			Raise maxthres to 100 to disable this behavior.						If no motion is detected, the filter will wait			"delay" milliseconds (1/1000 seconds) before			grabbing another image and checking it for			motion.		-->		<filter name="motiondetect">			<pixeldiff>10.0</pixeldiff>			<minthres>0.1</minthres>			<maxthres>45.0</maxthres>			<delay>1000</delay>		</filter>				<filter name="text"/>	</module>		<module name="ftpup" active="no">		<!--			Ftpup works like the filewrite module, only that			it doesn't save a file locally, but uploads it			to a site via ftp. Supported options are:			- host: Host to connect to. Can be either in			  dotted ip notation or a hostname.			- port: optional, defaults to 21.			- username & password: Login information. If			  not specified, anonymous login will be done.			  Alternate spellings are "user" and "pass".			- dir: Path for the destination file,			  excluding the actual filename. The module			  will do the inital chdir to this dir. This			  can be an absolute or relative pathname. If			  not specified, the file will be put into			  whatever dir is the current dir after login.			- file: Destination filename. As in the filewrite			  module, you can put % format specifiers here,			  which will be interpreted by strftime().			- passive: A yes/no option, whether to use			  passive or active mode. Defaults to active			  mode ("no").			- safemode: Another yes/no option. If set to			  yes, a "safe" file write will be done,			  meaning the snapshot will first be uploaded			  to a temporary file, which will then be			  renamed to final destination file. Defaults			  to "no". The ftp server must support the			  renaming commands RNFR and RNTO.			- interval: Same as filewrite's interval.			  Specifying a negative interval works here			  too.		-->		<host>some.host.name</host>		<port>21</port>		<user>snapshot</user>		<pass>snapup</pass>		<dir>incoming</dir>		<file>snapshot.jpg</file>		<passive>no</passive>		<safemode>yes</safemode>		<interval unit="sec">30</interval>		<jpegqual>75</jpegqual>				<!--			The regrab filter (not active by default) takes the			grabbed image, throws it away, waits "delay"			milliseconds (1/1000 seconds) and then grabs			another image. It does this "times" times. After			that, the receiving thread finally gets an image			to use. This is useful to give the camera time to			do brightness auto-adjusting before actually using			the grabbed image.		-->		<filter name="regrab">			<times>3</times>			<delay>1000</delay>		</filter>				<filter name="text"/>	</module>		<module name="vloopback" active="no">		<!--			This module is able to act as an input channel			for the kernel video loopback device driver,			available from <http://tibit.org/video/>. This			lets you run camsource on your "real" video device			and at the same time other v4l programs on the			looped back device.		-->		<width>640</width>		<height>480</height>		<device>/dev/video1</device>				<filter name="text"/>	</module>							<module name="jpeg_comp" active="yes">		<!-- quality: default compression quality, 1-100.			If not specified, defaults to 75. -->		<quality>40</quality>		<!--			The modules which use jpeg_comp may pass a pointer			to an xml tree to it, which can include a <jpegqual>			tag. This tag, if present, specifies a quality			override. Usually you can put this tag into the			main <module> config section.		-->	</module>								<!--		The following two modules are filters which are described		elsewhere. The flip filter by default is applied to all		images, see its <filter> tag near the bottom of this		file. The resize filter is applied to certain worker		module/configurations, see there for a description.	-->	<module name="flip" active="yes"/>	<module name="resize" active="yes"/>		<module name="text" active="yes">		<!--			Options to this filter module:			- text: Text to display. Duh. Mandatory option.			  The text here is passed into the strftime()			  function, so the usual % substitutions are			  performed. Check the strftime man page for			  details.			- cmd and file: Ok, so I lied about "text" being			  mandatory. You must specify at least one of			  text, cmd or file. "cmd" is the name of a			  command to run, and the first line of its			  output (on stdout) will be used as text.			  Similarily, "file" is a file to open, and its			  contents will be used as text. The "~/" prefix			  works as expected. The % substitutions are			  performed as with the "text" tag, unless you			  specify the 'nosubst="yes"' attribute in the			  tag. If more than one of these tags is specified,			  the last specified will be used (useful for			  setting a default <text> in the global section,			  and then overriding it with a <cmd> or <file>			  in a per-filter config).			- color: Text color, in html format. The leading			  # sign is optional. No symbolic color names			  are accepted. Defaults to white (ffffff).			- bgcolor: Same as color, only for the background			  color. It can have the special value "trans"			  to specify no background drawing (transparent),			  which is also the default.			- pos: In which corner of the image to put the			  text. It can be "tr" for top right corner,			  "bl" for bottom left or any combination			  thereof. Defaults to "bl".		-->		<text>%b %d %Y %H:%M:%S</text>		<color>ffffff</color>		<bgcolor>trans</bgcolor>		<pos>bl</pos>	</module>		<!-- This filter swaps the red and blue channels -->	<module name="rgbbgr" active="no"/>		<!--		A filter capable of rotating the image right (90 degrees)		or left (270 degrees). Rotating by 180 degrees is not		supported, as the flip filter with both horiz and vert		set to yes does exactly that. See below for an example		config (filter disabled by default).	-->	<module name="rotate" active="no"/>		<!-- This filter converts the image into bw (grayscale) -->	<module name="bw" active="no"/>		<!-- See the filewrite module config for a description of regrab -->	<module name="motiondetect" active="no"/>		<!-- See the ftpup module config for a description of regrab -->	<module name="regrab" active="no"/>		<!-- A simple invert filter -->	<module name="invert" active="no"/>									<!--		Global filters to use. Any filter given here		will be applied to every grabbed frame. If		a given filter module is not loaded, the filter		will be ignored silently. (TODO: is that a good idea?)		Filters are always applied in order. You can		give the same filter multiple times to apply		it to the image several times.				Global filters are applied first, then per-device		filters (given in the <camdev> sections), then any		possible per-module filters.	-->		<!-- Module not active by default -->	<filter name="rgbbgr"/>		<!--		Ditto. If active, it would rotate the image right		(= 90 degrees clockwise). The only other possible		direction is "left".	-->	<filter name="rotate">		<direction>right</direction>	</filter>		<!-- Also not active by default -->	<filter name="bw"/>		<!-- Ditto -->	<filter name="invert"/>	</camsourceconfig>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -