Option | Description | Detailed Comment |
always_changes on/off | Always display the differences between the captured frame and the reference frame. This can come in handy while tuning your setup. Default: off | This feature writes the detected number of changed pixels (after noise filtering) to the console. Motions outputs the numbers for all threads continuously for every frame read from the video device. The output format is "changes: number_of_changes". The number is an expression of how many pixels that changed and how much. The higher a value, the more motion This feature does not work when in daemon mode! The feature is excellent for debugging. You can use the feature to set the noise level so that motion normally shows "changes: 0". You can also use it to set the right detection threshold level. |
auto_brightness on/off | Motion will try to adjust the brightness of the video device if the images captured are to dark or to light. This option will be most useful for video devices like web cams, which sometimes don't have such an option in hardware. Default: off | With this option enabled motion will try to regulate the brightness of a video device. If your video device already does this for you this option might cause oscillations. Editor recommends to experiment for best result. |
brightness | The brightness level for the video device. Valid range:0 to 255 Default:0 (Disabled) | If this setting is used in conjunction with the auto_brightness feature then this setting is just an initial setting and then the auto_brightness feature takes over. |
contrast | The contrast level for the video device. Valid range: 0 to 255 Default = 0 (Disabled) | |
control_localhost on/off | Limits the xml-rpc control to the localhost. Default: on | By setting this to on, the control using xml-rpc can only be accessed on the same machine on which Motion is running. |
control_port port_no | Sets the port number for the xml-rpc based remote control. Default: 0 (not defined) | This sets the port number to be used for control of motion using xml-rpc. Port numbers below 1024 normally requires that you have root privileges. Port 8080 is a fine choice of port to use for the purpose. |
daemon on/off | Start motion in daemon mode and release terminal. Default: off | Daemon mode is what you typically will use once you are done experimenting and have motion run permanently in the background on a server. Wonder about the word and its spelling. Look here! |
despeckle EedDl (and other combinations of E, e, d and D and optionally ending with l). | Despeckle motion image using combinations of (e)rode or (d)ilate. And ending with optional (l)abeling. Default: Not defined = off. | A way of tuning (by removing or enhancing) noise in the motion image. Options for the despeckle feature are any of 'e', 'E', 'd' or 'D'. This can be combined by a trailing 'l' (letter l) which enables the labeling feature. Default: Not Defined (Don't despeckle and label). Wind blowing grass and trees around or poor light conditions can cause a lot of dots (or noise) to appear in the motion image (See the section on Tuning Motion). This feature removes (or enhances!) this noise and so improves the reliability of motion. The 'e' option removes diamonds, 'E' removes squares and alternating eE will remove circles. Each e/E you add will shrink the noise by a pixel all the way around. So 'despeckle Ee' will remove circles of radius 2. However, this will also shrink the detection by 2 and will affect the threshold. So to remove noise and then restore the detected motion to its original size try 'despeckle EedD'. After the despeckle feature is done you can let the labeling feature search for areas of connected pixels and "label" each area. The program will now trigger motion based on the number of changed pixels in the largest area. In other words, the largest labeled area has to be above the threshold to trigger a motion detected.. The value EedDl is a good starting point. The possible combinations are endless and it requires many experiments to find the best combination. Just remember that the labeling feature only works as intended if it runs after the despecle feature. Ie. the letter 'l' must be the last letter and only one 'l'. If you have very few problems with false detections leave this option either blank or at EedD which will remove most of the single pixel noise. A very detailed technical explanation of the despecle part can be found at the webpage of the author of this feature Ian McConnell's Webcam: Motion Web Page |
debug_parameter integer | Debug parameter does not have any function. | The debug parameter is available for software debugging. If you want to test and debug the source code this parameter can be set anywhere in the code and its value read using the xml-rpc remote control interface. This way you can read the value of a variable, or identify where in the code the program get stuck. Unless you play with the source code this option has no function. In the current version the option is not assigned anywhere in the code. |
execute command | External command to be executed when detecting motion. Default: Not defined | Do not write "none" if you do not want to execute commands. Simply do not include the option in the file or comment it out by placing a "#" as the first character on the line before the execute command. |
ffmpeg_bps bps | Bitrate of mpegs produced by ffmpeg. Default: 400000 (400kbps). Must not be included in config file without having ffmpeg installed. | To use this feature you need to install the FFmpeg Streaming Multimedia System. Experiment to get the desired quality. The better quality the bigger files. This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled). See ffmpeg section later in this document. |
ffmpeg_cap_new on/off | Use ffmpeg libraries to encode mpeg movies in realtime. Default = off. Must not be included in config file without having ffmpeg installed. | To use this feature you need to install the FFmpeg Streaming Multimedia System See ffmpeg section later in this document. |
ffmpeg_cap_motion on/off | Use ffmpeg libraries to encode motion type mpeg movies in realtime. Default = off. Must not be included in config file without having ffmpeg installed. | To use this feature you need to install the FFmpeg Streaming Multimedia System See ffmpeg section later in this document. This feature generates the special motion type pictures where you only see the pixels that changes. The filename given is the same as the normal mpegs except they have an 'm' appended after the filename before the .mpg. E.g. 25-20040424181525m.mpg |
ffmpeg_filename value | 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 (directories based on date and time) choose: %Y/%m/%d/%H%M%S File extension .mpg is automatically added so do not include this This option uses conversion specifiers which are codes that start by % and then a letter. The conversion specifiers used has the same function as for the C function strftime (3). The most commonly used are: %Y = year, %m = month as two digits, %d = date, %H = hour, %M = minute, %S = second. Two are unique to motion %v = event, %q = frame number. With a combination of text and conversion specifiers you have full flexibility to define your directory- and filenames. For a full list of conversion specifiers see the section 'Conversion Specifiers for Advanced Filename and Text Feature'. If you are happy with the directory structures the way they were in earlier versions of motion use %v-%Y%m%d%H%M%S for 'oldlayout on' and %Y/%m/%d/%H%M%S for 'oldlayout off'. |
ffmpeg_timelapse_mode | The file rollover mode of the timelapse video. Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual. | Note that it is important that you use the conversion specifiers in ffmpeg_filename that ensure that the new timelapse file indeed is a new file. If the filename does not change Motion will simply append the timelapse pictures to the existing file. Manual means that Motion does not automatically rollover to a new filename. You can do it manually using XML-RPC by setting the option 'ffmpeg_timelapse' to 0 and then back to your chosen value. Hourly rolls over on the full hour. Value 'daily' which is the default rolls over at midnight. There are two weekly options because depending on where you come from a week may either start on Sunday or Monday. And 'monthly' naturally rolls over on the 1st of the month. |
ffmpeg_timelapse seconds | Use ffmpeg libraries to encode a timelapse movie. saving a picture frame at the interval in seconds set by this parameter. Default = 0. Set it to 0 if not used. | To use this feature you need to install the FFmpeg Streaming Multimedia System. Note that the timelapse format is always mpeg1 independent of ffmpeg_video_codec. This is because mpeg1 allows the timelapse to stop and the file to be reopened and more film appended. See ffmpeg section later in this document. (renamed from ffmpeg_timelaps to ffmpeg_timelapse in 3.1.14) |
ffmpeg_variable_bitrate value | 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. | Experiment for the value that gives you the desired compromise between size and quality. |
ffmpeg_video_codec codec_name | Codec to used by ffmpeg for the video compression. Timelapse mpegs are always made in mpeg1 format independent from this option. Supported codec formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4. | mpeg1 gives you files with extension .mpg. It is only supported by the old ffmpeg version 0.4.8. The ffmpeg team decided no longer to support non-standard framerates for mpeg1 from ffmpeg version 0.4.9pre1. mpeg4 or msmpeg4 give you files with extension .avi msmpeg4 is recommended for use with Windows Media Player because it requires with no installation of codec on the Windows client. This option does not affect the timelapse feature. Timelapse is always recorded in mpeg1 format because we need to be able to append to an existing file. mpeg4 does not easily allow this. |
framerate number | Maximum number of frames that are saved per second. Valid range: 2-100. Default: 100 (almost no limit). | Note. Motion will stop storing pictures if the framerate is set to less than 2. Set this parameter to the maximum number of images per second that you want to store either as images or as mpeg films. To set intervals longer than one second use the 'minimum_gap' option instead. |
frequency value | The frequency to set the tuner to (kHz). Valid range: per tuner spec, default: 0 (Don't set it) | This option is on relevant if you have a TV tuner card where you can select the tuner frequency. Your tuner card must support this feature. |
gap seconds | The minimum gap between two events in seconds. Default: 60 | An event is defined as a series of motion images taken within a short timeframe. E.g. a person walking through the room is an event that may have caused 10 single jpg images to be stored. This option defines how long a pause between detected motions that is needed to be defined as a new event. |
height pixels | The height of each frame. Valid range: Camera dependent, default: 288 | The height of the image in pixels. Motion does not scale so should be set to the actual size of the v4l device. In case of a net camera motion sets the height to the height of the first image read. Motion actually set the size of the image coming from the video4linux device. The selected size must be supported by the device. For some device drivers like pwc (driver for Philips USB cameras) setting the size to a non-standard value makes the driver create an image of the nearest smaller size and create a gray band around the image to fit the size given by motion. Note that it is the driver and not motion that generates the gray band. Motion will try to detect motion in the entire image including the gray band. |
hue | The hue level for the video device. Valid range: 0 to 255 Default = 0 (Disabled) | |
input number | input channel to use expressed as an integer number starting from 0. Valid range: depends on video capture card, default: 8 | This parameter is really used only with video capture cards that has more than one input. However if you set the input number to e.g. 1 for a USB camera (ov511 or pwc driver) motion writes an error message back. If you set it to 8 it does not give you any warning. If you have a video capture card you can define the channel to tune to using this option. If you are using a USB device, network camera or a capture card without tuner you should set the value to the default 8. Many TV tuner cards have the input channels: TV Tuner = 0, Standard composite video = 1, S-VHS = 3. Other have TV=0, composite video 1= 1, composite video = 2, S-VHS = 3. Editor recommends setting the parameter to 8 for USB cameras as your first try. For video capture cards input 1 is normally the composite video input. |
jpeg_filename value | 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 (directories based on date and time) choose: %Y/%m/%d/%H/%M/%S-%q File extension .jpg or .ppm is automatically added so do not include this This option uses conversion specifiers which are codes that start by % and then a letter. The conversion specifiers used has the same function as for the C function strftime (3). The most commonly used are: %Y = year, %m = month as two digits, %d = date, %H = hour, %M = minute, %S = second. Two are unique to motion %v = event, %q = frame number. With a combination of text and conversion specifiers you have full flexibility to define your directory- and filenames. For a full list of conversion specifiers see the section 'Conversion Specifiers for Advanced Filename and Text Feature'. If you are happy with the directory structures the way they were in earlier versions of motion use %v-%Y%m%d%H%M%S-%q for 'oldlayout on' and %Y/%m/%d/%H/%M/%S-%q for 'oldlayout off'. |
lightswitch percent | Ignore sudden massive light intensity changes given as a percentage of the picture area that changed intensity.¨ Valid range: 0 - 100 , default: 0 = disabled | Editors recommendation. Experiment to see what works best for your application. Note: From version 3.1.17 (snap release 2 and on) this option has changed from a boolean (on or off) to a number in percent between 0 and 100. Zero means the option is disabled. The value defines the picture areas in percent that will trigger the lightswitch condition. When lightswitch is detected motion detection is disabled for 5 picture frames. This is to avoid false detection when light conditions change and when a camera changes sensitivity at low light. |
locate on/off | Locate and draw a box around the moving object. Default: off | |
low_cpu framerate | When this option is not zero motion will be in a low cpu mode while not detecting motion. In low cpu mode Motion reduces the framerate to the value given for this option. Value zero means disabled. Default: 0 (disabled). | This is smart for running a server that also does other tasks such as running Apache, MySQL etc. Motion grabs this lower number of frames per second until it detects motion. Then it speeds up to normal speed and take pictures as set by the option "framerate". |
mail address | Address to send an e-mail to when detecting motion Default: Not defined | Address in the normal form name@domain.name. An e-mail is sent for each event. Not each picture. |
mask_file file | PGM file to use as a sensitivity mask. This picture MUST have the same width and height as the frames being captured and be in binary format. Default: Not defined. | Full path of the PGM (portable gray map) mask file (binary format). If you have one or more areas of the camera image in which you do NOT want motion detected (e.g. a tree that moves in the wind or a corner of the picture where you can see cars/pedestrians passing by) you need a mask file. This file is a picture that you create in your favorite photo editing program. The areas that you want detected must be white. The error that you want ignored must be black. The pgm image must be the same size (number of pixels high and wide) as the pictures that are taken by the camera (video4linux device). You can also adjust sensitivity by using gray tones. See the special section on mask file. If you do not have a mask file disable this option by not having it in the config file or comment it out ("#" as first character in line). If you are using the rotate option, note that the mask is applied after the rotation. |
max_mpeg_time seconds | The maximum length of an mpeg movie. Default: 3600 seconds (one hour). Set this to zero for unlimited length. | |
minimum_gap seconds | The minimum time between two shots in seconds. Valid range: 0 to thousands, default: 0 (no minimum) | This is the minimum gap between the storing pictures while detecting motion. The value zero means that pictures can be stored almost at the framerate of the camera. |
minimum_motion_frames number | 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-10. | Note that the picture frames are buffered by Motion and once motion is detected also the first frames containing motion are saved so you will not miss anything. The feature is used when you get many false detections when the camera changes light sensitivity or light changes. Experiment for best setting. Valid range is 0 to 1000s but for each step larger than 1 Motion reserves space in RAM for the picture frame buffer. Practical range is 1 to 10. |
motion_video_pipe devicename/- | The video4linux video loopback input device for motion images. If a particular pipe is to be used then use the device filename of this pipe, if a dash '-' is given motion will use /proc/video/vloopback/vloopbacks to locate a free pipe. Default: not set | Using this you can view the results in real time. E.g. by using the program camstream. The difference between this option and the video-pipe option is that this option shows the motion version of the images instead of the normal images. Disable this option by not having it in the config file (or comment it out with "#"). See also the section about video loopback device later in this document. |
mysql_db | Name of the MySQL database. Default: Undefined | MySQL CONFIG FILE OPTION. Motion must be built with MySQL libraries to use this feature. If you compiled motion with MySQL support you will need to set the mysql options if you want motion to log events to the database. |
mysql_host | IP address or domain name for the MySQL server. Use "localhost" if motion and MySQL runs on the same server. Default: Undefined. | MySQL CONFIG FILE OPTION. Motion must be built with MySQL libraries to use this feature. |
mysql_user | The MySQL user name. Default: Undefined | MySQL CONFIG FILE OPTION. Motion must be built with MySQL libraries to use this feature. |
mysql_password | The MySQL password. | MySQL CONFIG FILE OPTION. Motion must be built with MySQL libraries to use this feature. |
netcam_url URL | Specify an url to a downloadable jpeg file to use as input device. Such as an AXIS 2100 network camera. Default: not set. Must not be included in config file without having cURL (libcurl) installed. | Example of URL: http://www.gate.com/pe1rxq/jeroen.jpg. Important note: To use the Netcam options you must have the cURL shared library "libcurl" installed on your system. This is normally part of Linux distributions. If it is not installed, it is most likely on your distribution CDs. The official CURL homepage is at http://curl.haxx.se/. The download page on this site has both source code and many binary packages (RPM, Debian etc). If you use the netcam_url in motion.conf or command line with -U , height and width are ignored. It actually uses jpeglib to pull the height and width from the JPEG header directly. |
netcam_userpass user:pass | For network cameras protected by username and password, use this option for HTTP 1.1 Basic authentication. The string is specified as username:password. Default: No authentication Must not be included in config file without having cURL (libcurl) installed. | Important note: To use the Netcam options you must have the cURL shared library "libcurl" installed on your system. Only relevant for network cameras. See also 'netcam_url' option. |
night_compensate on/off | When this option is set the noise threshold will be lowered if the picture is dark. This will improve the sensitivity in dark places. However it might also increase the number of false alarms since most cameras also compensate for this with their AGC which will increase noise. Default: off | Editors recommends to experiment for best result as this depends heavily on the camera and light conditions. Do not use this with 'noise_tune' on. |
noise_level level | The noise level is used as a threshold for distinguishing between noise and motion. Valid range: 1 to 255, default: 32 | This is different from the threshold parameter. This is changes at pixel level. The purpose is to eliminate the changes generated by electric noise in the camera. Especially in complete darkness you can see the noise as small grey dots that come randomly in the picture. This noise can create false motion detection. What this parameter means is that the intensity of a pixel must change more than +/- the noise threshold parameter to be counted. |
noise_tune on/off | Activates the automatic tuning of noise level. Default: on. | This feature makes Motion continuously adjust the noise threshold for distinguishing between noise and motion. The 'noise_level' setting is ignored when activating this feature. This is a new feature and new algorithm. It may give different results depending on camera and light conditions. Report your experience with it on the Motion mailing list. If it does not work well, deactivate the 'noise_tune' option and use the manual setting of 'noise_level' instead. |
norm 0/1/2/3 | Select the norm of the video device. Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL) | This value is only used for capture cards using the BTTV driver. |
onffmpegclose command | Execute 'command' when an ffmpeg movie is closed at the end of an event. The name of the movie will be given as argument. Default: not set. | Full path name of the program/script. This can be any type of program or script. Remember to set the execution bit in the ACL and if it is a script type program such as perl or bash also remember the shebang line (e.g. #!/user/bin&perl) as the first line of the script. The command is run when an event is over. I.e. the number of seconds defined by the time 'gap' has passed since the last detection of motion and motion closes the mpeg file. |
onmpeg command | Execute 'command' when an mpeg movie is generated. The name of the movie will be given as argument. Default: not set. | Full path name of the program/script. This can be any type of program or script. Remember to set the execution bit in the ACL and if it is a script type program such as perl or bash also remember the shebang line (e.g. #!/user/bin/perl) as the first line of the script. When you use ffmpeg the film is generated on the fly and onmpeg then runs when the new mpeg file is created. Often you will want to use the onffmpegclose option which runs when the mpeg file is closed and the event is over. |
onsave command | Execute 'command' when an image is saved. The name of the image will be given as argument. Default: not set. | Full path name of the program/script. This can be any type of program or script. Remember to set the execution bit in the ACL and if it is a script type program such as perl or bash also remember the shebang line (e.g. #!/user/bin&perl) as the first line of the script. |
output_all on/off | Picture are saved continuously as if motion was detected all the time. | This feature is not meant to be the normal mode of operation. Especially not if you have the output_normal or output_motion features enabled since it will keep on saving pictures on the disk and you will soon run out of disk space. So be careful with this command.. If your frame rate is 10 pictures per second motion will save 10 new picture pr second until the disk is full. All features are triggered like it was a detection of motion incl mpeg generation and running the program given by onsave. This parameter is default off. The idea of this feature is that you can turn the feature on and off for a short period of time to test or to generate continuous mpeg films when needed. You can then use the motion-control program to turn the feature on a off. |
output_motion on/off | Output pictures with only the moving object. Default: off | Motion images shows the motion content of the pictures. This is good for tuning and testing but probably not very interesting for the general public. Default is not to store motion images. Motion pictures are stored the same place and with the same filename as normal motion triggered pictures except they have an "m" appended at the end of the filename before the .jpg or .ppm. E.g. the name can be 01-20020424232936-00m.jpg. See section later in this document about the different tuning modes. |
output_normal on/off/first | Output 'normal' pictures. Default: on | Normal image is an image that is stored when motion is detected. It is the same image that was taken by the camera. I.e. not a motion image as defined above. Default is that normal images are stored. If you set the value to 'first' Motion saves only the first motion detected picture per event. This is useful if you store mpegs on a webserver and want to present a jpeg to show the content of the mpeg on a webpage. |
pgsql_db | Name of the PostgreSQL database. Default: undefined | PostgreSQL CONFIG FILE OPTION. Motion must be built with PostgreSQL libraries to use this feature. If you compiled motion with PostgreSQL support you will need to set the following options if you want motion to log events to the database. |
pgsql_host | IP address or domain name for the PostgreSQL server. Use "localhost" if motion and PostgreSQL runs on the same server. Default: undefined | PostgreSQL CONFIG FILE OPTION. Motion must be built with pgsql_db libraries to use this feature. |
pgsql_user | The PostgreSQL user name. Default: undefined | PostgreSQL CONFIG FILE OPTION. Motion must be built with PostgreSQL libraries to use this feature. |
pgsql_password | The PostgreSQL password. Default: undefined | PostgreSQL CONFIG FILE OPTION. Motion must be built with PostgreSQL libraries to use this feature. |
pgsql_port | The PostgreSQL server port number. Default is 5432 | PostgreSQL CONFIG FILE OPTION. Motion must be built with PostgreSQL libraries to use this feature. |
post_capture number | Specifies the number of frames to be captured after motion has been detected. Valid range: 0 to thousands, default=0. | The purpose of this is mainly to create smooth video clips each time motion is detected. Use it to you personal taste (and disk space).. |
ppm on/off | Output ppm images instead of jpeg. This uses less CPU time, but causes a LOT of hard disk I/O, it is generally slower than jpeg. Default: off | Editors recommendation is to always use jpg except if you have a specific need to store high quality pictures without any quality loss. For web cameras you should always choose jpg. Note that the built in webcam server requires that this parameter is set to off. |
pre_capture number | Specifies the number of previous frames to be outputted at motion detection. Valid range: 0 to thousands, default=0. | Motion buffers the number of picture frames defined by 'pre_capture'. When motion is detected the pictures in the buffer are included in the video clip generated by ffmpeg. The effect is that it seems the program knew in advance that the event was going to take place and started the recording before it actually happened. This is a nice feature that give more complete video clips of an event. The recommended value would be approx 0.5-1 second of video so the value should be defined so it fit the framerate and the desired pre-capture time. E.g. 0.5 second at 20 frames pr second would mean a value of 10. |
quality value | The quality for the jpeg images. Valid range: 1-100,default: 75 | 100 means hardly compressed. A small number means a much smaller file size but also a less nice quality image to look at. 50 is a good compromise for most. |
quiet on/off | Be quiet, don't output beeps when detecting motion. Default: off | Only works in non-daemon mode. |
rotate degrees | Rotate image the given number of degrees. The rotation affects all saved images as well as mpeg movies. Valid values: 0 (default = no rotation), 90, 180 and 270. | The rotation feature is used when the camera is hanging upside down (180 degrees) or if you choose a picture format in portrait instead of the normal landscape (90 or 270 degrees). Note that the CPU load increases when using this feature with a value other than 0. Also note that Motion automatically swaps width and height if you rotate 90 or 270 degrees, so you don't have to touch these options. |
roundrobin_frames number | Specifies the number of frames to capture before switching inputs, this way also slow switching (e.g. every second) is possible. Default: 1 | Round robin feature is described in a section later in this document. |
roundrobin_skip number | Specifies the number of frames to skip after a switch. (1 of you are feeling lucky, 2 if you want to be safe). Default: 1 | Round robin feature is described in a section later in this document |
saturation | The saturation level for the video device. Valid range: 0 to 255. Default = 0 (Disabled) | |
smart_mask_speed | Slugginess of the smart mask. Valid range: 0 to 10. Default is 0. 1 is slow, 10 is fast. | Smartmask is a dynamic, self-learing mask. Smartmask will disable sensitivity in areas with frequent motion (like trees in the wind). Sensitivity is turned on again after some time of no more motion in this area. The built mask is a bit larger at the borders than the actual motion was. This way smartmask works more reliable when sudden moves occur under windy conditions. smart_mask_speed - it will tune slugginess of the mask. It accepts values from 0 (turned off) to 10 (fast). Fast means here that the mask is built quick, but it is also not staying very long with no more motion. Slow means that it takes a while until the mask is built but it also stays longer. A good start value for smart_mask_speed is 5. This setting is independent from the framerate. The attack and decay time is constant over all available framerates. When smartmask is enabled and motion is also configured to either write motion-images or motion-mpegs, the current smartmask is copied as an overlay into the black/white motion-pictures/mpegs in red colour. That way you can easily adjust smart_mask_speed. |
sms number | Number to send an SMS to with sms_client. Default: none | Not a feature that has received much attention recently. If you live in GSM land you are probably better off using the e-mail to SMS gateway that most GSM providers have using your mail client. For more information see the sms_client home page. |
snapshot_filename value | 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 (directories based on date and time) choose: %Y/%m/%d/%H/%M/%S-snapshot File extension .jpg or .ppm is automatically added so do not include this A symbolic link called lastsnap.jpg (or lastsnap.ppm) created in the target_dir will always point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap' This option uses conversion specifiers which are codes that start by % and then a letter. The conversion specifiers used has the same function as for the C function strftime (3). The most commonly used are: %Y = year, %m = month as two digits, %d = date, %H = hour, %M = minute, %S = second. Two are unique to motion %v = event, %q = frame number. With a combination of text and conversion specifiers you have full flexibility to define your directory- and filenames. For a full list of conversion specifiers see the section 'Conversion Specifiers for Advanced Filename and Text Feature'. If you are happy with the directory structures the way they were in earlier versions of motion use %v-%Y%m%d%H%M%S-snapshot for 'oldlayout on' and %Y/%m/%d/%H/%M/%S-snapshot for 'oldlayout off'. For the equivalent of the now obsolete option 'snap_overwrite' use the value 'lastsnap'. |
snapshot_interval seconds | Make automated snapshots every N seconds. Valid range: 0 to thousands, default: 0 (No snapshots) | The snapshots are stored in the target directory + the directory/filename specified by the 'snapshot_filename' option. This is the traditional web camera feature where a picture is taken at a regular interval independently of motion in the picture. |
sql_log_image on/off | Log to the database when creating motion triggered image file (default: on). | Configuration option common to MySQL and PostgreSQL. Motion must be built with MySQL or PostgreSQL support to use this feature. |
sql_log_snapshot on/off | Log to the database when creating a snapshot image file (default: on). | Configuration option common to MySQL and PostgreSQL. Motion must be built with MySQL or PostgreSQL support to use this feature. |
sql_log_mpeg on/off | Log to the database when creating motion triggered mpeg file (default: off). | Configuration option common to MySQL and PostgreSQL. Motion must be built with MySQL or PostgreSQL support to use this feature. |
sql_log_timelapse on/off | Log to the database when creating timelapse mpeg file (default: off). | Configuration option common to MySQL and PostgreSQL. Motion must be built with MySQL or PostgreSQL support to use this feature. |
switchfilter on/off | Turns the switch filter on or off. The filter can distinguish between most switching noise and real motion. With this you can even set roundrobin_skip to 1 without generating much false detection. Default: off. | This is a round robin related feature used when you have a capture card with multiple inputs (controlled by the 'input' option) on the same videodevice. This option is supposed to prevent the change of camera from being detected as Motion. Unfortunately it seems that many have problems detecting motion at all when this option is enabled. We are working on improving it. You are probably better off turning this option off. |
target_dir directory_path | Target directory for pictures. Default: current working directory | This is the target directory for all snapshots, motion images and normal images. The default is the current working directory (current working directory of the terminal from which motion was started). You will normally always want to specify this parameter either as a command line option or in the config file. Note that the options snapshot_filename, jpeg_filename, ffmpeg_filename, and timelapse_filename all allows specifying directories. These will all be relative to 'target_dir'. This means in principle that you can specify target_dir as '/' and be 100% flexible. It also means that Motion can write files all over your harddisk if you make a mistake. It is recommended to specify the target_dir as deep or detailed as possible for this reason. |
text_changes on/off | Turns the text showing changed pixels on/off. Default: off | By setting this option to 'on' the number of pixels that changed compared to the reference frame is displayed in the upper right corner of the pictures. This is good for calibration and test. Maybe not so interesting for a greater public. Set it to your personal taste. |
text_left TEXT | User defined text overlayed on each in the lower left corner. Use A-Z, a-z, 0-9, " / ( ) @ ~ # < > ¦ , . : - + _ \n and conversion specifiers (codes starting by a %). Default: none | User defined text is displayed in the lower left corner of the pictures. If the option is not defined no text is displayed at this position. The user defined text can be the english alphabet and a selection of symbols: (A-Z, a-z, 0-9, " / ( ) @ ~ # < > ¦ , . : - + _ \n) and conversion specifiers. You can place the text in quotation marks to allow leading spaces. With a combination is spaces and newlines you can position the text anywhere on the picture. A conversion specifier is a code that starts by % (except newline which is \n). The conversion specifiers used has the same function as for the C function strftime (3). The most commonly used are: %Y = year, %m = month as two digits, %d = date, %H = hour, %M = minute, %S = second, %T = HH:MM:SS. Two are unique to motion %v = event, %q = frame number. With a combination of text, spaces, new lines \n and conversion specifiers you have some very flexible text features. For a full list of conversion specifiers see the section 'Conversion Specifiers for Advanced Filename and Text Feature'. |
text_right TEXT | User defined text overlayed on each in the lower right corner. Use A-Z, a-z, 0-9, " / ( ) @ ~ # < > ¦ , . : - + _ \n and conversion specifiers (codes starting by a %). Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock | User defined text is displayed in the lower right corner of the pictures. If the option is not defined no text is displayed at this position. The user defined text can be the english alphabet and a selection of symbols: (A-Z, a-z, 0-9, " / ( ) @ ~ # < > ¦ , . : - + _ \n) and conversion specifiers. You can place the text in quotation marks to allow leading spaces. With a combination is spaces and newlines you can position the text anywhere on the picture. A conversion specifier is a code that starts by % (except newline which is \n). The conversion specifiers used has the same function as for the C function strftime (3). The most commonly used are: %Y = year, %m = month as two digits, %d = date, %H = hour, %M = minute, %S = second, %T = HH:MM:SS. Two are unique to motion %v = event, %q = frame number. With a combination of text, spaces, new lines \n and conversion specifiers you have some very flexible text features. For a full list of conversion specifiers see the section 'Conversion Specifiers for Advanced Filename and Text Feature'. A major difference from text_left is that if this option is undefined the default is %Y-%m-%d\n%T which displays the date in ISO format YYYY-MM-DD and below the time in 24 hour clock HH:MM:SS. |
thread filename | Thread option. With this a separate config file can be specified to be used for a new separate thread. | This is used when you have more than more camera/device. The single camera can get all its options from the default motion.conf file. If you have two or more cameras all cameras must have their unique information in a separate thread config file. This must be at least the definition of the device or input number of a capture card. Additionally you can add any other options such as target_dir, height/width etc. Format of the thread config files is the same as for the motion.conf. You add one thread statement for each camera in motion.conf. Example thread /usr/local/etc/thread1.conf thread /usr/local/etc/thread2.conf An option in a thread config file overrides the same option in motion.conf. This means that the options in motion.conf becomes the default value for all the cameras. The thread options must be the last options in the motion.conf file. |
threshold value | Threshold for declaring motion. Valid range: 1 to thousands. Default: 1500. | Use the -C command line option or the always_changes config file option to experiment to find the right threshold value. If you do not get small movement detected (see the mouse on the kitchen floor) lower the value. If motion detects too many birds or moving trees, increase the number. Practical values would be from a few hundred to 2000 indoors and 1000-10000 outdoors. |
threshold_tune on/off | Activates the automatic tuning of threshold level. Default: on | This feature makes Motion continuously adjust the threshold for declaring motion. The 'threshold' setting is ignored when activating this feature. This is a new feature and new algorithm. It may give different results depending on your camera, light conditions, indoor/outdoor, the motion to be detected etc. Report your experience with it on the Motion mailing list. If it does not work well, deactivate the 'threshold_tune' option and use the manual setting of 'threshold' instead. |
timelapse_filename value | File path for timelapse mpegs relative to target_dir (ffmpeg only). Default: %v-%Y%m%d-timelapse | Default value is equivalent to legacy 'oldlayout' option For Motion 3.0 compatible mode (directories based on date and time) choose: %Y/%m/%d-timelapse File extension .mpg is automatically added so do not include this. This option uses conversion specifiers which are codes that start by % and then a letter. The conversion specifiers used has the same function as for the C function strftime (3). The most commonly used are: %Y = year, %m = month as two digits, %d = date, %H = hour, %M = minute, %S = second. Two are unique to motion %v = event, %q = frame number. With a combination of text and conversion specifiers you have full flexibility to define your directory- and filenames. For a full list of conversion specifiers see the section 'Conversion Specifiers for Advanced Filename and Text Feature'. If you are happy with the directory structures the way they were in earlier versions of motion use %v-%Y%m%d-timelapse for 'oldlayout on' and %Y/%m/%d-timelapse for 'oldlayout off'. |
track_type number | Type of tracker (0=none, 1=stepper, 2=iomojo, 3=pwc). Default: 0. | Motion has special tracking options which use either a serial stepper motor controller, an iomojo smile cam or a Philips WebCam driver compatible pan/tilt camera such as the Logitech Quickcam Sphere or Orbit. Normally this is set to 0 and the other track options are ignored. Value 1 is for the special Motion Tracking Project using a stepper motor and a home made controller. Value 2 is for the iomojo smilecam Value 3 is for the a camera such a the Logitech Quickcam Sphere/Orbit which is driven by the pwc (Philips WebCam) driver. To use this camera your version of pwc must be at least 8.12. |
track_iomojo_id | Use this option if you have an iomojo smilecam connected to the serial port instead of a general stepper motor controller. Default: 0 | Only used for iomojo camera |
track_maxx | The maximum position for servo x. Default: 0 | Only used for stepper motor tracking. |
track_motorx | The motor number that is used for controlling the x-axis. Default: -1 | Only used for stepper motor tracking. |
track_port | This is the serial port to which the stepper motor interface is connected. Default: Not defined | Only used for stepper motor tracking. |
track_speed | Speed to set the motor to. Default: 255 | Only used for stepper motor tracking. |
track_stepsize | Number of steps to make. Default: 40 | Only used for stepper motor tracking. |
tunerdevice device_name | The tuner device used for controlling the tuner in a tuner card. This option is only used in FreeBSD. Default: /dev/tuner0 | This option is only used in the FreeBSD version of Motion. Make sure to remove or comment out this option when running Motion under Linux. |
videodevice device_name | The video device to be used for capturing. Default: /dev/video0 (for FreeBSD the default is /dev/bktr0) | This is the video4linux device name. Ignore this for net cameras. For FreeBSD default is /dev/bktr0 |
video_pipe device_name/- | The video4linux video loopback input device for normal images. If a particular pipe is to be used then use the device filename of this pipe, if a dash '-' is given motion will use /proc/video/vloopback/vloopbacks to locate a free pipe. Default: not set | Using this you can view the results in real time. E.g. by using the program camstream. The difference between this option and the video-pipe option is that this option shows the normal version of the images instead of the motion images. Disable this option by not having it in the config file (or comment it out with "#"). See also the section about video loopback device later in this document. |
webcam_limit on/off | Limit the number of frames to number frames. After nr frames the connection will be closed by motion. Default: 0 | 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. |
webcam_localhost on/off | Limits the access to the webcam to the localhost. Default: on | By setting this to on, the webcam can only be accessed on the same machine on which Motion is running. |
webcam_maxrate rate | Limit the framerate of the webcam. Default is 100. | Webcam feature is described in a section later in this document |
webcam_motion on/off | If set to 'on' Motion only sends pictures to the client when motion is detected. When 'off' Motion sends frames continuously. Default is off. | Webcam feature is described in a section later in this document |
webcam_port port_no | TCP port on which motion will listen for incoming connects with its http server. Default is 0 which is disabled. | Webcam feature is described in a section later in this document |
webcam_quality level | Quality setting for the jpeg files transferred over this connection (usually very low). Default is 30. | Webcam feature is described in a section later in this document |
width pixels | The width of each frame. Valid range: Camera dependent, default: 352 | Motion does not scale so should be set to the actual size of the v4l device. In case of a net camera motion sets the height to the height of the first image read. Motion actually set the size of the image coming from the video4linux device. The selected size must be supported by the device. For some device drivers like pwc (driver for Philips USB cameras) setting the size to a non-standard value makes the driver create an image of the nearest smaller size and create a gray band around the image to fit the size given by motion. Note that it is the driver and not motion that generates the gray band. Motion will try to detect motion in the entire image including the gray band. |