找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 37957|回复: 51

motion 监控自动发邮件

  [复制链接]
发表于 2010-11-24 21:30 | 显示全部楼层 |阅读模式
本帖最后由 coldmoon 于 2010-11-26 20:40 编辑

http://skpsun.blog.163.com/blog/static/27600552009121109154/
看到了上面这个blog,学着在openwrt上自动发email,
首先安装mutt  ssmtp,设置/etc/ssmtp/ssmtp.conf 以gmail为例:

#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#

# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=YOURemail@gmail.com

# The place where the mail goes. The actual machine name is required
# no MX records are consulted. Commonly mailhosts are named mail.domain.com
# The example will fit if you are in domain.com and your mailhub is so named.
mailhub=smtp.gmail.com:465

# Example for SMTP port number 2525
# mailhub=mail.your.domain:2525
# Example for SMTP port number 25 (Standard/RFC)
# mailhub=mail.your.domain        
# Example for SSL encrypted connection
# mailhub=mail.your.domain:465

# Where will the mail seem to come from?
rewriteDomain=gmail.com

# The full hostname
hostname=gmail.com

# Set this to never rewrite the "From:" line (unless not given) and to
# use that address in the "from line" of the envelope.
FromLineOverride=YES

# Use SSL/TLS to send secure messages to server.
UseTLS=YES

# Use SSL/TLS certificate to authenticate against smtp host.
#UseTLSCert=YES

# Use this RSA certificate.
#TLSCert=/etc/ssl/certs/ssmtp.pem

# Get enhanced (*really* enhanced) debugging information in the logs
# If you want to have debugging of the config file parsing, move this option
# to the top of the config file and uncomment
#Debug=YES


编辑.muttrc 并copy到home目录下

# The file/directory where your incoming mail will be spooled to
# (same as 'set spoolfile' below)
mailboxes /tmp/mail

# Mail account setup.  I know nothing about IMAP, so you're
# on your own there.
set sendmail="/usr/sbin/ssmtp -v -au YOURemail@gmail.com -ap password"
set from="YOURemail@gmail.com"

# Mail folder setup.
set folder=/tmp/mail
set mbox_type=mbox
set spoolfile=+inbox
set mbox=+received
set postponed=+postponed
set record=+sent

好了现在就可以用mutt发邮件了命令如下 文件abc的内容是email的内容
mutt -s  “主题” abc@sohu.com -a 附件 </tmp/abc

motion的安装配置参考
https://www.right.com.cn/forum/thread-35868-1-1.html

下面设置motion.conf  找到

# Do not sound beeps when detecting motion (default: on)                        
# Note: Motion never beeps when running in daemon mode.                        
quiet on                                                                        
                                                                                
# Command to be executed when an event starts. (default: none)                  
# An event starts at first motion detected after a period of no motion defined b
on_event_start /etc/sendmail   

这里面/etc/sendmail是要执行的命令
我的sendmail设置如下

#!/bin/bash


DATE=$(date +"%Y%m%d%H%M%S")

#DATE=$(date -d "-1 sec" +%Y%m%d%H%M%S)



ALARM_TIME="/tmp/videotime"

echo "$DATE" > $ALARM_TIME



DIRC="/mnt/sda4/"

VIDEOTIME="/tmp/videotime"

TIME=$(cat $VIDEOTIME)

mutt -s "alarm" abc@sohu.com -a $DIRC*$TIME*.jpg </tmp/videotime
我的恩山、我的无线 The best wifi forum is right here.
发表于 2010-11-25 18:50 | 显示全部楼层
这功能不错
楼主可否说一下,效果怎么样呢?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-11-25 22:05 | 显示全部楼层
这个不顶不行!!!!!!!!!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-11-25 23:57 | 显示全部楼层
/mnt/sda4/
估计楼主 的移动 设备要爆了。。

灵敏度调多少

对着门的话,效果还行吧我想。不过天一黑。,会不会就报警 。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-11-26 09:39 | 显示全部楼层
这里触发命令有几个选项,我这里写的on_event_start是一个事件开始才会发送,也就是接下来的连续动作不会触发。其他的选项有探测到变化就触发的,邮件会不停的发,不方便,我现在改成了,触发后,等几秒钟,然后把这一分钟的图片全部发送到指定邮箱,

