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

目录

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

  • 0
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值