树莓派使用motion安装家庭监控
1. 需要准备免驱动usb摄像头
2.插入树莓派后查看是否被正确识别
cd /dev
如果存在video0文件代表摄像头识别成功
3. 安装motion。执行命令,耐心等待安装完成
sudo apt-get install motion
4.修改motion的daemon
vi /etc/default/motion
修改 no为yes
5.修改motion的配置文件
- 修改输出端口 stream_port 8081 中的8081为你需要的端口
- 关闭localhost的本地访问限制 。 stream_localhost on 改为 stream_localhost off
- 修改分辨率。找到文件中的width 和height为你需要的分辨率
- 设置网页访问需要用户名和密码:设置 stream_auth_method 1
- stream_authentication 后面的 username:passwd 改为你需要的用户名和密码
6. 关闭motion服务
sudo killall -TERM motion
7.启动motion服务
sudo motion
8. 本地登录 127.0.0.1:8080可以进行motion的其他设置
参考文章:https://www.cnblogs.com/zhaocundang/p/4858370.html