使用motion进行摄像头监视
使用motion进行摄像头监视(树莓派)
安装
- 系统更新
sudo apt-get update
- 安装Vim
sudo apt-get install vim
- 终端输入
sudo apt-get install motion
配置motion
sudo vim /etc/default/motion
修改内容
# set to 'yes' to enable the motion daemon
start_motion_daemon=no
## 修改为start_motion_daemon=yes
sudo vim /etc/motion/motion.conf
tips:
可以通过vim的字符串匹配功能,快速定位到该项。
- 命令状态下
/字符串
回车- 使用
n
进行下一个
# Start in daemon (background) mode and release terminal (default: off)
daemon off
#修改为:daemon on
############################################################
# Live Stream Server
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
stream_port 8081
#修改为 8081 #这是端口
# Restrict stream connections to localhost only (default: on)
stream_localhost on
# 修改为 stream_localhost off
############################################################
# HTTP Based Control
############################################################
# TCP/IP port for the http server to listen on (default: 0 = disabled)
webcontrol_port 8080
# Restrict control connections to localhost only (default: on)
webcontrol_localhost on
##这里修改为 webcontrol_localhost off
# Output for http server, select off to choose raw text plain (default: on)
webcontrol_html_output on
# Image width (pixels). Valid range: Camera dependent, default: 320
width 320
## 这里的320可以修改为摄像头的分辨率 长
# Image height (pixels). Valid range: Camera dependent, default: 240
height 240
## 这里的240可以修改为摄像头的分辨率 宽
# Maximum number of frames to be captured per second.
# Valid range: 2-100. Default: 100 (almost no limit).
framerate 2
然后使用命令sudo motion
启动该软件
之后就可以在局域网内,通过ip+端口
的方式访问你的监控了。如网站输入192.168.0.111:8081
回车进行查看
想要退出的话sudo service motion stop
如果想查看自己摄像头的状况,树莓派系统下面安装luvcview
使用命令sudo apt install luvcview
安装完成之后,使用命令查看
luvcview -d /dev/video* -L
这是 Lemon's 博客,如果需要转载,请标注出处啦~ヾ(≧▽≦*)o谢谢。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 地球OL攻略 —— 某应届生求职总结
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 提示词工程——AI应用必不可少的技术
· .NET周刊【3月第1期 2025-03-02】