Scope
This skill:
- - ✅ Generates camera capture commands
- ✅ Guides integration with security systems
- ✅ Provides troubleshooting for camera issues
User-driven model:
- - User provides camera credentials (RTSP URLs, passwords)
- User runs capture commands
- User installs required tools
This skill does NOT:
- - ❌ Store camera credentials
- ❌ Run captures automatically without user request
- ❌ Access cameras without user-provided access info
Requirements
Required:
- -
ffmpeg — for capture and recording
Optional (user installs if needed):
- -
gphoto2 — for DSLR/mirrorless control - INLINECODE2 — for USB cameras on Linux
Quick Reference
| Topic | File |
|---|
| Security camera integration | INLINECODE3 |
| USB/webcam capture |
capture.md |
| DSLR control |
photography-control.md |
| Video processing |
processing.md |
Core Rules
1. User Provides Camera Access
When user requests capture:
CODEBLOCK0
2. Common Commands
CODEBLOCK1
3. Protocol Reference
| Protocol | Use Case | URL Format |
|---|
| RTSP | IP cameras | INLINECODE7 |
| HTTP |
Simple cams |
http://ip/snapshot.jpg |
| V4L2 | USB cameras |
/dev/video0 |
4. Integration Patterns
With Home Assistant:
GET /api/camera_proxy/camera.front_door
User provides HA URL and token.
With Frigate:
- - MQTT:
frigate/events for alerts - HTTP: INLINECODE11
5. Security
- - Never log camera URLs with credentials
- Recommend user stores URLs in env vars
- RTSP streams may be unencrypted — warn about LAN security
范围
本技能:
- - ✅ 生成摄像头捕获命令
- ✅ 指导与安全系统的集成
- ✅ 提供摄像头问题的故障排除
用户驱动模型:
- - 用户提供摄像头凭据(RTSP URL、密码)
- 用户运行捕获命令
- 用户安装所需工具
本技能不:
- - ❌ 存储摄像头凭据
- ❌ 在无用户请求时自动运行捕获
- ❌ 在无用户提供的访问信息时访问摄像头
要求
必需:
可选(用户根据需要安装):
- - gphoto2 — 用于单反/无反相机控制
- v4l2-ctl — 用于Linux上的USB摄像头
快速参考
| 主题 | 文件 |
|---|
| 安防摄像头集成 | security-integration.md |
| USB/网络摄像头捕获 |
capture.md |
| 单反相机控制 | photography-control.md |
| 视频处理 | processing.md |
核心规则
1. 用户提供摄像头访问权限
当用户请求捕获时:
用户:从我的前门摄像头拍一张快照
助手:我需要RTSP URL。格式:rtsp://user:pass@ip/stream
请提供它或在环境变量中设置CAMERAFRONTURL。
用户:rtsp://admin:pass@192.168.1.50/stream1
→ 助手生成:ffmpeg -i URL -frames:v 1 snapshot.jpg
2. 常用命令
bash
从RTSP拍摄快照(用户提供URL)
ffmpeg -i $RTSP_URL -frames:v 1 snapshot.jpg
录制10秒片段
ffmpeg -i $RTSP_URL -t 10 -c copy clip.mp4
网络摄像头快照(macOS)
ffmpeg -f avfoundation -i 0 -frames:v 1 webcam.jpg
网络摄像头快照(Linux)
ffmpeg -f v4l2 -i /dev/video0 -frames:v 1 webcam.jpg
3. 协议参考
| 协议 | 使用场景 | URL格式 |
|---|
| RTSP | IP摄像头 | rtsp://user:pass@ip:554/stream |
| HTTP |
简易摄像头 | http://ip/snapshot.jpg |
| V4L2 | USB摄像头 | /dev/video0 |
4. 集成模式
与Home Assistant集成:
GET /api/cameraproxy/camera.frontdoor
用户提供HA URL和令牌。
与Frigate集成:
- - MQTT:frigate/events 用于警报
- HTTP:/api/events/{id}/snapshot.jpg
5. 安全性
- - 切勿记录包含凭据的摄像头URL
- 建议用户将URL存储在环境变量中
- RTSP流可能未加密 — 提醒注意局域网安全