树莓派4B链接use摄像头

577 阅读1分钟

使用use摄像头做监控

我这里使用的摄像头是 急速B18s

捕获的画质分别为:640 x 480,352 x 288,320 x 240

使用lsusb查看use设备

我这里用的use2.0的口

安装motion 并且修改motion文件

sudo apt-get install motion

sudo nano /etc/default/motion
把文件中 "start_motion_daemon=no" 改为yes

修改motion.conf

daemon on  #off改成on
width 640  
height 480
framerate 60 #这个代表帧率
stream_localhost off

启动命令

sudo motion

访问地址,默认端口8081

http://127.0.0.1:8081/

摄像头卡顿解决

修改stream_maxrate值,1到100之间自己尝试把,我测试80感觉听流畅的

sudo nano /etc/motion/motion.confstream_maxrate  80

关闭命令

sudo killall -TERM motion

启动命令

sudo motion