Advertisement
jasonarends

updated motion.conf

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