From 00d14fa49f7c1e79d71eeefa3f8fa077ca82370c Mon Sep 17 00:00:00 2001 From: Mitch Ross Date: Sun, 28 Feb 2021 21:42:12 -0500 Subject: [PATCH 01/29] Update Unraid Install Instructions --- docs/docs/hardware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md index 1a1972121..f94a6738d 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -26,4 +26,4 @@ To install make sure you have the [community app plugin here](https://forums.unr | Name | Inference Speed | Notes | | ----------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| [M2 Coral Edge TPU](http://coral.ai) | 6.2ms | Little complicated to get installed, as needs drivers on the host OS, [info here](https://forums.unraid.net/topic/98064-support-blakeblackshear-frigate/?do=findComment&comment=945776) | +| [M2 Coral Edge TPU](http://coral.ai) | 6.2ms | Install the Coral plugin from Unraid Community App Center [info here](https://forums.unraid.net/topic/98064-support-blakeblackshear-frigate/?do=findComment&comment=949789) | From 10c37a3036b1bb547089ad2e923079190e9a180c Mon Sep 17 00:00:00 2001 From: Paul Armstrong Date: Mon, 8 Mar 2021 07:51:09 -0800 Subject: [PATCH 02/29] docs: include available objects in documentation --- docs/docs/configuration/advanced.md | 21 ----------------- docs/docs/configuration/cameras.md | 10 +++++--- docs/docs/configuration/index.md | 2 +- docs/docs/configuration/objects.mdx | 36 +++++++++++++++++++++++++++++ docs/docusaurus.config.js | 5 +++- docs/package-lock.json | 21 +++++++++++++++++ docs/package.json | 1 + docs/plugins/raw-loader.js | 12 ++++++++++ docs/sidebars.js | 1 + 9 files changed, 83 insertions(+), 26 deletions(-) create mode 100644 docs/docs/configuration/objects.mdx create mode 100644 docs/plugins/raw-loader.js diff --git a/docs/docs/configuration/advanced.md b/docs/docs/configuration/advanced.md index 5c8c0178c..b03b438a4 100644 --- a/docs/docs/configuration/advanced.md +++ b/docs/docs/configuration/advanced.md @@ -116,24 +116,3 @@ model: # Required: width of the trained model width: 320 ``` - -## Custom Models - -Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts: - -- CPU Model: `/cpu_model.tflite` -- EdgeTPU Model: `/edgetpu_model.tflite` -- Labels: `/labelmap.txt` - -You also need to update the model width/height in the config if they differ from the defaults. - -### Customizing the Labelmap - -The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. You must retain the same number of labels, but you can change the names. To change: - -- Download the [COCO labelmap](https://dl.google.com/coral/canned_models/coco_labels.txt) -- Modify the label names as desired. For example, change `7 truck` to `7 car` -- Mount the new file at `/labelmap.txt` in the container with an additional volume - ``` - -v ./config/labelmap.txt:/labelmap.txt - ``` diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index c8dcfbf13..00b4d0c2e 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -41,9 +41,11 @@ cameras: ## Masks & Zones ### Masks + Masks are used to ignore initial detection in areas of your camera's field of view. There are two types of masks available: + - **Motion masks**: Motion masks are used to prevent unwanted types of motion from triggering detection. Try watching the video feed with `Motion Boxes` enabled to see what may be regularly detected as motion. For example, you want to mask out your timestamp, the sky, rooftops, etc. Keep in mind that this mask only prevents motion from being detected and does not prevent objects from being detected if object detection was started due to motion in unmasked areas. Motion is also used during object tracking to refine the object detection area in the next frame. Over masking will make it more difficult for objects to be tracked. To see this effect, create a mask, and then watch the video feed with `Motion Boxes` enabled again. - **Object filter masks**: Object filter masks are used to filter out false positives for a given object type. These should be used to filter any areas where it is not possible for an object of that type to be. The bottom center of the detected object's bounding box is evaluated against the mask. If it is in a masked area, it is assumed to be a false positive. For example, you may want to mask out rooftops, walls, the sky, treetops for people. For cars, masking locations other than the street or your driveway will tell frigate that anything in your yard is a false positive. @@ -102,6 +104,8 @@ zones: ## Objects +For a list of available objects, see the [objects documentation](./objects.mdx). + ```yaml # Optional: Camera level object filters config. objects: @@ -109,7 +113,7 @@ objects: - person - car # Optional: mask to prevent all object types from being detected in certain areas (default: no mask) - # Checks based on the bottom center of the bounding box of the object. + # Checks based on the bottom center of the bounding box of the object. # NOTE: This mask is COMBINED with the object type specific mask below mask: 0,0,1000,0,1000,200,0,200 filters: @@ -368,7 +372,7 @@ cameras: - person - car # Optional: mask to prevent all object types from being detected in certain areas (default: no mask) - # Checks based on the bottom center of the bounding box of the object. + # Checks based on the bottom center of the bounding box of the object. # NOTE: This mask is COMBINED with the object type specific mask below mask: 0,0,1000,0,1000,200,0,200 filters: @@ -406,6 +410,7 @@ ffmpeg: ``` ### Reolink 410/520 (possibly others) + Several users have reported success with the rtmp video from Reolink cameras. ```yaml @@ -427,7 +432,6 @@ ffmpeg: - '1' ``` - ### Blue Iris RTSP Cameras You will need to remove `nobuffer` flag for Blue Iris RTSP cameras diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 555730242..2ac79597e 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -117,7 +117,7 @@ ffmpeg: ### `objects` -Can be overridden at the camera level +Can be overridden at the camera level. For a list of available objects, see the [objects documentation](./objects.mdx). ```yaml objects: diff --git a/docs/docs/configuration/objects.mdx b/docs/docs/configuration/objects.mdx new file mode 100644 index 000000000..3e95f9e83 --- /dev/null +++ b/docs/docs/configuration/objects.mdx @@ -0,0 +1,36 @@ +--- +id: objects +title: Default available objects +sidebar_label: Available objects +--- + +import labels from '../../../labelmap.txt'; + +By default, Frigate includes the following object models from the Google Coral test data. + + + +## Custom Models + +Models for both CPU and EdgeTPU (Coral) are bundled in the image. You can use your own models with volume mounts: + +- CPU Model: `/cpu_model.tflite` +- EdgeTPU Model: `/edgetpu_model.tflite` +- Labels: `/labelmap.txt` + +You also need to update the model width/height in the config if they differ from the defaults. + +### Customizing the Labelmap + +The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. You must retain the same number of labels, but you can change the names. To change: + +- Download the [COCO labelmap](https://dl.google.com/coral/canned_models/coco_labels.txt) +- Modify the label names as desired. For example, change `7 truck` to `7 car` +- Mount the new file at `/labelmap.txt` in the container with an additional volume + ``` + -v ./config/labelmap.txt:/labelmap.txt + ``` diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 92b6a79a2..9df91fe62 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,3 +1,5 @@ +const path = require('path'); + module.exports = { title: 'Frigate', tagline: 'NVR With Realtime Object Detection for IP Cameras', @@ -11,7 +13,7 @@ module.exports = { themeConfig: { algolia: { apiKey: '81ec882db78f7fed05c51daf973f0362', - indexName: 'frigate' + indexName: 'frigate', }, navbar: { title: 'Frigate', @@ -56,6 +58,7 @@ module.exports = { copyright: `Copyright © ${new Date().getFullYear()} Blake Blackshear`, }, }, + plugins: [path.resolve(__dirname, 'plugins', 'raw-loader')], presets: [ [ '@docusaurus/preset-classic', diff --git a/docs/package-lock.json b/docs/package-lock.json index 9386c1751..fcf2b20cb 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -9864,6 +9864,27 @@ "unpipe": "1.0.0" } }, + "raw-loader": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", + "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", + "requires": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "dependencies": { + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + } + } + }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", diff --git a/docs/package.json b/docs/package.json index edc79fdcb..0c7864e0a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -16,6 +16,7 @@ "@docusaurus/preset-classic": "2.0.0-alpha.70", "@mdx-js/react": "^1.6.21", "clsx": "^1.1.1", + "raw-loader": "^4.0.2", "react": "^16.8.4", "react-dom": "^16.8.4" }, diff --git a/docs/plugins/raw-loader.js b/docs/plugins/raw-loader.js new file mode 100644 index 000000000..693d09936 --- /dev/null +++ b/docs/plugins/raw-loader.js @@ -0,0 +1,12 @@ +module.exports = function (context, options) { + return { + name: 'labelmap', + configureWebpack(config, isServer, utils) { + return { + module: { + rules: [{ test: /\.txt$/, use: 'raw-loader' }], + }, + }; + }, + }; +}; diff --git a/docs/sidebars.js b/docs/sidebars.js index b8198aadb..a8e6714cb 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -7,6 +7,7 @@ module.exports = { 'configuration/optimizing', 'configuration/detectors', 'configuration/false_positives', + 'configuration/objects', 'configuration/advanced', ], Usage: ['usage/home-assistant', 'usage/web', 'usage/api', 'usage/mqtt'], From d2bc2c20c1b9987e5c9debfee728ed957530267f Mon Sep 17 00:00:00 2001 From: John Date: Thu, 18 Mar 2021 17:37:19 -0400 Subject: [PATCH 03/29] Update api.md Fixed example URL for the viewing higher resolution mjpeg stream. --- docs/docs/usage/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/usage/api.md b/docs/docs/usage/api.md index b7fb4dbbc..25a52abd9 100644 --- a/docs/docs/usage/api.md +++ b/docs/docs/usage/api.md @@ -22,7 +22,7 @@ Accepts the following query string parameters: | `motion` | int | Draw blue boxes for areas with detected motion (0 or 1) | | `regions` | int | Draw green boxes for areas where object detection was run (0 or 1) | -You can access a higher resolution mjpeg stream by appending `h=height-in-pixels` to the endpoint. For example `http://localhost:5000/back?h=1080`. You can also increase the FPS by appending `fps=frame-rate` to the URL such as `http://localhost:5000/back?fps=10` or both with `?fps=10&h=1000`. +You can access a higher resolution mjpeg stream by appending `h=height-in-pixels` to the endpoint. For example `http://localhost:5000/api/back?h=1080`. You can also increase the FPS by appending `fps=frame-rate` to the URL such as `http://localhost:5000/api/back?fps=10` or both with `?fps=10&h=1000`. ### `/api///best.jpg[?h=300&crop=1]` From 9d2469549f5b8cb8591b01027b9b0f2462fb09b8 Mon Sep 17 00:00:00 2001 From: Ron Schaeffer Date: Wed, 7 Apr 2021 18:41:25 +0100 Subject: [PATCH 04/29] Update installation.md It is not possible--unless I'm totally overlooking something--to define the add-on's configuration in the GUI. The user must define the configuration in a frigate.yml file, --- docs/docs/installation.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/docs/installation.md b/docs/docs/installation.md index 65f51021f..bcd56ca7a 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -14,10 +14,11 @@ Note that HassOS Addons and custom components are different things. If you are a HassOS users can install via the addon repository. Frigate requires an MQTT server. 1. Navigate to Supervisor > Add-on Store > Repositories -1. Add https://github.com/blakeblackshear/frigate-hass-addons -1. Setup your configuration in the `Configuration` tab -1. Start the addon container -1. If you are using hardware acceleration for ffmpeg, you will need to disable "Protection mode" +2. Add https://github.com/blakeblackshear/frigate-hass-addons +3. Setup your network configuration in the `Configuration` tab if deisred +4. Create the file `frigate.yml` in your `config` directory with your detailed Frigate conifguration +5. Start the addon container +6. If you are using hardware acceleration for ffmpeg, you will need to disable "Protection mode" ## Docker From 00c6a8f577349c7d061639baab4d8d942c10ac92 Mon Sep 17 00:00:00 2001 From: Ron Schaeffer Date: Wed, 7 Apr 2021 19:22:18 +0100 Subject: [PATCH 05/29] Update index.md Remove outdated (?) info that Addon users define their configs in the GUI. Corrected outdated (?) config,yml to frigate.yml. --- docs/docs/configuration/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 2ac79597e..1d89c0d45 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -3,7 +3,7 @@ id: index title: Configuration --- -HassOS users can manage their configuration directly in the addon Configuration tab. For other installations, the default location for the config file is `/config/config.yml`. This can be overridden with the `CONFIG_FILE` environment variable. Camera specific ffmpeg parameters are documented [here](cameras.md). +For all installations, including for HassOS, the default location for the config file is `/config/frigate.yml`. This can be overridden with the `CONFIG_FILE` environment variable. Camera specific ffmpeg parameters are documented [here](cameras.md). It is recommended to start with a minimal configuration and add to it: From 42410a260cba711c6362d3433342ea8941b46e30 Mon Sep 17 00:00:00 2001 From: Ron Schaeffer Date: Wed, 7 Apr 2021 19:38:20 +0100 Subject: [PATCH 06/29] Update index.md Corrected --- docs/docs/configuration/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 1d89c0d45..b2c9fe5c0 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -3,7 +3,9 @@ id: index title: Configuration --- -For all installations, including for HassOS, the default location for the config file is `/config/frigate.yml`. This can be overridden with the `CONFIG_FILE` environment variable. Camera specific ffmpeg parameters are documented [here](cameras.md). +For HassOS installations, the default location for the config file is `/config/frigate.yml`. + +For all other installations, the default location for the config file is '/config/config.yml'. This can be overridden with the `CONFIG_FILE` environment variable. Camera specific ffmpeg parameters are documented [here](cameras.md). It is recommended to start with a minimal configuration and add to it: From cf62dccef7e1ff9774b1e8ad0d9bf6723d235eeb Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Fri, 30 Apr 2021 21:11:47 -0700 Subject: [PATCH 07/29] Correct spelling Home Assistant --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 78040656a..012a856af 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ # Frigate - NVR With Realtime Object Detection for IP Cameras -A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras. +A complete and local NVR designed for [Home Assistant](https://www.home-assistant.io) with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras. Use of a [Google Coral Accelerator](https://coral.ai/products/) is optional, but highly recommended. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead. -- Tight integration with HomeAssistant via a [custom component](https://github.com/blakeblackshear/frigate-hass-integration) +- Tight integration with Home Assistant via a [custom component](https://github.com/blakeblackshear/frigate-hass-integration) - Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary - Leverages multiprocessing heavily with an emphasis on realtime over processing every frame - Uses a very low overhead motion detection to determine where to run object detection @@ -26,7 +26,7 @@ View the documentation at https://blakeblackshear.github.io/frigate If you would like to make a donation to support development, please use [Github Sponsors](https://github.com/sponsors/blakeblackshear). ## Screenshots -Integration into HomeAssistant +Integration into Home Assistant
From 20a52bc4e6586dafffd96478599113e4893b76ec Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 7 May 2021 12:09:07 +0200 Subject: [PATCH 08/29] Update installation.md Added missing \ in line 70 --- docs/docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/installation.md b/docs/docs/installation.md index bcd56ca7a..e0ca3fdb6 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -67,7 +67,7 @@ docker run -d \ --restart=unless-stopped \ --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \ --device /dev/bus/usb:/dev/bus/usb \ - --device /dev/dri/renderD128 + --device /dev/dri/renderD128 \ -v :/media/frigate \ -v :/config/config.yml:ro \ -v /etc/localtime:/etc/localtime:ro \ From 33a04c425b44719fb48c878f9614db66c9d34d86 Mon Sep 17 00:00:00 2001 From: Whytey Date: Tue, 11 May 2021 17:33:51 +1000 Subject: [PATCH 09/29] Add MJPEG example --- docs/docs/configuration/cameras.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index 00b4d0c2e..8a8e54d1f 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -388,6 +388,34 @@ cameras: ## Camera specific configuration +### MJPEG Cameras + +The input parameters need to be adjusted for MJPEG cameras + +```yaml + input_args: + - -avoid_negative_ts + - make_zero + - -fflags + - nobuffer + - -flags + - low_delay + - -strict + - experimental + - -fflags + - +genpts+discardcorrupt + - -r + - '3' + - -use_wallclock_as_timestamps + - '1' +``` + +```yaml + output_args: + record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an + clips: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an +``` + ### RTMP Cameras The input parameters need to be adjusted for RTMP cameras From 16effa3938ff274c2eba5984157a429445ce860d Mon Sep 17 00:00:00 2001 From: Whytey Date: Tue, 11 May 2021 17:34:23 +1000 Subject: [PATCH 10/29] Update cameras.md --- docs/docs/configuration/cameras.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index 8a8e54d1f..813222616 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -390,7 +390,7 @@ cameras: ### MJPEG Cameras -The input parameters need to be adjusted for MJPEG cameras +The input and output parameters need to be adjusted for MJPEG cameras ```yaml input_args: From d7a237677a5a774f0d531b930c989f7466db549f Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 11 May 2021 06:43:20 -0500 Subject: [PATCH 11/29] Update cameras.md --- docs/docs/configuration/cameras.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index 813222616..7d474bc6c 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -410,10 +410,12 @@ The input and output parameters need to be adjusted for MJPEG cameras - '1' ``` +Note that mjpeg cameras require encoding the video into h264 for clips, recording, and rtmp roles. This will use significantly more CPU than if the cameras supported h264 feeds directly. ```yaml output_args: record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an clips: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an + rtmp: -c:v libx264 -an -f flv ``` ### RTMP Cameras From ad85beea9135d9e64f52be64e0056d8c27f87127 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 11 May 2021 06:45:03 -0500 Subject: [PATCH 12/29] Update cameras.md --- docs/docs/configuration/cameras.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index 7d474bc6c..d63b812cb 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -405,7 +405,7 @@ The input and output parameters need to be adjusted for MJPEG cameras - -fflags - +genpts+discardcorrupt - -r - - '3' + - '3' # <---- adjust depending on your desired frame rate from the mjpeg image - -use_wallclock_as_timestamps - '1' ``` From 53bb69621c0fd4afc1c3ed75cc36137a01eaf260 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 May 2021 10:08:47 +0000 Subject: [PATCH 13/29] build(deps-dev): bump postcss from 8.2.2 to 8.2.10 in /web Bumps [postcss](https://github.com/postcss/postcss) from 8.2.2 to 8.2.10. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.2.2...8.2.10) Signed-off-by: dependabot[bot] --- web/package-lock.json | 24 ++++++++++++------------ web/package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 678a75720..b12e0bc76 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -8936,9 +8936,9 @@ } }, "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "version": "3.1.23", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", + "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", "dev": true }, "nanomatch": { @@ -9448,20 +9448,20 @@ "dev": true }, "postcss": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.2.tgz", - "integrity": "sha512-HM1NDNWLgglJPQQMNwvLxgH2KcrKZklKLi/xXYIOaqQB57p/pDWEJNS83PVICYsn1Dg/9C26TiejNr422/ePaQ==", + "version": "8.2.10", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.10.tgz", + "integrity": "sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw==", "dev": true, "requires": { - "colorette": "^1.2.1", - "nanoid": "^3.1.20", + "colorette": "^1.2.2", + "nanoid": "^3.1.22", "source-map": "^0.6.1" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", "dev": true } } diff --git a/web/package.json b/web/package.json index 68419e2ed..164eb4fb8 100644 --- a/web/package.json +++ b/web/package.json @@ -35,7 +35,7 @@ "eslint-plugin-jest": "^24.1.3", "eslint-plugin-testing-library": "^3.10.1", "jest": "^26.6.3", - "postcss": "^8.2.2", + "postcss": "^8.2.10", "postcss-cli": "^8.3.1", "prettier": "^2.2.1", "rimraf": "^3.0.2", From 00d6036788db6ddc0e31ae399f71b3a696c11ba8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:59:42 +0000 Subject: [PATCH 14/29] build(deps): bump lodash from 4.17.20 to 4.17.21 in /web Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21) Signed-off-by: dependabot[bot] --- web/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index b12e0bc76..0164aee13 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -8680,9 +8680,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash.difference": { From e3a8448a231a0ad6a8738127f0e72c45292d9ab5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:35:55 +0000 Subject: [PATCH 15/29] build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 in /web Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9. - [Release notes](https://github.com/npm/hosted-git-info/releases) - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md) - [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9) Signed-off-by: dependabot[bot] --- web/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 0164aee13..d513259f2 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -6544,9 +6544,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "html-encoding-sniffer": { From 6379f5cd5ea3ee87f775dac83535d5d107824670 Mon Sep 17 00:00:00 2001 From: Colin McCambridge Date: Wed, 14 Apr 2021 22:31:20 -0500 Subject: [PATCH 16/29] Update nvdec.md `covid` --> `cuvid` in example arguments. --- docs/docs/configuration/nvdec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/nvdec.md b/docs/docs/configuration/nvdec.md index 0037495f6..b2ec01a47 100644 --- a/docs/docs/configuration/nvdec.md +++ b/docs/docs/configuration/nvdec.md @@ -55,7 +55,7 @@ A list of supported codecs (you can use `ffmpeg -decoders | grep cuvid` in the c ``` For example, for H265 video (hevc), you'll select `hevc_cuvid`. Add -`-c:v hevc_covid` to your ffmpeg input arguments: +`-c:v hevc_cuvid` to your ffmpeg input arguments: ``` ffmpeg: From 3eb0021207410521d8d5b95a7b19681d985d06dd Mon Sep 17 00:00:00 2001 From: digiblur <3240875+digiblur@users.noreply.github.com> Date: Fri, 16 Apr 2021 21:34:45 -0500 Subject: [PATCH 17/29] Update detectors.md Add example for dual PCIe --- docs/docs/configuration/detectors.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/docs/configuration/detectors.md b/docs/docs/configuration/detectors.md index 3e59e6792..a7bbdab79 100644 --- a/docs/docs/configuration/detectors.md +++ b/docs/docs/configuration/detectors.md @@ -30,6 +30,18 @@ detectors: device: usb:1 ``` +Multiple PCIE/M.2 Corals: + +```yaml +detectors: + coral1: + type: edgetpu + device: pci:0 + coral2: + type: edgetpu + device: pci:1 +``` + Mixing Corals: ```yaml From ff2eba5b9fcde1c85805893de41d1e635f7a65da Mon Sep 17 00:00:00 2001 From: peyanski Date: Thu, 22 Apr 2021 10:26:04 +0300 Subject: [PATCH 18/29] Create howtos.md Community guides and How-To's section. Feel free to approve, move, edit or reject the changes. Either way keep up the good work, Kiril --- docs/docs/usage/howtos.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/docs/usage/howtos.md diff --git a/docs/docs/usage/howtos.md b/docs/docs/usage/howtos.md new file mode 100644 index 000000000..014842381 --- /dev/null +++ b/docs/docs/usage/howtos.md @@ -0,0 +1,15 @@ +--- +id: howtos +title: Community Guides: +sidebar_label: Community Guides +--- + +## Communitiy Guides/How-To's + +You can find here some of the communitiy videos and articles about Frigate: + +- Home Assistant Frigate integration for local image recognition (YouTube video) - [LINK](https://youtu.be/Q2UT78lFQpo) +- Home Assistant Frigate integration for local image recognition (Article) - [LINK](https://peyanski.com/home-assistant-frigate-integration/) +- Best Camera AI Person & Object Detection - How to Setup Frigate w/ Home Assistant (YouTube video) - [LINK](https://youtu.be/V8vGdoYO6-Y) + +If you find more good Frigate guides - let us know! From f667bd90662024d9c3ddba576997687ef83f3188 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Wed, 12 May 2021 06:55:33 -0500 Subject: [PATCH 19/29] Update howtos.md --- docs/docs/usage/howtos.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/usage/howtos.md b/docs/docs/usage/howtos.md index 014842381..65aa2362d 100644 --- a/docs/docs/usage/howtos.md +++ b/docs/docs/usage/howtos.md @@ -1,6 +1,6 @@ --- id: howtos -title: Community Guides: +title: Community Guides sidebar_label: Community Guides --- From bf1a542afbffe599bfe3491cc56dbec544a0d046 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Thu, 13 May 2021 07:41:10 -0500 Subject: [PATCH 20/29] Update howtos.md --- docs/docs/usage/howtos.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/usage/howtos.md b/docs/docs/usage/howtos.md index 65aa2362d..14cba960b 100644 --- a/docs/docs/usage/howtos.md +++ b/docs/docs/usage/howtos.md @@ -11,5 +11,6 @@ You can find here some of the communitiy videos and articles about Frigate: - Home Assistant Frigate integration for local image recognition (YouTube video) - [LINK](https://youtu.be/Q2UT78lFQpo) - Home Assistant Frigate integration for local image recognition (Article) - [LINK](https://peyanski.com/home-assistant-frigate-integration/) - Best Camera AI Person & Object Detection - How to Setup Frigate w/ Home Assistant (YouTube video) - [LINK](https://youtu.be/V8vGdoYO6-Y) +- EVEN MORE Free Local Object Detection with Home Assistant - Frigate Install (YouTube video) - [LINK](https://youtu.be/pqDCEZSVeRk) If you find more good Frigate guides - let us know! From d1931f249c47d0ab4ccb5c1457dddeeff22400df Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 14 May 2021 07:15:01 -0500 Subject: [PATCH 21/29] Update cameras.md --- docs/docs/configuration/cameras.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index d63b812cb..5501b7ff2 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -414,7 +414,7 @@ Note that mjpeg cameras require encoding the video into h264 for clips, recordin ```yaml output_args: record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an - clips: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an + clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an rtmp: -c:v libx264 -an -f flv ``` From 7060f220246669d01832a52d5d51a0773e8cedfc Mon Sep 17 00:00:00 2001 From: Chris Helming Date: Fri, 14 May 2021 12:23:02 -0400 Subject: [PATCH 22/29] docs: Update advanced.md to move `type:` to its own line (#1101) Type was stuck on the comment line. Added a line break to move it onto its own line so it's visible. --- docs/docs/configuration/advanced.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/configuration/advanced.md b/docs/docs/configuration/advanced.md index b03b438a4..e04c347fa 100644 --- a/docs/docs/configuration/advanced.md +++ b/docs/docs/configuration/advanced.md @@ -99,7 +99,8 @@ detectors: # Required: name of the detector coral: # Required: type of the detector - # Valid values are 'edgetpu' (requires device property below) and 'cpu'. type: edgetpu + # Valid values are 'edgetpu' (requires device property below) and 'cpu'. + type: edgetpu # Optional: device name as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api device: usb # Optional: num_threads value passed to the tflite.Interpreter (default: shown below) From c52782aa3f01ed4477b32bfad52fa64801eefb36 Mon Sep 17 00:00:00 2001 From: Chris Helming Date: Tue, 18 May 2021 21:40:43 -0400 Subject: [PATCH 23/29] Add `record` to configuration docs Record was missing from the configuration docs. Added it in based on the other options show and the info under 24/7 recordings in the cameras docs. --- docs/docs/configuration/index.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index b2c9fe5c0..6099df3b0 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -138,3 +138,19 @@ objects: # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below) threshold: 0.7 ``` + +### `record` + +Can be overridden at the camera level. 24/7 recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM/DD/HH//MM.SS.mp4`. These recordings are written directly from your camera stream without re-encoding and are available in HomeAssistant'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 +record: + # Optional: Enable recording + enabled: False + # Optional: Number of days to retain + retain_days: 30 +``` From e89697fab0621494c0b2c9047e26cba1af5a0906 Mon Sep 17 00:00:00 2001 From: Jason Hunter Date: Wed, 19 May 2021 00:08:41 -0400 Subject: [PATCH 24/29] update Home Assistant brand identity references --- docs/docs/configuration/advanced.md | 2 +- docs/docs/configuration/cameras.md | 57 +++++++++++++++-------------- docs/docs/configuration/index.md | 2 +- docs/docs/hardware.md | 8 ++-- docs/docs/index.md | 4 +- docs/docs/installation.md | 26 ++++++------- docs/docs/usage/api.md | 14 +++---- docs/docs/usage/home-assistant.md | 17 +++++---- docs/docs/usage/mqtt.md | 6 +-- 9 files changed, 69 insertions(+), 67 deletions(-) diff --git a/docs/docs/configuration/advanced.md b/docs/docs/configuration/advanced.md index e04c347fa..7efcfb680 100644 --- a/docs/docs/configuration/advanced.md +++ b/docs/docs/configuration/advanced.md @@ -81,7 +81,7 @@ environment_vars: ### `database` -Event and clip information is managed in a sqlite database at `/media/frigate/clips/frigate.db`. If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within HomeAssistant. +Event and clip information is managed in a sqlite database at `/media/frigate/clips/frigate.db`. If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within Home Assistant. If you are storing your clips on a network share (SMB, NFS, etc), you may get a `database is locked` error message on startup. You can customize the location of the database in the config if necessary. diff --git a/docs/docs/configuration/cameras.md b/docs/docs/configuration/cameras.md index 5501b7ff2..faf871f07 100644 --- a/docs/docs/configuration/cameras.md +++ b/docs/docs/configuration/cameras.md @@ -62,7 +62,7 @@ Example of a finished row corresponding to the below example image: ```yaml motion: - mask: '0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432' + mask: "0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432" ``` ![poly](/img/example-mask-poly.png) @@ -131,7 +131,7 @@ objects: 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. -These clips will not be playable in the web UI or in HomeAssistant's media browser unless your camera sends video as h264. +These clips 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. @@ -191,7 +191,7 @@ snapshots: ## 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//MM.SS.mp4`. These recordings are written directly from your camera stream without re-encoding and are available in HomeAssistant's media browser. Each camera supports a configurable retention policy in the config. +24/7 recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM/DD/HH//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. @@ -208,7 +208,7 @@ record: ## RTMP streams -Frigate can re-stream your video feed as a RTMP feed for other applications such as HomeAssistant to utilize it at `rtmp:///live/`. Port 1935 must be open. This allows you to use a video feed for detection in frigate and HomeAssistant 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. +Frigate can re-stream your video feed as a RTMP feed for other applications such as Home Assistant to utilize it at `rtmp:///live/`. 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. Some video feeds are not compatible with RTMP. If you are experiencing issues, check to make sure your camera feed is h264 with AAC audio. If your camera doesn't support a compatible format for RTMP, you can use the ffmpeg args to re-encode it on the fly at the expense of increased CPU utilization. @@ -393,29 +393,30 @@ cameras: The input and output parameters need to be adjusted for MJPEG cameras ```yaml - input_args: - - -avoid_negative_ts - - make_zero - - -fflags - - nobuffer - - -flags - - low_delay - - -strict - - experimental - - -fflags - - +genpts+discardcorrupt - - -r - - '3' # <---- adjust depending on your desired frame rate from the mjpeg image - - -use_wallclock_as_timestamps - - '1' +input_args: + - -avoid_negative_ts + - make_zero + - -fflags + - nobuffer + - -flags + - low_delay + - -strict + - experimental + - -fflags + - +genpts+discardcorrupt + - -r + - "3" # <---- adjust depending on your desired frame rate from the mjpeg image + - -use_wallclock_as_timestamps + - "1" ``` Note that mjpeg cameras require encoding the video into h264 for clips, recording, and rtmp roles. This will use significantly more CPU than if the cameras supported h264 feeds directly. + ```yaml - output_args: - record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an - clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an - rtmp: -c:v libx264 -an -f flv +output_args: + record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an + clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v libx264 -an + rtmp: -c:v libx264 -an -f flv ``` ### RTMP Cameras @@ -436,7 +437,7 @@ ffmpeg: - -fflags - +genpts+discardcorrupt - -use_wallclock_as_timestamps - - '1' + - "1" ``` ### Reolink 410/520 (possibly others) @@ -457,9 +458,9 @@ ffmpeg: - -fflags - +genpts+discardcorrupt - -rw_timeout - - '5000000' + - "5000000" - -use_wallclock_as_timestamps - - '1' + - "1" ``` ### Blue Iris RTSP Cameras @@ -480,7 +481,7 @@ ffmpeg: - -rtsp_transport - tcp - -stimeout - - '5000000' + - "5000000" - -use_wallclock_as_timestamps - - '1' + - "1" ``` diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 6099df3b0..bdffb16ef 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -141,7 +141,7 @@ objects: ### `record` -Can be overridden at the camera level. 24/7 recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM/DD/HH//MM.SS.mp4`. These recordings are written directly from your camera stream without re-encoding and are available in HomeAssistant's media browser. Each camera supports a configurable retention policy in the config. +Can be overridden at the camera level. 24/7 recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM/DD/HH//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. diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md index f94a6738d..5cf20df87 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -5,7 +5,7 @@ title: Recommended hardware ## Cameras -Cameras that output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and HomeAssistant. It is also helpful if your camera supports multiple substreams to allow different resolutions to be used for detection, streaming, clips, and recordings without re-encoding. +Cameras that output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and Home Assistant. It is also helpful if your camera supports multiple substreams to allow different resolutions to be used for detection, streaming, clips, and recordings without re-encoding. ## Computer @@ -24,6 +24,6 @@ Cameras that output H.264 video and AAC audio will offer the most compatibility Many people have powerful enough NAS devices or home servers to also run docker. There is a Unraid Community App. To install make sure you have the [community app plugin here](https://forums.unraid.net/topic/38582-plug-in-community-applications/). Then search for "Frigate" in the apps section within Unraid - you can see the online store [here](https://unraid.net/community/apps?q=frigate#r) -| Name | Inference Speed | Notes | -| ----------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------- | -| [M2 Coral Edge TPU](http://coral.ai) | 6.2ms | Install the Coral plugin from Unraid Community App Center [info here](https://forums.unraid.net/topic/98064-support-blakeblackshear-frigate/?do=findComment&comment=949789) | +| Name | Inference Speed | Notes | +| ------------------------------------ | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [M2 Coral Edge TPU](http://coral.ai) | 6.2ms | Install the Coral plugin from Unraid Community App Center [info here](https://forums.unraid.net/topic/98064-support-blakeblackshear-frigate/?do=findComment&comment=949789) | diff --git a/docs/docs/index.md b/docs/docs/index.md index e04290c15..0bee0be22 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -5,11 +5,11 @@ sidebar_label: Features slug: / --- -A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras. +A complete and local NVR designed for Home Assistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras. Use of a [Google Coral Accelerator](https://coral.ai/products/) is optional, but highly recommended. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead. -- Tight integration with HomeAssistant via a [custom component](https://github.com/blakeblackshear/frigate-hass-integration) +- Tight integration with Home Assistant via a [custom component](https://github.com/blakeblackshear/frigate-hass-integration) - Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary - Leverages multiprocessing heavily with an emphasis on realtime over processing every frame - Uses a very low overhead motion detection to determine where to run object detection diff --git a/docs/docs/installation.md b/docs/docs/installation.md index e0ca3fdb6..483fa8439 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -5,7 +5,7 @@ title: Installation Frigate is a Docker container that can be run on any Docker host including as a [HassOS Addon](https://www.home-assistant.io/addons/). See instructions below for installing the HassOS addon. -For HomeAssistant users, there is also a [custom component (aka integration)](https://github.com/blakeblackshear/frigate-hass-integration). This custom component adds tighter integration with HomeAssistant by automatically setting up camera entities, sensors, media browser for clips and recordings, and a public API to simplify notifications. +For Home Assistant users, there is also a [custom component (aka integration)](https://github.com/blakeblackshear/frigate-hass-integration). This custom component adds tighter integration with Home Assistant by automatically setting up camera entities, sensors, media browser for clips and recordings, and a public API to simplify notifications. Note that HassOS Addons and custom components are different things. If you are already running Frigate with Docker directly, you do not need the Addon since the Addon would run another instance of Frigate. @@ -24,17 +24,17 @@ HassOS users can install via the addon repository. Frigate requires an MQTT serv Make sure you choose the right image for your architecture: -|Arch|Image Name| -|-|-| -|amd64|blakeblackshear/frigate:stable-amd64| -|amd64nvidia|blakeblackshear/frigate:stable-amd64nvidia| -|armv7|blakeblackshear/frigate:stable-armv7| -|aarch64|blakeblackshear/frigate:stable-aarch64| +| Arch | Image Name | +| ----------- | ------------------------------------------ | +| amd64 | blakeblackshear/frigate:stable-amd64 | +| amd64nvidia | blakeblackshear/frigate:stable-amd64nvidia | +| armv7 | blakeblackshear/frigate:stable-armv7 | +| aarch64 | blakeblackshear/frigate:stable-aarch64 | It is recommended to run with docker-compose: ```yaml -version: '3.9' +version: "3.9" services: frigate: container_name: frigate @@ -53,10 +53,10 @@ services: tmpfs: size: 1000000000 ports: - - '5000:5000' - - '1935:1935' # RTMP feeds + - "5000:5000" + - "1935:1935" # RTMP feeds environment: - FRIGATE_RTSP_PASSWORD: 'password' + FRIGATE_RTSP_PASSWORD: "password" ``` If you can't use docker compose, you can run the container with something similar to this: @@ -87,7 +87,7 @@ You can calculate the necessary shm-size for each camera with the following form (width * height * 1.5 * 7 + 270480)/1048576 = ``` -The shm size cannot be set per container for HomeAssistant Addons. You must set `default-shm-size` in `/etc/docker/daemon.json` to increase the default shm size. This will increase the shm size for all of your docker containers. This may or may not cause issues with your setup. https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file +The shm size cannot be set per container for Home Assistant Addons. You must set `default-shm-size` in `/etc/docker/daemon.json` to increase the default shm size. This will increase the shm size for all of your docker containers. This may or may not cause issues with your setup. https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file ## Kubernetes @@ -120,5 +120,5 @@ lxc.cap.drop: ``` ### ESX -For details on running Frigate under ESX, see details [here](https://github.com/blakeblackshear/frigate/issues/305). +For details on running Frigate under ESX, see details [here](https://github.com/blakeblackshear/frigate/issues/305). diff --git a/docs/docs/usage/api.md b/docs/docs/usage/api.md index 25a52abd9..83ffbdf00 100644 --- a/docs/docs/usage/api.md +++ b/docs/docs/usage/api.md @@ -55,7 +55,7 @@ Example parameters: ### `/api/stats` -Contains some granular debug info that can be used for sensors in HomeAssistant. +Contains some granular debug info that can be used for sensors in Home Assistant. Sample response: @@ -125,26 +125,26 @@ Sample response: "total": 1000, "used": 700, "free": 300, - "mnt_type": "ext4", + "mnt_type": "ext4" }, "/media/frigate/recordings": { "total": 1000, "used": 700, "free": 300, - "mnt_type": "ext4", + "mnt_type": "ext4" }, "/tmp/cache": { "total": 256, "used": 100, "free": 156, - "mnt_type": "tmpfs", + "mnt_type": "tmpfs" }, "/dev/shm": { "total": 256, "used": 100, "free": 156, - "mnt_type": "tmpfs", - }, + "mnt_type": "tmpfs" + } } } } @@ -176,7 +176,7 @@ Events from the database. Accepts the following query string parameters: ### `/api/events/summary` -Returns summary data for events in the database. Used by the HomeAssistant integration. +Returns summary data for events in the database. Used by the Home Assistant integration. ### `/api/events/` diff --git a/docs/docs/usage/home-assistant.md b/docs/docs/usage/home-assistant.md index 09f9fbb26..45764e01a 100644 --- a/docs/docs/usage/home-assistant.md +++ b/docs/docs/usage/home-assistant.md @@ -4,7 +4,7 @@ title: Integration with Home Assistant sidebar_label: Home Assistant --- -The best way to integrate with HomeAssistant is to use the [official integration](https://github.com/blakeblackshear/frigate-hass-integration). When configuring the integration, you will be asked for the `Host` of your frigate instance. This value should be the url you use to access Frigate in the browser and will look like `http://:5000/`. If you are using HassOS with the addon, the host should be `http://ccab4aaf-frigate:5000` (or `http://ccab4aaf-frigate-beta:5000` if your are using the beta version of the addon). HomeAssistant needs access to port 5000 (api) and 1935 (rtmp) for all features. The integration will setup the following entities within HomeAssistant: +The best way to integrate with Home Assistant is to use the [official integration](https://github.com/blakeblackshear/frigate-hass-integration). When configuring the integration, you will be asked for the `Host` of your frigate instance. This value should be the url you use to access Frigate in the browser and will look like `http://:5000/`. If you are using HassOS with the addon, the host should be `http://ccab4aaf-frigate:5000` (or `http://ccab4aaf-frigate-beta:5000` if your are using the beta version of the addon). Home Assistant needs access to port 5000 (api) and 1935 (rtmp) for all features. The integration will setup the following entities within Home Assistant: ## Sensors: @@ -30,17 +30,19 @@ The best way to integrate with HomeAssistant is to use the [official integration Frigate publishes event information in the form of a change feed via MQTT. This allows lots of customization for notifications to meet your needs. Event changes are published with `before` and `after` information as shown [here](#frigateevents). Note that some people may not want to expose frigate to the web, so you can leverage the HA API that frigate custom_integration ties into (which is exposed to the web, and thus can be used for mobile notifications etc): -To load an image taken by frigate from HomeAssistants API see below: -``` +To load an image taken by frigate from Home Assistants API see below: + +``` https://HA_URL/api/frigate/notifications//thumbnail.jpg ``` -To load a video clip taken by frigate from HomeAssistants API : -``` +To load a video clip taken by frigate from Home Assistants API : + +``` https://HA_URL/api/frigate/notifications///clip.mp4 ``` -Here is a simple example of a notification automation of events which will update the existing notification for each change. This means the image you see in the notification will update as frigate finds a "better" image. +Here is a simple example of a notification automation of events which will update the existing notification for each change. This means the image you see in the notification will update as frigate finds a "better" image. ```yaml automation: @@ -57,7 +59,6 @@ automation: tag: '{{trigger.payload_json["after"]["id"]}}' ``` - ```yaml automation: - alias: When a person enters a zone named yard @@ -106,7 +107,7 @@ automation: action: - service: notify.mobile_app_pixel_3 data_template: - message: 'High confidence dog detection.' + message: "High confidence dog detection." data: image: "https://url.com/api/frigate/notifications/{{trigger.payload_json['after']['id']}}/thumbnail.jpg" tag: "{{trigger.payload_json['after']['id']}}" diff --git a/docs/docs/usage/mqtt.md b/docs/docs/usage/mqtt.md index 76963f7fe..83d92bbc2 100644 --- a/docs/docs/usage/mqtt.md +++ b/docs/docs/usage/mqtt.md @@ -7,17 +7,17 @@ These are the MQTT messages generated by Frigate. The default topic_prefix is `f ### `frigate/available` -Designed to be used as an availability topic with HomeAssistant. Possible message are: +Designed to be used as an availability topic with Home Assistant. Possible message are: "online": published when frigate is running (on startup) "offline": published right before frigate stops ### `frigate//` -Publishes the count of objects for the camera for use as a sensor in HomeAssistant. +Publishes the count of objects for the camera for use as a sensor in Home Assistant. ### `frigate//` -Publishes the count of objects for the zone for use as a sensor in HomeAssistant. +Publishes the count of objects for the zone for use as a sensor in Home Assistant. ### `frigate///snapshot` From e16dbcb67100612355655cdac90e6d62bd37b1a0 Mon Sep 17 00:00:00 2001 From: digiblur <3240875+digiblur@users.noreply.github.com> Date: Thu, 20 May 2021 09:01:25 -0500 Subject: [PATCH 25/29] docs(howto): Combined links, add authors, and cleaned up (#1124) --- docs/docs/usage/howtos.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/docs/usage/howtos.md b/docs/docs/usage/howtos.md index 14cba960b..9392caf0a 100644 --- a/docs/docs/usage/howtos.md +++ b/docs/docs/usage/howtos.md @@ -6,11 +6,6 @@ sidebar_label: Community Guides ## Communitiy Guides/How-To's -You can find here some of the communitiy videos and articles about Frigate: - -- Home Assistant Frigate integration for local image recognition (YouTube video) - [LINK](https://youtu.be/Q2UT78lFQpo) -- Home Assistant Frigate integration for local image recognition (Article) - [LINK](https://peyanski.com/home-assistant-frigate-integration/) -- Best Camera AI Person & Object Detection - How to Setup Frigate w/ Home Assistant (YouTube video) - [LINK](https://youtu.be/V8vGdoYO6-Y) -- EVEN MORE Free Local Object Detection with Home Assistant - Frigate Install (YouTube video) - [LINK](https://youtu.be/pqDCEZSVeRk) - -If you find more good Frigate guides - let us know! +- Best Camera AI Person & Object Detection - How to Setup Frigate w/ Home Assistant - digiblurDIY [YouTube](https://youtu.be/V8vGdoYO6-Y) - [Article](https://www.digiblur.com/2021/05/how-to-setup-frigate-home-assistant.html) +- Even More Free Local Object Detection with Home Assistant - Frigate Install - Everything Smart Home [YouTube](https://youtu.be/pqDCEZSVeRk) +- Home Assistant Frigate integration for local image recognition - KPeyanski [YouTube](https://youtu.be/Q2UT78lFQpo) - [Article](https://peyanski.com/home-assistant-frigate-integration/) From 09a4d6d030fec2f9e2d3e8be1fcb5560cd66414d Mon Sep 17 00:00:00 2001 From: Jon Gilmore <7232986+JonGilmore@users.noreply.github.com> Date: Wed, 26 May 2021 09:39:42 -0500 Subject: [PATCH 26/29] docs(typo): fix configuration typo (#1148) --- docs/docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/installation.md b/docs/docs/installation.md index 483fa8439..c3f916ad1 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -16,7 +16,7 @@ HassOS users can install via the addon repository. Frigate requires an MQTT serv 1. Navigate to Supervisor > Add-on Store > Repositories 2. Add https://github.com/blakeblackshear/frigate-hass-addons 3. Setup your network configuration in the `Configuration` tab if deisred -4. Create the file `frigate.yml` in your `config` directory with your detailed Frigate conifguration +4. Create the file `frigate.yml` in your `config` directory with your detailed Frigate configuration 5. Start the addon container 6. If you are using hardware acceleration for ffmpeg, you will need to disable "Protection mode" From 8ea75e67480c81b8e9a477c55676cf2d09ed2709 Mon Sep 17 00:00:00 2001 From: highaltidude <67246325+highaltidude@users.noreply.github.com> Date: Thu, 3 Jun 2021 15:22:21 -0500 Subject: [PATCH 27/29] Documentation Update-CPU Fall back corrected. --- docs/docs/configuration/optimizing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/optimizing.md b/docs/docs/configuration/optimizing.md index 1ac1aabf9..8700b2e52 100644 --- a/docs/docs/configuration/optimizing.md +++ b/docs/docs/configuration/optimizing.md @@ -3,7 +3,7 @@ id: optimizing title: Optimizing performance --- -- **Google Coral**: It is strongly recommended to use a Google Coral, but Frigate will fall back to CPU in the event one is not found. Offloading TensorFlow to the Google Coral is an order of magnitude faster and will reduce your CPU load dramatically. A $60 device will outperform $2000 CPU. Frigate should work with any supported Coral device from https://coral.ai +- **Google Coral**: It is strongly recommended to use a Google Coral, Frigate will no longer fall back to CPU in the event one is not found. Offloading TensorFlow to the Google Coral is an order of magnitude faster and will reduce your CPU load dramatically. A $60 device will outperform $2000 CPU. Frigate should work with any supported Coral device from https://coral.ai - **Resolution**: For the `detect` input, choose a camera resolution where the smallest object you want to detect barely fits inside a 300x300px square. The model used by Frigate is trained on 300x300px images, so you will get worse performance and no improvement in accuracy by using a larger resolution since Frigate resizes the area where it is looking for objects to 300x300 anyway. - **FPS**: 5 frames per second should be adequate. Higher frame rates will require more CPU usage without improving detections or accuracy. Reducing the frame rate on your camera will have the greatest improvement on system resources. - **Hardware Acceleration**: Make sure you configure the `hwaccel_args` for your hardware. They provide a significant reduction in CPU usage if they are available. From b2f469ad764d6b929a137bd4d4c4eb63f400a50c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 31 May 2021 01:50:02 +0000 Subject: [PATCH 28/29] build(deps): bump ws from 7.4.3 to 7.4.6 in /web Bumps [ws](https://github.com/websockets/ws) from 7.4.3 to 7.4.6. - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.4.3...7.4.6) Signed-off-by: dependabot[bot] --- web/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index d513259f2..61b6b760b 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -11767,9 +11767,9 @@ } }, "ws": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.3.tgz", - "integrity": "sha512-hr6vCR76GsossIRsr8OLR9acVVm1jyfEWvhbNjtgPOrfvAlKzvyeg/P6r8RuDjRyrcQoPQT7K0DGEPc7Ae6jzA==", + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", "dev": true }, "xml-name-validator": { From ec9b525a3cff5ea4156471d20955adb986f9e541 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 27 May 2021 00:49:02 +0000 Subject: [PATCH 29/29] build(deps): bump browserslist from 4.16.1 to 4.16.6 in /web Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.16.1 to 4.16.6. - [Release notes](https://github.com/browserslist/browserslist/releases) - [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md) - [Commits](https://github.com/browserslist/browserslist/compare/4.16.1...4.16.6) Signed-off-by: dependabot[bot] --- web/package-lock.json | 52 +++++++++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 61b6b760b..3a4c234c3 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -4658,16 +4658,42 @@ "dev": true }, "browserslist": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.1.tgz", - "integrity": "sha512-UXhDrwqsNcpTYJBTZsbGATDxZbiVDsx6UjpmRUmtnP10pr8wAYr5LgFoEFw9ixriQH2mv/NX2SfGzE/o8GndLA==", + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001173", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.634", + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", - "node-releases": "^1.1.69" + "node-releases": "^1.1.71" + }, + "dependencies": { + "caniuse-lite": { + "version": "1.0.30001230", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz", + "integrity": "sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==", + "dev": true + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.739", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.739.tgz", + "integrity": "sha512-+LPJVRsN7hGZ9EIUUiWCpO7l4E3qBYHNadazlucBfsXBbccDFNKUBAgzE68FnkWGJPwD/AfKhSzL+G+Iqb8A4A==", + "dev": true + }, + "node-releases": { + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", + "integrity": "sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==", + "dev": true + } } }, "bser": { @@ -5328,12 +5354,6 @@ "safer-buffer": "^2.1.0" } }, - "electron-to-chromium": { - "version": "1.3.641", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.641.tgz", - "integrity": "sha512-b0DLhsHSHESC1I+Nx6n4w4Lr61chMd3m/av1rZQhS2IXTzaS5BMM5N+ldWdMIlni9CITMRM09m8He4+YV/92TA==", - "dev": true - }, "emittery": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", @@ -9014,12 +9034,6 @@ "which": "^2.0.2" } }, - "node-releases": { - "version": "1.1.69", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.69.tgz", - "integrity": "sha512-DGIjo79VDEyAnRlfSqYTsy+yoHd2IOjJiKUozD2MV2D85Vso6Bug56mb9tT/fY5Urt0iqk01H7x+llAruDR2zA==", - "dev": true - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",