修改设置如下sendmail设置如下

#!/bin/bash

DATE=$(date +"%Y%m%d%H%M")
#DATE=$(date -d "-1 sec" +%Y%m%d%H%M%S)



ALARM_TIME="/tmp/videotime"

echo "$DATE" > $ALARM_TIME

DIRC="/mnt/sda4/"

VIDEOTIME="/tmp/videotime"

TIME=$(cat $VIDEOTIME)
sleep 4
mutt -s "alarm" abc@sohu.com -a $DIRC*$TIME*.jpg </tmp/videotime
然后我用crontab设置motion的启动时间和关闭时间,也就是工作日白天工作,这样触发的机会很少,并且我现在设置了发送到移动的139邮箱,可以有免费短信提醒,很爽。

我实际上就没插U盘,/mnt/sda4虽然空间很小,但是一张图片只有10k左右,存100张肯定没问题。还可以设置将发送出去的图片删除,就不会有爆的可能了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-11-26 09:40 | 显示全部楼层
4# codeblue
motion只对突然变化起作用,天不会突然黑下来,渐变没有关系。灵敏度我回家看看哈,
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-11-26 09:43 | 显示全部楼层
2# cvbni


用139邮箱,基本上做到即时收到通知,现在改为发送一分钟的图片,能够捕捉到有效图片,之前设置只发送当前图片,不能捕捉有效图片。当然没有movie好,但是movie一直没有搞定。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-11-26 12:57 | 显示全部楼层
7# coldmoon


输出视频需要重新编译motion和ffmpej
主要是修改ffmpeg 编译的config文件里的视频选项,默认是不输出视频的
晚上回去我把我的config文件贴出来.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-11-26 17:18 | 显示全部楼层
7# coldmoon
受教了,谢谢
usb链接摄像头,开启视频的话,估计cpu吃不消,
一些网络摄像头都是自带dsp编码的,dsp比较高效,不过要搞定网口链接的问题才能在路由启用吧,
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-11-26 17:47 | 显示全部楼层
8# killer2001

谢谢啊,不知你用的什么路由器,把编译好的包也共享一下吧,说不定我们用的路由cpu 一样呢。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-11-26 17:49 | 显示全部楼层
谢谢killer 如果方便把编译好的包也共享以下,說不定有人和你的路由一样呢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-11-26 20:04 | 显示全部楼层
编译好的应该需要同一个内核版本才能用.
上午说错了,应该是修改编译的makefile文件
motion的makefile文件如下:

#
# Copyright (C) 2008-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=motion
PKG_VERSION:=3.2.11.1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.lavrsen.dk/sources/motion-daily \
                @SF/motion
PKG_MD5SUM:=4e729f129d8f9b9abaed5121c3cd0037

PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/motion
  SECTION:=multimedia
  CATEGORY:=Multimedia
  DEPENDS:=+libjpeg +libpthread +ffmpeg
  TITLE:=webcam motion sensing and logging
  URL:=http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
endef

define Package/motion/conffiles
/etc/motion.conf
endef

CONFIGURE_ARGS+= \
        --with-ffmpeg \
        --without-jpeg-mmx \
        --without-mysql \
        --without-pgsql \

define Package/motion/install
        $(INSTALL_DIR) $(1)/etc
        $(CP) $(PKG_INSTALL_DIR)/etc/motion-dist.conf $(1)/etc/motion.conf
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/motion $(1)/usr/bin/

endef

$(eval $(call BuildPackage,motion))


ffmpeg的makefile文件如下:

#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=ffmpeg
PKG_VERSION:=0.5.2
PKG_RELEASE:=4

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ffmpeg.org/releases/
PKG_MD5SUM:=451eb428ca97a72c00555d50944cdb24

FFMPEG_ENCODERS:= \
        ac3 \
        jpegls \
        mpeg1video \
        mpeg2video \
        mpeg4 \
        pcm_s16be \
        pcm_s16le \
        png \
        vorbis \
        zlib \

