1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787
|
.TH MOTION 1 2005-01-29 "Motion" "Motion Options and Config Files"
.SH NAME
motion \- Detect motion using a video4linux device
.SH SYNOPSIS
.B motion
[ -CDhlmNpQw] [ -A ipnr] [ -a seconds] [ -c changes] [ -d device] [ -E command]
[ -F file] [ -f nr] [ -G seconds] [ -g seconds] [ -i input] [ -L noise]
[ -M address] [ -n norm] [ -O command] [ -P device] [ -q quality] [ -S nr]
[ -s widthxheight] [ -t target dir] [ -u user:pass ] [ -U webcam_path ]
[ -V device]
.SH DESCRIPTION
.I Motion
uses a video4linux device to detect motion. If motion is detected both normal
and motion pictures will be taken. Motion can also take actions to notify you
if needed. Creation of automated snapshots is also possible.
.SH OPTIONS
.TP
.B \-A
IP address or URL for Network Camera (e.g. an Axis network camera).
Only relevant for network cameras.
.TP
.B \-a seconds
time between two automated snapshots, valid range: 0 to thousands, default: 0.
The default value of 0 means that the feature is disabled.
.TP
.B \-C
Output changes count for every frame, usable for tuning.
Writes the detected number of changed pixels (after noise filtering) to the console (non-daemon mode only).
.TP
.B \-c changes
threshold for detecting a change, Valid range: 1 to thousands, default: 1500.
.TP
.B \-D
Daemonize
.TP
.B \-d device
video4linux capture device, default: /dev/video0
.TP
.B \-E command
Execute 'command' when detecting motion.
The command is executed at the beginning of the event before the images are stored.
.TP
.B \-F file
pgm image to use as a mask for filtering motion. This file must have the same size as you have set for the video4linux device.
Black area means masked out. White means fully include in motion detection.
.TP
.B \-f fps
Maximum number of picture frames per second that motion takes when detecting movement. Valid range: 0 to limit of camera.
Default is none which means that it takes as many as possible.
.TP
.B \-G seconds
Minimum gap between two shots in seconds. 0 to thousands, default: 0
.TP
.B \-g seconds
minimum gap between events, Valid range: 1 to thousands, default 60.
An event is defined as a series of motion images taken within a short timeframe.
.TP
.B \-h
Display an short text with all command line functions.
.TP
.B \-i input
input channel to use for video capture cards. Valid range: depends on video capture card, default: not set
.TP
.B \-L noise
Noise level, all changes smaller than this level will be considered noise. Valid range: 1 to 255, default: 32
.TP
.B \-l
Do not locate and mark motion on output pictures.
The mark is in the form of a rectangle on the saved images so that you can easily see what it was that was moving in the picture.
.TP
.B \-M address
Send a mail to 'address' when detecting motion.
.TP
.B \-m
Output 'motion' images.
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 have an m at the end of the filename.
.TP
.B \-N on|off|first
Output normal images.
Normal image is an image that is stored when motion is detected.
It is the same image that was taken by the camera. The valid values are 'on', 'off', and 'first'. Default is 'on'
.TP
.B \-n norm
norm to use (pal/pal-nc/ntsc/secam), default: pal. For capture cards only.
.TP
.B \-O command
Execute 'command' when an image is saved. The name of the image will be given as argument.
.TP
.B \-P device
video4linux video loopback input for normal images. If a dash '-' is given as device, motion will try to use /proc/video/vloopback/vloopbacks to find a free pipe on its own. default: not set
.TP
.B \-p
Output ppm images instead of jpeg. This will reduce CPU load but disk I/O will increase a lot.
.TP
.B \-Q
Don't sound the warning beep when detecting motion. (This doesn't change anything in daemon mode, there never is a beep there)
.TP
.B \-q quality
JPEG image quality, Valid range: 0-100,default: 75.
.TP
.B \-S number
Send a SMS to number using sms_client when detecting motion.
.TP
.B \-s widthxheight
Picture size, Valid range: Camera dependent, default: 352x288
.TP
.B \-t target-dir
destination for snapshots. Default is current working directory.
.TP
.B \-U url|IP_addr
Webcam path. URL for a net camera.
.TP
.B \-u user:pass
For password-protected network cameras, use this option for the HTTP 1.1 Basic authentication mechanism. default: No authentication.
Only relevant for network cameras.
.TP
.B \-V device
Output device name. Device name that motion uses to generate output for the video loopback device driver.
.TP
.B \-w
Ignore sudden massive light intensity changes given as a percentage of the picture area that changed intensity.
Valid range: 0 - 100 , default: 0 = disabled
.SH "CONFIG FILE OPTIONS"
These are the options that can be used in the config file.
.I They are overridden by the commandline!
All number values are integer numbers (no decimals allowed).
Boolean options can be on or off (values "1", "yes" and "on" all means true and any other value means false).
.TP
.B always_changes on|off
Always display the differences between the captured frame and the reference frame (non-daemon mode only).
This can come in handy while tuning your setup. Default: off
.TP
.B 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
.TP
.B brightness value
Set the initial brightness of a video device. Valid range 0-255, default 0 = disabled.
.TP
.B contrast value
Set the contrast of a video device. Valid range 0-255, default 0 = disabled.
.TP
.B control_localhost on|off
Limits the xml-rpc control to the localhost. Default: on
.TP
.B control_port port_no
Sets the port number for the xml-rpc based remote control. Default: 0 (not defined)
.TP
.B daemon on|off
Start motion in daemon mode and release terminal. Default: off
.TP
.B despeckle EedDl
Despeckle motion image using (e)rode or (d)ilate followed by optional (l)abeling of largest area (Default: not defined)
.br
Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
.br
(l)abeling must only be used once and as the last letter.
.br
Comment out to disable
.TP
.B execute command
External command to be executed when detecting motion. Default: none
.TP
.B ffmpeg_bps bps
Bitrate of mpegs produced by ffmpeg. Default: 400000 (400Kbps)
.TP
.B ffmpeg_cap_new on|off
Use ffmpeg libraries to encode mpeg movies in realtime. Default = off.
FFmpeg Streaming Multimedia System must be installed saperately.
.TP
.B ffmpeg_cap_motion on|off
Use ffmpeg libraries to encode motion type mpeg movies in realtime. Default = off.
FFmpeg Streaming Multimedia System must be installed saperately.
.TP
.B ffmpeg_filename filepath
File path for motion triggered ffmpeg films (mpeg) relative to target_dir.
.br
Default value (%v-%Y%m%d%H%M%S) is equivalent to legacy 'oldlayout' option.
.br
For Motion 3.0 compatible mode (directories based on date and time) choose: %Y/%m/%d/%H%M%S.
.br
File extension .mpg or .avi is automatically added so do not include this.
.br
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).
.br
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.
.br
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'.
.br
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'.
.TP
.B ffmpeg_timelapse_mode
The file rollover mode of the timelapse video.
Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual.
.TP
.B 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 = not defined. Set it to 0 if not used.
.TP
.B ffmpeg_variable_bitrate
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.
.TP
.B ffmpeg_video_codec
Codec to used by ffmpeg for the video compression. Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
.br
Timelapse mpegs are always made in mpeg1 format independent from this option.
.br
mpeg1 gives you files with extension .mpg
.br
mpeg4 or msmpeg4 give you files with extension .avi
.br
msmpeg4 is recommended for use with Windows Media Player because it requires with no installation of codec on the Windows client.
.TP
.B framerate fps
Maximum number of frames that are saved per second. Valid range: 2-100. Default: 100 (almost no limit).
To set intervals longer than one second use the 'minimum_gap' option instead.
.TP
.B frequency value
The frequency to set the tuner to (kHz). Valid range: per tuner spec, default: 0 (Don't set it)
.TP
.B 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.
.TP
.B height pixels
The height of each frame. Valid range: Camera dependent, default: 288
.TP
.B hue value
Set the hue of a video device (NTSC feature). Valid range 0-255, default 0 = disabled.
.TP
.B input number
Select the input of the video device. Valid range: depends on video capture card, default: 8.
Only used for video capture cards (bttv driver).
.TP
.B jpeg_filename filepath
File path for motion triggered images (jpeg or ppm) relative to target_dir.
.br
Default value (%v-%Y%m%d%H%M%S-%q) is equivalent to legacy 'oldlayout' option.
.br
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.
.br
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).
.br
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.
.br
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'.
.br
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'.
.TP
.B 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
.TP
.B locate on|off
Locate and draw a box around the moving object. Default: off
.TP
.B 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).
.TP
.B mail address
Address to send an e-mail to when detecting motion Default: none
.TP
.B 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 binary format.
Use gray scale to adjust motion sensitivity from none (black) to full (white). Default: not set.
.TP
.B max_mpeg_time seconds
The maximum length of an mpeg movie. Default: 3600 seconds (one hour). Set this to zero for unlimited length.
.TP
.B minimum_gap seconds
The minimum time between two shots in seconds while detecting motion. Valid range: 0 to thousands, default: 0 (no minimum)
.TP
.B 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.
.TP
.B 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
.TP
.B netcam_url URL
Specify an url to a downloadable jpeg file or mjpeg stream to use as input device. Such as an AXIS 2100 network camera. Default: not set.
.TP
.B 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
.TP
.B night_compensate on|off
When this option is set the noise threshold will be lowered if the picture is to 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. You should set noise_tune to off when using this option. Default: off
.TP
.B 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. noise_level works for changes at pixel level.
.TP
.B noise_tune on|off
With this option enabled the noise_level is ignored, motion will measure the average
noise level and calculate the level itself. Default: on
.TP
.B 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).
For capture cards only.
.TP
.B onffmpegclose command
Execute 'command' when an mpeg movie, which is generated by ffmpeg, is closed. Default: not set.
.TP
.B onmpeg command
Execute 'command' when an mpeg movie is generated. The name of the movie will be given as argument. Default: not set.
.TP
.B onsave command
Execute 'command' when an image is saved. The name of the image will be given as argument. Default: not set.
.TP
.B output_all on|off
Always save pictures (which depends on output_normal and output_motion) even when no motion is detected.
.TP
.B output_motion on|off
Output pictures with only the moving object. Default: off
.TP
.B output_normal on|off|first
Output 'normal' pictures. Default: on. Normal image is an image that is stored when motion is detected. The valid values are 'on', 'off', and 'first'. Value 'first' saves only first motion detected image per event.
.TP
.B post_capture number
Specifies the number of frames to be captured after motion has been detected. Valid range: 0 to thousands, default=0.
.TP
.B 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
.TP
.B pre_capture number
Specifies the number of previous frames to be outputed at motion detection.
Valid range: 0 to thousands, default=0.
.TP
.B quality value
The quality for the jpeg images. Valid range: 1-100,default: 75
.TP
.B quiet on|off
Be quiet, don't output beeps when detecting motion. Default: off
.TP
.B rotate degrees
Rotate image this number of degrees. The rotation affects all saved images as\n"
well as mpeg movies. Valid values: 0 (default = no rotation), 90, 180 and 270
.TP
.B 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.
Used for capture cards with more than one input.
When creating thread config files for the same video device but different channel/frequency motion goes into round robing mode.
This means that motion changes the channel/frequency of the capture card and thread each channel as individual and seperate inputs.
.TP
.B 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
.TP
.B saturation value
Set the saturation of a video device. Valid range 0-255, default 0 = disabled.
.TP
.B smart_mask_speed value
Dynamically create a mask file during operation (default: 0). Adjust speed of mask changes from 0 (off) and 1 (slow) to 10 (fast).
.TP
.B sms number
Number to send an SMS to with sms_client. Default: none
.TP
.B snapshot_filename filepath
File path for snapshots (jpeg or ppm) relative to target_dir.
.br
Default value (%v-%Y%m%d%H%M%S-snapshot) is equivalent to legacy 'oldlayout' option.
.br
For Motion 3.0 compatible mode (directories based on date and time) choose: %Y/%m/%d/%H/%M/%S-snapshot.
.br
File extension .jpg or .ppm is automatically added so do not include this.
.br
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'.
.br
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).
.br
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.
.br
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'.
.br
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'.
.br
For the equivalent of the now obsolete option 'snap_overwrite' use the value 'lastsnap'.
.TP
.B snapshot_interval seconds
Make automated snapshots every N seconds. Valid range: 0 to thousands, default: 0 (No snapshots)
.TP
.B switchfilter on|off
Turns the switch filter on or off. Default is off. The filter can distinguish between most switching noise and real motion.
With this you can even set roundrobing_skip to 1 without generating much false detection.
.TP
.B 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.
.br
The default is the current working directory (current working directory of the terminal from which motion was started).
.br
You will normally always want to specify this parameter either as a command line option or in the config file.
.br
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.
.br
It is recommended to specify the target_dir as deep or detailed as possible for this reason.
.TP
.B 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.
.TP
.B text_left TEXT
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.
.br
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.
.br
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).
.br
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.
.br
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'.
.TP
.B text_right TEXT
User defined text is displayed in the lower right corner of the pictures.
If the option is not defined the default date- and timestamp is displayed at this position.
Default: %Y-%m-%d\\n%T = date in ISO format and time in 24 hour clock
.br
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.
.br
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).
.br
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.
.br
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.
.br
If you do not want any text specify an empty string "".
.TP
.B 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.
.br
A 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.
.br
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.
.br
Format of the thread config files is the same as for the motion.conf.
.br
You add one thread statement for each camera in motion.conf.
.br
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.
.TP
.B threshold value
Threshold for declaring motion. Valid range: 1 to thousands, default: 1500.
.TP
.B threshold_tune on|off
Activates the automatic tuning of threshold level. Default: on
.TP
.B timelapse_filename filepath
File path for timelapse mpegs relative to target_dir (ffmpeg only).
.br
Default: %v-%Y%m%d-timelapse
.br
Default value is equivalent to legacy 'oldlayout' option.
.br
For Motion 3.0 compatible mode (directories based on date and time) choose: %Y/%m/%d-timelapse .
.br
File extension .mpg is automatically added so do not include this.
.br
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).
.br
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.
.br
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'.
.br
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-timelaps for 'oldlayout off'.
.TP
.B videodevice device_name
The videodevice to be used for capturing. Default: /dev/video0
.TP
.B 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
.TP
.B webcam_limit value
Limits the number of images per connection to the webcam (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.
.TP
.B webcam_localhost on|off
Limit connections to the webcam server to localhost only.
.TP
.B webcam_maxrate rate
Limit the framerate of the webcam. Default is 100.
.TP
.B webcam_motion on|off
If set to on only send images with motion over the webcam connection, else send frames continuously. Default is off.
.TP
.B webcam_port port_no
TCP port on which motion will listen for incoming connects with its http server. Default is 0 which is disabled.
Motion has a mini http server built in. Each thread can have its own webserver.
If you enable the webcam server (option webcam_port to a number different from 0)
and you have threads you must make sure to include webcam_port to different ports or zero
(disable) in each thread config file.
Otherwise motion will crash because each webcam server will use the setting from the
motion.conf file and try to bind to the same port.
The webserver generates a stream in "multipart jpeg" format. To view in webbrowser use the Cambozola Java applet.
.TP
.B webcam_quality level
Quality setting for the jpeg files transferred over this connection (usually very low). Default is 30.
.TP
.B width pixels
The width of each frame. Valid range: Camera dependent, default: 352
.SH Common Options For MySQL and PostgreSQL database features.
If you compiled motion with MySQL or PostgreSQL support you will need
to set the following options if you want motion to log events to the database.
Options require the MySQL/PostgreSQL options to be active also.
.TP
.B sql_log_image on|off
Log to the database when creating motion triggered image file (default: on).
.TP
.B sql_log_snapshot on|off
Log to the database when creating a snapshot image file (default: on).
.TP
.B sql_log_mpeg on|off
Log to the database when creating motion triggered mpeg file (default: off).
.TP
.B sql_log_timelapse on|off
Log to the database when creating timelapse mpeg file (default: off).
.SH MySQL CONFIG FILE OPTIONS
If you compiled motion with MySQL support you will need to set the following
options if you want motion to log events to the database.
Database must contain a table security with the following fields: filename char(60) not null, minute int, hour int, day int, month int,
year int, type int.
.TP
.B mysql_db data_base
Name of the MySQL database
.TP
.B mysql_host host
IP address or domain name for the MySQL server. Use "localhost" if motion and MySQL runs on the same server.
.TP
.B mysql_user user_name
The MySQL user name.
.TP
.B mysql_password
The MySQL password.
.SH PostgreSQL CONFIG FILE OPTIONS
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.
Database must contain a table security with the following fields: filename char(60) not null, minute int, hour int, day int, month int,
year int, type int.
.TP
.B pgsql_db database
Name of the PostgresSQL database
.TP
.B pgsql_host host
IP address or domain name for the PostgresSQL server. Use "localhost" if motion and PostgresSQL runs on the same server.
.TP
.B pgsql_user user_name
The PostgresSQL user name
.TP
.B pgsql_password password
The PostgresSQL password
.TP
.B pgsql_port port
The PostgresSQL server port number. Default is 5432
.SH TRACKING CONFIG FILE OPTIONS
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.
For this motion has the following options:
.TP
.B track_type type
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.
.TP
.B track_port port
This is the serial port to which the stepper motor interface is connected (only used for stepper motor).
.TP
.B track_motorx number
The motor number that is used for controlling the x-axis (only used for stepper motor).
.TP
.B track_maxx position
The maximum possition for servo x (only used for stepper motor).
.TP
.B track_iomojo_id number
Use this option if you have an iomojo smilecam connected to the serial port
instead of a general stepper motor controller.
Default: -1 (Use the stepper motor interface)
.TP
.B track_speed number
Speed to set the tracking stepper motor to
.TP
.B track_stepsize steps
The maximum number of steps to make (only used for stepper motor).
.SH SIGNALS
Motion responds to the following signals:
.TP
.B SIGHUP
The config file will be reread.
.TP
.B SIGTERM
If needed motion will create an mpeg file of the last event and exit
.TP
.B SIGUSR1
Motion will create an mpeg file of the current event.
.SH "SEE ALSO"
mail(1), sms_client(1)
.SH NOTES
.TP
.B Snapshot
A snapshot is a picture taken at regular intervals independently of any movement in the picture.
.TP
.B Motion image
A "motion" image or "realmotion image" shows the pixels that have actually changed during the last frames.
These pictures are not very useful for normal presentation to the public but they are quite
useful for testing and tuning and making mask files as you can see exactly where motion sees something moving.
.TP
.B Normal image
A normal image is the entire image taken by the camera.
.TP
.B Threads and config files
Motion generates a thread for each camera plus two extra control threads.
All options for the first camera must be in the motion.conf file.
For each extra camera you make a thread config file which contains all the unique options for this camera.
The option that are found in a thread file overrules the same parameter defined in the motion.conf file.
Motion reads its configuration in the following sequence. If the same parameter exists more than one place the last one read wins.
1. Motion reads the configuration file motion.conf from the beginning of the file going down line by line.
2. If the option "thread" is defined in motion.conf, the thread configuration file(s) is/(are) read.
3. Motion continues reading the rest of the motion.conf file. Any options from here will overrule the same option previously defines in a thread config file.
4. Motion read the command line option again overruling any previously defined options.
.TP
.B Conversion Specifiers for Advanced Filename and Text Features
The list below shows all the supported Conversion Specifiers you can use in the options text_left, text_right, snapshot_filename, jpeg_filename, ffmpeg_filename, and timelapse_filename.
In text_left and text_right you can additionally use '\\n' for new line.
Conversion Specifier - Description
.TP
.B %a
The abbreviated weekday name according to the current locale.
.TP
.B %A
The full weekday name according to the current locale.
.TP
.B %b
The abbreviated month name according to the current locale.
.TP
.B %B
The full month name according to the current locale.
.TP
.B %c
The preferred date and time representation for the current locale.
.TP
.B %d
The day of the month as a decimal number (range 01 to 31).
.TP
.B %D
Equivalent to %m/%d/%y. (Yecch - for Americans only. Americans should note that in other countries %d/%m/%y is rather common. This means that in international context
this format is ambiguous and should not be used.)
.TP
.B %E
Modifier: use alternative format, see below.
.TP
.B %F
Equivalent to %Y-%m-%d (the ISO 8601 date format).
.TP
.B %H
The hour as a decimal number using a 24-hour clock (range 00 to 23).
.TP
.B %I
The hour as a decimal number using a 12-hour clock (range 01 to 12).
.TP
.B %j
The day of the year as a decimal number (range 001 to 366).
.TP
.B %k
The hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank. (See also %H.)
.TP
.B %l
The hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank. (See also %I.)
.TP
.B %m
The month as a decimal number (range 01 to 12).
.TP
.B %M
The minute as a decimal number (range 00 to 59).
.TP
.B %p
Either 'AM' or 'PM' according to the given time value, or the corresponding strings for the current locale. Noon is treated as `pm' and midnight as `am'.
.TP
.B %P
Like %p but in lowercase: `am' or `pm' or a corresponding string for the current locale.
.TP
.B %q
Picture frame number within current second. For jpeg filenames this should always be included in the filename if you save more then 1 picture per second to ensure unique
filenames. It is not needed in filenames for mpegs.
.TP
.B %r
The time in a.m. or p.m. notation.
.TP
.B %R
The time in 24-hour notation (%H:%M).
.TP
.B %s
The number of seconds since the Epoch, i.e., since 1970-01-01 00:00:00 UTC.
.TP
.B %S
The second as a decimal number (range 00 to 61).
.TP
.B %T
The time in 24-hour notation (%H:%M:%S).
.TP
.B %u
The day of the week as a decimal, range 1 to 7, Monday being 1. See also %w.
.TP
.B %U
The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also %V and %W.
.TP
.B %v
Event number. An event is a series of motion detections happening with less than 'gap' seconds between them.
.TP
.B %V
The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with
Monday as the first day of the week. See also %U and %W.
.TP
.B %w
The day of the week as a decimal, range 0 to 6, Sunday being 0. See also %u.
.TP
.B %W
The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01.
.TP
.B %x
The preferred date representation for the current locale without the time.
.TP
.B %X
The preferred time representation for the current locale without the date.
.TP
.B %y
The year as a decimal number without a century (range 00 to 99).
.TP
.B %Y
The year as a decimal number including the century.
.TP
.B %z
The time-zone as hour offset from GMT.
.TP
.B %Z
The time zone or name or abbreviation.
.TP
.B More information
Motion homepage: http://motion.sourceforge.net/
Motion Guide (user and installation guide): http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuide
.SH AUTHORS
Jeroen Vreeken (pe1rxq@amsat.org),
Folkert van Heusden,
Kenneth Lavrsen (kenneth@lavrsen.dk)
|