motion.conf 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. # Rename this distribution example file to motion.conf
  2. #
  3. # This config file was generated by motion trunkREV528
  4. ############################################################
  5. # Daemon
  6. ############################################################
  7. # Start in daemon (background) mode and release terminal (default: off)
  8. daemon on
  9. # File to store the process ID, also called pid file. (default: not defined)
  10. process_id_file /var/run/motion.pid
  11. ############################################################
  12. # Basic Setup Mode
  13. ############################################################
  14. # Start in Setup-Mode, daemon disabled. (default: off)
  15. setup_mode off
  16. # Use a file to save logs messages, if not defined stderr and syslog is used. (default: not defined)
  17. ;logfile /tmp/motion.log
  18. # Level of log messages [1..9] (EMR, ALR, CRT, ERR, WRN, NTC, ERR, DBG, ALL). (default: 6 / NTC)
  19. log_level 6
  20. # Filter to log messages by type (STR, ENC, NET, DBL, EVT, TRK, VID, ALL). (default: ALL)
  21. log_type all
  22. ###########################################################
  23. # Capture device options
  24. ############################################################
  25. # Videodevice to be used for capturing (default /dev/video0)
  26. # for FreeBSD default is /dev/bktr0
  27. videodevice /dev/video0
  28. # v4l2_palette allows to choose preferable palette to be use by motion
  29. # to capture from those supported by your videodevice. (default: 17)
  30. # E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
  31. # V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
  32. # Setting v4l2_palette to 2 forces motion to use V4L2_PIX_FMT_SBGGR8
  33. # instead.
  34. #
  35. # Values :
  36. # V4L2_PIX_FMT_SN9C10X : 0 'S910'
  37. # V4L2_PIX_FMT_SBGGR16 : 1 'BYR2'
  38. # V4L2_PIX_FMT_SBGGR8 : 2 'BA81'
  39. # V4L2_PIX_FMT_SPCA561 : 3 'S561'
  40. # V4L2_PIX_FMT_SGBRG8 : 4 'GBRG'
  41. # V4L2_PIX_FMT_SGRBG8 : 5 'GRBG'
  42. # V4L2_PIX_FMT_PAC207 : 6 'P207'
  43. # V4L2_PIX_FMT_PJPG : 7 'PJPG'
  44. # V4L2_PIX_FMT_MJPEG : 8 'MJPEG'
  45. # V4L2_PIX_FMT_JPEG : 9 'JPEG'
  46. # V4L2_PIX_FMT_RGB24 : 10 'RGB3'
  47. # V4L2_PIX_FMT_SPCA501 : 11 'S501'
  48. # V4L2_PIX_FMT_SPCA505 : 12 'S505'
  49. # V4L2_PIX_FMT_SPCA508 : 13 'S508'
  50. # V4L2_PIX_FMT_UYVY : 14 'UYVY'
  51. # V4L2_PIX_FMT_YUYV : 15 'YUYV'
  52. # V4L2_PIX_FMT_YUV422P : 16 '422P'
  53. # V4L2_PIX_FMT_YUV420 : 17 'YU12'
  54. #
  55. v4l2_palette 17
  56. # Tuner device to be used for capturing using tuner as source (default /dev/tuner0)
  57. # This is ONLY used for FreeBSD. Leave it commented out for Linux
  58. ; tunerdevice /dev/tuner0
  59. # The video input to be used (default: -1)
  60. # Should normally be set to 0 or 1 for video/TV cards, and -1 for USB cameras
  61. input -1
  62. # The video norm to use (only for video capture and TV tuner cards)
  63. # Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour). Default: 0 (PAL)
  64. norm 0
  65. # The frequency to set the tuner to (kHz) (only for TV tuner cards) (default: 0)
  66. frequency 0
  67. # Rotate image this number of degrees. The rotation affects all saved images as
  68. # well as movies. Valid values: 0 (default = no rotation), 90, 180 and 270.
  69. rotate 0
  70. # Image width (pixels). Valid range: Camera dependent, default: 352
  71. width 320
  72. # Image height (pixels). Valid range: Camera dependent, default: 288
  73. height 240
  74. # Maximum number of frames to be captured per second.
  75. # Valid range: 2-100. Default: 100 (almost no limit).
  76. framerate 2
  77. # Minimum time in seconds between capturing picture frames from the camera.
  78. # Default: 0 = disabled - the capture rate is given by the camera framerate.
  79. # This option is used when you want to capture images at a rate lower than 2 per second.
  80. minimum_frame_time 0
  81. # URL to use if you are using a network camera, size will be autodetected (incl http:// ftp:// or file:///)
  82. # Must be a URL that returns single jpeg pictures or a raw mjpeg stream. Default: Not defined
  83. ; netcam_url value
  84. # Username and password for network camera (only if required). Default: not defined
  85. # Syntax is user:password
  86. ; netcam_userpass value
  87. # The setting for keep-alive of network socket, should improve performance on compatible net cameras.
  88. # off: The historical implementation using HTTP/1.0, closing the socket after each http request.
  89. # force: Use HTTP/1.0 requests with keep alive header to reuse the same connection.
  90. # on: Use HTTP/1.1 requests that support keep alive as default.
  91. # Default: off
  92. netcam_keepalive off
  93. # URL to use for a netcam proxy server, if required, e.g. "http://myproxy".
  94. # If a port number other than 80 is needed, use "http://myproxy:1234".
  95. # Default: not defined
  96. ; netcam_proxy value
  97. # Set less strict jpeg checks for network cameras with a poor/buggy firmware.
  98. # Default: off
  99. netcam_tolerant_check off
  100. # Let motion regulate the brightness of a video device (default: off).
  101. # The auto_brightness feature uses the brightness option as its target value.
  102. # If brightness is zero auto_brightness will adjust to average brightness value 128.
  103. # Only recommended for cameras without auto brightness
  104. auto_brightness off
  105. # Set the initial brightness of a video device.
  106. # If auto_brightness is enabled, this value defines the average brightness level
  107. # which Motion will try and adjust to.
  108. # Valid range 0-255, default 0 = disabled
  109. brightness 0
  110. # Set the contrast of a video device.
  111. # Valid range 0-255, default 0 = disabled
  112. contrast 0
  113. # Set the saturation of a video device.
  114. # Valid range 0-255, default 0 = disabled
  115. saturation 0
  116. # Set the hue of a video device (NTSC feature).
  117. # Valid range 0-255, default 0 = disabled
  118. hue 0
  119. ############################################################
  120. # Round Robin (multiple inputs on same video device name)
  121. ############################################################
  122. # Number of frames to capture in each roundrobin step (default: 1)
  123. roundrobin_frames 1
  124. # Number of frames to skip before each roundrobin step (default: 1)
  125. roundrobin_skip 1
  126. # Try to filter out noise generated by roundrobin (default: off)
  127. switchfilter off
  128. ############################################################
  129. # Motion Detection Settings:
  130. ############################################################
  131. # Threshold for number of changed pixels in an image that
  132. # triggers motion detection (default: 1500)
  133. threshold 1500
  134. # Automatically tune the threshold down if possible (default: off)
  135. threshold_tune off
  136. # Noise threshold for the motion detection (default: 32)
  137. noise_level 32
  138. # Automatically tune the noise threshold (default: on)
  139. noise_tune on
  140. # Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
  141. # Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
  142. # (l)abeling must only be used once and the 'l' must be the last letter.
  143. # Comment out to disable
  144. despeckle_filter EedDl
  145. # Detect motion in predefined areas (1 - 9). Areas are numbered like that: 1 2 3
  146. # A script (on_area_detected) is started immediately when motion is 4 5 6
  147. # detected in one of the given areas, but only once during an event. 7 8 9
  148. # One or more areas can be specified with this option. (Default: not defined)
  149. ; area_detect value
  150. # PGM file to use as a sensitivity mask.
  151. # Full path name to. (Default: not defined)
  152. ; mask_file value
  153. # Dynamically create a mask file during operation (default: 0)
  154. # Adjust speed of mask changes from 0 (off) to 10 (fast)
  155. smart_mask_speed 0
  156. # Ignore sudden massive light intensity changes given as a percentage of the picture
  157. # area that changed intensity. Valid range: 0 - 100 , default: 0 = disabled
  158. lightswitch 0
  159. # Picture frames must contain motion at least the specified number of frames
  160. # in a row before they are detected as true motion. At the default of 1, all
  161. # motion is detected. Valid range: 1 to thousands, recommended 1-5
  162. minimum_motion_frames 1
  163. # Specifies the number of pre-captured (buffered) pictures from before motion
  164. # was detected that will be output at motion detection.
  165. # Recommended range: 0 to 5 (default: 0)
  166. # Do not use large values! Large values will cause Motion to skip video frames and
  167. # cause unsmooth movies. To smooth movies use larger values of post_capture instead.
  168. pre_capture 0
  169. # Number of frames to capture after motion is no longer detected (default: 0)
  170. post_capture 0
  171. # Event Gap is the seconds of no motion detection that triggers the end of an event
  172. # An event is defined as a series of motion images taken within a short timeframe.
  173. # Recommended value is 60 seconds (Default). A value of 0 allows to generate 'gapless'
  174. # movies - an event ends right after post_capture if any. The value -1 is allowed and
  175. # disables events causing all Motion to be written to one single movie file and no
  176. # pre_capture.
  177. event_gap 60
  178. # Maximum length in seconds of a movie
  179. # When value is exceeded a new movie file is created. (Default: 0 = infinite)
  180. max_movie_time 0
  181. # Always save images even if there was no motion (default: off)
  182. emulate_motion off
  183. ############################################################
  184. # Image File Output
  185. ############################################################
  186. # Output 'normal' pictures when motion is detected (default: on)
  187. # Valid values: on, off, first, best, center
  188. # When set to 'first', only the first picture of an event is saved.
  189. # Picture with most motion of an event is saved when set to 'best'.
  190. # Picture with motion nearest center of picture is saved when set to 'center'.
  191. # Can be used as preview shot for the corresponding movie.
  192. output_pictures on
  193. # Output pictures with only the pixels moving object (ghost images) (default: off)
  194. output_debug_pictures off
  195. # The quality (in percent) to be used by the jpeg compression (default: 75)
  196. quality 75
  197. # Type of output images
  198. # Valid values: jpeg, ppm (default: jpeg)
  199. picture_type jpeg
  200. ############################################################
  201. # FFMPEG related options
  202. # Film (movies) file output, and deinterlacing of the video input
  203. # The options movie_filename and timelapse_filename are also used
  204. # by the ffmpeg feature
  205. ############################################################
  206. # Use ffmpeg to encode movies in realtime (default: off)
  207. #ffmpeg_output_movies on
  208. # Use ffmpeg to make movies with only the pixels moving
  209. # object (ghost images) (default: off)
  210. #ffmpeg_output_debug_movies off
  211. # Use ffmpeg to encode a timelapse movie
  212. # Default value 0 = off - else save frame every Nth second
  213. #ffmpeg_timelapse 0
  214. # The file rollover mode of the timelapse video
  215. # Valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual
  216. #ffmpeg_timelapse_mode daily
  217. # Bitrate to be used by the ffmpeg encoder (default: 400000)
  218. # This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
  219. #ffmpeg_bps 500000
  220. # Enables and defines variable bitrate for the ffmpeg encoder.
  221. # ffmpeg_bps is ignored if variable bitrate is enabled.
  222. # Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
  223. # or the range 2 - 31 where 2 means best quality and 31 is worst.
  224. #ffmpeg_variable_bitrate 0
  225. # Codec to used by ffmpeg for the video compression.
  226. # Timelapse mpegs are always made in mpeg1 format independent from this option.
  227. # Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
  228. # mpeg1 - gives you files with extension .mpg
  229. # mpeg4 or msmpeg4 - gives you files with extension .avi
  230. # msmpeg4 is recommended for use with Windows Media Player because
  231. # it requires no installation of codec on the Windows client.
  232. # swf - gives you a flash film with extension .swf
  233. # flv - gives you a flash video with extension .flv
  234. # ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
  235. # mov - QuickTime ( testing )
  236. #ffmpeg_video_codec mpeg4
  237. # Use ffmpeg to deinterlace video. Necessary if you use an analog camera
  238. # and see horizontal combing on moving objects in video or pictures.
  239. # (default: off)
  240. #ffmpeg_deinterlace off
  241. ############################################################
  242. # SDL Window
  243. ############################################################
  244. # Number of motion thread to show in SDL Window (default: 0 = disabled)
  245. sdl_threadnr 0
  246. ############################################################
  247. # External pipe to video encoder
  248. # Replacement for FFMPEG builtin encoder for ffmpeg_output_movies only.
  249. # The options movie_filename and timelapse_filename are also used
  250. # by the ffmpeg feature
  251. #############################################################
  252. # Bool to enable or disable extpipe (default: off)
  253. use_extpipe off
  254. # External program (full path and opts) to pipe raw video to
  255. # Generally, use '-' for STDIN...
  256. ;extpipe mencoder -demuxer rawvideo -rawvideo w=320:h=240: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
  257. ############################################################
  258. # Snapshots (Traditional Periodic Webcam File Output)
  259. ############################################################
  260. # Make automated snapshot every N seconds (default: 0 = disabled)
  261. snapshot_interval 0
  262. ############################################################
  263. # Text Display
  264. # %Y = year, %m = month, %d = date,
  265. # %H = hour, %M = minute, %S = second, %T = HH:MM:SS,
  266. # %v = event, %q = frame number, %t = thread (camera) number,
  267. # %D = changed pixels, %N = noise level, \n = new line,
  268. # %i and %J = width and height of motion area,
  269. # %K and %L = X and Y coordinates of motion center
  270. # %C = value defined by text_event - do not use with text_event!
  271. # You can put quotation marks around the text to allow
  272. # leading spaces
  273. ############################################################
  274. # Locate and draw a box around the moving object.
  275. # Valid values: on, off, preview (default: off)
  276. # Set to 'preview' will only draw a box in preview_shot pictures.
  277. locate_motion_mode off
  278. # Set the look and style of the locate box if enabled.
  279. # Valid values: box, redbox, cross, redcross (default: box)
  280. # Set to 'box' will draw the traditional box.
  281. # Set to 'redbox' will draw a red box.
  282. # Set to 'cross' will draw a little cross to mark center.
  283. # Set to 'redcross' will draw a little red cross to mark center.
  284. locate_motion_style box
  285. # Draws the timestamp using same options as C function strftime(3)
  286. # Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
  287. # Text is placed in lower right corner
  288. text_right %Y-%m-%d\n%T-%q
  289. # Draw a user defined text on the images using same options as C function strftime(3)
  290. # Default: Not defined = no text
  291. # Text is placed in lower left corner
  292. ; text_left CAMERA %t
  293. # Draw the number of changed pixed on the images (default: off)
  294. # Will normally be set to off except when you setup and adjust the motion settings
  295. # Text is placed in upper right corner
  296. text_changes off
  297. # This option defines the value of the special event conversion specifier %C
  298. # You can use any conversion specifier in this option except %C. Date and time
  299. # values are from the timestamp of the first image in the current event.
  300. # Default: %Y%m%d%H%M%S
  301. # The idea is that %C can be used filenames and text_left/right for creating
  302. # a unique identifier for each event.
  303. text_event %Y%m%d%H%M%S
  304. # Draw characters at twice normal size on images. (default: off)
  305. text_double off
  306. ############################################################
  307. # Target Directories and filenames For Images And Films
  308. # For the options snapshot_, picture_, movie_ and timelapse_filename
  309. # you can use conversion specifiers
  310. # %Y = year, %m = month, %d = date,
  311. # %H = hour, %M = minute, %S = second,
  312. # %v = event, %q = frame number, %t = thread (camera) number,
  313. # %D = changed pixels, %N = noise level,
  314. # %i and %J = width and height of motion area,
  315. # %K and %L = X and Y coordinates of motion center
  316. # %C = value defined by text_event
  317. # Quotation marks round string are allowed.
  318. ############################################################
  319. # Target base directory for pictures and films
  320. # Recommended to use absolute path. (Default: current working directory)
  321. target_dir /tmp/cam1
  322. # File path for snapshots (jpeg or ppm) relative to target_dir
  323. # Default: %v-%Y%m%d%H%M%S-snapshot
  324. # Default value is equivalent to legacy oldlayout option
  325. # For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-snapshot
  326. # File extension .jpg or .ppm is automatically added so do not include this.
  327. # Note: A symbolic link called lastsnap.jpg created in the target_dir will always
  328. # point to the latest snapshot, unless snapshot_filename is exactly 'lastsnap'
  329. snapshot_filename %v-%Y%m%d%H%M%S-snapshot
  330. # File path for motion triggered images (jpeg or ppm) relative to target_dir
  331. # Default: %v-%Y%m%d%H%M%S-%q
  332. # Default value is equivalent to legacy oldlayout option
  333. # For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
  334. # File extension .jpg or .ppm is automatically added so do not include this
  335. # Set to 'preview' together with best-preview feature enables special naming
  336. # convention for preview shots. See motion guide for details
  337. picture_filename %v-%Y%m%d%H%M%S-%q
  338. # File path for motion triggered ffmpeg films (movies) relative to target_dir
  339. # Default: %v-%Y%m%d%H%M%S
  340. # Default value is equivalent to legacy oldlayout option
  341. # For Motion 3.0 compatible mode choose: %Y/%m/%d/%H%M%S
  342. # File extension .mpg or .avi is automatically added so do not include this
  343. # This option was previously called ffmpeg_filename
  344. #movie_filename %v-%Y%m%d%H%M%S
  345. # File path for timelapse movies relative to target_dir
  346. # Default: %Y%m%d-timelapse
  347. # Default value is near equivalent to legacy oldlayout option
  348. # For Motion 3.0 compatible mode choose: %Y/%m/%d-timelapse
  349. # File extension .mpg is automatically added so do not include this
  350. #timelapse_filename %Y%m%d-timelapse
  351. ############################################################
  352. # Global Network Options
  353. ############################################################
  354. # Enable or disable IPV6 for http control and stream (default: off )
  355. ipv6_enabled off
  356. ############################################################
  357. # Live Stream Server
  358. ############################################################
  359. # The mini-http server listens to this port for requests (default: 0 = disabled)
  360. stream_port 8081
  361. # Quality of the jpeg (in percent) images produced (default: 50)
  362. stream_quality 50
  363. # Output frames at 1 fps when no motion is detected and increase to the
  364. # rate given by stream_maxrate when motion is detected (default: off)
  365. stream_motion off
  366. # Maximum framerate for stream streams (default: 1)
  367. stream_maxrate 1
  368. # Restrict stream connections to localhost only (default: on)
  369. stream_localhost on
  370. # Limits the number of images per connection (default: 0 = unlimited)
  371. # Number can be defined by multiplying actual stream rate by desired number of seconds
  372. # Actual stream rate is the smallest of the numbers framerate and stream_maxrate
  373. stream_limit 0
  374. # Set the authentication method (default: 0)
  375. # 0 = disabled
  376. # 1 = Basic authentication
  377. # 2 = MD5 digest (the safer authentication)
  378. stream_auth_method 0
  379. # Authentication for the stream. Syntax username:password
  380. # Default: not defined (Disabled)
  381. ; stream_authentication username:password
  382. ############################################################
  383. # HTTP Based Control
  384. ############################################################
  385. # TCP/IP port for the http server to listen on (default: 0 = disabled)
  386. webcontrol_port 8080
  387. # Restrict control connections to localhost only (default: on)
  388. webcontrol_localhost on
  389. # Output for http server, select off to choose raw text plain (default: on)
  390. webcontrol_html_output on
  391. # Authentication for the http based control. Syntax username:password
  392. # Default: not defined (Disabled)
  393. ; webcontrol_authentication username:password
  394. ############################################################
  395. # Tracking (Pan/Tilt)
  396. #############################################################
  397. # Type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic, 5=uvcvideo, 6=servo)
  398. # The generic type enables the definition of motion center and motion size to
  399. # be used with the conversion specifiers for options like on_motion_detected
  400. track_type 0
  401. # Enable auto tracking (default: off)
  402. track_auto off
  403. # Serial port of motor (default: none)
  404. ;track_port /dev/ttyS0
  405. # Motor number for x-axis (default: 0)
  406. ;track_motorx 0
  407. # Set motorx reverse (default: 0)
  408. ;track_motorx_reverse 0
  409. # Motor number for y-axis (default: 0)
  410. ;track_motory 1
  411. # Set motory reverse (default: 0)
  412. ;track_motory_reverse 0
  413. # Maximum value on x-axis (default: 0)
  414. ;track_maxx 200
  415. # Minimum value on x-axis (default: 0)
  416. ;track_minx 50
  417. # Maximum value on y-axis (default: 0)
  418. ;track_maxy 200
  419. # Minimum value on y-axis (default: 0)
  420. ;track_miny 50
  421. # Center value on x-axis (default: 0)
  422. ;track_homex 128
  423. # Center value on y-axis (default: 0)
  424. ;track_homey 128
  425. # ID of an iomojo camera if used (default: 0)
  426. track_iomojo_id 0
  427. # Angle in degrees the camera moves per step on the X-axis
  428. # with auto-track (default: 10)
  429. # Currently only used with pwc type cameras
  430. track_step_angle_x 10
  431. # Angle in degrees the camera moves per step on the Y-axis
  432. # with auto-track (default: 10)
  433. # Currently only used with pwc type cameras
  434. track_step_angle_y 10
  435. # Delay to wait for after tracking movement as number
  436. # of picture frames (default: 10)
  437. track_move_wait 10
  438. # Speed to set the motor to (stepper motor option) (default: 255)
  439. track_speed 255
  440. # Number of steps to make (stepper motor option) (default: 40)
  441. track_stepsize 40
  442. ############################################################
  443. # External Commands, Warnings and Logging:
  444. # You can use conversion specifiers for the on_xxxx commands
  445. # %Y = year, %m = month, %d = date,
  446. # %H = hour, %M = minute, %S = second,
  447. # %v = event, %q = frame number, %t = thread (camera) number,
  448. # %D = changed pixels, %N = noise level,
  449. # %i and %J = width and height of motion area,
  450. # %K and %L = X and Y coordinates of motion center
  451. # %C = value defined by text_event
  452. # %f = filename with full path
  453. # %n = number indicating filetype
  454. # Both %f and %n are only defined for on_picture_save,
  455. # on_movie_start and on_movie_end
  456. # Quotation marks round string are allowed.
  457. ############################################################
  458. # Do not sound beeps when detecting motion (default: on)
  459. # Note: Motion never beeps when running in daemon mode.
  460. quiet on
  461. # Command to be executed when an event starts. (default: none)
  462. # An event starts at first motion detected after a period of no motion defined by event_gap
  463. ; on_event_start value
  464. # Command to be executed when an event ends after a period of no motion
  465. # (default: none). The period of no motion is defined by option event_gap.
  466. ; on_event_end value
  467. # Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
  468. # To give the filename as an argument to a command append it with %f
  469. ; on_picture_save value
  470. # Command to be executed when a motion frame is detected (default: none)
  471. ; on_motion_detected value
  472. # Command to be executed when motion in a predefined area is detected
  473. # Check option 'area_detect'. (default: none)
  474. ; on_area_detected value
  475. # Command to be executed when a movie file (.mpg|.avi) is created. (default: none)
  476. # To give the filename as an argument to a command append it with %f
  477. ; on_movie_start value
  478. # Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
  479. # To give the filename as an argument to a command append it with %f
  480. ; on_movie_end value
  481. # Command to be executed when a camera can't be opened or if it is lost
  482. # NOTE: There is situations when motion don't detect a lost camera!
  483. # It depends on the driver, some drivers dosn't detect a lost camera at all
  484. # Some hangs the motion thread. Some even hangs the PC! (default: none)
  485. ; on_camera_lost value
  486. #####################################################################
  487. # Common Options for database features.
  488. # Options require database options to be active also.
  489. #####################################################################
  490. # Log to the database when creating motion triggered picture file (default: on)
  491. ; sql_log_picture on
  492. # Log to the database when creating a snapshot image file (default: on)
  493. ; sql_log_snapshot on
  494. # Log to the database when creating motion triggered movie file (default: off)
  495. ; sql_log_movie off
  496. # Log to the database when creating timelapse movies file (default: off)
  497. ; sql_log_timelapse off
  498. # SQL query string that is sent to the database
  499. # Use same conversion specifiers has for text features
  500. # Additional special conversion specifiers are
  501. # %n = the number representing the file_type
  502. # %f = filename with full path
  503. # Default value:
  504. # insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
  505. ; 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')
  506. ############################################################
  507. # Database Options
  508. ############################################################
  509. # database type : mysql, postgresql, sqlite3 (default : not defined)
  510. ; database_type value
  511. # database to log to (default: not defined)
  512. ; database_dbname value
  513. # The host on which the database is located (default: localhost)
  514. ; database_host value
  515. # User account name for database (default: not defined)
  516. ; database_user value
  517. # User password for database (default: not defined)
  518. ; database_password value
  519. # Port on which the database is located
  520. # mysql 3306 , postgresql 5432 (default: not defined)
  521. ; database_port value
  522. ############################################################
  523. # Database Options For SQLite3
  524. ############################################################
  525. # SQLite3 database (file path) (default: not defined)
  526. ; sqlite3_db value
  527. ############################################################
  528. # Video Loopback Device (vloopback project)
  529. ############################################################
  530. # Output images to a video4linux loopback device
  531. # The value '-' means next available (default: not defined)
  532. ; video_pipe value
  533. # Output motion images to a video4linux loopback device
  534. # The value '-' means next available (default: not defined)
  535. ; motion_video_pipe value
  536. ##############################################################
  537. # Thread config files - One for each camera.
  538. # Except if only one camera - You only need this config file.
  539. # If you have more than one camera you MUST define one thread
  540. # config file for each camera in addition to this config file.
  541. ##############################################################
  542. # Remember: If you have more than one camera you must have one
  543. # thread file for each camera. E.g. 2 cameras requires 3 files:
  544. # This motion.conf file AND thread1.conf and thread2.conf.
  545. # Only put the options that are unique to each camera in the
  546. # thread config files.
  547. ; thread /usr/local/etc/thread1.conf
  548. ; thread /usr/local/etc/thread2.conf
  549. ; thread /usr/local/etc/thread3.conf
  550. ; thread /usr/local/etc/thread4.conf