📄 motion.1
字号:
.TH MOTION 1 2006-10-16 "Motion" "Motion Options and Config Files"
.SH NAME
motion \- Detect motion using a video4linux device
.SH SYNOPSIS
.B motion
[ -hns ] [ -c config file path]
.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 \-c
Full path and filename of config file. E.g. /home/kurt/motion.conf. Default is /usr/local/etc unless specified differently when building Motion. Many RPMs and debian packages will most likely use /etc or /etc/motion as default.
.TP
.B \-h
Show help screen.
.TP
.B \-n
Run in non-daemon mode.
.TP
.B \-s
Run in setup mode. Also forces non-daemon mode
.TP
.B \-d
Run in debug mode.
.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
.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 auto_brightness boolean
Values: on, off / Default: off
.br
Let motion regulate the brightness of a video device. Only recommended for cameras without auto brightness
.TP
.B brightness integer
Values: 0 - 255 / Default: 0 (disabled)
.br
The brightness level for the video device.
.TP
.B contrast boolean
Values: 0 - 255 / Default: 0 (disabled)
.br
The contrast level for the video device.
.TP
.B control_authentication string
Values: Max 4096 characters / Default: Not defined
.br
To protect HTTP Control by username and password, use this option for HTTP 1.1 Basic authentication. The string is specified as username:password. Do not specify this option for no authentication. This option must be placed in motion.conf and not in a thread config file.
.TP
.B control_html_output boolean
Values: on, off / Default: on
.br
Enable HTML in the answer sent back to a browser connecting to the control_port. This option must be placed in motion.conf and not in a thread config file.
.TP
.B control_localhost boolean
Values: on, off / Default: on
.br
Limits the http (html) control to the localhost. This option must be placed in motion.conf and not in a thread config file.
.TP
.B control_port integer
Values: 0 - 65535 / Default: 0 (disabled)
.br
Sets the port number for the http (html using browser) based remote control. This option must be placed in motion.conf and not in a thread config file.
.TP
.B daemon boolean
Values: on, off / Default: off
.br
Start in daemon (background) mode and release terminal. This option must be placed in motion.conf and not in a thread config file.
.TP
.B despeckle string
Values: EedDl / Default: Not defined
.br
Despeckle motion image using combinations of (E/e)rode or (D/d)ilate. And ending with optional (l)abeling.
.TP
.B ffmpeg_bps integer
Values: 0 - 9999999 / Default: 400000
.br
Bitrate of mpegs produced by ffmpeg. Bitrate is bits per second. Default: 400000 (400kbps). Higher value mans better quality and larger files. Option requires that ffmpeg libraries are installed.
.TP
.B ffmpeg_cap_motion boolean
Values: on, off / Default: off
.br
Use ffmpeg libraries to encode motion type mpeg movies where you only see the pixels that changes.
.TP
.B ffmpeg_cap_new boolean
Values: on, off / Default: off
.br
Use ffmpeg libraries to encode mpeg movies in realtime.
.TP
.B ffmpeg_deinterlace boolean
Values: on, off / Default: off
.br
Use ffmpeg to deinterlace video. Necessary if you use an analog camera and see horizontal combing on moving objects in video or pictures.
.TP
.B ffmpeg_timelapse boolean
Values: 0 - 2147483647 / Default: 0 (disabled)
.br
Create a timelapse movie saving a picture frame at the interval in seconds set by this parameter. Set it to 0 if not used.
.TP
.B ffmpeg_timelapse_mode discrete strings
Values: hourly, daily, weekly-sunday, weekly-monday, monthly, manual / Default: daily
.br
The file rollover mode of the timelapse video.
.TP
.B ffmpeg_variable_bitrate integer
Values: 0, 2 - 31 / Default: 0 (disabled)
.br
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 discrete strings
Values: mpeg1 (ffmpeg-0.4.8 only), mpeg4, msmpeg4 / Default: mpeg4
.br
Codec to be used by ffmpeg for the video compression. Timelapse mpegs are always made in mpeg1 format independent from this option.
.TP
.B framerate integer
Values: 2 - 100 / Default: 100 (no limit)
.br
Maximum number of frames to be captured from the camera per second.
.TP
.B frequency boolean
Values: 0 - 999999 / Default: 0 (Not set)
.br
The frequency to set the tuner to (kHz). Valid range: per tuner spec, default: 0 (Don't set it)
.TP
.B gap integer
Values: 0 - 2147483647 / Default: 60
.br
Gap is the seconds of no motion detection that triggers the end of an event. An event is defined as a series of motion images taken within a short timeframe.
.TP
.B height integer
Values: Device Dependent / Default: 288
.br
The height of each frame in pixels.
.TP
.B hue integer
Values: 0 - 255 / Default: 0 (disabled)
.br
The hue level for the video device.
.TP
.B input integer
Values: 0 - 7, 8 = disabled / Default: 8 (disabled)
.br
Input channel to use expressed as an integer number starting from 0. Should normally be set to 1 for video/TV cards, and 8 for USB cameras.
.TP
.B jpeg_filename string
Values: Max 4095 characters / Default: %v-%Y%m%d%H%M%S-%q
.br
File path for motion triggered images (jpeg or ppm) relative to target_dir. Value 'preview' makes a jpeg filename with the same name body as the associated saved mpeg movie file.
.TP
.B lightswitch integer
Values: 0 - 100 / Default: 0 (disabled)
.br
Ignore sudden massive light intensity changes given as a percentage of the picture area that changed intensity.
.TP
.B locate boolean
Values: on, off, preview / Default: off
.br
Locate and draw a box around the moving object. Value 'preview' makes Motion only draw a box on a saved preview jpeg image and not on the saved mpeg movie.
.TP
.B low_cpu integer
Values: 0 - 100 / Default: 0 (disabled)
.br
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.
.TP
.B mask_file string
Values: Max 4095 characters / Default: Not defined
.br
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.
.TP
.B max_mpeg_time integer
Values: 0 (infinite) - 2147483647 / Default: 3600
.br
The maximum length of an mpeg movie in seconds. Set this to zero for unlimited length.
.TP
.B minimum_frame_time integer
Values: 0 - 2147483647 / Default: 0
.br
Minimum time in seconds between the capturing picture frames from the camera. Default: 0 = disabled - the capture rate is given by the camera framerate.
.TP
.B minimum_motion_frames boolean
Values: 1 - 1000s / Default: 1
.br
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 is 1 to thousands, but it is recommended to keep it within 1-10.
.TP
.B motion_video_pipe string
Values: Max 4095 characters / Default: Not defined
.br
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 movie_filename string
Values: Max 4095 characters / Default: %v-%Y%m%d%H%M%S
.br
File path for motion triggered ffmpeg movies (mpeg) relative to target_dir. This was previously called ffmpeg_filename.
.TP
.B mysql_db string
Values: Max 4095 characters / Default: Not defined
.br
Name of the MySQL database.
.TP
.B mysql_host string
Values: Max 4095 characters / Default: Not defined
.br
IP address or domain name for the MySQL server. Use "localhost" if motion and MySQL runs on the same server.
.TP
.B mysql_password string
Values: Max 4095 characters / Default: Not defined
.br
The MySQL password.
.TP
.B mysql_user string
Values: Max 4095 characters / Default: Not defined
.br
The MySQL user name.
.TP
.B netcam_proxy string
Values: Max 4095 characters / Default: Not defined
.br
URL to use for a netcam proxy server, if required. The syntax is http://myproxy:portnumber
.TP
.B netcam_url string
Values: Max 4095 characters / Default: Not defined
.br
Specify an url to a downloadable jpeg file or raw mjpeg stream to use as input device. Such as an AXIS 2100 network camera.
.TP
.B netcam_userpass string
Values: Max 4095 characters / Default: Not defined
.br
For network cameras protected by username and password, use this option for HTTP 1.1 Basic authentication. The string is specified as username:password. Do not specify this option for no authentication.
.TP
.B night_compensate boolean
Values: on, off / Default: off
.br
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 increase light sensitivity with their AGC (Automatic Gain Control) and this will increase noise.
.TP
.B noise_level integer
Values: 1 - 255 / Default: 32
.br
The noise level is used as a threshold for distinguishing between noise and motion.
.TP
.B noise_tune boolean
Values: on, off / Default: on
.br
Activates the automatic tuning of noise level.
.TP
.B norm discrete strings
Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour) / Default: 0 (PAL)
.br
Select the norm of the video device. Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
.TP
.B on_event_end string
Values: Max 4095 characters / Default: Not defined
.br
Command to be executed when an event ends after a period of no motion. The period of no motion is defined by option gap. You can use Conversion Specifiers and spaces as part of the command.
.TP
.B on_event_start string
Values: Max 4095 characters / Default: Not defined
.br
Command to be executed when an event starts. An event starts at first motion detected after a period of no motion defined by gap. You can use ConversionSpecifiers and spaces as part of the command.
.TP
.B on_motion_detected string
Values: Max 4095 characters / Default: Not defined
.br
Command to be executed when a motion frame is detected. You can use Conversion Specifiers and spaces as part of the command.
.TP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -