NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Merge remote-tracking branch 'origin/master' into dev
Blake Blackshear7238b3ea22c2
diff --cc docs/docs/configuration/cameras.mdindex 7af4c9be72,73f1991fc5..41b15d6376--- a/docs/docs/configuration/cameras.md+++ b/docs/docs/configuration/cameras.md@@@ -97,10 -97,11 +97,12 @@@ This list of working and non-working PT| Amcrest ASH21 | ✅ | ❌ | ONVIF service port: 80 || Amcrest IP4M-S2112EW-AI | ✅ | ❌ | FOV relative movement not supported. || Amcrest IP5M-1190EW | ✅ | ❌ | ONVIF Port: 80. FOV relative movement not supported. |+| Annke CZ504 | ✅ | ✅ | Annke support provide specific firmware ([V5.7.1 build 250227](https://github.com/pierrepinon/annke_cz504/raw/refs/heads/main/digicap_V5-7-1_build_250227.dav)) to fix issue with ONVIF "TranslationSpaceFov" || Ctronics PTZ | ✅ | ❌ | |-| Dahua | ✅ | ✅ | |+| Dahua | ✅ | ✅ | Some low-end Dahuas (lite series, among others) have been reported to not support autotracking || Dahua DH-SD2A500HB | ✅ | ❌ | |+ | Dahua DH-SD49825GB-HNR | ✅ | ✅ | |+ | Dahua DH-P5AE-PV | ❌ | ❌ | || Foscam R5 | ✅ | ❌ | || Hanwha XNP-6550RH | ✅ | ❌ | || Hikvision | ✅ | ❌ | Incomplete ONVIF support (MoveStatus won't update even on latest firmware) - reported with HWP-N4215IH-DE and DS-2DE3304W-DE, but likely others |diff --cc docs/docs/configuration/live.mdindex 9454aef3f3,8221703cac..35d401a679--- a/docs/docs/configuration/live.md+++ b/docs/docs/configuration/live.md@@@ -172,82 -145,6 +172,82 @@@ For devices that support two way talk,- Set up go2rtc with [WebRTC](#webrtc-extra-configuration).- Ensure you access Frigate via https (may require [opening port 8971](/frigate/installation/#ports)).- - For the Home Assistant Frigate card, [follow the docs](https://github.com/dermotduffy/frigate-hass-card?tab=readme-ov-file#using-2-way-audio) for the correct source.+ - For the Home Assistant Frigate card, [follow the docs](http://card.camera/#/usage/2-way-audio) for the correct source.To use the Reolink Doorbell with two way talk, you should use the [recommended Reolink configuration](/configuration/camera_specific#reolink-doorbell)++### Streaming options on camera group dashboards++Frigate provides a dialog in the Camera Group Edit pane with several options for streaming on a camera group's dashboard. These settings are _per device_ and are saved in your device's local storage.++- Stream selection using the `live -> streams` configuration option (see _Setting Streams For Live UI_ above)+- Streaming type:+ - _No streaming_: Camera images will only update once per minute and no live streaming will occur.+ - _Smart Streaming_ (default, recommended setting): Smart streaming will update your camera image once per minute when no detectable activity is occurring to conserve bandwidth and resources, since a static picture is the same as a streaming image with no motion or objects. When motion or objects are detected, the image seamlessly switches to a live stream.+ - _Continuous Streaming_: Camera image will always be a live stream when visible on the dashboard, even if no activity is being detected. Continuous streaming may cause high bandwidth usage and performance issues. **Use with caution.**+- _Compatibility mode_: Enable this option only if your camera's live stream is displaying color artifacts and has a diagonal line on the right side of the image. Before enabling this, try setting your camera's `detect` width and height to a standard aspect ratio (for example: 640x352 becomes 640x360, and 800x443 becomes 800x450, 2688x1520 becomes 2688x1512, etc). Depending on your browser and device, more than a few cameras in compatibility mode may not be supported, so only use this option if changing your config fails to resolve the color artifacts and diagonal line.++:::note++The default dashboard ("All Cameras") will always use:++- Smart Streaming, unless you've disabled the global Automatic Live View in Settings.+- The first entry set in your `streams` configuration, if defined.++Use a camera group if you want to change any of these settings from the defaults.++:::++### Disabling cameras++Cameras can be temporarily disabled through the Frigate UI and through [MQTT](/integrations/mqtt#frigatecamera_nameenabledset) to conserve system resources. When disabled, Frigate's ffmpeg processes are terminated — recording stops, object detection is paused, and the Live dashboard displays a blank image with a disabled message. Review items, tracked objects, and historical footage for disabled cameras can still be accessed via the UI.++:::note++Disabling a camera via the Frigate UI or MQTT is temporary and does not persist through restarts of Frigate.++:::++For restreamed cameras, go2rtc remains active but does not use system resources for decoding or processing unless there are active external consumers (such as the Advanced Camera Card in Home Assistant using a go2rtc source).++Note that disabling a camera through the config file (`enabled: False`) removes all related UI elements, including historical footage access. To retain access while disabling the camera, keep it enabled in the config and use the UI or MQTT to disable it temporarily.++## Live view FAQ++1. **Why don't I have audio in my Live view?**++ You must use go2rtc to hear audio in your live streams. If you have go2rtc already configured, you need to ensure your camera is sending PCMA/PCMU or AAC audio. If you can't change your camera's audio codec, you need to [transcode the audio](https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#source-ffmpeg) using go2rtc.++ Note that the low bandwidth mode player is a video-only stream. You should not expect to hear audio when in low bandwidth mode, even if you've set up go2rtc.++2. **Frigate shows that my live stream is in "low bandwidth mode". What does this mean?**++ Frigate intelligently selects the live streaming technology based on a number of factors (user-selected modes like two-way talk, camera settings, browser capabilities, available bandwidth) and prioritizes showing an actual up-to-date live view of your camera's stream as quickly as possible.++ When you have go2rtc configured, Live view initially attempts to load and play back your stream with a clearer, fluent stream technology (MSE). An initial timeout, a low bandwidth condition that would cause buffering of the stream, or decoding errors in the stream will cause Frigate to switch to the stream defined by the `detect` role, using the jsmpeg format. This is what the UI labels as "low bandwidth mode". On Live dashboards, the mode will automatically reset when smart streaming is configured and activity stops. Continuous streaming mode does not have an automatic reset mechanism, but you can use the _Reset_ option to force a reload of your stream.++ If you are using continuous streaming or you are loading more than a few high resolution streams at once on the dashboard, your browser may struggle to begin playback of your streams before the timeout. Frigate always prioritizes showing a live stream as quickly as possible, even if it is a lower quality jsmpeg stream. You can use the "Reset" link/button to try loading your high resolution stream again.++ If you are still experiencing Frigate falling back to low bandwidth mode, you may need to adjust your camera's settings per the [recommendations above](#camera_settings_recommendations).++3. **It doesn't seem like my cameras are streaming on the Live dashboard. Why?**++ On the default Live dashboard ("All Cameras"), your camera images will update once per minute when no detectable activity is occurring to conserve bandwidth and resources. As soon as any activity is detected, cameras seamlessly switch to a full-resolution live stream. If you want to customize this behavior, use a camera group.++4. **I see a strange diagonal line on my live view, but my recordings look fine. How can I fix it?**++ This is caused by incorrect dimensions set in your detect width or height (or incorrectly auto-detected), causing the jsmpeg player's rendering engine to display a slightly distorted image. You should enlarge the width and height of your `detect` resolution up to a standard aspect ratio (example: 640x352 becomes 640x360, and 800x443 becomes 800x450, 2688x1520 becomes 2688x1512, etc). If changing the resolution to match a standard (4:3, 16:9, or 32:9, etc) aspect ratio does not solve the issue, you can enable "compatibility mode" in your camera group dashboard's stream settings. Depending on your browser and device, more than a few cameras in compatibility mode may not be supported, so only use this option if changing your `detect` width and height fails to resolve the color artifacts and diagonal line.++5. **How does "smart streaming" work?**++ Because a static image of a scene looks exactly the same as a live stream with no motion or activity, smart streaming updates your camera images once per minute when no detectable activity is occurring to conserve bandwidth and resources. As soon as any activity (motion or object/audio detection) occurs, cameras seamlessly switch to a live stream.++ This static image is pulled from the stream defined in your config with the `detect` role. When activity is detected, images from the `detect` stream immediately begin updating at ~5 frames per second so you can see the activity until the live player is loaded and begins playing. This usually only takes a second or two. If the live player times out, buffers, or has streaming errors, the jsmpeg player is loaded and plays a video-only stream from the `detect` role. When activity ends, the players are destroyed and a static image is displayed until activity is detected again, and the process repeats.++ Smart streaming depends on having your camera's motion `threshold` and `contour_area` config values dialed in. Use the Motion Tuner in Settings in the UI to tune these values in real-time.++ This is Frigate's default and recommended setting because it results in a significant bandwidth savings, especially for high resolution cameras.++6. **I have unmuted some cameras on my dashboard, but I do not hear sound. Why?**++ If your camera is streaming (as indicated by a red dot in the upper right, or if it has been set to continuous streaming mode), your browser may be blocking audio until you interact with the page. This is an intentional browser limitation. See [this article](https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_availability). Many browsers have a whitelist feature to change this behavior.diff --cc docs/docs/frigate/hardware.mdindex 8ebacad43b,76cd78802b..6ed6e2a480--- a/docs/docs/frigate/hardware.md+++ b/docs/docs/frigate/hardware.md@@@ -128,16 -92,15 +141,29 @@@ The TensortRT detector is able to run oInference speeds will vary greatly depending on the GPU and the model used.`tiny` variants are faster than the equivalent non-tiny model, some known examples are below:- | Name | YOLOv7 Inference Time | YOLO-NAS Inference Time | RF-DETR Inference Time |-| Name | YoloV7 Inference Time | YOLO-NAS Inference Time |++<<<<<<< HEAD++| Name | YOLOv7 Inference Time | YOLO-NAS Inference Time | RF-DETR Inference Time |+| --------------- | --------------------- | ------------------------- | ------------------------- |- | GTX 1060 6GB | ~ 7 ms | | |- | GTX 1070 | ~ 6 ms | | |- | GTX 1660 SUPER | ~ 4 ms | | |- | RTX 3050 | 5 - 7 ms | 320: ~ 10 ms 640: ~ 16 ms | 336: ~ 16 ms 560: ~ 40 ms |- | RTX 3070 Mobile | ~ 5 ms | | |- | RTX 3070 | 4 - 6 ms | 320: ~ 6 ms 640: ~ 12 ms | 336: ~ 14 ms 560: ~ 36 ms |- | Quadro P400 2GB | 20 - 25 ms | | |- | Quadro P2000 | ~ 12 ms | | |++| GTX 1060 6GB | ~ 7 ms | | |++| GTX 1070 | ~ 6 ms | | |++| GTX 1660 SUPER | ~ 4 ms | | |++| RTX 3050 | 5 - 7 ms | 320: ~ 10 ms 640: ~ 16 ms | 336: ~ 16 ms 560: ~ 40 ms |++| RTX 3070 Mobile | ~ 5 ms | | |++| RTX 3070 | 4 - 6 ms | 320: ~ 6 ms 640: ~ 12 ms | 336: ~ 14 ms 560: ~ 36 ms |++| Quadro P400 2GB | 20 - 25 ms | | |++| Quadro P2000 | ~ 12 ms | | |++=======++| Name | YoloV7 Inference Time | YOLO-NAS Inference Time |+ | --------------- | ---------------------- | --------------------------- |+ | Quadro P2000 | ~ 12 ms | |-| Quadro P400 2GB | 20 - 25 ms | |-| RTX 3070 Mobile | ~ 5 ms | |-| RTX 3050 | 5 - 7 ms | 320: ~ 10 ms 640: ~ 16 ms |-| GTX 1660 SUPER | ~ 4 ms | |-| GTX 1070 | ~ 6 ms | |-| GTX 1060 6GB | ~ 7 ms | |++| Quadro P400 2GB | 20 - 25 ms | |++| RTX 3070 Mobile | ~ 5 ms | |++| RTX 3050 | 5 - 7 ms | 320: ~ 10 ms 640: ~ 16 ms |++| GTX 1660 SUPER | ~ 4 ms | |++| GTX 1070 | ~ 6 ms | |++| GTX 1060 6GB | ~ 7 ms | |++++> > > > > > > origin/master### AMD GPUsdiff --cc docs/docusaurus.config.tsindex 5e80e844ae,bdc8e7fa79..c0295faae6--- a/docs/docusaurus.config.ts+++ b/docs/docusaurus.config.ts@@@ -17,20 -22,23 +22,32 @@@ const config: Config =markdown: {mermaid: true,},+ i18n: {+ defaultLocale: 'en',+ locales: ['en'],+ localeConfigs: {+ en: {+ label: 'English',+ }+ },+ },themeConfig: {- algolia: {- appId: 'WIURGBNBPY',- apiKey: 'd02cc0a6a61178b25da550212925226b',- indexName: 'frigate',+ announcementBar: {+ id: 'frigate_plus',+ content: `+ <span style="margin-right: 8px; display: inline-block; animation: pulse 2s infinite;">🚀</span>+ Get more relevant and accurate detections with Frigate+ models.+ <a style="margin-left: 12px; padding: 3px 10px; background: #94d2bd; color: #001219; text-decoration: none; border-radius: 4px; font-weight: 500; " target="_blank" rel="noopener noreferrer" href="https://frigate.video/plus/">Learn more</a>+ <span style="margin-left: 8px; display: inline-block; animation: pulse 2s infinite;">✨</span>+ <style>+ @keyframes pulse {+ 0%, 100% { transform: scale(1); }+ 50% { transform: scale(1.1); }+ }+ </style>`,+ backgroundColor: '#005f73',+ textColor: '#e0fbfc',+ isCloseable: false,},docs: {sidebar: {@@@ -76,35 -112,25 +121,35 @@@},items: [{- to: '/',- activeBasePath: 'docs',- label: 'Docs',- position: 'left',+ to: "/",+ activeBasePath: "docs",+ label: "Docs",+ position: "left",},{- href: 'https://frigate.video',- label: 'Website',- position: 'right',+ href: "https://frigate.video",+ label: "Website",+ position: "right",},{- href: 'http://demo.frigate.video',- label: 'Demo',- position: 'right',+ href: "http://demo.frigate.video",+ label: "Demo",+ position: "right",},{- href: "https://github.com/blakeblackshear/frigate",- label: "GitHub",- position: "right",+ type: 'localeDropdown',+ position: 'right',+ dropdownItemsAfter: [+ {+ label: '简体中文(社区翻译)',+ href: 'https://docs.frigate-cn.video',+ }+ ]+ },+ {+ href: 'https://github.com/blakeblackshear/frigate',+ label: 'GitHub',+ position: 'right',},],},diff --cc docs/package-lock.jsonindex 6ddff08e59,89de28af4b..3f00a21f97--- a/docs/package-lock.json+++ b/docs/package-lock.json@@@ -8,10 -8,11 +8,11 @@@"name": "docs","version": "0.0.0","dependencies": {- "@docusaurus/core": "^3.6.3",+ "@docusaurus/core": "^3.7.0","@docusaurus/plugin-content-docs": "^3.6.3",- "@docusaurus/preset-classic": "^3.6.3",+ "@docusaurus/preset-classic": "^3.7.0","@docusaurus/theme-mermaid": "^3.6.3",+ "@inkeep/docusaurus": "^2.0.16","@mdx-js/react": "^3.1.0","clsx": "^2.1.1","docusaurus-plugin-openapi-docs": "^4.3.1",@@@ -3920,40 -4057,12 +3921,46 @@@"react-hook-form": "^7.0.0"}},+ "node_modules/@iconify/types": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",+ "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",+ "license": "MIT"+ },+ "node_modules/@iconify/utils": {+ "version": "2.3.0",+ "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-2.3.0.tgz",+ "integrity": "sha512-GmQ78prtwYW6EtzXRU1rY+KwOKfz32PD7iJh6Iyqw68GiKuoZ2A6pRtzWONz5VQJbp50mEjXh/7NkumtrAgRKA==",+ "license": "MIT",+ "dependencies": {+ "@antfu/install-pkg": "^1.0.0",+ "@antfu/utils": "^8.1.0",+ "@iconify/types": "^2.0.0",+ "debug": "^4.4.0",+ "globals": "^15.14.0",+ "kolorist": "^1.8.0",+ "local-pkg": "^1.0.0",+ "mlly": "^1.7.4"+ }+ },+ "node_modules/@iconify/utils/node_modules/globals": {+ "version": "15.15.0",+ "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz",+ "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==",+ "license": "MIT",+ "engines": {+ "node": ">=18"+ },+ "funding": {+ "url": "https://github.com/sponsors/sindresorhus"+ }+ },+ "node_modules/@inkeep/docusaurus": {+ "version": "2.0.16",+ "resolved": "https://registry.npmjs.org/@inkeep/docusaurus/-/docusaurus-2.0.16.tgz",+ "integrity": "sha512-dQhjlvFnl3CVr0gWeJ/V/qLnDy1XYrCfkdVSa2D3gJTxI9/vOf9639Y1aPxTxO88DiXuW9CertLrZLB6SoJ2yg==",+ "license": "MIT"+ },"node_modules/@isaacs/cliui": {"version": "8.0.2","resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",diff --cc docs/package.jsonindex 43fc7a6441,82b4230d11..4cc8a7eacb--- a/docs/package.json+++ b/docs/package.json@@@ -17,10 -17,11 +17,11 @@@"write-heading-ids": "docusaurus write-heading-ids"},"dependencies": {- "@docusaurus/core": "^3.6.3",+ "@docusaurus/core": "^3.7.0","@docusaurus/plugin-content-docs": "^3.6.3",- "@docusaurus/preset-classic": "^3.6.3",+ "@docusaurus/preset-classic": "^3.7.0","@docusaurus/theme-mermaid": "^3.6.3",+ "@inkeep/docusaurus": "^2.0.16","@mdx-js/react": "^3.1.0","clsx": "^2.1.1","docusaurus-plugin-openapi-docs": "^4.3.1",diff --cc docs/sidebars.tsindex 52b36beabc,7007bb0f01..545fc9731a--- a/docs/sidebars.ts+++ b/docs/sidebars.ts@@@ -5,28 -5,29 +5,29 @@@ import frigateHttpApiSidebar from "./doconst sidebars: SidebarsConfig = {docs: {Frigate: [- "frigate/index",- "frigate/hardware",- "frigate/installation",- "frigate/camera_setup",- "frigate/video_pipeline",- "frigate/glossary",+ 'frigate/index',+ 'frigate/hardware',+ 'frigate/installation',+ 'frigate/updating',+ 'frigate/camera_setup',+ 'frigate/video_pipeline',+ 'frigate/glossary',],Guides: [- 'guides/getting_started',- 'guides/configuring_go2rtc',- 'guides/ha_notifications',- 'guides/ha_network_storage',- 'guides/reverse_proxy',+ "guides/getting_started",+ "guides/configuring_go2rtc",+ "guides/ha_notifications",+ "guides/ha_network_storage",+ "guides/reverse_proxy",],Configuration: {- 'Configuration Files': [- 'configuration/index',- 'configuration/reference',+ "Configuration Files": [+ "configuration/index",+ "configuration/reference",{- type: 'link',- label: 'Go2RTC Configuration Reference',- href: 'https://github.com/AlexxIT/go2rtc/tree/v1.9.2#configuration',+ type: "link",+ label: "Go2RTC Configuration Reference",+ href: "https://github.com/AlexxIT/go2rtc/tree/v1.9.9#configuration",} as PropSidebarItemLink,],Detectors: [@@@ -87,25 -82,23 +88,25 @@@},items: frigateHttpApiSidebar,},- 'integrations/mqtt',- 'integrations/third_party_extensions',+ "integrations/mqtt",+ "configuration/metrics",+ "integrations/third_party_extensions",],- "Frigate+": [- "plus/index",- "plus/first_model",- "plus/improving_model",- "plus/faq",+ 'Frigate+': [+ 'plus/index',+ 'plus/annotating',+ 'plus/first_model',+ 'plus/faq',],Troubleshooting: [- 'troubleshooting/faqs',- 'troubleshooting/recordings',- 'troubleshooting/edgetpu',+ "troubleshooting/faqs",+ "troubleshooting/recordings",+ "troubleshooting/gpu",+ "troubleshooting/edgetpu",],Development: [- 'development/contributing',- 'development/contributing-boards',+ "development/contributing",+ "development/contributing-boards",],},};