forked from Motion-Project/motion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
motion.1
2263 lines (2115 loc) · 44.3 KB
/
motion.1
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
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.TH MOTION 1 2017-11-05 "Motion" "Motion Options and Config Files"
.SH NAME
motion \- Detect motion using a video4linux device or network camera
.SH SYNOPSIS
.B motion [ \-hbnsm ] [ \-c config file path ] [ \-d level ] [ \-k level ] [ \-p process_id_file ][ \-l log_file ]
.SH DESCRIPTION
.I Motion
uses a video4linux device or network camera to detect motion. If motion is detected both normal
and motion pictures can be taken. Motion can also take actions to notify you
if needed. Creation of automated snapshots is also possible.
.SH OPTIONS
.TP
.B \-c
Full path and filename of config file.
For example: \fI /home/kurt/motion.conf \fR
The default is \fI /usr/local/etc/motion\fR unless specified differently when building Motion.
Many RPMs and Debian packages will use \fI/etc\fR or \fI/etc/motion\fR as the default.
.TP
.B \-h
Show help screen.
.TP
.B \-b
Run in daemon mode.
.TP
.B \-n
Run in non-daemon mode.
.TP
.B \-s
Run in setup mode. Also forces non-daemon mode.
.TP
.B \-d
Run with message log level 1-9.
.TP
.B \-k
Run with message log type 1-9.
.TP
.B \-l
Full path and file name for the log file.
.TP
.B \-p
Full path and filename for process id file (pid file). E.g /var/run/motion.pid. Default is not defined. Pid file is only created when Motion is started in daemon mode.
.TP
.B \-m
Start in pause mode.
.TP
.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 daemon
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
When specified as ON, Motion goes into daemon (background process) mode and releases the terminal.
.RE
.RE
.TP
.B process_id_file
.RS
.nf
Values: User specified string
Default: Not defined
Description:
.fi
.RS
File to store the process ID, also called pid file.
.RE
.RE
.TP
.B setup_mode
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
Start in Setup-Mode, daemon disabled.
.RE
.RE
.TP
.B logfile
.RS
.nf
Values: User specified string
Default: Not Defined
Description:
.fi
.RS
File to save logs messages, if not defined stderr and syslog is used.
.RE
.RE
.TP
.B log_level
.RS
.nf
Values: 1 to 9 (EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL)
Default: 6 / NTC
Description:
.fi
.RS
Specify the level of verbosity in the messages sent to the log.
.RE
.RE
.TP
.B log_type
.RS
.nf
Values: COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL
Default: ALL
Description:
.fi
.RS
Filter to log messages by type
.RE
.RE
.TP
.B camera_id
.RS
.nf
Values: Numeric identification number for the camera
Default: The order in which the camera is opened by Motion
Description:
.fi
.RS
Use this option to assign a number to each camera that is consistent every time that Motion is started.
By default Motion will assign a number based upon the sequence in which it reads the configuration and this
sequence may not be the same every time that Motion starts.
.RE
.RE
.TP
.B camera_name
.RS
.nf
Values: User specified string
Default: Not Defined
Description:
.fi
.RS
User specified string to describe the camera.
.RE
.RE
.TP
.B videodevice
.RS
.nf
Values: User specified string
Default: /dev/video0
Description:
.fi
.RS
String to specify the videodevice to be used for capturing.
The format is usually /dev/videoX where X varies depending upon the video devices connected to the computer.
For FreeBSD certain devices use the bktr subsystem and they will use /dev/bktr0.
.RE
.RE
.TP
.B v4l2_palette
.RS
.nf
Values: 0 to 17
.RS
V4L2_PIX_FMT_SN9C10X : 0 'S910'
V4L2_PIX_FMT_SBGGR16 : 1 'BYR2'
V4L2_PIX_FMT_SBGGR8 : 2 'BA81'
V4L2_PIX_FMT_SPCA561 : 3 'S561'
V4L2_PIX_FMT_SGBRG8 : 4 'GBRG'
V4L2_PIX_FMT_SGRBG8 : 5 'GRBG'
V4L2_PIX_FMT_PAC207 : 6 'P207'
V4L2_PIX_FMT_PJPG : 7 'PJPG'
V4L2_PIX_FMT_MJPEG : 8 'MJPEG'
V4L2_PIX_FMT_JPEG : 9 'JPEG'
V4L2_PIX_FMT_RGB24 : 10 'RGB3'
V4L2_PIX_FMT_SPCA501 : 11 'S501'
V4L2_PIX_FMT_SPCA505 : 12 'S505'
V4L2_PIX_FMT_SPCA508 : 13 'S508'
V4L2_PIX_FMT_UYVY : 14 'UYVY'
V4L2_PIX_FMT_YUYV : 15 'YUYV'
V4L2_PIX_FMT_YUV422P : 16 '422P'
V4L2_PIX_FMT_YUV420 : 17 'YU12'
V4L2_PIX_FMT_Y10 : 18 'Y10'
V4L2_PIX_FMT_Y12 : 19 'Y12'
V4L2_PIX_FMT_GREY : 20 'GREY'
V4L2_PIX_FMT_H264 : 21 'H264'
.RE
Default: 17
Description:
.fi
.RS
The v4l2_palette option allows users to choose the preferred palette to be use by motion to capture from the video device.
If the preferred palette is not available from the video device, Motion will attempt to use palettes that are supported.
.RE
.RE
.TP
.B tunerdevice
.RS
.nf
Values: User Specified String
Default: /dev/tuner0
Description:
.fi
.RS
Tuner device to be used for capturing images.
This is ONLY used for FreeBSD.
.RE
.RE
.TP
.B input
.RS
.nf
Values:
.RS
\-1 : USB Cameras
0 : video/TV cards or uvideo(4) on OpenBSD
1 : video/TV cards
.RE
Default: \-1
Description:
.fi
.RS
The video input to be used.
.RE
.RE
.TP
.B norm
.RS
.nf
Values:
.RS
0 (PAL)
1 (NTSC)
2 (SECAM)
3 (PAL NC no colour)
.RE
Default: 0 (PAL)
Description:
.fi
.RS
The video norm to use when capturing from TV tuner cards
.RE
.RE
.TP
.B frequency
.RS
.nf
Values: Dependent upon video device
Default: 0
Description:
.fi
.RS
The frequency to set the tuner in kHz when using a TV tuner card.
.RE
.RE
.TP
.B power_line_frequency
.RS
.nf
Values:
.RS
-1 : Do not modify device setting
0 : Power line frequency Disabled
1 : 50hz
2 : 60hz
3 : Auto
.RE
Default: -1
Description:
.fi
.RS
Override the power line frequency for the video device.
.RE
.RE
.TP
.B rotate
.RS
.nf
Values: 0, 90, 180, 270
Default: 0
Description:
.fi
.RS
Rotate image this number of degrees.
The rotation affects all saved images as well as movies.
.RE
.RE
.TP
.B flip_axis
.RS
.nf
Values: none, v, h
Default: none
Description:
.fi
.RS
Flip the images vertically or horizontally.
The flip affects all saved images as well as movies.
.RE
.RE
.TP
.B width
.RS
.nf
Values: Dependent upon video device
Default: 352
Description:
.fi
.RS
Image width in pixels for the video device.
.RE
.RE
.TP
.B height
.RS
.nf
Values: Dependent upon video device
Default: off
Description:
.fi
.RS
Image height in pixels for the video device
.RE
.RE
.TP
.B framerate
.RS
.nf
Values: 2 - 100
Default: 100
Description:
.fi
.RS
The maximum number of frames to capture in 1 second.
The default of 100 will normally be limited by the capabilities of the video device.
Typical video devices have a maximum rate of 30.
.RE
.RE
.TP
.B minimum_frame_time
.RS
.nf
Values: 0 to unlimited
Default: 0
Description:
.fi
.RS
The minimum time in seconds between capturing picture frames from the camera.
The default of 0 disables this option and relies upon the capture rate of the camera.
This option is used when you want to capture images at a rate lower than 2 per second.
.RE
.RE
.TP
.B netcam_url
.RS
.nf
Values: User specified string
Default: None
Description:
.fi
.RS
Full connection URL string to use to connect to a network camera.
The URL must provide a stream of images instead of only a static image.
The following prefixes are recognized
.RS
https://
ftp:https://
mjpg:https://
rtsp:https://
rtmp:https://
mjpeg:https://
file:https://
v4l2:https://
.RE
The connection string is camera specific.
It is usually the same as what other video playing applications would use to connect to the camera stream.
Motion currently only supports basic authentication for the cameras.
Digest is not currently supported.
Basic authentication can be specified in the URL or via the netcam_userpass option.
.RE
.RE
.TP
.B netcam_highres
.RS
.nf
Values: User specified string
Default: None
Description:
.fi
.RS
Full connection URL string to use to connect to a high resolution network camera.
The URL must provide a stream of images instead of only a static image.
The following prefixes are recognized
.RS
rtsp:https://
rtmp:https://
.RE
The connection string is camera specific.
It is usually the same as what other video playing applications would use to connect to the camera stream.
Motion currently only supports basic authentication for the cameras.
Digest is not currently supported.
Basic authentication can be specified in the URL or via the netcam_userpass option.
.RE
.RE
.TP
.B netcam_userpass
.RS
.nf
Values: User specified string
Default: Not Defined
Description:
.fi
.RS
The user id and password required to access the network camera string.
Only basic authentication is supported at this time.
Format is in user:password format when both a user name and password are required.
.RE
.RE
.TP
.B netcam_keepalive
.RS
.nf
Values:
.RS
.fi
off: The historical implementation using HTTP/1.0, closing the socket after each http request.
.nf
.fi
force: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
.nf
.fi
on: Use HTTP/1.1 requests that support keep alive as default.
.nf
.RE
Default: off
Description:
.fi
.RS
This setting is to keep-alive (open) the network socket between requests.
When used, this option should improve performance on compatible net cameras.
This option is not applicable for the rtsp:https://, rtmp:https:// and mjpeg:https:// formats.
.RE
.RE
.TP
.B netcam_proxy
.RS
.nf
Values: User specified string
Default: Not defined
Description:
.fi
.RS
If required, the URL to use for a netcam proxy server.
For example, "https://myproxy".
If a port number other than 80 is needed, append to the specification.
For examplet, "https://myproxy:1234".
.RE
.RE
.TP
.B netcam_tolerant_check
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
Use a less strict jpeg validation for network cameras.
This can assist with cameras that have poor or buggy firmware.
.RE
.RE
.TP
.B rtsp_uses_tcp
.RS
.nf
Values: on/off
Default: on
Description:
.fi
.RS
When using a RTSP/RTMP connection for a network camera, use a TCP transport instead of UDP.
The UDP transport frequently results in "smeared" corrupt images.
.RE
.RE
.TP
.B mmalcam_name
.RS
.nf
Values: User specified string
Default: Not defined
Description:
.fi
.RS
Name of camera to use if you are using a camera accessed through OpenMax/MMAL.
This value is used to specify the use of the PI camera.
The typical value for the PI camera is vc.ril.camera
.RE
.RE
.TP
.B mmalcam_control_params
.RS
.nf
Values: User specified string
Default: Not defined
Description:
.fi
.RS
Camera configuration options to use for the OpenMax/MMAL camera.
See the raspivid/raspistill tool documentation for full list of options.
Typical value for the PI camera is -hf
.RE
.RE
.TP
.B auto_brightness
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
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.
.RE
.RE
.TP
.B brightness
.RS
.nf
Values: 0 to 255
Default: 0 (Disabled)
Description:
.fi
.RS
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.
.RE
.RE
.TP
.B contrast
.RS
.nf
Values: 0 to 255
Default: 0 (Disabled)
Description:
.fi
.RS
The contrast value to set for the video device.
.RE
.RE
.TP
.B saturation
.RS
.nf
Values: 0 to 255
Default: 0 (Disabled)
Description:
.fi
.RS
The saturation value to set for the video device.
.RE
.RE
.TP
.B hue
.RS
.nf
Values: 0 to 255
Default: 0 (Disabled)
Description:
.fi
.RS
The hue value to set for the video device.
.RE
.RE
.TP
.B roundrobin_frames
.RS
.nf
Values: 1 to unlimited
Default: 1
Description:
.fi
.RS
Number of frames to capture in each roundrobin step
.RE
.RE
.TP
.B roundrobin_skip
.RS
.nf
Values: 1 to unlimited
Default: 1
Description:
.fi
.RS
Number of frames to skip before each roundrobin step
.RE
.RE
.TP
.B switchfilter
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
Filter out noise generated by roundrobin
.RE
.RE
.TP
.B threshold
.RS
.nf
Values: 1 to unlimited
Default: 1500
Description:
.fi
.RS
Threshold for number of changed pixels in an image that triggers motion detection
.RE
.RE
.TP
.B threshold_tune
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
Automatically tune the threshold down if possible.
.RE
.RE
.TP
.B noise_level
.RS
.nf
Values: 1 to unlimited
Default: 32
Description:
.fi
.RS
Noise threshold for the motion detection.
.RE
.RE
.TP
.B noise_tune
.RS
.nf
Values: on/off
Default: on
Description:
.fi
.RS
Automatically tune the noise threshold
.RE
.RE
.TP
.B despeckle_filter
.RS
.nf
Values:
.RS
e/E : erode
d/D : dilate
l : label
.RE
Default: EedDl
Description:
.fi
.RS
Despeckle motion image using (e)rode or (d)ilate or (l)abel.
The 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
.RE
.RE
.TP
.B area_detect
.RS
.nf
Values: 1 to 9
Default: Not Defined
Description:
.fi
.RS
When motion is detected in the predefined areas indicated below,
trigger the script indicated by the on_area_detected.
The trigger is only activated once during an event.
one or more areas can be specified with this option.
Note that this option is only used to trigger the indicated script.
It does not limit all motion detection events to only the area indicated.
.RS
Image Areas
.RE
.RS
123
.RE
.RS
456
.RE
.RS
789
.RE
.RE
.RE
.TP
.B mask_file
.RS
.nf
Values: User specified string
Default: Not defined
Description:
.fi
.RS
When particular area should be ignored for motion, it can be accomplished using a PGM mask file.
The PGM mask file is a specially constructed mask file that allows the user to indicate the areas
for which motion should be monitored.
This option specifies the full path and name for the mask file.
.RE
.RE
.TP
.B mask_privacy
.RS
.nf
Values: User specified string
Default: Not defined
Description:
.fi
.RS
The PGM mask file is a specially constructed mask file that allows the user to indicate the areas
to remove from all images.
This option specifies the full path and name for the privacy mask file.
.RE
.RE
.TP
.B smart_mask_speed
.RS
.nf
Values: 0 to 10
Default: 0 (off)
Description:
.fi
.RS
Speed of mask changes when creating a dynamic mask file.
.RE
.RE
.TP
.B lightswitch
.RS
.nf
Values: 0 to 100
Default: 0
Description:
.fi
.RS
Ignore sudden massive light intensity changes.
Value is a percentage of the picture area that changed intensity.
.RE
.RE
.TP
.B minimum_motion_frames
.RS
.nf
Values: 1 to unlimited
Default: 1
Description:
.fi
.RS
The minimum number of picture frames in a row that must contain motion before a event is triggered.
The default of 1 means that all motion is detected.
The recommended range is 1 to 5.
.RE
.RE
.TP
.B pre_capture
.RS
.nf
Values: 0 to unlimited
Default: 0
Description:
.fi
.RS
The number of pre-captured (buffered) pictures from before motion was detected that will be output upon motion detection.
The recommended range is 0 to 5.
It is not recommended to use large values since it will cause Motion to skip frames.
To smooth movies use larger values of post_capture instead.
.RE
.RE
.TP
.B post_capture
.RS
.nf
Values: 0 to unlimited
Default: 0
Description:
.fi
.RS
Number of frames to capture after motion is no longer detected.
.RE
.RE
.TP
.B event_gap
.RS
.nf
Values: -1 to unlimited
Default: 60
Description:
.fi
.RS
The number of seconds of no motion that triggers the end of an event.
An event is defined as a series of motion images taken within a short timeframe.
The recommended value is 60 seconds. The value -1 is allowed and disables
events causing all Motion to be written to one single movie file and no pre_capture.
If set to 0, motion is running in gapless mode.
Movies don't have gaps anymore.
An event ends right after no more motion is detected and post_capture is over.
.RE
.RE
.TP
.B max_movie_time
.RS
.nf
Values: 0 to unlimited
Default: 0
Description:
.fi
.RS
Maximum length in seconds of a movie.
When value is exceeded a new movie file is created.
The value of 0 means that there is no limit.
.RE
.RE
.TP
.B emulate_motion
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
Always save images even if there was no motion.
.RE
.RE
.TP
.B output_pictures
.RS
.nf
Values: on, off, first, best, center
Default: on
Description:
.fi
.RS
Output pictures when motion is detected.
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'.
Picture with motion nearest center of picture is saved when set to 'center'.
Can be used as preview shot for the corresponding movie.
.RE
.RE
.TP
.B output_debug_pictures
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
Output pictures with only the pixels moving object (ghost images)
.RE
.RE
.TP
.B quality
.RS
.nf
Values: 1 to 100
Default: 75
Description:
.fi
.RS
The quality (in percent) to be used by the jpeg and webp compression
.RE
.RE
.TP
.B picture_type
.RS
.nf
Values: jpeg/ppm/webp
Default: jpeg
Description:
.fi
.RS
The file type of output images
.RE
.RE
.TP
.B ffmpeg_output_movies
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
Use ffmpeg to encode movies of the motion.
.RE
.RE
.TP
.B ffmpeg_output_debug_movies
.RS
.nf
Values: on/off
Default: off
Description:
.fi
.RS
Use ffmpeg to encode movies with only the pixels moving object (ghost images)
.RE
.RE
.TP
.B ffmpeg_bps
.RS
.nf
Values: 0 to unlimited
Default: 400000