2324 Commits

Author SHA1 Message Date
Josh Hawkins
cfb87f9744 Miscellaneous fixes (#22913)
* add log when probing detect stream on startup

when users don't explicitly set detect.width and detect.height, we probe for them. sometimes the probe hangs (camera doesn't support UDP, like some Reolinks), so this log message will make that clearer

* add faq about probing detect stream

* fix stuck activity ring when tracked object transitions to stationary

* drop cache segments past retain cutoff regardless of retention mode

* add maintainer test
2026-04-18 07:10:50 -06:00
Josh Hawkins
74fcd720d3 Add step + percent progress for exports (#22915)
* backend

* improve frontend Job typing

* progress frontend

* i18n

* tests
2026-04-17 12:18:12 -06:00
Nicolas Mowen
d830d47c9b fix mypy (#22889) 2026-04-15 10:02:41 -05:00
Nicolas Mowen
2ffe47511a Fix manual event getting caught by global motion config (#22887) 2026-04-15 08:32:26 -06:00
Josh Hawkins
a47be12ac5 Add deferred real-time processor for enrichments (#22880)
* implement deferred real-time processor with background task handling

* add tests

* fix typing
2026-04-14 21:39:44 -06:00
Josh Hawkins
e7e6f87682 Export improvements (#22867)
* backend

* frontend + i18n

* tests + api spec

* tweak backend to use Job infrastructure for exports

* frontend tweaks and Job infrastructure

* tests

* tweaks

- add ability to remove from case
- change location of counts in case card

* add stale export reaper on startup

* fix toaster close button color

* improve add dialog

* formatting

* hide max_concurrent from camera config export settings

* remove border

* refactor batch endpoint for multiple review items

* frontend

* tests and fastapi spec

* fix deletion of in-progress exports in a case

* tweaks

- hide cases when filtering cameras that have no exports from those cameras
- remove description from case card
- use textarea instead of input for case description in add new case dialog

* add auth exceptions for exports

* add e2e test for deleting cases with exports

* refactor delete and case endpoints

allow bulk deleting and reassigning

* frontend

- bulk selection like Review
- gate admin-only actions
- consolidate dialogs
- spacing/padding tweaks

* i18n and tests

* update openapi spec

* tweaks

- add None to case selection list
- allow new case creation from single cam export dialog

* fix codeql

* fix i18n

* remove unused

* fix frontend tests
2026-04-14 08:19:50 -06:00
Josh Hawkins
335229d0d4 Miscellaneous fixes (#22828)
* fix video playback stutter when GenAI dialog is open in detail stream

Inline `onOpen` callback in DetailStream.tsx:522 creates a new function identity every render. GenAISummaryChip.tsx:98's useEffect depends on [open, onOpen], so it re-fires on every parent re-render while the dialog is open. Each fire calls onSeek -> setCurrentTime -> seekToTimestamp, creating a continuous re-render + seek loop

* add /profiles to EXEMPT_PATHS for non-admin users

* skip debug_replay/status poll for non-admin users

* use subquery for timeline lookup to avoid SQLite variable limit
2026-04-09 20:53:17 -06:00
Josh Hawkins
98c2fe00c1 Chat improvements (#22823)
* Add score fusion helpers for find_similar_objects chat tool

* Add candidate query builder for find_similar_objects chat tool

* register find_similar_objects chat tool definition

* implement _execute_find_similar_objects chat tool dispatcher

* Dispatch find_similar_objects in chat tool executor

* Teach chat system prompt when to use find_similar_objects

* Add i18n strings for find_similar_objects chat tool

* Add frontend extractor for find_similar_objects tool response

* Render anchor badge and similarity scores in chat results

* formatting

* filter similarity results in python, not sqlite-vec

* extract pure chat helpers to chat_util module

* Teach chat system prompt about attached_event marker

* Add parseAttachedEvent and prependAttachment helpers

* Add i18n strings for chat event attachments

* Add ChatAttachmentChip component

* Make chat thumbnails attach to composer on click

* Render attachment chip in user chat bubbles

* Add ChatQuickReplies pill row component

* Add ChatPaperclipButton with event picker popover

* Wire event attachments into chat composer and messages

* add ability to stop streaming

* tweak cursor to appear at the end of the same line of the streaming response

* use abort signal

* add tooltip

* display label and camera on attachment chip
2026-04-09 14:31:37 -06:00
Josh Hawkins
556d5d8c9d remove dead code and repair utf-8 preset names via latin-1 round trip (#22818) 2026-04-08 16:20:58 -05:00
Josh Hawkins
8f13932c64 UI fixes (#22814)
* display area as proper percentage in debug view

* match replay objects list with debug view

* motion search fixes

- tweak progress bar to exclude heatmap and inactive segments
- show metrics immediately on search start
- fix preview frame loading race
- fix polygon missing after dialog remount
- don't try to drag the image when dragging vertex of polygon

* add activity indicator to storage metrics

* make sub label query for events API endpoints case insensitive
2026-04-08 08:21:48 -06:00
Josh Hawkins
5d2a725428 Display more scores in Tracking Details (#22799)
* add computed and top score to timeline entries

* frontend

* docs
2026-04-07 10:06:22 -06:00
Josh Hawkins
dfe365cd28 Miscellaneous fixes (#22780)
* fix mobile export crash by removing stale iOS non-modal drawer workaround

* Remove titlecase to avoid Gemma4 handling plain labels as proper nouns

* Improve titling:

* Make directions more clear

* Properly capitalize delivery services

* update dispatcher config reference on save

* subscribe to review topic so ReviewDescriptionProcessor knows genai is enabled

* auto-send ON genai review WS message when enabled_in_config transitions to true

* remove unused object level

* update docs to clarify pre/post capture settings

* add ui docs links

* improve known_plates field in settings UI

* only show save all when multiple sections are changed

or if the section being changed is not currently being viewed

* fix docs

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2026-04-07 07:16:19 -06:00
Josh Hawkins
49c3732726 Improve environment var handling (#22796)
* refactor env var handling

- use shared helper
- use left-to-right parser

* add tests

* formatting
2026-04-07 07:16:02 -06:00
Josh Hawkins
ed3bebc967 Miscellaneous fixes (#22779)
* block ffmpeg args in custom exports for non-admin users only

* prune expired reconnect timestamps periodically in watchdog loop

reconnect timestamps were only pruned when a new reconnect
occurred. This meant a single reconnect would persist in the count indefinitely instead of expiring after 1 hour

* formatting
2026-04-06 07:53:23 -06:00
Josh Hawkins
e95e9b52f3 GenAI tweak (#22773)
* refresh model dropdown after changing provider or base url

* decouple list_models from provider init

switching providers in the UI left an invalid model in the config, then _init_provider would fail and list_models would return an empty list, making it impossible to select a valid model
2026-04-05 11:00:13 -06:00
Josh Hawkins
67a1531da0 Tweaks (#22770)
* radix pointer events fix

* add debug log for no genai responses

* tweak profiles docs

* add weblate to maintainers list
2026-04-05 10:08:23 -06:00
Josh Hawkins
e24eb676a9 GenAI tweaks (#22756)
* add DictAsYamlField for genai provider and runtime options

* regenerate config translations

* chat tweaks

- add page title
- scroll if near bottom
- add tool call group that dynamically updates as tool calls are made
- add bouncing loading indicator and other UI polish

* tool call grouping
2026-04-04 06:54:51 -06:00
Nicolas Mowen
9cb76d0bd9 Refactor genai (#22752)
* Switch to a feature-based roles so it is easier to choose models for different tasks

* Fallback and try llama-swap format

* List models supported by provider

* Cleanup

* Add frontend

* Improve model loading

* Make it possible to update genai without restarting

* Cleanup

* Cleanup

* Mypy
2026-04-03 17:13:52 -06:00
Nicolas Mowen
68dfb157ea Auto llama.cpp context (#22737)
* Add model probing

* Include aliases

* Pull correctly

* Correctly query specific model props

* Debug log

* Update model list
2026-04-02 20:13:34 -05:00
Josh Hawkins
5059311c9d Mask/zone editor fixes (#22732)
* add guards to reject missing sub commands

* mask/zone bugfixes

- fix websocket crash when creating a new mask or zone before a name is assigned
- fix deleted masks and zones not disappearing from the list until navigating away
- fix deleting profile override not reverting to the base mask in the list
- fix inertia defaulting to nan

* disable save button on invalid form state

* fix validation for speed estimation

* ensure polygon is closed before allowing save

* require all masks and zones to be on the base config

* clarify dialog message and tooltip when removing an override

* clarify docs
2026-04-02 08:15:51 -06:00
Josh Hawkins
f1983b25ca Ensure environment vars are correctly substituted when dynamically changing go2rtc streams (#22723) 2026-04-01 08:06:25 -05:00
Nicolas Mowen
e1245cb93d Improve profile state management and add recap tool (#22715)
* Improve profile information

* Add chat tools

* Add quick links to new chats

* Improve usefulness

* Cleanup

* fix
2026-03-31 19:09:32 -05:00
Josh Hawkins
b821420dee Miscellaneous improvements (#22714)
* scrub genai API keys and onvif credentials from config endpoint

* enforce camera access in thumbnail tracked-object fallback

The /events/{id}/thumbnail endpoint called require_camera_access when
loading persisted events but skipped the check in the tracked-object
fallback path for in-progress events. A restricted viewer could
retrieve thumbnails from cameras they should not have access to.

* block filter and attach flags in custom ffmpeg export args

The ffmpeg argument blocklist missed -filter_complex, -lavfi, -vf,
-af, -filter, and -attach. These flags can read arbitrary files via
source filters like movie= and amovie=, bypassing the existing -i
block. A user with camera access could exploit this through the
custom export endpoint.

* enforce camera access on VLM monitor endpoint

POST /vlm/monitor allowed any authenticated user to start VLM
monitoring on any camera without checking camera access. A viewer
restricted to specific cameras could monitor cameras they should
not have access to.

* enforce camera access in chat start_camera_watch tool

The start_camera_watch tool called via POST /chat/completion did not
validate camera access, allowing a restricted viewer to start VLM
monitoring on cameras outside their allowed set through the chat
interface.

* restrict review summary endpoint to admin role

* fix require_role call passing string instead of list

* fix section config uiSchema merge replacing base entries

mergeSectionConfig was replacing the entire base uiSchema when a
level override (global/camera) also defined one, causing base-level
ui:after/ui:before directives to be silently dropped. This broke
the SemanticSearchReindex button which was defined in base uiSchema.
2026-03-31 13:45:04 -05:00
Josh Hawkins
a5e3dfd107 Add config validators (#22704)
* add validator for detect width and height

require both or neither

* coerce semantic search model string to enum

Built-in model names (jinav1, jinav2) get converted to the enum, genai provider names that don't match stay as plain strings and follow the existing validation path

* formatting
2026-03-30 08:34:54 -05:00
Nicolas Mowen
f0a6626c6a Fix EU DST bug (#22698) 2026-03-29 18:38:11 -06:00
Josh Hawkins
f44f485f48 Improve metrics UI performance (#22691)
* embed cpu/mem stats into detectors, cameras, and processes

so history consumers don't need the full cpu_usages dict

* support dot-notation for nested keys

to avoid returning large objects when only specific subfields are needed

* fix setLastUpdated being called inside useMemo

this triggered a setState-during-render warning, so moved to a useEffect

* frontend types

* frontend

hide instead of unmount all graphs - re-rendering is much more expensive and disruptive than the amount of dom memory required

keep track of visited tabs to keep them mounted rather than re-mounting or mounting all tabs

add isActive prop to all charts to re-trigger animation when switching metrics tabs

fix chart data padding bug where the loop used number of series rather than number of data points

fix bug where only a shallow copy of the array was used for mutation

fix missing key prop causing console logs

* add isactive after rebase

* formatting

* skip None values in filtered output for dot notation
2026-03-29 11:58:47 -06:00
Josh Hawkins
f002513d36 send MQTT snapshot when object enters required zone (#22690)
When mqtt.required_zones is configured, the initial mqtt snapshot on
object creation is always blocked because zone evaluation hasn't run
yet (entered_zones is empty). Later, the snapshot is only re-sent if
a better thumbnail is found, so if the first frame was already the
best capture the snapshot is silently lost.

Add a new_zone_entered flag to TrackedObject that triggers an mqtt
snapshot publish as soon as zone entry is confirmed, closing the gap
between object detection and zone evaluation.

Closes blakeblackshear/frigate#21027
2026-03-29 12:33:57 -05:00
Josh Hawkins
b04b1d0dc8 fix json serialization error for license plate box coordinates (#22689) 2026-03-29 11:30:39 -06:00
Nicolas Mowen
decc8aa391 Incrase frequency of secondary pipeline updates (#22673)
* Incrase frequency of secondary pipeline updates when an object needs it

* Handle buffer timestamps correctly

* Consider LP that are not sub label
2026-03-29 12:12:01 -05:00
Nicolas Mowen
831cfc2444 Refactor Intel Stats (#22674)
* Improve Intel stats collection

* Update handling of stats to be simpler

* Simplify handling

* More accurately label Intel stats

* Cleanup

* Remove
2026-03-29 12:09:02 -05:00
Nicolas Mowen
29ca18c24c Add warm-up to onnx as some GPUs require kernel compilation before accepting inferences (#22685) 2026-03-29 11:19:46 -05:00
Josh Hawkins
c35cee2d2f Review labels widget (#22664)
* add review labels widget

* register widget and add to review section

* i18n

* add border to switches widget

* padding tweaks

* don't show audio labels if audio is not enabled

* add docs links

* ability to add custom labels to review

* add hint for empty selection in review labels and SwitchesWidget

* language consistency
2026-03-27 08:45:50 -06:00
Nicolas Mowen
1a01513223 Improve chat features (#22663)
* Improve notification messaging

* Improve wake behavior when a zone is not specified

* Fix prompt ordering for generate calls
2026-03-27 08:48:50 -05:00
GuoQing Liu
06ad72860c feat: add axera npu load (#22662) 2026-03-27 05:07:07 -06:00
Nicolas Mowen
03d0139497 More mypy cleanup (#22658)
* Halfway point for fixing data processing

* Fix mixin types missing

* Cleanup LPR mypy

* Cleanup audio mypy

* Cleanup bird mypy

* Cleanup mypy for custom classification

* remove whisper

* Fix DB typing

* Cleanup events mypy

* Clenaup

* fix type evaluation

* Cleanup

* Fix broken imports
2026-03-26 12:54:12 -06:00
Josh Hawkins
4772e6a2ab Tweaks (#22656)
* tweak language

* show validation errors in json response

* fix export hwaccel args field in UI

* increase annotation offset consts

* fix save button race conditions, add reset spinner, and fix enrichments profile leak

- Disable both Save and SaveAll buttons while either operation is in progress so users cannot trigger concurrent saves
- Show activity indicator on Reset to Default/Global button during the API call
- Enrichments panes (semantic search, genai, face recognition) now always show base config fields regardless of profile selection in the header dropdown

* fix genai additional_concerns validation error with textarea array widget

The additional_concerns field is list[str] in the backend but was using the textarea widget which produces a string value, causing validation errors.
Created a TextareaArrayWidget that converts between array (one item per line) and textarea display, and switched additional_concerns to use it

* populate and sort global audio filters for all audio labels

* add column labels in profiles view

* enforce a minimum value of 2 for min_initialized

* reuse widget and refactor for multiline

* fix

* change record copy preset to transcode audio to aac
2026-03-26 13:47:24 -05:00
Ivan Shvedunov
909b40ba96 Fix export deadlock by replacing preexec_fn with nice command (#22641)
subprocess.run() with preexec_fn forces Python to use fork() instead
of posix_spawn(). In Frigate's main process (75+ threads), fork()
creates a child that inherits locked mutexes from other threads. The
child may deadlocks e.g. on a pysqlite3 mutex before it can exec()
ffmpeg.

Replace preexec_fn=lower_priority (which calls os.nice(19)) with
prefixing the ffmpeg command with "nice -n 19", achieving the same
priority reduction without requiring preexec_fn. This allows Python
to use posix_spawn() which is safe in multithreaded processes.

Fixes both the primary export path and the CPU fallback retry path.
2026-03-26 05:34:28 -06:00
Nicolas Mowen
0cf9d7d5b1 Inverse mypy and more mypy fixes (#22645)
* organize

* Improve storage mypy

* Cleanup timeline mypy

* Cleanup recording mypy

* Improve review mypy

* Add review mypy

* Inverse mypy

* Fix ffmpeg presets

* fix template thing

* Cleanup camera
2026-03-25 19:30:59 -05:00
Josh Hawkins
c0124938b3 Tweaks (#22630)
* fix stage overlay size

* add audio filter config and load audio labels

* remove add button from object and audio labels in settings

* tests

* update classification docs

* tweak wording

* don't require restart for timestamp_style changes

* add optional i18n prefix for select widgets

* use i18n enum prefix for timestamp position

* add i18n for all presets
2026-03-25 13:14:32 -06:00
Nicolas Mowen
b1c410bc3e Optimize more mypy classes (#22637)
* Cleanup motion mypy

* Cleanup object detection mypy

* Update output mypy

* Cleanup
2026-03-25 12:53:19 -06:00
Nicolas Mowen
80c4ce2b5d Increase mypy coverage and fixes (#22632) 2026-03-25 09:28:48 -06:00
Nicolas Mowen
04a2f42d11 Split apart video.py (#22631) 2026-03-25 08:44:12 -06:00
Josh Hawkins
3f6d5bcf22 ONVIF refactor (#22629)
* add profile support and decouple relative move from autotracking

* add drag to zoom

* docs

* add profile selection to UI

* dynamically update onvif config

* ui tweak

* docs

* docs tweak
2026-03-25 08:57:47 -05:00
Nicolas Mowen
4b42039568 Various Tweaks (#22609)
* Mark items as reviewed as a group with keyboard

* Improve handling of half model regions

* update viewport meta tag to prevent user scaling

fixes https://github.com/blakeblackshear/frigate/issues/22017

* add small animation to collapsible shadcn elements

* add proxy auth env var tests

* Improve search effect

* Fix mobile back navigation losing overlay state on classification page

* undo historyBack changes

* fix classification history navigation

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2026-03-24 13:53:39 -06:00
Nicolas Mowen
334245bd3c Ensure that arbitrary reads / writes can't be executed from ffmpeg (#22607) 2026-03-24 10:36:08 -05:00
Josh Hawkins
854ef320de Reclassification (#22603)
* add ability to reclassify images

* add ability to reclassify faces

* work around radix pointer events issue again
2026-03-24 07:18:06 -06:00
Josh Hawkins
91ef3b2ceb Add ability to regenerate examples in classification wizard (#22604)
* add randomness to object classification

also ensure train_dir is fresh if user has regenerated examples

* frontend refresh button

* fix radix dropdown issue

* i18n
2026-03-24 07:53:37 -05:00
Nicolas Mowen
573a5ede62 Various Improvements (#22597)
* Filter out cmdline items that we are not interested in

* Add endpoint for easily pulling review clip
2026-03-23 16:49:41 -05:00
Nicolas Mowen
a8b6ea5005 Various Fixes (#22594)
* Fix handling of preview

* Fix schema cleaning

* Cleanup
2026-03-23 11:22:52 -05:00
Josh Hawkins
a89c7d8819 Add verbose mode to Media Sync (#22592)
* add verbose mode to media sync

writes a report to /config/media_sync showing all of the orphaned paths by media type

* frontend

* docs
2026-03-23 10:05:38 -06:00