使用 Motion 为树莓派实现局域网监控
安装 Motion
最新版本
这里不建议使用 apt
命令安装,详情请见 Motion: Raspberry Pi cameras
从
Motion
项目发布页面 “https://github.com/Motion-Project/motion/releases”下载Motion
最新版本,这里是pi_buster_motion_4.3.1-1_armhf.deb
sudo apt install -y ./pi_buster_motion_4.3.1-1_armhf.deb
设置 Motion
首先修改
motion
文件来设置守护进程sudo nano /etc/default/motion
将
start_motion_daemon
参数改为yes
,然后按快捷键Ctrl+X
后输入y
,回车确认保存start_motion_daemon=yes
其次需要修改配置文件
motion.conf
sudo nano /etc/motion/motion.conf
找到并分别修改下面内容并保存
开启守护、开启视频流和Web管理页面外部访问daemon on stream_localhost off webcontrol_localhost off
酌情修改分辨率
width 640 height 480
如果使用树莓派的摄像头,需要删掉
mmalcam_name
前面的;
,并设置参数vc.ril.camera
mmalcam_name vc.ril.camera
启动 Motion
sudo systemctl start motion
https://blog.csdn.net/liudongdong19/article/details/81279117
https://motion-project.github.io/motion_config.html#OptDetail_Raspi_Cameras