栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

树莓派+摄像头实现监控功能

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

树莓派+摄像头实现监控功能

目录

1、配置前的准备

2、motion的安装与配置

3、更改参数,使画面更加流畅

4、开启或者关闭motion服务(修改/配置参数时需要关闭motion)



1、配置前的准备

      硬件: 采用树莓派4B,USB摄像头

      软件: motion

2、motion的安装与配置
sudo apt install motion

打开 /etc/default/motion将no改为yes,让它一直运行

sudo vim /etc/default/motion
#no修改成yes:
start_motion_daemon=yes

打开 /etc/motion/motion.conf 修改motion配置

sudo vim /etc/motion/motion.conf

#deamon off 改成 on
deamon on

# 设置分辨率
width 640
height 480

# 关闭 localhost 的限制
webcam_localhost off

# 允许通过网页查看摄像头
stream_localhost off           

更改完就可以启动摄像头了,ip为树莓派的ip地址,端口为8081

sudo motion

3、更改参数,使画面更加流畅
framerate 50 #这个代表帧率,50左右效果还行,可根据效果自行更改
stream_maxrate 70 #这个参数设置为 100 或者小点的(可以自行观察后配置)

4、开启或者关闭motion服务(修改/配置参数时需要关闭motion)
sudo systemctl stop motion   // 关闭motion

sudo systemctl start motion  //打开motion

sudo systemctl restart motion  //重启motion

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/731151.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号