Compare commits

..
Author SHA1 Message Date
Josh Hawkins e2aa0ee29a remove path data from thumbnail payloads 2026-08-23 11:12:46 -05:00
Josh Hawkins 9c7e32d0d6 don't let a slow websocket client block publishers 2026-08-23 11:10:05 -05:00
Nicolas MowenandGitHub ad79e666eb API Consistency / Security Fixes (#24057)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
* Make review user read status consistent with other APIs

* Validate URLs for web push endpoint

* Validate the role for a custom viewer, rate limit password changing

* Cleanup
2026-08-22 11:08:24 -05:00
Nicolas MowenandGitHub fc79aeab5e Fix review summary report analysis creation to be scoped for users with full camera access only (#24056)
* Fix review summary analysis

* Add ability to scope based on full camera access
2026-08-22 11:06:01 -05:00
b1cdf1f76b Translated using Weblate (Norwegian Bokmål)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (50 of 50 strings)

Translated using Weblate (Norwegian Bokmål)

Currently translated at 100.0% (1295 of 1295 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: OverTheHillsAndFarAway <prosjektx@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-camera/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/nb_NO/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/nb_NO/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-camera
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
fc319f4223 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Chinese (Simplified Han script))

Currently translated at 100.0% (108 of 108 strings)

Co-authored-by: GuoQing Liu <842607283@qq.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/zh_Hans/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/zh_Hans/
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-replay
2026-08-21 14:34:47 -05:00
bf35e90bc8 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 100.0% (1295 of 1295 strings)

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Chinese (Traditional Han script))

Currently translated at 100.0% (129 of 129 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Ryan He <koungho@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/zh_Hant/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/zh_Hant/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/objects/zh_Hant/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/zh_Hant/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/zh_Hant/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/objects
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
07abbd2c0a Translated using Weblate (Khmer (Central))
Currently translated at 0.5% (1 of 185 strings)

Translated using Weblate (Khmer (Central))

Currently translated at 98.7% (1279 of 1295 strings)

Translated using Weblate (Khmer (Central))

Currently translated at 0.8% (2 of 239 strings)

Translated using Weblate (Khmer (Central))

Currently translated at 100.0% (6 of 6 strings)

Translated using Weblate (Khmer (Central))

Currently translated at 100.0% (2 of 2 strings)

Translated using Weblate (Khmer (Central))

Currently translated at 100.0% (2 of 2 strings)

Translated using Weblate (Khmer (Central))

Currently translated at 1.3% (1 of 74 strings)

Translated using Weblate (Khmer (Central))

Currently translated at 100.0% (10 of 10 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: SeyhaLite <sok123230@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/km/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-auth/km/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-filter/km/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-icons/km/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-input/km/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-recording/km/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/km/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/km/
Translation: Frigate NVR/common
Translation: Frigate NVR/components-auth
Translation: Frigate NVR/components-filter
Translation: Frigate NVR/components-icons
Translation: Frigate NVR/components-input
Translation: Frigate NVR/views-recording
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
2026-08-21 14:34:47 -05:00
694d162071 Translated using Weblate (Korean)
Currently translated at 90.6% (117 of 129 strings)

Translated using Weblate (Korean)

Currently translated at 85.2% (426 of 500 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: ydavelee <ydavelee.work@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/ko/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/objects/ko/
Translation: Frigate NVR/audio
Translation: Frigate NVR/objects
2026-08-21 14:34:47 -05:00
b1d9676638 Translated using Weblate (Persian)
Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (141 of 141 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (185 of 185 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (1295 of 1295 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (86 of 86 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (86 of 86 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (74 of 74 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (239 of 239 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (500 of 500 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (45 of 45 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (62 of 62 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (54 of 54 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (23 of 23 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (25 of 25 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (141 of 141 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (185 of 185 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (1295 of 1295 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (100 of 100 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (86 of 86 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (145 of 145 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (129 of 129 strings)

Translated using Weblate (Persian)

Currently translated at 100.0% (239 of 239 strings)

Translated using Weblate (Persian)

Currently translated at 65.1% (71 of 109 strings)

Co-authored-by: Abdollah Ashjaa <abdollah.ashjaa@gmail.com>
Co-authored-by: Amir reza Irani ali poor <amir1376irani@yahoo.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: حمید ملک محمدی <hmmftg@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-filter/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-groups/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-validation/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/objects/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-chat/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-classificationmodel/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-explore/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-exports/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-live/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-motionsearch/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/fa/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/fa/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/Config - Groups
Translation: Frigate NVR/Config - Validation
Translation: Frigate NVR/audio
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/components-filter
Translation: Frigate NVR/objects
Translation: Frigate NVR/views-chat
Translation: Frigate NVR/views-classificationmodel
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-explore
Translation: Frigate NVR/views-exports
Translation: Frigate NVR/views-live
Translation: Frigate NVR/views-motionSearch
Translation: Frigate NVR/views-replay
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
2026-08-21 14:34:47 -05:00
891a0df879 Translated using Weblate (Swedish)
Currently translated at 63.2% (506 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 62.2% (498 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Swedish)

Currently translated at 51.7% (670 of 1295 strings)

Translated using Weblate (Swedish)

Currently translated at 51.7% (670 of 1295 strings)

Translated using Weblate (Swedish)

Currently translated at 90.0% (54 of 60 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (239 of 239 strings)

Translated using Weblate (Swedish)

Currently translated at 46.8% (375 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 95.7% (454 of 474 strings)

Translated using Weblate (Swedish)

Currently translated at 37.8% (303 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 69.8% (331 of 474 strings)

Translated using Weblate (Swedish)

Currently translated at 36.7% (294 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 67.9% (322 of 474 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Swedish)

Currently translated at 33.7% (270 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 62.2% (295 of 474 strings)

Translated using Weblate (Swedish)

Currently translated at 26.1% (209 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 48.7% (231 of 474 strings)

Translated using Weblate (Swedish)

Currently translated at 13.3% (107 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 26.1% (124 of 474 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (26 of 26 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (109 of 109 strings)

Translated using Weblate (Swedish)

Currently translated at 100.0% (501 of 501 strings)

Translated using Weblate (Swedish)

Currently translated at 99.8% (500 of 501 strings)

Translated using Weblate (Swedish)

Currently translated at 2.3% (19 of 800 strings)

Translated using Weblate (Swedish)

Currently translated at 5.6% (27 of 474 strings)

Co-authored-by: Fredrik B <fredrik@brannvall.nu>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Kristian Johansson <knmjohansson@gmail.com>
Co-authored-by: Mats Lojander <mats@lojander.com>
Co-authored-by: Samuel Åkesson <samuel.akesson@bolmso.se>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-player/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/sv/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/sv/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/audio
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/components-player
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
2d5845c770 Translated using Weblate (French)
Currently translated at 18.1% (145 of 800 strings)

Translated using Weblate (French)

Currently translated at 54.4% (258 of 474 strings)

Translated using Weblate (French)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (French)

Currently translated at 16.2% (130 of 800 strings)

Translated using Weblate (French)

Currently translated at 51.4% (244 of 474 strings)

Translated using Weblate (French)

Currently translated at 100.0% (26 of 26 strings)

Translated using Weblate (French)

Currently translated at 100.0% (109 of 109 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jérémy MRPX <jeremy.marpaux@gmail.com>
Co-authored-by: Nathan Signouret <nathan.signouret@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-player/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/fr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/fr/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/components-player
2026-08-21 14:34:47 -05:00
612a7cb871 Translated using Weblate (Spanish)
Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (141 of 141 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (145 of 145 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (109 of 109 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (129 of 129 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (1295 of 1295 strings)

Co-authored-by: David Cambra <cambrafontan.david@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/objects/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-classificationmodel/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-explore/es/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/es/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/objects
Translation: Frigate NVR/views-classificationmodel
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-explore
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
101e5d0e98 Translated using Weblate (Nepali)
Currently translated at 4.8% (24 of 500 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Milan Thapa <hello@milanthapa.me>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/ne/
Translation: Frigate NVR/audio
2026-08-21 14:34:47 -05:00
bcff29c35b Translated using Weblate (Dutch)
Currently translated at 75.8% (47 of 62 strings)

Translated using Weblate (Dutch)

Currently translated at 97.0% (776 of 800 strings)

Translated using Weblate (Dutch)

Currently translated at 84.8% (402 of 474 strings)

Translated using Weblate (Dutch)

Currently translated at 86.8% (1125 of 1295 strings)

Translated using Weblate (Dutch)

Currently translated at 83.5% (396 of 474 strings)

Translated using Weblate (Dutch)

Currently translated at 96.7% (774 of 800 strings)

Translated using Weblate (Dutch)

Currently translated at 83.1% (394 of 474 strings)

Translated using Weblate (Dutch)

Currently translated at 100.0% (109 of 109 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Patrick <github@derr.eu>
Co-authored-by: Wim Timmer <wc.timmer@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-motionsearch/nl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/nl/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-motionSearch
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
467404b410 Translated using Weblate (Arabic)
Currently translated at 38.5% (193 of 501 strings)

Translated using Weblate (Arabic)

Currently translated at 38.5% (193 of 501 strings)

Co-authored-by: Ahmed Marzouq <ahmed.marzouq.co@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Modar Soos <modarsoos@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/ar/
Translation: Frigate NVR/audio
2026-08-21 14:34:47 -05:00
767597967e Translated using Weblate (Italian)
Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (185 of 185 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (1295 of 1295 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (74 of 74 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (100 of 100 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (145 of 145 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (239 of 239 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (141 of 141 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (185 of 185 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (1295 of 1295 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (145 of 145 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (109 of 109 strings)

Translated using Weblate (Italian)

Currently translated at 99.2% (140 of 141 strings)

Translated using Weblate (Italian)

Currently translated at 94.0% (174 of 185 strings)

Translated using Weblate (Italian)

Currently translated at 99.6% (1291 of 1295 strings)

Translated using Weblate (Italian)

Currently translated at 98.5% (66 of 67 strings)

Translated using Weblate (Italian)

Currently translated at 99.7% (798 of 800 strings)

Translated using Weblate (Italian)

Currently translated at 92.9% (131 of 141 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (129 of 129 strings)

Translated using Weblate (Italian)

Currently translated at 85.5% (684 of 800 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Italian)

Currently translated at 74.1% (593 of 800 strings)

Translated using Weblate (Italian)

Currently translated at 99.7% (473 of 474 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (109 of 109 strings)

Co-authored-by: Filippo-riccardo Franzin (filippo franzin) <filric01@gmail.com>
Co-authored-by: Gringo <ita.translations@tiscali.it>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Nton <arlatalpa@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-filter/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/objects/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-classificationmodel/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-explore/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-live/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/it/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/it/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/components-filter
Translation: Frigate NVR/objects
Translation: Frigate NVR/views-classificationmodel
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-explore
Translation: Frigate NVR/views-live
Translation: Frigate NVR/views-replay
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
2026-08-21 14:34:47 -05:00
57b8206e86 Translated using Weblate (Malay)
Currently translated at 9.7% (49 of 501 strings)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Added translation using Weblate (Malay)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Nazri Masnan <nazrimasnan@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/ms/
Translation: Frigate NVR/audio
2026-08-21 14:34:47 -05:00
86b828f52e Translated using Weblate (Polish)
Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Polish)

Currently translated at 17.7% (142 of 800 strings)

Translated using Weblate (Polish)

Currently translated at 17.7% (142 of 800 strings)

Translated using Weblate (Polish)

Currently translated at 46.6% (221 of 474 strings)

Translated using Weblate (Polish)

Currently translated at 46.6% (221 of 474 strings)

Co-authored-by: Artur <wy66m6xm@anonaddy.me>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: J P <jpoloczek24@gmail.com>
Co-authored-by: Kamil Cybułka <kamil.cybulka@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/pl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/pl/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/pl/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/views-events
2026-08-21 14:34:47 -05:00
4b39edf983 Translated using Weblate (Hungarian)
Currently translated at 51.3% (56 of 109 strings)

Translated using Weblate (Hungarian)

Currently translated at 100.0% (50 of 50 strings)

Translated using Weblate (Hungarian)

Currently translated at 91.2% (457 of 501 strings)

Translated using Weblate (Hungarian)

Currently translated at 100.0% (239 of 239 strings)

Co-authored-by: Dávid Attila Balog <davidattilabalog@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/hu/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/hu/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-camera/hu/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/hu/
Translation: Frigate NVR/audio
Translation: Frigate NVR/common
Translation: Frigate NVR/components-camera
Translation: Frigate NVR/components-dialog
2026-08-21 14:34:47 -05:00
06f5229567 Translated using Weblate (Catalan)
Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (Catalan)

Currently translated at 100.0% (108 of 108 strings)

Co-authored-by: Eduardo Pastor Fernández <123eduardoneko123@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/ca/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/ca/
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-replay
2026-08-21 14:34:47 -05:00
90a33f504c Translated using Weblate (Japanese)
Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (Japanese)

Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (Japanese)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Japanese)

Currently translated at 100.0% (1295 of 1295 strings)

Translated using Weblate (Japanese)

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (Japanese)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Japanese)

Currently translated at 100.0% (129 of 129 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: alpha <alphamob0@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/objects/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/ja/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/ja/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/objects
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-replay
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
d0766aa3ee Translated using Weblate (Ukrainian)
Currently translated at 2.8% (23 of 800 strings)

Translated using Weblate (Ukrainian)

Currently translated at 6.9% (33 of 474 strings)

Translated using Weblate (Ukrainian)

Currently translated at 100.0% (26 of 26 strings)

Translated using Weblate (Ukrainian)

Currently translated at 99.0% (108 of 109 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Nikita Mikheiev <nikimihiki@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/uk/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-player/uk/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/uk/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/uk/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/components-player
2026-08-21 14:34:47 -05:00
76a5e00bd5 Translated using Weblate (Romanian)
Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (Romanian)

Currently translated at 100.0% (108 of 108 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: lukasig <lukasig@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/ro/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/ro/
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-replay
2026-08-21 14:34:47 -05:00
b914f32cea Translated using Weblate (Russian)
Currently translated at 100.0% (45 of 45 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (62 of 62 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (54 of 54 strings)

Translated using Weblate (Russian)

Currently translated at 99.7% (798 of 800 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (185 of 185 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (1295 of 1295 strings)

Translated using Weblate (Russian)

Currently translated at 100.0% (86 of 86 strings)

Translated using Weblate (Russian)

Currently translated at 64.1% (43 of 67 strings)

Translated using Weblate (Russian)

Currently translated at 77.7% (84 of 108 strings)

Co-authored-by: Artem Vladimirov <artyomka71@mail.ru>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-chat/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-exports/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-motionsearch/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/ru/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-system/ru/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-chat
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-exports
Translation: Frigate NVR/views-motionSearch
Translation: Frigate NVR/views-replay
Translation: Frigate NVR/views-settings
Translation: Frigate NVR/views-system
2026-08-21 14:34:47 -05:00
48acba8dab Translated using Weblate (Estonian)
Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (Estonian)

Currently translated at 100.0% (108 of 108 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Priit Jõerüüt <jrthwlate@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/et/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/et/
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/views-replay
2026-08-21 14:34:47 -05:00
c605295483 Translated using Weblate (Danish)
Currently translated at 4.8% (3 of 62 strings)

Translated using Weblate (Danish)

Currently translated at 0.1% (1 of 800 strings)

Translated using Weblate (Danish)

Currently translated at 85.1% (120 of 141 strings)

Translated using Weblate (Danish)

Currently translated at 1.6% (21 of 1295 strings)

Translated using Weblate (Danish)

Currently translated at 26.8% (18 of 67 strings)

Translated using Weblate (Danish)

Currently translated at 68.6% (344 of 501 strings)

Co-authored-by: Anders Fosgerau <afosgerau@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/audio/da/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/da/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-classificationmodel/da/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/da/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-motionsearch/da/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/da/
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/audio
Translation: Frigate NVR/views-classificationmodel
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-motionSearch
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
ad35bf49f7 Translated using Weblate (German)
Currently translated at 100.0% (46 of 46 strings)

Translated using Weblate (German)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (German)

Currently translated at 100.0% (800 of 800 strings)

Translated using Weblate (German)

Currently translated at 100.0% (474 of 474 strings)

Translated using Weblate (German)

Currently translated at 100.0% (141 of 141 strings)

Translated using Weblate (German)

Currently translated at 100.0% (1295 of 1295 strings)

Translated using Weblate (German)

Currently translated at 100.0% (129 of 129 strings)

Translated using Weblate (German)

Currently translated at 100.0% (60 of 60 strings)

Translated using Weblate (German)

Currently translated at 100.0% (67 of 67 strings)

Translated using Weblate (German)

Currently translated at 100.0% (109 of 109 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Viktor Stier <viktor-stier@gmx.de>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/objects/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-classificationmodel/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-events/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-replay/de/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/de/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/objects
Translation: Frigate NVR/views-classificationmodel
Translation: Frigate NVR/views-events
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-replay
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
000bf4a03b Translated using Weblate (Portuguese (Brazil))
Currently translated at 47.2% (378 of 800 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 85.0% (403 of 474 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 46.8% (375 of 800 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 83.7% (397 of 474 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 46.5% (372 of 800 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 80.8% (383 of 474 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 46.3% (371 of 800 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 79.7% (378 of 474 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 44.3% (355 of 800 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 76.1% (361 of 474 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 44.2% (354 of 800 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 75.9% (360 of 474 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 43.2% (346 of 800 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 74.2% (352 of 474 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (108 of 108 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Klenner Martins Barros <klenne.al@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/pt_BR/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
2026-08-21 14:34:47 -05:00
d2982bd144 Added translation using Weblate (Tamil)
Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Added translation using Weblate (Tamil)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: தமிழ்நேரம் <tamilneram247@gmail.com>
2026-08-21 14:34:47 -05:00
2cd53ccdfe Translated using Weblate (Lithuanian)
Currently translated at 100.0% (23 of 23 strings)

Translated using Weblate (Lithuanian)

Currently translated at 0.7% (6 of 800 strings)

Translated using Weblate (Lithuanian)

Currently translated at 1.2% (6 of 474 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (141 of 141 strings)

Translated using Weblate (Lithuanian)

Currently translated at 42.4% (550 of 1295 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (6 of 6 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (100 of 100 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (60 of 60 strings)

Translated using Weblate (Lithuanian)

Currently translated at 58.1% (50 of 86 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (145 of 145 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (26 of 26 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (108 of 108 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (129 of 129 strings)

Translated using Weblate (Lithuanian)

Currently translated at 100.0% (239 of 239 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: MaBeniu <runnerm@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/common/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-player/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-validation/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/objects/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-classificationmodel/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-explore/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-exports/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-facelibrary/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-live/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-recording/lt/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/views-settings/lt/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/Config - Validation
Translation: Frigate NVR/common
Translation: Frigate NVR/components-dialog
Translation: Frigate NVR/components-player
Translation: Frigate NVR/objects
Translation: Frigate NVR/views-classificationmodel
Translation: Frigate NVR/views-explore
Translation: Frigate NVR/views-exports
Translation: Frigate NVR/views-facelibrary
Translation: Frigate NVR/views-live
Translation: Frigate NVR/views-recording
Translation: Frigate NVR/views-settings
2026-08-21 14:34:47 -05:00
2ba33e227c Translated using Weblate (Turkish)
Currently translated at 7.8% (63 of 800 strings)

Translated using Weblate (Turkish)

Currently translated at 14.9% (71 of 474 strings)

Translated using Weblate (Turkish)

Currently translated at 98.1% (106 of 108 strings)

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: furkan geldi <furkangeldi@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/components-dialog/tr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-cameras/tr/
Translate-URL: https://hosted.weblate.org/projects/frigate-nvr/config-global/tr/
Translation: Frigate NVR/Config - Cameras
Translation: Frigate NVR/Config - Global
Translation: Frigate NVR/components-dialog
2026-08-21 14:34:47 -05:00
Josh HawkinsandGitHub 036bae4ea9 Return a specific 404 when starting a debug replay with no recordings in range (#24024)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
2026-08-18 10:08:52 -05:00
dtigheandGitHub 8384a8c5b3 Fix Gemini tool calling on 3.6+ by using documented function response role (#24013)
Gemini 3.6 and newer reject role="function" on the function response
Content with 400 INVALID_ARGUMENT, breaking any chat query that triggers
a tool call. The tool call itself succeeds; only the hand-back to the
model fails, and because the error surfaces mid-stream the request still
returns HTTP 200, so it is easy to miss.

Google's function calling documentation specifies role="user" for
returning function results:

    contents.append(response.candidates[0].content)
    contents.append(types.Content(role="user", parts=[function_response_part]))

https://ai.google.dev/gemini-api/docs/generate-content/function-calling

Verified with my local setup.
2026-08-18 08:16:47 -06:00
Josh HawkinsandGitHub 77fc2ce174 Miscellaneous fixes (0.18 beta) (#24016)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
* fix classification drawer closing instead of scrolling when list is long on mobile

* add qwen3.8 to genai docs

* add titles to more clearly separate model types
2026-08-18 07:01:22 -06:00
Josh HawkinsandGitHub 8425a76558 Miscellaneous fixes (0.18 beta) (#23993)
CI / AMD64 Build (push) Canceled after 0s
CI / ARM Build (push) Canceled after 0s
CI / Jetson Jetpack 6 (push) Canceled after 0s
CI / AMD64 Extra Build (push) Canceled after 0s
CI / ARM Extra Build (push) Canceled after 0s
CI / Synaptics Build (push) Canceled after 0s
CI / Assemble and push default build (push) Canceled after 0s
* subscribe to add in webpush

* add docs for detector cpu usage

* rebuild notification camera access when a camera is added at runtime

* document how frigate shows CPU usage metrics

* add faq about version key in config
2026-08-16 12:39:28 -06:00
276 changed files with 11594 additions and 2617 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
default_target: local
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
VERSION = 0.19.0
VERSION = 0.18.0
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
BOARDS= #Initialized empty
+5 -11
View File
@@ -251,17 +251,11 @@ birdseye:
# Optional: Encoding quality of the mpeg1 feed (default: shown below)
# 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
quality: 8
# Optional: Activity types that include cameras in Birdseye (default: shown below)
# Multiple activity types can be enabled at the same time.
mode:
# Optional: All cameras are included always (default: shown below)
continuous: False
# Optional: Cameras are included if motion was detected in the last 30 seconds (default: shown below)
motion: False
# Optional: Cameras are included if they have had an active tracked object within the last 30 seconds (default: shown below)
objects: True
# Optional: Cameras are included while they have a stationary tracked object (default: shown below)
stationary_objects: False
# Optional: Mode of the view. Available options are: objects, motion, and continuous
# objects - cameras are included if they have had a tracked object within the last 30 seconds
# motion - cameras are included if motion was detected in the last 30 seconds
# continuous - all cameras are included always
mode: objects
# Optional: Threshold for camera activity to stop showing camera (default: shown below)
inactivity_threshold: 30
# Optional: Configure the birdseye layout
+13 -17
View File
@@ -18,14 +18,13 @@ Each camera tile in Birdseye is composed from the frames of the stream assigned
## Birdseye Behavior
### Birdseye Activity Types
### Birdseye Modes
Birdseye offers independent activity types that control when cameras are shown. Multiple activity types can be enabled together.
Birdseye offers different modes to customize which cameras show under which circumstances.
- **continuous:** The camera is always included
- **motion:** The camera is included when motion was detected within the last 30 seconds
- **objects:** The camera is included when an active object was tracked within the last 30 seconds
- **stationary_objects:** The camera is included while a stationary object is tracked
- **continuous:** All cameras are always included
- **motion:** Cameras that have detected motion within the last 30 seconds are included
- **objects:** Cameras that have tracked an active object within the last 30 seconds are included
### Custom Birdseye Icon
@@ -40,30 +39,27 @@ To include a camera in Birdseye view only for specific circumstances, or exclude
**Global settings:** Navigate to <NavPath path="Settings > System > Birdseye" /> to configure the default Birdseye behavior for all cameras.
**Per-camera overrides:** Navigate to <NavPath path="Settings > Camera configuration > Birdseye" /> to override the activity types or disable Birdseye for a specific camera.
**Per-camera overrides:** Navigate to <NavPath path="Settings > Camera configuration > Birdseye" /> to override the mode or disable Birdseye for a specific camera.
| Field | Description |
| ---------------------- | ---------------------------------------------------------- |
| **Enable Birdseye** | Whether this camera appears in Birdseye view |
| **Activity types** | Conditions that determine when to show the camera |
| Field | Description |
| ------------------- | ------------------------------------------------------------- |
| **Enable Birdseye** | Whether this camera appears in Birdseye view |
| **Tracking mode** | When to show the camera: `continuous`, `motion`, or `objects` |
</TabItem>
<TabItem value="yaml">
```yaml {8-11,13-15}
```yaml {8-10,12-14}
# Include all cameras by default in Birdseye view
birdseye:
enabled: True
mode:
continuous: True
mode: continuous
cameras:
front:
# Only include the "front" camera in Birdseye view when objects are detected
birdseye:
mode:
continuous: False
objects: True
mode: objects
back:
# Exclude the "back" camera from Birdseye view
birdseye:
+9 -5
View File
@@ -59,13 +59,17 @@ Running Generative AI models on CPU is not recommended, as high inference times
### Recommended Local Models
#### Vision models
You must use a vision-capable model with Frigate. The following models are recommended for local deployment of the `descriptions` and `chat` roles:
| Model | Notes |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `qwen3-vl` | Strong visual and situational understanding, enhanced ability to identify smaller objects and interactions with object. |
| `qwen3.6` | Strong situational understanding, but missing DeepStack from qwen3-vl leading to worse performance for identifying objects in people's hand and other small details. |
| `gemma4` | Strong situational understanding, sometimes resorts to more vague terms like 'interacts' instead of assigning a specific action. |
| Model | Notes |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `qwen3-vl` | Strong visual and situational understanding, enhanced ability to identify smaller objects and interactions with object. |
| `qwen3.6`/`qwen3.8` | Strong situational understanding, but missing DeepStack from qwen3-vl leading to worse performance for identifying objects in people's hand and other small details. |
| `gemma4` | Strong situational understanding, sometimes resorts to more vague terms like 'interacts' instead of assigning a specific action. |
#### Embedding models
The `embeddings` role needs a different kind of model. Text queries are matched against the stored image embeddings, so the model must be trained to place images and text into the same vector space. A chat or description model will still return vectors when asked, but those vectors are not trained for retrieval and text searches will return poor matches with no error to indicate why.
+8 -9
View File
@@ -555,21 +555,20 @@ Topic with current state of Birdseye for a camera. Published values are `ON` and
### `frigate/<camera_name>/birdseye_mode/set`
Topic to set the Birdseye activity types for a camera. Send one uppercase activity type or combine multiple types with commas, for example `MOTION,OBJECTS,STATIONARY_OBJECTS`.
Topic to set Birdseye mode for a camera. Birdseye offers different modes to customize under which circumstances the camera is shown.
_Note: Changing the value from `CONTINUOUS` to non-continuous activity types will take up to 30 seconds for
_Note: Changing the value from `CONTINUOUS` -> `MOTION | OBJECTS` will take up to 30 seconds for
the camera to be removed from the view._
| Command | Description |
| -------------------- | ---------------------------------------------------------------- |
| `CONTINUOUS` | Always included |
| `MOTION` | Shown if motion was detected within the last 30 seconds |
| `OBJECTS` | Shown if an active object was tracked within the last 30 seconds |
| `STATIONARY_OBJECTS` | Shown while a stationary object is tracked |
| Command | Description |
| ------------ | ----------------------------------------------------------------- |
| `CONTINUOUS` | Always included |
| `MOTION` | Show when detected motion within the last 30 seconds are included |
| `OBJECTS` | Shown if an active object tracked within the last 30 seconds |
### `frigate/<camera_name>/birdseye_mode/state`
Topic with the current Birdseye activity types for a camera. Multiple enabled types are published as a comma-separated value in the order `OBJECTS`, `MOTION`, `STATIONARY_OBJECTS`, `CONTINUOUS`.
Topic with current state of the Birdseye mode for a camera. Published values are `CONTINUOUS`, `MOTION`, `OBJECTS`.
### `frigate/<camera_name>/notifications/set`
+41 -1
View File
@@ -3,7 +3,31 @@ id: cpu
title: High CPU Usage
---
High CPU usage can impact Frigate's performance and responsiveness. This guide outlines the most effective configuration changes to help reduce CPU consumption and optimize resource usage.
High CPU usage can impact Frigate's performance and responsiveness. This guide explains how to interpret the CPU values Frigate reports and outlines the most effective configuration changes to help reduce CPU consumption and optimize resource usage.
## Understanding Frigate's Reported CPU Usage
Frigate's CPU percentages often look much higher than what the host reports. Usually both numbers are correct and are simply measured against different denominators, so confirm you actually have a problem before tuning anything.
### Per-process values are relative to a single core
The values Frigate reports for FFmpeg, capture, detect, detector, and other processes follow the same convention as `top`: 100% means one CPU core is fully saturated, not that the whole system is saturated. A multithreaded process such as FFmpeg can legitimately report well over 100%.
Host and hypervisor tools instead report a percentage of the machine's total capacity across all cores. This includes `docker stats`, the `htop` summary, the Proxmox summary graph, the Unraid dashboard, Synology Resource Monitor, and Home Assistant's system monitor sensors. To reconcile the two:
```
host percentage ≈ (sum of Frigate's process percentages) / (number of cores)
```
On a 4 core system, an FFmpeg process reporting 100% is consuming one quarter of the machine, so the host will show roughly 25 to 30% once the remaining Frigate processes are included. That same 100% on a 16 core system is about 6%. Frigate's own warning thresholds use the per-core convention as well, so an FFmpeg process is flagged at 20% of a single core, not 20% of the system.
### Instantaneous samples and averages measure different things
Frigate collects stats every 15 seconds, and the `cpu` value covers only the interval since the previous collection. The `cpu_average` value in the stats API and MQTT payload is the average across the entire life of the process, and it is what the high CPU usage warnings are based on. Host dashboards generally plot data averaged over a longer window, so a single Frigate sample can show a peak that a host graph never displays. A process that has just started, such as FFmpeg after a camera reconnect, reports 0 until it has been sampled twice.
### The system-wide value depends on what the container can see
The system CPU value is read from `/proc/stat`. Under Docker that file belongs to the host, so the value covers the entire machine including workloads unrelated to Frigate, and it will not match `docker stats` for the Frigate container. Under an LXC container, lxcfs virtualizes `/proc/stat` and the value reflects only the cores assigned to the container. In a virtual machine, the guest sees only its assigned vCPUs while the hypervisor divides by every physical thread on the node, so guest and host percentages will not agree even when both are accurate.
## 1. Hardware Acceleration for Video Decoding
@@ -72,3 +96,19 @@ The model you use significantly impacts detector performance. Frigate provides d
- Larger models (640x640): Slower inference, can sometimes have higher accuracy on very large objects that take up a majority of the frame.
For more detail on picking the right size, see [Choosing a model size](../configuration/object_detectors.md#choosing-a-model-size).
## 3. Reducing Detector CPU Usage
**Priority: High**
The **Detector CPU Usage** metric measures the CPU spent converting frames into the tensor format the model expects and post-processing the model's output. It does not include inference, so this value can be high even when you've configured a GPU, NPU, or Coral for object detection.
This metric scales with how many detections per second Frigate runs and how expensive each one is to prepare. Tuning [motion detection](../configuration/motion_detection) is usually the first recommendation to reduce the number of detections. Additionally, you can:
- **Lower `detect -> fps`.** 5 is the recommended value for nearly all cameras. Running at 10 doubles the frames eligible for detection and is one of the largest contributors to this metric.
- **Use a 320x320 model.** A 640x640 model has 4 times as many pixels to transpose, convert, and copy on every inference.
- **Prefer a model that takes integer input.** Models configured with `input_dtype: float` require each frame to be converted to float32 and normalized on the CPU first. Models taking `int` input, such as the tflite models used by the Edge TPU, skip that step.
- **Do not match the detect resolution to the model resolution.** The detect stream should match your camera's aspect ratio, for example `1280x720`, not the model's input size. Frigate crops and scales regions of motion itself, so an oversized detect stream only adds work.
- **Tune stationary object behavior.** Objects that never settle into a stationary state are re-detected continuously. Raising `detect -> stationary -> interval` reduces how often detection runs on objects that are already parked. See [stationary objects](../configuration/stationary_objects).
Adding [more detector instances](#multiple-detector-instances) spreads this work across more CPU cores, but does not reduce the total CPU used.
+6
View File
@@ -133,6 +133,12 @@ cameras:
height: 720
```
### What is the `version` key in my config file?
`version` records the config format that your config was last migrated to. On startup Frigate compares it against the format the running version expects, and if it is older it copies your config to `/config/backup_config.yaml`, rewrites it to the new format, and updates `version` as the final step. A config with no `version` key is assumed to predate 0.14 and is migrated from there.
Frigate manages this key for you, so do not set or edit it. Raising it makes Frigate skip migrations your config still needs, and lowering it re-runs migrations against config that has already been converted. Either can leave you with a config that no longer validates.
### Why does Frigate keep creating new tracked objects for my parked car?
Stationary tracking is designed to _prevent_ this: a parked car should remain a single tracked object rather than generating new ones. If you're repeatedly getting new tracked objects for the same car, it's likely that Frigate is losing the object and re-detecting it as a new one.
+8 -44
View File
@@ -2308,15 +2308,15 @@ paths:
$ref: '#/components/schemas/HTTPValidationError'
security:
- frigateUserAuth: []
x-required-role: any
description: '**Access:** Any authenticated user.'
x-required-role: camera
description: '**Access:** Authenticated user with access to the referenced camera.'
/review/summarize/start/{start_ts}/end/{end_ts}:
post:
tags:
- Review
summary: Generate Review Summary
description: |-
**Access:** Admin role required.
**Access:** Authenticated user with access to all cameras.
Use GenAI to summarize review items over a period of time.
operationId:
@@ -2347,8 +2347,8 @@ paths:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- frigateAdminAuth: []
x-required-role: admin
- frigateUserAuth: []
x-required-role: all_cameras
/:
get:
tags:
@@ -2946,44 +2946,6 @@ paths:
- frigateUserAuth: []
x-required-role: any
description: '**Access:** Any authenticated user.'
/categorized_object_names:
get:
tags:
- App
summary: Get known object names by object type
description: |-
**Access:** Any authenticated user.
Returns the sub labels and attributes this install can attach,
grouped by object type. Unlike /sub_labels, which reflects what has already been
detected, this reads the config and model files, so it covers recognized face
names, named license plates, custom object classification categories, and the
detector attributes of tracked objects.
operationId: categorized_object_names_categorized_object_names_get
parameters:
- name: object_type
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Object Type
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- frigateUserAuth: []
x-required-role: any
/audio_labels:
get:
tags:
@@ -7147,7 +7109,9 @@ paths:
schema:
$ref: '#/components/schemas/DebugReplayStartResponse'
'400':
description: Invalid camera, time range, or no recordings
description: Invalid camera or time range
'404':
description: No recordings in the requested time range
'409':
description: A replay session is already active
'422':
-23
View File
@@ -71,7 +71,6 @@ from frigate.util.config import (
find_config_file,
redact_credential,
)
from frigate.util.object_names import get_categorized_object_names
from frigate.util.schema import get_config_schema
from frigate.util.services import (
get_nvidia_driver_info,
@@ -1314,28 +1313,6 @@ def get_sub_labels(
return JSONResponse(content=sub_labels)
@router.get(
"/categorized_object_names",
dependencies=[Depends(allow_any_authenticated())],
summary="Get known object names by object type",
description="""Returns the sub labels and attributes this install can attach,
grouped by object type. Unlike /sub_labels, which reflects what has already been
detected, this reads the config and model files, so it covers recognized face
names, named license plates, custom object classification categories, and the
detector attributes of tracked objects.""",
)
def categorized_object_names(
request: Request,
object_type: str | None = None,
allowed_cameras: list[str] = Depends(get_allowed_cameras_for_filter),
):
return JSONResponse(
content=get_categorized_object_names(
request.app.frigate_config, allowed_cameras, object_type
)
)
@router.get("/audio_labels", dependencies=[Depends(allow_any_authenticated())])
def get_audio_labels():
labels = load_labels("/audio-labelmap.txt", prefill=521)
+25 -4
View File
@@ -83,7 +83,6 @@ def require_admin_by_default():
"/nvinfo",
"/labels",
"/sub_labels",
"/categorized_object_names",
"/plus/models",
"/recognized_license_plates",
"/timeline",
@@ -972,6 +971,7 @@ def delete_user(request: Request, username: str):
summary="Update user password",
description="Updates a user's password. Users can only change their own password unless they have admin role. Requires the current password to verify identity for non-admin users. Password must be at least 12 characters long. If user changes their own password, a new JWT cookie is automatically issued.",
)
@limiter.limit(limit_value=rateLimiter.get_limit)
async def update_password(
request: Request,
username: str,
@@ -985,10 +985,11 @@ async def update_password(
current_username = current_user.get("username")
current_role = current_user.get("role")
# viewers can only change their own password
if current_role == "viewer" and current_username != username:
# Only admins may target another account. This has to cover every non-admin
# role rather than just viewer, since custom roles are arbitrary names
if current_role != "admin" and current_username != username:
raise HTTPException(
status_code=403, detail="Viewers can only update their own password"
status_code=403, detail="Users can only update their own password"
)
HASH_ITERATIONS = request.app.frigate_config.auth.hash_iterations
@@ -1252,3 +1253,23 @@ async def get_allowed_cameras_for_filter(request: Request):
all_camera_names = set(request.app.frigate_config.cameras.keys())
roles_dict = request.app.frigate_config.auth.roles
return User.get_allowed_cameras(role, roles_dict, all_camera_names)
async def require_full_camera_access(
request: Request,
allowed_cameras: list[str] = Depends(get_allowed_cameras_for_filter),
):
"""Dependency for endpoints returning data that spans every camera.
Some responses cannot be meaningfully scoped to a subset of cameras, so
rather than filter them the endpoint is limited to callers who can already
see every camera. Admin and viewer always qualify; a custom role qualifies
only when its camera list covers all configured cameras.
"""
all_camera_names = set(request.app.frigate_config.cameras.keys())
if not all_camera_names.issubset(allowed_cameras):
raise HTTPException(
status_code=403,
detail="Access to all cameras is required for this endpoint",
)
+4 -27
View File
@@ -50,7 +50,6 @@ from frigate.jobs.vlm_watch import (
stop_vlm_watch_job,
)
from frigate.models import Event
from frigate.util.object_names import get_categorized_object_names
logger = logging.getLogger(__name__)
@@ -540,11 +539,6 @@ async def execute_tool(
if tool_name == "search_objects":
return await _execute_search_objects(request, arguments, allowed_cameras)
if tool_name == "get_categorized_object_names":
return JSONResponse(
content=_execute_get_categorized_object_names(request, allowed_cameras)
)
if tool_name == "find_similar_objects":
result = await _execute_find_similar_objects(
request, arguments, allowed_cameras
@@ -597,7 +591,7 @@ async def _execute_get_live_context(
try:
frame_processor = request.app.detected_frames_processor
camera_state = frame_processor.get_camera_state(camera)
camera_state = frame_processor.camera_states.get(camera)
if camera_state is None:
return {
@@ -661,7 +655,7 @@ async def _get_live_frame_image_url(
return None
try:
frame_processor = request.app.detected_frames_processor
if frame_processor.get_camera_state(camera) is None:
if camera not in frame_processor.camera_states:
return None
frame = frame_processor.get_current_frame(camera, {})
if frame is None:
@@ -723,21 +717,6 @@ async def _execute_set_camera_state(
return {"success": True, "camera": camera, "feature": feature, "value": value}
def _execute_get_categorized_object_names(
request: Request,
allowed_cameras: list[str],
) -> dict[str, Any]:
names = get_categorized_object_names(request.app.frigate_config, allowed_cameras)
if not names:
return {
"names": {},
"message": "No names configured; search by label or semantic_query.",
}
return {"names": names}
async def _execute_tool_internal(
tool_name: str,
arguments: dict[str, Any],
@@ -762,8 +741,6 @@ async def _execute_tool_internal(
except (json.JSONDecodeError, AttributeError) as e:
logger.warning(f"Failed to extract tool result: {e}")
return {"error": "Failed to parse tool result"}
elif tool_name == "get_categorized_object_names":
return _execute_get_categorized_object_names(request, allowed_cameras)
elif tool_name == "find_similar_objects":
return await _execute_find_similar_objects(request, arguments, allowed_cameras)
elif tool_name == "set_camera_state":
@@ -796,8 +773,8 @@ async def _execute_tool_internal(
else:
logger.error(
"Tool call failed: unknown tool %r. Expected one of: search_objects, find_similar_objects, "
"get_categorized_object_names, get_live_context, start_camera_watch, stop_camera_watch, "
"get_profile_status, get_recap. Arguments received: %s",
"get_live_context, start_camera_watch, stop_camera_watch, get_profile_status, get_recap. "
"Arguments received: %s",
tool_name,
json.dumps(arguments),
)
+11 -1
View File
@@ -13,6 +13,7 @@ from frigate.api.auth import require_role
from frigate.api.defs.tags import Tags
from frigate.jobs.debug_replay import (
ExportDebugReplaySource,
NoRecordingsError,
RecordingDebugReplaySource,
start_debug_replay_job,
)
@@ -74,7 +75,8 @@ class DebugReplayStopResponse(BaseModel):
response_model=DebugReplayStartResponse,
status_code=202,
responses={
400: {"description": "Invalid camera, time range, or no recordings"},
400: {"description": "Invalid camera or time range"},
404: {"description": "No recordings in the requested time range"},
409: {"description": "A replay session is already active"},
},
dependencies=[Depends(require_role(["admin"]))],
@@ -113,6 +115,14 @@ async def start_debug_replay(request: Request, body: DebugReplayStartBody):
},
status_code=409,
)
except NoRecordingsError:
return JSONResponse(
content={
"success": False,
"message": "No recordings found in the selected time range",
},
status_code=404,
)
except ValueError:
logger.exception("Rejected debug replay start request")
return JSONResponse(
+2 -2
View File
@@ -1313,7 +1313,7 @@ async def set_sub_label(
if request.app.detected_frames_processor:
tracked_obj: TrackedObject = None
for state in request.app.detected_frames_processor.get_camera_states():
for state in request.app.detected_frames_processor.camera_states.values():
tracked_obj = state.tracked_objects.get(event_id)
if tracked_obj is not None:
@@ -1372,7 +1372,7 @@ async def set_plate(
if request.app.detected_frames_processor:
tracked_obj: TrackedObject = None
for state in request.app.detected_frames_processor.get_camera_states():
for state in request.app.detected_frames_processor.camera_states.values():
tracked_obj = state.tracked_objects.get(event_id)
if tracked_obj is not None:
+7 -7
View File
@@ -575,11 +575,11 @@ async def vod_ts(
Recordings.start_time,
)
.where(
Recordings.camera == camera_name,
Recordings.start_time >= start_ts - MAX_SEGMENT_DURATION,
Recordings.start_time <= end_ts,
Recordings.end_time >= start_ts,
Recordings.start_time.between(start_ts, end_ts)
| Recordings.end_time.between(start_ts, end_ts)
| ((start_ts > Recordings.start_time) & (end_ts < Recordings.end_time))
)
.where(Recordings.camera == camera_name)
.order_by(Recordings.start_time.asc())
.iterator()
)
@@ -820,7 +820,7 @@ async def event_snapshot(
# see if the object is currently being tracked
try:
camera_states: list[CameraState] = (
request.app.detected_frames_processor.get_camera_states()
request.app.detected_frames_processor.camera_states.values()
)
for camera_state in camera_states:
if event_id in camera_state.tracked_objects:
@@ -898,7 +898,7 @@ async def event_thumbnail(
if thumbnail_bytes is None:
# see if the object is currently being tracked
try:
camera_states = request.app.detected_frames_processor.get_camera_states()
camera_states = request.app.detected_frames_processor.camera_states.values()
for camera_state in camera_states:
if event_id in camera_state.tracked_objects:
tracked_obj = camera_state.tracked_objects.get(event_id)
@@ -1127,7 +1127,7 @@ async def event_snapshot_clean(request: Request, event_id: str, download: bool =
# see if the object is currently being tracked
try:
camera_states = (
request.app.detected_frames_processor.get_camera_states()
request.app.detected_frames_processor.camera_states.values()
)
for camera_state in camera_states:
if event_id in camera_state.tracked_objects:
+102
View File
@@ -1,8 +1,10 @@
"""Notification apis."""
import ipaddress
import logging
import os
from typing import Any
from urllib.parse import urlparse
from cryptography.hazmat.primitives import serialization
from fastapi import APIRouter, Depends, Request
@@ -19,6 +21,95 @@ logger = logging.getLogger(__name__)
router = APIRouter(tags=[Tags.notifications])
# Push endpoints are opaque URLs but stay well under this in practice
MAX_ENDPOINT_LENGTH = 2048
# Suffixes that only ever resolve on the local network
INTERNAL_HOST_SUFFIXES = (".local", ".localdomain", ".internal", ".home.arpa")
def _validate_push_endpoint(endpoint: Any) -> str | None:
"""Return a reason the endpoint is unusable, or None when it is valid.
Subscriptions are issued by the browser vendor's push service, so a valid
endpoint is always a public https URL. Anything else is either a broken
registration or an attempt to aim the notification sender somewhere it
should not reach.
"""
if not isinstance(endpoint, str) or not endpoint:
return "endpoint must be a url"
if len(endpoint) > MAX_ENDPOINT_LENGTH:
return "endpoint is too long"
try:
parsed = urlparse(endpoint)
port = parsed.port
except ValueError:
return "endpoint is not a valid url"
if parsed.scheme != "https":
return "endpoint must use https"
if parsed.username or parsed.password:
return "endpoint must not include credentials"
if port is not None and port != 443:
return "endpoint must use the default https port"
hostname = parsed.hostname
if not hostname:
return "endpoint must include a hostname"
try:
address = ipaddress.ip_address(hostname)
except ValueError:
address = None
if address is not None:
# A push service is never reachable at an address only this network can
# route, so anything non-global is a misconfiguration at best
if not address.is_global:
return "endpoint must not use a private address"
elif hostname == "localhost" or "." not in hostname:
return "endpoint must use a fully qualified hostname"
elif hostname.endswith(INTERNAL_HOST_SUFFIXES):
return "endpoint must not use an internal hostname"
# The subscription token lives in the path, and webpush.py assumes there is
# a separator after the host when it builds the VAPID audience
if len(parsed.path) <= 1:
return "endpoint must include a subscription path"
return None
def _validate_subscription(sub: Any) -> str | None:
"""Return a reason the subscription is unusable, or None when it is valid."""
if not isinstance(sub, dict):
return "subscription must be an object"
reason = _validate_push_endpoint(sub.get("endpoint"))
if reason:
return reason
keys = sub.get("keys")
if not isinstance(keys, dict):
return "subscription must include keys"
# WebPusher raises on a missing key, which would break every send for the
# user rather than just this registration
for name in ("p256dh", "auth"):
value = keys.get(name)
if not isinstance(value, str) or not value:
return f"subscription keys must include {name}"
return None
@router.get(
"/notifications/pubkey",
@@ -71,6 +162,17 @@ def register_notifications(request: Request, body: dict = None):
status_code=400,
)
reason = _validate_subscription(sub)
if reason:
logger.warning(
"Rejected notification registration for %s: %s", username, reason
)
return JSONResponse(
content={"success": False, "message": f"Invalid subscription: {reason}"},
status_code=400,
)
try:
User.update(notification_tokens=User.notification_tokens.append(sub)).where(
User.username == username
+1 -2
View File
@@ -25,7 +25,7 @@ from frigate.api.defs.query.recordings_query_parameters import (
)
from frigate.api.defs.response.generic_response import GenericResponse
from frigate.api.defs.tags import Tags
from frigate.const import MAX_SEGMENT_DURATION, RECORD_DIR
from frigate.const import RECORD_DIR
from frigate.models import Event, Recordings
from frigate.util.time import get_dst_transitions
@@ -243,7 +243,6 @@ async def recordings(
)
.where(
Recordings.camera == camera_name,
Recordings.start_time >= after - MAX_SEGMENT_DURATION,
Recordings.end_time >= after,
Recordings.start_time <= before,
)
+8 -1
View File
@@ -17,6 +17,7 @@ from frigate.api.auth import (
get_allowed_cameras_for_filter,
get_current_user,
require_camera_access,
require_full_camera_access,
require_role,
)
from frigate.api.defs.query.review_query_parameters import (
@@ -709,6 +710,7 @@ async def get_review(request: Request, review_id: str):
dependencies=[Depends(allow_any_authenticated())],
)
async def set_not_reviewed(
request: Request,
review_id: str,
current_user: dict = Depends(get_current_user),
):
@@ -727,6 +729,8 @@ async def set_not_reviewed(
status_code=404,
)
await require_camera_access(review.camera, request=request)
try:
user_review = UserReviewStatus.get(
UserReviewStatus.user_id == user_id,
@@ -743,9 +747,12 @@ async def set_not_reviewed(
)
# Intentionally not camera scoped, as the summary correlates each flagged event
# with overlapping activity on other cameras. Restricted to callers who can
# already see every camera, so the unscoped query discloses nothing.
@router.post(
"/review/summarize/start/{start_ts}/end/{end_ts}",
dependencies=[Depends(require_role(["admin"]))],
dependencies=[Depends(require_full_camera_access)],
description="Use GenAI to summarize review items over a period of time.",
)
def generate_review_summary(request: Request, start_ts: float, end_ts: float):
-1
View File
@@ -396,7 +396,6 @@ class CameraState:
"attributes": new_obj.obj_data["attributes"],
"current_estimated_speed": 0,
"velocity_angle": 0,
"path_data": [],
"recognized_license_plate": None,
"recognized_license_plate_score": None,
}
+5 -8
View File
@@ -11,7 +11,7 @@ from frigate.camera.activity_manager import AudioActivityManager, CameraActivity
from frigate.comms.base_communicator import Communicator
from frigate.comms.runtime_state import RuntimeStatePersistence
from frigate.comms.webpush import WebPushClient
from frigate.config import BirdseyeModeConfig, FrigateConfig
from frigate.config import BirdseyeModeEnum, FrigateConfig
from frigate.config.camera.updater import (
CameraConfigUpdateEnum,
CameraConfigUpdatePublisher,
@@ -882,9 +882,8 @@ class Dispatcher:
def _on_birdseye_mode_command(self, camera_name: str, payload: str) -> None:
"""Callback for birdseye mode topic."""
mode = BirdseyeModeConfig.from_mqtt_payload(payload)
if mode is None:
logger.info("Invalid birdseye_mode command: %s", payload)
if payload not in ["CONTINUOUS", "MOTION", "OBJECTS"]:
logger.info(f"Invalid birdseye_mode command: {payload}")
return
birdseye_settings = self.config.cameras[camera_name].birdseye
@@ -893,7 +892,7 @@ class Dispatcher:
logger.info(f"Birdseye mode not enabled for {camera_name}")
return
birdseye_settings.mode = mode
birdseye_settings.mode = BirdseyeModeEnum(payload.lower())
logger.info(
f"Setting birdseye mode for {camera_name} to {birdseye_settings.mode}"
)
@@ -902,9 +901,7 @@ class Dispatcher:
CameraConfigUpdateTopic(CameraConfigUpdateEnum.birdseye, camera_name),
birdseye_settings,
)
self.publish(
f"{camera_name}/birdseye_mode/state", mode.to_mqtt_payload(), retain=True
)
self.publish(f"{camera_name}/birdseye_mode/state", payload, retain=True)
def _on_camera_notification_command(self, camera_name: str, payload: str) -> None:
"""Callback for camera level notifications topic."""
+1 -1
View File
@@ -125,7 +125,7 @@ class MqttClient(Communicator):
self.publish(
f"{camera_name}/birdseye_mode/state",
(
camera.birdseye.mode.to_mqtt_payload()
camera.birdseye.mode.value.upper()
if camera.birdseye.enabled
else "OFF"
),
+12 -13
View File
@@ -89,7 +89,9 @@ class WebPushClient(Communicator):
# notification and auth config updater
self.global_config_subscriber = ConfigSubscriber("config/")
self.config_subscriber = CameraConfigUpdateSubscriber(
self.config, self.config.cameras, [CameraConfigUpdateEnum.notifications]
self.config,
self.config.cameras,
[CameraConfigUpdateEnum.add, CameraConfigUpdateEnum.notifications],
)
self._refresh_user_cameras()
@@ -213,12 +215,12 @@ class WebPushClient(Communicator):
self.suspended_cameras[camera] = 0
self.last_camera_notification_time[camera] = 0
self._refresh_user_cameras()
if topic == "reviews":
decoded = json.loads(payload)
camera = decoded["before"]["camera"]
camera_config = self.config.cameras.get(camera)
if camera_config is None or not camera_config.notifications.enabled:
if not self.config.cameras[camera].notifications.enabled:
return
if self.is_camera_suspended(camera):
logger.debug(f"Notifications for {camera} are currently suspended.")
@@ -232,14 +234,13 @@ class WebPushClient(Communicator):
# ensure notifications are enabled and the specific trigger has
# notification action enabled
camera_config = self.config.cameras.get(camera)
if (
camera_config is None
or not camera_config.notifications.enabled
or name not in camera_config.semantic_search.triggers
not self.config.cameras[camera].notifications.enabled
or name not in self.config.cameras[camera].semantic_search.triggers
or "notification"
not in camera_config.semantic_search.triggers[name].actions
not in self.config.cameras[camera]
.semantic_search.triggers[name]
.actions
):
return
@@ -250,9 +251,7 @@ class WebPushClient(Communicator):
elif topic == "camera_monitoring":
decoded = json.loads(payload)
camera = decoded["camera"]
camera_config = self.config.cameras.get(camera)
if camera_config is None or not camera_config.notifications.enabled:
if not self.config.cameras[camera].notifications.enabled:
return
if self.is_camera_suspended(camera):
logger.debug(f"Notifications for {camera} are currently suspended.")
+63 -4
View File
@@ -3,6 +3,8 @@
import errno
import json
import logging
import queue
import socket
import threading
from collections.abc import Callable
from typing import Any
@@ -74,6 +76,9 @@ _WS_VIEWER_TOPICS = frozenset(
# Camera-scoped command topics a camera-authorized (non-admin) user may send.
_WS_CAMERA_COMMAND_TOPICS = frozenset({"ptz"})
# Max outbound messages waiting on a client's writer thread.
WS_MAX_PENDING_MESSAGES = 256
def _check_ws_authorization(
topic: str,
@@ -446,6 +451,63 @@ def _materialize_for_ws(
class WebSocket(WebSocket_): # type: ignore[misc]
def __init__(self, *args: Any, **kwargs: Any) -> None:
super().__init__(*args, **kwargs)
self._send_queue: queue.Queue[tuple[Any, bool] | None] = queue.Queue(
maxsize=WS_MAX_PENDING_MESSAGES
)
self._writer: threading.Thread | None = None
self._aborted = False
def opened(self) -> None:
# every client gets its own writer so a client that stops reading only
# blocks itself, never the thread that called publish()
self._writer = threading.Thread(
target=self._drain_send_queue, name="ws_writer", daemon=True
)
self._writer.start()
def send(self, payload: Any, binary: bool = False) -> None:
try:
self._send_queue.put_nowait((payload, binary))
except queue.Full:
self._abort("Websocket client is not keeping up, disconnecting it")
def _drain_send_queue(self) -> None:
while True:
item = self._send_queue.get()
if item is None or self.terminated or self.sock is None:
return
try:
super().send(*item)
except Exception:
self._abort()
return
def _abort(self, reason: str | None = None) -> None:
# publish() keeps hitting a full queue until the manager thread removes
# the connection, so only act (and log) the first time
if self._aborted:
return
self._aborted = True
if reason:
logger.warning(reason)
# shutdown rather than close so the ws4py manager thread sees EOF and
# runs its normal unregister/terminate; this also unblocks a stuck sendall
sock = self.sock
if sock is not None:
try:
sock.shutdown(socket.SHUT_RDWR)
except OSError:
pass
def closed(self, code: int, reason: str | None = None) -> None:
try:
self._send_queue.put_nowait(None)
except queue.Full:
pass
def unhandled_error(self, error: Any) -> None:
"""
Handles the unfriendly socket closures on the server side
@@ -580,10 +642,7 @@ class WebSocketClient(Communicator):
)
if message is None:
continue
try:
ws.send(message)
except (ConnectionResetError, BrokenPipeError, ValueError):
pass
ws.send(message)
def stop(self) -> None:
if self.websocket_server is not None:
+20 -74
View File
@@ -1,3 +1,5 @@
from enum import Enum
from pydantic import BaseModel, Field
from ..base import FrigateBaseModel
@@ -6,78 +8,22 @@ __all__ = [
"BirdseyeCameraConfig",
"BirdseyeConfig",
"BirdseyeLayoutConfig",
"BirdseyeModeConfig",
"BirdseyeModeEnum",
]
BIRDSEYE_ACTIVITY_TYPES = (
"objects",
"motion",
"stationary_objects",
"continuous",
)
class BirdseyeModeConfig(FrigateBaseModel):
continuous: bool = Field(
default=False,
title="Continuous",
description="Always include the camera in Birdseye.",
)
motion: bool = Field(
default=False,
title="Motion",
description="Include the camera in Birdseye when motion is detected.",
)
objects: bool = Field(
default=False,
title="Active objects",
description="Include the camera in Birdseye while an active object is tracked.",
)
stationary_objects: bool = Field(
default=False,
title="Stationary objects",
description="Include the camera in Birdseye while a stationary object is tracked.",
)
class BirdseyeModeEnum(str, Enum):
objects = "objects"
motion = "motion"
continuous = "continuous"
@classmethod
def from_mqtt_payload(cls, payload: str) -> "BirdseyeModeConfig | None":
"""Create mode options from an uppercase MQTT payload."""
raw_modes = payload.split(",")
if not raw_modes or any(not mode for mode in raw_modes):
return None
def get_index(cls, type):
return list(cls).index(type)
modes = [mode.lower() for mode in raw_modes]
if any(
raw_mode != mode.upper() or mode not in BIRDSEYE_ACTIVITY_TYPES
for raw_mode, mode in zip(raw_modes, modes)
):
return None
if len(modes) != len(set(modes)):
return None
return cls(**{mode: True for mode in modes})
def has_enabled_activity(self) -> bool:
"""Return whether at least one activity type is enabled."""
return any(getattr(self, activity) for activity in BIRDSEYE_ACTIVITY_TYPES)
def to_mqtt_payload(self) -> str:
"""Serialize enabled mode options for MQTT state topics."""
payload = ",".join(
activity.upper()
for activity in BIRDSEYE_ACTIVITY_TYPES
if getattr(self, activity)
)
if not payload:
raise ValueError("At least one Birdseye activity type must be enabled")
return payload
def default_birdseye_mode() -> BirdseyeModeConfig:
"""Return the default Birdseye mode configuration."""
return BirdseyeModeConfig(objects=True)
@classmethod
def get(cls, index):
return list(cls)[index]
class BirdseyeLayoutConfig(FrigateBaseModel):
@@ -101,10 +47,10 @@ class BirdseyeConfig(FrigateBaseModel):
title="Enable Birdseye",
description="Enable or disable the Birdseye view feature.",
)
mode: BirdseyeModeConfig = Field(
default_factory=default_birdseye_mode,
title="Activity types",
description="Activity types that include cameras in Birdseye.",
mode: BirdseyeModeEnum = Field(
default=BirdseyeModeEnum.objects,
title="Tracking mode",
description="Mode for including cameras in Birdseye: 'objects', 'motion', or 'continuous'.",
)
restream: bool = Field(
@@ -156,10 +102,10 @@ class BirdseyeCameraConfig(BaseModel):
title="Enable Birdseye",
description="Enable or disable the Birdseye view feature.",
)
mode: BirdseyeModeConfig = Field(
default_factory=default_birdseye_mode,
title="Activity types",
description="Activity types that include cameras in Birdseye.",
mode: BirdseyeModeEnum = Field(
default=BirdseyeModeEnum.objects,
title="Tracking mode",
description="Mode for including cameras in Birdseye: 'objects', 'motion', or 'continuous'.",
)
order: int = Field(
+2 -18
View File
@@ -41,7 +41,7 @@ from .auth import AuthConfig
from .base import FrigateBaseModel
from .camera import CameraConfig, CameraLiveConfig
from .camera.audio import AudioConfig, AudioFilterConfig
from .camera.birdseye import BirdseyeConfig, BirdseyeModeConfig
from .camera.birdseye import BirdseyeConfig
from .camera.detect import DetectConfig
from .camera.ffmpeg import FfmpegConfig
from .camera.genai import GenAIConfig, GenAIRoleEnum
@@ -326,20 +326,8 @@ def verify_required_zones_exist(camera_config: CameraConfig) -> None:
def verify_profile_overrides_match_base(camera_config: CameraConfig) -> None:
"""Verify profile overrides against the resolved base camera configuration."""
"""Verify that profile zone and mask IDs reference entries defined on the base camera."""
for profile_name, profile in camera_config.profiles.items():
if profile.birdseye is not None:
overrides = profile.birdseye.mode.model_dump(exclude_unset=True)
base_mode = camera_config.birdseye.mode.model_dump()
resolved_mode = BirdseyeModeConfig.model_validate(
deep_merge(overrides, base_mode)
)
if not resolved_mode.has_enabled_activity():
raise ValueError(
f"Camera '{camera_config.name}' profile '{profile_name}' must "
"enable at least one Birdseye activity type"
)
if profile.zones:
for zone_name in profile.zones:
if zone_name not in camera_config.zones:
@@ -1010,10 +998,6 @@ class FrigateConfig(FrigateBaseModel):
self.cameras[name] = camera_config
verify_config_roles(camera_config)
if not camera_config.birdseye.mode.has_enabled_activity():
raise ValueError(
f"Camera '{name}' must enable at least one Birdseye activity type"
)
verify_valid_live_stream_names(self, camera_config)
verify_recording_segments_setup_with_reasonable_time(camera_config)
verify_zone_objects_are_tracked(camera_config)
+1 -3
View File
@@ -43,9 +43,7 @@ SECTION_STATE_TOPICS: dict[str, list[tuple[str, Callable[[Any], Any]]]] = {
("birdseye", lambda c: "ON" if c.birdseye.enabled else "OFF"),
(
"birdseye_mode",
lambda c: (
c.birdseye.mode.to_mqtt_payload() if c.birdseye.enabled else "OFF"
),
lambda c: c.birdseye.mode.value.upper() if c.birdseye.enabled else "OFF",
),
],
"detect": [("detect", lambda c: "ON" if c.detect.enabled else "OFF")],
@@ -83,10 +83,6 @@ class AudioTranscriptionPostProcessor(PostProcessorApi):
"""
event_id = data["event_id"]
camera_name = data["camera"]
camera_config = self.config.cameras.get(camera_name)
if camera_config is None:
return
if data_type == PostProcessDataEnum.recording:
start_ts = data["frame_time"]
@@ -108,7 +104,7 @@ class AudioTranscriptionPostProcessor(PostProcessorApi):
try:
audio_data = get_audio_from_recording(
camera_config.ffmpeg,
self.config.cameras[camera_name].ffmpeg,
camera_name,
start_ts,
end_ts,
@@ -151,12 +151,7 @@ class ObjectDescriptionProcessor(PostProcessorApi):
logger.error(f"Event {event_id} not found for description regeneration")
return
camera_config = self.config.cameras.get(str(event.camera))
if camera_config is None:
logger.error("Camera %s no longer exists", event.camera)
return
camera_config = self.config.cameras[str(event.camera)]
if not camera_config.objects.genai.enabled and not force:
logger.error(f"GenAI not enabled for camera {event.camera}")
return
@@ -137,10 +137,7 @@ class ReviewDescriptionProcessor(PostProcessorApi):
return
camera = data["after"]["camera"]
camera_config = self.config.cameras.get(camera)
if camera_config is None:
return
camera_config = self.config.cameras[camera]
if not camera_config.review.genai.enabled:
return
+1 -20
View File
@@ -609,18 +609,6 @@ class EmbeddingMaintainer(threading.Thread):
# Embed the thumbnail
self._embed_thumbnail(event_id, thumbnail)
# every post processor below reads config.cameras[camera], but
# tracked_events still has to be released or the thumbnails held
# for this event leak, same as the two exits above
if camera not in self.config.cameras:
logger.debug("Skipping post processing for removed camera %s", camera)
for processor in self.post_processors:
if isinstance(processor, ObjectDescriptionProcessor):
processor.cleanup_event(event_id)
continue
# call any defined post processors
for processor in self.post_processors:
if isinstance(processor, LicensePlatePostProcessor):
@@ -678,18 +666,11 @@ class EmbeddingMaintainer(threading.Thread):
to_remove = []
for id, data in self.detected_license_plates.items():
camera_config = self.config.cameras.get(data["camera"])
if camera_config is None:
# camera was removed, drop the entry rather than expiring it
to_remove.append(id)
continue
last_seen = data.get("last_seen", 0)
if not last_seen:
continue
if now - last_seen > camera_config.lpr.expire_time:
if now - last_seen > self.config.cameras[data["camera"]].lpr.expire_time:
to_remove.append(id)
for id in to_remove:
self.event_metadata_publisher.publish(
+2 -2
View File
@@ -245,7 +245,7 @@ class GeminiClient(GenAIClient):
)
gemini_messages.append(
types.Content(
role="function",
role="user",
parts=[
types.Part.from_function_response(
name=msg.get("name")
@@ -501,7 +501,7 @@ class GeminiClient(GenAIClient):
)
gemini_messages.append(
types.Content(
role="function",
role="user",
parts=[
types.Part.from_function_response(
name=msg.get("name")
+121 -65
View File
@@ -262,10 +262,6 @@ def get_tool_definitions(
`attribute` parameter is exposed for filtering by their labels. When the
embeddings model only understands English (JinaV1), the `semantic_query`
description instructs the model to write the query in English.
Descriptions here stay mechanical: which tool to reach for, and how the
filters relate to each other, is stated once in the system prompt so the
guidance is not paid for twice on every request.
"""
search_objects_properties: dict[str, Any] = {
"camera": {
@@ -274,13 +270,26 @@ def get_tool_definitions(
},
"label": {
"type": "string",
"description": "Tracked object class to filter by.",
"description": (
"Generic object class to filter by — one of the tracked detector "
"labels such as 'person', 'package', 'car', 'dog', 'bird'. Use "
"this for broad queries like 'show me all cars today'. Combine "
"with semantic_query when the user also describes appearance or "
"behavior (e.g. label='person', semantic_query='riding a lawn "
"mower')."
),
},
"sub_label": {
"type": "string",
"description": (
"Name recognized in the detection: a person, delivery company, "
"animal species or breed, or license plate."
"Filter by a DISCRETE NAMED entity recognized in the detection. "
"Use this for: a known person's name ('John'), a delivery "
"company ('Amazon', 'UPS'), a recognized animal species or "
"breed ('blue jay', 'cardinal', 'golden retriever'), or a "
"license plate string. When filtering by a specific name, set "
"only sub_label and leave label unset. Do NOT use sub_label "
"for descriptions of appearance, clothing, or actions — those "
"belong in semantic_query."
),
},
"after": {
@@ -304,11 +313,20 @@ def get_tool_definitions(
}
if attribute_classifications:
model_outline = "; ".join(
f"{m['name']} (applies to {', '.join(m['objects']) or 'any object'})"
for m in attribute_classifications
)
search_objects_properties["attribute"] = {
"type": "string",
"description": (
"Attribute label produced by a configured classification model "
"(case-sensitive)."
"Filter by a classification attribute label produced by a "
"configured attribute classification model. Use this INSTEAD "
"of semantic_query when the user's request matches one of "
"these classifications. Configured models: "
f"{model_outline}. "
"Set the value to the attribute label that matches the user's "
"phrasing (case-sensitive)."
),
}
@@ -316,12 +334,29 @@ def get_tool_definitions(
search_objects_properties["semantic_query"] = {
"type": "string",
"description": (
"Description of an appearance or activity, used to semantically "
"narrow results."
"Optional natural-language description of a PHYSICAL "
"CHARACTERISTIC, APPEARANCE, or ACTIVITY the user mentioned, "
"used to semantically narrow results. Only set this when the "
"user describes something beyond what label and sub_label can "
"express on their own.\n"
"USE for descriptive phrases like: 'riding a lawn mower', "
"'wearing a red jacket', 'carrying a package', 'walking a "
"dog', 'on a bicycle', 'holding an umbrella'.\n"
"DO NOT USE for:\n"
"- specific named people, pets, or delivery companies → use sub_label\n"
"- animal species or breed names like 'blue jay', 'cardinal', "
"'golden retriever' → use sub_label\n"
"- license plate strings → use sub_label\n"
"- generic object queries like 'all cars today' or 'every "
"person' → use label alone with no semantic_query\n"
"When set, combine with label/time/camera/zone filters as "
"usual (e.g. label='person', semantic_query='riding a lawn "
"mower', after='2024-05-01T00:00:00Z')."
+ (
" The configured embeddings model only understands English, so "
"always write this in English, translating the user's "
"description if they phrased it in another language."
" The configured embeddings model only understands "
"English, so always write semantic_query in English, "
"translating the user's description if they phrased it "
"in another language."
if embeddings_language == "english"
else ""
)
@@ -329,10 +364,26 @@ def get_tool_definitions(
}
search_objects_description = (
"Search the historical record of tracked detections. Use this ONLY for "
"questions about the PAST, e.g. 'did anyone come by today?', 'when was the "
"last car?'. For alerting on future events use start_camera_watch instead."
"Search the historical record of detected objects in Frigate. "
"Use this ONLY for questions about the PAST — e.g. 'did anyone come by today?', "
"'when was the last car?', 'show me detections from yesterday'. "
"Do NOT use this for monitoring or alerting requests about future events — "
"use start_camera_watch instead for those. "
"An 'object' in Frigate represents a tracked detection (e.g., a person, package, car).\n\n"
"Choose filters based on what the user is asking for:\n"
"- Generic class query ('show me all cars today'): set `label` only.\n"
"- Specific NAMED entity (known person, delivery company, animal "
"species/breed like 'blue jay' or 'golden retriever', license "
"plate): set `sub_label` only and leave `label` unset.\n"
)
if semantic_search_enabled:
search_objects_description += (
"- Physical CHARACTERISTIC, APPEARANCE, or ACTIVITY that is not a "
"discrete name ('person riding a lawn mower', 'someone in a red "
"jacket', 'person carrying a package'): set `semantic_query` with "
"the descriptive phrase, optionally alongside `label` for the "
"object class. Do NOT put descriptive phrases in sub_label."
)
return [
{
@@ -347,30 +398,20 @@ def get_tool_definitions(
"required": [],
},
},
{
"type": "function",
"function": {
"name": "get_categorized_object_names",
"description": (
"Every name that can be attached as a sub_label, grouped by object "
"type: recognized faces, named license plates, classification "
"categories, and delivery logos. Takes no arguments and always "
"returns the complete map."
),
"parameters": {
"type": "object",
"properties": {},
"required": [],
},
},
},
{
"type": "function",
"function": {
"name": "find_similar_objects",
"description": (
"Find tracked objects visually and semantically similar to a "
"specific past event. Requires semantic search to be enabled."
"Find tracked objects that are visually and semantically similar "
"to a specific past event. Use this when the user references a "
"particular object they have seen and wants to find other "
"sightings of the same or similar one ('that green car', 'the "
"person in the red jacket', 'the package that was delivered'). "
"Prefer this over search_objects whenever the user's intent is "
"'find more like this specific one.' Use search_objects first "
"only if you need to locate the anchor event. Requires semantic "
"search to be enabled."
),
"parameters": {
"type": "object",
@@ -432,8 +473,9 @@ def get_tool_definitions(
"function": {
"name": "set_camera_state",
"description": (
"Change a camera's feature state, e.g. turn detection on or off. "
"Only call this when the user explicitly asks to change a setting. "
"Change a camera's feature state (e.g., turn detection on/off, enable/disable recordings). "
"Use camera='*' to apply to all cameras at once. "
"Only call this tool when the user explicitly asks to change a camera setting. "
"Requires admin privileges."
),
"parameters": {
@@ -468,14 +510,14 @@ def get_tool_definitions(
],
"description": (
"The feature to change. Most features accept ON or OFF. "
"birdseye_mode accepts CONTINUOUS, MOTION, OBJECTS, STATIONARY_OBJECTS, or a comma-separated combination. "
"birdseye_mode accepts CONTINUOUS, MOTION, or OBJECTS. "
"motion_contour_area and motion_threshold accept a number. "
"profile accepts a profile name or 'none' to deactivate (requires camera='*')."
),
},
"value": {
"type": "string",
"description": "The value to set, as accepted by the chosen feature.",
"description": "The value to set. ON or OFF for toggles, a number for thresholds, a profile name or 'none' for profile.",
},
},
"required": ["camera", "feature", "value"],
@@ -487,9 +529,11 @@ def get_tool_definitions(
"function": {
"name": "get_live_context",
"description": (
"Current live image and detections (tracked objects, zones, "
"timestamps) for one camera. Use this for questions about what is "
"happening right now. Call it again for each additional camera."
"Get the current live image and detection information for a single camera: objects being tracked, "
"zones, timestamps. Use this to understand what is visible in the live view. "
"Call this when answering questions about what is happening right now on a specific camera. "
"Operates on one camera at a time; call the tool again for each additional camera. "
"Wildcards and empty values are not accepted."
),
"parameters": {
"type": "object",
@@ -497,8 +541,8 @@ def get_tool_definitions(
"camera": {
"type": "string",
"description": (
"Exact name of a single camera. Wildcards (e.g. '*', "
"'all') and empty strings are not accepted."
"Exact name of a single camera to get live context for. "
"Wildcards (e.g. '*', 'all') and empty strings are not accepted."
),
},
},
@@ -511,9 +555,10 @@ def get_tool_definitions(
"function": {
"name": "start_camera_watch",
"description": (
"Start a continuous watch job that monitors a camera and notifies "
"the user when a condition is met, e.g. 'tell me when guests "
"arrive'. Only one watch job can run at a time. Returns a job ID."
"Start a continuous VLM watch job that monitors a camera and sends a notification "
"when a specified condition is met. Use this when the user wants to be alerted about "
"a future event, e.g. 'tell me when guests arrive' or 'notify me when the package is picked up'. "
"Only one watch job can run at a time. Returns a job ID."
),
"parameters": {
"type": "object",
@@ -553,7 +598,10 @@ def get_tool_definitions(
"type": "function",
"function": {
"name": "stop_camera_watch",
"description": "Cancel the currently running watch job.",
"description": (
"Cancel the currently running VLM watch job. Use this when the user wants to "
"stop a previously started watch, e.g. 'stop watching the front door'."
),
"parameters": {
"type": "object",
"properties": {},
@@ -566,9 +614,11 @@ def get_tool_definitions(
"function": {
"name": "get_profile_status",
"description": (
"Get the active profile and when each profile was last activated. "
"Call this before get_recap to derive the time window for requests "
"like 'what happened while I was away?'."
"Get the current profile status including the active profile and "
"timestamps of when each profile was last activated. Use this to "
"determine time periods for recap requests — e.g. when the user asks "
"'what happened while I was away?', call this first to find the relevant "
"time window based on profile activation history."
),
"parameters": {
"type": "object",
@@ -582,9 +632,11 @@ def get_tool_definitions(
"function": {
"name": "get_recap",
"description": (
"Get all activity (alerts and detections) for a time period, as a "
"chronological list with camera, objects, zones, and descriptions "
"when available. Summarize the results for the user."
"Get a recap of all activity (alerts and detections) for a given time period. "
"Use this after calling get_profile_status to retrieve what happened during "
"a specific window — e.g. 'what happened while I was away?'. Returns a "
"chronological list of activity with camera, objects, zones, and GenAI-generated "
"descriptions when available. Summarize the results for the user."
),
"parameters": {
"type": "object",
@@ -671,13 +723,14 @@ def build_chat_system_prompt(
)
speed_units_section = f"\n\nReport object speeds to the user in {speed_unit}."
filter_routing_section = (
"\n\nWhen routing a search_objects call, pick filters by the shape of the user's request:\n"
"- Generic class ('show me all cars today'): set `label` only.\n"
"- Specific named entity — a known person ('John'), delivery company ('Amazon'), animal species/breed ('blue jay', 'golden retriever'), or license plate: set `sub_label` only and leave `label` unset. Call get_categorized_object_names first and use the exact spelling it returns; a guessed spelling matches nothing. If the name is absent, say it is not configured rather than searching for it."
)
semantic_search_section = ""
if semantic_search_enabled:
filter_routing_section += "\n- Physical characteristic, appearance, or activity that is NOT a discrete name ('riding a lawn mower', 'someone in a red jacket'): set `semantic_query` with the descriptive phrase, optionally combined with `label`. Never put descriptive phrases in `sub_label`."
semantic_search_section = (
"\n\nWhen routing a search_objects call, pick filters by the shape of the user's request:\n"
"- Generic class ('show me all cars today'): set `label` only.\n"
"- Specific named entity — a known person ('John'), delivery company ('Amazon'), animal species/breed ('blue jay', 'cardinal', 'golden retriever'), or license plate: set `sub_label` only and leave `label` unset.\n"
"- Physical characteristic, appearance, or activity that is NOT a discrete name ('find me people riding a lawn mower', 'someone in a red jacket', 'a person carrying a package'): set `semantic_query` with the descriptive phrase, optionally combined with `label` for the object class. Never put descriptive phrases in `sub_label`."
)
attribute_classification_section = ""
if attribute_classifications:
@@ -686,9 +739,9 @@ def build_chat_system_prompt(
for m in attribute_classifications
)
attribute_classification_section = (
"\n\nConfigured attribute classification models:\n"
"\n\nAttribute classification models are configured for the following object types:\n"
f"{model_lines}\n"
"When the user's request matches one of these classifications, set the search_objects `attribute` field to the matching label (case-sensitive) rather than using `semantic_query`. Reserve `semantic_query` for descriptive phrases outside the configured attribute labels."
"When the user's request matches one of these classifications, set the search_objects `attribute` field to the matching label rather than using `semantic_query`. Reserve `semantic_query` for descriptive phrases that fall outside the configured attribute labels."
)
return f"""You are a helpful assistant for Frigate, a security camera NVR system. You help users answer questions about their cameras, detected objects, and events.
@@ -697,6 +750,9 @@ Current server local date and time: {current_date_str} at {current_time_str}
Do not start your response with phrases like "I will check...", "Let me see...", or "Let me look...". Answer directly.
Always present times in the server's local timezone. When tool results include start_time_local and end_time_local, quote those strings exactly; never convert or invent timestamps, and fall back to UTC or ISO format only when a result has no local time fields. Resolve relative dates like "today" or "this week" against the current date above, and pass dates to tools in ISO 8601 (e.g. {current_date_str}T00:00:00Z for the start of today).
Always present times to the user in the server's local timezone. When tool results include start_time_local and end_time_local, use those exact strings when listing or describing detection times—do not convert or invent timestamps. Do not use UTC or ISO format with Z for the user-facing answer unless the tool result only provides Unix timestamps without local time fields.
When users ask about "today", "yesterday", "this week", etc., use the current date above as reference.
When searching for objects or events, use ISO 8601 format for dates (e.g., {current_date_str}T00:00:00Z for the start of today).
Always be accurate with time calculations based on the current date provided.
When the user refers to a specific object they have seen ("that green car", "the person in the red jacket", "a package left today"), prefer find_similar_objects over search_objects, using search_objects only to locate the anchor event and passing its id along. Keep search_objects for generic queries like "show me all cars today". If a user message begins with [attached_event:<id>], treat that id as the anchor for any similarity or "tell me more" request in the same message.{filter_routing_section}{attribute_classification_section}{cameras_section}{speed_units_section}"""
When a user refers to a specific object they have seen or describe with identifying details ("that green car", "the person in the red jacket", "a package left today"), prefer the find_similar_objects tool over search_objects. Use search_objects first only to locate the anchor event, then pass its id to find_similar_objects. For generic queries like "show me all cars today", keep using search_objects. If a user message begins with [attached_event:<id>], treat that event id as the anchor for any similarity or "tell me more" request in the same message and call find_similar_objects with that id.{semantic_search_section}{attribute_classification_section}{cameras_section}{speed_units_section}"""
+5 -1
View File
@@ -115,6 +115,10 @@ def query_recordings(source_camera: str, start_ts: float, end_ts: float) -> Mode
return cast(ModelSelect, query)
class NoRecordingsError(ValueError):
"""Raised when no recordings exist in the requested time range."""
class DebugReplaySource(ABC):
"""Abstract source for a debug replay session.
@@ -187,7 +191,7 @@ class RecordingDebugReplaySource(DebugReplaySource):
raise ValueError("End time must be after start time")
if not query_recordings(self._camera, self._start_ts, self._end_ts).count():
raise ValueError(
raise NoRecordingsError(
f"No recordings found for camera '{self._camera}' in the specified time range"
)
+122 -135
View File
@@ -9,7 +9,6 @@ import queue
import subprocess as sp
import threading
import traceback
from dataclasses import dataclass
from multiprocessing.synchronize import Event as MpEvent
from typing import Any
@@ -17,7 +16,7 @@ import cv2
import numpy as np
from frigate.comms.inter_process import InterProcessRequestor
from frigate.config import BirdseyeModeConfig, FfmpegConfig, FrigateConfig
from frigate.config import BirdseyeModeEnum, FfmpegConfig, FrigateConfig
from frigate.const import BASE_DIR, BIRDSEYE_PIPE, INSTALL_DIR, UPDATE_BIRDSEYE_LAYOUT
from frigate.output.ws_auth import ws_has_camera_access
from frigate.util.image import (
@@ -29,15 +28,6 @@ from frigate.util.image import (
logger = logging.getLogger(__name__)
@dataclass(frozen=True, slots=True)
class BirdseyeActivity:
"""Activity signals used to decide whether a camera is shown in Birdseye."""
has_active_object: bool
has_stationary_object: bool
has_motion: bool
def get_standard_aspect_ratio(width: int, height: int) -> tuple[int, int]:
"""Ensure that only standard aspect ratios are used."""
# it is important that all ratios have the same scale
@@ -419,16 +409,18 @@ class BirdsEyeFrameManager:
)
def camera_active(
self,
mode: BirdseyeModeConfig,
activity: BirdseyeActivity,
self, mode: Any, object_box_count: int, motion_box_count: int
) -> bool:
return (
mode.continuous
or (mode.motion and activity.has_motion)
or (mode.objects and activity.has_active_object)
or (mode.stationary_objects and activity.has_stationary_object)
)
if mode == BirdseyeModeEnum.continuous:
return True
if mode == BirdseyeModeEnum.motion and motion_box_count > 0:
return True
if mode == BirdseyeModeEnum.objects and object_box_count > 0:
return True
return False
def get_camera_coordinates(self) -> dict[str, dict[str, int]]:
"""Return the coordinates of each camera in the current layout."""
@@ -612,92 +604,112 @@ class BirdsEyeFrameManager:
) -> list[list[Any]] | None:
"""Calculate the optimal layout for 2+ cameras."""
def find_available_x(
current_x: int,
width: int,
reserved_ranges: list[tuple[int, int]],
max_width: int,
) -> int | None:
"""Find the first horizontal slot that does not collide with reservations."""
x = current_x
for reserved_start, reserved_end in sorted(reserved_ranges):
if x >= reserved_end:
continue
if x + width <= reserved_start:
return x
x = max(x, reserved_end)
if x + width <= max_width:
return x
return None
def map_layout(row_height: int) -> tuple[int, int, list[list[Any]] | None]:
"""Lay out cameras row by row while reserving portrait spans for the next row."""
candidate_layout: list[list[Any]] = []
reserved_ranges: dict[int, list[tuple[int, int]]] = {}
current_row: list[Any] = []
row_index = 0
row_y = 0
row_x = 0
def map_layout(
camera_layout: list[list[Any]], row_height: int
) -> tuple[int, int, list[list[Any]] | None]:
"""Map the calculated layout."""
candidate_layout = []
starting_x = 0
x = 0
max_width = 0
max_height = 0
y = 0
for camera in cameras_to_add:
camera_dims = self.cameras[camera]["dimensions"].copy()
camera_aspect_x, camera_aspect_y = self.canvas.get_camera_aspect(
camera, camera_dims[0], camera_dims[1]
for row in camera_layout:
final_row = []
max_width = max(max_width, x)
x = starting_x
for cameras in row:
camera_dims = self.cameras[cameras[0]]["dimensions"].copy()
camera_aspect = cameras[1]
if camera_dims[1] > camera_dims[0]:
scaled_height = int(row_height * 2)
scaled_width = int(scaled_height * camera_aspect)
starting_x = scaled_width
else:
scaled_height = row_height
scaled_width = int(scaled_height * camera_aspect)
# layout is too large
if (
x + scaled_width > self.canvas.width
or y + scaled_height > self.canvas.height
):
return x + scaled_width, y + scaled_height, None
final_row.append((cameras[0], (x, y, scaled_width, scaled_height)))
x += scaled_width
y += row_height
candidate_layout.append(final_row)
if max_width == 0:
max_width = x
return max_width, y, candidate_layout
canvas_aspect_x, canvas_aspect_y = self.canvas.get_aspect(coefficient)
camera_layout: list[list[Any]] = []
camera_layout.append([])
starting_x = 0
x = starting_x
y = 0
y_i = 0
max_y = 0
for camera in cameras_to_add:
camera_dims = self.cameras[camera]["dimensions"].copy()
camera_aspect_x, camera_aspect_y = self.canvas.get_camera_aspect(
camera, camera_dims[0], camera_dims[1]
)
if camera_dims[1] > camera_dims[0]:
portrait = True
else:
portrait = False
if (x + camera_aspect_x) <= canvas_aspect_x:
# insert if camera can fit on current row
camera_layout[y_i].append(
(
camera,
camera_aspect_x / camera_aspect_y,
)
)
portrait = camera_dims[1] > camera_dims[0]
scaled_height = row_height * 2 if portrait else row_height
scaled_width = int(scaled_height * (camera_aspect_x / camera_aspect_y))
while True:
x = find_available_x(
row_x,
scaled_width,
reserved_ranges.get(row_index, []),
self.canvas.width,
if portrait:
starting_x = camera_aspect_x
else:
max_y = max(
max_y,
camera_aspect_y,
)
if x is not None and row_y + scaled_height <= self.canvas.height:
current_row.append(
(camera, (x, row_y, scaled_width, scaled_height))
)
row_x = x + scaled_width
max_width = max(max_width, row_x)
max_height = max(max_height, row_y + scaled_height)
x += camera_aspect_x
else:
# move on to the next row and insert
y += max_y
y_i += 1
camera_layout.append([])
x = starting_x
if portrait:
reserved_ranges.setdefault(row_index + 1, []).append(
(x, row_x)
)
if x + camera_aspect_x > canvas_aspect_x:
return None
break
camera_layout[y_i].append(
(
camera,
camera_aspect_x / camera_aspect_y,
)
)
x += camera_aspect_x
if current_row:
candidate_layout.append(current_row)
current_row = []
if y + max_y > canvas_aspect_y:
return None
row_index += 1
row_y = row_index * row_height
row_x = 0
if row_y + scaled_height > self.canvas.height:
overflow_width = max(max_width, scaled_width)
overflow_height = row_y + scaled_height
return overflow_width, overflow_height, None
if current_row:
candidate_layout.append(current_row)
return max_width, max_height, candidate_layout
row_height = max(1, int(self.canvas.height / coefficient))
total_width, total_height, standard_candidate_layout = map_layout(row_height)
row_height = int(self.canvas.height / coefficient)
total_width, total_height, standard_candidate_layout = map_layout(
camera_layout, row_height
)
if not standard_candidate_layout:
# if standard layout didn't work
@@ -706,9 +718,9 @@ class BirdsEyeFrameManager:
total_width / self.canvas.width,
total_height / self.canvas.height,
)
row_height = max(1, int(row_height / scale_down_percent))
row_height = int(row_height / scale_down_percent)
total_width, total_height, standard_candidate_layout = map_layout(
row_height
camera_layout, row_height
)
if not standard_candidate_layout:
@@ -722,8 +734,8 @@ class BirdsEyeFrameManager:
1 / (total_width / self.canvas.width),
1 / (total_height / self.canvas.height),
)
row_height = max(1, int(row_height * scale_up_percent))
_, _, scaled_layout = map_layout(row_height)
row_height = int(row_height * scale_up_percent)
_, _, scaled_layout = map_layout(camera_layout, row_height)
if scaled_layout:
return scaled_layout
@@ -733,7 +745,8 @@ class BirdsEyeFrameManager:
def update(
self,
camera: str,
activity: BirdseyeActivity,
object_count: int,
motion_count: int,
frame_time: float,
frame: np.ndarray,
) -> tuple[bool, bool]:
@@ -747,29 +760,22 @@ class BirdsEyeFrameManager:
return False, False
force_update = False
camera_state = self.cameras.get(camera)
if camera_state is None:
return False, False
# disabling birdseye is a little tricky
if not camera_config.birdseye.enabled or not camera_config.enabled:
# if we've rendered a frame (we have a value for last_active_frame)
# then we need to set it to zero
if camera_state["last_active_frame"] > 0:
camera_state["last_active_frame"] = 0
if self.cameras[camera]["last_active_frame"] > 0:
self.cameras[camera]["last_active_frame"] = 0
force_update = True
else:
return False, False
# update the last active frame for the camera
camera_state["current_frame"] = frame.copy()
camera_state["current_frame_time"] = frame_time
if self.camera_active(
camera_config.birdseye.mode,
activity,
):
camera_state["last_active_frame"] = frame_time
self.cameras[camera]["current_frame"] = frame.copy()
self.cameras[camera]["current_frame_time"] = frame_time
if self.camera_active(camera_config.birdseye.mode, object_count, motion_count):
self.cameras[camera]["last_active_frame"] = frame_time
now = datetime.datetime.now().timestamp()
@@ -876,29 +882,10 @@ class Birdseye:
frame_time: float,
frame: np.ndarray,
) -> None:
has_active_object = False
has_stationary_object = False
for tracked_object in current_tracked_objects:
if tracked_object["stationary"]:
if not tracked_object["false_positive"]:
has_stationary_object = True
else:
# Preserve the existing objects activity behavior, which includes
# non-stationary trackers before they are confirmed.
has_active_object = True
if has_active_object and has_stationary_object:
break
activity = BirdseyeActivity(
has_active_object=has_active_object,
has_stationary_object=has_stationary_object,
has_motion=bool(motion_boxes),
)
frame_changed, frame_layout_changed = self.birdseye_manager.update(
camera,
activity,
len([o for o in current_tracked_objects if not o["stationary"]]),
len(motion_boxes),
frame_time,
frame,
)
+7 -12
View File
@@ -51,12 +51,8 @@ def check_disabled_camera_update(
for camera, last_update in write_times.items():
offline_time = now - last_update
camera_config = config.cameras.get(camera)
if camera_config is None:
continue
if camera_config.enabled:
if config.cameras[camera].enabled:
has_enabled_camera = True
else:
# flag camera as offline when it is disabled
@@ -66,8 +62,8 @@ def check_disabled_camera_update(
# last camera update was more than 1 second ago
# need to send empty data to birdseye because current
# frame is now out of date
cam_width = camera_config.detect.width
cam_height = camera_config.detect.height
cam_width = config.cameras[camera].detect.width
cam_height = config.cameras[camera].detect.height
if cam_width is None or cam_height is None:
raise ValueError(f"Camera {camera} detect dimensions not configured")
@@ -313,11 +309,10 @@ class OutputProcess(FrigateProcess):
regions,
) = data
camera_config = self.config.cameras.get(camera)
if camera_config is not None:
frame_manager.get(frame_name, camera_config.frame_shape_yuv)
frame_manager.close(frame_name)
frame = frame_manager.get(
frame_name, self.config.cameras[camera].frame_shape_yuv
)
frame_manager.close(frame_name)
detection_subscriber.stop()
+20 -21
View File
@@ -799,24 +799,14 @@ class PtzAutoTracker:
except TimeoutError:
continue
# both are popped when the camera is deleted, so resolve them once
# here and use the locals for the rest of the move; a move already
# in flight then finishes against valid objects
metrics = self.ptz_metrics.get(camera)
camera_config = self.config.cameras.get(camera)
if metrics is None or camera_config is None:
logger.debug("%s: Dropping queued move, camera was removed", camera)
continue
async with self.move_queue_locks[camera]:
frame_time, pan, tilt, zoom = move_data
# if we're receiving move requests during a PTZ move, ignore them
if ptz_moving_at_frame_time(
frame_time,
metrics.start_time.value,
metrics.stop_time.value,
self.ptz_metrics[camera].start_time.value,
self.ptz_metrics[camera].stop_time.value,
):
logger.debug(
f"{camera}: Move queue: PTZ moving, dequeueing move request - frame time: {frame_time}, final pan: {pan}, final tilt: {tilt}, final zoom: {zoom}"
@@ -825,7 +815,7 @@ class PtzAutoTracker:
else:
if (
camera_config.onvif.autotracking.zooming
self.config.cameras[camera].onvif.autotracking.zooming
== ZoomingModeEnum.relative
):
await self.onvif._move_relative(camera, pan, tilt, zoom, 1)
@@ -834,22 +824,25 @@ class PtzAutoTracker:
await self.onvif._move_relative(camera, pan, tilt, 0, 1)
# Wait until the camera finishes moving
while not metrics.motor_stopped.is_set():
while not self.ptz_metrics[camera].motor_stopped.is_set():
await self.onvif.get_camera_status(camera)
if zoom > 0 and metrics.zoom_level.value != zoom:
if (
zoom > 0
and self.ptz_metrics[camera].zoom_level.value != zoom
):
await self.onvif._zoom_absolute(camera, zoom, 1)
# Wait until the camera finishes moving
while not metrics.motor_stopped.is_set():
while not self.ptz_metrics[camera].motor_stopped.is_set():
await self.onvif.get_camera_status(camera)
if camera_config.onvif.autotracking.movement_weights:
if self.config.cameras[camera].onvif.autotracking.movement_weights:
logger.debug(
f"{camera}: Predicted movement time: {self._predict_movement_time(camera, pan, tilt)}"
)
logger.debug(
f"{camera}: Actual movement time: {metrics.stop_time.value - metrics.start_time.value}"
f"{camera}: Actual movement time: {self.ptz_metrics[camera].stop_time.value - self.ptz_metrics[camera].start_time.value}"
)
# save metrics for better estimate calculations
@@ -858,15 +851,21 @@ class PtzAutoTracker:
and len(self.move_metrics[camera])
< AUTOTRACKING_MAX_MOVE_METRICS
and (pan != 0 or tilt != 0)
and camera_config.onvif.autotracking.calibrate_on_startup
and self.config.cameras[
camera
].onvif.autotracking.calibrate_on_startup
):
logger.debug(f"{camera}: Adding new values to move metrics")
self.move_metrics[camera].append(
{
"pan": pan,
"tilt": tilt,
"start_timestamp": metrics.start_time.value,
"end_timestamp": metrics.stop_time.value,
"start_timestamp": self.ptz_metrics[
camera
].start_time.value,
"end_timestamp": self.ptz_metrics[
camera
].stop_time.value,
}
)
+55 -65
View File
@@ -180,11 +180,6 @@ class OnvifController:
return False
async def _init_onvif(self, camera_name: str) -> bool:
camera_config = self.config.cameras.get(camera_name)
if camera_config is None:
return False
onvif: ONVIFCamera = self.cams[camera_name]["onvif"]
try:
await onvif.update_xaddrs()
@@ -240,7 +235,7 @@ class OnvifController:
p.token,
)
configured_profile = camera_config.onvif.profile
configured_profile = self.config.cameras[camera_name].onvif.profile
profile = None
if configured_profile is not None:
@@ -344,7 +339,7 @@ class OnvifController:
except (AttributeError, TypeError):
fov_space_id = None
autotracking_config = camera_config.onvif.autotracking
autotracking_config = self.config.cameras[camera_name].onvif.autotracking
autotracking_enabled = (
autotracking_config.enabled_in_config and autotracking_config.enabled
)
@@ -619,11 +614,6 @@ class OnvifController:
logger.error(f"{camera_name} does not support ONVIF RelativeMove (FOV).")
return
metrics = self.ptz_metrics.get(camera_name)
if metrics is None:
return
logger.debug(
f"{camera_name} called RelativeMove: pan: {pan} tilt: {tilt} zoom: {zoom}"
)
@@ -637,11 +627,15 @@ class OnvifController:
self.cams[camera_name]["active"] = True
# only track start_time for autotracking
if metrics.autotracker_enabled.value:
metrics.motor_stopped.clear()
logger.debug(f"{camera_name}: PTZ start time: {metrics.frame_time.value}")
metrics.start_time.value = metrics.frame_time.value
metrics.stop_time.value = 0
if self.ptz_metrics[camera_name].autotracker_enabled.value:
self.ptz_metrics[camera_name].motor_stopped.clear()
logger.debug(
f"{camera_name}: PTZ start time: {self.ptz_metrics[camera_name].frame_time.value}"
)
self.ptz_metrics[camera_name].start_time.value = self.ptz_metrics[
camera_name
].frame_time.value
self.ptz_metrics[camera_name].stop_time.value = 0
move_request = self.cams[camera_name]["relative_move_request"]
@@ -703,14 +697,9 @@ class OnvifController:
logger.error(f"{preset} is not a valid preset for {camera_name}")
return
metrics = self.ptz_metrics.get(camera_name)
if metrics is None:
return
self.cams[camera_name]["active"] = True
metrics.start_time.value = 0
metrics.stop_time.value = 0
self.ptz_metrics[camera_name].start_time.value = 0
self.ptz_metrics[camera_name].stop_time.value = 0
move_request = self.cams[camera_name]["move_request"]
preset_token = self.cams[camera_name]["presets"][preset]
@@ -749,11 +738,6 @@ class OnvifController:
logger.error(f"{camera_name} does not support ONVIF AbsoluteMove zooming.")
return
metrics = self.ptz_metrics.get(camera_name)
if metrics is None:
return
logger.debug(f"{camera_name} called AbsoluteMove: zoom: {zoom}")
if self.cams[camera_name]["active"]:
@@ -763,10 +747,14 @@ class OnvifController:
return
self.cams[camera_name]["active"] = True
metrics.motor_stopped.clear()
logger.debug(f"{camera_name}: PTZ start time: {metrics.frame_time.value}")
metrics.start_time.value = metrics.frame_time.value
metrics.stop_time.value = 0
self.ptz_metrics[camera_name].motor_stopped.clear()
logger.debug(
f"{camera_name}: PTZ start time: {self.ptz_metrics[camera_name].frame_time.value}"
)
self.ptz_metrics[camera_name].start_time.value = self.ptz_metrics[
camera_name
].frame_time.value
self.ptz_metrics[camera_name].stop_time.value = 0
move_request = self.cams[camera_name]["absolute_move_request"]
# function takes in 0 to 1 for zoom, interpolate to the values of the camera.
@@ -887,18 +875,16 @@ class OnvifController:
Returns camera details including features and presets if available.
"""
camera_config = self.config.cameras.get(camera_name)
if camera_config is None:
return {}
if not camera_config.enabled:
if not self.config.cameras[camera_name].enabled:
logger.debug(
f"Camera {camera_name} disabled, won't try to initialize ONVIF"
)
return {}
if camera_name not in self.cams.keys() and (not camera_config.onvif.host):
if camera_name not in self.cams.keys() and (
camera_name not in self.config.cameras
or not self.config.cameras[camera_name].onvif.host
):
logger.debug(f"ONVIF is not configured for {camera_name}")
return {}
@@ -999,12 +985,6 @@ class OnvifController:
logger.error(f"ONVIF is not configured for {camera_name}")
return
metrics = self.ptz_metrics.get(camera_name)
camera_config = self.config.cameras.get(camera_name)
if metrics is None or camera_config is None:
return
if not self.cams[camera_name]["init"]:
if not await self._init_onvif(camera_name):
return
@@ -1043,29 +1023,36 @@ class OnvifController:
zoom_status is None or zoom_status == "IDLE"
):
self.cams[camera_name]["active"] = False
if not metrics.motor_stopped.is_set():
metrics.motor_stopped.set()
if not self.ptz_metrics[camera_name].motor_stopped.is_set():
self.ptz_metrics[camera_name].motor_stopped.set()
logger.debug(
f"{camera_name}: PTZ stop time: {metrics.frame_time.value}"
f"{camera_name}: PTZ stop time: {self.ptz_metrics[camera_name].frame_time.value}"
)
metrics.stop_time.value = metrics.frame_time.value
self.ptz_metrics[camera_name].stop_time.value = self.ptz_metrics[
camera_name
].frame_time.value
else:
self.cams[camera_name]["active"] = True
if metrics.motor_stopped.is_set():
metrics.motor_stopped.clear()
if self.ptz_metrics[camera_name].motor_stopped.is_set():
self.ptz_metrics[camera_name].motor_stopped.clear()
logger.debug(
f"{camera_name}: PTZ start time: {metrics.frame_time.value}"
f"{camera_name}: PTZ start time: {self.ptz_metrics[camera_name].frame_time.value}"
)
metrics.start_time.value = metrics.frame_time.value
metrics.stop_time.value = 0
self.ptz_metrics[camera_name].start_time.value = self.ptz_metrics[
camera_name
].frame_time.value
self.ptz_metrics[camera_name].stop_time.value = 0
if camera_config.onvif.autotracking.zooming != ZoomingModeEnum.disabled:
if (
self.config.cameras[camera_name].onvif.autotracking.zooming
!= ZoomingModeEnum.disabled
):
# store absolute zoom level as 0 to 1 interpolated from the values of the camera
metrics.zoom_level.value = numpy.interp(
self.ptz_metrics[camera_name].zoom_level.value = numpy.interp(
round(status.Position.Zoom.x, 2),
[
self.cams[camera_name]["absolute_zoom_range"]["XRange"]["Min"],
@@ -1074,22 +1061,25 @@ class OnvifController:
[0, 1],
)
logger.debug(
f"{camera_name}: Camera zoom level: {metrics.zoom_level.value}"
f"{camera_name}: Camera zoom level: {self.ptz_metrics[camera_name].zoom_level.value}"
)
# some hikvision cams won't update MoveStatus, so warn if it hasn't changed
if (
not metrics.motor_stopped.is_set()
and not metrics.reset.is_set()
and metrics.start_time.value != 0
and metrics.frame_time.value > (metrics.start_time.value + 10)
and metrics.stop_time.value == 0
not self.ptz_metrics[camera_name].motor_stopped.is_set()
and not self.ptz_metrics[camera_name].reset.is_set()
and self.ptz_metrics[camera_name].start_time.value != 0
and self.ptz_metrics[camera_name].frame_time.value
> (self.ptz_metrics[camera_name].start_time.value + 10)
and self.ptz_metrics[camera_name].stop_time.value == 0
):
logger.debug(
f"Start time: {metrics.start_time.value}, Stop time: {metrics.stop_time.value}, Frame time: {metrics.frame_time.value}"
f"Start time: {self.ptz_metrics[camera_name].start_time.value}, Stop time: {self.ptz_metrics[camera_name].stop_time.value}, Frame time: {self.ptz_metrics[camera_name].frame_time.value}"
)
# set the stop time so we don't come back into this again and spam the logs
metrics.stop_time.value = metrics.frame_time.value
self.ptz_metrics[camera_name].stop_time.value = self.ptz_metrics[
camera_name
].frame_time.value
logger.warning(
f"Camera {camera_name} is still in ONVIF 'MOVING' status."
)
+2 -6
View File
@@ -745,9 +745,7 @@ class RecordingMaintainer(threading.Thread):
regions,
) = data
camera_config = self.config.cameras.get(camera)
if camera_config is not None and camera_config.record.enabled:
if self.config.cameras[camera].record.enabled:
self.object_recordings_info[camera].append(
(
frame_time,
@@ -764,9 +762,7 @@ class RecordingMaintainer(threading.Thread):
audio_detections,
) = data
camera_config = self.config.cameras.get(camera)
if camera_config is not None and camera_config.record.enabled:
if self.config.cameras[camera].record.enabled:
self.audio_recordings_info[camera].append(
(
frame_time,
-9
View File
@@ -418,11 +418,6 @@ class ReviewSegmentMaintainer(threading.Thread):
return None
def _handle_camera_removed(self, camera: str) -> None:
"""Close out a deleted camera's segment so a reused name cannot inherit it."""
self.forcibly_end_segment(camera)
self.indefinite_events.pop(camera, None)
def update_existing_segment(
self,
segment: PendingReviewSegment,
@@ -671,10 +666,6 @@ class ReviewSegmentMaintainer(threading.Thread):
for camera in updated_topics["enabled"]:
self.forcibly_end_segment(camera)
if "remove" in updated_topics:
for camera in updated_topics["remove"]:
self._handle_camera_removed(camera)
result = self.detection_subscriber.check_for_update(timeout=1)
if not result:
@@ -2,6 +2,7 @@
from unittest.mock import patch
from frigate.jobs.debug_replay import NoRecordingsError
from frigate.models import Event, Recordings, ReviewSegment
from frigate.test.http_api.base_http_test import AuthTestClient, BaseTestHttp
@@ -66,6 +67,32 @@ class TestDebugReplayAPI(BaseTestHttp):
# (CodeQL: information exposure through an exception).
self.assertEqual(body["message"], "Invalid debug replay parameters")
def test_start_returns_404_when_no_recordings(self):
with patch(
"frigate.api.debug_replay.start_debug_replay_job",
side_effect=NoRecordingsError(
"No recordings found for camera 'front' in the specified time range"
),
):
with AuthTestClient(self.app) as client:
resp = client.post(
"/debug_replay/start",
json={
"camera": "front",
"start_time": 100,
"end_time": 200,
},
)
self.assertEqual(resp.status_code, 404)
body = resp.json()
self.assertFalse(body["success"])
# Message is hard-coded so we don't echo exception text back to clients
# (CodeQL: information exposure through an exception).
self.assertEqual(
body["message"], "No recordings found in the selected time range"
)
def test_start_returns_409_when_session_already_active(self):
with patch(
"frigate.api.debug_replay.start_debug_replay_job",
@@ -440,3 +440,68 @@ class TestGo2rtcStreamAccess(BaseTestHttp):
f"limited_user should be denied on alias back_door_main; "
f"got {resp.status_code}"
)
class TestReviewSummaryAccess(BaseTestHttp):
"""Tests for POST /review/summarize/start/{start_ts}/end/{end_ts}.
The summary correlates each flagged event with overlapping activity on
other cameras, so it is gated on full camera access rather than scoped to
the caller's cameras. These tests pin that decision so the dependency is
not loosened without first scoping the query.
GenAI is not configured in unit tests, so an authorized request returns 400
while an unauthorized one is rejected with 403 before the handler runs.
"""
def setUp(self):
super().setUp([Event, ReviewSegment, Recordings])
self.minimal_config = _MULTI_CAMERA_CONFIG
self.app = super().create_app()
def tearDown(self):
self.app.dependency_overrides.clear()
super().tearDown()
def _summarize(self, allowed_cameras: list[str]):
async def mock_cameras(request: Request):
return allowed_cameras
self.app.dependency_overrides[get_allowed_cameras_for_filter] = mock_cameras
with AuthTestClient(self.app) as client:
return client.post("/review/summarize/start/0/end/9999999999")
def _assert_allowed(self, resp):
assert resp.status_code not in (401, 403), (
f"Caller should not be blocked; got {resp.status_code}"
)
def test_partial_camera_access_blocked(self):
assert self._summarize(["front_door"]).status_code == 403
def test_no_camera_access_blocked(self):
assert self._summarize([]).status_code == 403
def test_full_camera_access_allowed(self):
# Covers admin and viewer, which always resolve to every camera, and a
# custom role whose list happens to name them all.
self._assert_allowed(self._summarize(["front_door", "back_door"]))
def _summarize_as_role(self, role: str):
"""Summarize using the real role to allowed-cameras resolution."""
self.app.dependency_overrides.pop(get_allowed_cameras_for_filter, None)
with AuthTestClient(self.app) as client:
return client.post(
"/review/summarize/start/0/end/9999999999",
headers={"remote-user": "test", "remote-role": role},
)
def test_viewer_role_allowed(self):
# viewer is never camera restricted, so it resolves to every camera.
self._assert_allowed(self._summarize_as_role("viewer"))
def test_admin_role_allowed(self):
self._assert_allowed(self._summarize_as_role("admin"))
def test_restricted_role_blocked(self):
assert self._summarize_as_role("limited_user").status_code == 403
+6 -29
View File
@@ -386,19 +386,9 @@ class TestConfigSetWildcardPropagation(BaseTestHttp):
guess (mode still equals the previous global) wrongly claims a camera
whose explicit yaml mode happens to match.
"""
self.minimal_config["birdseye"] = {
"enabled": True,
"mode": {"motion": True},
}
self.minimal_config["birdseye"] = {"enabled": True, "mode": "motion"}
# explicit override that matches the global value being replaced
self.minimal_config["cameras"]["front_door"]["birdseye"] = {
"mode": {
"continuous": False,
"motion": True,
"objects": False,
"stationary_objects": False,
}
}
self.minimal_config["cameras"]["front_door"]["birdseye"] = {"mode": "motion"}
config_path = self._write_config_file()
mock_find_config.return_value = config_path
@@ -409,16 +399,7 @@ class TestConfigSetWildcardPropagation(BaseTestHttp):
resp = client.put(
"/config/set",
json={
"config_data": {
"birdseye": {
"mode": {
"continuous": True,
"motion": False,
"objects": False,
"stationary_objects": False,
}
}
},
"config_data": {"birdseye": {"mode": "continuous"}},
"update_topic": "config/birdseye",
"requires_restart": 0,
},
@@ -430,7 +411,7 @@ class TestConfigSetWildcardPropagation(BaseTestHttp):
mock_publisher.publisher.publish.assert_called_once()
topic, settings = mock_publisher.publisher.publish.call_args[0]
self.assertEqual(topic, "config/birdseye")
self.assertEqual(settings.mode.to_mqtt_payload(), "CONTINUOUS")
self.assertEqual(settings.mode.value, "continuous")
published = {
call[0][0].camera: call[0][1]
@@ -444,12 +425,8 @@ class TestConfigSetWildcardPropagation(BaseTestHttp):
)
# the override survives, the inheriting camera follows global
self.assertEqual(
published["front_door"].mode.to_mqtt_payload(), "MOTION"
)
self.assertEqual(
published["back_yard"].mode.to_mqtt_payload(), "CONTINUOUS"
)
self.assertEqual(published["front_door"].mode.value, "motion")
self.assertEqual(published["back_yard"].mode.value, "continuous")
finally:
os.unlink(config_path)
-174
View File
@@ -1,73 +1,15 @@
"""Unit tests for recordings/media API endpoints."""
from dataclasses import dataclass
from datetime import UTC, datetime
from unittest.mock import patch
import pytz
from fastapi import Request
from frigate.api.auth import get_allowed_cameras_for_filter, get_current_user
from frigate.const import MAX_SEGMENT_DURATION
from frigate.models import Recordings
from frigate.test.http_api.base_http_test import AuthTestClient, BaseTestHttp
@dataclass(frozen=True)
class RangeCase:
"""Expected behavior for one segment relative to the requested range.
Offsets are seconds from REQUEST_START; the request ends at +100 seconds.
"""
name: str
start_offset: float
end_offset: float
included_in_recordings: bool
vod_clip_from_ms: int | None = None
vod_duration_ms: int | None = None
REQUEST_START = 1000
REQUEST_END = 1100
RANGE_CASES = (
RangeCase("before", -MAX_SEGMENT_DURATION + 1, -1, False),
RangeCase("meets_start", -10, 0, True),
RangeCase(
"overlaps_start",
-MAX_SEGMENT_DURATION + 0.5,
0.25,
True,
vod_clip_from_ms=599500,
vod_duration_ms=250,
),
RangeCase("starts_at_start", 0, 10, True, vod_duration_ms=10000),
RangeCase("inside", 20, 80, True, vod_duration_ms=60000),
RangeCase("ends_at_end", 90, 100, True, vod_duration_ms=10000),
RangeCase("matches_range", 0, 100, True, vod_duration_ms=100000),
RangeCase("starts_with_range", 0, 110, True, vod_duration_ms=100000),
RangeCase(
"covers_range",
-20,
120,
True,
vod_clip_from_ms=20000,
vod_duration_ms=100000,
),
RangeCase(
"ends_with_range",
-10,
100,
True,
vod_clip_from_ms=10000,
vod_duration_ms=100000,
),
RangeCase("overlaps_end", 95, 105, True, vod_duration_ms=5000),
RangeCase("starts_at_end", 100, 110, True),
RangeCase("after", 101, 110, False),
)
class TestHttpMedia(BaseTestHttp):
"""Test media API endpoints, particularly recordings with DST handling."""
@@ -102,26 +44,6 @@ class TestHttpMedia(BaseTestHttp):
self.app.dependency_overrides.clear()
super().tearDown()
def _assert_vod_response(
self,
response,
expected_clips: list[tuple[str, int | None, int]],
) -> None:
"""Assert VOD clip metadata and its derived duration fields."""
assert response.status_code == 200
vod = response.json()
assert [
(
clip["path"],
clip.get("clipFrom"),
clip["keyFrameDurations"][0],
)
for clip in vod["sequences"][0]["clips"]
] == expected_clips
expected_durations = [clip[2] for clip in expected_clips]
assert vod["durations"] == expected_durations
assert vod["segment_duration"] == max(expected_durations)
def test_recordings_summary_across_dst_spring_forward(self):
"""
Test recordings summary across spring DST transition (spring forward).
@@ -482,102 +404,6 @@ class TestHttpMedia(BaseTestHttp):
assert "2024-03-10" in summary
assert summary["2024-03-10"] is True
def test_recordings_handles_all_range_relations(self):
"""Recordings return every interval relation that touches the range."""
with AuthTestClient(self.app) as client:
for case in RANGE_CASES:
with self.subTest(case=case.name):
Recordings.delete().execute()
super().insert_mock_recording(
case.name,
REQUEST_START + case.start_offset,
REQUEST_START + case.end_offset,
)
response = client.get(
"/front_door/recordings",
params={"after": REQUEST_START, "before": REQUEST_END},
)
assert response.status_code == 200
expected_ids = [case.name] if case.included_in_recordings else []
assert [
recording["id"] for recording in response.json()
] == expected_ids
def test_vod_handles_all_range_relations(self):
"""VOD clips every interval relation with positive playback duration."""
with (
AuthTestClient(self.app) as client,
patch(
"frigate.api.media.get_keyframe_before",
side_effect=lambda _path, offset: offset,
),
):
for case in RANGE_CASES:
with self.subTest(case=case.name):
Recordings.delete().execute()
super().insert_mock_recording(
case.name,
REQUEST_START + case.start_offset,
REQUEST_START + case.end_offset,
)
response = client.get(
f"/vod/front_door/start/{REQUEST_START}/end/{REQUEST_END}"
)
if case.vod_duration_ms is None:
assert response.status_code == 404
continue
self._assert_vod_response(
response,
[
(
case.name,
case.vod_clip_from_ms,
case.vod_duration_ms,
)
],
)
def test_vod_handles_segment_ending_at_start_with_keyframe_fallbacks(self):
"""VOD keeps a boundary segment when keyframe lookup extends it."""
def keyframe_before(path: str, offset: int) -> int | None:
return offset - 1000 if path == "previous_keyframe" else None
with (
AuthTestClient(self.app) as client,
patch(
"frigate.api.media.get_keyframe_before",
side_effect=keyframe_before,
),
):
super().insert_mock_recording(
"previous_keyframe",
REQUEST_START - 10,
REQUEST_START,
)
super().insert_mock_recording(
"missing_keyframe",
REQUEST_START - 5,
REQUEST_START,
)
response = client.get(
f"/vod/front_door/start/{REQUEST_START}/end/{REQUEST_END}"
)
self._assert_vod_response(
response,
[
("previous_keyframe", 9000, 1000),
("missing_keyframe", None, 5000),
],
)
def test_recordings_unavailable_reports_gap_between_recordings(self):
"""A gap between two recordings is reported as an unavailable segment."""
with AuthTestClient(self.app) as client:
+113
View File
@@ -0,0 +1,113 @@
"""Tests for password change authorization."""
from fastapi import Request
from frigate.api.auth import get_current_user, hash_password, verify_password
from frigate.models import Event, Recordings, ReviewSegment, User
from frigate.test.http_api.base_http_test import AuthTestClient, BaseTestHttp
# Config carrying a custom role, which is the class of user the literal
# "viewer" check used to let through.
_CUSTOM_ROLE_CONFIG = {
"mqtt": {"host": "mqtt"},
"auth": {"roles": {"neighbor": ["front_door"]}, "hash_iterations": 10},
"cameras": {
"front_door": {
"ffmpeg": {
"inputs": [{"path": "rtsp://10.0.0.1:554/video", "roles": ["detect"]}]
},
"detect": {"height": 1080, "width": 1920, "fps": 5},
},
},
}
ADMIN_PASSWORD = "admin-real-password"
NEW_PASSWORD = "AttackerChosenPassword123!"
class TestUpdatePasswordAccess(BaseTestHttp):
def setUp(self):
super().setUp([Event, ReviewSegment, Recordings, User])
self.minimal_config = _CUSTOM_ROLE_CONFIG
self.app = super().create_app()
User.insert(
username="admin",
password_hash=hash_password(ADMIN_PASSWORD, iterations=10),
role="admin",
notification_tokens=[],
).execute()
async def mock_get_current_user(request: Request):
return {
"username": request.headers.get("remote-user"),
"role": request.headers.get("remote-role"),
}
self.app.dependency_overrides[get_current_user] = mock_get_current_user
def tearDown(self):
self.app.dependency_overrides.clear()
super().tearDown()
def _change_password(self, actor: str, role: str, target: str, old_password: str):
with AuthTestClient(self.app) as client:
return client.put(
f"/users/{target}/password",
json={"password": NEW_PASSWORD, "old_password": old_password},
headers={"remote-user": actor, "remote-role": role},
)
def _admin_password_unchanged(self) -> bool:
return verify_password(ADMIN_PASSWORD, User.get_by_id("admin").password_hash)
def test_custom_role_cannot_target_another_account(self):
resp = self._change_password("neighbor", "neighbor", "admin", "wrong-guess")
assert resp.status_code == 403
assert self._admin_password_unchanged()
def test_custom_role_cannot_target_another_account_with_correct_password(self):
# The 403 must land before old_password is checked, so knowing the
# target's password is not a way through
resp = self._change_password("neighbor", "neighbor", "admin", ADMIN_PASSWORD)
assert resp.status_code == 403
assert self._admin_password_unchanged()
def test_viewer_cannot_target_another_account(self):
resp = self._change_password("viewer_user", "viewer", "admin", ADMIN_PASSWORD)
assert resp.status_code == 403
assert self._admin_password_unchanged()
def test_admin_can_target_another_account(self):
User.insert(
username="neighbor",
password_hash=hash_password("neighbor-password", iterations=10),
role="neighbor",
notification_tokens=[],
).execute()
resp = self._change_password("admin", "admin", "neighbor", "")
assert resp.status_code == 200
def test_non_admin_can_change_own_password(self):
User.insert(
username="neighbor",
password_hash=hash_password("neighbor-password", iterations=10),
role="neighbor",
notification_tokens=[],
).execute()
resp = self._change_password(
"neighbor", "neighbor", "neighbor", "neighbor-password"
)
assert resp.status_code == 200
def test_non_admin_own_password_still_requires_old_password(self):
User.insert(
username="neighbor",
password_hash=hash_password("neighbor-password", iterations=10),
role="neighbor",
notification_tokens=[],
).execute()
resp = self._change_password("neighbor", "neighbor", "neighbor", "wrong-guess")
assert resp.status_code == 401
+4 -267
View File
@@ -1,70 +1,13 @@
"""Tests for Birdseye canvas sizing and layout behavior."""
"""Test camera user and password cleanup."""
import multiprocessing as mp
import unittest
from unittest.mock import Mock
from frigate.config import BirdseyeModeConfig, FrigateConfig
from frigate.output.birdseye import (
Birdseye,
BirdseyeActivity,
BirdsEyeFrameManager,
get_canvas_shape,
)
from frigate.config import FrigateConfig
from frigate.output.birdseye import BirdsEyeFrameManager, get_canvas_shape
class TestBirdseye(unittest.TestCase):
def _build_manager(
self, camera_dimensions: dict[str, tuple[int, int]]
) -> BirdsEyeFrameManager:
config = {
"mqtt": {"host": "mqtt"},
"birdseye": {"width": 1280, "height": 720},
"cameras": {},
}
for order, (camera, dimensions) in enumerate(
camera_dimensions.items(), start=1
):
config["cameras"][camera] = {
"ffmpeg": {
"inputs": [
{
"path": f"rtsp://10.0.0.1:554/{camera}",
"roles": ["detect"],
}
]
},
"detect": {
"width": dimensions[0],
"height": dimensions[1],
"fps": 5,
},
"birdseye": {"order": order},
}
return BirdsEyeFrameManager(FrigateConfig(**config), mp.Event())
def _assert_no_overlaps(
self, layout: list[list[tuple[str, tuple[int, int, int, int]]]]
):
rectangles = [position for row in layout for _, position in row]
for index, rect in enumerate(rectangles):
x1, y1, width1, height1 = rect
for other in rectangles[index + 1 :]:
x2, y2, width2, height2 = other
overlap = (
x1 < x2 + width2
and x2 < x1 + width1
and y1 < y2 + height2
and y2 < y1 + height1
)
self.assertFalse(
overlap,
msg=f"Overlapping rectangles found: {rect} and {other}",
)
def test_16x9(self):
"""Test 16x9 aspect ratio works as expected for birdseye."""
width = 1280
@@ -105,212 +48,6 @@ class TestBirdseye(unittest.TestCase):
assert canvas_width == width # width will be the same
assert canvas_height != height
def test_portrait_camera_does_not_overlap_next_row(self):
"""Portrait cameras should reserve their real horizontal position on the next row."""
manager = self._build_manager(
{
"cam_a": (1280, 720),
"cam_p": (360, 640),
"cam_b": (1280, 720),
"cam_c": (640, 480),
}
)
layout = manager.calculate_layout(["cam_a", "cam_p", "cam_b", "cam_c"], 3)
self.assertIsNotNone(layout)
assert layout is not None
self._assert_no_overlaps(layout)
cam_c = [
position for row in layout for camera, position in row if camera == "cam_c"
][0]
self.assertEqual(cam_c[0], 0)
def test_portrait_reservation_only_applies_to_next_row(self):
"""Portrait reservations should not push later rows after the span ends."""
manager = self._build_manager(
{
"cam_a": (1280, 720),
"cam_p": (360, 640),
"cam_b": (1280, 720),
"cam_c": (1280, 720),
"cam_d": (1280, 720),
"cam_e": (1280, 720),
}
)
layout = manager.calculate_layout(
["cam_a", "cam_p", "cam_b", "cam_c", "cam_d", "cam_e"],
3,
)
self.assertIsNotNone(layout)
assert layout is not None
self._assert_no_overlaps(layout)
cam_e = [
position for row in layout for camera, position in row if camera == "cam_e"
][0]
self.assertEqual(cam_e[0], 0)
def test_multiple_portraits_reserve_distinct_ranges(self):
"""Multiple portrait cameras in one row should reserve separate spans below them."""
manager = self._build_manager(
{
"cam_a": (640, 480),
"cam_p1": (360, 640),
"cam_p2": (360, 640),
"cam_b": (640, 480),
"cam_c": (1280, 720),
"cam_d": (640, 480),
}
)
layout = manager.calculate_layout(
["cam_a", "cam_p1", "cam_p2", "cam_b", "cam_c", "cam_d"],
4,
)
self.assertIsNotNone(layout)
assert layout is not None
self._assert_no_overlaps(layout)
def test_two_landscapes_then_portrait_then_two_landscapes(self):
"""A portrait after two landscapes should reserve only its own tail span."""
manager = self._build_manager(
{
"cam_a": (1280, 720),
"cam_b": (1280, 720),
"cam_p": (360, 640),
"cam_c": (1280, 720),
"cam_d": (1280, 720),
}
)
layout = manager.calculate_layout(
["cam_a", "cam_b", "cam_p", "cam_c", "cam_d"],
3,
)
self.assertIsNotNone(layout)
assert layout is not None
self._assert_no_overlaps(layout)
cam_c = [
position for row in layout for camera, position in row if camera == "cam_c"
][0]
cam_d = [
position for row in layout for camera, position in row if camera == "cam_d"
][0]
self.assertEqual(cam_c[0], 0)
self.assertEqual(cam_d[0], cam_c[0] + cam_c[2])
class TestBirdseyeActivity(unittest.TestCase):
"""Test which camera activity is included in each Birdseye mode."""
def setUp(self):
config = {
"mqtt": {"enabled": False},
"birdseye": {
"enabled": True,
"mode": {
"motion": True,
"objects": True,
"stationary_objects": True,
},
},
"cameras": {
"front": {
"ffmpeg": {
"inputs": [
{"path": "rtsp://10.0.0.1:554/video", "roles": ["detect"]}
]
},
"detect": {"height": 1080, "width": 1920, "fps": 5},
}
},
}
self.manager = BirdsEyeFrameManager(FrigateConfig(**config), mp.Event())
def test_existing_modes_keep_their_activity_rules(self):
continuous = BirdseyeModeConfig(continuous=True)
motion = BirdseyeModeConfig(motion=True)
objects = BirdseyeModeConfig(objects=True)
no_activity = BirdseyeActivity(False, False, False)
motion_activity = BirdseyeActivity(False, False, True)
stationary_activity = BirdseyeActivity(False, True, False)
active_object_activity = BirdseyeActivity(True, False, False)
assert self.manager.camera_active(continuous, no_activity)
assert self.manager.camera_active(motion, motion_activity)
assert not self.manager.camera_active(motion, stationary_activity)
assert self.manager.camera_active(objects, active_object_activity)
assert not self.manager.camera_active(objects, stationary_activity)
def test_modes_can_be_combined(self):
mode = BirdseyeModeConfig(motion=True, stationary_objects=True)
assert self.manager.camera_active(mode, BirdseyeActivity(False, False, True))
assert self.manager.camera_active(mode, BirdseyeActivity(False, True, False))
assert not self.manager.camera_active(
mode, BirdseyeActivity(False, False, False)
)
def test_stationary_objects_are_independent_from_active_objects(self):
stationary_objects = BirdseyeModeConfig(stationary_objects=True)
assert self.manager.camera_active(
stationary_objects, BirdseyeActivity(False, True, False)
)
assert not self.manager.camera_active(
stationary_objects, BirdseyeActivity(True, False, False)
)
def test_write_data_preserves_active_and_confirms_stationary_activity(self):
birdseye = Birdseye.__new__(Birdseye)
birdseye.birdseye_manager = Mock()
birdseye.birdseye_manager.update.return_value = (False, False)
birdseye._idle_interval = None
frame = Mock()
birdseye.write_data(
"front",
[
{"stationary": True, "false_positive": True},
{"stationary": False, "false_positive": True},
{"stationary": True, "false_positive": False},
],
[[0, 0, 10, 10]],
1.0,
frame,
)
birdseye.birdseye_manager.update.assert_called_once_with(
"front", BirdseyeActivity(True, True, True), 1.0, frame
)
def test_stationary_false_positive_does_not_activate_birdseye(self):
birdseye = Birdseye.__new__(Birdseye)
birdseye.birdseye_manager = Mock()
birdseye.birdseye_manager.update.return_value = (False, False)
birdseye._idle_interval = None
frame = Mock()
birdseye.write_data(
"front",
[{"stationary": True, "false_positive": True}],
[],
1.0,
frame,
)
birdseye.birdseye_manager.update.assert_called_once_with(
"front", BirdseyeActivity(False, False, False), 1.0, frame
)
class TestBirdseyeCameraOrder(unittest.TestCase):
"""Test that birdseye reacts to camera order changes without a restart."""
@@ -318,7 +55,7 @@ class TestBirdseyeCameraOrder(unittest.TestCase):
def setUp(self):
config = {
"mqtt": {"enabled": False},
"birdseye": {"enabled": True, "mode": {"continuous": True}},
"birdseye": {"enabled": True, "mode": "continuous"},
"cameras": {
camera: {
"ffmpeg": {
-227
View File
@@ -1,227 +0,0 @@
"""Regression tests for runtime camera add and delete handling."""
import asyncio
import threading
import unittest
from types import SimpleNamespace
from unittest.mock import MagicMock
# LicensePlatePostProcessor is imported via the maintainer rather than from
# data_processing.post.license_plate, which circularly imports back through
# frigate.embeddings before that package finishes initializing
from frigate.embeddings.maintainer import (
EmbeddingMaintainer,
LicensePlatePostProcessor,
)
from frigate.ptz.autotrack import PtzAutoTracker
from frigate.review.maintainer import ReviewSegmentMaintainer
from frigate.track.object_processing import TrackedObjectProcessor
def _make_processor() -> TrackedObjectProcessor:
"""Build a processor with no cameras, bypassing __init__."""
processor = TrackedObjectProcessor.__new__(TrackedObjectProcessor)
processor.camera_states = {}
processor.camera_states_lock = threading.Lock()
processor.config = SimpleNamespace(cameras={})
processor.event_sender = MagicMock()
processor.detection_publisher = MagicMock()
processor.ongoing_manual_events = {}
return processor
class TestObjectProcessorUnknownCamera(unittest.TestCase):
def test_save_lpr_snapshot_ignores_unknown_camera(self):
processor = _make_processor()
# 1x1 png, base64; decoding must not be what fails
payload = (
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
"1234.5-abcdef",
"deleted_cam",
)
processor.save_lpr_snapshot(payload)
processor.event_sender.publish.assert_not_called()
def test_create_manual_event_ignores_unknown_camera(self):
processor = _make_processor()
payload = (
1234.5,
"deleted_cam",
"person",
"1234.5-abcdef",
True,
0.9,
None,
None,
"api",
False,
None,
)
processor.create_manual_event(payload)
processor.event_sender.publish.assert_not_called()
self.assertEqual(processor.ongoing_manual_events, {})
def test_create_lpr_event_ignores_unknown_camera(self):
processor = _make_processor()
payload = (
1234.5,
"deleted_cam",
"license_plate",
"1234.5-abcdef",
True,
0.9,
None,
"ABC123",
)
processor.create_lpr_event(payload)
processor.event_sender.publish.assert_not_called()
self.assertEqual(processor.ongoing_manual_events, {})
def test_create_manual_event_ignores_camera_added_but_not_yet_drained(self):
"""The add window: present in config.cameras, absent from camera_states.
debug_replay writes the camera into the shared config before publishing
add, so a guard on config.cameras passes here and falls through to
camera_states. This test fails against such a guard.
"""
processor = _make_processor()
processor.config = SimpleNamespace(
cameras={
"new_cam": SimpleNamespace(
record=SimpleNamespace(event_pre_capture=5, enabled=True)
)
}
)
payload = (
1234.5,
"new_cam",
"person",
"1234.5-abcdef",
True,
0.9,
None,
None,
"api",
False,
None,
)
processor.create_manual_event(payload)
processor.event_sender.publish.assert_not_called()
class TestEmbeddingsUnknownCamera(unittest.TestCase):
def _make_maintainer(self) -> EmbeddingMaintainer:
maintainer = EmbeddingMaintainer.__new__(EmbeddingMaintainer)
maintainer.config = SimpleNamespace(cameras={})
maintainer.event_end_subscriber = MagicMock()
maintainer.realtime_processors = [MagicMock()]
# spec is required: the dispatch loop is a chain of isinstance checks,
# and a bare MagicMock matches none of them, so the crashing branch
# would never run and the test would pass against unfixed code
maintainer.post_processors = [MagicMock(spec=LicensePlatePostProcessor)]
maintainer.detected_license_plates = {"1234.5-abcdef": {"obj_data": {}}}
maintainer.recordings_available_through = {"deleted_cam": 1234.5}
maintainer.event_metadata_publisher = MagicMock()
return maintainer
def test_process_finalized_skips_unknown_camera(self):
maintainer = self._make_maintainer()
# updated_db=False bypasses the Event.get branch, which would hit the
# database and mask the KeyError this test is about
maintainer.event_end_subscriber.check_for_update.side_effect = [
("1234.5-abcdef", "deleted_cam", False),
None,
]
maintainer._process_finalized()
maintainer.post_processors[0].process_data.assert_not_called()
def test_process_finalized_still_expires_realtime_state(self):
"""The guard must not skip per-event cleanup, only post processing."""
maintainer = self._make_maintainer()
maintainer.event_end_subscriber.check_for_update.side_effect = [
("1234.5-abcdef", "deleted_cam", False),
None,
]
maintainer._process_finalized()
maintainer.realtime_processors[0].expire_object.assert_called_once_with(
"1234.5-abcdef", "deleted_cam"
)
def test_expire_dedicated_lpr_drops_entry_for_unknown_camera(self):
maintainer = self._make_maintainer()
maintainer.detected_license_plates = {
"1234.5-abcdef": {"camera": "deleted_cam", "last_seen": 1.0}
}
maintainer._expire_dedicated_lpr()
self.assertEqual(maintainer.detected_license_plates, {})
class TestReviewMaintainerRemoval(unittest.TestCase):
def test_camera_removal_ends_segment_and_clears_state(self):
maintainer = ReviewSegmentMaintainer.__new__(ReviewSegmentMaintainer)
maintainer.active_review_segments = {"deleted_cam": MagicMock()}
maintainer.indefinite_events = {"deleted_cam": {"1234.5-abcdef": 1.0}}
maintainer.forcibly_end_segment = MagicMock()
maintainer._handle_camera_removed("deleted_cam")
maintainer.forcibly_end_segment.assert_called_once_with("deleted_cam")
self.assertNotIn("deleted_cam", maintainer.indefinite_events)
class TestAutotrackerMoveQueue(unittest.TestCase):
def test_move_queue_drops_move_for_removed_camera(self):
tracker = PtzAutoTracker.__new__(PtzAutoTracker)
tracker.stop_event = MagicMock()
# one pass through the loop, then stop
tracker.stop_event.is_set.side_effect = [False, True]
tracker.ptz_metrics = {}
tracker.move_queues = {"deleted_cam": asyncio.Queue()}
tracker.move_queue_locks = {"deleted_cam": asyncio.Lock()}
tracker.onvif = MagicMock()
tracker.config = SimpleNamespace(cameras={})
tracker.move_queues["deleted_cam"].put_nowait((1234.5, 0.1, 0.1, 0.0))
asyncio.run(tracker._process_move_queue("deleted_cam"))
tracker.onvif._move_relative.assert_not_called()
class TestCameraStateAccessors(unittest.TestCase):
def test_get_camera_state_returns_none_for_unknown_camera(self):
processor = _make_processor()
self.assertIsNone(processor.get_camera_state("deleted_cam"))
def test_get_camera_states_returns_a_snapshot_not_a_view(self):
"""A live values() view raises RuntimeError if the writer pops mid-iteration."""
processor = _make_processor()
processor.camera_states = {"one": MagicMock(), "two": MagicMock()}
states = processor.get_camera_states()
processor.camera_states.pop("one")
self.assertEqual(len(states), 2)
def test_get_current_frame_time_is_zero_for_unknown_camera(self):
processor = _make_processor()
self.assertEqual(processor.get_current_frame_time("deleted_cam"), 0.0)
+9 -100
View File
@@ -7,7 +7,7 @@ import numpy as np
from pydantic import ValidationError
from ruamel.yaml.constructor import DuplicateKeyError
from frigate.config import FrigateConfig
from frigate.config import BirdseyeModeEnum, FrigateConfig
from frigate.const import MODEL_CACHE_DIR
from frigate.detectors import DetectorTypeEnum
from frigate.util.builtin import deep_merge
@@ -170,7 +170,7 @@ class TestConfig(unittest.TestCase):
def test_override_birdseye(self):
config = {
"mqtt": {"host": "mqtt"},
"birdseye": {"enabled": True, "mode": {"continuous": True}},
"birdseye": {"enabled": True, "mode": "continuous"},
"cameras": {
"back": {
"ffmpeg": {
@@ -183,30 +183,19 @@ class TestConfig(unittest.TestCase):
"width": 1920,
"fps": 5,
},
"birdseye": {
"enabled": False,
"mode": {"continuous": False, "motion": True},
},
"birdseye": {"enabled": False, "mode": "motion"},
}
},
}
frigate_config = FrigateConfig(**config)
assert not frigate_config.cameras["back"].birdseye.enabled
mode = frigate_config.cameras["back"].birdseye.mode
assert mode.motion
assert not mode.continuous
assert not mode.objects
assert not mode.stationary_objects
assert frigate_config.cameras["back"].birdseye.mode is BirdseyeModeEnum.motion
def test_override_birdseye_non_inheritable(self):
config = {
"mqtt": {"host": "mqtt"},
"birdseye": {
"enabled": True,
"mode": {"continuous": True},
"height": 1920,
},
"birdseye": {"enabled": True, "mode": "continuous", "height": 1920},
"cameras": {
"back": {
"ffmpeg": {
@@ -229,7 +218,7 @@ class TestConfig(unittest.TestCase):
def test_inherit_birdseye(self):
config = {
"mqtt": {"host": "mqtt"},
"birdseye": {"enabled": True, "mode": {"continuous": True}},
"birdseye": {"enabled": True, "mode": "continuous"},
"cameras": {
"back": {
"ffmpeg": {
@@ -248,89 +237,9 @@ class TestConfig(unittest.TestCase):
frigate_config = FrigateConfig(**config)
assert frigate_config.cameras["back"].birdseye.enabled
mode = frigate_config.cameras["back"].birdseye.mode
assert mode.continuous
assert not mode.motion
assert not mode.objects
assert not mode.stationary_objects
def test_combine_birdseye_activity_types(self):
config = {
**self.minimal,
"birdseye": {
"mode": {
"motion": True,
"stationary_objects": True,
}
},
}
frigate_config = FrigateConfig(**config)
mode = frigate_config.cameras["back"].birdseye.mode
assert mode.motion
assert mode.stationary_objects
assert not mode.continuous
assert not mode.objects
def test_birdseye_requires_an_activity_type(self):
config = {
**self.minimal,
"birdseye": {
"mode": {
"continuous": False,
"motion": False,
"objects": False,
"stationary_objects": False,
}
},
}
with self.assertRaisesRegex(
ValidationError, "must enable at least one Birdseye activity type"
):
FrigateConfig(**config)
def test_camera_can_disable_an_inherited_activity_type(self):
config = {
**self.minimal,
"birdseye": {"mode": {"motion": True, "objects": True}},
}
config["cameras"]["back"]["birdseye"] = {"mode": {"motion": False}}
frigate_config = FrigateConfig(**config)
mode = frigate_config.cameras["back"].birdseye.mode
assert not mode.motion
assert mode.objects
def test_profile_must_leave_an_activity_type_enabled(self):
config = {
**self.minimal,
"profiles": {"away": {"friendly_name": "Away"}},
"birdseye": {"mode": {"objects": True}},
}
config["cameras"]["back"]["profiles"] = {
"away": {"birdseye": {"mode": {"objects": False}}}
}
with self.assertRaisesRegex(
ValidationError, "must enable at least one Birdseye activity type"
):
FrigateConfig(**config)
def test_camera_birdseye_activity_types_override_global_values(self):
config = {
**self.minimal,
"birdseye": {"mode": {"motion": True, "objects": True}},
}
config["cameras"]["back"]["birdseye"] = {
"mode": {"motion": False, "stationary_objects": True}
}
frigate_config = FrigateConfig(**config)
mode = frigate_config.cameras["back"].birdseye.mode
assert not mode.motion
assert mode.objects
assert mode.stationary_objects
assert (
frigate_config.cameras["back"].birdseye.mode is BirdseyeModeEnum.continuous
)
def test_override_tracked_objects(self):
config = {
+2 -1
View File
@@ -9,6 +9,7 @@ from unittest.mock import MagicMock, patch
from frigate.debug_replay import DebugReplayManager
from frigate.jobs.debug_replay import (
DebugReplayJob,
NoRecordingsError,
RecordingDebugReplaySource,
cancel_debug_replay_job,
get_active_runner,
@@ -129,7 +130,7 @@ class TestStartDebugReplayJob(unittest.TestCase):
empty_qs = MagicMock()
empty_qs.count.return_value = 0
with patch("frigate.jobs.debug_replay.query_recordings", return_value=empty_qs):
with self.assertRaises(ValueError):
with self.assertRaises(NoRecordingsError):
start_debug_replay_job(
source=RecordingDebugReplaySource(
source_camera="front",
@@ -8,7 +8,6 @@ from unittest.mock import MagicMock, patch
from frigate.app import FrigateApp
from frigate.comms.dispatcher import Dispatcher
from frigate.comms.runtime_state import RuntimeStatePersistence
from frigate.config import BirdseyeModeConfig
def _make_camera_mock(
@@ -52,58 +51,6 @@ def _build_dispatcher(cameras: dict[str, MagicMock]) -> Dispatcher:
return Dispatcher(config, config_updater, onvif, ptz_metrics, communicators)
class TestBirdseyeModeCommands(unittest.TestCase):
"""Verify Birdseye mode commands use the boolean mode contract."""
def setUp(self) -> None:
self.camera = _make_camera_mock()
self.camera.birdseye.enabled = True
self.dispatcher = _build_dispatcher({"front_door": self.camera})
self.dispatcher.publish = MagicMock()
def test_combined_modes_are_accepted(self) -> None:
self.dispatcher._on_birdseye_mode_command(
"front_door", "STATIONARY_OBJECTS,MOTION"
)
self.assertEqual(
self.camera.birdseye.mode,
BirdseyeModeConfig(motion=True, stationary_objects=True),
)
self.dispatcher.config_updater.publish_update.assert_called_once()
self.dispatcher.publish.assert_called_once_with(
"front_door/birdseye_mode/state",
"MOTION,STATIONARY_OBJECTS",
retain=True,
)
def test_single_activity_type_is_accepted(self) -> None:
self.dispatcher._on_birdseye_mode_command("front_door", "OBJECTS")
self.assertEqual(
self.camera.birdseye.mode,
BirdseyeModeConfig(objects=True),
)
self.dispatcher.publish.assert_called_once_with(
"front_door/birdseye_mode/state", "OBJECTS", retain=True
)
def test_unknown_mode_is_rejected(self) -> None:
for payload in (
"UNKNOWN",
"motion",
"MOTION_OBJECTS",
"NONE",
"NONE,MOTION",
"MOTION,MOTION",
"MOTION,",
):
with self.subTest(payload=payload):
self.dispatcher._on_birdseye_mode_command("front_door", payload)
self.dispatcher.config_updater.publish_update.assert_not_called()
class TestRestoreRuntimeState(unittest.TestCase):
"""Verify replay routes through handlers and tolerates missing entries."""
+1 -88
View File
@@ -1,12 +1,7 @@
import unittest
from io import StringIO
from unittest.mock import MagicMock, patch
from frigate.util.services import (
get_amd_gpu_stats,
get_intel_gpu_stats,
get_openvino_npu_stats,
)
from frigate.util.services import get_amd_gpu_stats, get_intel_gpu_stats
class TestGpuStats(unittest.TestCase):
@@ -22,88 +17,6 @@ class TestGpuStats(unittest.TestCase):
amd_stats = get_amd_gpu_stats()
assert amd_stats == {"gpu": "4.17%", "mem": "60.37%"}
@patch("frigate.util.services.time.sleep")
@patch("frigate.util.services.time.time", side_effect=[0.0, 1.0])
@patch(
"frigate.util.services.os.readlink",
return_value="/sys/bus/pci/drivers/intel_vpu",
)
@patch(
"frigate.util.services.glob.glob",
return_value=["/sys/class/accel/accel0"],
)
@patch(
"builtins.open",
side_effect=[StringIO("1000"), StringIO("1250")],
)
def test_openvino_npu_stats_discovers_accel0(
self, open_file, glob, readlink, time, sleep
):
assert get_openvino_npu_stats() == {"npu": "25.0", "mem": "-%"}
open_file.assert_any_call(
"/sys/class/accel/accel0/device/power/runtime_active_time"
)
@patch("frigate.util.services.time.sleep")
@patch("frigate.util.services.time.time", side_effect=[0.0, 1.0])
@patch(
"frigate.util.services.os.readlink",
side_effect=[
"/sys/bus/pci/drivers/other",
"/sys/bus/pci/drivers/intel_vpu",
],
)
@patch(
"frigate.util.services.glob.glob",
return_value=[
"/sys/class/accel/accel0",
"/sys/class/accel/accel1",
],
)
@patch(
"builtins.open",
side_effect=[StringIO("1000"), StringIO("1250")],
)
def test_openvino_npu_stats_skips_non_intel_accelerator(
self, open_file, glob, readlink, time, sleep
):
assert get_openvino_npu_stats() == {"npu": "25.0", "mem": "-%"}
open_file.assert_any_call(
"/sys/class/accel/accel1/device/power/runtime_active_time"
)
@patch(
"frigate.util.services.os.readlink",
return_value="/sys/bus/pci/drivers/other",
)
@patch(
"frigate.util.services.glob.glob",
return_value=["/sys/class/accel/accel0"],
)
@patch("builtins.open")
def test_openvino_npu_stats_no_intel_accelerator(self, open_file, glob, readlink):
assert get_openvino_npu_stats() is None
open_file.assert_not_called()
@patch(
"frigate.util.services.os.readlink",
return_value="/sys/bus/pci/drivers/intel_vpu",
)
@patch(
"frigate.util.services.glob.glob",
return_value=["/sys/class/accel/accel0"],
)
@patch("builtins.open", side_effect=FileNotFoundError)
def test_openvino_npu_stats_runtime_counter_unavailable(
self, open_file, glob, readlink
):
assert get_openvino_npu_stats() is None
open_file.assert_called_once_with(
"/sys/class/accel/accel0/device/power/runtime_active_time"
)
@patch("frigate.stats.intel_gpu_info.intel_gpu_name_resolver.get_names")
@patch("frigate.util.services.time.sleep")
@patch("frigate.util.services.time.monotonic")
-19
View File
@@ -560,25 +560,6 @@ class TestProfileManager(unittest.TestCase):
assert err is None
assert self.config.cameras["front"].enabled is False
@patch.object(ProfileManager, "_persist_active_profile")
def test_profile_can_disable_inherited_birdseye_activity(self, mock_persist):
"""A false-only mode override inherits the other base activity types."""
self.config.profiles["away"] = ProfileDefinitionConfig(friendly_name="Away")
base_mode = self.config.cameras["front"].birdseye.mode
base_mode.motion = True
base_mode.objects = True
self.config.cameras["front"].profiles["away"] = CameraProfileConfig(
birdseye={"mode": {"motion": False}}
)
self.manager = ProfileManager(self.config, self.mock_updater)
err = self.manager.activate_profile("away")
assert err is None
mode = self.config.cameras["front"].birdseye.mode
assert not mode.motion
assert mode.objects
@patch.object(ProfileManager, "_persist_active_profile")
def test_deactivate_restores_enabled(self, mock_persist):
"""Deactivating a profile restores the camera's base enabled state."""
+150
View File
@@ -0,0 +1,150 @@
"""Tests for push notification subscription validation."""
import unittest
from frigate.api.notification import _validate_push_endpoint, _validate_subscription
VALID_ENDPOINTS = [
"https://fcm.googleapis.com/fcm/send/dGhpcy1pcy1hLXRva2Vu",
"https://updates.push.services.mozilla.com/wpush/v2/dGhpcy1pcy1hLXRva2Vu",
"https://web.push.apple.com/dGhpcy1pcy1hLXRva2Vu",
"https://wns2-by3p.notify.windows.com/w/?token=dGhpcy1pcy1hLXRva2Vu",
"https://fcm.googleapis.com:443/fcm/send/dGhpcy1pcy1hLXRva2Vu",
]
def _subscription(endpoint: str) -> dict:
return {
"endpoint": endpoint,
"keys": {"p256dh": "cHVibGljLWtleQ", "auth": "YXV0aC1zZWNyZXQ"},
}
class TestValidatePushEndpoint(unittest.TestCase):
def test_accepts_real_push_service_endpoints(self):
for endpoint in VALID_ENDPOINTS:
with self.subTest(endpoint=endpoint):
self.assertIsNone(_validate_push_endpoint(endpoint))
def test_rejects_http(self):
self.assertIsNotNone(
_validate_push_endpoint("http://fcm.googleapis.com/fcm/send/token")
)
def test_rejects_non_http_schemes(self):
for endpoint in (
"file:///etc/passwd",
"ftp://example.com/token",
"//example.com/token",
):
with self.subTest(endpoint=endpoint):
self.assertIsNotNone(_validate_push_endpoint(endpoint))
def test_rejects_localhost(self):
for endpoint in (
"https://localhost/token",
"https://localhost:443/token",
"https://127.0.0.1/token",
"https://[::1]/token",
):
with self.subTest(endpoint=endpoint):
self.assertIsNotNone(_validate_push_endpoint(endpoint))
def test_rejects_private_addresses(self):
for endpoint in (
"https://192.168.1.10/token",
"https://10.0.0.5/token",
"https://172.16.0.1/token",
"https://169.254.169.254/token",
"https://0.0.0.0/token",
):
with self.subTest(endpoint=endpoint):
self.assertIsNotNone(_validate_push_endpoint(endpoint))
def test_rejects_internal_hostnames(self):
for endpoint in (
"https://frigate/token",
"https://nas.local/token",
"https://push.internal/token",
"https://host.home.arpa/token",
):
with self.subTest(endpoint=endpoint):
self.assertIsNotNone(_validate_push_endpoint(endpoint))
def test_rejects_non_default_port(self):
self.assertIsNotNone(
_validate_push_endpoint("https://fcm.googleapis.com:8080/fcm/send/token")
)
def test_rejects_embedded_credentials(self):
self.assertIsNotNone(
_validate_push_endpoint(
"https://user:pass@fcm.googleapis.com/fcm/send/token"
)
)
def test_rejects_endpoint_without_path(self):
for endpoint in ("https://fcm.googleapis.com", "https://fcm.googleapis.com/"):
with self.subTest(endpoint=endpoint):
self.assertIsNotNone(_validate_push_endpoint(endpoint))
def test_rejects_endpoint_that_breaks_audience_parsing(self):
# webpush.py locates the host by searching for a separator after index
# 10, which raises ValueError when the url has no path at all
endpoint = "https://fcm.googleapis.com"
with self.assertRaises(ValueError):
endpoint.index("/", 10)
self.assertIsNotNone(_validate_push_endpoint(endpoint))
def test_rejects_missing_or_non_string_endpoint(self):
for endpoint in (None, "", 5, {"url": "https://example.com/token"}):
with self.subTest(endpoint=endpoint):
self.assertIsNotNone(_validate_push_endpoint(endpoint))
def test_rejects_overlong_endpoint(self):
self.assertIsNotNone(
_validate_push_endpoint(f"https://fcm.googleapis.com/{'a' * 4096}")
)
class TestValidateSubscription(unittest.TestCase):
def test_accepts_valid_subscription(self):
self.assertIsNone(_validate_subscription(_subscription(VALID_ENDPOINTS[0])))
def test_accepts_extra_fields_sent_by_the_browser(self):
sub = _subscription(VALID_ENDPOINTS[0])
sub["expirationTime"] = None
self.assertIsNone(_validate_subscription(sub))
def test_rejects_non_object(self):
for sub in ("https://fcm.googleapis.com/fcm/send/token", ["endpoint"], 5):
with self.subTest(sub=sub):
self.assertIsNotNone(_validate_subscription(sub))
def test_rejects_bad_endpoint(self):
self.assertIsNotNone(
_validate_subscription(_subscription("https://localhost/t"))
)
def test_rejects_missing_keys(self):
sub = _subscription(VALID_ENDPOINTS[0])
del sub["keys"]
self.assertIsNotNone(_validate_subscription(sub))
def test_rejects_incomplete_keys(self):
for keys in (
{"p256dh": "cHVibGljLWtleQ"},
{"auth": "YXV0aC1zZWNyZXQ"},
{"p256dh": "cHVibGljLWtleQ", "auth": ""},
{"p256dh": None, "auth": "YXV0aC1zZWNyZXQ"},
):
with self.subTest(keys=keys):
sub = _subscription(VALID_ENDPOINTS[0])
sub["keys"] = keys
self.assertIsNotNone(_validate_subscription(sub))
if __name__ == "__main__":
unittest.main()
+107
View File
@@ -0,0 +1,107 @@
"""Outbound websocket sends must never block the thread calling publish()."""
import socket
import threading
import unittest
from frigate.comms.ws import WS_MAX_PENDING_MESSAGES, WebSocket
class _FakeSock:
"""Socket stand-in; ``block`` makes sendall hang like a client that stopped reading."""
def __init__(self, block: bool = False) -> None:
self.block = block
self.released = threading.Event()
self.shutdown_called = threading.Event()
self.frames: list[bytes] = []
def sendall(self, data: bytes) -> None:
if self.block and not self.released.is_set():
self.released.wait(timeout=10)
raise BrokenPipeError()
self.frames.append(data)
def shutdown(self, how: int) -> None:
assert how == socket.SHUT_RDWR
self.shutdown_called.set()
self.released.set()
def close(self) -> None:
pass
def fileno(self) -> int:
return 99
def _wait_for(predicate, timeout: float = 2.0) -> bool:
deadline = threading.Event()
for _ in range(int(timeout / 0.01)):
if predicate():
return True
deadline.wait(0.01)
return predicate()
class TestWebSocketSendQueue(unittest.TestCase):
def _open(self, sock: _FakeSock) -> WebSocket:
ws = WebSocket(sock)
ws.opened()
return ws
def test_stalled_client_does_not_block_publisher(self):
sock = _FakeSock(block=True)
ws = self._open(sock)
def publish_many():
for i in range(WS_MAX_PENDING_MESSAGES + 5):
ws.send(f"message {i}")
publisher = threading.Thread(target=publish_many, daemon=True)
publisher.start()
publisher.join(timeout=2.0)
self.assertFalse(publisher.is_alive(), "publish() blocked on a stalled client")
self.assertTrue(
sock.shutdown_called.wait(timeout=2.0),
"a client that cannot keep up should be disconnected",
)
def test_overflow_warns_and_shuts_down_once(self):
sock = _FakeSock(block=True)
ws = self._open(sock)
shutdown_calls = []
original_shutdown = sock.shutdown
sock.shutdown = lambda how: (shutdown_calls.append(how), original_shutdown(how))
with self.assertLogs("frigate.comms.ws", level="WARNING") as logs:
# keep publishing after overflow, as the dispatcher does until the
# manager thread removes the connection
for i in range(WS_MAX_PENDING_MESSAGES * 3):
ws.send(f"message {i}")
self.assertEqual(len(logs.output), 1)
self.assertEqual(len(shutdown_calls), 1)
def test_messages_delivered_in_order(self):
sock = _FakeSock()
ws = self._open(sock)
for i in range(3):
ws.send(f"message {i}")
self.assertTrue(_wait_for(lambda: len(sock.frames) == 3))
for i, frame in enumerate(sock.frames):
self.assertIn(f"message {i}".encode(), frame)
self.assertFalse(sock.shutdown_called.is_set())
def test_closed_stops_writer_thread(self):
sock = _FakeSock()
ws = self._open(sock)
writer = ws._writer
ws.closed(1000, "bye")
writer.join(timeout=2.0)
self.assertFalse(writer.is_alive())
if __name__ == "__main__":
unittest.main()
+21 -60
View File
@@ -68,7 +68,6 @@ class TrackedObjectProcessor(threading.Thread):
self.tracked_objects_queue = tracked_objects_queue
self.stop_event: MpEvent = stop_event
self.camera_states: dict[str, CameraState] = {}
self.camera_states_lock = threading.Lock()
self.frame_manager = SharedMemoryFrameManager()
self.last_motion_detected: dict[str, float] = {}
self.ptz_autotracker_thread = ptz_autotracker_thread
@@ -237,9 +236,7 @@ class TrackedObjectProcessor(threading.Thread):
camera_state.on("end", end)
camera_state.on("snapshot", snapshot)
camera_state.on("camera_activity", camera_activity)
with self.camera_states_lock:
self.camera_states[camera] = camera_state
self.camera_states[camera] = camera_state
def should_save_snapshot(self, camera: str, obj: TrackedObject) -> bool:
if obj.false_positive:
@@ -327,22 +324,9 @@ class TrackedObjectProcessor(threading.Thread):
# reset the last_motion so redundant `off` commands aren't sent
self.last_motion_detected[camera] = 0
def get_camera_state(self, camera: str) -> CameraState | None:
"""Returns the state for a camera, or None if it does not exist."""
with self.camera_states_lock:
return self.camera_states.get(camera)
def get_camera_states(self) -> list[CameraState]:
"""Returns a snapshot of camera states that is safe to iterate."""
with self.camera_states_lock:
return list(self.camera_states.values())
def get_best(self, camera: str, label: str) -> dict[str, Any]:
camera_state = self.get_camera_state(camera)
if camera_state is None:
return {}
# TODO: need a lock here
camera_state = self.camera_states[camera]
if label in camera_state.best_objects:
best_obj = camera_state.best_objects[label]
@@ -366,21 +350,17 @@ class TrackedObjectProcessor(threading.Thread):
(self.config.birdseye.height * 3 // 2, self.config.birdseye.width),
)
camera_state = self.get_camera_state(camera)
if camera_state is None:
if camera not in self.camera_states:
return None
return camera_state.get_current_frame(draw_options)
return self.camera_states[camera].get_current_frame(draw_options)
def get_current_frame_time(self, camera: str) -> float:
"""Returns the latest frame time for a given camera."""
camera_state = self.get_camera_state(camera)
if camera_state is None:
if camera not in self.camera_states:
return 0.0
return camera_state.current_frame_time
return self.camera_states[camera].current_frame_time
def set_sub_label(
self, event_id: str, sub_label: str | None, score: float | None
@@ -518,18 +498,14 @@ class TrackedObjectProcessor(threading.Thread):
# save the snapshot image
(frame, event_id, camera) = payload
camera_state = self.camera_states.get(camera)
if camera_state is None:
logger.debug("Discarding LPR snapshot for unknown camera %s", camera)
return
img = cv2.imdecode(
np.frombuffer(base64.b64decode(frame), dtype=np.uint8),
cv2.IMREAD_COLOR,
)
camera_state.save_manual_event_image(img, event_id, "license_plate", {})
self.camera_states[camera].save_manual_event_image(
img, event_id, "license_plate", {}
)
def create_manual_event(self, payload: tuple) -> None:
(
@@ -546,17 +522,13 @@ class TrackedObjectProcessor(threading.Thread):
pre_capture,
) = payload
camera_state = self.camera_states.get(camera_name)
if camera_state is None:
logger.debug("Discarding manual event for unknown camera %s", camera_name)
return
# save the snapshot image
camera_state.save_manual_event_image(None, event_id, label, draw)
self.camera_states[camera_name].save_manual_event_image(
None, event_id, label, draw
)
end_time = frame_time + duration if duration is not None else None
start_time = (
frame_time - camera_state.camera_config.record.event_pre_capture
frame_time - self.config.cameras[camera_name].record.event_pre_capture
if pre_capture is None
else frame_time - pre_capture
)
@@ -576,7 +548,7 @@ class TrackedObjectProcessor(threading.Thread):
"camera": camera_name,
"start_time": start_time,
"end_time": end_time,
"has_clip": camera_state.camera_config.record.enabled
"has_clip": self.config.cameras[camera_name].record.enabled
and include_recording,
"has_snapshot": True,
"snapshot_clean": True,
@@ -619,12 +591,6 @@ class TrackedObjectProcessor(threading.Thread):
plate,
) = payload
camera_state = self.camera_states.get(camera_name)
if camera_state is None:
logger.debug("Discarding LPR event for unknown camera %s", camera_name)
return
# send event to event maintainer
self.event_sender.publish(
(
@@ -639,9 +605,9 @@ class TrackedObjectProcessor(threading.Thread):
"score": score,
"camera": camera_name,
"start_time": frame_time
- camera_state.camera_config.record.event_pre_capture,
- self.config.cameras[camera_name].record.event_pre_capture,
"end_time": None,
"has_clip": camera_state.camera_config.record.enabled
"has_clip": self.config.cameras[camera_name].record.enabled
and include_recording,
"has_snapshot": True,
"snapshot_clean": True,
@@ -733,10 +699,7 @@ class TrackedObjectProcessor(threading.Thread):
continue
camera_state.shutdown()
with self.camera_states_lock:
self.camera_states.pop(camera)
self.camera_states.pop(camera)
self.camera_activity.pop(camera, None)
self.last_motion_detected.pop(camera, None)
@@ -752,6 +715,8 @@ class TrackedObjectProcessor(threading.Thread):
if camera_state is None:
continue
camera_state = self.camera_states[camera]
if camera_state.prev_enabled and not current_enabled:
logger.debug(f"Not processing objects for disabled camera {camera}")
self.force_end_all_events(camera, camera_state)
@@ -847,11 +812,7 @@ class TrackedObjectProcessor(threading.Thread):
break
event_id, camera, _ = update
camera_state = self.camera_states.get(camera)
# the camera may have been removed while its event was pending
if camera_state is not None:
camera_state.finished(event_id)
self.camera_states[camera].finished(event_id)
# shut down camera states
for state in self.camera_states.values():
-1
View File
@@ -164,7 +164,6 @@ class TrackedObject:
"attributes": obj_data["attributes"],
"current_estimated_speed": self.current_estimated_speed,
"velocity_angle": self.velocity_angle,
"path_data": self.path_data.copy(),
"recognized_license_plate": obj_data.get(
"recognized_license_plate"
),
+1 -44
View File
@@ -20,7 +20,7 @@ from frigate.util.services import get_video_properties
logger = logging.getLogger(__name__)
CURRENT_CONFIG_VERSION = "0.19-0"
CURRENT_CONFIG_VERSION = "0.18-0"
DEFAULT_CONFIG_FILE = os.path.join(CONFIG_DIR, "config.yml")
@@ -93,7 +93,6 @@ def migrate_frigate_config(config_file: str):
logger.info("copying config as backup...")
shutil.copy(config_file, os.path.join(CONFIG_DIR, "backup_config.yaml"))
new_config = config
if previous_version < "0.14":
logger.info(f"Migrating frigate config from {previous_version} to 0.14...")
@@ -148,13 +147,6 @@ def migrate_frigate_config(config_file: str):
yaml.dump(new_config, f)
previous_version = "0.18-0"
if previous_version < "0.19-0":
logger.info(f"Migrating frigate config from {previous_version} to 0.19-0...")
new_config = migrate_019_0(new_config)
with open(config_file, "w") as f:
yaml.dump(new_config, f)
previous_version = "0.19-0"
logger.info("Finished frigate config migration...")
@@ -533,21 +525,6 @@ def _convert_legacy_mask_to_dict(
return result
def _migrate_birdseye_mode(birdseye: dict[str, Any] | None) -> None:
"""Convert a scalar Birdseye mode to composable activity types."""
if not birdseye or not isinstance(birdseye.get("mode"), str):
return
legacy_mode = birdseye["mode"]
activity_types = ("continuous", "motion", "objects", "stationary_objects")
if legacy_mode not in activity_types:
return
birdseye["mode"] = {
activity_type: activity_type == legacy_mode for activity_type in activity_types
}
def migrate_018_0(config: dict[str, dict[str, Any]]) -> dict[str, dict[str, Any]]:
"""Handle migrating frigate config to 0.18-0"""
new_config = config.copy()
@@ -681,26 +658,6 @@ def migrate_018_0(config: dict[str, dict[str, Any]]) -> dict[str, dict[str, Any]
return new_config
def migrate_019_0(config: dict[str, dict[str, Any]]) -> dict[str, dict[str, Any]]:
"""Handle migrating Frigate config to 0.19-0."""
new_config = config.copy()
_migrate_birdseye_mode(new_config.get("birdseye"))
for name, camera in new_config.get("cameras", {}).items():
camera_config: dict[str, dict[str, Any]] = camera.copy()
_migrate_birdseye_mode(camera_config.get("birdseye"))
for profile in camera_config.get("profiles", {}).values():
if isinstance(profile, dict):
_migrate_birdseye_mode(profile.get("birdseye"))
new_config["cameras"][name] = camera_config
new_config["version"] = "0.19-0"
return new_config
def get_relative_coordinates(
mask: str | list | None,
frame_shape: tuple[int, int],
-209
View File
@@ -1,209 +0,0 @@
"""Aggregation of the known sub label names an object can be tagged with."""
import logging
import os
from pathvalidate import sanitize_filename
from frigate.config import FrigateConfig
from frigate.config.classification import ObjectClassificationType
from frigate.const import CLIPS_DIR, FACE_DIR, MODEL_CACHE_DIR
from frigate.util.builtin import load_labels
logger = logging.getLogger(__name__)
# subdirectory of FACE_DIR holding unassigned training images, not a face name
FACE_TRAIN_DIR = "train"
# category used by classification models for "no match", never attached to an object
CLASSIFICATION_NONE_CATEGORY = "none"
def get_categorized_object_names(
config: FrigateConfig,
allowed_cameras: list[str],
object_type: str | None = None,
) -> dict[str, list[str]]:
"""Collect every sub label name this install can attach, by object type.
Unlike the database-backed /sub_labels endpoint, this reads the config and
model files, so it also covers names that are configured but have not been
detected yet. Names come from the detector's logo attributes (limited to
objects the allowed cameras actually track), LPR known plate names,
registered face names, and custom object classification categories.
Structural attributes such as `face` and `license_plate` are excluded: they
describe a part of an object rather than naming it, and are never attached
as a sub label.
Args:
config: The running Frigate config
allowed_cameras: Cameras the requesting user may see
object_type: Optional object label to restrict the result to
Returns:
Mapping of object label to its known sub label names, sorted and
deduplicated. Object types with no known names are omitted.
"""
tracked_objects = _get_tracked_objects(config, allowed_cameras)
names: dict[str, set[str]] = {}
logos = set(config.model.all_attribute_logos)
# 1. detector logo attributes, only for objects that are actually tracked
for label, label_attributes in config.model.attributes_map.items():
if label not in tracked_objects:
continue
label_logos = logos.intersection(label_attributes)
if label_logos:
names.setdefault(label, set()).update(label_logos)
# 2. LPR known plate names, for objects that can carry a plate
if config.lpr.known_plates and _lpr_enabled(config, allowed_cameras):
known_plates = set(config.lpr.known_plates)
for label in _objects_with_attribute(config, tracked_objects, "license_plate"):
names.setdefault(label, set()).update(known_plates)
# 3. registered face names, for objects that can carry a face
if _face_recognition_enabled(config, allowed_cameras):
face_names = _get_face_names()
if face_names:
for label in _objects_with_attribute(config, tracked_objects, "face"):
names.setdefault(label, set()).update(face_names)
# 4. custom object classification categories
for model_key, model_config in config.classification.custom.items():
if not model_config.enabled or model_config.object_config is None:
continue
if (
model_config.object_config.classification_type
!= ObjectClassificationType.sub_label
):
continue
categories = _get_classification_categories(model_key)
if not categories:
continue
for label in model_config.object_config.objects:
names.setdefault(label, set()).update(categories)
return {
label: sorted(label_names)
for label, label_names in sorted(names.items())
if label_names and (object_type is None or label == object_type)
}
def _get_tracked_objects(config: FrigateConfig, allowed_cameras: list[str]) -> set[str]:
"""Get the union of objects tracked by the cameras the user can see."""
tracked: set[str] = set()
for camera_name in allowed_cameras:
camera_config = config.cameras.get(camera_name)
if camera_config is None:
continue
tracked.update(camera_config.objects.track)
return tracked
def _objects_with_attribute(
config: FrigateConfig, tracked_objects: set[str], attribute: str
) -> set[str]:
"""Get the tracked objects that a given attribute can be recognized on.
The attribute may also be tracked as an object in its own right, as
`license_plate` is on a dedicated LPR camera, in which case the name is
attached to that object directly.
"""
objects = {
label
for label, label_attributes in config.model.attributes_map.items()
if attribute in label_attributes and label in tracked_objects
}
if attribute in tracked_objects:
objects.add(attribute)
return objects
def _lpr_enabled(config: FrigateConfig, allowed_cameras: list[str]) -> bool:
return any(
config.cameras[camera_name].lpr.enabled
for camera_name in allowed_cameras
if camera_name in config.cameras
)
def _face_recognition_enabled(
config: FrigateConfig, allowed_cameras: list[str]
) -> bool:
return any(
config.cameras[camera_name].face_recognition.enabled
for camera_name in allowed_cameras
if camera_name in config.cameras
)
def _get_face_names() -> set[str]:
"""Get the names of every registered face collection."""
if not os.path.exists(FACE_DIR):
return set()
try:
entries = os.listdir(FACE_DIR)
except OSError:
logger.debug("Failed to read face directory %s", FACE_DIR)
return set()
return {
name
for name in entries
if name != FACE_TRAIN_DIR and os.path.isdir(os.path.join(FACE_DIR, name))
}
def _get_classification_categories(model_key: str) -> set[str]:
"""Get the categories a custom classification model can output.
The trained labelmap is authoritative, but it only exists once the model
has been trained, so fall back to the dataset directories that will become
the labelmap on the next training run.
"""
safe_key = sanitize_filename(model_key)
categories: set[str] = set()
labelmap_path = os.path.join(MODEL_CACHE_DIR, safe_key, "labelmap.txt")
if os.path.exists(labelmap_path):
try:
labelmap = load_labels(labelmap_path, prefill=0, indexed=False)
except OSError:
logger.debug("Failed to read labelmap %s", labelmap_path)
labelmap = {}
categories.update(label for label in labelmap.values() if label)
dataset_dir = os.path.join(CLIPS_DIR, safe_key, "dataset")
if os.path.exists(dataset_dir):
try:
entries = os.listdir(dataset_dir)
except OSError:
logger.debug("Failed to read dataset directory %s", dataset_dir)
entries = []
categories.update(
name for name in entries if os.path.isdir(os.path.join(dataset_dir, name))
)
categories.discard(CLASSIFICATION_NONE_CATEGORY)
return categories
+5 -20
View File
@@ -1,7 +1,6 @@
"""Utilities for services."""
import asyncio
import glob
import json
import logging
import os
@@ -671,33 +670,19 @@ def get_intel_gpu_stats(
def get_openvino_npu_stats() -> dict[str, str] | None:
"""Get NPU stats using openvino."""
for accel_path in sorted(glob.glob("/sys/class/accel/accel*")):
try:
driver = os.path.basename(os.readlink(f"{accel_path}/device/driver"))
except OSError:
continue
if driver != "intel_vpu":
continue
try:
runtime_path = f"{accel_path}/device/power/runtime_active_time"
with open(runtime_path) as f:
initial_runtime = float(f.read().strip())
break
except (FileNotFoundError, PermissionError, ValueError):
continue
else:
return None
NPU_RUNTIME_PATH = "/sys/devices/pci0000:00/0000:00:0b.0/power/runtime_active_time"
try:
with open(NPU_RUNTIME_PATH) as f:
initial_runtime = float(f.read().strip())
initial_time = time.time()
# Sleep for 1 second to get an accurate reading
time.sleep(1.0)
# Read runtime value again
with open(runtime_path) as f:
with open(NPU_RUNTIME_PATH) as f:
current_runtime = float(f.read().strip())
current_time = time.time()
+43 -32
View File
@@ -54,48 +54,59 @@ def capture_frames(
skipped_eps = EventsPerSecond()
skipped_eps.start()
while not stop_event.is_set():
# CameraWatchdog applies enabled updates onto this same CameraConfig
# before it stops ffmpeg. Do not subscribe here: it would be rebuilt per
# ffmpeg restart and strand a pipe in the idle main process config PUB.
if not config.enabled:
logger.debug(f"Stopping capture thread for disabled {config.name}")
break
config_subscriber = CameraConfigUpdateSubscriber(
None, {config.name: config}, [CameraConfigUpdateEnum.enabled]
)
fps.value = frame_rate.eps()
skipped_fps.value = skipped_eps.eps()
current_frame.value = datetime.now().timestamp()
frame_name = f"{config.name}_frame{frame_index}"
frame_buffer = frame_manager.write(frame_name)
try:
frame_buffer[:] = ffmpeg_process.stdout.read(frame_size)
except Exception:
# shutdown has been initiated
if stop_event.is_set():
def get_enabled_state():
"""Fetch the latest enabled state from ZMQ."""
config_subscriber.check_for_updates()
return config.enabled
try:
while not stop_event.is_set():
if not get_enabled_state():
logger.debug(f"Stopping capture thread for disabled {config.name}")
break
logger.error(f"{config.name}: Unable to read frames from ffmpeg process.")
fps.value = frame_rate.eps()
skipped_fps.value = skipped_eps.eps()
current_frame.value = datetime.now().timestamp()
frame_name = f"{config.name}_frame{frame_index}"
frame_buffer = frame_manager.write(frame_name)
try:
frame_buffer[:] = ffmpeg_process.stdout.read(frame_size)
except Exception:
# shutdown has been initiated
if stop_event.is_set():
break
if ffmpeg_process.poll() is not None:
logger.error(
f"{config.name}: ffmpeg process is not running. exiting capture thread..."
f"{config.name}: Unable to read frames from ffmpeg process."
)
break
continue
if ffmpeg_process.poll() is not None:
logger.error(
f"{config.name}: ffmpeg process is not running. exiting capture thread..."
)
break
frame_rate.update()
continue
# don't lock the queue to check, just try since it should rarely be full
try:
# add to the queue
frame_queue.put((frame_name, current_frame.value), False)
frame_manager.close(frame_name)
except queue.Full:
# if the queue is full, skip this frame
skipped_eps.update()
frame_rate.update()
frame_index = 0 if frame_index == shm_frame_count - 1 else frame_index + 1
# don't lock the queue to check, just try since it should rarely be full
try:
# add to the queue
frame_queue.put((frame_name, current_frame.value), False)
frame_manager.close(frame_name)
except queue.Full:
# if the queue is full, skip this frame
skipped_eps.update()
frame_index = 0 if frame_index == shm_frame_count - 1 else frame_index + 1
finally:
config_subscriber.stop()
class CameraWatchdog(threading.Thread):
+8 -2
View File
@@ -94,6 +94,7 @@ SPEC_SERVERS = [
PUBLIC = "public"
AUTHENTICATED = "any"
CAMERA = "camera"
ALL_CAMERAS = "all_cameras"
ADMIN = "admin"
ADMIN_SCHEME = "frigateAdminAuth"
@@ -128,6 +129,7 @@ ACCESS_NOTES = {
PUBLIC: "**Access:** Public — no authentication required.",
AUTHENTICATED: "**Access:** Any authenticated user.",
CAMERA: "**Access:** Authenticated user with access to the referenced camera.",
ALL_CAMERAS: "**Access:** Authenticated user with access to all cameras.",
ADMIN: "**Access:** Admin role required.",
}
@@ -197,6 +199,8 @@ def _route_markers(route: APIRoute) -> tuple[set[str], list[str] | None]:
pass
elif name in ("require_camera_access", "require_go2rtc_stream_access"):
markers.add(CAMERA)
elif name == "require_full_camera_access":
markers.add(ALL_CAMERAS)
elif "auth_checker" in qualname:
markers.add(AUTHENTICATED)
elif "public_checker" in qualname:
@@ -254,6 +258,8 @@ def _classify_base(
# Explicit route-level markers win, in order of specificity.
if ADMIN in markers:
return ADMIN, admin_roles or ["admin"], None
if ALL_CAMERAS in markers:
return ALL_CAMERAS, None, None
if CAMERA in markers:
return CAMERA, None, None
if AUTHENTICATED in markers:
@@ -337,8 +343,8 @@ def security_for(level: str) -> list:
return []
if level == ADMIN:
return [{ADMIN_SCHEME: []}]
# AUTHENTICATED and CAMERA both require any authenticated session; the
# camera-specific scoping is conveyed in the note and x-required-role.
# AUTHENTICATED, CAMERA and ALL_CAMERAS all require any authenticated
# session; the camera scoping is conveyed in the note and x-required-role.
return [{USER_SCHEME: []}]
File diff suppressed because one or more lines are too long
+40 -2
View File
@@ -38,7 +38,7 @@
"cough": "سُعَال",
"throat_clearing": "تَنْحِيم",
"sneeze": "عُطَاس",
"sniff": "شَمَّ",
"sniff": "كشف",
"run": "رَكْض",
"shuffle": "خَلْط",
"footsteps": "خُطُوَات",
@@ -161,5 +161,43 @@
"rumble": "الحلبة",
"skateboard": "لوح تزلج",
"echo": "صدى الصوت",
"noise": "ازعاج"
"noise": "ازعاج",
"duck": "بطة",
"quack": "صوت البطة",
"goose": "وزة",
"honk": "نعيق الأوز",
"wild_animals": "حيوانات برية",
"roar": "زئير",
"chirp": "زقزقة",
"pigeon": "حمامة",
"crow": "غراب",
"roaring_cats": "قطط هائجة",
"squawk": "نعيق",
"coo": "هديل الحمام",
"mallet_percussion": "مطرقة إيقاعية",
"marimba": "ماريمبا",
"glockenspiel": "معزف الأجراس",
"vibraphone": "فيبرافون",
"steelpan": "طبل نحاسي",
"orchestra": "أوركسترا",
"brass_instrument": "آلة نحاسية",
"french_horn": "بوق فرنسي",
"trumpet": "بوق",
"trombone": "ترومبون",
"bowed_string_instrument": "آلة وترية مقوسة",
"string_section": "آلات وترية",
"violin": "كمان",
"pizzicato": "تقنية العزف بيزيكاتو",
"cello": "تشيلو",
"double_bass": "كمان كبير",
"wind_instrument": "آلة نفخية",
"flute": "فلوت",
"saxophone": "ساكسفون",
"clarinet": "كلارينيت",
"harp": "قيثارة",
"bell": "جرس",
"church_bell": "جرس الكنيسة",
"jingle_bell": "جرس جلجل",
"bicycle_bell": "جرس الدراجة",
"tuning_fork": "شوكة رنانة"
}
+6 -6
View File
@@ -71,9 +71,9 @@
"batchSuccess_other": "S'han iniciat {{count}} exportacions. Obrint el cas ara.",
"batchPartial": "S'han iniciat {{successful}} de {{total}} exportacions. Càmeres fallides: {{failedCameras}}",
"batchFailed": "No s'han pogut iniciar {{total}} exportacions. Càmeres fallides: {{failedCameras}}",
"batchQueuedSuccess_one": "Exporta a la cua 1. Obrint el cas ara.",
"batchQueuedSuccess_many": "{{count}} exportacions a la cua. Obrint el cas ara.",
"batchQueuedSuccess_other": "{{count}} exportacions a la cua. Obrint el cas ara.",
"batchQueuedSuccess_one": "Exporta a la cua 1.",
"batchQueuedSuccess_many": "{{count}} exportacions a la cua.",
"batchQueuedSuccess_other": "{{count}} exportacions a la cua.",
"batchQueuedPartial": "{{successful}} de {{total}} exportacions a la cua. Càmeres fallides: {{failedCameras}}",
"batchQueueFailed": "No s'han pogut posar a la cua {{total}} exportacions. Càmeres fallides: {{failedCameras}}"
},
@@ -132,9 +132,9 @@
"exportButton_other": "Exporta {{count}} ressenyes",
"exportingButton": "S'està exportant...",
"toast": {
"started_one": "S'ha iniciat l'exportació 1. Obrint el cas ara.",
"started_many": "S'han iniciat {{count}} exportacions. Obrint el cas ara.",
"started_other": "S'han iniciat {{count}} exportacions. Obrint el cas ara.",
"started_one": "S'ha iniciat l'exportació 1.",
"started_many": "S'han iniciat {{count}} exportacions.",
"started_other": "S'han iniciat {{count}} exportacions.",
"startedNoCase_one": "S'ha iniciat l'exportació 1.",
"startedNoCase_many": "S'han iniciat {{count}} exportacions.",
"startedNoCase_other": "S'han iniciat {{count}} exportacions.",
+2 -1
View File
@@ -52,7 +52,8 @@
"error": "No s'ha pogut iniciar la repetició de depuració: {{error}}",
"alreadyActive": "Ja hi ha activada una sessió de reproducció",
"stopError": "No s'ha pogut aturar la repetició de depuració: {{error}}",
"goToReplay": "Ves a la repetició"
"goToReplay": "Ves a la repetició",
"noRecordings": "No s'ha trobat cap enregistrament a l'interval de temps seleccionat"
}
},
"description": "Reprodueix els enregistraments de la càmera per a la depuració. La llista d'objectes mostra un resum retardat en el temps dels objectes detectats i la pestanya Missatges mostra un flux de missatges interns de frigate a partir del metratge de reproducció."
+4 -2
View File
@@ -265,7 +265,7 @@
"rhythm_and_blues": "Rhythm and Blues",
"soul_music": "Soulmusik",
"reggae": "Reggae",
"country": "Country",
"country": "Land",
"disco": "Disko",
"classical_music": "Klassisk musik",
"electronic_music": "Elektronisk musik",
@@ -341,5 +341,7 @@
"propeller": "Probel",
"fixed-wing_aircraft": "Fastvingefly",
"engine": "Motor",
"light_engine": "Lille motor"
"light_engine": "Lille motor",
"swing_music": "Swing musik",
"bluegrass": "Bluegrass"
}
+7 -1
View File
@@ -1 +1,7 @@
{}
{
"camera_ui": {
"review": {
"label": "Vis i gennemgang"
}
}
}
@@ -170,7 +170,10 @@
"title": "Rediger kategoriseringsmodel",
"descriptionState": "Rediger kategorierne for denne model til genstandstilstande. Ændringer kræver, at modellen trænes igen.",
"descriptionObject": "Rediger genstandstypen og kategoriseringstypen for denne genstandskategoriseringsmodel.",
"stateClassesInfo": "Bemærk: Ændring af tilstandskategorier kræver, at modellen trænes igen med de opdaterede kategorier."
"stateClassesInfo": "Bemærk: Ændring af tilstandskategorier kræver, at modellen trænes igen med de opdaterede kategorier.",
"enabled": "Aktiveret",
"enabledDesc": "Kør denne model. Ved deaktivering stopper den med at køre og klassificerer ikke længere",
"saveAttempts": "Gem forsøg"
},
"deleteDatasetImages": {
"title": "Slet billeder i datasættet",
+4 -1
View File
@@ -28,5 +28,8 @@
"detail": {
"aria": "Skift til detaljevisning"
},
"timeline.aria": "Vælg tidslinje"
"timeline.aria": "Vælg tidslinje",
"motionPreviews": {
"crop": "Beskær til filter"
}
}
@@ -1 +1,9 @@
{}
{
"metrics": {
"minutesSeconds": "{{minutes}}m {{seconds}}s",
"scanSummary": "{{segments}} segmentee · {{time}}"
},
"polygonControls": {
"moveMode": "Flyt"
}
}
+26
View File
@@ -16,5 +16,31 @@
"menu": {
"ui": "Brugergrænseflade",
"profiles": "Profiler"
},
"configMessages": {
"model": {
"optimizedFor320": "Frigate er optimeret til en 320x320 model, der er det bedste valg for de fleste konfigurationer. En 640x640 model er langsommere og hjælper kun i særlige scenarier"
}
},
"configForm": {
"cameraInputs": {
"sourceMode": {
"manual": "Manuel input sti"
}
}
},
"cameraManagement": {
"clone": {
"footer": {
"restartNeeded": "Genstart er nødvendig for visse ændringer.",
"liveOnly": "Alle ændringer vil blive aktiveret umiddelbart uden genstart.",
"submit": "Klone",
"submitting": "Kloner…"
},
"toast": {
"success": "Indstillinger kopieret til {{cameraName}}",
"successWithRestart": "Indstillinger kopieret til {{cameraName}}. Genstart Frigate for at aktivere alle ændringer."
}
}
}
}
+5 -5
View File
@@ -78,8 +78,8 @@
"batchSuccess_other": "{{count}} Exports gestartet. Öffne den Fall jetzt.",
"batchPartial": "{{successful}} von {{total}} Exporten gestartet. Fehlgeschlagene Kameras: {{failedCameras}}",
"batchFailed": "Fehler beim Starten der {{total}} Exporte. Fehlgeschlagene Kameras: {{failedCameras}}",
"batchQueuedSuccess_one": "1 Export in die Warteschlange gestellt. Fall wird jetzt geöffnet.",
"batchQueuedSuccess_other": "{{count}} Exporte in der Warteschlange. Fall wird jetzt geöffnet.",
"batchQueuedSuccess_one": "1 Export in die Warteschlange gestellt.",
"batchQueuedSuccess_other": "{{count}} Exporte in der Warteschlange.",
"batchQueuedPartial": "{{successful}} von {{total}} Exporten in die Warteschlange gestellt. Fehlerhafte Kameras: {{failedCameras}}",
"batchQueueFailed": "Fehler beim Einreihen von {{total}} Exporten in die Warteschlange. Fehlerhafte Kameras: {{failedCameras}}"
},
@@ -112,7 +112,7 @@
"noCameras": "Keine Kameras verfügbar",
"detectionCount_one": "1 verfolgtes Objekt",
"detectionCount_other": "{{count}} verfolgte Objekte",
"nameLabel": "Exportname",
"nameLabel": "Name exportieren",
"namePlaceholder": "Optionaler Basisname für diese Exporte",
"queueingButton": "Exporte werden in die Warteschlange gestellt...",
"exportButton_one": "Export 1 Kamera",
@@ -135,8 +135,8 @@
"exportButton_other": "{{count}} Bewertung exportieren",
"exportingButton": "Exportieren...",
"toast": {
"started_one": "1 Export gestartet. Fall wird jetzt geöffnet.",
"started_other": "{{count}} Exporte gestartet. Fall wird jetzt geöffnet.",
"started_one": "1 Export gestartet.",
"started_other": "{{count}} Exporte gestartet.",
"startedNoCase_one": "1 Export gestartet.",
"startedNoCase_other": "{{count}} Exports gestartet.",
"partial": "{{successful}} von {{total}} Exporten gestartet. Fehlgeschlagen: {{failedItems}}",
+2 -2
View File
@@ -547,7 +547,7 @@
"description": "Maximale Anzahl der gleichzeitig zu verarbeitenden Exportaufträge."
},
"chapters": {
"label": "Kapitel-Metadaten zur Einbettung in exportierte Aufzeichnungen"
"label": "Kapitel-Metadaten, die in exportierte Aufzeichnungen eingebettet werden sollen"
}
},
"preview": {
@@ -772,7 +772,7 @@
},
"dashboard": {
"label": "Im Live-Dashboard anzeigen",
"description": "Legt fest, ob diese Kamera im Live-Dashboard ‚Alle Kameras‘ angezeigt wird. Die Kamera bleibt in allen anderen Bereichen der Benutzeroberfläche verfügbar, einschließlich Kamera-Gruppen und Einstellungen."
"description": "Legt fest, ob diese Kamera im Standard-Live-Dashboard „Alle Kameras“ angezeigt wird. Die Kamera bleibt in allen anderen Bereichen der Benutzeroberfläche verfügbar, einschließlich Kameragruppen und Einstellungen."
},
"review": {
"label": "In der Überprüfung anzeigen",
+2 -2
View File
@@ -539,7 +539,7 @@
},
"network_bandwidth": {
"label": "Netzwerk Bandbreite",
"description": "Aktivieren Sie die prozessbezogene Überwachung der Netzwerkbandbreite für Kamera-FFmpeg-Prozesse und Detektoren (erfordert entsprechende Funktionen)."
"description": "Prozessbezogene Überwachung der Netzwerkbandbreite für Kamera-FFmpeg-Prozesse und Detektoren aktivieren (erfordert entsprechende Funktionen)."
},
"intel_gpu_device": {
"label": "Intel GPU",
@@ -1402,7 +1402,7 @@
"description": "Maximale Anzahl der gleichzeitig zu verarbeitenden Exportaufträge."
},
"chapters": {
"label": "Kapitel-Metadaten zur Einbettung in exportierte Aufzeichnungen"
"label": "Kapitel-Metadaten, die in exportierte Aufzeichnungen eingebettet werden sollen"
}
},
"preview": {
+2 -2
View File
@@ -126,6 +126,6 @@
"baby_stroller": "Kinderwagen",
"rickshaw": "Rikscha",
"rodent": "Nagetier",
"garbage_truck": "Müllfahrzeug",
"possum": "Possum"
"garbage_truck": "Müllwagen",
"possum": "Opossum"
}
@@ -56,9 +56,9 @@
},
"deleteModel": {
"title": "Klassifizierungsmodell löschen",
"single": "Möchten Sie {{name}} wirklich löschen? Dadurch werden alle zugehörigen Daten, einschließlich Bilder und Trainingsdaten, dauerhaft gelöscht. Diese Aktion kann nicht rückgängig gemacht werden.",
"desc_one": "Möchtest du {{count}} Modell wirklich löschen? Dadurch werden alle zugehörigen Daten, einschließlich Bilder und Trainingsdaten, dauerhaft gelöscht. Diese Aktion kann nicht rückgängig gemacht werden.",
"desc_other": "Möchtest du {{count}} Modelle wirklich löschen? Dadurch werden alle zugehörigen Daten, einschließlich Bilder und Trainingsdaten, dauerhaft gelöscht. Diese Aktion kann nicht rückgängig gemacht werden."
"single": "{{name}} wirklich löschen? Dadurch werden alle zugehörigen Daten, einschließlich Bilder und Trainingsdaten, dauerhaft gelöscht. Diese Aktion kann nicht rückgängig gemacht werden.",
"desc_one": "{{count}} Modell wirklich löschen? Dadurch werden alle zugehörigen Daten, einschließlich Bilder und Trainingsdaten, dauerhaft gelöscht. Diese Aktion kann nicht rückgängig gemacht werden.",
"desc_other": "{{count}} Modelle wirklich löschen? Dadurch werden alle zugehörigen Daten, einschließlich Bilder und Trainingsdaten, dauerhaft gelöscht. Diese Aktion kann nicht rückgängig gemacht werden."
},
"edit": {
"title": "Klassifikationsmodell bearbeiten",
@@ -75,19 +75,19 @@
"intervalDesc": "Sekundenabstand zwischen regelmäßigen Klassifizierungsläufen. Leer lassen, um die Klassifizierung nur bei Bewegung auszuführen.",
"intervalPlaceholder": "Kein Intervall",
"errors": {
"saveAttemptsInvalid": "Sparversuche müssen eine ganze Zahl von 0 oder mehr sein",
"intervalInvalid": "Intervall muss eine ganze Nummer sein größer als 0"
"saveAttemptsInvalid": "Die Anzahl der Speicherversuche muss eine ganze Zahl sein, die größer oder gleich 0 ist",
"intervalInvalid": "Intervall muss eine ganze Zahl sein, die größer als 0 ist"
}
},
"deleteDatasetImages": {
"title": "Datensatz Bilder löschen",
"desc_one": "Bist du sicher, dass {{count}} Bild von {{dataset}} gelöscht werden sollen? Diese Aktion kann nicht rückgängig gemacht werden und erfordert ein erneutes Trainieren des Modells.",
"desc_other": "Bist du sicher, dass {{count}} Bilder von {{dataset}} gelöscht werden sollen? Diese Aktion kann nicht rückgängig gemacht werden und erfordert ein erneutes Trainieren des Modells."
"desc_one": "Wirklich {{count}} Bild von {{dataset}} löschen? Diese Aktion kann nicht rückgängig gemacht werden und erfordert ein erneutes Trainieren des Modells.",
"desc_other": "Wirklich {{count}} Bilder von {{dataset}} löschen? Diese Aktion kann nicht rückgängig gemacht werden und erfordert ein erneutes Trainieren des Modells."
},
"deleteTrainImages": {
"title": "Trainingsbilder löschen",
"desc_one": "Bist du sicher, dass du {{count}} Bild löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
"desc_other": "Bist du sicher, dass du {{count}} Bilder löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden."
"desc_one": "Wirklich {{count}} Bild löschen? Diese Aktion kann nicht rückgängig gemacht werden.",
"desc_other": "Wirklich {{count}} Bilder löschen? Diese Aktion kann nicht rückgängig gemacht werden."
},
"renameCategory": {
"title": "Klasse umbenennen",
@@ -98,7 +98,7 @@
},
"train": {
"title": "Neue Klassifizierungen",
"titleShort": "frisch",
"titleShort": "Neu",
"aria": "Neue Klassifizierungen auswählen"
},
"categories": "Klassen",
+5 -2
View File
@@ -76,7 +76,7 @@
"menuItem": "Bewegungsvorschau anzeigen",
"title": "Bewegungsvorschau: {{camera}}",
"mobileSettingsTitle": "Einstellungen für die Bewegungsvorschau",
"mobileSettingsDesc": "Passen Sie die Wiedergabegeschwindigkeit und die Dimmung an und wählen Sie ein Datum aus, um Clips mit nur Bewegungen anzusehen.",
"mobileSettingsDesc": "Passen Sie die Wiedergabegeschwindigkeit, die Dimmung und den Zuschnitt an und wählen Sie ein Datum aus, um Clips mit ausschließlich erkannten Bewegungen zu überprüfen.",
"dim": "düster",
"dimAria": "Dimmintensität einstellen",
"dimDesc": "Erhöhen Sie die Dimmung, um die Sichtbarkeit des Bewegungsbereichs zu verbessern.",
@@ -89,6 +89,9 @@
"seekAria": "{{camera}} Player suchen bis {{time}}",
"filter": "Filter",
"filterDesc": "Wählen Sie Bereiche aus, um nur Clips mit Bewegungen in diesen Regionen anzuzeigen.",
"filterClear": "Säubern"
"filterClear": "Säubern",
"crop": "Auf Filterbereich zuschneiden",
"cropAria": "Vorschauen auf die gefilterten Bereiche zuschneiden ein- oder ausschalten",
"cropDesc": "Zeigt eine vergrößerte Vorschau der ausgewählten Filterbereiche an, statt das vollständige Bild zu zeigen."
}
}
+1 -1
View File
@@ -48,7 +48,7 @@
"title": "Neueste Erkennungen",
"aria": "Wähle aktuelle Erkennungen",
"empty": "Es gibt keine aktuellen Versuche zur Gesichtserkennung",
"titleShort": "frisch",
"titleShort": "Neu",
"emptyNoLibrary": {
"title": "Gesicht hinzufügen",
"description": "Sie müssen mindestens ein Gesicht zur Bibliothek hinzufügen, damit die Gesichtserkennung funktioniert."
+2 -1
View File
@@ -22,7 +22,8 @@
"error": "Fehler beim Starten der Debug-Wiedergabe: {{error}}",
"alreadyActive": "Eine Wiederholungssitzung ist bereits aktiv",
"stopError": "Die Wiedergabe der Debug-Daten konnte nicht beendet werden: {{error}}",
"goToReplay": "Zur Aufzeichnung"
"goToReplay": "Zur Aufzeichnung",
"noRecordings": "Keine Aufnahmen im ausgewählten Zeitraum gefunden"
}
},
"page": {
+9 -8
View File
@@ -1383,7 +1383,7 @@
"webuiUrlHelp": "URL, um die Web-Benutzeroberfläche der Kamera direkt aus der Debug-Ansicht aufzurufen. Lassen Sie das Feld leer, um den Link zu deaktivieren.",
"webuiUrlInvalid": "Es muss sich um eine gültige URL handeln (z. B. https://example.com).",
"dashboardLabel": "Im Live-Dashboard anzeigen",
"dashboardHelp": "Zeige diese Kamera auf dem Standard Alle Kameras live dashboard. Es bleibt überall verfügbar, einschließlich Kameragruppen.",
"dashboardHelp": "Diese Kamera im Standard Dashboard \"Alle Live Kameras\" anzeigen. Sie bleibt überall sonst verfügbar einschließlich Kameragruppen.",
"reviewLabel": "In der Überprüfung anzeigen",
"reviewHelp": "Zeige diese Kamera in der Übersicht an, einschließlich des Kamerafilters, der Bewegungsübersicht und der Verlaufsansicht."
},
@@ -1608,8 +1608,8 @@
"overriddenInCameras": {
"label_one": "In {{count}} Kamera überschrieben",
"label_other": "In {{count}} Kameras überschrieben",
"tooltip_one": "Die Kamera mit der Nummer {{count}} überschreibt die Werte in diesem Abschnitt. Klicken Sie hier, um Details anzuzeigen.",
"tooltip_other": "Die Kamera mit der Nummer {{count}} überschreibt die Werte in diesem Abschnitt. Klicken Sie hier, um Details anzuzeigen.",
"tooltip_one": "Die Kamera mit der Nummer {{count}} überschreibt die Werte in diesem Abschnitt. Hier klicken, um Details anzuzeigen.",
"tooltip_other": "{{count}} Kameras überschreiben die Werte in diesem Abschnitt. Hier klicken, um Details anzuzeigen.",
"heading_one": "Dieser globale Abschnitt enthält Felder, die in {{count}} Kamera überschrieben werden.",
"heading_other": "Dieser globale Abschnitt enthält Felder, die bei {{count}} Kameras überschrieben werden.",
"othersField_one": "{{count}} andere",
@@ -1721,13 +1721,13 @@
"valueLabel": "Wert",
"keyPlaceholder": "Neuer Schlüssel",
"remove": "Entfernen",
"providerNameLabel": "Name des Anbieters",
"providerNamePlaceholder": "z.B. openai",
"variableNameLabel": "Variabler Name",
"providerNameLabel": "Anbietername",
"providerNamePlaceholder": "z. B. openai",
"variableNameLabel": "Variablenname",
"variableNamePlaceholder": "z.B. MY_VARIABLE",
"loggerNameLabel": "Name des Loggers",
"loggerNamePlaceholder": "z.B. frigate.record",
"keyPatternError": "Verwenden Sie nur Buchstaben, Zahlen, Bindestriche und Unterstriche (keine Leerzeichen)"
"keyPatternError": "Verwende nur Buchstaben, Zahlen, Bindestriche und Unterstriche (keine Leerzeichen)"
},
"timezone": {
"defaultOption": "Zeitzone des Browsers verwenden"
@@ -2142,7 +2142,8 @@
"autotrackingNoZones": "Für die automatische Verfolgung ist mindestens eine Zone erforderlich. Definieren Sie unter „Masken / Zonen“ eine Zone für diese Kamera und legen Sie diese anschließend unten als erforderliche Zone fest."
},
"ffmpeg": {
"hwaccelManualNotRecommended": "Explizite Definitionen der Hardware-beschleunigungs Variablen sind nicht empfohlen. Wähle die Voreinstellung die zu deiner Hardware passt, außer wenn spezifische Anforderungen eine andere Konfiguration erfordern."
"hwaccelManualNotRecommended": "Explizite Definitionen der Hardware-beschleunigungs Variablen sind nicht empfohlen. Wähle die Voreinstellung die zu deiner Hardware passt, außer wenn spezifische Anforderungen eine andere Konfiguration erfordern.",
"inputsMissingGo2rtcStream": "Ein Eingabefeld unten verweist auf einen go2rtc-Restream, der nicht mehr existiert. Wählen Sie einen vorhandenen Restream aus oder geben Sie die URL der Kamera manuell ein. Andernfalls kann keine Verbindung zu dieser Kamera hergestellt werden."
},
"model": {
"optimizedFor320": "Frigate ist für ein 320x320-Modell optimiert, was für die meisten Konfigurationen die beste Wahl ist. Ein 640x640-Modell ist langsamer und bietet nur in bestimmten Szenarien Vorteile.",
+2 -18
View File
@@ -71,24 +71,8 @@
"description": "Enable or disable the Birdseye view feature."
},
"mode": {
"label": "Activity types",
"description": "Activity types that include cameras in Birdseye.",
"continuous": {
"label": "Continuous",
"description": "Always include the camera in Birdseye."
},
"motion": {
"label": "Motion",
"description": "Include the camera in Birdseye when motion is detected."
},
"objects": {
"label": "Active objects",
"description": "Include the camera in Birdseye while an active object is tracked."
},
"stationary_objects": {
"label": "Stationary objects",
"description": "Include the camera in Birdseye while a stationary object is tracked."
}
"label": "Tracking mode",
"description": "Mode for including cameras in Birdseye: 'objects', 'motion', or 'continuous'."
},
"order": {
"label": "Position",
+2 -18
View File
@@ -558,24 +558,8 @@
"description": "Enable or disable the Birdseye view feature."
},
"mode": {
"label": "Activity types",
"description": "Activity types that include cameras in Birdseye.",
"continuous": {
"label": "Continuous",
"description": "Always include the camera in Birdseye."
},
"motion": {
"label": "Motion",
"description": "Include the camera in Birdseye when motion is detected."
},
"objects": {
"label": "Active objects",
"description": "Include the camera in Birdseye while an active object is tracked."
},
"stationary_objects": {
"label": "Stationary objects",
"description": "Include the camera in Birdseye while a stationary object is tracked."
}
"label": "Tracking mode",
"description": "Mode for including cameras in Birdseye: 'objects', 'motion', or 'continuous'."
},
"restream": {
"label": "Restream RTSP",
+1
View File
@@ -21,6 +21,7 @@
"toast": {
"error": "Failed to start debug replay: {{error}}",
"alreadyActive": "A replay session is already active",
"noRecordings": "No recordings found in the selected time range",
"stopError": "Failed to stop debug replay: {{error}}",
"goToReplay": "Go to Replay"
}
+1 -1
View File
@@ -1955,7 +1955,7 @@
"noRecordRole": "No streams have the record role defined. Recording will not function."
},
"birdseye": {
"objectTrackingDetectDisabled": "Birdseye includes tracked objects, but object detection is disabled for this camera. The camera will not appear in Birdseye."
"objectsModeDetectDisabled": "Birdseye is set to 'objects' mode, but object detection is disabled for this camera. The camera will not appear in Birdseye."
},
"snapshots": {
"detectDisabled": "Object detection is disabled. Snapshots are generated from tracked objects and will not be created."
+1 -1
View File
@@ -38,7 +38,7 @@
"ask_full": "¿Es este objeto un <code>{{untranslatedLabel}}</code> ({{translatedLabel}})?"
},
"toast": {
"error": "Error al enviarlo a Frigate+. Por favor, comprueba tu conexión a internet y prueba de nuevo."
"error": "No se pudo enviar a Frigate+. Verifique su conexión de red e inténtelo de nuevo."
}
}
},
+5 -2
View File
@@ -583,6 +583,9 @@
"max_concurrent": {
"label": "Exportaciones simultáneas máximas",
"description": "Número máximo de trabajos de exportación que se procesarán al mismo tiempo."
},
"chapters": {
"label": "Metadatos de capítulo que se incluirán en las grabaciones exportadas"
}
},
"preview": {
@@ -600,8 +603,8 @@
},
"ui": {
"dashboard": {
"description": "Alterna si esta cámara es visible en toda la interfaz de usuario de Frigate. Desactivar esta opción requerirá editar manualmente la configuración para volver a visualizar esta cámara en la interfaz.",
"label": "Mostrar en la interfaz"
"description": "Alterna si esta cámara será visible en el panel de control en directo predeterminado Todas las cámaras. La cámara seguirá estando disponible en el resto de la interfaz, incluidos los grupos de cámaras y la configuración.",
"label": "Mostrar en el panel de control en directo"
},
"label": "Interfaz de cámara",
"description": "Orden de visualización y visibilidad de esta cámara en la interfaz. El orden afecta al panel predeterminado. Para un control más granular, usa grupos de cámaras.",
+7 -4
View File
@@ -471,7 +471,7 @@
},
"model_type": {
"label": "Tipo de modelo de detección de objetos",
"description": "Tipo de arquitectura del modelo detector (ssd, yolox, yolonas) usado por algunos detectores para optimización."
"description": "Tipo de arquitectura del modelo del detector (ssd, yolox, yolonas, yolo-generic, rfdetr, dfine) utilizado por algunos detectores para su optimización."
}
},
"model_path": {
@@ -984,6 +984,9 @@
"max_concurrent": {
"label": "Exportaciones simultáneas máximas",
"description": "Número máximo de trabajos de exportación que se procesarán al mismo tiempo."
},
"chapters": {
"label": "Metadatos de capítulo que se incluirán en las grabaciones exportadas"
}
},
"preview": {
@@ -1002,8 +1005,8 @@
},
"camera_ui": {
"dashboard": {
"description": "Alterna si esta cámara es visible en toda la interfaz de usuario de Frigate. Desactivar esta opción requerirá editar manualmente la configuración para volver a visualizar esta cámara en la interfaz.",
"label": "Mostrar en la interfaz"
"description": "Alterna si esta cámara será visible en el panel de control en directo predeterminado Todas las cámaras. La cámara seguirá estando disponible en el resto de la interfaz, incluidos los grupos de cámaras y la configuración.",
"label": "Mostrar en el panel de control en directo"
},
"label": "Interfaz de cámara",
"description": "Orden de visualización y visibilidad de esta cámara en la interfaz. El orden afecta al panel predeterminado. Para un control más granular, usa grupos de cámaras.",
@@ -1549,7 +1552,7 @@
},
"model_type": {
"label": "Tipo de modelo de detección de objetos",
"description": "Tipo de arquitectura del modelo detector (ssd, yolox, yolonas) usado por algunos detectores para optimización."
"description": "Tipo de arquitectura del modelo del detector (ssd, yolox, yolonas, yolo-generic, rfdetr, dfine) utilizada por algunos detectores para su optimización."
}
},
"classification": {
+3 -1
View File
@@ -126,5 +126,7 @@
"baby_stroller": "Cochecito de bebé",
"rickshaw": "Rickshaw",
"Rodent": "Roedor",
"rodent": "Roedor"
"rodent": "Roedor",
"possum": "Zarigüeya",
"garbage_truck": "Camión de basura"
}
@@ -57,7 +57,20 @@
"title": "Editar modelo de clasificación",
"descriptionState": "Edita las clases para este modelo de clasificación de estados. Los cambios requerirán un reentrenamiento de modelo.",
"descriptionObject": "Edita el tipo de objeto y el tipo de clasificación para este modelo de clasificación de objetos.",
"stateClassesInfo": "Nota: El cambio de las clases de estado requiere reentrenar el modelo con las clases actualizadas."
"stateClassesInfo": "Modelo actualizado. Vuelva a entrenar el modelo para que los cambios de clase surtan efecto.",
"enabled": "Activado",
"enabledDesc": "Ejecuta este modelo. Cuando se desactiva, deja de funcionar y ya no clasifica.",
"saveAttempts": "Guardar intentos",
"saveAttemptsDesc": "Número de imágenes de intentos de clasificación que se conservarán para la interfaz de usuario de clasificaciones recientes.",
"motion": "Ejecutar en movimiento",
"motionDesc": "Ejecutar la clasificación cuando se detecte movimiento dentro del cultivo configurado.",
"interval": "Intervalo",
"intervalDesc": "Segundos entre ciclos de clasificación periódica. Dejar en blanco para que se ejecute solo con detección de movimiento.",
"intervalPlaceholder": "Sin intervalo",
"errors": {
"saveAttemptsInvalid": "Los intentos de guardado deben ser un número entero de 0 o mayor",
"intervalInvalid": "El intervalo debe ser un número entero mayor que 0"
}
},
"tooltip": {
"noChanges": "No se han realizado cambios en el conjunto de datos desde el último entrenamiento.",
@@ -201,5 +214,6 @@
}
},
"reclassifyImage": "Reclasificar imagen",
"reclassifyImageAs": "Reclasificar imagen como:"
"reclassifyImageAs": "Reclasificar imagen como:",
"disabled": "Desactivado"
}
+5 -2
View File
@@ -77,7 +77,7 @@
"menuItem": "Ver vistas previas de movimiento",
"title": "Vistas previas de movimiento: {{camera}}",
"mobileSettingsTitle": "Ajustes de vistas previas de movimiento",
"mobileSettingsDesc": "Ajusta la velocidad de reproducción y el atenuado, y elige una fecha para revisar clips solo de movimiento.",
"mobileSettingsDesc": "Ajusta la velocidad de reproducción, el brillo y el recorte, y elige una fecha para revisar los clips que solo contienen movimiento.",
"dim": "Atenuar",
"dimAria": "Ajustar intensidad de atenuado",
"dimDesc": "Aumenta el atenuado para mejorar la visibilidad de las áreas con movimiento.",
@@ -90,6 +90,9 @@
"seekAria": "Mover el reproductor de {{camera}} a {{time}}",
"filter": "Filtrar",
"filterDesc": "Selecciona áreas para mostrar solo clips con movimiento en esas regiones.",
"filterClear": "Limpiar"
"filterClear": "Limpiar",
"crop": "Recortar para filtrar",
"cropAria": "Alternar las vistas previas de recorte a las áreas filtradas",
"cropDesc": "La vista previa con zoom se centra en las áreas de filtro seleccionadas en lugar de mostrar el fotograma completo."
}
}
+1 -1
View File
@@ -302,7 +302,7 @@
},
"offset": {
"label": "Desplazamiento de anotación",
"desc": "Estos datos provienen de la señal de detección de la cámara, pero se superponen a las imágenes de la señal de grabación. Es poco probable que ambas transmisiones estén perfectamente sincronizadas. Por lo tanto, el cuadro delimitador y el metraje no se alinearán perfectamente. Puede usar esta configuración para desplazar las anotaciones hacia adelante o hacia atrás en el tiempo para que se alineen mejor con el metraje grabado.",
"desc": "Estos datos provienen de la señal de detección de tu cámara, pero se superponen a las imágenes de la señal de grabación. Es poco probable que ambas señales estén perfectamente sincronizadas. Por lo tanto, el cuadro delimitador y la grabación no coincidirán a la perfección. Puedes usar esta configuración para desplazar las anotaciones hacia adelante o hacia atrás en el tiempo y así alinearlas mejor con la grabación.",
"millisecondsToOffset": "Milisegundos para compensar la detección de anotaciones. <em>Predeterminado: 0</em>",
"tips": "Disminuya el valor si la reproducción de vídeo se produce antes de los cuadros y los puntos de ruta, y auméntelo si se produce después de ellos. Este valor puede ser negativo.",
"toast": {
+17 -5
View File
@@ -691,7 +691,7 @@
"multiDeviceAdmin": "También puede obligar a todos los usuarios a volver a autenticarse inmediatamente rotando su secreto JWT."
},
"createUser": {
"desc": "Añadir una nueva cuenta de usuario y especificar un rol para el acceso a áreas de la interfaz de usuario de Frigate.",
"desc": "Agregue una nueva cuenta de usuario y especifique un rol para el acceso a las áreas de la interfaz de usuario de Frigate.",
"title": "Crear nuevo usuario",
"usernameOnlyInclude": "El nombre de usuario solo puede incluir letras, números, . o _",
"confirmPassword": "Por favor, confirma tu contraseña"
@@ -1308,7 +1308,7 @@
"webuiUrlHelp": "URL para acceder directamente a la interfaz web de la cámara desde la vista de depuración. Déjala en blanco para deshabilitar el enlace.",
"webuiUrlInvalid": "Debe ser una URL válida (p. ej., https://ejemplo.com).",
"dashboardLabel": "Mostrar en el panel En directo",
"dashboardHelp": "Mostrar esta cámara en el panel en directo.",
"dashboardHelp": "Esta cámara se muestra en el panel de control predeterminado \"Todas las cámaras\". Permanece disponible en todas partes, incluidos los grupos de cámaras.",
"reviewLabel": "Mostrar en Revisión",
"reviewHelp": "Mostrar esta cámara en Revisión, incluido el filtro de cámaras, la revisión de movimiento y la vista de historial."
},
@@ -1354,7 +1354,7 @@
"deleteCameraDialog": {
"description": "Eliminar una cámara borrará permanentemente todas las grabaciones, los objetos rastreados y la configuración de esa cámara. Es posible que sea necesario eliminar manualmente cualquier transmisión go2rtc asociada a esta cámara.",
"title": "Eliminar cámara",
"selectPlaceholder": "Elegir cámara...",
"selectPlaceholder": "Elige una cámara…",
"confirmTitle": "¿Estás seguro?",
"confirmWarning": "Eliminar <strong>{{cameraName}}</strong> no se puede deshacer.",
"deleteExports": "Eliminar también las exportaciones de esta cámara",
@@ -1668,7 +1668,14 @@
"keyLabel": "Clave",
"valueLabel": "Valor",
"keyPlaceholder": "Nueva clave",
"remove": "Eliminar"
"remove": "Eliminar",
"providerNameLabel": "Nombre del proveedor",
"providerNamePlaceholder": "p. ej., openai",
"variableNameLabel": "Nombre de la variable",
"variableNamePlaceholder": "p. ej., MI_VARIABLE",
"loggerNameLabel": "Nombre del registrador",
"keyPatternError": "Utilice únicamente letras, números, guiones y guiones bajos (sin espacios)",
"loggerNamePlaceholder": "p. ej., frigate.record"
},
"knownPlates": {
"namePlaceholder": "p. ej., Coche de mi mujer",
@@ -2032,7 +2039,12 @@
"autotrackingNoZones": "El seguimiento automático requiere al menos una zona. Define una zona para esta cámara en Máscaras / Zonas y, a continuación, establécela como zona obligatoria a continuación."
},
"ffmpeg": {
"hwaccelManualNotRecommended": "No son remontados los argumentos de aceleración por hardware manual. A no ser que un requisito específico exista, seleccione la preselección que coincida con su hardware."
"hwaccelManualNotRecommended": "No son remontados los argumentos de aceleración por hardware manual. A no ser que un requisito específico exista, seleccione la preselección que coincida con su hardware.",
"inputsMissingGo2rtcStream": "El campo de entrada que aparece a continuación apunta a una retransmisión de go2rtc que ya no existe. Seleccione una retransmisión existente o introduzca la URL de la cámara manualmente; de lo contrario, la cámara no podrá conectarse."
},
"model": {
"optimizedFor320": "Frigate está optimizado para un modelo de 320x320, que es la mejor opción para la mayoría de las configuraciones. Un modelo de 640x640 es más lento y solo resulta útil en situaciones específicas.",
"inputDimensionsNotDetectResolution": "El ancho y alto de entrada del modelo son las dimensiones de entrada del modelo de detección de objetos, no la resolución de detección de la cámara. Deben coincidir con las dimensiones del modelo que esté utilizando, normalmente un tamaño cuadrado como 320x320 o 640x640."
}
},
"resetToDefaultDescription": "Esto restablecerá todos los ajustes de esta sección a sus valores predeterminados. Esta acción no se puede deshacer.",
+4 -4
View File
@@ -83,8 +83,8 @@
"batchSuccess_other": "Alustasin {{count}} ekspordiga. Avan juhtumi kohe.",
"batchPartial": "Alustasin {{successful}}/{{total}} ekspordiga. Ebaõnnestunud kaamerad: {{failedCameras}}",
"batchFailed": "{{total}} eksporti ebaõnnestus algatada. Ebaõnnestunud kaamerad: {{failedCameras}}",
"batchQueuedSuccess_one": "1 eksport järjekorda lisatud. Avan juhtumi kohe.",
"batchQueuedSuccess_other": "{{count}} eksporti järjekorda lisatud. Avan juhtumi kohe.",
"batchQueuedSuccess_one": "1 eksportimine on lisatud järjekorda.",
"batchQueuedSuccess_other": "{{count}} eksportimist on lisatud järjekorda.",
"batchQueuedPartial": "{{successful}}/{{total}} ekspordist on järjekorda lisatud. Ebaõnnestunud kaamerad: {{failedCameras}}",
"batchQueueFailed": "{{total}} eksporti ebaõnnestus järjekorda lisada. Ebaõnnestunud kaamerad: {{failedCameras}}"
},
@@ -139,8 +139,8 @@
"exportButton_other": "Ekspordi {{count}} ülevaadet",
"exportingButton": "Ekspordin...",
"toast": {
"started_one": "Alustasin 1 eksporti. Avan juhtumi kohe.",
"started_other": "Alustasin {{count}} ekspordiga. Avan juhtumi kohe.",
"started_one": "Alustasin ühte eksportimist.",
"started_other": "Alustasin {{count}} eksportimisega.",
"startedNoCase_one": "Alustasin 1 ekspordiga.",
"startedNoCase_other": "Alustasin {{count}} ekspordiga.",
"partial": "Alustasin {{successful}}/{{total}} ekspordiga. Ebaõnnestusid: {{failedItems}}",
+2 -1
View File
@@ -19,7 +19,8 @@
"error": "Silumise taasesitus ebaõnnestus: {{error}}",
"alreadyActive": "Kordusseanss on juba aktiivne",
"stopError": "Silumise taasesituse peatamine ebaõnnestus: {{error}}",
"goToReplay": "Mine kordusesse"
"goToReplay": "Mine kordusesse",
"noRecordings": "Valitud ajavahemikust ei leidu ühtegi salvestust"
}
},
"title": "Kordus veaotsinguks",
+1 -1
View File
@@ -413,7 +413,7 @@
"typewriter": "ماشین تحریر",
"computer_keyboard": "صفحه‌کلید رایانه",
"writing": "نوشتن",
"alarm": "هشدار",
"alarm": "زنگ هشدار",
"telephone": "تلفن",
"siren": "آژیر",
"civil_defense_siren": "آژیر دفاع مدنی",
+6 -4
View File
@@ -134,7 +134,7 @@
"export": "خروجی گرفتن",
"next": "بعدی",
"reset": "بازنشانی",
"enabled": "فعال",
"enabled": "فعال شده",
"disable": "غیرفعال کردن",
"save": "ذخیره",
"saving": "در حال ذخیره‌سازی…",
@@ -161,7 +161,8 @@
"resetToDefault": "بازنشانی به پیش‌فرض",
"saveAll": "ذخیره همه",
"savingAll": "ذخیره‌سازی همه…",
"undoAll": "بازگردانی همه"
"undoAll": "بازگردانی همه",
"overridden": "نادیده‌گرفته‌شده"
},
"menu": {
"systemMetrics": "شاخص‌های سیستم",
@@ -211,9 +212,10 @@
"label": "برای زبان از تنظیمات سامانه استفاده کنید"
},
"zhHant": "چینی سنتی",
"hr": "کرواسیایی"
"hr": "کرواسیایی",
"bs": "بوسنیایی"
},
"system": "سامانه",
"system": "سیستم",
"systemLogs": "لاگ‌های سامانه",
"configurationEditor": "ویرایشگر پیکربندی",
"languages": "زبان‌ها",
+83 -6
View File
@@ -1,12 +1,13 @@
{
"restart": {
"title": "آیا برای راه اندازی مجدد Frigate مطمئن هستید؟",
"button": "ری‌استارت",
"button": "راه‌اندازی دوباره",
"restarting": {
"title": "فریگیت در حال ری‌استارت شدن",
"content": "صفحه تا {{countdown}} ثانیه دیگر مجددا بارگزاری خواهد شد.",
"button": "بارگزاری مجدد هم اکنون اجرا شود"
}
},
"description": "این کار به‌طور موقت Frigate را هنگام راه‌اندازی مجدد متوقف می‌کند."
},
"explore": {
"plus": {
@@ -23,6 +24,9 @@
},
"state": {
"submitted": "ارسال شد"
},
"toast": {
"error": "ارسال به Frigate+ انجام نشد. لطفاً اتصال شبکه خود را بررسی کرده و دوباره تلاش کنید."
}
}
},
@@ -49,21 +53,86 @@
"error": {
"endTimeMustAfterStartTime": "زمان پایان باید بعد از زمان شروع باشد",
"noVaildTimeSelected": "بازهٔ زمانی معتبر انتخاب نشده است",
"failed": "شروع خروجی‌گیری ناموفق بود: {{error}}"
"failed": "شروع خروجی‌گیری ناموفق بود: {{error}}",
"noValidTimeSelected": "بازهٔ زمانی معتبر انتخاب نشده است"
},
"success": "ساخت خروجی با موفقیت آغاز شد. فایل را در صفحه خروجی‌ها مشاهده کنید.",
"view": "مشاهده"
"view": "مشاهده",
"queued": "خروجی در صف قرار گرفت. پیشرفت را در صفحهٔ خروجی‌ها مشاهده کنید.",
"batchSuccess_one": "۱ خروجی شروع شد. در حال باز کردن مورد.",
"batchSuccess_other": "{{count}} خروجی شروع شد. در حال باز کردن مورد.",
"batchPartial": "{{successful}} از {{total}} خروجی شروع شد. دوربین‌های ناموفق: {{failedCameras}}",
"batchFailed": "شروع {{total}} خروجی ناموفق بود. دوربین‌های ناموفق: {{failedCameras}}",
"batchQueuedSuccess_one": "۱ خروجی در صف قرار گرفت.",
"batchQueuedSuccess_other": "{{count}} خروجی در صف قرار گرفت.",
"batchQueuedPartial": "{{successful}} از {{total}} خروجی در صف قرار گرفت. دوربین‌های ناموفق: {{failedCameras}}",
"batchQueueFailed": "صف‌بندی {{total}} خروجی ناموفق بود. دوربین‌های ناموفق: {{failedCameras}}"
},
"fromTimeline": {
"saveExport": "ذخیرهٔ خروجی",
"previewExport": "پیش‌نمایش خروجی"
"previewExport": "پیش‌نمایش خروجی",
"queueingExport": "در حال صف‌بندی خروجی...",
"useThisRange": "استفاده از این بازه"
},
"name": {
"placeholder": "برای خروجی نام بگذارید"
},
"select": "انتخاب",
"export": "خروجی",
"selectOrExport": "انتخاب یا خروجی"
"selectOrExport": "انتخاب یا خروجی",
"multiCamera": {
"selectGroup": "انتخاب گروه",
"noMatchingCameras": "هیچ دوربینی با جستجوی شما مطابقت ندارد",
"checkingActivity": "در حال بررسی فعالیت دوربین...",
"noCameras": "هیچ دوربینی در دسترس نیست",
"detectionCount_one": "1 شیء ردیابی شده",
"detectionCount_other": "{{count}} شیء ردیابی شده",
"nameLabel": "نام خروجی",
"namePlaceholder": "نام پایه اختیاری برای این خروجی‌ها",
"queueingButton": "به صف کردن خروجی‌ها...",
"exportButton_one": "خروجی 1 دوربین",
"exportButton_other": "خروجی {{count}} دوربین",
"timeRange": "محدوده زمانی",
"selectFromTimeline": "انتخاب از تایم‌لاین",
"cameraSelection": "دوربین‌ها",
"cameraSelectionHelp": "دوربین‌هایی که در این بازه زمانی دارای اشیاء ردیابی‌شده هستند، از قبل انتخاب شده‌اند",
"searchOrSelectGroup": "جستجو یا انتخاب گروه دوربین...",
"selectAll": "انتخاب همه دوربین‌ها",
"clearSelection": "پاک کردن انتخاب‌ها",
"selectWithActivity": "دوربین‌های دارای اشیاء ردیابی‌شده",
"selectedCount": "{{selected}} / {{total}} انتخاب شده"
},
"multi": {
"title_one": "خروجی ۱ بازبینی",
"title_other": "خروجی {{count}} بازبینی",
"description": "از هر بازبینی انتخاب‌شده خروجی بگیرید. تمام خروجی‌ها تحت یک پرونده واحد گروه‌بندی خواهند شد.",
"descriptionNoCase": "از هر بازبینی انتخاب‌شده خروجی بگیرید.",
"caseNamePlaceholder": "بازبینی خروجی - {{date}}",
"exportButton_one": "خروجی 1 بازبینی",
"exportButton_other": "خروجی {{count}} بازبینی",
"exportingButton": "خروجی گرفتن...",
"toast": {
"started_one": "۱ خروجی شروع شد.",
"started_other": "{{count}} خروجی شروع شد.",
"startedNoCase_one": "۱ خروجی آغاز شد.",
"startedNoCase_other": "{{count}} خروجی آغاز شد.",
"partial": "{{successful}} از {{total}} خروجی آغاز شد. موارد ناموفق: {{failedItems}}",
"failed": "شروع {{total}} خروجی ناموفق بود. ناموفق: {{failedItems}}"
}
},
"case": {
"newCaseOption": "ایجاد پرونده جدید",
"newCaseNamePlaceholder": "نام پرونده جدید",
"newCaseDescriptionPlaceholder": "توضیحات مورد",
"label": "مورد",
"nonAdminHelp": "یک مورد جدید برای این خروجی‌ها ایجاد خواهد شد.",
"placeholder": "انتخاب یک مورد"
},
"queueing": "در حال قرار دادن خروجی در صف...",
"tabs": {
"export": "تک دوربین",
"multiCamera": "چند-دوربین"
}
},
"streaming": {
"label": "جریان",
@@ -109,6 +178,14 @@
"markAsReviewed": "علامت‌گذاری به‌عنوان بازبینی‌شده",
"markAsUnreviewed": "علامت‌گذاری به‌عنوان بازبینی‌نشده",
"deleteNow": "حذف فوری"
},
"shareTimestamp": {
"label": "اشتراک‌گذاری مهر زمانی",
"title": "اشتراک‌گذاری مهر زمانی",
"description": "یک نشانی اینترنتی با مهر زمانی از موقعیت فعلی پخش‌کننده به اشتراک بگذارید یا یک مهر زمانی سفارشی انتخاب کنید. توجه کنید که این یک لینک اشتراک‌گذاری عمومی نیست و فقط برای کاربرانی که به Frigate و این دوربین دسترسی دارند قابل دسترسی است.",
"custom": "مهر زمانی سفارشی",
"button": "اشتراک‌گذاری نشانی مهر زمانی",
"shareTitle": "مهر زمانی بازبینی فریگیت: {{camera}}"
}
},
"imagePicker": {
+1 -1
View File
@@ -18,7 +18,7 @@
"count_other": "{{count}} برچسب‌ها"
},
"zones": {
"label": "مناطق",
"label": "نواحی",
"all": {
"title": "همهٔ ناحیه‌ها",
"short": "ناحیه‌ها"
+30 -7
View File
@@ -33,7 +33,11 @@
},
"filters": {
"label": "فیلترهای صوتی",
"description": "تنظیمات فیلتر بر اساس نوع صدا مانند آستانه‌های اطمینان که برای کاهش تشخیص‌های مثبت کاذب استفاده می‌شوند."
"description": "تنظیمات فیلتر بر اساس نوع صدا مانند آستانه‌های اطمینان که برای کاهش تشخیص‌های مثبت کاذب استفاده می‌شوند.",
"threshold": {
"label": "حداقل اطمینان صوتی",
"description": "حداقل آستانه اطمینان برای رویداد صوتی تا شمارش شود."
}
},
"enabled_in_config": {
"label": "وضعیت صوتی اصلی",
@@ -471,7 +475,7 @@
"description": "تنظیمات نگهداری برای ضبط رویدادهای تشخیص.",
"days": {
"label": "روزهای نگهداری",
"description": "تعداد روزهایی که لازم است سوابق رویدادهای شناسایی‌شده نگهداری EMSebi شوند ."
"description": "تعداد روزهایی که ضبط‌های رویدادهای تشخیص باید نگهداری شوند."
},
"mode": {
"label": "حالت نگهداری",
@@ -485,6 +489,13 @@
"hwaccel_args": {
"label": "خروجی گرفتن از آرگومان‌های hwaccel",
"description": "آرگومان‌های شتاب سخت‌افزاری برای استفاده در عملیات صادرات/تبدیل کد."
},
"max_concurrent": {
"label": "حداکثر خروجی‌های همزمان",
"description": "حداکثر تعداد کارهای خروجی که همزمان پردازش می‌شوند."
},
"chapters": {
"label": "فرادادهٔ فصل برای جاسازی در ضبط‌های خروجی‌گرفته‌شده"
}
},
"preview": {
@@ -672,8 +683,8 @@
}
},
"quality": {
"label": "کیفیت JPEG",
"description": "کیفیت کدگذاری JPEG برای عکس‌های ذخیره شده (0-100)."
"label": "کیفیت عکس فوری",
"description": "کیفیت کدگذاری برای عکس‌های فوری ذخیره‌شده (0-100)."
}
},
"timestamp_style": {
@@ -823,7 +834,7 @@
},
"timeout": {
"label": "مهلت بازگشت",
"description": "چند ثانیه صبر کن پس از از دست دادن ردیابی قبل از بازگرداندن دوربین به موقعیت از پیش تعیین شده ."
"description": "پس از قطع ردیابی، این تعداد ثانیه صبر کنید قبل از بازگرداندن دوربین به موقعیت از پیش تعیین‌شده."
},
"movement_weights": {
"label": "وزنه‌های حرکتی",
@@ -838,7 +849,11 @@
"label": "عدم تطابق زمانی را نادیده بگیرید",
"description": "برای ارتباط ONVIF، از تفاوت‌های همگام‌سازی زمانی بین دوربین و سرور Frigate صرف نظر کنید."
},
"label": "ONVIF پروتکل استاندارد انتقال تصویر ."
"label": "ONVIF",
"profile": {
"label": "پروفایل ONVIF",
"description": "پروفایل رسانهٔ ONVIF خاص برای کنترل PTZ، مطابقت‌شده با توکن یا نام. اگر تنظیم نشود، اولین پروفایل با پیکربندی PTZ معتبر به‌طور خودکار انتخاب می‌شود."
}
},
"type": {
"label": "نوع دوربین",
@@ -854,6 +869,10 @@
"dashboard": {
"label": "نمایش در رابط کاربری",
"description": "مشخص کنید که آیا این دوربین در همه جای رابط کاربری Frigate قابل مشاهده باشد یا خیر. غیرفعال کردن این گزینه مستلزم ویرایش دستی پیکربندی برای مشاهده مجدد این دوربین در رابط کاربری است."
},
"review": {
"label": "نمایش در بازبینی",
"description": "مشخص کنید که آیا این دوربین در بازبینی قابل مشاهده باشد (صفحهٔ بازبینی و فیلتر دوربین آن، بازبینی حرکت، و نمای تاریخچه)."
}
},
"webui_url": {
@@ -861,7 +880,7 @@
"description": "آدرس اینترنتی برای بازدید مستقیم از دوربین از صفحه سیستم"
},
"zones": {
"label": "مناطق",
"label": "نواحی",
"description": "مناطق به شما امکان می‌دهند ناحیه خاصی از قاب را تعریف کنید تا بتوانید تعیین کنید که آیا یک شیء در یک ناحیه خاص قرار دارد یا خیر.",
"friendly_name": {
"label": "نام منطقه",
@@ -937,5 +956,9 @@
"enabled_in_config": {
"label": "وضعیت دوربین اصلی",
"description": "وضعیت اولیه دوربین را پیگیری کنید."
},
"profiles": {
"label": "پروفایل‌ها",
"description": "پروفایل‌های پیکربندی نام‌گذاری‌شده با لغوهای جزئی که در زمان اجرا قابل فعال‌سازی هستند."
}
}
File diff suppressed because it is too large Load Diff
+73 -1
View File
@@ -1 +1,73 @@
{}
{
"audio": {
"global": {
"detection": "تشخیص سراسری",
"sensitivity": "حساسیت سراسری"
},
"cameras": {
"detection": "تشخیص",
"sensitivity": "حساسیت"
}
},
"timestamp_style": {
"global": {
"appearance": "ظاهر سراسری"
},
"cameras": {
"appearance": "ظاهر"
}
},
"motion": {
"global": {
"sensitivity": "حساسیت سراسری",
"algorithm": "الگوریتم سراسری"
},
"cameras": {
"sensitivity": "حساسیت",
"algorithm": "الگوریتم"
}
},
"snapshots": {
"global": {
"display": "نمایش سراسری"
},
"cameras": {
"display": "نمایش"
}
},
"detect": {
"global": {
"resolution": "وضوح سراسری",
"tracking": "ردیابی سراسری"
},
"cameras": {
"resolution": "وضوح",
"tracking": "ردیابی"
}
},
"objects": {
"global": {
"tracking": "ردیابی سراسری",
"filtering": "پالایش سراسری"
},
"cameras": {
"tracking": "ردیابی",
"filtering": "پالایش"
}
},
"record": {
"global": {
"retention": "نگهداری سراسری",
"events": "رویدادهای سراسری"
},
"cameras": {
"retention": "نگهداری",
"events": "رویدادها"
}
},
"ffmpeg": {
"cameras": {
"cameraFfmpeg": "آرگومان‌های FFmpeg اختصاصی دوربین"
}
}
}
+35 -1
View File
@@ -1 +1,35 @@
{}
{
"minimum": "باید حداقل {{limit}} باشد",
"maximum": "باید حداکثر {{limit}} باشد",
"exclusiveMinimum": "باید بزرگ‌تر از {{limit}} باشد",
"exclusiveMaximum": "باید کم‌تر از {{limit}} باشد",
"minLength": "باید حداقل {{limit}} نویسه باشد",
"maxLength": "باید حداکثر {{limit}} نویسه باشد",
"minItems": "باید حداقل {{limit}} مورد داشته باشد",
"maxItems": "باید حداکثر {{limit}} مورد داشته باشد",
"pattern": "قالب نامعتبر",
"required": "این فیلد الزامی است",
"type": "نوع مقدار نامعتبر",
"enum": "باید یکی از مقادیر مجاز باشد",
"const": "مقدار با ثابت مورد انتظار مطابقت ندارد",
"uniqueItems": "همه موارد باید یکتا باشند",
"format": "قالب نامعتبر",
"additionalProperties": "ویژگی ناشناخته مجاز نیست",
"oneOf": "باید دقیقاً با یکی از طرح‌واره‌های مجاز مطابقت داشته باشد",
"anyOf": "باید با حداقل یکی از طرح‌واره‌های مجاز مطابقت داشته باشد",
"proxy": {
"header_map": {
"roleHeaderRequired": "هنگامی که نگاشت نقش‌ها پیکربندی شده است، هدر نقش الزامی است."
}
},
"ffmpeg": {
"inputs": {
"rolesUnique": "هر نقش فقط می‌تواند به یک جریان ورودی اختصاص یابد.",
"detectRequired": "حداقل یک جریان ورودی باید نقش «detect» داشته باشد.",
"hwaccelDetectOnly": "فقط جریان ورودی با نقش detect می‌تواند آرگومان‌های شتاب‌دهی سخت‌افزاری تعریف کند."
}
},
"detect": {
"dimensionMustBeEven": "باید یک عدد زوج باشد."
}
}

Some files were not shown because too many files have changed in this diff Show More