<motion>
<common>
<daemon>
<help>
start in daemon (background) mode and release terminal (default: off)
</help>
<value>on</value>
</daemon>
<setup_mode>
<help>
Start in Setup-Mode, daemon disabled. (default: off)
</help>
<value>off</value>
</setup_mode>
<v4l>
<videodevice>
<help>
Videodevice to be used for capturing  (default /dev/video0) for FreeBSD default is /dev/bktr0
</help>
<value>/dev/video8</value>
</videodevice>
<input>
<help>
The video input to be used (default: 8)
Should normally be set to 1 for video/TV cards, and 8 for USB cameras
</help>
<value>8</value>
</input>
<norm>
<help>
The video norm to use (only for video capture and TV tuner cards)
Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
</help>
<value>0</value>
</norm>
<frequency>
<help>
The frequency to set the tuner to (kHz) (only for TV tuner cards) (default: 0)
</help>
<value>0</value>
</frequency>
<auto_brightness>
<help>
Let motion regulate the brightness of a video device (default: off).
The auto_brightness feature uses the brightness option as its target value.
if brightness is zero auto_brightness will adjust to average brightness value 128.
Only recommended for cameras without auto brightness
</help>
<value>off</value>
</auto_brightness>
<brightness>
<help>
Set the initial brightness of a video device.
if auto_brightness is enabled, this value defines the average brightness level
which Motion will try and adjust to.
Valid range 0-255, default 0 = disabled
</help>
<value>0</value>
</brightness>
<contrast>
<help>
Set the contrast of a video device.
Valid range 0-255, default 0 = disabled
</help>
<value>0</value>
</contrast>
<saturation>
<help>
Set the saturation of a video device.
Valid range 0-255, default 0 = disabled
</help>
<value>0</value>
</saturation>
<hue>
<help>
Set the hue of a video device (NTSC feature).
Valid range 0-255, default 0 = disabled
</help>
<value>0</value>
</hue>
<roundrobin_frames>
<help>
Number of frames to capture in each roundrobin step (default: 1)
</help>
<value>1</value>
</roundrobin_frames>
<roundrobin_skip>
<help>
Number of frames to skip before each roundrobin step (default: 1)
</help>
<value>1</value>
</roundrobin_skip>
</v4l>
<rotate>
<help>
Rotate image this number of degrees. The rotation affects all saved images as
well as mpeg movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
</help>
<value>0</value>
</rotate>
<width>
<help>
Image width (pixels). Valid range: Camera dependent, default: 352
</help>
<value>320</value>
</width>
<height>
<help>
Image height (pixels). Valid range: Camera dependent, default: 288
</help>
<value>240</value>
</height>
<framerate>
<help>
Maximum number of frames to be captured per second.
Valid range: 2-100. Default: 100 (almost no limit).
</help>
<value>2</value>
</framerate>
<netcam>
<url>
<help>
URL to use if you are using a network camera, size will be autodetected (incl http://)
Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined
</help>
<value></value>
</url>
<userpass>
<help>
Username and password for network camera (only if required). Default: not defined
Syntax is user:password
</help>
<value></value>
</userpass>
<proxy>
<help>
URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
if a port number other than 80 is needed, use "http://myproxy:1234".
Default: not defined
</help>
<value></value>
</proxy>
</netcam>
<switchfilter>
<help>
Try to filter out noise generated by roundrobin (default: off)
</help>
<value>off</value>
</switchfilter>
<threshold>
<help>
Threshold for number of changed pixels in an image that
triggers motion detection (default: 1500)
</help>
<value>1500</value>
</threshold>
<threshold_tune>
<help>
Automatically tune the threshold down if possible (default: off)
</help>
<value>off</value>
</threshold_tune>
<noise_level>
<help>
Noise threshold for the motion detection (default: 32)
</help>
<value>32</value>
</noise_level>
<noise_tune>
<help>
Automatically tune the noise threshold (default: on)
</help>
<value>on</value>
</noise_tune>
<night_compensate>
<help>
Enables motion to adjust its detection/noise level for very dark frames
Don't use this with noise_tune on. (default: off)
</help>
<value>off</value>
</night_compensate>
<despeckle>
<help>
Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
(l)abeling must only be used once and the 'l' must be the last letter.
Comment out to disable
</help>
<value>EedDl</value>
</despeckle>
<mask_file>
<help>
PGM file to use as a sensitivity mask.
Full path name to. (Default: not defined)
</help>
<value></value>
</mask_file>
<smart_mask_speed>
<help>
Dynamically create a mask file during operation (default: 0)
Adjust speed of mask changes from 0 (off) to 10 (fast)
</help>
<value>8</value>
</smart_mask_speed>
<lightswitch>
<help>
Ignore sudden massive light intensity changes given as a percentage of the picture
area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
</help>
<value>60</value>
</lightswitch>
<minimum_motion_frames>
<help>
Picture frames must contain motion at least the specified number of frames
in a row before they are detected as true motion. At the default of 1, all
motion is detected. Valid range: 1 to thousands, recommended 1-5
</help>
<value>1</value>
</minimum_motion_frames>
<pre_capture>
<help>
Specifies the number of pre-captured (buffered) pictures from before motion
was detected that will be output at motion detection.
Recommended range: 0 to 5 (default: 0)
Do not use large values! Large values will cause Motion to skip video frames and
cause unsmooth mpegs. To smooth mpegs use larger values of post_capture instead.
</help>
<value>0</value>
</pre_capture>
<post_capture>
<help>
Number of frames to capture after motion is no longer detected (default: 0)
</help>
<value>0</value>
</post_capture>
<gap>
<help>
Gap is the seconds of no motion detection that triggers the end of an event
An event is defined as a series of motion images taken within a short timeframe.
Recommended value is 60 seconds (Default). The value 0 is allowed and disables
events causing all Motion to be written to one single mpeg file and no pre_capture.
</help>
<value>60</value>
</gap>
<minimum_gap>
<help>
Minimum gap in seconds between the storing pictures while detectin
Default: 0 = as fast as possible (given by the camera framerate)  
Note: This option has nothing to do with the option 'gap'         
</help>
<value>0</value>
</minimum_gap>
<max_mpeg_time>
<help>
Maximum length in seconds of an mpeg movie
When value is exceeded a new mpeg file is created. (Default: 0 = infinite)
</help>
<value>0</value>
</max_mpeg_time>
<low_cpu>
<help>
Number of frames per second to capture when not detecting
motion (saves CPU load) (Default: 0 = disabled)
</help>
<value>0</value>
</low_cpu>
<output_all>
<help>
Always save images even if there was no motion (default: off)
</help>
<value>off</value>
</output_all>
<output_normal>
<help>
Output 'normal' pictures when motion is detected (default: on)
Valid values: on, off, first, best
When set to 'first', only the first picture of an event is saved.
Picture with most motion of an event is saved when set to 'best'.
Can be used as preview shot for the corresponding movie.
</help>
<value>on</value>
</output_normal>
<output_motion>
<help>
Output pictures with only the pixels moving object (ghost images) (default: off)
</help>
<value>off</value>
</output_motion>
<quality>
<help>
The quality (in percent) to be used by the jpeg compression (default: 75)
</help>
<value>75</value>
</quality>
<ppm>
<help>
Output ppm images instead of jpeg (default: off)
</help>
<value>off</value>
</ppm>
<ffmpeg>
<filename>
<help>
File path for motion triggered ffmpeg films (mpeg) relative to target_dir
Default: %v-%Y%m%d%H%M%S
Default value is equivalent to legacy oldlayout option
for Motion 3.0 compatible mode choose: %Y/%m/%d/%H%M%S
File extension .mpg or .avi is automatically added so do not include this
</help>
<value>%v-%Y%m%d%H%M%S</value>
</filename>
<cap_new>
<help>
Use ffmpeg to encode mpeg movies in realtime (default: off)
</help>
<value>on</value>
</cap_new>
<cap_motion>
<help>
Use ffmpeg to make movies with only the pixels moving
object (ghost images) (default: off)
</help>
<value>off</value>
</cap_motion>
<timelapse>
<help>
Use ffmpeg to encode a timelapse movie
Default value 0 = off - else save frame every Nth second
</help>
<value>0</value>
</timelapse>
<timelapse_filename>
<help>
File path for timelapse mpegs relative to target_dir
Default: %Y%m%d-timelapse
Default value is near equivalent to legacy oldlayout option
for Motion 3.0 compatible mode choose: %Y/%m/%d-timelapse
File extension .mpg is automatically added so do not include this
</help>
<value>%Y%m%d%H-timelapse</value>
</timelapse_filename>
<timelapse_mode>
<help>
The file rollover mode of the timelapse video
Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
</help>
<value>daily</value>
</timelapse_mode>
<bps>
<help>
Bitrate to be used by the ffmpeg encoder (default: 400000)
This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
</help>
<value>500000</value>
</bps>
<variable_bitrate>
<help>
Enables and defines variable bitrate for the ffmpeg encoder.
ffmpeg_bps is ignored if variable bitrate is enabled.
Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
or the range 2 - 31 where 2 means best quality and 31 is worst.
</help>
<value>2</value>
</variable_bitrate>
<video_codec>
<help>
Codec to used by ffmpeg for the video compression.
Timelapse mpegs are always made in mpeg1 format independent from this option.
Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
mpeg1 - gives you files with extension .mpg
mpeg4 or msmpeg4 - give you files with extension .avi
msmpeg4 is recommended for use with Windows Media Player because
it requires no installation of codec on the Windows client.
</help>
<value>mpeg4</value>
</video_codec>
</ffmpeg>
<snapshot_interval>
<help>
Make automated snapshot every N seconds (default: 0 = disabled)
</help>
<value>0</value>
</snapshot_interval>
<locate>
<help>
Locate and draw a box around the moving object.
Valid values: on, off and preview (default: off)
Set to 'preview' will only draw a box in preview_shot pictures.
</help>
<value>on</value>
</locate>
<text_right>
<help>
Draws the timestamp using same options as C function strftime(3)
Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
Text is placed in lower right corner
</help>
<value>%Y-%m-%d\n%T</value>
</text_right>
<text_left>
<help>
Draw a user defined text on the images using same options as C function strftime(3)
Default: Not defined = no text
Text is placed in lower left corner
</help>
<value>CAMERA 1</value>
</text_left>
<text_changes>
<help>
Draw the number of changed pixed on the images (default: off)
Will normally be set to off except when you setup and adjust the motion settings
Text is placed in upper right corner
</help>
<value>off</value>
</text_changes>
<text_event>
<help>
This option defines the value of the speciel event conversion specifier %C
You can use any conversion specifier in this option except %C. Date and time
values are from the timestamp of the first image in the current event.
Default: %Y%m%d%H%M%S
The idea is that %C can be used filenames and text_left/right for creating
a unique identifier for each event.
</help>
<value>%Y%m%d%H%M%S</value>
</text_event>
<text_double>
<help>
Draw characters at twice normal size on images. (default: off)
</help>
<value>off</value>
</text_double>
<target_dir>
<help>
Target base directory for pictures and films
Recommended to use absolute path. (Default: current working directory)
</help>
<value>/usr/local/apache2/htdocs/cam1</value>
</target_dir>
<snapshot_filename>
<help>
File path for snapshots (jpeg or ppm) relative to target_dir
Default: %v-%Y%m%d%H%M%S-snapshot
Default value is equivalent to legacy oldlayout option
for Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
File extension .jpg or .ppm is automatically added so do not include this.
Note: A symbolic link called lastsnap.jpg created in the target_dir will always
point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'
</help>
<value>%v-%Y%m%d%H%M%S-snapshot</value>
</snapshot_filename>
<jpeg_filename>
<help>
File path for motion triggered images (jpeg or ppm) relative to target_dir
Default: %v-%Y%m%d%H%M%S-%q
Default value is equivalent to legacy oldlayout option
For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
File extension .jpg or .ppm is automatically added so do not include this
Set to 'preview' together with best-preview feature enables special naming
convention for preview shots. See motion guide for details
</help>
<value>%v-%Y%m%d%H%M%S-%q</value>
</jpeg_filename>
<webcam_port>
<help>
The mini-http server listens to this port for requests (default: 0 = disabled)
</help>
<value>8081</value>
</webcam_port>
<webcam_quality>
<help>
Quality of the jpeg images produced (default: 50)
</help>
<value>50</value>
</webcam_quality>
<webcam_motion>
<help>
Output frames at 1 fps when no motion is detected and increase to the
rate given by webcam_maxrate when motion is detected (default: off)
</help>
<value>on</value>
</webcam_motion>
<webcam_maxrate>
<help>
Maximum framerate for webcam streams (default: 1)
</help>
<value>1</value>
</webcam_maxrate>
<webcam_localhost>
<help>
Restrict webcam connections to localhost only (default: on)
</help>
<value>off</value>
</webcam_localhost>
<webcam_limit>
<help>
Limits the number of images per connection (default: 0 = unlimited)
Number can be defined by multiplying actual webcam rate by desired number of seconds
Actual webcam rate is the smallest of the numbers framerate and webcam_maxrate
</help>
<value>1200</value>
</webcam_limit>
<control_port>
<help>
TCP/IP port for the http server to listen on (default: 0 = disabled)
</help>
<value>8080</value>
</control_port>
<control_localhost>
<help>
Restrict control connections to localhost only (default: on)
</help>
<value>off</value>
</control_localhost>
<control_html_output>
<help>
Output for http server, select off to choose raw text plain (default: on)
</help>
<value>on</value>
</control_html_output>
<control_authentication>
<help>
Authentication for the http based control. Syntax username:password
Default: not defined (Disabled)
</help>
<value>tutankamon:pyramid</value>
</control_authentication>
<track_type>
<help>
Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic)
The generic type enables the definition of motion center and motion size to
be used with the convertion specifiers for options like on_motion_detected
</help>
<value>0</value>
</track_type>
<track_port>
<help>
Serial port of motor (default: none)
</help>
<value></value>
</track_port>
<track_motorx>
<help>
Motor number for x-axis (default: -1)
</help>
<value>-1</value>
</track_motorx>
<track_maxx>
<help>
Maximum value on x-axis (default: 0)
</help>
<value>0</value>
</track_maxx>
<track_iomojo_id>
<help>
ID of an iomojo camera if used (default: 0)
</help>
<value>0</value>
</track_iomojo_id>
<track_speed>
<help>
Speed to set the motor to (default: 255)
</help>
<value>255</value>
</track_speed>
<track_stepsize>
<help>
Number of steps to make (default: 40)
</help>
<value>0</value>
</track_stepsize>
<quiet>
<help>
Do not sound beeps when detecting motion (default: on)
Note: Motion never beeps when running in daemon mode.
</help>
<value>on</value>
</quiet>
<on_event_start>
<help>
Command to be executed when an event starts. (default: none)
An event starts at first motion detected after a period of no motion defined by gap 
</help>
<value></value>
</on_event_start>
<on_event_end>
<help>
Command to be executed when an event ends after a period of no motion
(default: none). The period of no motion is defined by option gap.
</help>
<value></value>
</on_event_end>
<on_picture_save>
<help>
Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
The filename of the picture is appended as an argument for the command.
</help>
<value>/usr/local/motion-extras/camparse1.pl</value>
</on_picture_save>
<on_motion_detected>
<help>
Command to be executed when a motion frame is detected (default: none)
</help>
<value></value>
</on_motion_detected>
<on_movie_start>
<help>
Command to be executed when a movie file (.mpg|.avi) is created. (default: none)
Filename of movie is appended as an argument for the command.
</help>
<value></value>
</on_movie_start>
<on_movie_end>
<help>
Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
Filename of movie is appended as an argument for the command.
</help>
<value></value>
</on_movie_end>
<sql_log_image>
<help>
Log to the database when creating motion triggered image file  (default: on)
</help>
<value>on</value>
</sql_log_image>
<sql_log_snapshot>
<help>
Log to the database when creating a snapshot image file (default: on)
</help>
<value>on</value>
</sql_log_snapshot>
<sql_log_mpeg>
<help>
Log to the database when creating motion triggered mpeg file (default: off)
</help>
<value>on</value>
</sql_log_mpeg>
<sql_log_timelapse>
<help>
Log to the database when creating timelapse mpeg file (default: off)
</help>
<value>on</value>
</sql_log_timelapse>
<sql_user_text>
<help>
Log this user specified text to every record saved in the database.
You can use all the same conversion specifiers that you can use for
text display, filenames, and external commands (default: not defined)
</help>
<value></value>
</sql_user_text>
<mysql_db>
<help>
Mysql database to log to (default: not defined)
</help>
<value>motion</value>
</mysql_db>
<mysql_host>
<help>
The host on which the database is located (default: not defined)
</help>
<value>127.0.0.1</value>
</mysql_host>
<mysql_user>
<help>
User account name for MySQL database (default: not defined)
</help>
<value>motion</value>
</mysql_user>
<mysql_password>
<help>
User password for MySQL database (default: not defined)
</help>
<value>tutank</value>
</mysql_password>
<pgsql_db>
<help>
PostgreSQL database to log to (default: not defined)
</help>
<value></value>
</pgsql_db>
<pgsql_host>
<help>
The host on which the database is located (default: not defined)
</help>
<value></value>
</pgsql_host>
<pgsql_user>
<help>
User account name for PostgreSQL database (default: not defined)
</help>
<value></value>
</pgsql_user>
<pgsql_password>
<help>
User password for PostgreSQL database (default: not defined)
</help>
<value></value>
</pgsql_password>
<pgsql_port>
<help>
Port on which the PostgreSQL database is located (default: 5432)
</help>
<value>5432</value>
</pgsql_port>
<video_pipe>
<help>
Output images to a video4linux loopback device
The value '-' means next available (default: not defined)
</help>
<value></value>
</video_pipe>
<motion_video_pipe>
<help>
Output motion images to a video4linux loopback device
The value '-' means next available (default: not defined)
</help>
<value></value>
</motion_video_pipe>
</common>
<camera>
<value>1</value>
<input_plugin>
<value>netcam</value>
</input_plugin>
<movie_plugin>
<value>ffmpeg</value>
</movie_plugin>
<netcam>
<url>
<value>http://192.1681.100/video.cgi</value>
</url>
</netcam>
<text_left>
<value>%C\nCAMERA 1</value>
</text_left>
<ffmpeg>
<timelapse>
<value>10</value>
</timelapse>
</ffmpeg>
</camera>
<camera>
<value>2</value>
<input_plugin>
<value>v4l</value>
</input_plugin>
<movie_plugin>
<value>ffmpeg</value>
</movie_plugin>
<v4l>
<videodevice>
<value>/dev/video0</value>
</videodevice>
<input>
<value>1</value>
</input>
</v4l>
<text_left>
<value>CAMERA 2</value>
</text_left>
<target_dir>
<value>/usr/local/apache2/htdocs/cam2</value>
</target_dir>
<webcam_port>
<value>8082</value>
</webcam_port>
<on_picture_save>
<value>/usr/local/motion-extras/camparse2.pl</value>
</on_picture_save>
<on_movie_end>
<value>/usr/local/motion-extras/mpegparse2.pl</value>
</on_movie_end>
<ffmpeg>
<timelapse>
<value>60</value>
</timelapse>
</ffmpeg>
</camera>
<camera>
<value>3</value>
<input_plugin>
<value>v4l</value>
</input_plugin>
<movie_plugin>
<value>ffmpeg</value>
</movie_plugin>
<v4l>
<videodevice>
<value>/dev/video2</value>
</videodevice>
<input>
<value>1</value>
</input>
</v4l>
<threshold>
<value>3000</value>
</threshold>
<text_left>
<value>CAMERA 3</value>
</text_left>
<target_dir>
<value>/usr/local/apache2/htdocs/cam3</value>
</target_dir>
<webcam_port>
<value>8083</value>
</webcam_port>
<on_picture_save>
<value>/usr/local/motion-extras/camparse3.pl</value>
</on_picture_save>
<on_movie_end>
<value>/usr/local/motion-extras/mpegparse3.pl</value>
</on_movie_end>
<ffmpeg>
<cap_new>
<value>off</value>
</cap_new>
</ffmpeg>
</camera>
</motion>
