一 :安装 motion
1.下载
sudo apt install motion
2. 配置
--sudo vi /etc/default/motion
no改成yes
--sudo vim /etc/motion/motion.conf
daemon off -->daemon on:
stream_localhost on --> stream_localhost off
stream_maxrate 100
width 640 # 图像的宽
height 480 # 图像的高
webcontrol_localhost off # 允许非本机访问控制页面
3. 运行及结束
pi@raspberrypi:~/workspace/motion $ sudo motion
[21493384:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf
[21493384:motion] [NTC] [ALL] motion_startup: Motion 4.1.1 Started
[21493384:motion] [NTC] [ALL] motion_startup: Logging to file (/var/log/motion/motion.log)
pi@raspberrypi:~/workspace/motion $ sudo service motion stop
二:打开摄像头
sudo raspi-config
选择第五个 Interfacing --》Camera yes 完成
三:重启
sudo reboot
四:开启motion
sudo motion
此时正常摄像头红灯会亮起
浏览器输入 : http://树莓派ip:8081
可以看到实时监控
注意!!!!!
结果
如果是这样 摄像头也没亮 说明少驱动 看下图
查看modules
加上 重启就好了
原因