Advertisement
Guest User

Untitled

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