個人配置樹莓派監控Motion相關的事情
from:http://www.cnblogs.com/zhaocundang/p/8870083.html
安裝:apt-get install motion -y
編輯配置文件
vim /etc/motion/motion.cnf
daemon on #后台運行
locate_motion_mode on #探測到圖像中有運動時,把運動區域用矩形框起來
videodevice /dev/video0 #加載USB攝像頭的設備(對應自己的攝像頭設備)
width 640 #圖像寬度
height 480 #圖像高度
target_dir /root/motion #設置拍攝圖片的存儲目錄
threshold 3000 #這個是改變探測靈敏度,越小越靈敏,這里設為3000像素值
webcam_localhost off #關閉 localhost 的限制
創建優盤掛載點:
mkdir /camdata/
chmod 755 /camdata/
掛載優盤:
apt-get install ntfs-3g -y
mount -t ntfs-3g /dev/sda /camdata/
設置時間
輸入sudo dpkg-reconfigure tzdata
測試監控:192.168.x.x:8081
設置開機啟動:
sudo vim /etc/rc.local
在 exit(0)上面添加
mount -t ntfs-3g /dev/sda /camdata/
motion
倆個路由器:
路由器B中繼路由器A
pi連接路由器B lan
A : ROUTE 192.168.0.1
開啟端口重映射到B : 192.168.0.9 (B路由器連接IP) 端口8081
B:路由器 route 192.168.1.1
開啟端口重映射到pi(192.168.1.177) 192.168.1.177 端口8081
ok 解決