树莓派motion视频监控
时间: 2025-01-03 14:20:11 浏览: 6
### 配置 Motion 进行视频监控
#### 安装 Motion
为了在树莓派上建立基于Motion的视频监控系统,首先需要安装Motion软件包。这可以通过简单的命令完成:
```bash
sudo apt-get update
sudo apt-get install motion
```
上述命令会更新本地包索引并安装最新版本的Motion[^2]。
#### 启动 Motion Daemon
为了让Motion能够持续运行于后台,需启用其守护进程服务。编辑`/etc/default/motion`文件来激活此功能:
```bash
sudo nano /etc/default/motion
```
找到`start_motion_daemon=no`这一行,并将其改为`yes`:
```text
start_motion_daemon=yes
```
保存更改后退出编辑器[^4]。
#### 修改权限设置
确保Motion拥有足够的权限访问存储目录以及读写图像数据非常重要。执行如下指令可赋予适当权限给指定路径下的文件夹:
```bash
sudo mkdir -p /home/pi/motion
sudo chgrp motion /home/pi/motion
sudo chmod g+rwx /home/pi/motion
```
这些操作将创建一个新的名为`motion`的子目录用于存放捕捉到的画面资料,并调整该位置的安全属性以便程序正常运作[^5]。
#### 开启与测试 Motion 服务
最后一步就是正式启动Motion服务,并验证一切是否按预期工作:
```bash
sudo systemctl enable motion
sudo systemctl start motion
```
此时应该可以在浏览器中输入树莓派IP地址加上默认端口8081(例如http://<Raspberry Pi IP>:8081),查看实时摄像画面流传输情况[^3]。
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)