FFMPEG_DECODERS:= \
        aac \
        ac3 \
        atrac3 \
        gif \
        h264 \
        jpegls \
        mp2 \
        mp3 \
        mpeg1video \
        mpeg2video \
        mpeg4 \
        mpeg4aac \
        mpegvideo \
        pcm_s16be \
        pcm_s16le \
        png \
        vorbis \
        wmav1 \
        wmav2 \
        zlib \

FFMPEG_MUXERS:= \
        ac3 \
        ffm \
        h264 \
        mp3 \
        mp4 \
        mpeg1video \
        mpeg2video \
        mpegts \
        ogg \
        oss \
        rtp \

FFMPEG_DEMUXERS:= \
        ac3 \
        ffm \
        h264 \
        mp3 \
        mpegps \
        mpegts \
        mpegvideo \
        ogg \
        rm \
        rtsp \
        sdp \
        v4l2 \

FFMPEG_PARSERS:= \
        aac \
        ac3 \
        h264 \
        mpegaudio \
        mpegvideo \
        mpeg4video \

FFMPEG_PROTOCOLS:= \
        file http pipe rtp tcp udp

PKG_CONFIG_DEPENDS:= \
        $(patsubst %,CONFIG_FFMPEG_ENCODER_%,$(FFMPEG_ENCODERS)) \
        $(patsubst %,CONFIG_FFMPEG_DECODER_%,$(FFMPEG_DECODERS)) \
        $(patsubst %,CONFIG_FFMPEG_MUXER_%,$(FFMPEG_DEMUXERS)) \
        $(patsubst %,CONFIG_FFMPEG_DEMUXER_%,$(FFMPEG_DEMUXERS)) \
        $(patsubst %,CONFIG_FFMPEG_PARSER_%,$(FFMPEG_PARSERS)) \
        $(patsubst %,CONFIG_FFMPEG_PROTOCOL_%,$(FFMPEG_PROTOCOLS))

include $(INCLUDE_DIR)/package.mk

define Package/ffmpeg/Default
TITLE:=FFmpeg
URL:=http://ffmpeg.mplayerhq.hu/
endef

define Package/ffmpeg/Default/description
FFmpeg is a a software package that can record, convert and stream digital
audio and video in numerous formats.
endef

define Package/ffmpeg
$(call Package/ffmpeg/Default)
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE+= program
DEPENDS+= +libpthread +libffmpeg +libpostproc
endef

define Package/ffmpeg/description
$(call Package/ffmpeg/Default/description)
.
This package contains the FFmpeg command line tool.
endef

define Package/ffserver
$(call Package/ffserver/Default)
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE+= streaming server
DEPENDS+= +libpthread +libffmpeg +@FFMPEG_FFSERVER_SUPPORT
endef

define Package/ffserver/description
$(call Package/ffmpeg/Default/description)
.
This package contains the FFmpeg streaming server.
endef

define Package/libffmpeg
$(call Package/ffmpeg/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= libraries
DEPENDS+= +libpthread +zlib
MENU:=1
endef

define Package/libffmpeg/config
source "$(SOURCE)/Config.in"
endef

define Package/libffmeg/description
$(call Package/ffmpeg/Default/description)
.
This package contains FFmpeg shared libraries.
endef

define Package/libpostproc
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libpostproc
URL:=http://ffmpeg.mplayerhq.hu/
DEPENDS:=+libffmpeg
endef

FILTER_CONFIG= \
        $(foreach c, $(3), \
                $(if $(CONFIG_FFMPEG_$(1)_$(c)),--enable-$(2)="$(c)") \
        )

FFMPEG_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(FFMPEG_ENCODERS))
FFMPEG_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(FFMPEG_DECODERS))
FFMPEG_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(FFMPEG_MUXERS))
FFMPEG_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(FFMPEG_DEMUXERS))
FFMPEG_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(FFMPEG_PARSERS))
FFMPEG_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(FFMPEG_PROTOCOLS))

# XXX: add --disable-mmx & --disable-mmx2 to fix build failure on x86
# libpostproc/postprocess_template.c:2195: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
# libpostproc/postprocess_template.c:3124: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
# libpostproc/postprocess_template.c:3207: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'

define Build/Configure
        # this is *NOT* GNU configure
        ( cd $(PKG_BUILD_DIR); \
                CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
                LDFLAGS="$(TARGET_LDFLAGS)" \
                ./configure \
                --enable-cross-compile \
                --cross-prefix="$(TARGET_CROSS)" \
                --arch="$(ARCH)" \
                --prefix="/usr" \
                --enable-shared \
                --enable-static \
                --disable-debug \
                --enable-gpl \
                --disable-libfaad \
                --disable-mmx \
                --disable-mmx2 \
                --enable-pthreads \
                --disable-optimizations \
                --enable-small \
                --disable-stripping \
                --disable-vhook \
                --enable-zlib \
                --enable-postproc \
                --disable-ipv6 \
                --disable-network \
                --disable-bsfs \
                --disable-devices \
                --disable-encoders \
                --enable-encoder=mpeg4 \
                --disable-ffplay \
                --disable-ffserver \
                --disable-decoders \
                $(FFMPEG_CONFIGURE_DECODERS) \
                --disable-muxers \
                --enable-muxer=avi \
                $(FFMPEG_CONFIGURE_MUXERS) \
                --disable-demuxers \
                $(FFMPEG_CONFIGURE_DEMUXERS) \
                --disable-parsers \
                --enable-parser=ac3 \
                --disable-filters \
                --disable-amd3dnowext \
                --disable-amd3dnow \
                $(FFMPEG_CONFIGURE_PARSERS) \
                $(FFMPEG_CONFIGURE_PROTOCOLS) \
        )
endef

define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                all install
endef

define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libav{codec,device,format,util} $(1)/usr/include/
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libav{codec,device,format,util}.{a,so*} $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
        $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libav{codec,device,format,util}.pc $(1)/usr/lib/pkgconfig/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
endef

define Package/ffmpeg/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffmpeg $(1)/usr/bin/
endef

define Package/ffserver/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/
endef

define Package/libffmpeg/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libav{codec,device,format,util}.so.* $(1)/usr/lib/
endef

define Package/libpostproc/install
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
endef

$(eval $(call BuildPackage,ffmpeg))
$(eval $(call BuildPackage,ffserver))
$(eval $(call BuildPackage,libffmpeg))
$(eval $(call BuildPackage,libpostproc))

编译方法就是按照官网的wiki帮助来的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-11-26 20:13 | 显示全部楼层
我的motion配置文件: motion.conf
# Rename this distribution example file to motion.conf
#
# This config file was generated by motion "3.2.11.1"

# Start in Setup-Mode, daemon disabled. (default: off)
setup_mode off

# Videodevice to be used for capturing  (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0

# v4l2_palette allows to choose preferable palette to be use by motion
# to capture from those supported by your videodevice. (default: 8)
# E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
# V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
# Setting v4l2_palette to 1 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#
# Values :
# V4L2_PIX_FMT_SN9C10X : 0  'S910'
# V4L2_PIX_FMT_SBGGR8  : 1  'BA81'
# V4L2_PIX_FMT_MJPEG   : 2  'MJPEG'
# V4L2_PIX_FMT_JPEG    : 3  'JPEG'
# V4L2_PIX_FMT_RGB24   : 4  'RGB3'
# V4L2_PIX_FMT_UYVY    : 5  'UYVY'
# V4L2_PIX_FMT_YUYV    : 6  'YUYV'
# V4L2_PIX_FMT_YUV422P : 7  '422P'
# V4L2_PIX_FMT_YUV420  : 8  'YU12'
v4l2_palette 6

# The video input to be used (default: 8)
# Should normally be set to 0 or 1 for video/TV cards, and 8 for USB cameras
input 8

# Image width (pixels). Valid range: Camera dependent, default: 352
width 352

# Image height (pixels). Valid range: Camera dependent, default: 288
height 288

# Maximum number of frames to be captured per second.
# Valid range: 2-100. Default: 100 (almost no limit).
framerate 1

# Minimum time in seconds between capturing picture frames from the camera.
# Default: 0 = disabled - the capture rate is given by the camera framerate.
# This option is used when you want to capture images at a rate lower than 2 per second.
minimum_frame_time 1

# Threshold for number of changed pixels in an image that
# triggers motion detection (default: 1500)
threshold 18000

# Despeckle motion image using (e)rode or (d)ilate or (l)abel (Default: not defined)
# Recommended value is EedDl. Any combination (and number of) of E, e, d, and D is valid.
# (l)abeling must only be used once and the 'l' must be the last letter.
# Comment out to disable
#despeckle EedDl

# Picture frames must contain motion at least the specified number of frames
# in a row before they are detected as true motion. At the default of 1, all
# motion is detected. Valid range: 1 to thousands, recommended 1-5
minimum_motion_frames 2

# Number of frames to capture after motion is no longer detected (default: 0)
post_capture 5

# Maximum length in seconds of an mpeg movie
# When value is exceeded a new mpeg file is created. (Default: 0 = infinite)
max_mpeg_time 40

# Gap is the seconds of no motion detection that triggers the end of an event
# An event is defined as a series of motion images taken within a short timeframe.
# Recommended value is 60 seconds (Default). The value 0 is allowed and disables
# events causing all Motion to be written to one single mpeg file and no pre_capture.
gap 30

# Output 'normal' pictures when motion is detected (default: on)
# Valid values: on, off, first, best, center
# When set to 'first', only the first picture of an event is saved.
# Picture with most motion of an event is saved when set to 'best'.
# Picture with motion nearest center of picture is saved when set to 'center'.
# Can be used as preview shot for the corresponding movie.
output_normal off

# The quality (in percent) to be used by the jpeg compression (default: 75)
quality 75


# Use ffmpeg to encode mpeg movies in realtime (default: off)
ffmpeg_cap_new on

# Bitrate to be used by the ffmpeg encoder (default: 400000)
# This option is ignored if ffmpeg_variable_bitrate is not 0 (disabled)
ffmpeg_bps  400000

# Enables and defines variable bitrate for the ffmpeg encoder.
# ffmpeg_bps is ignored if variable bitrate is enabled.
# Valid values: 0 (default) = fixed bitrate defined by ffmpeg_bps,
# or the range 2 - 31 where 2 means best quality and 31 is worst.
ffmpeg_variable_bitrate 0

# Codec to used by ffmpeg for the video compression.
# Timelapse mpegs are always made in mpeg1 format independent from this option.
# Supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), and msmpeg4.
# mpeg1 - gives you files with extension .mpg
# mpeg4 or msmpeg4 - gives you files with extension .avi
# msmpeg4 is recommended for use with Windows Media Player because
# it requires no installation of codec on the Windows client.
# swf - gives you a flash film with extension .swf
# flv - gives you a flash video with extension .flv
# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
# mov - QuickTime ( testing )
ffmpeg_video_codec mpeg4

# Locate and draw a box around the moving object.
# Valid values: on, off and preview (default: off)
# Set to 'preview' will only draw a box in preview_shot pictures.
locate off

# Draws the timestamp using same options as C function strftime(3)
# Default: %Y-%m-%d\n%T = date in ISO format and time in 24 hour clock
# Text is placed in lower right corner
text_right %Y-%m-%d\n%T-%q

# Draw characters at twice normal size on images. (default: off)
text_double off

# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
target_dir /usr/motion

# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 0

# Restrict webcam connections to localhost only (default: on)
webcam_localhost off

# Command to be executed when an event starts. (default: none)
# An event starts at first motion detected after a period of no motion defined by gap
on_event_start echo "Subject:Attention" | msmtp 136*******@139.com

# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# To give the filename as an argument to a command append it with %f
on_movie_end echo "A"| mutt -s "a" 136*******@139.com -a %f
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2010-11-26 20:21 | 显示全部楼层
由于我的网络上载带宽只有512k,所以我的图相尺寸,帧率,以及视频时间都设置得比较小
视频是30s就重建一个文件。
motion运行时cpu只占6%左右,有异动时也没超过50%。我时db120的路由。
另外139邮箱中可以设置让on_event_start 发短信报警,而on_movie_end 不发短信
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2010-11-26 20:32 | 显示全部楼层
14# killer2001
你用的是什么版本的内核,我的也是db120,如果方便把,motion ffmpeg 等包发给我吧,我的邮箱:tyjibeike@sohu.com
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-19 18:46

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表