Advertisement
Guest User

Untitled

a guest
Oct 29th, 2017
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.18 KB | None | 0 0
  1. My /etc/motion/motion.conf:
  2.  
  3. # Rename this distribution example file to motion.conf
  4. #
  5. # This config file was generated by motion 4.0
  6.  
  7.  
  8. ############################################################
  9. # Daemon
  10. ############################################################
  11.  
  12. # Start in daemon (background) mode and release terminal (default: off)
  13. daemon off
  14.  
  15. # File to store the process ID, also called pid file. (default: not defined)
  16. process_id_file /var/run/motion/motion.pid
  17.  
  18. ############################################################
  19. # Basic Setup Mode
  20. ############################################################
  21.  
  22. # Start in Setup-Mode, daemon disabled. (default: off)
  23. setup_mode off
  24.  
  25.  
  26. # Use a file to save logs messages, if not defined stderr and syslog is used. (default: not defined)
  27. logfile /var/log/motion/motion.log
  28.  
  29. # Level of log messages [1..9] (EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL). (default: 6 / NTC)
  30. log_level 6
  31.  
  32. # Filter to log messages by type (COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL). (default: ALL)
  33. log_type all
  34.  
  35. ###########################################################
  36. # Capture device options
  37. ############################################################
  38.  
  39. # Videodevice to be used for capturing (default /dev/video0)
  40. # for FreeBSD default is /dev/bktr0
  41. videodevice /dev/video0
  42.  
  43. # v4l2_palette allows one to choose preferable palette to be use by motion
  44. # to capture from those supported by your videodevice. (default: 17)
  45. # E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
  46. # V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
  47. # Setting v4l2_palette to 2 forces motion to use V4L2_PIX_FMT_SBGGR8
  48. # instead.
  49. #
  50. # Values :
  51. # V4L2_PIX_FMT_SN9C10X : 0 'S910'
  52. # V4L2_PIX_FMT_SBGGR16 : 1 'BYR2'
  53. # V4L2_PIX_FMT_SBGGR8 : 2 'BA81'
  54. # V4L2_PIX_FMT_SPCA561 : 3 'S561'
  55. # V4L2_PIX_FMT_SGBRG8 : 4 'GBRG'
  56. # V4L2_PIX_FMT_SGRBG8 : 5 'GRBG'
  57. # V4L2_PIX_FMT_PAC207 : 6 'P207'
  58. # V4L2_PIX_FMT_PJPG : 7 'PJPG'
  59. # V4L2_PIX_FMT_MJPEG : 8 'MJPEG'
  60. # V4L2_PIX_FMT_JPEG : 9 'JPEG'
  61. # V4L2_PIX_FMT_RGB24 : 10 'RGB3'
  62. # V4L2_PIX_FMT_SPCA501 : 11 'S501'
  63. # V4L2_PIX_FMT_SPCA505 : 12 'S505'
  64. # V4L2_PIX_FMT_SPCA508 : 13 'S508'
  65. # V4L2_PIX_FMT_UYVY : 14 'UYVY'
  66. # V4L2_PIX_FMT_YUYV : 15 'YUYV'
  67. # V4L2_PIX_FMT_YUV422P : 16 '422P'
  68. # V4L2_PIX_FMT_YUV420 : 17 'YU12'
  69. #
  70. v4l2_palette 17
  71.  
  72. # Tuner device to be used for capturing using tuner as source (default /dev/tuner0)
  73. # This is ONLY used for FreeBSD. Leave it commented out for Linux
  74. ; tunerdevice /dev/tuner0
  75.  
  76. # The video input to be used (default: -1)
  77. # Should normally be set to 0 or 1 for video/TV cards, and -1 for USB cameras
  78. # Set to 0 for uvideo(4) on OpenBSD
  79. input -1
  80.  
  81. # The video norm to use (only for video capture and TV tuner cards)
  82. # Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
  83. norm 0
  84.  
  85. # The frequency to set the tuner to (kHz) (only for TV tuner cards) (default: 0)
  86. frequency 0
  87.  
  88. # Override the power line frequency for the webcam. (normally not necessary)
  89. # Values:
  90. # -1 : Do not modify device setting
  91. # 0 : Power line frequency Disabled
  92. # 1 : 50hz
  93. # 2 : 60hz
  94. # 3 : Auto
  95. power_line_frequency 3
  96.  
  97. # Rotate image this number of degrees. The rotation affects all saved images as
  98. # well as movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
  99. rotate 0
  100.  
  101. # Image width (pixels). Valid range: Camera dependent, default: 352
  102. width 1280
  103.  
  104. # Image height (pixels). Valid range: Camera dependent, default: 288
  105. height 960
  106.  
  107. # Maximum number of frames to be captured per second.
  108. # Valid range: 2-100. Default: 100 (almost no limit).
  109. framerate 100
  110.  
  111. # Minimum time in seconds between capturing picture frames from the camera.
  112. # Default: 0 = disabled - the capture rate is given by the camera framerate.
  113. # This option is used when you want to capture images at a rate lower than 2 per second.
  114. minimum_frame_time 0
  115.  
  116. # URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// mjpg:// rtsp:// mjpeg:// or file:///)
  117. # Must be a URL that returns single jpeg pictures or a raw mjpeg stream. A trailing slash may be required for some cameras.
  118. # Default: Not defined
  119. ; netcam_url value
  120.  
  121. # Username and password for network camera (only if required). Default: not defined
  122. # Syntax is user:password
  123. ; netcam_userpass value
  124.  
  125. # The setting for keep-alive of network socket, should improve performance on compatible net cameras.
  126. # off: The historical implementation using HTTP/1.0, closing the socket after each http request.
  127. # force: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
  128. # on: Use HTTP/1.1 requests that support keep alive as default.
  129. # Default: off
  130. netcam_keepalive off
  131.  
  132. # URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
  133. # If a port number other than 80 is needed, use "http://myproxy:1234".
  134. # Default: not defined
  135. ; netcam_proxy value
  136.  
  137. # Set less strict jpeg checks for network cameras with a poor/buggy firmware.
  138. # Default: off
  139. netcam_tolerant_check off
  140.  
  141. # RTSP connection uses TCP to communicate to the camera. Can prevent image corruption.
  142. # Default: on
  143. rtsp_uses_tcp on
  144.  
  145. # Name of camera to use if you are using a camera accessed through OpenMax/MMAL
  146. # Default: Not defined
  147. ; mmalcam_name vc.ril.camera
  148.  
  149. # Camera control parameters (see raspivid/raspistill tool documentation)
  150. # Default: Not defined
  151. ; mmalcam_control_params -hf
  152.  
  153. # Let motion regulate the brightness of a video device (default: off).
  154. # The auto_brightness feature uses the brightness option as its target value.
  155. # If brightness is zero auto_brightness will adjust to average brightness value 128.
  156. # Only recommended for cameras without auto brightness
  157. auto_brightness off
  158.  
  159. # Set the initial brightness of a video device.
  160. # If auto_brightness is enabled, this value defines the average brightness level
  161. # which Motion will try and adjust to.
  162. # Valid range 0-255, default 0 = disabled
  163. brightness 0
  164.  
  165. # Set the contrast of a video device.
  166. # Valid range 0-255, default 0 = disabled
  167. contrast 0
  168.  
  169. # Set the saturation of a video device.
  170. # Valid range 0-255, default 0 = disabled
  171. saturation 0
  172.  
  173. # Set the hue of a video device (NTSC feature).
  174. # Valid range 0-255, default 0 = disabled
  175. hue 0
  176.  
  177.  
  178. ############################################################
  179. # Round Robin (multiple inputs on same video device name)
  180. ############################################################
  181.  
  182. # Number of frames to capture in each roundrobin step (default: 1)
  183. roundrobin_frames 1
  184.  
  185. # Number of frames to skip before each roundrobin step (default: 1)
  186. roundrobin_skip 1
  187.  
  188. # Try to filter out noise generated by roundrobin (default: off)
  189. switchfilter off
  190.  
  191.  
  192. ############################################################
  193. # Motion Detection Settings:
  194. ############################################################
  195.  
  196. # Threshold for number of changed pixels in an image that
  197. # triggers motion detection (default: 1500)
  198. threshold 9999
  199.  
  200. # Automatically tune the threshold down if possible (default: off)
  201. threshold_tune off
  202.  
  203. # Noise threshold for the motion detection (default: 32)
  204. noise_level 32
  205.  
  206. # Automatically tune the noise threshold (default: on)
  207. noise_tune on
  208.  
  209. # Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
  210. # Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
  211. # (l)abeling must only be used once and the 'l' must be the last letter.
  212. # Comment out to disable
  213. despeckle_filter EedDl
  214.  
  215. # Detect motion in predefined areas (1 - 9). Areas are numbered like that: 1 2 3
  216. # A script (on_area_detected) is started immediately when motion is 4 5 6
  217. # detected in one of the given areas, but only once during an event. 7 8 9
  218. # One or more areas can be specified with this option. Take care: This option
  219. # does NOT restrict detection to these areas! (Default: not defined)
  220. ; area_detect value
  221.  
  222. # PGM file to use as a sensitivity mask.
  223. # Full path name to. (Default: not defined)
  224. ; mask_file value
  225.  
  226. # Dynamically create a mask file during operation (default: 0)
  227. # Adjust speed of mask changes from 0 (off) to 10 (fast)
  228. smart_mask_speed 0
  229.  
  230. # Ignore sudden massive light intensity changes given as a percentage of the picture
  231. # area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
  232. lightswitch 0
  233.  
  234. # Picture frames must contain motion at least the specified number of frames
  235. # in a row before they are detected as true motion. At the default of 1, all
  236. # motion is detected. Valid range: 1 to thousands, recommended 1-5
  237. minimum_motion_frames 1
  238.  
  239. # Specifies the number of pre-captured (buffered) pictures from before motion
  240. # was detected that will be output at motion detection.
  241. # Recommended range: 0 to 5 (default: 0)
  242. # Do not use large values! Large values will cause Motion to skip video frames and
  243. # cause unsmooth movies. To smooth movies use larger values of post_capture instead.
  244. pre_capture 0
  245.  
  246. # Number of frames to capture after motion is no longer detected (default: 0)
  247. post_capture 0
  248.  
  249. # Event Gap is the seconds of no motion detection that triggers the end of an event.
  250. # An event is defined as a series of motion images taken within a short timeframe.
  251. # Recommended value is 60 seconds (Default). The value -1 is allowed and disables
  252. # events causing all Motion to be written to one single movie file and no pre_capture.
  253. # If set to 0, motion is running in gapless mode. Movies don't have gaps anymore. An
  254. # event ends right after no more motion is detected and post_capture is over.
  255. event_gap 60
  256.  
  257. # Maximum length in seconds of a movie
  258. # When value is exceeded a new movie file is created. (Default: 0 = infinite)
  259. max_movie_time 0
  260.  
  261. # Always save images even if there was no motion (default: off)
  262. emulate_motion off
  263.  
  264.  
  265. ############################################################
  266. # Image File Output
  267. ############################################################
  268.  
  269. # Output 'normal' pictures when motion is detected (default: on)
  270. # Valid values: on, off, first, best, center
  271. # When set to 'first', only the first picture of an event is saved.
  272. # Picture with most motion of an event is saved when set to 'best'.
  273. # Picture with motion nearest center of picture is saved when set to 'center'.
  274. # Can be used as preview shot for the corresponding movie.
  275. output_pictures off
  276.  
  277. # Output pictures with only the pixels moving object (ghost images) (default: off)
  278. output_debug_pictures off
  279.  
  280. # The quality (in percent) to be used by the jpeg compression (default: 75)
  281. quality 75
  282.  
  283. # Type of output images
  284. # Valid values: jpeg, ppm (default: jpeg)
  285. picture_type jpeg
  286.  
  287. ############################################################
  288. # FFMPEG related options
  289. # Film (movies) file output, and deinterlacing of the video input
  290. # The options movie_filename and timelapse_filename are also used
  291. # by the ffmpeg feature
  292. ############################################################
  293.  
  294. # Use ffmpeg to encode movies in realtime (default: off)
  295. ffmpeg_output_movies on
  296.  
  297. # Use ffmpeg to make movies with only the pixels moving
  298. # object (ghost images) (default: off)
  299. ffmpeg_output_debug_movies off
  300.  
  301. # Use ffmpeg to encode a timelapse movie
  302. # Default value 0 = off - else save frame every Nth second
  303. ffmpeg_timelapse 1800000
  304.  
  305. # The file rollover mode of the timelapse video
  306. # Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
  307. ffmpeg_timelapse_mode daily
  308.  
  309. # Bitrate to be used by the ffmpeg encoder (default: 400000)
  310. # This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
  311. ffmpeg_bps 400000
  312.  
  313. # Enables and defines variable bitrate for the ffmpeg encoder.
  314. # ffmpeg_bps is ignored if variable bitrate is enabled.
  315. # Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
  316. # or the range 1 - 100 where 1 means worst quality and 100 is best.
  317. ffmpeg_variable_bitrate 0
  318.  
  319. # Codec to used by ffmpeg for the video compression.
  320. # Timelapse videos have two options.
  321. # mpg - Creates mpg file with mpeg-2 encoding.
  322. # If motion is shutdown and restarted, new pics will be appended
  323. # to any previously created file with name indicated for timelapse.
  324. # mpeg4 - Creates avi file with the default encoding.
  325. # If motion is shutdown and restarted, new pics will create a
  326. # new file with the name indicated for timelapse.
  327. # Supported formats are:
  328. # mpeg4 or msmpeg4 - gives you files with extension .avi
  329. # msmpeg4 is recommended for use with Windows Media Player because
  330. # it requires no installation of codec on the Windows client.
  331. # swf - gives you a flash film with extension .swf
  332. # flv - gives you a flash video with extension .flv
  333. # ffv1 - FF video codec 1 for Lossless Encoding
  334. # mov - QuickTime
  335. # mp4 - MPEG-4 Part 14 H264 encoding
  336. # mkv - Matroska H264 encoding
  337. # hevc - H.265 / HEVC (High Efficiency Video Coding)
  338. ffmpeg_video_codec hevc
  339.  
  340. # When creating videos, should frames be duplicated in order
  341. # to keep up with the requested frames per second
  342. # (default: true)
  343. ffmpeg_duplicate_frames false
  344.  
  345. ############################################################
  346. # SDL Window
  347. ############################################################
  348.  
  349. # Number of motion thread to show in SDL Window (default: 0 = disabled)
  350. #sdl_threadnr 0
  351.  
  352. ############################################################
  353. # External pipe to video encoder
  354. # Replacement for FFMPEG builtin encoder for ffmpeg_output_movies only.
  355. # The options movie_filename and timelapse_filename are also used
  356. # by the ffmpeg feature
  357. #############################################################
  358.  
  359. # Bool to enable or disable extpipe (default: off)
  360. use_extpipe off
  361.  
  362. # External program (full path and opts) to pipe raw video to
  363. # Generally, use '-' for STDIN...
  364. ;extpipe mencoder -demuxer rawvideo -rawvideo w=%w:h=%h:i420 -ovc x264 -x264encopts bframes=4:frameref=1:subq=1:scenecut=-1:nob_adapt:threads=1:keyint=1000:8x8dct:vbv_bufsize=4000:crf=24:partitions=i8x8,i4x4:vbv_maxrate=800:no-chroma-me -vf denoise3d=16:12:48:4,pp=lb -of avi -o %f.avi - -fps %fps
  365. ;extpipe x264 - --input-res %wx%h --fps %fps --bitrate 2000 --preset ultrafast --quiet -o %f.mp4
  366. ;extpipe mencoder -demuxer rawvideo -rawvideo w=%w:h=%h:fps=%fps -ovc x264 -x264encopts preset=ultrafast -of lavf -o %f.mp4 - -fps %fps
  367. ;extpipe ffmpeg -y -f rawvideo -pix_fmt yuv420p -video_size %wx%h -framerate %fps -i pipe:0 -vcodec libx264 -preset ultrafast -f mp4 %f.mp4
  368.  
  369.  
  370. ############################################################
  371. # Snapshots (Traditional Periodic Webcam File Output)
  372. ############################################################
  373.  
  374. # Make automated snapshot every N seconds (default: 0 = disabled)
  375. snapshot_interval 1800000
  376.  
  377.  
  378. ############################################################
  379. # Text Display
  380. # %Y = year, %m = month, %d = date,
  381. # %H = hour, %M = minute, %S = second, %T = HH:MM:SS,
  382. # %v = event, %q = frame number, %t = camera id number,
  383. # %D = changed pixels, %N = noise level, \n = new line,
  384. # %i and %J = width and height of motion area,
  385. # %K and %L = X and Y coordinates of motion center
  386. # %C = value defined by text_event - do not use with text_event!
  387. # You can put quotation marks around the text to allow
  388. # leading spaces
  389. ############################################################
  390. # Locate and draw a box around the moving object.
  391. # Valid values: on, off, preview (default: off)
  392. # Set to 'preview' will only draw a box in preview_shot pictures.
  393. locate_motion_mode off
  394.  
  395. # Set the look and style of the locate box if enabled.
  396. # Valid values: box, redbox, cross, redcross (default: box)
  397. # Set to 'box' will draw the traditional box.
  398. # Set to 'redbox' will draw a red box.
  399. # Set to 'cross' will draw a little cross to mark center.
  400. # Set to 'redcross' will draw a little red cross to mark center.
  401. locate_motion_style box
  402.  
  403. # Draws the timestamp using same options as C function strftime(3)
  404. # Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
  405. # Text is placed in lower right corner
  406. text_right %Y-%m-%d\n%T-%q
  407.  
  408. # Draw a user defined text on the images using same options as C function strftime(3)
  409. # Default: Not defined = no text
  410. # Text is placed in lower left corner
  411. text_left %t Skycam facing South East %T *d frame%q noise%N
  412.  
  413. # Draw the number of changed pixed on the images (default: off)
  414. # Will normally be set to off except when you setup and adjust the motion settings
  415. # Text is placed in upper right corner
  416. text_changes off
  417.  
  418. # This option defines the value of the special event conversion specifier %C
  419. # You can use any conversion specifier in this option except %C. Date and time
  420. # values are from the timestamp of the first image in the current event.
  421. # Default: %Y%m%d%H%M%S
  422. # The idea is that %C can be used filenames and text_left/right for creating
  423. # a unique identifier for each event.
  424. text_event %Y%m%d%H%M%S
  425.  
  426. # Draw characters at twice normal size on images. (default: off)
  427. text_double on
  428.  
  429.  
  430. # Text to include in a JPEG EXIF comment
  431. # May be any text, including conversion specifiers.
  432. # The EXIF timestamp is included independent of this text.
  433. ;exif_text %i%J/%K%L
  434.  
  435. ############################################################
  436. # Target Directories and filenames For Images And Films
  437. # For the options snapshot_, picture_, movie_ and timelapse_filename
  438. # you can use conversion specifiers
  439. # %Y = year, %m = month, %d = date,
  440. # %H = hour, %M = minute, %S = second,
  441. # %v = event, %q = frame number, %t = camera id number,
  442. # %D = changed pixels, %N = noise level,
  443. # %i and %J = width and height of motion area,
  444. # %K and %L = X and Y coordinates of motion center
  445. # %C = value defined by text_event
  446. # Quotation marks round string are allowed.
  447. ############################################################
  448.  
  449. # Target base directory for pictures and films
  450. # Recommended to use absolute path. (Default: current working directory)
  451. target_dir /home/pi/skycam-snapshots
  452.  
  453. # File path for snapshots (jpeg or ppm) relative to target_dir
  454. # Default: %v-%Y%m%d%H%M%S-snapshot
  455. # Default value is equivalent to legacy oldlayout option
  456. # For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
  457. # File extension .jpg or .ppm is automatically added so do not include this.
  458. # Note: A symbolic link called lastsnap.jpg created in the target_dir will always
  459. # point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'
  460. snapshot_filename %v-%Y%m%d%H%M%S-snapshot
  461.  
  462. # File path for motion triggered images (jpeg or ppm) relative to target_dir
  463. # Default: %v-%Y%m%d%H%M%S-%q
  464. # Default value is equivalent to legacy oldlayout option
  465. # For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
  466. # File extension .jpg or .ppm is automatically added so do not include this
  467. # Set to 'preview' together with best-preview feature enables special naming
  468. # convention for preview shots. See motion guide for details
  469. picture_filename %v-%Y%m%d%H%M%S-%q
  470.  
  471. # File path for motion triggered ffmpeg films (movies) relative to target_dir
  472. # Default: %v-%Y%m%d%H%M%S
  473. # File extensions(.mpg .avi) are automatically added so do not include them
  474. movie_filename %v-%Y%m%d%H%M%S
  475.  
  476. # File path for timelapse movies relative to target_dir
  477. # Default: %Y%m%d-timelapse
  478. # File extensions(.mpg .avi) are automatically added so do not include them
  479. timelapse_filename %Y%m%d-timelapse
  480.  
  481. ############################################################
  482. # Global Network Options
  483. ############################################################
  484. # Enable IPv6 (default: off)
  485. ipv6_enabled off
  486.  
  487. ############################################################
  488. # Live Stream Server
  489. ############################################################
  490.  
  491. # The mini-http server listens to this port for requests (default: 0 = disabled)
  492. stream_port 8081
  493.  
  494. # Quality of the jpeg (in percent) images produced (default: 50)
  495. stream_quality 75
  496.  
  497. # Output frames at 1 fps when no motion is detected and increase to the
  498. # rate given by stream_maxrate when motion is detected (default: off)
  499. stream_motion off
  500.  
  501. # Maximum framerate for stream streams (default: 1)
  502. stream_maxrate 100
  503.  
  504. # Restrict stream connections to localhost only (default: on)
  505. stream_localhost off
  506.  
  507. # Limits the number of images per connection (default: 0 = unlimited)
  508. # Number can be defined by multiplying actual stream rate by desired number of seconds
  509. # Actual stream rate is the smallest of the numbers framerate and stream_maxrate
  510. stream_limit 0
  511.  
  512. # Set the authentication method (default: 0)
  513. # 0 = disabled
  514. # 1 = Basic authentication
  515. # 2 = MD5 digest (the safer authentication)
  516. stream_auth_method 0
  517.  
  518. # Authentication for the stream. Syntax username:password
  519. # Default: not defined (Disabled)
  520. stream_authentication admin:admin
  521.  
  522. # Percentage to scale the stream image for preview
  523. # Default: 25
  524. ; stream_preview_scale 25
  525.  
  526. # Have stream preview image start on a new line
  527. # Default: no
  528. ; stream_preview_newline no
  529.  
  530. ############################################################
  531. # HTTP Based Control
  532. ############################################################
  533.  
  534. # TCP/IP port for the http server to listen on (default: 0 = disabled)
  535. webcontrol_port 8181
  536.  
  537. # Restrict control connections to localhost only (default: on)
  538. webcontrol_localhost on
  539.  
  540. # Output for http server, select off to choose raw text plain (default: on)
  541. webcontrol_html_output on
  542.  
  543. # Authentication for the http based control. Syntax username:password
  544. # Default: not defined (Disabled)
  545. webcontrol_authentication admin:admin
  546.  
  547.  
  548. ############################################################
  549. # Tracking (Pan/Tilt)
  550. #############################################################
  551.  
  552. # Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic, 5=uvcvideo, 6=servo)
  553. # The generic type enables the definition of motion center and motion size to
  554. # be used with the conversion specifiers for options like on_motion_detected
  555. track_type 0
  556.  
  557. # Enable auto tracking (default: off)
  558. track_auto off
  559.  
  560. # Serial port of motor (default: none)
  561. ;track_port /dev/ttyS0
  562.  
  563. # Motor number for x-axis (default: 0)
  564. ;track_motorx 0
  565.  
  566. # Set motorx reverse (default: 0)
  567. ;track_motorx_reverse 0
  568.  
  569. # Motor number for y-axis (default: 0)
  570. ;track_motory 1
  571.  
  572. # Set motory reverse (default: 0)
  573. ;track_motory_reverse 0
  574.  
  575. # Maximum value on x-axis (default: 0)
  576. ;track_maxx 200
  577.  
  578. # Minimum value on x-axis (default: 0)
  579. ;track_minx 50
  580.  
  581. # Maximum value on y-axis (default: 0)
  582. ;track_maxy 200
  583.  
  584. # Minimum value on y-axis (default: 0)
  585. ;track_miny 50
  586.  
  587. # Center value on x-axis (default: 0)
  588. ;track_homex 128
  589.  
  590. # Center value on y-axis (default: 0)
  591. ;track_homey 128
  592.  
  593. # ID of an iomojo camera if used (default: 0)
  594. track_iomojo_id 0
  595.  
  596. # Angle in degrees the camera moves per step on the X-axis
  597. # with auto-track (default: 10)
  598. # Currently only used with pwc type cameras
  599. track_step_angle_x 10
  600.  
  601. # Angle in degrees the camera moves per step on the Y-axis
  602. # with auto-track (default: 10)
  603. # Currently only used with pwc type cameras
  604. track_step_angle_y 10
  605.  
  606. # Delay to wait for after tracking movement as number
  607. # of picture frames (default: 10)
  608. track_move_wait 10
  609.  
  610. # Speed to set the motor to (stepper motor option) (default: 255)
  611. track_speed 255
  612.  
  613. # Number of steps to make (stepper motor option) (default: 40)
  614. track_stepsize 40
  615.  
  616.  
  617. ############################################################
  618. # External Commands, Warnings and Logging:
  619. # You can use conversion specifiers for the on_xxxx commands
  620. # %Y = year, %m = month, %d = date,
  621. # %H = hour, %M = minute, %S = second,
  622. # %v = event, %q = frame number, %t = camera id number,
  623. # %D = changed pixels, %N = noise level,
  624. # %i and %J = width and height of motion area,
  625. # %K and %L = X and Y coordinates of motion center
  626. # %C = value defined by text_event
  627. # %f = filename with full path
  628. # %n = number indicating filetype
  629. # Both %f and %n are only defined for on_picture_save,
  630. # on_movie_start and on_movie_end
  631. # Quotation marks round string are allowed.
  632. ############################################################
  633.  
  634. # Do not sound beeps when detecting motion (default: on)
  635. # Note: Motion never beeps when running in daemon mode.
  636. quiet on
  637.  
  638. # Command to be executed when an event starts. (default: none)
  639. # An event starts at first motion detected after a period of no motion defined by event_gap
  640. ; on_event_start value
  641.  
  642. # Command to be executed when an event ends after a period of no motion
  643. # (default: none). The period of no motion is defined by option event_gap.
  644. ; on_event_end value
  645.  
  646. # Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
  647. # To give the filename as an argument to a command append it with %f
  648. ; on_picture_save value
  649.  
  650. # Command to be executed when a motion frame is detected (default: none)
  651. ; on_motion_detected value
  652.  
  653. # Command to be executed when motion in a predefined area is detected
  654. # Check option 'area_detect'. (default: none)
  655. ; on_area_detected value
  656.  
  657. # Command to be executed when a movie file (.mpg|.avi) is created. (default: none)
  658. # To give the filename as an argument to a command append it with %f
  659. ; on_movie_start value
  660.  
  661. # Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
  662. # To give the filename as an argument to a command append it with %f
  663. ; on_movie_end value
  664.  
  665. # Command to be executed when a camera can't be opened or if it is lost
  666. # NOTE: There is situations when motion don't detect a lost camera!
  667. # It depends on the driver, some drivers dosn't detect a lost camera at all
  668. # Some hangs the motion thread. Some even hangs the PC! (default: none)
  669. ; on_camera_lost value
  670.  
  671. #####################################################################
  672. # Common Options for database features.
  673. # Options require database options to be active also.
  674. #####################################################################
  675.  
  676. # Log to the database when creating motion triggered picture file (default: on)
  677. ; sql_log_picture on
  678.  
  679. # Log to the database when creating a snapshot image file (default: on)
  680. ; sql_log_snapshot on
  681.  
  682. # Log to the database when creating motion triggered movie file (default: off)
  683. ; sql_log_movie off
  684.  
  685. # Log to the database when creating timelapse movies file (default: off)
  686. ; sql_log_timelapse off
  687.  
  688. # SQL query string that is sent to the database
  689. # Use same conversion specifiers has for text features
  690. # Additional special conversion specifiers are
  691. # %n = the number representing the file_type
  692. # %f = filename with full path
  693. # Default value:
  694. # Create tables :
  695. ##
  696. # Mysql
  697. # CREATE TABLE security (camera int, filename char(80) not null, frame int, file_type int, time_stamp timestamp(14), event_time_stamp timestamp(14));
  698. #
  699. # Postgresql
  700. # CREATE TABLE security (camera int, filename char(80) not null, frame int, file_type int, time_stamp timestamp without time zone, event_time_stamp timestamp without time zone);
  701. #
  702. # insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
  703. ; sql_query insert into security(camera, filename, frame, file_type, time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
  704.  
  705.  
  706. ############################################################
  707. # Database Options
  708. ############################################################
  709.  
  710. # database type : mysql, postgresql, sqlite3 (default : not defined)
  711. ; database_type value
  712.  
  713. # database to log to (default: not defined)
  714. # for sqlite3, the full path and name for the database.
  715. ; database_dbname value
  716.  
  717. # The host on which the database is located (default: localhost)
  718. ; database_host value
  719.  
  720. # User account name for database (default: not defined)
  721. ; database_user value
  722.  
  723. # User password for database (default: not defined)
  724. ; database_password value
  725.  
  726. # Port on which the database is located
  727. # mysql 3306 , postgresql 5432 (default: not defined)
  728. ; database_port value
  729.  
  730. # Database wait time in milliseconds for locked database to
  731. # be unlocked before returning database locked error (default 0)
  732. ; database_busy_timeout 0
  733.  
  734.  
  735.  
  736. ############################################################
  737. # Video Loopback Device (vloopback project)
  738. ############################################################
  739.  
  740. # Output images to a video4linux loopback device
  741. # The value '-' means next available (default: not defined)
  742. ; video_pipe value
  743.  
  744. # Output motion images to a video4linux loopback device
  745. # The value '-' means next available (default: not defined)
  746. ; motion_video_pipe value
  747.  
  748.  
  749. ##############################################################
  750. # camera config files - One for each camera.
  751. # Except if only one camera - You only need this config file.
  752. # If you have more than one camera you MUST define one camera
  753. # config file for each camera in addition to this config file.
  754. ##############################################################
  755.  
  756. # Remember: If you have more than one camera you must have one
  757. # camera file for each camera. E.g. 2 cameras requires 3 files:
  758. # This motion.conf file AND camera1.conf and camera2.conf.
  759. # Only put the options that are unique to each camera in the
  760. # camera config files.
  761. camera /etc/motion/camera1.conf
  762. ; camera /etc/motion/camera2.conf
  763. ; camera /etc/motion/camera3.conf
  764. ; camera /etc/motion/camera4.conf
  765.  
  766.  
  767. ##############################################################
  768. # Camera config directory - One for each camera.
  769. ##############################################################
  770. #
  771. camera_dir /etc/motion/conf.d
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement