frigate_nvr/README.md

235 lines
3.5 KiB
Markdown

# Frigate NVR on Arch Linux with SMB Storage
## Overview
Self-hosted Frigate NVR running on Arch Linux using Docker and SMB-backed storage for recordings.
Current deployment includes:
* Arch Linux
* Docker / Docker Compose
* Frigate 0.17+
* Amcrest IP cameras
* SMB network storage
* go2rtc stream restreaming
* ONVIF camera discovery
---
## Features
* Continuous camera recording
* Motion detection
* Snapshot capture
* Multi-camera support
* SMB/NAS storage
* ONVIF camera integration
* RTSP restreaming through go2rtc
* Home Assistant integration ready
---
## Hardware
### Cameras
| Name | IP Address |
| ----- | ------------ |
| Front | 10.28.24.141 |
| PTZ 1 | 10.28.24.142 |
---
## Network Ports
| Port | Service |
| ---- | -------------- |
| 8971 | Frigate Web UI |
| 8554 | RTSP Restream |
| 8555 | WebRTC |
| 1984 | go2rtc API |
---
## Storage
Recordings are stored on an SMB-mounted network share.
Example mount:
```fstab
//NAS-IP/recordings /mnt/frigate-recordings cifs credentials=/etc/samba/frigate-smb.cred,uid=1000,gid=1000,_netdev,x-systemd.automount 0 0
```
Verify mount:
```bash
mount | grep frigate
```
---
## Frigate Configuration
Configuration file:
```text
/opt/frigate/config/config.yml
```
---
## Camera Streams
### Front Camera
Main Stream:
```text
rtsp://admin:PASSWORD@10.28.24.141:554/cam/realmonitor?channel=1&subtype=0
```
Sub Stream:
```text
rtsp://admin:PASSWORD@10.28.24.141:554/cam/realmonitor?channel=1&subtype=1
```
### PTZ Camera
Main Stream:
```text
rtsp://admin:PASSWORD@10.28.24.142:554/cam/realmonitor?channel=1&subtype=0
```
Sub Stream:
```text
rtsp://admin:PASSWORD@10.28.24.142:554/cam/realmonitor?channel=1&subtype=1
```
---
## Example Configuration
```yaml
mqtt:
enabled: false
version: 0.17-0
record:
enabled: true
snapshots:
enabled: true
go2rtc:
streams:
front:
- rtsp://admin:PASSWORD@10.28.24.141:554/cam/realmonitor?channel=1&subtype=0
front_sub:
- rtsp://admin:PASSWORD@10.28.24.141:554/cam/realmonitor?channel=1&subtype=1
ptz_1:
- rtsp://admin:PASSWORD@10.28.24.142:554/cam/realmonitor?channel=1&subtype=0
ptz_1_sub:
- rtsp://admin:PASSWORD@10.28.24.142:554/cam/realmonitor?channel=1&subtype=1
cameras:
front:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front_sub
roles:
- detect
- path: rtsp://127.0.0.1:8554/front
roles:
- record
- audio
detect:
width: 640
height: 480
fps: 5
ptz_1:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/ptz_1_sub
roles:
- detect
- path: rtsp://127.0.0.1:8554/ptz_1
roles:
- record
- audio
detect:
width: 640
height: 480
fps: 5
```
---
## Docker Management
Restart:
```bash
cd /opt/frigate
sudo docker compose restart
```
View Logs:
```bash
sudo docker logs -f frigate
```
Container Status:
```bash
sudo docker ps
```
---
## Troubleshooting
### Verify RTSP Stream
```bash
ffprobe "rtsp://admin:PASSWORD@CAMERA_IP:554/cam/realmonitor?channel=1&subtype=0"
```
### Verify SMB Mount
```bash
df -h
mount | grep cifs
```
### Verify Frigate Configuration
```bash
sudo docker logs frigate --tail 100
```
---
## Future Improvements
* NVIDIA hardware decoding
* Home Assistant integration
* Object detection acceleration
* Cloudflare Tunnel remote access
* Mobile notifications
* Recording retention policies
* Automatic backups
* GPU-based inference
```
```