|
@@ -9,12 +9,11 @@ Up to 4 inputs can be configured for each camera and the role of each input can
|
|
|
|
|
|
Each role can only be assigned to one input per camera. The options for roles are as follows:
|
|
|
|
|
|
-| Role | Description |
|
|
|
-| -------- | ------------------------------------------------------------------------------------ |
|
|
|
-| `detect` | Main feed for object detection |
|
|
|
-| `clips` | Clips of events from objects detected in the `detect` feed. [docs](#recording-clips) |
|
|
|
-| `record` | Saves 60 second segments of the video feed. [docs](#247-recordings) |
|
|
|
-| `rtmp` | Broadcast as an RTMP feed for other services to consume. [docs](#rtmp-streams) |
|
|
|
+| Role | Description |
|
|
|
+| -------- | ------------------------------------------------------------------------------------- |
|
|
|
+| `detect` | Main feed for object detection |
|
|
|
+| `record` | Saves segments of the video feed based on configuration settings. [docs](#recordings) |
|
|
|
+| `rtmp` | Broadcast as an RTMP feed for other services to consume. [docs](#rtmp-streams) |
|
|
|
|
|
|
### Example
|
|
|
|
|
@@ -130,37 +129,48 @@ objects:
|
|
|
mask: 0,0,1000,0,1000,200,0,200
|
|
|
```
|
|
|
|
|
|
-## Clips
|
|
|
+## Recordings
|
|
|
|
|
|
-Frigate can save video clips without any CPU overhead for encoding by simply copying the stream directly with FFmpeg. It leverages FFmpeg's segment functionality to maintain a cache of video for each camera. The cache files are written to disk at `/tmp/cache` and do not introduce memory overhead. When an object is being tracked, it will extend the cache to ensure it can assemble a clip when the event ends. Once the event ends, it again uses FFmpeg to assemble a clip by combining the video clips without any encoding by the CPU. Assembled clips are are saved to `/media/frigate/clips`. Clips are retained according to the retention settings defined on the config for each object type.
|
|
|
+24/7 recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM/DD/HH/<camera_name>/MM.SS.mp4`. These recordings are written directly from your camera stream without re-encoding and are available in Home Assistant's media browser. Each camera supports a configurable retention policy in the config.
|
|
|
+
|
|
|
+Clips are also created off of these recordings. Frigate chooses the largest matching retention value between the recording retention and the event retention when determining if a recording should be removed.
|
|
|
|
|
|
-These clips will not be playable in the web UI or in Home Assistant's media browser unless your camera sends video as h264.
|
|
|
+These recordings will not be playable in the web UI or in Home Assistant's media browser unless your camera sends video as h264.
|
|
|
|
|
|
:::caution
|
|
|
Previous versions of frigate included `-vsync drop` in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set.
|
|
|
:::
|
|
|
|
|
|
```yaml
|
|
|
-clips:
|
|
|
- # Required: enables clips for the camera (default: shown below)
|
|
|
- # This value can be set via MQTT and will be updated in startup based on retained value
|
|
|
+record:
|
|
|
+ # Optional: Enable recording (default: shown below)
|
|
|
enabled: False
|
|
|
- # Optional: Number of seconds before the event to include in the clips (default: shown below)
|
|
|
- pre_capture: 5
|
|
|
- # Optional: Number of seconds after the event to include in the clips (default: shown below)
|
|
|
- post_capture: 5
|
|
|
- # Optional: Objects to save clips for. (default: all tracked objects)
|
|
|
- objects:
|
|
|
- - person
|
|
|
- # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
|
|
|
- required_zones: []
|
|
|
- # Optional: Camera override for retention settings (default: global values)
|
|
|
- retain:
|
|
|
- # Required: Default retention days (default: shown below)
|
|
|
- default: 10
|
|
|
- # Optional: Per object retention days
|
|
|
+ # Optional: Number of days to retain (default: shown below)
|
|
|
+ retain_days: 0
|
|
|
+ # Optional: Event recording settings
|
|
|
+ events:
|
|
|
+ # Optional: Enable event recording retention settings (default: shown below)
|
|
|
+ enabled: False
|
|
|
+ # Optional: Maximum length of time to retain video during long events. (default: shown below)
|
|
|
+ # NOTE: If an object is being tracked for longer than this amount of time, the cache
|
|
|
+ # will begin to expire and the resulting clip will be the last x seconds of the event unless retain_days under record is > 0.
|
|
|
+ max_seconds: 300
|
|
|
+ # Optional: Number of seconds before the event to include in the clips (default: shown below)
|
|
|
+ pre_capture: 5
|
|
|
+ # Optional: Number of seconds after the event to include in the clips (default: shown below)
|
|
|
+ post_capture: 5
|
|
|
+ # Optional: Objects to save clips for. (default: all tracked objects)
|
|
|
objects:
|
|
|
- person: 15
|
|
|
+ - person
|
|
|
+ # Optional: Restrict clips to objects that entered any of the listed zones (default: no required zones)
|
|
|
+ required_zones: []
|
|
|
+ # Optional: Retention settings for clips
|
|
|
+ retain:
|
|
|
+ # Required: Default retention days (default: shown below)
|
|
|
+ default: 10
|
|
|
+ # Optional: Per object retention days
|
|
|
+ objects:
|
|
|
+ person: 15
|
|
|
```
|
|
|
|
|
|
## Snapshots
|
|
@@ -197,23 +207,6 @@ snapshots:
|
|
|
person: 15
|
|
|
```
|
|
|
|
|
|
-## 24/7 Recordings
|
|
|
-
|
|
|
-24/7 recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM/DD/HH/<camera_name>/MM.SS.mp4`. These recordings are written directly from your camera stream without re-encoding and are available in Home Assistant's media browser. Each camera supports a configurable retention policy in the config.
|
|
|
-
|
|
|
-:::caution
|
|
|
-Previous versions of frigate included `-vsync drop` in input parameters. This is not compatible with FFmpeg's segment feature and must be removed from your input parameters if you have overrides set.
|
|
|
-:::
|
|
|
-
|
|
|
-```yaml
|
|
|
-# Optional: 24/7 recording configuration
|
|
|
-record:
|
|
|
- # Optional: Enable recording (default: global setting)
|
|
|
- enabled: False
|
|
|
- # Optional: Number of days to retain (default: global setting)
|
|
|
- retain_days: 30
|
|
|
-```
|
|
|
-
|
|
|
## RTMP streams
|
|
|
|
|
|
Frigate can re-stream your video feed as a RTMP feed for other applications such as Home Assistant to utilize it at `rtmp://<frigate_host>/live/<camera_name>`. Port 1935 must be open. This allows you to use a video feed for detection in frigate and Home Assistant live view at the same time without having to make two separate connections to the camera. The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate.
|