Compare commits

...

1535 Commits

Author SHA1 Message Date
Nicolas Mowen
6d8234fa27 Fix build (#16119)
* Update to bake v6

* Update setup actions

* Temp

* Use ubuntu 22.04 for build

* Remove temp
2025-01-24 09:45:46 -06:00
Nicolas Mowen
ad76c28a66 Downgrade to bake-action v5 (#16098) 2025-01-23 09:18:15 -07:00
dependabot[bot]
131d07e649 Bump docker/bake-action from 3 to 6 (#15892)
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 3 to 6.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v3...v6)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-23 07:58:42 -07:00
Nicolas Mowen
776bb79f0b Consider pre and post capture when cleaning up recordings based on review segments (#16096) 2025-01-23 08:26:53 -06:00
Josh Hawkins
aedfaa3641 Don't prevent default when tracked object details description input is focused (#16064) 2025-01-20 06:23:22 -07:00
Nicolas Mowen
83ac42cbdc Use correct path for script (#16045) 2025-01-18 21:33:13 -07:00
Nicolas Mowen
a5ce8d0d77 Fix env variable exporting (#16043) 2025-01-18 21:31:56 -06:00
Nicolas Mowen
0ee2e404da Correctly calculate ffmpeg version based on ffmpeg path (#16041)
* Correctly calculate ffmpeg version based on ffmpeg path

* Formatting
2025-01-18 20:30:35 -06:00
Marc Altmann
3947e79086 update FFmpeg to ensure compatibility with newer kernels (#16027) 2025-01-18 05:48:28 -07:00
Nicolas Mowen
91ab1071d2 Update docs to make note of go2rtc port requirement (#16013) 2025-01-16 16:14:40 -07:00
Nicolas Mowen
409e911752 Update integration docs (#15967) 2025-01-13 08:50:44 -06:00
tpjanssen
9983bd8d92 Fix API latest image quality and API MIME types (#15964)
* Fix API latest image quality

* Fix mime types

* Code formatting + media_type fix
2025-01-13 07:46:46 -06:00
Nicolas Mowen
32c71c4108 Clean up handling of ffmpeg specific params (#15956) 2025-01-12 17:47:24 -06:00
Josh Hawkins
ef6952e3ea Fix display of save button in tracked object details pane (#15946) 2025-01-11 15:23:52 -06:00
Nicolas Mowen
173b7aa308 Handle case where user has multiple manual events on same camera (#15943) 2025-01-11 07:47:45 -07:00
Blake Blackshear
c4727f19e1 Simplify plus submit (#15941)
* remove unused annotate file

* improve plus error messages

* formatting
2025-01-11 07:04:11 -07:00
Josh Hawkins
b8a74793ca Clarify motion recording (#15917)
* Clarify motion recording

* move to troubleshooting
2025-01-09 09:55:08 -07:00
Josh Hawkins
c1dede9369 Clarify reolink doorbell two way talk requirements (#15915)
* Clarify reolink doorbell two way talk requirements

* relative paths

* move to live section

* fix link
2025-01-09 09:31:16 -07:00
Nicolas Mowen
0c4ea504d8 Update proxmox docs to align with proxmox recommendation of running in VM. (#15904) 2025-01-08 17:19:04 -06:00
Nicolas Mowen
b265b6b190 Catch case where user has multiple of the same kind of GPU (#15903) 2025-01-08 17:17:57 -06:00
Nicolas Mowen
d57a61b50f Simplify model config (#15881)
* Add migration to migrate to model_path

* Simplify model config

* Cleanup docs

* Set config version

* Formatting

* Fix tests
2025-01-07 20:59:37 -07:00
Nicolas Mowen
4fc9106c17 Update for correct audio requirements (#15882) 2025-01-07 17:02:32 -06:00
Nicolas Mowen
38e098ca31 Remove extra data except from keypackets when using qsv (#15865) 2025-01-06 17:38:46 -06:00
Nicolas Mowen
e7ad38d827 Update model docs (#15779) 2025-01-02 10:04:16 -06:00
Josh Hawkins
a1ce9aacf2 Tracked object details pane bugfix (#15736)
* restore save button in tracked object details pane

* conditionally show save button
2024-12-30 08:23:25 -06:00
Nicolas Mowen
322b847356 Fix event cleanup (#15724) 2024-12-29 14:47:40 -06:00
Josh Hawkins
98338e4c7f Ensure object lifecycle ratio is re-normalized to camera aspect (#15717) 2024-12-28 13:37:39 -07:00
Josh Hawkins
171a89f37b Language consistency - use Explore instead of Search (#15709) 2024-12-27 17:38:43 -07:00
Josh Hawkins
8114b541a8 Sort camera group edit screen by ui config values (#15705) 2024-12-27 14:30:27 -06:00
Josh Hawkins
c48396c5c6 Fix crash when streams are undefined in go2rtc config password cleaning (#15695) 2024-12-27 08:36:21 -06:00
leccelecce
00371546a3 GenAI: add ability to save JPGs sent to provider (#15643)
* GenAI: add ability to save JPGs sent to provider

* Remove mention from GenAI docs

* Change config name to debug_save_thumbnails

* Change  folder structure to clips/genai-requests/{event_id}/{1.jpg}
2024-12-23 07:05:34 -07:00
Nicolas Mowen
87e7b62c85 Remove duplicated rockchip build (#15641) 2024-12-22 13:31:14 -06:00
Nicolas Mowen
15ffe5c254 Fix trt (#15640) 2024-12-22 11:56:04 -07:00
Nicolas Mowen
a767dad3a1 Simplify TensorRT image (#15638) 2024-12-22 12:13:29 -06:00
Josh Hawkins
9387246f83 Add tooltips to ptz controls (#15633) 2024-12-21 17:57:22 -06:00
Nicolas Mowen
bed20de302 Update docs deps (#15617) 2024-12-20 10:37:02 -06:00
Nicolas Mowen
70fc5393b1 Make hailo wheels support any minor version (#15616) 2024-12-20 10:36:32 -06:00
dependabot[bot]
9b80dbe014 Bump actions/setup-python from 5.1.0 to 5.3.0 (#14584)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.1.0 to 5.3.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.1.0...v5.3.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-20 09:16:21 -07:00
Josh Hawkins
78a013d63a Add "frame" to shm frame names to avoid camera name issues (#15615) 2024-12-20 08:46:40 -06:00
Gabriel de Biasi
ddfe8f3921 Fix #7944: Adds tls_insecure to the onvif configuration (#15603)
* Adds tls_insecure to the onvif configuration

* reformat using ruff
2024-12-19 12:54:33 -07:00
Nicolas Mowen
4af752028f Bug Fixes (#15598)
* Catch onvif command error

* fix review item pre and post capture

* Include severity in query
2024-12-19 09:46:14 -06:00
Nicolas Mowen
b149828c9f Catch OS error (#15590) 2024-12-18 17:45:08 -06:00
Josh Hawkins
3dc26e78ef Genai descriptions are not generated until tracked objects end (#15561) 2024-12-17 17:33:04 -06:00
Giorgio Ughini
d9ef8fa206 Fix always the same image is sent to GenAI (#15550)
* Fix always the same image is sent to GenAI

* Fix typo for bug where identical images are sent to GenAI

* Correct formatting
2024-12-17 07:44:00 -06:00
Josh Hawkins
292499aebc Improve review message again (#15538) 2024-12-16 09:18:34 -07:00
Josh Hawkins
717493e668 Improve handling of error conditions with ollama and snapshot regeneration (#15527) 2024-12-15 20:51:23 -06:00
Josh Hawkins
d49f958d4d Don't crop by region for genai snapshot for manual events (#15525) 2024-12-15 17:03:19 -06:00
Nicolas Mowen
33ee32865f Ensure that go2rtc streams are cleaned (#15524)
* Ensure that go2rtc streams are cleaned

* Formatting

* Handle go2rtc config correctly

* Set type
2024-12-15 16:56:24 -06:00
Josh Hawkins
17f8939f97 Add FAQ to explain why streams might work in VLC but not in Frigate (#15513)
* Add faq to explain why streams might work in VLC but not in Frigate

* fix go2rtc version number

* wording

* mention udp input args and preset
2024-12-14 13:58:39 -06:00
FL42
1b7fe9523d fix: use requests.Session() for DeepStack API (#15505) 2024-12-14 07:54:13 -07:00
Josh Hawkins
0763f56047 Update iframe interval recommendation (#15501)
* Update iframe interval recommendation

* clarify

* tweaks

* wording
2024-12-13 12:52:56 -07:00
Josh Hawkins
1ea282fba8 Improve the message for missing objects in review items (#15500) 2024-12-13 12:02:41 -07:00
Blake Blackshear
869fa2631e apply zizmor recommendations (#15490) 2024-12-13 07:34:09 -06:00
Nicolas Mowen
f336a91fee Cleanup handling of first object message (#15480) 2024-12-12 21:22:47 -06:00
Nicolas Mowen
d302b6e198 Cap storage bandwidth (#15473) 2024-12-12 14:46:00 -06:00
Nicolas Mowen
ed2e1f3f72 Remove debug cleanup change (#15468) 2024-12-12 07:46:06 -07:00
Nicolas Mowen
b4d82084a9 Fixes (#15465)
* Fix single event return

* Allow customizing if search is preserved for overlay state

* Remove timeout

* Cleanup

* Cleanup naming
2024-12-12 08:22:30 -06:00
Josh Hawkins
53b96dfb89 Improve semantic search docs (#15453) 2024-12-11 20:19:08 -06:00
Nicolas Mowen
0e3fb6cbdd Standardize handling of config files (#15451)
* Standardize handling of config files

* Formatting

* Remove unused
2024-12-11 18:46:42 -06:00
Blake Blackshear
6b12a45a95 return 401 for login failures (#15432)
* return 401 for login failures

* only setup the rate limiter when configured
2024-12-10 06:42:55 -07:00
Nicolas Mowen
0b9c4c18dd Refactor event cleanup to consider review severity (#15415)
* Keep track of objects max review severity

* Refactor cleanup to split snapshots and clips

* Cleanup events based on review severity

* Cleanup review imports

* Don't catch detections
2024-12-09 08:25:45 -07:00
Nicolas Mowen
d0cc8cb64b API response cleanup (#15389)
* API response cleanup

* Remove extra field definition
2024-12-06 20:07:43 -06:00
Nicolas Mowen
bb86e71e65 fix auth remote addr access (#15378) 2024-12-06 10:25:43 -06:00
Josh Hawkins
8aa6297308 Ensure label does not overlap with box or go out of frame (#15376) 2024-12-06 08:32:16 -07:00
Nicolas Mowen
d3b631a952 Api improvements (#15327)
* Organize api files

* Add more API definitions for events

* Add export select by ID

* Typing fixes

* Update openapi spec

* Change type

* Fix test

* Fix message

* Fix tests
2024-12-06 08:04:02 -06:00
Nicolas Mowen
47d495fc01 Make note of go2rtc encoded URLs (#15348)
* Make note of go2rtc encoded URLs

* clarify
2024-12-04 16:54:57 -06:00
Nicolas Mowen
32322b23b2 Update nvidia docs to reflect preset (#15347) 2024-12-04 15:43:10 -07:00
Josh Hawkins
c0ba98e26f Explore sorting (#15342)
* backend

* add type and params

* radio group in ui

* ensure search_type is cleared on reset
2024-12-04 08:54:10 -07:00
Rui Alves
a5a7cd3107 Added more unit tests for the review controller (#15162) 2024-12-04 06:52:08 -06:00
Josh Hawkins
a729408599 preserve search query in overlay state hook (#15334) 2024-12-04 06:14:53 -06:00
Josh Hawkins
4dddc53735 move label placement when overlapping small boxes (#15310) 2024-12-02 13:07:12 -06:00
Josh Hawkins
5f42caad03 Explore bulk actions (#15307)
* use id instead of index for object details and scrolling

* long press package and hook

* fix long press in review

* search action group

* multi select in explore

* add bulk deletion to backend api

* clean up

* mimic behavior of review

* don't open dialog on left click when mutli selecting

* context menu on container ref

* revert long press code

* clean up
2024-12-02 11:12:55 -07:00
Jan Čermák
5475672a9d Fix extraction of Hailo userspace libs (#15187)
The archive already has everything contained in a rootfs folder, extract
it as-is to the root folder. This also reverts changes from
33957e5360 which addressed the same issue
in a less optimal way.
2024-12-02 08:35:51 -06:00
James Livulpi
833cdcb6d2 fix audio event create (#15299) 2024-12-01 20:07:44 -06:00
Nicolas Mowen
c95bc9fe44 Handle case where camera name ends in number (#15296) 2024-12-01 12:33:10 -07:00
Josh Hawkins
a1fa9decad Fix event cleanup debug logging crash (#15293) 2024-12-01 12:37:45 -06:00
Josh Hawkins
4a5fe4138e Explore audio event tweaks (#15291) 2024-12-01 12:08:03 -06:00
Nicolas Mowen
002fdeae67 SHM tweaks (#15274)
* Use env var to control max number of frames

* Handle type

* Fix frame_name not being sent

* Formatting
2024-12-01 10:39:35 -06:00
tpjanssen
5802a66469 Fix audio events in explore section (#15286)
* Fix audio events in explore section

Make sure that audio events are listed in the explore section

* Update audio.py

* Hide other submit options

Only allow submits for objects only
2024-12-01 07:47:37 -07:00
Alessandro Genova
71e8f75a01 Let the docker container spend more time to clean up and shut down (docs) (#15275) 2024-11-30 18:27:21 -06:00
Nicolas Mowen
ee816b2251 Fix camera access and improve typing (#15272)
* Fix camera access and improve typing:

* Formatting
2024-11-30 18:22:36 -06:00
Nicolas Mowen
f094c59cd0 Fix formatting (#15271) 2024-11-30 18:21:50 -06:00
Josh Hawkins
d25ffdb292 Fix crash when consecutive underscores are used in camera name (#15257) 2024-11-29 19:44:42 -07:00
Nicolas Mowen
2207a91f7b Fix ruff (#15223) 2024-11-27 12:57:58 -07:00
Nicolas Mowen
33957e5360 Set hailo build library path (#15167) 2024-11-24 19:07:41 -07:00
Nicolas Mowen
ff92b13f35 Fix sending events (#15100) 2024-11-20 09:37:33 -07:00
Rui Alves
e76f4e9bd9 Started unit tests for the review controller (#15077)
* Started unit tests for the review controller

* Revert "Started unit tests for the review controller"

This reverts commit 7746eb146f.

* Started unit tests for the review controller

* FIrst test

* Added test for review endpoint (time filter - after + before)

* Assert expected event

* Added more tests for review endpoint

* Added test for review endpoint with all filters

* Added test for review endpoint with limit

* Comment

* Renamed tests to increase readability
2024-11-19 16:35:10 -07:00
Josh Hawkins
0df091f387 Fix link to api in genai docs (#15075) 2024-11-19 14:33:01 -06:00
Nicolas Mowen
66277fbb6c Fix embeddings (#15072)
* Fix embeddings reading frames

* Fix event update reading

* Formatting

* Pin AIO http to fix build failure

* Pin starlette
2024-11-19 12:20:04 -06:00
Josh Hawkins
a67ff3843a Update genai docs (#15070) 2024-11-19 08:41:16 -07:00
Josh Hawkins
9ae839ad72 Tracked object metadata changes (#15055)
* add enum and change topic name

* frontend renaming

* docs

* only display sublabel score if it it exists

* remove debug print
2024-11-18 11:26:44 -07:00
Bazyl Ichabod Horsey
66f71aecf7 fix regex for cookie_name to be general snake case (#14854)
* fix regex for cookie_name to be general snake case

* Update frigate/config/auth.py

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>

---------

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>
2024-11-18 11:26:36 -07:00
Nicolas Mowen
0b203a3673 fix writing to birdseye restream buffer (#15052) 2024-11-18 10:14:49 -06:00
Nicolas Mowen
26c3f9f914 Fix birdseye (#15051) 2024-11-18 09:38:58 -06:00
Nicolas Mowen
474c248c9d Cleanup correctly (#15043) 2024-11-17 16:57:58 -06:00
Nicolas Mowen
5b1b6b5be0 Fix round robin (#15035)
* Move camera SHM frame creation to main process

* Don't reset frame index

* Don't fail if shm exists

* Set more types
2024-11-17 11:25:49 -06:00
Nicolas Mowen
45e9030358 Round robin SHM management (#15027)
* Output frame name to frames processor

* Finish implementing round robin

* Formatting
2024-11-16 16:00:19 -07:00
Nicolas Mowen
f9c1600f0d Duplicate onnx build info (#15020) 2024-11-16 13:24:42 -06:00
Josh Hawkins
ad85f8882b Update ollama docs and add genai debug logging (#15012) 2024-11-15 15:24:17 -06:00
Nicolas Mowen
206ed06905 Make all SHM management untracked (#15011) 2024-11-15 14:14:37 -07:00
Nicolas Mowen
e407ba47c2 Increase max shm frames (#15009) 2024-11-15 14:25:57 -06:00
Nicolas Mowen
7fdf42a56f Various Fixes (#15004)
* Don't track shared memory in frame tracker

* Don't track any instance

* Don't assign sub label to objects when multiple cars are overlapping

* Formatting

* Fix assignment
2024-11-15 09:54:59 -07:00
Levi Tomes
4eea541352 Updated Documentation: Autotracking add support details for Sunba 405-D20X 4K camera. (#14352)
* Add support details for Sunba 405-D20X 4K camera.

* Update cameras.md

Updated changes to meet documentation goals of upstream project.
2024-11-15 05:35:43 -07:00
Josh Hawkins
ed9c67804a UI fixes (#14933)
* Fix plus dialog

* Remove activity indicator on review item download button

* fix explore view
2024-11-12 05:37:25 -07:00
Nicolas Mowen
9c20cd5f7b Handle in progress previews export and fix time check bug (#14930)
* Handle in progress previews and fix time check bug

* Formatting
2024-11-11 09:30:55 -06:00
Rui Alves
6c86827d3a Fix small typo (#14915) 2024-11-11 05:02:46 -07:00
Rui Alves
d2b2f3d54d Use custom body for the export recordings endpoint (#14908)
* Use custom body for the export recordings endpoint

* Fixed usage of ExportRecordingsBody

* Updated docs to reflect changes to export endpoint

* Fix friendly name and source

* Updated openAPI spec
2024-11-10 20:26:47 -07:00
Josh Hawkins
64b3397f8e Add tooltip and change default value for is_submitted (#14910) 2024-11-10 19:25:16 -06:00
Josh Hawkins
0829517b72 Add ability to filter Explore by Frigate+ submission status (#14909)
* backend

* add is_submitted to query params

* add submitted filter to dialog

* allow is_submitted filter selection with input
2024-11-10 16:57:11 -06:00
Austin Kirsch
c1bfc1df67 fix tensorrt model generation variable (#14902) 2024-11-10 16:23:32 -06:00
Nicolas Mowen
96c0c43dc8 Add support for specifying tensorrt device (#14898) 2024-11-10 08:43:24 -06:00
Nicolas Mowen
a68c7f4ef8 Pin all intel packages (#14887) 2024-11-09 11:08:25 -06:00
Nicolas Mowen
7c474e6827 Pin intel driver (#14884)
* Pin intel driver

* Use slightly older version
2024-11-09 08:09:36 -07:00
Josh Hawkins
143bab87f1 Genai bugfix (#14880)
* Fix genai init when disabled at global level

* use genai config for class init
2024-11-09 06:48:53 -07:00
Josh Hawkins
580f35112e revert changes to audio process to prevent shutdown hang (#14872) 2024-11-08 11:47:46 -07:00
Josh Hawkins
3249ffb273 Auto-unmute inbound audio when enabling two way audio (#14871)
* Automatically enable audio when initiating two way talk with mic

* remove check
2024-11-08 09:19:49 -06:00
Josh Hawkins
7bae9463b2 Small general filter bugfix (#14870) 2024-11-08 08:49:05 -06:00
Josh Hawkins
ae30ac6e3c Refactor general review filter to only call the update function once (#14866) 2024-11-08 07:45:00 -06:00
Nicolas Mowen
46ed520886 Don't generate tensorrt models by default (#14865) 2024-11-08 07:37:18 -06:00
Nicolas Mowen
ace02a6dfa Don't pass hwaccel args to preview (#14851) 2024-11-07 17:24:38 -06:00
Josh Hawkins
0d59754be2 Small genai fix (#14850)
* Ensure the regenerate button shows when genai is only enabled at the camera level

* update docs
2024-11-07 13:27:55 -07:00
Josh Hawkins
15bd26c9b1 Re-send camera states after websocket disconnects and reconnects (#14847) 2024-11-07 08:25:13 -06:00
Josh Hawkins
bc371acb3e Cleanup batching (#14836)
* Implement batching for event cleanup

* remove import

* add debug logging
2024-11-06 10:05:44 -07:00
Nicolas Mowen
2eb5fbf112 Add more debug logs for preview and output (#14833) 2024-11-06 07:59:33 -06:00
Josh Hawkins
fc0fb158d5 Show dialog when restarting from config editor (#14815)
* Show restart dialog when restarting from config editor

* don't save until confirmed restart
2024-11-05 09:33:41 -06:00
Nicolas Mowen
404807c697 UI tweaks (#14814)
* Tweak bird icon and fix _ in object name

* Apply to all capitalization
2024-11-05 08:29:07 -07:00
Josh Hawkins
29ea7c53f2 Bugfixes (#14813)
* fix api filter from matching event id as timestamp

* add padding on platform aware sheet for tablets

* docs tweaks

* tweaks
2024-11-05 07:22:41 -07:00
Josh Hawkins
1fc4af9c86 Optimize Explore summary database query (#14797)
* Optimize explore summary query with index

* implement rollback
2024-11-04 16:04:49 -07:00
Josh Hawkins
ac762762c3 Overwrite existing saved search (#14792)
* Overwrite existing saved search

* simplify
2024-11-04 12:50:05 -07:00
Nicolas Mowen
553676aade Fix missing tensor_input (#14790) 2024-11-04 13:04:33 -06:00
Nicolas Mowen
a13b9815f6 Various fixes (#14786)
* Catch openvino error

* Remove clip deletion

* Update deletion text

* Fix timeline not respecting timezone config

* Tweaks

* More timezone fixes

* Fix

* More timezone fixes

* Fix shm docs
2024-11-04 07:07:57 -07:00
Nicolas Mowen
156e7cc628 Clarify semantic search GPU (#14767)
* Clarify semantic search GPU

* clarity

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* fix wording

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-11-03 19:49:13 -06:00
Josh Hawkins
959ca0f412 Fix object processing logic for detections (#14766) 2024-11-03 17:41:31 -07:00
Felipe Santos
9755fa0537 Fix exports migration when there is none (#14761) 2024-11-03 10:00:12 -07:00
Felipe Santos
77ec86d31a Fix devcontainer when there is no ~/.ssh/know_hosts file (#14758) 2024-11-03 08:52:27 -07:00
leccelecce
189d4b459f Avoid divide by zero in shm_frame_count (#14750) 2024-11-03 08:28:19 -07:00
leccelecce
44f40966e7 Docs: correct go2rtc version used (#14753) 2024-11-03 05:16:59 -07:00
Josh Hawkins
7d3313e732 Add ability to view tracked objects in Explore from review item details pane (#14744) 2024-11-02 17:16:07 -06:00
Blake Blackshear
591b50dfa7 Merge remote-tracking branch 'origin/master' into dev 2024-11-02 08:28:34 -05:00
Blake Blackshear
27ef661fec simplify hailort (#14734) 2024-11-02 07:13:28 -05:00
joshjryan
d7935abc14 Set the loglevel for OpenCV ffmpeg messages to fatal (#14728)
* Set the loglevel for OpenCV ffmpeg messages to fatal

* Set OPENCV_FFMPEG_LOGLEVEL in Dockerfile
2024-11-01 20:01:38 -06:00
Josh Hawkins
11068aa9d0 Fix validation activity indicator (#14730)
* Don't show two spinners when loading/revalidating search results

* clarify
2024-11-01 19:52:00 -06:00
Josh Hawkins
1234003527 Fix width of object lifecycle buttons (#14729) 2024-11-01 18:30:40 -06:00
Nicolas Mowen
e5ebf938f6 Fix float input (#14720) 2024-11-01 06:55:55 -06:00
Josh Hawkins
8c2c07fd18 UI tweaks (#14719)
* Show activity indicator when search grid is revalidating

* improve frigate+ button title grammar
2024-11-01 06:37:52 -06:00
Josh Hawkins
9e1a50c3be Clean up copy output (#14705)
* Remove extra spacing for next/prev carousel buttons

* Clarify ollama genai docs

* Clean up copied gpu info output

* Clean up copied gpu info output

* Better display when manually copying/pasting log data
2024-10-31 13:48:26 -06:00
Nicolas Mowen
ac8ddada0b Various fixes (#14703)
* Fix not retaining custom events

* Fix media apis
2024-10-31 07:31:01 -05:00
Josh Hawkins
885485da70 Small tweaks (#14700)
* Remove extra spacing for next/prev carousel buttons

* Clarify ollama genai docs
2024-10-31 06:58:33 -05:00
Nicolas Mowen
bb4e863e87 Fix jetson onnxruntime (#14698)
* Fix jetson onnxruntime

* Remove comment
2024-10-30 19:16:28 -05:00
Nicolas Mowen
c7a4220d65 Jetson onnxruntime (#14688)
* Add support for using onnx runtime with jetson

* Update docs

* Clarify
2024-10-30 08:22:28 -06:00
Nicolas Mowen
03dd9b2d42 Don't open file with read permissions if there is no need to write to it (#14689) 2024-10-30 08:22:20 -06:00
Nicolas Mowen
89ca085b94 Add info about GPUs that are supported for semantic search (#14687)
* Add specific information about GPUs that are supported for semantic search

* clarity
2024-10-30 07:41:58 -05:00
Nicolas Mowen
fffd9defea Add docs update to type of change (#14686) 2024-10-30 06:30:00 -06:00
Nicolas Mowen
d10fea6012 Add specific section about GPU in semantic search (#14685) 2024-10-30 07:23:10 -05:00
Nicolas Mowen
ab26aee8b2 Fix config loading (#14684) 2024-10-30 07:16:56 -05:00
Josh Hawkins
bb80a7b2ee UI changes and bugfixes (#14669)
* Home/End buttons for search input and max 8 search columns

* Fix lifecycle label

* remove video tab if tracked object has no clip

* hide object lifecycle if there is no clip

* add test for filter value to ensure only fully numeric values are set as numbers
2024-10-30 05:54:06 -06:00
Evan Jarrett
e4a6b29279 fix string comparison on mqtt error message for Server unavailable (#14675) 2024-10-30 05:05:58 -06:00
Blake Blackshear
d12c7809dd Update Hailo Driver to 4.19 (#14674)
* update to hailo driver 4.19

* update builds for 4.19
2024-10-29 18:40:24 -05:00
Nicolas Mowen
357ce0382e Fixes (#14668)
* Fix environment vars reading

* fix yaml returning none

* Assume rocm model is onnx despite file extension
2024-10-29 15:34:07 -05:00
Josh Hawkins
73da3d9b20 Use strict equality check for annotation offset in object lifecycle settings (#14667) 2024-10-29 13:33:09 -05:00
Josh Hawkins
e67b7a6d5e Add ability to use carousel buttons to scroll through object lifecycle elements (#14662) 2024-10-29 10:28:17 -05:00
Nicolas Mowen
4e25bebdd0 Add ability to configure model input dtype (#14659)
* Add input type for dtype

* Add ability to manually enable TRT execution provider

* Formatting
2024-10-29 10:28:05 -05:00
Dan Raper
abd22d2566 Update create_config.py (#14658) 2024-10-29 08:31:03 -06:00
Josh Hawkins
8aeb597780 Fix sublabel and icon spacing (#14651) 2024-10-29 07:06:19 -06:00
Josh Hawkins
33825f6d96 Add h8l and rocm to release workflow (#14648)
* Add h8l to release workflow

* Add rocm to release workflow

* Variants
2024-10-28 20:00:14 -05:00
Nicolas Mowen
eca504cb07 More bug fixes (#14593)
* Adjust mqtt logging behavior

* Set disconnect

* Only consider intel gpu stats error if None is returned
2024-10-25 09:45:11 -05:00
Nicolas Mowen
4c75440af4 Docs updates (#14590)
* Update motion docs to make note of recordings

* Make note of genai on CPU
2024-10-25 08:09:25 -05:00
Nicolas Mowen
94f7528885 Bug fixes (#14588)
* Get intel stats manually if parsing fails

* Fix assignment

* Clean up mqtt

* Formatting

* Fix logic
2024-10-25 06:47:56 -06:00
Josh Hawkins
4dadf6d353 Bugfixes (#14587)
* Ensure review and search item mobile pages reopen correctly

* disable pan/pinch/zoom when native browser video controls are displayed

* report 0 for storage usage when api returns null
2024-10-25 06:24:04 -06:00
Corwin
2d27e72ed9 fix: hailo driver wrong version name (#14575) 2024-10-25 06:07:01 -06:00
Nicolas Mowen
4ff0c8a8d1 Better review sub-labels (#14563)
* Better review sub-labels

* Handle init
2024-10-24 17:00:39 -05:00
Nicolas Mowen
f9fba94863 Slightly downgrade onnxruntime-gpu (#14558) 2024-10-24 13:17:11 -05:00
Nicolas Mowen
f9b246dbd0 Deps updates (#14556)
* Update nvidia deps

* Update python deps

* Update web deps
2024-10-24 08:48:14 -05:00
Josh Hawkins
8fefded8dc Fix score in search details dialog for old events (#14541) 2024-10-23 10:31:20 -05:00
Nicolas Mowen
18824830fd Export preview via api (#14535)
* Break out recording to separate function

* Implement preview exporting

* Formatting
2024-10-23 08:36:52 -05:00
Rui Alves
fa81d87dc0 Updated Documentation for the Review endpoints (#14401)
* Updated documentation for the review endpoint

* Updated documentation for the review/summary endpoint

* Updated documentation for the review/summary endpoint

* Documentation for the review activity audio and motion endpoints

* Added responses for more review.py endpoints

* Added responses for more review.py endpoints

* Fixed review.py responses and proper path parameter names

* Added body model for /reviews/viewed and /reviews/delete

* Updated OpenAPI specification for the review controller endpoints

* Run ruff format frigate

* Drop significant_motion

* Updated frigate-api.yaml

* Deleted total_motion

* Combine 2 models into generic
2024-10-23 08:35:49 -05:00
Josh Hawkins
8bc145472a Error message and search reset for explore pane (#14534) 2024-10-23 07:31:48 -06:00
Josh Hawkins
7afc1e9762 Improve error message when semantic search is not enabled with genai (#14528) 2024-10-23 06:14:50 -06:00
Josh Hawkins
fc59c83e16 Add download chips to search item details video and snapshot panes (#14525) 2024-10-22 21:09:57 -06:00
Nicolas Mowen
e4048be088 Increase download output (#14523) 2024-10-22 21:33:41 -05:00
Nicolas Mowen
d715a8c290 Catch empty bytes (#14521) 2024-10-22 19:07:54 -05:00
Josh Hawkins
ad308252a1 Accessibility features (#14518)
* Add screen reader aria labels to buttons and menu items

* Fix sub_label score in search detail dialog
2024-10-22 16:07:42 -06:00
Josh Hawkins
c7d9f83638 UI changes and fixes (#14516)
* Add camera webui link to debug view

* fix optimistic description update

* simplify

* clean up

* params
2024-10-22 15:11:05 -06:00
Josh Hawkins
828fdbfd2d UI tweaks (#14505)
* Add reindex progress to mobile bottom bar status alert

* move menu to new component

* actions component in search footer thumbnail

* context menu for explore summary thumbnail images

* readd top_score to search query for old events
2024-10-22 08:01:01 -06:00
Nicolas Mowen
40c6fda19d Various fixes and improvements (#14492)
* Refactor preprocessing of images

* Cleanup preprocessing

* Improve naming and handling of embeddings

* Handle invalid intel json

* remove unused

* Use enum for model types

* Formatting
2024-10-21 16:19:34 -06:00
Josh Hawkins
b69816c2f9 reenable revalidation of first page (#14493) 2024-10-21 16:14:36 -06:00
leccelecce
46f5234bd9 Don't run pull_request builds on docs-only change (#14485) 2024-10-21 16:00:17 -06:00
leccelecce
81b8d7a66b Don't run CI builds on docs-only change (#14486) 2024-10-21 15:59:10 -06:00
Josh Hawkins
b1285a16c1 Update tracked object description optimistically (#14490) 2024-10-21 15:14:57 -06:00
leccelecce
90140e7710 Ollama: minor docs tweak to specify command (#14482) 2024-10-21 09:54:55 -06:00
Josh Hawkins
8364e68667 Model and genai fixes (#14481)
* disable mem arena in options for cpu only

* add try/except around ollama initialization

* update docs
2024-10-21 09:00:45 -06:00
gtsiam
4bb420d049 Add service manager infrastructure (#14150)
* Add service manager infrastructure

The changes are (This will be a bit long):
- A ServiceManager class that spawns a background thread and deals with
  service lifecycle management. The idea is that service lifecycle code
  will run in async functions, so a single thread is enough to manage
  any (reasonable) amount of services.

- A Service class, that offers start(), stop() and restart() methods
  that simply notify the service manager to... well. Start, stop or
  restart a service.

(!) Warning: Note that this differs from mp.Process.start/stop in that
  the service commands are sent asynchronously and will complete
  "eventually". This is good because it means that business logic is
  fast when booting up and shutting down, but we need to make sure
  that code does not rely on start() and stop() being instant
  (Mainly pid assignments).

  Subclasses of the Service class should use the on_start and on_stop
  methods to monitor for service events. These will be run by the
  service manager thread, so we need to be careful not to block
  execution here. Standard async stuff.

(!) Note on service names: Service names should be unique within a
  ServiceManager. Make sure that you pass the name you want to
  super().__init__(name="...") if you plan to spawn multiple instances
  of a service.

- A ServiceProcess class: A Service that wraps a multiprocessing.Process
  into a Service. It offers a run() method subclasses can override and
  can support in-place restarting using the service manager.

And finally, I lied a bit about this whole thing using a single thread.
I can't find any way to run python multiprocessing in async, so there is
a MultiprocessingWaiter thread that waits for multiprocessing events and
notifies any pending futures. This was uhhh... fun? No, not really.
But it works. Using this part of the code just involves calling the
provided wait method. See the implementation of ServiceProcess for more
details.

Mirror util.Process hooks onto service process

Remove Service.__name attribute

Do not serialize process object on ServiceProcess start.

asd

* Update frigate dictionary

* Convert AudioProcessor to service process
2024-10-21 10:00:38 -05:00
Nicolas Mowen
560dc68120 Fixes (#14480)
* Catch case where object does not have thumbnail data

* Catch intel stats json decoding error

* Catch division by zero
2024-10-21 09:38:48 -05:00
Josh Hawkins
8fcb8e54f7 fix websocket from spreading stale state (#14466) 2024-10-20 20:38:11 -06:00
Josh Hawkins
6c70e56059 Misc bugfixes and improvements (#14460)
* only save a fixed number of thumbnails if genai is enabled

* disable cpu_mem_arena to save on memory until its actually needed

* fix search settings pane so it actually saves to the config
2024-10-20 14:14:51 -06:00
Josh Hawkins
b24d292ade Improve Explore SQL query memory usage (#14451)
* Remove sql window function in explore endpoint

* don't revalidate first page on every fetch
2024-10-19 22:12:54 -06:00
Nicolas Mowen
2137de37b9 Fix snapshot call (#14448) 2024-10-19 14:11:49 -05:00
Josh Hawkins
3c591ad8a9 Explore snapshot and clip filter (#14439)
* backend

* add ToggleButton component

* boolean type

* frontend

* allow setting filter in input

* better padding on dual slider

* use shadcn toggle group instead of custom component
2024-10-18 16:16:43 -05:00
Josh Hawkins
b56f4c4558 Semantic search docs update (#14438)
* Add minimum requirements to semantic search docs

* clarify
2024-10-18 08:07:29 -06:00
Josh Hawkins
5d8bcb42c6 Fix autotrack to work with new tracked object package (#14414) 2024-10-17 10:21:27 -06:00
Josh Hawkins
b299652e86 Generative AI changes (#14413)
* Update default genai prompt

* Update docs

* improve wording

* clarify wording
2024-10-17 10:15:44 -06:00
Nicolas Mowen
8ac4b001a2 Various fixes (#14410)
* Fix access

* Reorganize tracked object for imports

* Separate out rockchip build

* Formatting

* Use original ffmpeg build

* Fix build

* Update default search type value
2024-10-17 11:02:27 -05:00
Josh Hawkins
6294ce7807 Adjust Explore settings (#14409)
* Re-add search source chip without confidence percentage

* add confidence to tooltip only

* move search type to settings

* padding tweak

* docs update

* docs clarity
2024-10-17 09:21:20 -06:00
Josh Hawkins
8173cd7776 Add score filter to Explore view (#14397)
* backend score filtering and sorting

* score filter frontend

* use input for score filtering

* use correct score on search thumbnail

* add popover to explain top_score

* revert sublabel score calc

* update filters logic

* fix rounding on score

* wait until default view is loaded

* don't turn button to selected style for similarity searches

* clarify language

* fix alert dialog buttons to use correct destructive variant

* use root level top_score for very old events

* better arrangement of thumbnail footer items on smaller screens
2024-10-17 05:30:52 -06:00
Nicolas Mowen
edaccd86d6 Fix build (#14398) 2024-10-16 19:26:47 -05:00
Nicolas Mowen
5f77408956 Update logos handling (#14396)
* Add attribute for logos

* Clean up tracked object to pass model data

* Update default attributes map
2024-10-16 16:22:34 -05:00
Josh Hawkins
e836523bc3 Explore UI changes (#14393)
* Add time ago to explore summary view on desktop

* add search settings for columns and default view selection

* add descriptions

* clarify wording

* padding tweak

* padding tweaks for mobile

* fix size of activity indicator

* smaller
2024-10-16 10:54:01 -06:00
Nicolas Mowen
9f866be110 Remove line in install deps (#14389) 2024-10-16 11:40:31 -05:00
Josh Hawkins
f6879f40b0 Refactor MobilePage to work like shadcn components (#14388)
* Refactor MobilePage to work like shadcn components

* fix bug with search detail dialog not opening
2024-10-16 08:18:06 -06:00
Nicolas Mowen
06f47f262f Use config attribute map instead of hard coded (#14387) 2024-10-16 07:27:36 -06:00
Josh Hawkins
eda52a3b82 Search and search filter UI tweaks (#14381)
* fix search type switches

* select/unselect style for more filters button

* fix reset button

* fix labels scrollbar

* set min width and remove modal to allow scrolling with filters open

* hover colors

* better match of font size

* stop sheet from displaying console errors

* fix detail dialog behavior
2024-10-16 06:15:25 -06:00
Nicolas Mowen
3f1ab66899 Embeddings UI updates (#14378)
* Handle Frigate+ submitted case

* Add search settings and rename general to ui settings

* Add platform aware sheet component

* use two columns on mobile view

* Add cameras page to more filters

* clean up search settings view

* Add time range to side filter

* better match with ui settings

* fix icon size

* use two columns on mobile view

* clean up search settings view

* Add zones and saving logic

* Add all filters to side panel

* better match with ui settings

* fix icon size

* Fix mobile fitler page

* Fix embeddings access

* Cleanup

* Fix scroll

* fix double scrollbars and add separators on mobile too

* two columns on mobile

* italics for emphasis

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-10-15 19:25:59 -05:00
Nicolas Mowen
af844ea9d5 Update coral troubleshooting docs (#14370)
* Update coral docs for latest ubuntu

* capitalization

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-10-15 10:39:31 -05:00
Nicolas Mowen
b75efcbca2 UI tweaks (#14369)
* Adjust text size

* Make cursor consistent

* Fix lint
2024-10-15 09:37:04 -06:00
Nicolas Mowen
25043278ab Always run embedding descs one by one (#14365) 2024-10-15 07:40:45 -06:00
Josh Hawkins
644069fb23 Explore layout changes (#14348)
* Reset selected index on new searches

* Remove right click for similarity search

* Fix sub label icon

* add card footer

* Add Frigate+ dialog

* Move buttons and menu to thumbnail footer

* Add similarity search

* Show object score

* Implement download buttons

* remove confidence score

* conditionally show submenu items

* Implement delete

* fix icon color

* Add object lifecycle button

* fix score

* delete confirmation

* small tweaks

* consistent icons

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-10-15 07:24:47 -06:00
Nicolas Mowen
0eccb6a610 Db fixes (#14364)
* Handle case where embeddings overflow token limit

* Set notification tokens

* Fix sort
2024-10-15 07:17:54 -06:00
Josh Hawkins
0abd514064 Use direct download link instead of blob method (#14347) 2024-10-14 17:53:25 -06:00
Nicolas Mowen
3879fde06d Don't allow unlimited unprocessed segments to stay in cache (#14341)
* Don't allow unlimited unprocessed frames to stay in cache

* Formatting
2024-10-14 16:11:43 -06:00
Nicolas Mowen
887433fc6a Streaming download (#14346)
* Send downloaded mp4 as a streaming response instead of a file

* Add download button to UI

* Formatting

* Fix CSS and text

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* download video button component

* use download button component in review detail dialog

* better filename

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-10-14 15:23:02 -06:00
Josh Hawkins
dd7a07bd0d Add ability to rename camera groups (#14339)
* Add ability to rename camera groups

* clean up

* ampersand consistency
2024-10-14 10:27:50 -05:00
Josh Hawkins
0ee32cf110 Fix yaml bug and ensure embeddings progress doesn't show until all models are loaded (#14338) 2024-10-14 08:23:08 -06:00
Josh Hawkins
72aa68cedc Fix genai labels (#14330)
* Publish model state and embeddings reindex in dispatcher onConnect

* remove unneeded from explore

* add embeddings reindex progress to statusbar

* don't allow right click or show similar button if semantic search is disabled

* fix status bar

* Convert peewee model to dict before formatting for genai description

* add embeddings reindex progress to statusbar

* fix status bar

* Convert peewee model to dict before formatting for genai description
2024-10-14 06:23:10 -06:00
Nicolas Mowen
9adffa1ef5 Detection adjustments (#14329) 2024-10-13 21:34:51 -05:00
Josh Hawkins
4ca267ea17 Search UI tweaks and bugfixes (#14328)
* Publish model state and embeddings reindex in dispatcher onConnect

* remove unneeded from explore

* add embeddings reindex progress to statusbar

* don't allow right click or show similar button if semantic search is disabled

* fix status bar
2024-10-13 19:36:49 -06:00
Josh Hawkins
833768172d UI tweaks (#14326)
* small tweaks for frigate+ submission and debug object list

* exclude attributes from labels colormap
2024-10-13 15:48:54 -06:00
Josh Hawkins
1ec459ea3a Batch embeddings fixes (#14325)
* fixes

* more readable loops

* more robust key check and warning message

* ensure we get reindex progress on mount

* use correct var for length
2024-10-13 15:25:13 -06:00
Josh Hawkins
66d0ad5803 See a preview when using the timeline to export footage (#14321)
* custom hook and generic video player component

* add export preview dialog

* export preview dialog when using timeline export

* refactor search detail dialog to use new generic video player component

* clean up
2024-10-13 12:46:40 -05:00
Josh Hawkins
92ac025e43 Don't show submit to frigate plus card if plus is disabled (#14319) 2024-10-13 11:34:39 -06:00
Nicolas Mowen
e8b2fde753 Support batch embeddings when reindexing (#14320)
* Refactor onnx embeddings to handle multiple inputs by default

* Process items in batches when reindexing
2024-10-13 12:33:27 -05:00
Josh Hawkins
0fc7999780 Improve reindex completion flag (#14308) 2024-10-12 14:44:01 -05:00
Nicolas Mowen
3a403392e7 Fixes for model downloading (#14305)
* Use different requestor for downloaders

* Handle case where lock is left over from failed partial download

* close requestor

* Formatting
2024-10-12 13:36:10 -05:00
Josh Hawkins
acccc6fd93 Only revalidate if event update is valid (#14302) 2024-10-12 08:32:11 -06:00
Nicolas Mowen
40bb4765d4 Add support for more icons (#14299) 2024-10-12 08:37:22 -05:00
Josh Hawkins
48c60621b6 Fix substitution on genai prompts (#14298) 2024-10-12 06:19:24 -06:00
Nicolas Mowen
51509760e3 Update object docs (#14295) 2024-10-12 07:13:00 -05:00
Josh Hawkins
1e1610671e Add info icons for popovers in debug view (#14296) 2024-10-12 06:12:02 -06:00
Josh Hawkins
de86c37687 Prevent single letter words from matching filter suggestions (#14297) 2024-10-12 06:11:22 -06:00
Nicolas Mowen
6e332bbdf8 Remove device config and use model size to configure device used (#14290)
* Remove device config and use model size to configure device used

* Don't show Frigate+ submission when in progress

* Add docs link for bounding box colors
2024-10-11 17:08:14 -05:00
Josh Hawkins
8a8a0c7dec Embeddings normalization fixes (#14284)
* Use cosine distance metric for vec tables

* Only apply normalization to multi modal searches

* Catch possible edge case in stddev calc

* Use sigmoid function for normalization for multi modal searches only

* Ensure we get model state on initial page load

* Only save stats for multi modal searches and only use cosine similarity for image -> image search
2024-10-11 13:11:11 -05:00
Nicolas Mowen
d4b9b5a7dd Reduce onnx memory usage (#14285) 2024-10-11 13:03:47 -05:00
Nicolas Mowen
6df541e1fd Openvino models (#14283)
* Enable model conversion cache for openvino

* Use openvino directly for onnx embeddings if available

* Don't fail if zmq is busy
2024-10-11 10:47:23 -06:00
Josh Hawkins
748087483c Use number keys on keyboard to move ptz camera to presets (#14278)
* Use number keys on keyboard to move ptz camera to presets

* clean up
2024-10-11 07:05:28 -06:00
Josh Hawkins
ae91fa6a39 Add time remaining to embedding reindex pane (#14279)
* Add function to convert seconds to human readable duration

* Add estimated time remaining to reindexing pane
2024-10-11 07:04:25 -06:00
Josh Hawkins
2897afce41 Reset saved search stats on reindex (#14280) 2024-10-11 06:59:29 -06:00
Josh Hawkins
ee8091ba91 Correctly handle camera command in dispatcher (#14273) 2024-10-10 18:48:56 -06:00
Josh Hawkins
30b5faebae chunk is already a list (#14272) 2024-10-10 17:53:11 -06:00
Josh Hawkins
8d753f821d Allow empty description for tracked objects (#14271)
* Allow tracked object description to be saved as an empty string

* ensure event_ids is passed as list
2024-10-10 18:12:05 -05:00
Josh Hawkins
54eb03d2a1 Add config option to select fp16 or quantized jina vision model (#14270)
* Add config option to select fp16 or quantized jina vision model

* requires_fp16 for text and large models only

* fix model type check

* fix cpu

* pass model size
2024-10-10 16:46:21 -06:00
Nicolas Mowen
dd6276e706 Embeddings fixes (#14269)
* Add debugging logs for more info

* Improve timeout handling

* Fix event cleanup

* Handle zmq error and empty data

* Don't run download

* Remove unneeded embeddings creations

* Update timouts

* Init models immediately

* Fix order of init

* Cleanup
2024-10-10 16:37:43 -05:00
Josh Hawkins
f67ec241d4 Add embeddings reindex progress to the UI (#14268)
* refactor dispatcher

* add reindex to dictionary

* add circular progress bar component

* Add progress to UI when embeddings are reindexing

* readd comments to dispatcher for clarity

* Only report progress every 10 events so we don't spam the logs and websocket

* clean up
2024-10-10 13:28:43 -06:00
Nicolas Mowen
8ade85edec Restructure embeddings (#14266)
* Restructure embeddings

* Use ZMQ to proxy embeddings requests

* Handle serialization

* Formatting

* Remove unused
2024-10-10 09:42:24 -06:00
Nicolas Mowen
a2ca18a714 Bug fixes (#14263)
* Simplify loitering logic

* Fix divide by zero

* Add device config for semantic search

* Add docs
2024-10-10 07:09:12 -06:00
Josh Hawkins
6a83ff2511 Fix config editor error pane (#14264) 2024-10-10 07:09:03 -06:00
Nicolas Mowen
bc3a06178b Embedding gpu (#14253) 2024-10-09 19:46:31 -06:00
Josh Hawkins
9fda259c0c Ensure genai prompt is properly formatted (#14256) 2024-10-09 19:19:40 -06:00
Josh Hawkins
d4925622f9 Use JinaAI models for embeddings (#14252)
* add generic onnx model class and use jina ai clip models for all embeddings

* fix merge confligt

* add generic onnx model class and use jina ai clip models for all embeddings

* fix merge confligt

* preferred providers

* fix paths

* disable download progress bar

* remove logging of path

* drop and recreate tables on reindex

* use cache paths

* fix model name

* use trust remote code per transformers docs

* ensure tokenizer and feature extractor are correctly loaded

* revert

* manually download and cache feature extractor config

* remove unneeded

* remove old clip and minilm code

* docs update
2024-10-09 15:31:54 -06:00
Nicolas Mowen
dbeaf43b8f Fix detector config help template (#14249)
* Fix detector config

* Fix general support
2024-10-09 16:04:31 -05:00
JC
f86957e5e1 Improve docs on exports API endpoints (#14224)
* Add (optional) export name to the create-export API endpoint docs

* Add the exports list endpoint to the docs
2024-10-08 19:15:10 -05:00
Nicolas Mowen
a2f42d51fd Fix install docs (#14226) 2024-10-08 15:48:54 -05:00
Nicolas Mowen
0b71cfaf06 Handle loitering objects (#14221) 2024-10-08 09:41:54 -05:00
Josh Hawkins
d558ac83b6 Search fixes (#14217)
* Ensure semantic search is enabled before checking model download state

* Only clear similarity search when removing similarity pill
2024-10-08 07:01:31 -06:00
Josh Hawkins
74efc94649 Always display confidence chip on similarity searches (#14207) 2024-10-07 20:15:49 -06:00
Nicolas Mowen
2541a345d0 Improve Nvidia GPU stats (#14206)
* :Add support for nvidia driver info

* Don't show temperature if detector isn't called coral

* Add encoder and decoder info for Nvidia GPUs

* Fix device info

* Implement GPU info for nvidia GPU

* Update web/src/views/system/GeneralMetrics.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update web/src/views/system/GeneralMetrics.tsx

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-10-07 20:15:31 -06:00
Josh Hawkins
23ce1e930d Adjust zscore bias for descriptions (#14205) 2024-10-07 18:51:37 -06:00
Josh Hawkins
6ebad84160 initialize path before calling super() (#14203) 2024-10-07 16:17:57 -05:00
Josh Hawkins
24ac9f3e5a Use sqlite-vec extension instead of chromadb for embeddings (#14163)
* swap sqlite_vec for chroma in requirements

* load sqlite_vec in embeddings manager

* remove chroma and revamp Embeddings class for sqlite_vec

* manual minilm onnx inference

* remove chroma in clip model

* migrate api from chroma to sqlite_vec

* migrate event cleanup from chroma to sqlite_vec

* migrate embedding maintainer from chroma to sqlite_vec

* genai description for sqlite_vec

* load sqlite_vec in main thread db

* extend the SqliteQueueDatabase class and use peewee db.execute_sql

* search with Event type for similarity

* fix similarity search

* install and add comment about transformers

* fix normalization

* add id filter

* clean up

* clean up

* fully remove chroma and add transformers env var

* readd uvicorn for fastapi

* readd tokenizer parallelism env var

* remove chroma from docs

* remove chroma from UI

* try removing custom pysqlite3 build

* hard code limit

* optimize queries

* revert explore query

* fix query

* keep building pysqlite3

* single pass fetch and process

* remove unnecessary re-embed

* update deps

* move SqliteVecQueueDatabase to db directory

* make search thumbnail take up full size of results box

* improve typing

* improve model downloading and add status screen

* daemon downloading thread

* catch case when semantic search is disabled

* fix typing

* build sqlite_vec from source

* resolve conflict

* file permissions

* try build deps

* remove sources

* sources

* fix thread start

* include git in build

* reorder embeddings after detectors are started

* build with sqlite amalgamation

* non-platform specific

* use wget instead of curl

* remove unzip -d

* remove sqlite_vec from requirements and load the compiled version

* fix build

* avoid race in db connection

* add scale_factor and bias to description zscore normalization
2024-10-07 14:30:45 -06:00
Nicolas Mowen
2a15b95f18 Docs updates (#14202)
* Clarify live docs

* Link out to common config examples in getting started guide

* Add tip for go2rtc name configuration

* direct link
2024-10-07 15:28:24 -05:00
Rui Alves
757150dec1 Use Swagger documentation for Frigate HTTP API (#14178)
* Updated documentation

* docusaurus.config and sidebars converted to Typescript to allow for typings

* Added type for sidebars.ts

* Replaced integrations/api.md with automatically generated openAPI specification. Make sidebar collapsible to increase readability

* Fix HTTP API links in the documentation

* Added rust as language in the openapi sidebar

* Make sure configuration/pwa is present

* Fix API slug

* Fix links

* Revert sidebarCollapsible configuration

* Make HTTP API sidebar collapsed by default. Added CSS for OpenAPI methods

* Proper localhost server path

* Proper localhost server path

* No introduction page

* Lint
2024-10-07 14:27:35 -06:00
Josh Hawkins
ddcec82b61 Explicitly set video tag dimensions to fit inside dialog (#14184) 2024-10-07 07:19:22 -06:00
Nicolas Mowen
74047453ef Bug Fixes (#14193)
* fix getting device from empty list

* Overwrite all fields

* Fix header too low
2024-10-07 07:18:09 -06:00
Rémi Bédard-Couture
dcaed0e90f Log correct tensorRT version when debugging (#14182) 2024-10-06 15:33:03 -06:00
Josh Hawkins
cae304e07f Revamp object snapshot tab (#14180)
* Revamp object snapshot tab

* Make snapshots and thumbnails left justified in the review pane
2024-10-06 11:43:36 -06:00
Blake Blackshear
039ab1ccd7 add docs for yolonas plus models (#14161)
* add docs for yolonas plus models

* typo
2024-10-05 14:51:05 -05:00
Blake Blackshear
47ad0ca993 Merge remote-tracking branch 'origin/master' into dev 2024-10-05 10:48:14 -05:00
Nicolas Mowen
9c751230a1 Include lsof in container (#14145) 2024-10-03 17:23:37 -05:00
gtsiam
a468ed316d Added stop_event to util.Process (#14142)
* Added stop_event to util.Process

util.Process will take care of receiving signals when the stop_event is
accessed in the subclass. If it never is, SystemExit is raised instead.

This has the effect of still behaving like multiprocessing.Process when
stop_event is not accessed, while still allowing subclasses to not deal
with the hassle of setting it up.

* Give each util.Process their own logger

This will help to reduce boilerplate in subclasses.

* Give explicit types to util.Process.__init__

This gives better type hinting in the editor.

* Use util.Process facilities in AudioProcessor

Boilerplate begone!

* Removed pointless check in util.Process

The log_listener.queue should never be None, unless something has gone
extremely wrong in the log setup code. If we're that far gone, crashing
is better.

* Make sure faulthandler is enabled in all processes

This has no effect currently since we're using the fork start_method.
However, when we inevidably switch to forkserver (either by choice, or
by upgrading to python 3.14+) not having this makes for some really fun
failure modes :D
2024-10-03 11:03:43 -06:00
Nicolas Mowen
e725730982 Fix shared memory frames being stuck when a camera capture crashed (#14140)
* Fix shared memory frames being stuck when a camera capture crashed

* Update ffmpeg build
2024-10-03 09:31:07 -06:00
Nicolas Mowen
21c12d118b Correct preview docs (#14136) 2024-10-03 08:40:49 -05:00
Josh Hawkins
b9e74ee9ab Fix autotracking absolute zoom interpolation logic (#14139) 2024-10-03 08:40:27 -05:00
Nicolas Mowen
0f2cff5078 Fix mjpeg api (#14138) 2024-10-03 07:33:06 -06:00
gtsiam
e5e196bd7f Fix logging (#14122)
Fixes logging without introducing more junk into FrigateApp.
2024-10-03 06:33:53 -06:00
Nicolas Mowen
077402406b Make env vars warning more clear (#14128) 2024-10-02 21:52:58 -05:00
gtsiam
54900ae318 Properly call super() in subclasses (#14124) 2024-10-02 19:35:46 -06:00
gtsiam
3c015bf822 Do not migrate db to new config path (#14123)
I just saw this, and I would be very surprised by that behaviour as a
user. Changing the db path would randomly move the database, and
changing it back (or to anything, really) would not. These kinds of
advanced settings are generally expected to do one thing: Change the
path frigate opens the database from. The end.
2024-10-02 19:34:14 -06:00
Josh Hawkins
a1efcfb2d0 Fix alert thumbnails on iOS and safari desktop (#14121) 2024-10-02 13:49:52 -06:00
Nicolas Mowen
75d531285a Don't consider segments containing unprocessed frames in segment count (#14120) 2024-10-02 12:55:55 -05:00
Nicolas Mowen
0aad7db2d2 UI tweaks (#14118)
* Reset snapshot state when event is moved

* Add page listener for review page

* Add same listener for search page

* Use content height
2024-10-02 09:32:12 -05:00
Nicolas Mowen
20c3b890ae Clean up hwaccel docs (#14117) 2024-10-02 08:58:53 -05:00
Josh Hawkins
0126960d79 UI improvements and fixes (#14116)
* Add slider to adjust number of columns in search view

* Work around safari bug with alert thumbnails

* adjust gap
2024-10-02 07:59:53 -05:00
Josh Hawkins
849d441c5c Azure genai fixes (#14103)
* Azure fixes

* clarify docs

* sublabels fix
2024-10-01 16:05:16 -06:00
Josh Hawkins
b5f5627ca6 Add Azure OpenAI as genai provider (#14102)
* add azure openai genai client

* docs
2024-10-01 13:57:40 -06:00
Nicolas Mowen
5b0c1e5b9e Fix event entries (#14093) 2024-10-01 11:07:13 -05:00
Nicolas Mowen
3cff0df0ce Bug fixes (#14092)
* Fix path of selected GPU

* Fix selection bug

* Simplify
2024-10-01 07:54:27 -06:00
Nicolas Mowen
15fa55c223 Refactor attribute saving (#14090)
* Refactor attribute saving

* Ensure sub label is not overwritten

* Formatting

* Fix unused
2024-10-01 07:31:03 -06:00
Nicolas Mowen
594ca3a04b Don't assume single render device is D128 (#14091) 2024-10-01 07:27:41 -06:00
Josh Hawkins
fafe5623d1 UI tweaks (#14088)
* fix squashed alert thumbnails in filmstrip

* add genai debug logs

* consistent themed image loading indicator background color

* improve image loading skeleton in object lifecycle pane

* less rounding when screen is smaller

* use browser back button to dismiss review pane

* initial state
2024-10-01 07:01:45 -06:00
dependabot[bot]
141cf39368 Bump docker/login-action from 3.2.0 to 3.3.0 (#12555)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](0d4c9c5ea7...9780b0c442)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 06:03:55 -06:00
Josh Hawkins
1fa050fd7a Add genai use_snapshot to reference config (#14078) 2024-09-30 17:46:09 -05:00
Nicolas Mowen
f36e7430ae Fix logging (#14079)
* Fix log level setting

* fix app.py mypy issues
2024-09-30 17:45:22 -05:00
Nicolas Mowen
94fd75e014 Misc Improvements (#14076)
* Return ID of export in http response

* Ignore keyboard listener when typing in text field

* Add other keyboard listeners
2024-09-30 16:55:44 -05:00
Josh Hawkins
95d6da3111 Add ability to configure genai to use snapshot instead of thumbnails (#14077)
* Allow embedding of snapshot for description via config option

* docs

* frontend button

* Backend

* crop snapshot to region

* only show dropdown when event has snapshot

* fix cursor on dropdown

* crop on initial generation as well

* use enum for type

* fix type
2024-09-30 15:54:53 -06:00
Nicolas Mowen
4dc4704bb4 Improve Intel GPU stats (#14073)
* Fix formatting

* Fix test
2024-09-30 16:41:14 -05:00
Nicolas Mowen
18bf7f93fa Improve rocm handling of different models (#14072)
* Improve rocm handling of different models

* Formatting

* Fix type check
2024-09-30 16:40:46 -05:00
Nicolas Mowen
c73f694c63 Improve gamma filter (#14065)
* Improve gamma filter

* Fix tests
2024-09-30 11:42:51 -06:00
Josh Hawkins
3688a3bc67 Misc fixes (#14064)
* Add loading indicator when explore view is revalidating

* Portal tooltip in object lifecycle pane

* Better config file handling

* Only manually set aspect ratio when using alert videos
2024-09-30 07:32:54 -06:00
Stepan Legachev
775a3a1c22 docs: fix argument spelling (#13366) 2024-09-28 18:17:32 -06:00
gtsiam
bbbb3b4a06 Split config.py into multiple files (#14038)
* Replace logging.warn with logging.warning

* Install config global state early

* Split config.py into more manageable pieces
2024-09-28 14:21:42 -05:00
Nicolas Mowen
576191cd4e Remove debug log (#14037) 2024-09-28 10:26:11 -05:00
Nicolas Mowen
38d398c967 Dynamic attributes config (#14035)
* Add config for attribute map and generate all labels from the map

* Update docs

* Formatting

* Use the dynamic label map

* Fix check

* Fix docs typo
2024-09-28 07:49:04 -06:00
Josh Hawkins
7da44115d3 Clarify storage metrics values with a popover (#14034) 2024-09-28 08:24:14 -05:00
Nokius
b54032bdc7 make the hailo user instalation script a bit more failsafe (#13992)
This will checks if the firmware folder is present if not it will created it informs the user to reboot to load the firmware for the hailo8l detector.
2024-09-28 05:55:17 -06:00
Nicolas Mowen
cab497e81e Fix dynamic api ordering (#14022)
* Fix dynamic api ordering

* Formatting
2024-09-27 12:09:53 -06:00
Nicolas Mowen
50e9c67609 Update Templates (#14019)
* Update general support template

* Update camera support

* Update config-support.yml

* Update detector support

* Update general-support.yml

* Update hardware-acceleration-support.yml

* Create pull_request_template.md
2024-09-27 10:48:51 -05:00
Josh Hawkins
bd57ea0110 Revert all cameras switches behavior (#14015) 2024-09-27 08:13:15 -06:00
Nicolas Mowen
05fe7f8a48 Fixes & Tweaks (#14013)
* Rework to create util for onnx initialization

* Fix shm log

* Fix onClick exceptoins
2024-09-27 07:41:48 -06:00
gtsiam
c0bd3b362c Custom classes for Process and Metrics (#13950)
* Subclass Process for audio_process

* Introduce custom mp.Process subclass

In preparation to switch the multiprocessing startup method away from
"fork", we cannot rely on os.fork cloning the log state at fork time.
Instead, we have to set up logging before we run the business logic of
each process.

* Make camera_metrics into a class

* Make ptz_metrics into a class

* Fixed PtzMotionEstimator.ptz_metrics type annotation

* Removed pointless variables

* Do not start audio processor when no audio cameras are configured
2024-09-27 07:53:23 -05:00
Josh Hawkins
6381028fd6 Ensure config file naming is consistent (#14011) 2024-09-27 07:52:42 -05:00
Josh Hawkins
1f328be1bd UI fixes (#14010)
* Fix export time picker on iOS

* Fix dialog on iPad
2024-09-27 07:52:31 -05:00
Nicolas Mowen
ddfdb71783 Fix snapshot access (#13996) 2024-09-26 20:05:48 -05:00
Nicolas Mowen
da1478c0c1 Update object_detectors.md (#13994)
* Update object_detectors.md

* Use info

* Move CPU detector to bottom

* Moce CPU to bottom

* Add missing detector keys
2024-09-26 18:58:58 -05:00
Josh Hawkins
40fe3b4358 Search functionality and UI tweaks (#13978)
* Portal tooltips

* Add ability to time_range filter chroma searches

* centering and padding consistency

* add event id back to chroma metadata

* query sqlite first and pass those ids to chroma for embeddings search

* ensure we pass timezone to the api call

* remove object lifecycle from search details for non-object events

* simplify hour calculation

* fix query without filters

* bump chroma version

* chroma 0.5.7

* fix selecting camera group in cameras filter button
2024-09-26 15:30:56 -05:00
Nicolas Mowen
20fd1db0f4 Update hailo driver to 4.18 (#13991) 2024-09-26 12:16:08 -06:00
Nicolas Mowen
a65aaab849 Fixes (#13990)
* Fix ROCm input name

* Fix incorrect parsing of None
2024-09-26 12:42:21 -05:00
Nicolas Mowen
a5595189ed Fix ROCm inference (#13988) 2024-09-26 12:16:26 -05:00
Nicolas Mowen
4a1da3ebc5 Fix saving config (#13985) 2024-09-26 11:19:37 -05:00
Nicolas Mowen
35a4460334 Tweaks (#13983)
* Add onConnect to mqtt and doucment

* Add play pause via mouse click
2024-09-26 09:12:15 -05:00
Nicolas Mowen
a6ccb37683 Fix config saving api (#13969) 2024-09-25 17:22:11 -05:00
Josh Hawkins
68465aed49 Increase healthcheck start period to 5 minutes (#13968) 2024-09-25 15:14:10 -06:00
Nicolas Mowen
fc3aac96f2 Remove incorrect (#13966) 2024-09-25 14:53:17 -05:00
Josh Hawkins
32c7669b28 Search UI tweaks (#13965)
* Prevent keyboard shortcuts from running when input is focused

* fix reset button and update time pickers when using input

* simplify css

* consistent button order and spacing
2024-09-25 12:45:42 -06:00
Nicolas Mowen
fef30bc671 Peroparly handle text based responses (#13964) 2024-09-25 13:35:30 -05:00
Josh Hawkins
ae547d27e4 Use not instead of is None (#13962) 2024-09-25 11:53:25 -06:00
Josh Hawkins
be3e1831d4 Add ability to use 12 hour time in input time filter (#13961) 2024-09-25 12:15:08 -05:00
Nicolas Mowen
45aceea53b Return version as html (#13960) 2024-09-25 10:06:17 -06:00
Nicolas Mowen
25819584bd Add ability to filter search by time range (#13946)
* Add ability to filter by time range

* Cleanup

* Handle input with tags

* fix input for time_range filter

* fix before and after filters

* clean up

* Ensure the default value works as expected

* Handle time range in am/pm based on browser

* Fix arrow

* Fix text

* Handle midnight case

* fix width

* Fix bg

* Fix bg

* Fix mobile spacing

* y spacing

* remove left padding

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-09-25 10:05:40 -06:00
Nicolas Mowen
4c24b70d47 Do not use a default value of datetime for params (#13957)
* Do not use a default value of datetime for params

* Formatting

* Remove unused

* Undo
2024-09-25 10:49:54 -05:00
Josh Hawkins
4c12673fbb Add ability to restrict genai to objects and zones at the camera level (#13958)
* Add ability to restrict genai to labels and zones at the camera level

* fix comment

* clarify docs

* use objects instead of labels

* docs

* object list
2024-09-25 09:42:39 -06:00
Nicolas Mowen
e935db5075 Api fixes (#13955)
* Fix false positive submission

* Make sure None is not sent as rate limit
2024-09-25 08:01:08 -05:00
Josh Hawkins
a7f1f8d327 Add 1s timeout to metadata subscriber in embeddings maintainer (#13947) 2024-09-24 19:08:12 -05:00
Josh Hawkins
8c540d7210 Add error logging to genai clients (#13943) 2024-09-24 14:04:35 -06:00
Nicolas Mowen
4c4b884f8e Review api fixes (#13942)
* Fix order of review api

* remove uneccesary params
2024-09-24 14:32:50 -05:00
Josh Hawkins
a3d3fe07ce PTZ camera support docs update (#13941)
* Add user reports for ptz cameras/autotracking

* remove message
2024-09-24 12:41:58 -06:00
Josh Hawkins
1ae521f560 regenerate description fixes (#13940) 2024-09-24 12:34:29 -06:00
Nicolas Mowen
7854e1c2c1 Fix plus api (#13937)
* Fix plus api

* Fix regenerate api
2024-09-24 12:22:11 -05:00
Nicolas Mowen
a9ff795948 More api fixes (#13936)
* Set correect return type for raw config

* Simplify parsing

* Formatting
2024-09-24 09:54:03 -06:00
Nicolas Mowen
a8e2f97260 Improve performance of image fetching (#13933) 2024-09-24 09:50:20 -05:00
Nicolas Mowen
d17253b023 Fix apis (#13932) 2024-09-24 09:27:10 -05:00
Josh Hawkins
ecbf0410eb Regenerate genai tracked object descriptions (#13930)
* add genai to frigateconfig

* add regenerate button if genai is enabled

* add endpoint and new zmq pub/sub model

* move publisher to app

* dont override

* logging

* debug timeouts

* clean up

* clean up

* allow saving of empty description

* ensure descriptions can be empty

* update search detail when results change

* revalidate explore page on focus

* global mutate hook

* description websocket hook and dispatcher

* revalidation and mutation

* fix merge conflicts

* update tests

* fix merge conflicts

* fix response message

* fix response message

* fix fastapi

* fix test

* remove log

* json content

* fix content response

* more json content fixes

* another one
2024-09-24 08:14:51 -06:00
Rui Alves
cffc431bf0 Frigate HTTP API using FastAPI (#13871)
* POC: Added FastAPI with one endpoint (get /logs/service)

* POC: Revert error_log

* POC: Converted preview related endpoints to FastAPI

* POC: Converted two more endpoints to FastAPI

* POC: lint

* Convert all media endpoints to FastAPI. Added /media prefix (/media/camera && media/events && /media/preview)

* Convert all notifications API endpoints to FastAPI

* Convert first review API endpoints to FastAPI

* Convert remaining review API endpoints to FastAPI

* Convert export endpoints to FastAPI

* Fix path parameters

* Convert events endpoints to FastAPI

* Use body for multiple events endpoints

* Use body for multiple events endpoints (create and end event)

* Convert app endpoints to FastAPI

* Convert app endpoints to FastAPI

* Convert auth endpoints to FastAPI

* Removed flask app in favour of FastAPI app. Implemented FastAPI middleware to check CSRF, connect and disconnect from DB. Added middleware x-forwared-for headers

* Added starlette plugin to expose custom headers

* Use slowapi as the limiter

* Use query parameters for the frame latest endpoint

* Use query parameters for the media snapshot.jpg endpoint

* Use query parameters for the media MJPEG feed endpoint

* Revert initial nginx.conf change

* Added missing even_id for /events/search endpoint

* Removed left over comment

* Use FastAPI TestClient

* severity query parameter should be a string

* Use the same pattern for all tests

* Fix endpoint

* Revert media routers to old names. Order routes to make sure the dynamic ones from media.py are only used whenever there's no match on auth/etc

* Reverted paths for media on tsx files

* Deleted file

* Fix test_http to use TestClient

* Formatting

* Bind timeline to DB

* Fix http tests

* Replace filename with pathvalidate

* Fix latest.ext handling and disable uvicorn access logs

* Add cosntraints to api provided values

* Formatting

* Remove unused

* Remove unused

* Get rate limiter working

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-09-24 07:05:30 -06:00
gtsiam
dc54981784 Move more things out of FrigateApp (#13897)
* Moved FrigateApp.init_config() into FrigateConfig.load()

* Move frigate config loading into main

* Store PlusApi in FrigateConfig

* Register SIGTERM handler in main

* Ensure logging is setup during config parsing

* Removed pointless try

* Moved config initialization out of FrigateApp

* Made FrigateApp.shm_frame_count into a function

* Removed log calls from signal handlers

python's logging calls are not re-entrant, which caused at least one of
these to deadlock randomly.

* Reopen stdout/err on process fork

This helps avoid deadlocks (https://github.com/python/cpython/issues/91776).

* Make mypy happy

* Whoops. I might have forgotten to save.

Truly an amateur mistake.

* Always call FrigateApp.stop()
2024-09-24 07:07:47 -05:00
Josh Hawkins
a7ed90f042 try deleting zoom spaces if disabled (#13915) 2024-09-23 15:34:08 -05:00
Nicolas Mowen
08941ab39a Improve hailo docs (#13910)
* Fix command for hailo8 install

* Update object_detectors.md
2024-09-23 09:53:54 -05:00
ofcedwards
b81a8d26e4 Disable keepalive for Safari in nginx vod location (#13909) 2024-09-23 08:02:50 -06:00
Nicolas Mowen
af84af7b7a Don't print error for requesting camera info (#13905) 2024-09-23 08:49:34 -05:00
Josh Hawkins
0f813962be Chroma fixes (#13902)
* Ensure descriptions saved in chroma are non-empty

* delete only existing ids in event cleanup

* add debug logging
2024-09-23 06:53:19 -06:00
Josh Hawkins
fe57f7f489 Search UI tweaks (#13903) 2024-09-23 06:39:20 -06:00
Sean Kelly
12e2c04486 Decrease number of X ticks on system and camera graphs (#13891) 2024-09-22 15:57:19 -06:00
Nicolas Mowen
6bafb68d77 Remove PyYAML usages and dependency (#13889) 2024-09-22 14:08:36 -05:00
gtsiam
e8763b3697 Removed usage of PyYAML for config parsing. (#13883)
* Ignore entire __pycache__ folder instead of individual *.pyc files

* Ignore .mypy_cache in git

* Rework config YAML parsing to use only ruamel.yaml

PyYAML silently overrides keys when encountering duplicates, but ruamel
raises and exception by default. Since we're already using it elsewhere,
dropping PyYAML is an easy choice to make.

* Added EnvString in config to slim down runtime_config()

* Added gitlens to devcontainer

* Automatically call FrigateConfig.runtime_config()

runtime_config needed to be called manually before. Now, it's been
removed, but the same code is run by a pydantic validator.

* Fix handling of missing -segment_time

* Removed type annotation on FrigateConfig's parse

I'd like to keep them, but then mypy complains about some fundamental
errors with how the pydantic model is structured. I'd like to fix it,
but I'd rather work towards moving some of this config to the database.
2024-09-22 10:56:57 -05:00
Nicolas Mowen
6f2924006c Include radeontop in arm build (#13886) 2024-09-22 10:56:30 -05:00
Nicolas Mowen
062c305cd8 Remove context file (#13885) 2024-09-22 08:38:23 -06:00
Nicolas Mowen
61a4a4bc2f Update openvino to 2024.3 (#13861) 2024-09-20 17:20:11 -05:00
Josh Hawkins
176af55e8c Fix similarity search (#13856)
* add event_id param to api

* exclude query from filtertype

* update review pane link for similarity search

* update filter group for similarity param and fix switch bug

* unneeded prop

* update query and input for similarity search param

* use undefined instead of empty string for query with similarity search
2024-09-20 12:05:55 -05:00
Nicolas Mowen
1a51ce712c Simplify tensorrt building (#13851)
* Simplify tensorrt building

* Use engine context cache
2024-09-20 10:49:44 -05:00
Josh Hawkins
811da2e159 Clarify live view docs (#13848) 2024-09-20 06:27:15 -06:00
Sean Kelly
535bf6e4b9 Update install_deps.sh fix typo (#13842) 2024-09-19 19:21:04 -06:00
Josh Hawkins
515f06ba6c small spacing tweaks and fix config editor schema load (#13841) 2024-09-19 17:36:07 -06:00
Josh Hawkins
6c43e5dba9 Display warning when search embeddings models are being downloaded (#13840) 2024-09-19 16:14:20 -05:00
Nicolas Mowen
d498fabe72 Update ffmpeg to 7 and update intel hwaccel docs (#13834)
* Update ffmpeg to 7 and update intel hwaccel docs

* Formatting

* Redo early gen naming

* Add gamma back in

* Fix table

* Add link to intel docs

* Add hwaccel arg for disabling gamma

* Formatting

* Fix tests

* Formatting

* Fix nvidia
2024-09-19 13:29:58 -06:00
Nicolas Mowen
27e71eb142 Improve navigation (#13833)
* Fix infinite loop

* Fix review page not opening to historical review items

* Use query arg for search and remove unused recording opening

* Retain query

* Clean up typing
2024-09-19 11:01:57 -05:00
Nicolas Mowen
7c63cb5bca Do not handle object if data is None (#13830) 2024-09-19 07:51:07 -06:00
Nicolas Mowen
ddf3a687a3 Use intel apt for out of tree drivers (#13829) 2024-09-19 07:41:08 -06:00
Nicolas Mowen
4515eb4637 Rocm yolonas (#13816)
* Implement ROCm detectors

* Cleanup tensor input

* Fixup image creation

* Add support for yolonas in onnx

* Get build working with onnx

* Update docs and simplify config

* Remove unused imports
2024-09-18 19:34:07 -05:00
Josh Hawkins
efd1194307 Improved search input (#13815)
* create input with tags component

* tweaks

* only show filters pane when there are actual filters

* special case for similarity searches

* similarity search tweaks

* populate suggestions values

* scrollbar on outer div

* clean up

* separate custom hook

* use command component

* tooltips

* regex tweaks

* saved searches with confirmation dialogs

* better date handling

* fix filters

* filter capitalization

* filter instructions

* replace underscore in filter type

* alert dialog button color

* toaster on success
2024-09-18 12:18:16 -06:00
Nicolas Mowen
5e0d8fe4c7 Make note of multi-model on GPU support (#13813)
* Make note of multi-gpu support

* fix typo
2024-09-18 12:05:27 -06:00
Nicolas Mowen
e44a9e8921 Use cpu provider for embeddings models (#13806) 2024-09-17 17:20:18 -05:00
Josh Hawkins
ff9e1da1de Revert "Rewrite yaml loader (#13803)" (#13805)
This reverts commit 38ff46e45c.
2024-09-17 15:03:22 -06:00
Nicolas Mowen
1ed8642010 Refactor onnx providers (#13804)
* Ensure dirs exist for model caches

* Formatting

* Don't use tensorrt for embeddings
2024-09-17 15:54:44 -05:00
gtsiam
38ff46e45c Rewrite yaml loader (#13803)
* Ignore entire __pycache__ folder instead of individual *.pyc files

* Rewrite the yaml loader to match PyYAML

The old implementation would fail in weird ways with configs that were
incorrect in just the right way. The new implementation just does what
PyYAML would do, only diverging in case of duplicate keys.

* Clarify duplicate yaml key ValueError message

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-09-17 15:52:55 -05:00
Nicolas Mowen
2362d0e838 Override onnx clip loading (#13800)
* Set caching options for hardware providers

* Always use CPU for searching

* Use new install strategy to remove onnxruntime and then install post wheels
2024-09-17 13:24:35 -06:00
Nicolas Mowen
90d7fc6bc5 Install no deps separately for wheel (#13799)
* Install no deps separately for wheel

* Fix order

* fix arg
2024-09-17 11:04:51 -06:00
gtsiam
bcae0cf441 Fix vscode launch configuration (#13795) 2024-09-17 10:42:10 -05:00
gtsiam
edababa88e Work through most of the cspell warnings in python (#13794) 2024-09-17 10:41:46 -05:00
Nicolas Mowen
350abda21a Update docs dependencies (#13793) 2024-09-17 08:27:47 -05:00
gtsiam
1c24f0054a Make logging code self-contained (#13785)
* Make logging code self-contained.

Rewrite logging code to use python's builting QueueListener, effectively
moving the logging process into a thread of the Frigate app.

Also, wrap this behaviour in a easy-to-use context manager to encourage
some consistency.

* Fixed typing errors

* Remove todo note from log filter

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Do not access log record's msg directly

* Clear all root handlers before starting app

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-09-17 08:26:25 -05:00
Nicolas Mowen
f7eaace7ae Change path for rockchip ffmpeg (#13792) 2024-09-17 07:04:38 -06:00
gtsiam
8573016bef Formatting improvements (#13765)
* Format makefiles

* Handle all errors in rocm makefile

* Remove CURRENT_UID and GID from makefile as they are unused

* Removed unused vite.svg asset

* Sort frigate-dictionary
2024-09-17 07:39:44 -05:00
Nicolas Mowen
6bf2708c0e Standardize bar graph y axis (#13772)
* Standardize bar graph y axis

* Fix lint
2024-09-16 18:18:32 -06:00
Nicolas Mowen
36d7eb7caa Support ONNX model caching (#13780)
* Support model caching

* Cleanup
2024-09-16 18:18:11 -06:00
Nicolas Mowen
4fc8d33d31 Fix detections logic (#13781) 2024-09-16 18:23:10 -05:00
Darryl Sokoloski
c4e2f3bc70 Updated supported cameras: Speco O8P32X (#13698)
Signed-off-by: Darryl Sokoloski <darryl@sokoloski.ca>
2024-09-16 16:17:22 -06:00
Nicolas Mowen
2f69f5afe6 Add support for yolonas via ONNX and allow TensorRT execution provider to work correctly (#13776)
* Add support for yolonas in onnx

* Add correct deps

* Set ld library path

* Refactor cudnn to only be used in amd64

* Add onnx to docs and add explainer at the top

* Undo change

* Update comment

* Remove uneccesary

* Remove line change
2024-09-16 16:17:31 -05:00
Josh Hawkins
9bcb928715 check for onvif movement support before attempting movement (#13771) 2024-09-16 10:46:35 -06:00
Josh Hawkins
e3edcf057c write prompts for genai at the camera level (#13767) 2024-09-16 08:46:11 -06:00
Nicolas Mowen
06ccf7e9e9 Always close connection to shm frame after detection (#13766) 2024-09-16 07:56:20 -06:00
Nicolas Mowen
e4ea35e626 Add onnxruntime nvidia providers (#13756) 2024-09-15 20:30:30 -05:00
Josh Hawkins
bd906a7915 Update docs for another supported autotracking cam (#13753)
* update for Uniview IPC6612SR-X33-VG

* wording
2024-09-15 11:43:11 -06:00
Josh Hawkins
329bece28d stop web linter from complaining (#13755) 2024-09-15 11:43:03 -06:00
Nicolas Mowen
0c86c77d42 Ffmpeg 6 (#13754)
* Move back to ffmpeg 6

* Use ffmpeg 6
2024-09-15 11:42:52 -06:00
Nicolas Mowen
3df33199bc Add Arc a750 to hardware stats list (#13752) 2024-09-15 11:37:30 -06:00
Nicolas Mowen
fc145016ea Use smarter logic for default ffmpeg handling (#13748) 2024-09-15 09:01:15 -06:00
Josh Hawkins
c17524bc3c Explore tweaks (#13744)
* Fix loading indicator and explore view when entering a search term

* don't hide iOS video mute button

* use searchTerm instead of search for trigger
2024-09-14 14:08:46 -06:00
Nicolas Mowen
d5acd11164 Ffmpeg fixes (#13739)
* Only include hwaccel args if detect is being used

* Include both libmfx libraries
2024-09-14 13:22:03 -05:00
Josh Hawkins
2a66923524 Explore pane infinite loading (#13738)
* swr for infinite loading

* search detail language change

* drawer padding

* spacing

* center calendar

* padding

* catch error

* use limit const
2024-09-14 07:42:56 -06:00
Nicolas Mowen
088a0fb4a5 Ffmpeg cleanup (#13737) 2024-09-14 07:03:39 -06:00
Nicolas Mowen
4f10f82580 Install onevpl tools for intel (#13730)
* Install onevpl tools for intel

* Use updated intel lib
2024-09-13 21:18:56 -05:00
Josh Hawkins
5aee70ac7a Explore view fixes (#13726)
* return description consistently under data object

* description type

* navigate to history view from explore video tab
2024-09-13 14:44:31 -06:00
Nicolas Mowen
5ff476c6f9 Configurable ffmpeg (#13722)
* Install multiple ffmpeg versions and add config to make it configurable

* Update docs

* Run ffprobe too

* Cleanup

* Apply config to go2rtc as well

* Fix ffmpeg bin

* Docs

* Restore path

* Cleanup env var

* Fix ffmpeg path for encoding

* Fix export

* Formatting
2024-09-13 15:14:51 -05:00
Josh Hawkins
7ad30f15d5 Add note about onvif cameras without auth (#13721) 2024-09-13 10:43:48 -06:00
Nicolas Mowen
641f1244dd Update ffmpeg (#13720) 2024-09-13 09:55:42 -05:00
Nicolas Mowen
a1fd29b34b Fix filter args (#13718)
* Fix filter args in events

* Fix export arg

* Don'
t fail

* Fix filter buttons

* Fix right click

* Formatting
2024-09-13 08:25:29 -05:00
Josh Hawkins
90c1cc3e3b Ensure all cameras switch enables/disables each individual switch (#13716) 2024-09-13 06:07:11 -06:00
Josh Hawkins
ba49054cd7 Change camera offline error display and message (#13712)
* Don't display offline message in live player if camera is restreamed

* Update error message

* simplify message
2024-09-13 05:57:30 -06:00
Josh Hawkins
61854f1d6a UI tweaks (#13711)
* Fix dialog autofocus problems on mobile

* set font size to prevent mobile zooming

* Use arrow keys to navigate Explore view
2024-09-12 21:07:35 -06:00
Josh Hawkins
1f9ba1d625 Use MobilePage for camera group editor (#13710)
* Use MobilePage for camera group editor

* alignment

* clear editing group name
2024-09-12 16:06:56 -05:00
Josh Hawkins
644ea7be4a UI tweaks (#13705)
* mobile page component

* object lifecycle pane tweaks

* use mobile page component for review and search detail

* fix frigate+ dialog when using mobile page component

* small tweaks
2024-09-12 13:39:35 -06:00
Nicolas Mowen
87ab4e7c9b UI Fixes (#13703)
* Respect ui configured timezone

* Non alert videos are always 16:9
2024-09-12 14:28:15 -05:00
Nicolas Mowen
d84e3cacca UI Improvements and Tweaks (#13689)
* Improve image loading by not loading when off screen

* Add share menu to export

* Add share button and tidy up review detail lists

* Fix missing key

* Use query args for review filter

* Add object lifecycle to explore dialog

* Adjust sizing

* Simplify share button

* Always show snapshot but hide buttons for frigate+ if not applicable

* Handle case when user switches to element missing the previously selected tab

* Handle cases where share is not available

* Fix logic
2024-09-12 09:46:29 -05:00
mrmorganmurphy
2f38d960d4 Update cameras.md (#13691)
Amcrest IP5M-1190EW does not support autotracking. FOV relative movement not supported.
2024-09-12 07:16:23 -06:00
Josh Hawkins
b4acf4f341 Use tracked object instead of event language in docs and UI (#13685)
* Verbiage update: use tracked object instead of event

* tweaks
2024-09-11 18:53:58 -06:00
Nicolas Mowen
62657ad05a Ensure detections are not immediately deleted (#13683)
* Ensure detections are not immediately deleted

* Formatting
2024-09-11 15:46:24 -05:00
Nicolas Mowen
f3784505e0 Explore page optimizations (#13682)
* Fix video scaling

* Simplify similarity searching

* Hide source filter when doing similarity search

* Fix up

* Remove frigate plus view

* Add icons to detail tabs

* Cleanup
2024-09-11 14:20:41 -05:00
Josh Hawkins
863f51363a Explore UI tweaks (#13679)
* Loading indicators and filter bar tweaks

* remove unnecessary bits from search thumbnail

* simplify

* add video loading indicator

* clean up
2024-09-11 11:32:45 -06:00
Nicolas Mowen
22ee6bb137 Handle middle mouse button clicks (#13678)
* Handle middle mouse button clicks

* Fix up
2024-09-11 12:26:01 -05:00
Nicolas Mowen
3972642ba0 Refactor search details into Explore Page (#13665) 2024-09-11 08:41:16 -06:00
Josh Hawkins
e016bd6900 Find similar footage from review item snapshots (#13662)
* Find similar footage from review item snapshots

* Include confidence score for similarity search
2024-09-10 12:53:25 -06:00
Nicolas Mowen
d2588d9de4 Fix search detail pane (#13658) 2024-09-10 13:38:58 -05:00
Nicolas Mowen
07d1692f2b Make notifications toggleable via MQTT (#13657)
* Add ability to toggle mqtt state from MQTT / ws

* Listen to notification config updates

* Add docs for notifications
2024-09-10 11:24:44 -06:00
Nicolas Mowen
8db9824842 Don't save preview frames if recording is not enabled (#13656)
* Simplify check

* Don't write frames

* Write frames only if recording enabled
2024-09-10 11:12:42 -06:00
Nicolas Mowen
c8521554c8 Refactor Search Page (#13645)
* Always enable search page

* Always show eents when searching

* No default search background

* Center and show all filters when semantic search is not enabled

* Limit number of default items shown

* Adjust search options

* Add support for sub label filtering

* Separate out filters and clean up detail pane

* Tablet cleanup

* Fix current hour search preview

* Handle single lists

* Cleanup api search
2024-09-10 10:23:20 -06:00
Nicolas Mowen
ceb7aa8b36 Improve handling of empty frames (#13651) 2024-09-10 08:39:37 -05:00
Josh Hawkins
cae11cbb86 Add ability to filter based on search type (#13641) 2024-09-09 14:45:19 -05:00
Josh Hawkins
03ff3e639f clarify semantic search and genai docs (#13637) 2024-09-09 10:23:21 -06:00
Nicolas Mowen
f5dbcd5465 Add types to date preview & vod api (#13636)
* Add types to date preview api

* Formatting
2024-09-09 11:03:53 -05:00
Josh Hawkins
f143fceceb UI tweaks (#13633)
* Object lifecycle and semantic search UI tweaks

* prevent console errors for sheet component
2024-09-09 09:33:38 -05:00
Nicolas Mowen
8be139d4d1 Fix thumbnail failure (#13634)
* Fix thumbnail failure

* Formatting

* Fix logic
2024-09-09 09:29:05 -05:00
Nicolas Mowen
2fc58fea81 Add api docs for review api (#13613) 2024-09-07 14:21:38 -05:00
Nicolas Mowen
17901fcfef Fix arm build (#13608) 2024-09-07 09:40:31 -05:00
Blake Blackshear
e7dfbf76bb update plus docs for 0.14 (#13604) 2024-09-07 07:28:28 -05:00
Josh Hawkins
d6b16a7747 Semantic search UI tweaks (#13591)
* Semantic search UI tweaks

* clean up
2024-09-06 14:26:32 -05:00
Josh Hawkins
17fa830851 Use webgl jsmpeg renderer for birdseye (#13592) 2024-09-06 14:26:16 -05:00
Nicolas Mowen
149339a8d9 Install onnxruntime with openvino execution provider (#13587)
* Install onnxruntime with openvino execution provider

* Update requirements-wheels.txt

* Still include openvino
2024-09-06 14:18:48 -05:00
OldTyT
94de29187a docs(third_party_extensions.md): added info about frigate telegram (#13584) 2024-09-06 05:42:21 -06:00
Josh Hawkins
a82c1f303b Clarify decoding and the detect role (#13580) 2024-09-05 20:59:47 -05:00
Josh Hawkins
764cca5a70 Clarify decoding and the detect role (#13579) 2024-09-05 19:47:17 -06:00
Nicolas Mowen
18a6aa1824 Update ffmpeg to 7.0.2 (#13578)
* Update to ffmpeg 7.0

* Reduce CPU by not changing pixel format

* Add basic vulkan support

* Adjust gamma after vaapi change

* Formatting
2024-09-05 18:27:32 -06:00
Josh Hawkins
5c00ed352c Don't modalize the export drawer on iOS to work around time picker bug (#13575) 2024-09-05 12:49:08 -05:00
Josh Hawkins
7e9a7ad49c Add ffprobe button back to camera metrics page (#13572) 2024-09-05 08:51:33 -06:00
Josh Hawkins
fe2fec81ac Improve timeline auto scrolling (#13556)
* Improve timeline auto scrolling

* touch events
2024-09-04 10:48:45 -06:00
Nicolas Mowen
055f0dfc22 Fix birdseye opening and not closing frames (#13553) 2024-09-04 08:25:00 -06:00
Josh Hawkins
ddf9163c47 Implement object lifecycle pane (#13550)
* Object lifecycle pane

* fix thumbnails and annotation offset math

* snapshot endpoint height and format, yaml types, bugfixes

* clean up for new type

* use get_image_from_recording in recordings snapshot api

* make height optional
2024-09-04 07:46:49 -06:00
Nicolas Mowen
e80322dab7 Fix recording cleanup logic again (#13527) 2024-09-03 16:56:26 -05:00
Nicolas Mowen
7626dd239a Fix incorrect recording config access (#13524)
* Fix incorrect access

* Formatting
2024-09-03 16:27:19 -05:00
Nicolas Mowen
9afa1354da Limit shm frame count (#12363)
* Limited shm frame count (#12346)

* Only keep 2x detect fps frames in SHM

* Don't delete previous shm frames in output

* Catch case where images do not exist

* Ensure files are closed

* Clear out all frames when shutting down

* Correct the number of frames saved

* Simplify empty shm error handling

* Improve frame safety

* Add handler logs when frame is None

* Don't fail on cleanup

* Cleanup logging

* Update docs

* Update calculation

* Restore condition

* Fix case where thumbnail is saved without frame

* Adjust debug logs

* Calculate best shm frame count

* Fix shm count calculation

* Catch missing frame

* Formatting

* Clarify docs

* Catch none frame in autotracking
2024-09-03 10:22:30 -06:00
Nicolas Mowen
58a471e466 Fix hardcoded camera name (#13520)
* Fix hardcoded camera name

* Simplify logic
2024-09-03 10:14:30 -06:00
Nicolas Mowen
e66f47bdf6 Cleanup after recordings refactor (#13518)
* Cleanup after recordings refactor

* Fix default retention mode

* Formatting

* Fix review item query

* Default review retention
2024-09-03 08:49:50 -06:00
Nicolas Mowen
21a50cc452 Fix fetching of generated preview video (#13498) 2024-09-02 09:18:58 -05:00
gwmullin
5239790835 Emit an 'active' metric for events to address issue #7667 (#13279)
* Initial implementation of active object counters. Need to clean up a bit more and examine reuse of stationary/active logic in neighboring modules.

* A bit more cleanup for references to active, referencing the tracked object method rather than duplicating logic.

* Minor formatting and readability cleanup

* Update docs with the new active mqtt metric definition.

* Move the check for a change in active status into the code block protected by a false positive check.

* - Add 'active' to the tracked object dictionary, use the previous object for active comparison.

  - I also missed emitting updates when a tracked object is no longer tracked, and added handling for emitting zeros on object types.
2024-09-02 07:24:15 -06:00
Nicolas Mowen
0acbd3d5e8 Refactor recordings retention to be based on review items (#13355)
* Refactor recordings config to be based off of review items

* Update object processing logic for when an event is created

* Migrate to deciding recording retention based on review items

* Refactor recording expiration to be based off of review items

* Remove remainder of recording events access

* Handle migration automatically

* Update version and cleanup

* Update docs

* Clarify docs

* Cleanup

* Target camera config

* Safely access all fields
2024-09-02 07:22:53 -06:00
Josh Hawkins
e3da5ef2d5 Lower onvif timeouts to 10s (#13473) 2024-08-31 16:15:10 -05:00
Martin Weinelt
ecaba82c9d Use escapse string in get_intel_gpu_stats (#13452)
````
frigate/util/services.py:299: SyntaxWarning: invalid escape sequence '\d'
    for result in re.findall('"Video/\d":{[a-z":\d.,%]+}', reading):
````
2024-08-31 10:49:13 -06:00
Nicolas Mowen
921c9de241 Fix preview generation for offline camera (#13449)
* Handle case where camera is offline when generating previews

* Don't rely on slow system

* Simplify checks to rely on other cameras

* Formatting

* Cleanup
2024-08-31 10:48:58 -06:00
Josh Hawkins
6a0b5c3a3f Replace individual storage graphs with combined graph (#13438)
* Replace individual storage graphs with combined graph

* replace underscores with spaces

* fix bar height
2024-08-30 07:56:55 -06:00
Josh Hawkins
a8dcc87019 Warn users when creating large motion masks (#13435) 2024-08-30 07:34:12 -06:00
Josh Hawkins
4ec136cab0 Add camera bandwidth back in storage metrics (#13436) 2024-08-30 07:11:54 -06:00
Nicolas Mowen
cf7718132a Update python deps (#13413) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
939a055d46 Fix mobile scroll behavior (#13201) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
01fa1777ac Fix ZMQ race condition with events (#13198) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
a77436eec3 Add button for downloading full set of logs (#13188) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
c268a126dc Make review detail scrollable on mobile and ensure F+ is enabled (#13119) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
29e86d4eeb Add ability to upload to Frigate+ from review side panel (#13071)
* Add ability to submit to frigate+ from review panel

* Add separator

* Use consistent ID
2024-08-29 20:19:50 -06:00
Nicolas Mowen
9d18061d0f Move plus dialog to separate component 2024-08-29 20:19:50 -06:00
Nicolas Mowen
943114c052 Add support for review information side panel (#13063) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
2cb81ef116 Use review item thumbnail for export (#12998)
* Use review item thumbnail for export

* Formatting
2024-08-29 20:19:50 -06:00
Nicolas Mowen
c16450adc8 Hailo amd64 support (#12820)
* Support building docker image for amd64 and arm64

* Support installations on amd64 and arm64

* Run build in new job

* Update docs
2024-08-29 20:19:50 -06:00
Nicolas Mowen
347d54f388 Chunk timeline deletes (#12900) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
3428baa3fa Fix embeddings failing to start 2024-08-29 20:19:50 -06:00
Nicolas Mowen
4f8066a35a Update version 2024-08-29 20:19:50 -06:00
Nicolas Mowen
04fd05bc7d Notification action (#12742) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
3abf89596a Disable semantic search by default (#12568)
* Disable semantic search by default and don't start processes unless enabled

* Conditionally create embeddings

* Fix typing
2024-08-29 20:19:50 -06:00
Nicolas Mowen
690ee3dc15 Implement support for notifications (#12523)
* Setup basic notification page

* Add basic notification implementation

* Register for push notifications

* Implement dispatching

* Add fields

* Handle image and link

* Add notification config

* Add field for users notification tokens

* Implement saving of notification tokens

* Implement VAPID key generation

* Implement public key encoding

* Implement webpush from server

* Implement push notification handling

* Make notifications config only

* Add maskable icon

* Use zod form to control notification settings in the UI

* Use js

* Always open notification

* Support multiple endpoints

* Handle cleaning up expired notification registrations

* Correctly unsubscribe notifications

* Change ttl dynamically

* Add note about notification latency and features

* Cleanup docs

* Fix firefox pushes

* Add links to docs and improve formatting

* Improve wording

* Fix docstring

Co-authored-by: Blake Blackshear <blake@frigate.video>

* Handle case where native auth is not enabled

* Show errors in UI

---------

Co-authored-by: Blake Blackshear <blake@frigate.video>
2024-08-29 20:19:50 -06:00
Nicolas Mowen
331c882af2 Catch hailo initialization error (#12558) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
b4eb83d892 Fix calendar 2024-08-29 20:19:50 -06:00
spanner3003
4a35573210 Initial support for Hailo-8L (#12431)
* Initial support for Hailo-8L

Added file for Hailo-8L detector including dockerfile, h8l.mk, h8l.hcl, hailo8l.py, ci.yml and ssd_mobilenat_v1.hef as the inference network.

Added files to help with the installation of Hailo-8L dependences like generate_wheel_conf.py, requirements-wheel-h8l.txt and modified setup.py to try and work with any hardware.

Updated docs to reflect Initial Hailo-8L support including oject_detectors.md,  hardware.md and installation.md.

* Update .github/workflows/ci.yml

typo h8l not arm64

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/object_detectors.md

Clarity for the end user and correct uses of words

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/frigate/installation.md

typo

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* update Installation.md to clarify Hailo-8L installation process.

* Update docs/docs/frigate/hardware.md

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update hardware.md add Inference time.

* Oops no new line at the end of the file.

* Update docs/docs/frigate/hardware.md typo

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update dockerfile to download the ssd_modilenet_v1 model instead of having it in the repo.

* Updated dockerfile so it dose not download the model file.

add function to download it at runtime.

update model path.

* fix formatting according to ruff and removed unnecessary functions.

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-08-29 20:19:50 -06:00
Nicolas Mowen
e7fabce4e0 Use grid for searches (#12386) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
feb2c9fc62 Use thumbnails instead of review images for search (#12381) 2024-08-29 20:19:50 -06:00
Jason Hunter
dd7fd16b69 Chroma logs in Frontend (#12131)
* Chroma logs in frontend

* fix lint
2024-08-29 20:19:50 -06:00
Daniel
d93d6262ce Use 127.0.0.1 for chroma (#12135) 2024-08-29 20:19:50 -06:00
Nicolas Mowen
9d7e499adb Semantic Search Frontend (#12112)
* Add basic search page

* Abstract filters to separate components

* Make searching functional

* Add loading and no results indicators

* Implement searching

* Combine account and settings menus on mobile

* Support using thumbnail for in progress detections

* Fetch previews

* Move recordings view and open recordings when search is selected

* Implement detail pane

* Implement saving of description

* Implement similarity search

* Fix clicking

* Add date range picker

* Fix

* Fix iOS zoom bug

* Mobile fixes

* Use text area

* Fix spacing for drawer

* Fix fetching previews incorrectly
2024-08-29 20:19:50 -06:00
Jason Hunter
0d7a148897 reindex events in batches to reduce memory and cpu load (#12124) 2024-08-29 20:19:50 -06:00
Jason Hunter
9e825811f2 Semantic Search API (#12105)
* initial event search api implementation

* fix lint

* fix tests

* move chromadb imports and pysqlite hotswap to fix tests

* remove unused import

* switch default limit to 50

* fix events accidently pulling inside chroma results loop
2024-08-29 20:19:50 -06:00
Jason Hunter
36cbffcc5e Semantic Search for Detections (#11899)
* Initial re-implementation of semantic search

* put docker-compose back and make reindex match docs

* remove debug code and fix import

* fix docs

* manually build pysqlite3 as binaries are only available for x86-64

* update comment in build_pysqlite3.sh

* only embed objects

* better error handling when genai fails

* ask ollama to pull requested model at startup

* update ollama docs

* address some PR review comments

* fix lint

* use IPC to write description, update docs for reindex

* remove gemini-pro-vision from docs as it will be unavailable soon

* fix OpenAI doc available models

* fix api error in gemini and metadata for embeddings
2024-08-29 20:19:50 -06:00
Josh Hawkins
55e1f865d8 Don't allow periods in zone or camera group names (#13400) 2024-08-29 19:58:36 -06:00
Josh Hawkins
3f996cd62c Add portal the live player tooltip (#13389) 2024-08-29 19:58:36 -06:00
Marc Altmann
58a8028485 update go2rtc version in reference config (#13367) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
190ce5ee31 Add tooltip for icons in review event list (#13334) 2024-08-29 19:58:36 -06:00
Blake Blackshear
70aab068fd fix default build (#13321) 2024-08-29 19:58:36 -06:00
Blake Blackshear
617d279419 update actions for release (#13318) 2024-08-29 19:58:36 -06:00
Josh Hawkins
4de088d725 Update discussion templates (#13303)
* Update discussion templates

* camera support go2rtc
2024-08-29 19:58:36 -06:00
Nicolas Mowen
f8fd746678 Fix delayed preview not showing (#13295) 2024-08-29 19:58:36 -06:00
Josh Hawkins
1529ee59fe Fix discussion templates (#13292)
* Fix yaml spacing for discussion templates

* Remove browser question from detectors
2024-08-29 19:58:36 -06:00
Josh Hawkins
19c253b429 Update discussion templates (#13291)
* Revamp support discussion templates

* move text to description

* remove duplicate logs box

* ffprobe on camera support

* longer description on config support
2024-08-29 19:58:36 -06:00
Nicolas Mowen
13bb9dd715 Fix case where user's cgroup says it has 0 cpu cores (#13271) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
9b4602acb3 UI fixes (#13246)
* Fix bad data in stats

* Add support for changes dialog when leaving without saving config editor

* Fix scrolling into view
2024-08-29 19:58:36 -06:00
Nicolas Mowen
e5448110fc Ensure only enabled birdseye cameras are considered active (#13194)
* Ensure only enabled birdseye cameras are considered active

* Cleanup
2024-08-29 19:58:36 -06:00
Nicolas Mowen
4974defe6f Dynamically detect if full screen is supported (#13197) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
65ceadda2b Preview fixes (#13193)
* Handle case where preview was saved late

* fix timing
2024-08-29 19:58:36 -06:00
Josh Hawkins
8b2adb55ed Adjust MSE player playback rate logic (#13164)
* Fix MSE playback rate logic

* don't adjust playback rate if we just started streaming

* memoize onprogress
2024-08-29 19:58:36 -06:00
Nicolas Mowen
58ca44bd15 Fix plus view resetting (#13160) 2024-08-29 19:58:36 -06:00
Josh Hawkins
ef46451b80 Live player fixes (#13143)
* Jump to live when exceeding buffer time threshold in MSE player

* clean up

* Try adjusting playback rate instead of jumping to live

* clean up

* fallback to webrtc if enabled before jsmpeg

* baseline

* clean up

* remove comments

* adaptive playback rate and intelligent switching improvements

* increase logging and reset live mode after camera is no longer active on dashboard only

* jump to live on safari/iOS

* clean up

* clean up

* refactor camera live mode hook

* remove key listener

* resolve conflicts
2024-08-29 19:58:36 -06:00
Josh Hawkins
758b0f9734 Remove dashboard keyboard listener (#13102) 2024-08-29 19:58:36 -06:00
Josh Hawkins
3650000b31 Add shortcut key "r" to mark selected items as reviewed (#13087)
* Add shortcut key "r" to mark selected items as reviewed

* unselect after keypress
2024-08-29 19:58:36 -06:00
Nicolas Mowen
dbd042ca3e Catch case where github sends bad json data (#13077) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
6b9082bdd9 Rename bug report (#13039) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
f9baa3bf20 UI fixes (#13030)
* Fix difficulty overwriting export name

* Fix NaN for score selector
2024-08-29 19:58:36 -06:00
Nicolas Mowen
a75feb7f8f Fix last hour preview (#13027) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
009900b29b Reset recordings when changing the date (#13009) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
dc04cf82d8 Recordings Fixes (#13005)
* If recordings don't exist mark as no recordings

* Fix reloading recordings failing

* Fix mark items not clearing selected

* Cleanup

* Default to last full hour when error occurs

* Remove check

* Cleanup

* Handle empty recordings list case

* Ensure that the start time is within the time range

* Catch other reset cases
2024-08-29 19:58:36 -06:00
Nicolas Mowen
b2c23a367d Hide record switch when disabled (#12997) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
338b59a32e Catch case where recording starts right at end of request (#12956) 2024-08-29 19:58:36 -06:00
Josh Hawkins
07ffd76437 Add pan/pinch/zoom capability on plus snapshots (#12953) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
3eaf9f4011 Catch case where user tries to end definite manual event (#12951)
* Catch case where user tries to end definite manual event

* Formatting
2024-08-29 19:58:36 -06:00
Josh Hawkins
9832831c5e Add confirmation dialog before deleting review items (#12950) 2024-08-29 19:58:36 -06:00
Stavros Kois
d3259c4782 add shortcut and query for fullscreen in live view (#12924)
* add shortcut and query for live view

* Update web/src/views/live/LiveDashboardView.tsx

* Update web/src/views/live/LiveDashboardView.tsx

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update LiveDashboardView.tsx

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-08-29 19:58:36 -06:00
Nicolas Mowen
940c12d9d8 Remove user args from http jpeg (#12909) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
8f2cbe261b Web deps (#12908)
* Update web compnent deps

* Update other web deps
2024-08-29 19:58:36 -06:00
Nicolas Mowen
e86788034d Fix use experimental migrator (#12906) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
4ecc0e15ce Add button to mark review item as reviewed in filmstrip (#12878)
* Add button to mark review item as reviewd in filmstrip

* Add tooltip
2024-08-29 19:58:36 -06:00
Soren L. Hansen
b01ce31903 Fix auth when serving Frigate at a subpath (#12815)
Ensure axios.defaults.baseURL is set when accessing login form.

Drop `/api` prefix in login form's `axios.post` call, since `/api` is
part of the baseURL.

Redirect to subpath on succesful authentication.

Prepend subpath to default logout url.

Fixes #12814
2024-08-29 19:58:36 -06:00
Josh Hawkins
87b69c373a Persist live view muted/unmuted for session only (#12727)
* Persist live view muted/unmuted for session only

* consistent naming
2024-08-29 19:58:36 -06:00
Josh Hawkins
07b3160dff Add right click to delete points in desktop mask/zone editor (#12744) 2024-08-29 19:58:36 -06:00
Josh Hawkins
096e2791f5 Ensure review card icon color for event view is visible in light mode (#12812) 2024-08-29 19:58:36 -06:00
Marc Altmann
9d456ccfcf fix default model for rknn detector (#12807) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
ad5c3741e9 Add camera name to audio debug line (#12799)
* Add camera name to audio debug line

* Formatting
2024-08-29 19:58:36 -06:00
Nicolas Mowen
fe188bd646 Handle case where user stops scrubbing but remains hovering (#12794)
* Handle case where user stops scrubbing but remains hovering

* Add type
2024-08-29 19:58:36 -06:00
Josh Hawkins
f47984818f Ensure review cameras are sorted by config ui order if specified (#12789) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
7b274b6974 Use camera status to get state of camera config (#12787)
* Use camera status to get state of camera config

* Fix spelling
2024-08-29 19:58:36 -06:00
Nicolas Mowen
b1806b0a7c Handle case where sub label was null (#12785) 2024-08-29 19:58:36 -06:00
Nicolas Mowen
ff2e46650c Update version 2024-08-29 19:58:36 -06:00
Nicolas Mowen
69fe6cdc05 Fix iOS export buttons (#12755)
* Fix iOS export buttons

* Use layering instead of z index
2024-08-29 19:58:36 -06:00
Josh Hawkins
b7e0d14b83 Only use dense property on phones for motion review timeline (#12768) 2024-08-29 19:58:36 -06:00
Josh Hawkins
7db6ed9ad5 Use radix css var to limit desktop menu height (#12743) 2024-08-29 19:58:36 -06:00
Josh Hawkins
da0f63f095 Fix large tablet recording view layout (#12753) 2024-08-29 19:58:36 -06:00
cvroque
90221e8c94 Remove duplicated text (#13416) 2024-08-29 09:10:47 -06:00
Josh Hawkins
37680c317c Change wording of offline message to account for broker lwt timeout (#13403) 2024-08-28 09:22:57 -05:00
Josh Hawkins
f4f3cfa911 Don't allow periods in zone or camera group names (#13400) 2024-08-28 06:26:50 -06:00
Josh Hawkins
ca0f6e4c0a Add portal the live player tooltip (#13389) 2024-08-27 19:14:22 -06:00
Josh Hawkins
70ea6fc9a1 Update live view docs with camera firmware settings recommendations (#13370)
* Update live view docs with camera firmware settings recommendations

* video/audio

* capitalization

* Video only cams

* clarify higher iframes

* update wording

* fix wording

* Add note on camera specific page

* change note
2024-08-27 07:00:54 -06:00
Marc Altmann
a7ccabd8f1 update go2rtc version in reference config (#13367) 2024-08-26 15:17:24 -06:00
Nicolas Mowen
453a8d794e Add tooltip for icons in review event list (#13334) 2024-08-25 07:57:10 -05:00
Nicolas Mowen
67e692a7f3 Add edgetpu docs for synology specific issue (#13335) 2024-08-25 07:56:05 -05:00
Blake Blackshear
ce79898cae fix default build (#13321) 2024-08-24 07:44:15 -05:00
Blake Blackshear
bf90daae2b update actions for release (#13318) 2024-08-24 07:25:24 -05:00
ghxstxch
34382ac38e Update cameras.md (#13309) 2024-08-24 06:07:25 -06:00
Josh Hawkins
fdb5d53960 Update discussion templates (#13303)
* Update discussion templates

* camera support go2rtc
2024-08-23 18:05:14 -05:00
Nicolas Mowen
2dc5a7f767 Fix delayed preview not showing (#13295) 2024-08-23 09:51:59 -05:00
Josh Hawkins
65ca3c8fa3 Fix discussion templates (#13292)
* Fix yaml spacing for discussion templates

* Remove browser question from detectors
2024-08-23 07:58:39 -05:00
Josh Hawkins
ff34af2c1f Update discussion templates (#13291)
* Revamp support discussion templates

* move text to description

* remove duplicate logs box

* ffprobe on camera support

* longer description on config support
2024-08-23 06:44:31 -06:00
Nicolas Mowen
e01b6ee76b Fix case where user's cgroup says it has 0 cpu cores (#13271) 2024-08-22 08:06:26 -05:00
Nicolas Mowen
b94b08a33c Add comment about global zones behavior (#13269) 2024-08-22 07:47:53 -05:00
Nicolas Mowen
540d66af57 Update reference config to include motion enabled field (#13255) 2024-08-21 20:10:12 -05:00
Nicolas Mowen
1c7ee5f4e4 UI fixes (#13246)
* Fix bad data in stats

* Add support for changes dialog when leaving without saving config editor

* Fix scrolling into view
2024-08-21 08:19:07 -06:00
Josh Hawkins
a2deeb0d12 Update live player docs (#13245)
* Clarify live modes in 0.14

* change column name

* clarify wording
2024-08-21 08:01:15 -05:00
Peter Riemersma
22fe261dd6 Update cameras.md (#13218) 2024-08-20 13:52:35 -06:00
Nicolas Mowen
d96f76c27f Ensure only enabled birdseye cameras are considered active (#13194)
* Ensure only enabled birdseye cameras are considered active

* Cleanup
2024-08-19 16:01:48 -05:00
Nicolas Mowen
1da934e63c Dynamically detect if full screen is supported (#13197) 2024-08-19 16:01:21 -05:00
Nicolas Mowen
38a8d34ba5 Preview fixes (#13193)
* Handle case where preview was saved late

* fix timing
2024-08-19 10:45:55 -06:00
Josh Hawkins
8e31244fb3 Adjust MSE player playback rate logic (#13164)
* Fix MSE playback rate logic

* don't adjust playback rate if we just started streaming

* memoize onprogress
2024-08-18 12:13:21 -06:00
Nicolas Mowen
3a124dbb84 Fix plus view resetting (#13160) 2024-08-18 07:41:10 -06:00
Josh Hawkins
b44354ad29 Update configuring go2rtc docs to reflect 0.14 changes (#13147) 2024-08-17 15:04:12 -06:00
Josh Hawkins
8c23ede683 Live player fixes (#13143)
* Jump to live when exceeding buffer time threshold in MSE player

* clean up

* Try adjusting playback rate instead of jumping to live

* clean up

* fallback to webrtc if enabled before jsmpeg

* baseline

* clean up

* remove comments

* adaptive playback rate and intelligent switching improvements

* increase logging and reset live mode after camera is no longer active on dashboard only

* jump to live on safari/iOS

* clean up

* clean up

* refactor camera live mode hook

* remove key listener

* resolve conflicts
2024-08-17 12:16:48 -06:00
elreydetoda
3ffbdb35a2 updating HACS installation instructions (#13136) 2024-08-17 06:14:45 -06:00
Josh Hawkins
4133e454c4 Remove dashboard keyboard listener (#13102) 2024-08-15 16:13:11 -05:00
Josh Hawkins
4dce8ff60a Add shortcut key "r" to mark selected items as reviewed (#13087)
* Add shortcut key "r" to mark selected items as reviewed

* unselect after keypress
2024-08-15 09:51:44 -05:00
Nicolas Mowen
2e724291db Catch case where github sends bad json data (#13077) 2024-08-14 20:41:41 -05:00
Emil Sandnabba
0504e9ef79 Update reverse proxy documentation (#13075)
* Cleanup the reverse proxy overview

* Adding a Traefik example

* Adding a note about TLS

* Update docs/docs/guides/reverse_proxy.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/guides/reverse_proxy.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/guides/reverse_proxy.md

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update docs/docs/guides/reverse_proxy.md

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-08-14 15:51:15 -06:00
Nicolas Mowen
f6b61c26ae Rename bug report (#13039) 2024-08-13 14:26:01 -05:00
Nicolas Mowen
1b876bf8d3 UI fixes (#13030)
* Fix difficulty overwriting export name

* Fix NaN for score selector
2024-08-13 10:12:06 -05:00
Nicolas Mowen
b0d42ea116 Fix last hour preview (#13027) 2024-08-13 08:23:46 -06:00
Nicolas Mowen
05bc3839cc Reset recordings when changing the date (#13009) 2024-08-12 15:12:49 -06:00
Nicolas Mowen
281482927a Recordings Fixes (#13005)
* If recordings don't exist mark as no recordings

* Fix reloading recordings failing

* Fix mark items not clearing selected

* Cleanup

* Default to last full hour when error occurs

* Remove check

* Cleanup

* Handle empty recordings list case

* Ensure that the start time is within the time range

* Catch other reset cases
2024-08-12 14:30:16 -06:00
Nicolas Mowen
132a712341 Hide record switch when disabled (#12997) 2024-08-12 08:21:21 -05:00
Nicolas Mowen
b309287087 Add docs for installing Frigate as PWA (#12995)
* Add docs for installing Frigate as PWA

* Add to sidebar
2024-08-12 08:21:02 -05:00
Nicolas Mowen
13d121f443 Catch case where recording starts right at end of request (#12956) 2024-08-11 08:32:17 -05:00
axyzs
e891f2ad6d correct github colab url (#12948) 2024-08-11 07:21:39 -06:00
Josh Hawkins
67ba3dbd8b Add pan/pinch/zoom capability on plus snapshots (#12953) 2024-08-11 07:15:04 -06:00
Nicolas Mowen
4afa7bf4e1 Catch case where user tries to end definite manual event (#12951)
* Catch case where user tries to end definite manual event

* Formatting
2024-08-11 07:32:39 -05:00
Josh Hawkins
77bf710299 Add confirmation dialog before deleting review items (#12950) 2024-08-11 06:25:09 -06:00
Stavros Kois
9b96211faf add shortcut and query for fullscreen in live view (#12924)
* add shortcut and query for live view

* Update web/src/views/live/LiveDashboardView.tsx

* Update web/src/views/live/LiveDashboardView.tsx

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update LiveDashboardView.tsx

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-08-10 10:25:13 -06:00
Nicolas Mowen
99e03576bf Remove user args from http jpeg (#12909) 2024-08-09 16:22:24 -06:00
Nicolas Mowen
78d67484e1 Web deps (#12908)
* Update web compnent deps

* Update other web deps
2024-08-09 16:12:07 -06:00
Nicolas Mowen
e9e86cc5af Fix use experimental migrator (#12906) 2024-08-09 16:59:55 -05:00
Josh Hawkins
9b1fb33ac6 Fix camera group icon name in reference config (#12883) 2024-08-09 08:41:12 -06:00
Nicolas Mowen
70618e93b7 Add button to mark review item as reviewed in filmstrip (#12878)
* Add button to mark review item as reviewd in filmstrip

* Add tooltip
2024-08-09 08:29:35 -05:00
Soren L. Hansen
c84511de16 Fix auth when serving Frigate at a subpath (#12815)
Ensure axios.defaults.baseURL is set when accessing login form.

Drop `/api` prefix in login form's `axios.post` call, since `/api` is
part of the baseURL.

Redirect to subpath on succesful authentication.

Prepend subpath to default logout url.

Fixes #12814
2024-08-09 07:26:26 -06:00
Josh Hawkins
6d9590b4ec Persist live view muted/unmuted for session only (#12727)
* Persist live view muted/unmuted for session only

* consistent naming
2024-08-09 06:46:39 -06:00
Josh Hawkins
33e04fe61f Add right click to delete points in desktop mask/zone editor (#12744) 2024-08-09 06:46:18 -06:00
Josh Hawkins
9f43d10ba7 Ensure review card icon color for event view is visible in light mode (#12812) 2024-08-08 07:54:13 -06:00
Marc Altmann
57503cc318 fix default model for rknn detector (#12807) 2024-08-08 07:54:13 -06:00
Nicolas Mowen
e563692fa2 Add camera name to audio debug line (#12799)
* Add camera name to audio debug line

* Formatting
2024-08-08 07:54:13 -06:00
Nicolas Mowen
9c2974438d Handle case where user stops scrubbing but remains hovering (#12794)
* Handle case where user stops scrubbing but remains hovering

* Add type
2024-08-08 07:54:13 -06:00
Josh Hawkins
54e1bd9eeb Ensure review cameras are sorted by config ui order if specified (#12789) 2024-08-08 07:54:13 -06:00
Nicolas Mowen
8212b66ee0 Use camera status to get state of camera config (#12787)
* Use camera status to get state of camera config

* Fix spelling
2024-08-08 07:54:13 -06:00
Nicolas Mowen
43d2986208 Handle case where sub label was null (#12785) 2024-08-08 07:54:13 -06:00
Nicolas Mowen
f8f7b74792 Update version 2024-08-08 07:54:13 -06:00
Nicolas Mowen
5069072a84 Fix iOS export buttons (#12755)
* Fix iOS export buttons

* Use layering instead of z index
2024-08-08 07:54:13 -06:00
Josh Hawkins
93b81756c6 Only use dense property on phones for motion review timeline (#12768) 2024-08-08 07:54:13 -06:00
Josh Hawkins
4a867ddd56 Use radix css var to limit desktop menu height (#12743) 2024-08-08 07:54:13 -06:00
Josh Hawkins
a347cb5a42 Fix large tablet recording view layout (#12753) 2024-08-08 07:54:13 -06:00
Blake Blackshear
8a099b4ae5 Merge pull request #11419 from blakeblackshear/dev
0.14 Release
2024-08-08 08:43:29 -05:00
Blake Blackshear
80e8930e73 always release from dev builds 2024-08-08 08:25:19 -05:00
Nicolas Mowen
2637541c6c Installation and getting started docs improvements (#12395)
* Add tip banner for quick links

* Add link to getting started guide from installation

* Remove dummy config

* Move tip

* Clarify installation docs

Co-authored-by: Blake Blackshear <blake@frigate.video>

* Update docs/docs/guides/getting_started.md

Co-authored-by: Blake Blackshear <blake@frigate.video>

---------

Co-authored-by: Blake Blackshear <blake@frigate.video>
2024-08-03 08:20:14 -05:00
Jake Angerman
da913d8d31 Add example of single pcie coral (#12446)
* Update object_detectors.md

* Update docs/docs/configuration/object_detectors.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-08-03 06:38:40 -06:00
Nicolas Mowen
88d4b694f8 Fix tall videos from covering height in export page (#12725)
* Fix tall videos from covering height in export page

* Handle mobile landscape
2024-08-02 07:06:15 -06:00
Nicolas Mowen
b28cc45510 Update docs (#12714) 2024-08-01 17:27:15 -06:00
Nicolas Mowen
c0b23ca938 Remove mention of older yolox model (#12711) 2024-08-01 14:33:06 -06:00
Josh Hawkins
8e7b83d2f1 Display messages when no events exist (#12694)
* Display message in desktop events list when no events exist

* Add message for when no events are found on plus view

* validating check

* activity indicator check

* clarify error message
2024-07-31 14:08:07 -06:00
Nicolas Mowen
599dd7eecb Build libusb for coral compatibility (#12681) 2024-07-30 16:32:32 -06:00
Nicolas Mowen
84348350fe apply iOS fix to safari (#12663) 2024-07-29 11:34:45 -05:00
Nicolas Mowen
7d03d99852 Show skeleton when live filmstrip items are loading (#12660) 2024-07-29 07:52:22 -05:00
Nicolas Mowen
7c39b176ac Limit preview threads (#12633) 2024-07-26 09:16:45 -05:00
Nicolas Mowen
4c2e6f75a2 Fix frigate failing when no config is defined (#12611) 2024-07-25 12:03:52 -05:00
Josh Hawkins
81139e8f47 Add filmstrip video/image toggle to general settings (#12608) 2024-07-25 08:34:39 -05:00
Nicolas Mowen
cea0596cf5 Docs updates (#12607) 2024-07-25 07:14:22 -06:00
Josh Hawkins
51a1526146 loitering_time can be zero (#12599) 2024-07-24 14:25:01 -05:00
Nicolas Mowen
b4db07d7a5 Fix perview serialization (#12597) 2024-07-24 12:29:51 -05:00
Nicolas Mowen
5c15659a34 Ensure that persisted state is kept in sync (#12596) 2024-07-24 11:17:32 -06:00
Nicolas Mowen
1bd3285679 Use pickle for config objects (#12594) 2024-07-24 10:37:29 -05:00
Josh Hawkins
6de426c697 Prevent pandas overflow and runtime errors from division by zero/NaN (#12591)
* Prevent pandas overflow and runtime errors from division by zero/NaN

* remove pysqlite3
2024-07-24 08:58:42 -06:00
Nicolas Mowen
d28ad0f0c8 Use JSON instead of pickle for serialization (#12590) 2024-07-24 08:58:23 -06:00
Nicolas Mowen
47aecff567 UI Tweaks (#12571) 2024-07-23 09:34:38 -05:00
Nicolas Mowen
524f03a650 Persist show reviewed locally so it maintains state (#12560)
* Persist show reviewed locally so it maintains state

* fix

* Theming fixes
2024-07-22 17:55:39 -05:00
Nicolas Mowen
68e6ffdfef UI fixes (#12542)
* Don't require previews to show motion ui

* Fix recording text to match hls player logic
2024-07-21 14:14:59 -05:00
Nicolas Mowen
29345c429a Fix plus sorting button (#12513) 2024-07-19 09:08:50 -05:00
jameson_uk
2cdd483126 Update automation (#12487)
`data_template` has been deprecated for sometime in HA an no longer works.  This should just be `data`
2024-07-18 16:30:24 -06:00
Nicolas Mowen
f2c46408c4 Add more icons to event icon types (#12507) 2024-07-18 16:11:05 -05:00
Josh Hawkins
e5dc476c1e Disable web assembly for jsmpeg player (#12502) 2024-07-18 10:50:30 -05:00
Josh Hawkins
eb2363b93d Reset preferred live modes to defaults on window visibility change (#12499) 2024-07-18 07:22:31 -06:00
Josh Hawkins
7bfebd5b61 Use canvas2d renderer for jsmpeg player (#12498) 2024-07-18 06:59:12 -06:00
Josh Hawkins
6addf4d88b User-selectable weekday start (Sunday/Monday) for review calendar (#12491) 2024-07-17 11:38:12 -05:00
Nicolas Mowen
c56e7e7c6c UI fixes (#12490)
* Improve export handling when errors occur

* Fix mobile zooming

* Handle recordings buffering

* Cleanup

* Url encode export name

* Start with actual name in input

* Fix buffering
2024-07-17 07:39:37 -06:00
Josh Hawkins
78c15f3020 Prevent onPlaying from being called repeatedly in jsmpeg player (#12482) 2024-07-16 13:40:11 -06:00
Nicolas Mowen
30f0f73a4e Add camera name to recordings log (#12480)
* Add camera name to recordings log

* Formatting
2024-07-16 11:56:09 -05:00
Nicolas Mowen
e9da453190 Don't allow backwards recordings (#12477) 2024-07-16 10:04:33 -05:00
Nicolas Mowen
91f62cf8ce Fix ui config migration (#12476) 2024-07-16 08:45:11 -05:00
Josh Hawkins
58dbbd5d29 Use refs for proper js closures in the liveReady timeout (#12464) 2024-07-16 05:50:58 -06:00
Josh Hawkins
5c90f7dce7 Check if camera is active before disabling liveReady (#12461) 2024-07-15 15:52:34 -06:00
Nicolas Mowen
b7cf5f4105 Fix handling of default group (#12459) 2024-07-15 11:18:01 -05:00
Josh Hawkins
c850604931 Fix flashing of previous still image when live player stops (#12458) 2024-07-15 09:38:59 -06:00
Nicolas Mowen
82d2910039 Fix camera filtering logic (#12457)
* Fix camera filtering logic

* Cleanup

* Simplify and consider birdseye only group in logic

* Don't add filter when group is birdseye only
2024-07-15 09:34:41 -06:00
Nicolas Mowen
5066fa369d Filter alerts by camera group (#12456) 2024-07-15 07:35:41 -05:00
Josh Hawkins
3afd77cbe0 No need to check for h264 onvif profile (#12444) 2024-07-14 13:29:49 -05:00
Josh Hawkins
093201a1cc Update docs for clarity on review items (#12441) 2024-07-14 11:12:26 -06:00
Blake Blackshear
6102e9e5ea Merge remote-tracking branch 'origin/master' into dev 2024-07-13 14:52:42 -05:00
Blake Blackshear
91215a1406 update link to info on plus (#12434) 2024-07-13 14:49:54 -05:00
Nicolas Mowen
a4eb435f1a Improve safari image scrolling performance (#12429)
* Don't set z-height on iOS

* More z-index cleanup
2024-07-13 11:54:24 -05:00
Nicolas Mowen
843d301950 Don't detach media (#12421) 2024-07-12 15:29:42 -06:00
Nicolas Mowen
d08fe170f2 Recordings improvements (#12417) 2024-07-12 15:17:38 -06:00
Josh Hawkins
51153af944 Attempt to support zoom-only onvif cams (#12415)
* Attempt to support zoom-only onvif cams

* don't skip ptz configuration
2024-07-12 11:01:52 -06:00
Josh Hawkins
e7ec014502 Ensure detections are cleared when limit box is unchecked (#12412) 2024-07-12 09:07:01 -06:00
Josh Hawkins
2ebd2dfcc7 Display activity indicators when debug and mask/zone images load (#12411) 2024-07-12 09:02:43 -05:00
Josh Hawkins
aaafd63b94 Move review classification settings to camera settings view (#12410)
* Camera settings view for alerts/detections

* flxes, beautifying, zone renaming, clean up

* replace underscores with spaces in zone names

* replace underscores with spaces in labels
2024-07-12 07:42:53 -06:00
Nicolas Mowen
a361372182 Update review docs (#12401) 2024-07-12 07:36:28 -06:00
Josh Thorpe
8f51f7b4c4 strip whitespaces when loading secrets (#12393)
* strip whitespaces when loading secrets

* formatting
2024-07-12 07:36:15 -06:00
Nicolas Mowen
e416e44998 Simplify ws updating (#12390)
* Simplify ws updating

* Simplify return values
2024-07-11 09:25:33 -06:00
Josh Hawkins
fe4a737421 Fix debug camera image not updating when loading (#12394) 2024-07-11 09:10:37 -06:00
Josh Hawkins
4ee8557061 Fix linter warnings on color order (#12389) 2024-07-11 08:22:02 -05:00
Nicolas Mowen
88e1d56799 Update Web deps (#12388)
* Update radix ui

* Update vite

* More ui deps

* Update typscript

* Update react router
2024-07-11 08:09:35 -05:00
Nicolas Mowen
40be915061 Fix review update causing api spam (#12387) 2024-07-11 08:09:11 -05:00
Josh Hawkins
0d7ee7a87a Clickable logo on desktop sidebar and useMatch for camera group visibility (#12379) 2024-07-10 09:28:05 -06:00
Nicolas Mowen
baf209f257 Docs tweaks (#12375)
* Add explanation of bounding box colors

* Add FAQ about offline camera
2024-07-10 06:34:03 -06:00
Josh Hawkins
c2824d153e Theme updates (#12373)
* remove hideous and ugly themes

* incorporate dei into ui design

* neutral as a theme color

* high contrast theme adjustments

* color tweaks
2024-07-10 07:04:02 -05:00
Josh Hawkins
d2f88491b1 Various UI tweaks and changes (#12364) 2024-07-09 13:36:55 -06:00
stephendb
aacb8c84e0 Bug fix for ONVIF cameras, adjust_time parameter added (#12352)
* adds adjust_time which allows users to fix an issue with onvif authentication where time is not syncrhonized

* updated adjust_time to ignore_time_mismatch to make it clearer what this option does

* adds ignore_time_mismatch to the reference.md and adds a line about the security risk this can introduce as well as the recommendation to setup NTP for both ends.

* fix format error

* happy now linter?

* white space

* Update docs/docs/configuration/reference.md

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

---------

Co-authored-by: Stephen Butler <stephen.butler@ni.com>
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-07-09 13:00:47 -06:00
Nicolas Mowen
f44df9fe61 Revert "Limited shm frame count (#12346)" (#12362)
This reverts commit 34812b7439.
2024-07-09 11:49:08 -05:00
Nicolas Mowen
34812b7439 Limited shm frame count (#12346)
* Only keep 2x detect fps frames in SHM

* Don't delete previous shm frames in output

* Catch case where images do not exist

* Ensure files are closed

* Clear out all frames when shutting down

* Correct the number of frames saved

* Simplify empty shm error handling

* Improve frame safety
2024-07-09 06:44:53 -06:00
Josh Hawkins
0ce596ec8f UI tweaks (#12297)
* Use full resolution aspect for main camera style in history view

* Only check for offline cameras after 60s of uptime

* only call onPlaying when loadeddata is fired or after timeout

* revert to inline funcs

* Portal frigate plus alert dialog

* remove duplicated logic

* increase onplaying timeout

* Use a ref instead of a state and clear timeout in AutoUpdatingCameraImage

* default to the selected month for selectedDay

* Use buffered time instead of timeout

* Use default cursor when not editing polygons
2024-07-08 07:14:10 -06:00
ubawurinna
2ea1d34f4f OpenVino - Error clarification for compile_model function (#12304)
* Error clarification for openvino's compile_model function

* run ruff format

---------

Co-authored-by: ubawurinna <you@example.com>
2024-07-08 08:13:33 -05:00
Josh Hawkins
a0741aa7b1 Remove matplotlib and generate color palette to mimic matplotlib's colors (#12327) 2024-07-07 12:53:00 -06:00
Josh Hawkins
188a7de467 Update export docs (#12288)
* Update exporting docs

* add timelapse clarification
2024-07-04 05:32:07 -06:00
Josh Hawkins
1f4ca32e8c Add exports message and default to webrtc on < iOS 17.1 (#12281) 2024-07-03 08:44:25 -05:00
Josh Hawkins
784b701cc5 Apply landscape margin to ptz controls on mobile only (#12272) 2024-07-02 18:14:38 -05:00
Josh Hawkins
be9e606ae4 Ensure MSE onPlaying always gets called, even if loadeddata never fires (#12271)
* Ensure MSE onPlaying always gets called, even if loadeddata never fires

* Call handleLoadedMetadata too if not playing yet
2024-07-02 16:48:38 -06:00
Steven Conaway
fe9a3c9205 docs(go2rtc): troubleshooting improvements (#12192) 2024-07-02 07:52:32 -06:00
Nicolas Mowen
012aa63571 Enforce minimum value for mqtt stats update (#12253) 2024-07-01 17:08:14 -05:00
Nicolas Mowen
ef7846bb41 Update ffmpeg source (#12251)
* Revert "Use latest 5.1 ffmpeg update (#12243)"

This reverts commit 93e08688be.

* Revert "Change qsv device arg to standard hwaccel arg (#12249)"

This reverts commit 56b4a551dc.

* Use different repo for build
2024-07-01 15:46:40 -06:00
Josh Hawkins
6948702891 Add fullscreen button to the default live grid on desktops (#12250) 2024-07-01 13:00:53 -06:00
Nicolas Mowen
56b4a551dc Change qsv device arg to standard hwaccel arg (#12249) 2024-07-01 12:57:04 -06:00
Nicolas Mowen
93e08688be Use latest 5.1 ffmpeg update (#12243)
* Use latesat 5.1 ffmpeg update

* Fix arm build
2024-07-01 11:08:36 -05:00
Josh Hawkins
0ed7e278eb Re-center ptz controls in mobile landscape and prevent text selection (#12242) 2024-07-01 09:53:36 -06:00
Josh Hawkins
b30fecbd28 Use cache key for mask/zone editor image (#12232) 2024-07-01 09:02:56 -06:00
Josh Hawkins
f050c7b37d Use camera name instead of stream_name for jsmpeg players (#12219) 2024-06-30 11:06:03 -06:00
Josh Hawkins
f9e1ad253f Check websocket readyState for disconnect and fix firefox pip (#12216) 2024-06-30 06:04:45 -06:00
Josh Hawkins
f0159bf41e Fix jsmpeg player flickering (#12213) 2024-06-29 17:45:28 -06:00
Nicolas Mowen
21a777ab45 Fix nginx 5000 template (#12210) 2024-06-29 18:36:24 -05:00
Nicolas Mowen
18b8e19847 Fix audio model download again (#12207)
* Fix audio model download again

* Update Dockerfile
2024-06-29 12:55:55 -06:00
Josh Hawkins
53a2a865f1 Live player fixes and improvements (#12202)
* Live player fixes and improvements

* remove comment

* Simplify wording
2024-06-29 09:02:30 -06:00
Nicolas Mowen
48a87b16b8 Fix yamnet model download (#12200) 2024-06-29 09:35:34 -05:00
Nicolas Mowen
46c3ef8c6b Nginx config tweaks (#12174)
* Change auth port and remove ipv6

* Add docs for nginx bind mount

* Consolidate listen statements

* Update port in docs

* Fix typing
2024-06-29 07:18:40 -06:00
Steven Conaway
94b1350c9d config reference: add note about birdseye>layout>scaling_factor (#12190) 2024-06-28 15:34:15 -06:00
Nicolas Mowen
bfbacee7b5 Quick fix (#12153)
* Use list for zones to keep chronological order

* Replace when changing playbackRate
2024-06-25 07:38:37 -05:00
On Freund
c3455518c2 Update TLS docs with certbot instructions (#12141)
* Update tls.md

Update TLS docs with certbot instructions

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-06-24 18:06:23 -05:00
Nicolas Mowen
00e235867a Downgrade go2rtc (#12139) 2024-06-24 08:26:32 -05:00
Nicolas Mowen
88046ebd15 Fix review items (#12126) 2024-06-23 18:52:02 -05:00
Nicolas Mowen
abc1ecfb60 Show correct previous state when updating for end (#12122)
* Show correct previous state when updating for end

* remove log

* Formatting
2024-06-23 08:45:10 -05:00
Nicolas Mowen
9bbb88cdcb Fix left swipe on preview (#12104)
* Fix left swipe

* Simplify
2024-06-21 16:06:40 -05:00
Nicolas Mowen
c867d90f50 Add reviews topic to MQTT docs (#12097) 2024-06-21 11:43:52 -05:00
Nitin Gupta
1129a2aba4 Added FAQ entry for viewing logs (#12088) 2024-06-21 10:20:45 -06:00
Nicolas Mowen
3410290b45 Fix preview failing on cameras with - in name (#12093) 2024-06-21 07:33:20 -06:00
Nicolas Mowen
b34be991bd Simplify zone objects example (#12086) 2024-06-20 21:06:42 -05:00
Nicolas Mowen
73755e9777 Auto focus user field for login (#12083) 2024-06-20 11:37:54 -05:00
Nicolas Mowen
c871bebee6 Fix export timing (#12080) 2024-06-20 07:25:02 -06:00
Josh Hawkins
a60ffe06ac Prevent ptz keyboard shortcuts from reopening presets menu (#12079) 2024-06-20 07:24:50 -06:00
Josh Hawkins
9f81ce2876 Only close MSE websocket when it's already open (#12078) 2024-06-20 06:03:14 -06:00
Josh Hawkins
5c33cdba4e Timeline performance improvements (#12070)
* Use intersection observer for timeline segments

* only render when visible
2024-06-19 18:14:32 -05:00
Nicolas Mowen
e9cdef9f25 fix case where camera is disabled and has no previews (#12066)
* fix case where camera is disabled and has no previews

* Maintain slow loading behavior
2024-06-19 12:51:19 -06:00
Nicolas Mowen
d01457e64d Fix showing loading indicator when first loading a camera without previews (#12064) 2024-06-19 08:52:45 -06:00
Nicolas Mowen
c72d304515 Update go2rtc (#12063) 2024-06-19 08:46:23 -06:00
Sam Wright
10c1f7ead4 Update web readme (#12062)
* Update web readme

* Update /web readme

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Sam Wright <sam@sams-mbp.lan>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-06-19 08:11:51 -06:00
Josh Hawkins
7b57a66d45 Various UI tweaks (#12061) 2024-06-19 06:09:49 -06:00
Nicolas Mowen
767033e4d8 Treat meta key same as ctrl (#12051) 2024-06-18 20:26:00 -05:00
Nicolas Mowen
e6790d9a6a Add ability to select all on desktop (#12044)
* Add ability to select all review items

* Refactor keybaord listener
2024-06-18 09:32:17 -05:00
Marc Altmann
4bca405e29 fix key error for custom models (#12042) 2024-06-18 07:40:54 -06:00
Nicolas Mowen
bdda89b5e2 Fix case where S6 timestamp is missing (#12040) 2024-06-18 08:07:28 -05:00
Josh Hawkins
2cbc336bc0 Memoize onPlaying and only instantiate one jsmpeg player (#12033) 2024-06-17 17:10:41 -06:00
Josh Hawkins
6c107883b5 Small jsmpeg and mse player fixes (#12032) 2024-06-17 14:54:14 -06:00
Nicolas Mowen
4635e64b2e Use api path to determine type (#12031)
* Use api path to determine type

* Use in both cases

* Fix extension parsing
2024-06-17 14:53:35 -06:00
Nicolas Mowen
5b60785cca Increase resolution for mobile viewing (#12025) 2024-06-17 12:35:36 -05:00
Nicolas Mowen
ef304e6f7f Set image height to make bandwidth usage lower (#12024) 2024-06-17 08:21:51 -06:00
Nicolas Mowen
24770148a7 Don't fail when preview restore fails (#12022)
* Don't fail when preview restore fails

* Cleanup
2024-06-17 08:56:24 -05:00
Nicolas Mowen
ba6fc0fdb3 UI Tweaks (#12002)
* Adjust review padding

* Fix mse check

* Don't fail when cpu property is missing

* ignore lines without any spaces
2024-06-17 06:19:16 -06:00
Josh Hawkins
89a478ce0a Use modal on dropdowns for mobile only (#11993) 2024-06-16 13:58:28 -05:00
Blake Blackshear
f1bb797fe0 enable tls by default if undefined (#11994) 2024-06-16 07:55:28 -05:00
Miguel Angel Nubla
e208241eea Fix X-Proxy-Secret header passthrough (#11984) 2024-06-16 05:53:02 -05:00
Miguel Angel Nubla
02af1b0ac7 Fix header auth (#11985) 2024-06-16 05:52:17 -05:00
Nicolas Mowen
3c12872a56 Update template to include all detector types (#11981)
* Change from coral to general detector dropdown

* Update camera-support.yml

* Update config-support.yml

* Update general-support.yml
2024-06-15 15:26:09 -05:00
Josh Hawkins
4e5a6eb1c8 Consolidate onvif camera recommendations in docs (#11972) 2024-06-15 08:02:18 -05:00
Josh Hawkins
5617fbbcb1 Optional proxy in config (#11973) 2024-06-15 08:01:19 -05:00
Blake Blackshear
15e2df1e5c set shortest edge to preview height (#11971) 2024-06-15 06:42:23 -05:00
Alex Yao
0d862d6aa8 Show failure exception message (#11964) 2024-06-14 20:34:14 -05:00
Blake Blackshear
9ceffeb191 split out proxy from auth (#11963)
* split out proxy from auth

* update documentation

* fixup auth mode check
2024-06-14 18:02:13 -05:00
Nicolas Mowen
b49cda274d Fix calendar selection (#11959) 2024-06-14 12:14:32 -05:00
Marc Altmann
2934c7817d Update FFmpeg for Rockchip (#11952) 2024-06-14 07:25:33 -05:00
Blake Blackshear
4078a147ef Merge remote-tracking branch 'origin/master' into dev 2024-06-14 06:45:21 -05:00
Blake Blackshear
1cb5dcb7dc clarify vaapi vs qsv (#11954) 2024-06-14 06:44:22 -05:00
Blake Blackshear
7aec8222fc clarify model id (#11953) 2024-06-14 06:42:53 -05:00
Blake Blackshear
30e1969fad clarify plus models (#11951) 2024-06-14 05:15:19 -06:00
Nicolas Mowen
a7da468b97 Manually set current time when selecting event (#11948)
* Manually set current time when selecting event

* Make it clear which camera has no preview

* Make it clear which camera has no preview

* Format camera name
2024-06-13 19:00:41 -05:00
Blake Blackshear
1a0d9e10d7 clarifications for proxy auth mode (#11947) 2024-06-13 16:13:55 -06:00
Nicolas Mowen
9514a3d089 UI tweaks (#11940)
* Enforce events must have snapshots for frigate+

* Open docs links in separate tabs

* Reload after restart to the baseUrl
2024-06-13 16:11:25 -06:00
Josh Hawkins
349b27b764 Draggable grid fixes (#11944)
* Use globals on grid for resizing/dragging flags

* remove unneeded useeffect
2024-06-13 13:11:48 -06:00
Nicolas Mowen
e56ce993df UI Tweaks (#11931)
* Show number of items instead of dot

* Don't call error when connection has been closed on purpose

* Use motion icon for motion

* Show text on tablets as well
2024-06-13 09:45:07 -05:00
Nicolas Mowen
3e1861e2ce Correctly update segment data (#11922) 2024-06-12 15:48:54 -06:00
Josh Hawkins
187d98a153 Ensure uri components are decoded (#11920) 2024-06-12 16:03:00 -05:00
Josh Hawkins
2d4d1584fd Activity indicator for alerts/detections count when loading (#11914)
* Activity indicator for alerts/detections count when loading

* Return zeros if summary is unavailable
2024-06-12 12:30:22 -06:00
Josh Hawkins
c75fc40833 Activity indicator whenever preferred live mode changes (#11913) 2024-06-12 11:36:11 -06:00
Felipe Santos
e3c8901549 Fix cpu count when process name includes the word processor (#11911) 2024-06-12 08:03:27 -06:00
Nicolas Mowen
6978140492 Copy review data so there is a diff (#11896) 2024-06-11 18:05:20 -05:00
Josh Hawkins
272a21ffab Add scrollbar class to preview row/column (#11890) 2024-06-11 13:45:45 -05:00
Josh Hawkins
a8e901b63c UI fixes (#11883)
* Keep as optional prop

* put zones inside of scrollable container
2024-06-11 09:05:50 -06:00
Josh Hawkins
bb359f67a4 Review UI improvements (#11882) 2024-06-11 09:46:05 -05:00
Nicolas Mowen
c9d253a320 Review improvements (#11879)
* Update segment even when number of active objects is the same

* add score to frigate+ chip

* Add support for selecting zones

* Add api support for filtering on zones

* Adjust UI

* Update filtering logic

* Clean up
2024-06-11 08:19:17 -06:00
Blake Blackshear
b3eab17f2c just check for secret file specifically (#11877)
* just check for secret file specifically

* add josh to funding
2024-06-11 06:53:12 -06:00
Nicolas Mowen
962d213699 UI changes (#11863)
* Delay live ready being dropped

* Handle case of removed camera
2024-06-10 20:20:58 -05:00
Josh Hawkins
18d561da0e Live player fixes and improvements (#11855)
* Only set stalled error when player is visible

* Show activity indicator before live player starts playing

* remove comment

* keep gradients when still image is showing

* fix chips

* red dot and outline
2024-06-10 17:24:25 -06:00
Blake Blackshear
30b86271ea move clip.mp4 backend to clips folder (#11834)
* move clip.mp4 backend to clips folder

* improve caching

* fix check
2024-06-09 13:45:26 -05:00
Josh Hawkins
5f3c35209d Prevent editing of object mask type on existing mask (#11829) 2024-06-09 06:28:38 -06:00
Julien Ehrhart
2535519830 Update HA integration doc with image entities following #548 (#11261) 2024-06-09 06:44:27 -05:00
Blake Blackshear
f4dd3e44b6 update images in readme 2024-06-08 15:37:16 -05:00
Nicolas Mowen
11babb9509 Remove mention of recordings timeline object debugging (#11820) 2024-06-08 09:00:24 -06:00
Josh Hawkins
e1bedf30bf Make sure camera is always set in settings (#11812) 2024-06-07 13:34:29 -06:00
Josh Hawkins
859682c8d1 Change breakpoint for desktop motion review columns (#11808) 2024-06-07 09:40:32 -06:00
Josh Hawkins
804edceec2 Retain 3 columns on desktop motion review (#11805) 2024-06-07 06:51:09 -06:00
Josh Hawkins
9f181014a1 UI tweaks (#11795)
* Prevent "undefined" from being displayed in searchParams string

* Show message for no motion data

* Use theme colors for no preview found divs
2024-06-07 05:57:15 -06:00
Blake Blackshear
4313fd97aa Adds support for YOLO-NAS in OpenVino (#11645)
* update onnxruntime

* support for yolo-nas in openvino

* cleanup notebook

* update docs

* improve docs

* handle AUTO issue and update docs
2024-06-07 05:52:08 -06:00
Blake Blackshear
4e569ad644 Update deps (#11799)
* web deps

* python deps
2024-06-07 05:50:45 -06:00
Blake Blackshear
b4384a1be3 Shutdown hang (#11793)
* intentionally handle queues during shutdown and carefully manage shutdown order

* more carefully manage shutdown to avoid threadlocks

* use debug for signal logging

* ensure disabled cameras dont break shutdown

* typo
2024-06-06 18:54:38 -05:00
Josh Hawkins
5b42c91a91 Compare timestamps instead of datetimes when exporting (#11790) 2024-06-06 14:34:31 -06:00
Josh Hawkins
926d394b2f Ensure datetime comparison is the same (native vs aware) (#11789) 2024-06-06 14:10:46 -06:00
Josh Hawkins
fc5a926892 Ensure export thumbnail datetime is UTC (#11786) 2024-06-06 13:18:42 -06:00
Josh Hawkins
d2787d4308 Change debug message about deleting db entries to warning (#11780) 2024-06-06 09:16:28 -06:00
Josh Hawkins
8cc170f027 Draggable grid layout bugfixes (#11777)
* Maintain aspect ratio when overdragging

* add existing x value

* Better handle portrait and wide cam aspect ratios
2024-06-06 06:26:02 -06:00
Felipe Santos
53fa64fd14 Ensure nginx worker processes respects docker limits (#11769)
* Ensure nginx worker processes respects docker limits

* Update get_cpus.sh revision

* Add get_cpus.sh functionality inline to nginx/run
2024-06-05 13:43:22 -06:00
Josh Hawkins
8c96dfe1d1 Some small layout tweaks for portrait cams and motion review (#11766)
* Some small layout tweaks for portrait cams and motion review

* spans

* fix desktop
2024-06-05 09:53:17 -05:00
Ramūnas Dronga
36ae42a011 fix: remove contradictory ffmpeg param and missing param (#11752) 2024-06-04 14:19:37 -06:00
Nicolas Mowen
0181d1e377 Don't show preview for birdseye (#11749)
* Don't show preview for birdseye

* Retry ws connection on error

* Flex wrap cameras labels
2024-06-04 14:00:04 -06:00
Josh Hawkins
3f0a954856 Try webrtc when mse fails with decoding error (#11745)
* Try webrtc if enabled and mse fails with decoding error

* default to jsmpeg if webrtc times out

* check for mic first
2024-06-04 09:11:32 -06:00
Nicolas Mowen
2875e84cb5 UI Fixes (#11742)
* Allow deleting failed in progress exports

* Fix comparison and preview retrieval

* Fix stretching of event cards

* Reset edit state when group changes

* Allow specifying group
2024-06-04 09:10:19 -06:00
Jason Hunter
7917bf55ff Fix unclean shutdown of ZMQ (#11740) 2024-06-04 06:39:34 -06:00
Nicolas Mowen
ea0292b911 Ensure review padding is consistently applied (#11728) 2024-06-03 17:10:39 -06:00
Josh Hawkins
e6d1ad0ac5 Theme scrollbars with tailwind-scrollbar (#11723) 2024-06-03 12:43:30 -06:00
reidprichard
9808ff64e7 Update authentication.md to note port 8080 vs 5000 (#11722)
* Update authentication.md to note port 8080 vs 5000

* Update docs/docs/configuration/authentication.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-06-03 11:53:59 -06:00
Josh Hawkins
f65ddccd6e Ensure debug switches match loaded options (#11721) 2024-06-03 08:51:23 -06:00
Nicolas Mowen
b763754723 fix duplicate id in bug report (#11718) 2024-06-03 08:00:29 -06:00
Nicolas Mowen
d5dafffc39 Fix bug template (#11716)
* Update bug-link.yml

* Delete .github/ISSUE_TEMPLATE/bug-link.yml

* Use existing template
2024-06-03 08:19:16 -05:00
Nicolas Mowen
bd7c575f26 Add bug template to issues (#11712)
* Add bug template to issues

* Delete .github/ISSUE_TEMPLATE/bug_report.yml

* Create bug-report.yml

* Create bug-link.yml
2024-06-03 07:42:47 -05:00
Josh Hawkins
13f250f630 Use valid/unique css identifier for jsmpeg canvas elements (#11704) 2024-06-03 05:39:19 -06:00
Marc Altmann
7a4eb0b37c Add coco-80 labelmap and update FFmpeg for Rockchip (#11695)
* add coco-80 labelmap and update ffmpeg

* Update docs/docs/configuration/object_detectors.md

---------

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>
2024-06-02 20:47:26 -05:00
Josh Hawkins
1e80342c41 UI tweaks and bugfixes (#11692)
* UI tweaks and bugfixes

* fix linter complaints in unmodified files
2024-06-02 12:00:59 -05:00
Blake Blackshear
7031c47fb2 fix tempio install for arm64 (#11691) 2024-06-02 08:47:11 -05:00
Blake Blackshear
e431031112 improve tls implementation (#11690)
* improve tls implementation

* update docs
2024-06-02 06:48:28 -06:00
Sergei
379061f847 Typo on edgetpu.md (#11686)
Added a missing bracket.
2024-06-02 05:22:55 -06:00
Josh Hawkins
beefc51361 container for birdseye aspect and auto width for mobile time pill (#11685) 2024-06-01 21:13:37 -06:00
Blake Blackshear
bccffe6670 TLS support (#11678)
* implement self signed cert and monitor/reload

* move go2rtc upstream to separate file

* add directory for ACME challenges

* make certsync more resilient

* add TLS docs

* add jwt secret info to docs
2024-06-01 10:29:46 -05:00
Nicolas Mowen
8418b65f34 Fix path containing too many / (#11680) 2024-06-01 08:24:20 -05:00
Soren L. Hansen
6e53c109b6 feat: apply ingress path to app paths (#11677)
When serving Frigate at a subpath, the paths that show in the URL bar
and that wind up in your browser history are anchored at the web root.
I.e. you go to `https://example.com/frigate/`, it changes to
`https://example.com/`, and clicking around works as expected, but the
`frigate/` prefix is gone.

It's confusing if you don't know that the URL's are entirely virtual.
Also, your browser history is useless, since the URL's point to e.g.
`https://example.com/#kitchen`, but visiting that URL will not hit
`/frigate/` at all.

Most of the work is already done. Nginx injects javascript to set
`window.baseURL` based on the X-Ingress-Path header. This change passes
that to BrowserRouter, so that it'll be part of the URL's it shows.

Fixes #4526
2024-06-01 07:08:01 -06:00
Blake Blackshear
7b99bbfd28 Update deps (#11679)
* update web deps

* update actions

* automatic stable tag publishing

* python deps

* typo
2024-06-01 06:39:05 -06:00
Nicolas Mowen
8179278bfa Don't fail if user has bind mounted nginx config (#11671) 2024-06-01 06:19:54 -05:00
Nicolas Mowen
758df09da3 Handle error when live view stalls (#11665)
* Handle error when live view stalls

* Manually calculate buffer timeout

* Formatting
2024-05-31 08:52:42 -05:00
Josh Hawkins
a3d116e70e stay in fullscreen when navigating to a camera (#11666) 2024-05-31 07:58:33 -05:00
Josh Hawkins
8c325801ef fix race where camera change effect sometimes was called after layout building (#11656) 2024-05-30 14:17:00 -06:00
Tom B
35946d332d Fix Statusbar rendering NaN% for unsupported GPUs (#11655) 2024-05-30 13:10:24 -06:00
Nicolas Mowen
142641b387 Adjust nginx proc count based on available CPUs (#11653)
* Restrict nginx to 4 processes if more are available

* Fix bash

* Different sed structure

* Limit ffmpeg thread counts for secondary ffmpeg processes

* Add up / down keyboard shortcut
2024-05-30 12:34:01 -05:00
Josh Hawkins
402c16e7df don't sleep mobile devices when fullscreen (#11652) 2024-05-30 09:37:08 -06:00
Nicolas Mowen
3e6b8c23bc Update dialog sizing for plus dialog (#11650) 2024-05-30 09:26:15 -05:00
Nicolas Mowen
1c5e7ebb48 UI Fixes (#11648)
* Add cursor pointer to preset dropdown

* Catch key index

* Fix iOS mime type
2024-05-30 07:41:37 -06:00
Josh Hawkins
9cb3e11df6 non-modal dropdown menus (#11649) 2024-05-30 07:39:14 -06:00
Nicolas Mowen
1c2e2a7b38 Handle case where user sets detections as empty list (#11646) 2024-05-30 07:45:34 -05:00
Josh Hawkins
a763ae303d static handlebar size to better match figma (#11638) 2024-05-29 21:34:19 -05:00
Nicolas Mowen
ec88752666 Don't show mark reviewed button when all items are in progress (#11636)
* Don't show mark reviewed button when all items are in progress

* Fix unknown preview file
2024-05-29 19:54:56 -05:00
Josh Hawkins
4135cabf58 assume 1 grid column by default on live dashboard (#11630) 2024-05-29 16:03:59 -06:00
Nicolas Mowen
9fc22efa2d Always save previews in UTC offset (#11629) 2024-05-29 14:55:56 -06:00
Josh Hawkins
37dd3fc25b fix birdseye fullscreen (#11625) 2024-05-29 14:18:51 -05:00
Nicolas Mowen
9e8202874e Remove live mode from config (#11618)
* Use preferred mode as default

* Remove live mode from config

* Add deer icon

* remove from config schema
2024-05-29 13:06:48 -05:00
Nicolas Mowen
9245c5cb56 Improve efficiency of log and metrics pages (#11622)
* Rework stats pages

* Handle limited data case

* Handle page and arrow keys

* Adjust sizing
2024-05-29 12:05:39 -06:00
Josh Hawkins
f1c0422d5e Various bugfixes and improvements (#11624)
* various bugfixes and improvements

* add separator

* no separator
2024-05-29 12:05:28 -06:00
Josh Hawkins
3dd401f57a string or list for camera groups (#11616) 2024-05-29 09:19:05 -05:00
Nicolas Mowen
6dd9660ecd Settings rework (#11613)
* refactor settings to be consistent with other page structure

* Implement non auto live

* Adjust missing view

* Quick fix

* Clarify settings options

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* Update naming and config restarts

* Rename

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-05-29 08:01:39 -06:00
Nicolas Mowen
d5f6decd30 Cache camera stream info to speed up future config generations (#11614)
* Cache camera stream info to speed up future config generations

* Formatting

* fix
2024-05-29 07:41:41 -06:00
Nicolas Mowen
cf4517cbdb cache current hour previews (#11606) 2024-05-28 17:35:55 -05:00
Nicolas Mowen
61f79afae9 Always use mse unless webrtc is requrested (#11605) 2024-05-28 17:35:36 -05:00
Nicolas Mowen
5513addab8 UI Fixes (#11602)
* Fix playback rate not showing

* Fix export image

* Formatting

* Formatting
2024-05-28 13:45:08 -06:00
Nicolas Mowen
d064e44571 Fix iOS fullscreen (#11600) 2024-05-28 13:10:42 -06:00
James Tanner-McLeod
c95758580f Draw motion mask first (#11598)
This draws the motion mask before the other overlay elements (such as bounding boxes), so that they are still visible. Fixes #11592
2024-05-28 12:44:20 -06:00
Josh Hawkins
ced5ab203f ensure the correct container is used for canvas calcs (#11599) 2024-05-28 12:41:51 -06:00
Nicolas Mowen
4236580672 UI fixes (#11596)
* Fix using undefined search params

* Fix calendar selection

* Simplify
2024-05-28 13:15:31 -05:00
Josh Hawkins
f7c3ddd380 check if motion dataframe is empty (#11593) 2024-05-28 11:33:28 -06:00
Nicolas Mowen
8546d3d315 Simplify timezone math (#11586)
* Use utc minutes

* Cleanup
2024-05-28 09:09:17 -05:00
Josh Hawkins
2fda383782 clean up unneeded code (#11587) 2024-05-28 08:05:04 -06:00
Josh Hawkins
4165639308 Live view tweaks and jsmpeg bugfix (#11584)
* live view tweaks and jsmpeg bugfix

* use container aspect in check
2024-05-28 08:11:35 -05:00
Nicolas Mowen
6913cc6abc Handle case where preview doesn't automatically changeover (#11583) 2024-05-28 08:11:23 -05:00
Nicolas Mowen
d64633889b Fixes (#11575)
* Fix settings icon

* Handle out of resources
2024-05-27 21:27:01 -05:00
Nicolas Mowen
7bed854ff7 remove libusb build (#11571) 2024-05-27 16:52:19 -06:00
Josh Hawkins
c1330704cf Make jsmpeg players fully responsive (#11567)
* make jsmpeg canvas responsive

* make birdseye responsive too
2024-05-27 16:18:04 -06:00
Nicolas Mowen
5900a2a4ba Add ability to interact with review items in events list (#11562)
* Add ability to interact with review items

* Ignore on iOS

* Don't load metadata

* Bug fixes
2024-05-27 17:12:57 -05:00
Blake Blackshear
bfeb7b8a96 upgrade to latest openvino version (#11563) 2024-05-27 14:49:35 -06:00
Nicolas Mowen
a86e22e0fc Fix live view updating when it shouldn't be (#11561)
* Simplify live image update logic

* Fix case where go2rtc is not setup
2024-05-27 09:50:02 -06:00
Josh Hawkins
c07f6999ca refresh editor value when config is updated (#11559) 2024-05-27 09:31:58 -06:00
Josh Hawkins
eca8c52f15 docs update: how to exclude camera from alerts/detections (#11560) 2024-05-27 09:31:49 -06:00
Nicolas Mowen
be147d218b Fix optimistic state (#11556) 2024-05-27 07:59:26 -05:00
Josh Hawkins
7a9ee63bd3 save video dimensions in onLoadedData instead of onLoadedMetadata (#11545) 2024-05-26 17:48:33 -06:00
Nicolas Mowen
c2eac10925 Tweaks and fixes (#11541)
* Update config version to be stored inside of the config

* Don't remove items from list when navigating back

* Use video api instead of webps for live current hour filmstrip

* Check that the config file is writable

* Show camera name when camera is offline

* Show camera name when offline

* Cleanup
2024-05-26 16:49:12 -05:00
Josh Hawkins
63d81bef45 redirect non existent paths to live view (#11536) 2024-05-26 10:17:52 -06:00
Josh Hawkins
3f171e7670 bugfixes (#11526) 2024-05-25 20:37:53 -06:00
Josh Hawkins
681c7367d7 ensure resizable handles are above jsmpeg canvas elements (#11519) 2024-05-25 15:15:30 -05:00
Marc Altmann
adb043e7ae Update docs for rockchip platform (#11503)
* improve docs for rockchip

* update version info

* fix typo

* fix typo

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* fix typo

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-05-25 11:27:44 -06:00
Blake Blackshear
b97e274b6a master sync v2 2024-05-25 11:58:11 -05:00
Blake Blackshear
e6b735231d master sync 2024-05-25 11:52:24 -05:00
Josh Hawkins
058e9a3ba0 calculate aspect ratio of container to prevent overflow (#11495) 2024-05-23 07:30:16 -06:00
Nicolas Mowen
4d05bc25f4 Safely load config file for go2rtc (#11491)
* Safely load config file for go2rtc

* Add log for default config

* Cleanup
2024-05-22 18:10:55 -05:00
Nicolas Mowen
527d2ab27b Fix extra space in command (#11487) 2024-05-22 13:25:58 -05:00
Nicolas Mowen
01e387ee9a Adjust date math (#11485) 2024-05-22 10:06:40 -06:00
Nicolas Mowen
db496ec525 Fix current hour check for uneven timezones (#11484) 2024-05-22 09:27:00 -06:00
Josh Hawkins
9652ea9e96 Update beta docs (#11483)
* update beta docs

* fix relative coordinates

* fix relative coordinates

* changes
2024-05-22 08:51:59 -06:00
Nicolas Mowen
c935eb0c79 Update Deps (#11480)
* Update web deps

* Update python deps

* revert matplotlib
2024-05-22 08:41:43 -06:00
Nicolas Mowen
c49be0a47f UI tweaks / fixes (#11479)
* Update coloring of logs button

* Fix paging after submitting

* Fix sorting

* Add icon
2024-05-22 07:14:48 -06:00
Rémi Bédard-Couture
592b645231 Add support for TensorRT v10 (multiple api calls have changed) (#11166)
* Add support for TensorRT v10 (multiple api calls have changed)

* Remove unnecessary size check in TensorRT v10 block

* Refactor to reduce code duplication

* Fix wrong function name in new _get_binding_dtype function and only return input check (not assertion) in new _binding_is_input function

* Add space around TRT_VERSION variable assignment (=) to respect linting

* More linting fix

* Update frigate/detectors/plugins/tensorrt.py

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* More linting

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-05-22 06:57:52 -06:00
Marc Altmann
e91f3d8d9b Reimplement support for rknn detector (#11365)
* initial support for rknn detector

* remove purge_model_cache option

* update rknn

* support rk3576

* fix post_process_yolonas call

* add yolonas models

* update config

* exclude yolonas from image

* remove code
2024-05-21 17:50:03 -05:00
Josh Hawkins
910c85b1c0 Clean up config editor (#11474)
* clean up config editor

* remove unneeded size
2024-05-21 13:06:17 -05:00
Nicolas Mowen
cc3bbcc303 Improve preview loading (#11469)
* Improve preview loading

* Ensure it works when selecting dates
2024-05-21 08:00:29 -05:00
Nicolas Mowen
2a86969f54 UI Tweaks (#11459)
* refresh dashboard activity on visibility change

* Make video controls more consistent

* Use const
2024-05-20 18:26:17 -05:00
Nicolas Mowen
dda65ba514 Update review APIs (#11457) 2024-05-20 16:04:18 -05:00
Nicolas Mowen
e268da9df7 Update motion detection tuning to reflect UI tuner (#11455) 2024-05-20 13:35:49 -05:00
Josh Hawkins
e543cc642c add clarifying message and docs link around motion masks (#11452) 2024-05-20 23:18:01 +05:30
Nicolas Mowen
8897b4b0e0 Remove parked car guide as it is no longer relevant (#11451)
* Remove parked cars guide

* Update sidebar

* Update stationary_objects.md
2024-05-20 22:56:03 +05:30
Nicolas Mowen
7413810fa4 Don't timeshift recordings (#11449) 2024-05-20 20:14:39 +05:30
Lachlan MacPhee
87d3ee09b0 Minimal config in installation guide (#11339)
* Minimal config in installation guide (#11339)

+ Adds a subsection to the installation guide that mentions the requirement for a minimal config to start Frigate successfully.

+ Adds a warning not to proceed any further into the guide without this valid config

* Add spacing between Markdown title and text

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Remove subsection in favour of exclusively adding a warning

* Adjust wording for the warning

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-05-20 07:55:25 -06:00
Meow
6e39d55dd3 cspell fixes (#11447) 2024-05-20 07:37:56 -06:00
Josh Hawkins
84e823c62f add padding to bottom of drawer for iOS PWA only (#11446) 2024-05-20 08:06:11 -05:00
Nicolas Mowen
2a16d5593a Fix timezone conversion logic (#11444)
* Fix timezone conversion logic

* Use function for consistency

* Cleanup
2024-05-20 07:02:19 -06:00
Josh Hawkins
82d4bf8ab5 Log warning for high detect fps (#11435)
* warn in log if detect fps > 10

* change message
2024-05-19 21:36:41 -06:00
Nicolas Mowen
4c87ef56c7 Support timezones (#11434)
* Handle offset timezones

* Fix previews loading

* Cleanup

* remove unused
2024-05-19 17:08:32 -06:00
Josh Hawkins
bca01cb43c guard clause for api error (#11436) 2024-05-19 17:08:05 -06:00
Nicolas Mowen
c1560308bf UI improvements (#11429)
* Respect classname when no preview is found

* Don't check for go2rtc info if camera is not restramed

* Show error banner when playback fails

* Add keyboard shortcut for fullscreen
2024-05-19 07:39:17 -05:00
Josh Hawkins
171a142adb optional env var for easier development (#11426) 2024-05-18 18:49:38 -06:00
Nicolas Mowen
0810873988 Fix broken links (#11425) 2024-05-18 18:09:55 -05:00
Nicolas Mowen
16f1c575d7 UI Fixes (#11423)
* Settings fixes

* Fix formatting
2024-05-18 14:19:32 -06:00
Blake Blackshear
402f5fa142 add setting for secure flag on cookie (#11422)
* add setting for secure flag on cookie

* docs fix
2024-05-18 13:53:49 -06:00
Nicolas Mowen
3ce8816b9a Update auth settings UI (#11421) 2024-05-18 14:05:28 -05:00
Josh Hawkins
5c609c7051 Bugfixes (#11420)
* mse and misc messages fixes

* clean up
2024-05-18 12:55:17 -06:00
Nicolas Mowen
8cddfc27fb UI fixes (#11417)
* Set max width on the problems area in status bar and use unique keys so they do not duplicate

* Fix possibly missing media info

* Show full row of items on tablet

* remove debugging logic
2024-05-18 11:54:46 -05:00
Blake Blackshear
1133202cbd Auth! (#11347)
* reload the window on 401

* backend apis for auth

* add login page

* re-enable web linter

* fix login page routing

* bypass csrf for internal auth endpoint

* disable healthcheck in devcontainer target

* include login page in vite build

* redirect to login page on 401

* implement config for users and settings

* implement JWT actual secret

* add brute force protection on login

* add support for redirecting from auth failures on api calls

* return location for redirect

* default cookie name should pass regex test

* set hash iterations to current OWASP recommendation

* move users to database instead of config

* config option to reset admin password on startup

* user management UI

* check for deleted user on refresh

* validate username and fixes

* remove password constraint

* cleanup

* fix user check on refresh

* web fixes

* implement auth via new external port

* use x-forwarded-for to rate limit login attempts by ip

* implement logout and profile

* fixes

* lint fixes

* add support for user passthru from upstream proxies

* add support for specifying a logout url

* add documentation

* Update docs/docs/configuration/authentication.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/authentication.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-05-18 10:36:13 -06:00
Marc Altmann
a70dd02788 Implement common post_processing (#11408)
* implement common post_processing

* fix formatting

* rename yolonas to post_process_yolonas
2024-05-17 10:50:45 -06:00
Nicolas Mowen
97f5ba0145 Update go2rtc and implement stream probe to only show 2 way talk when supported (#11407)
* Support two way talk validation

* Fix handling

* Use go2rtc stream info to infer audio output

* Update go2rtc

* Update bundle policy

* Formatting
2024-05-17 07:30:22 -06:00
Nicolas Mowen
07eef9b139 Recording fixes (#11406)
* Fix infinite review items when record is disabled

* Fix showing loading icon while continuing to scrub

* Fix recording layout previews
2024-05-17 07:26:42 -06:00
Josh Hawkins
ba03d3b3e4 Mobile/PWA spacing fixes (#11403)
* spacing on mobile landscape

* better icon placement when running as pwa

* better icon placement when running as pwa

* portrait padding only
2024-05-16 16:00:14 -06:00
Nicolas Mowen
76f822630d Fix preview saving for ffmpeg builds < 5 (#11400)
* Fix ffmpeg for rpi

* Fix character
2024-05-16 16:55:55 -05:00
Josh Hawkins
dd0dee620a spacing on mobile landscape (#11397) 2024-05-16 10:51:57 -06:00
Josh Hawkins
525de1a467 Add autotracking enable/disable button to live view (#11396) 2024-05-16 08:32:39 -06:00
Josh Hawkins
16ead917ea Preview bugfixes (#11384)
* memoize initial time range and check for window visibility

* assume window is visible with previewthumbnailplayer
2024-05-15 09:51:58 -06:00
Johann
46f68ccd73 Update to frigate+ documentation (#11371)
* Update to frigate+ documentation

Added shortcuts + advices for objects partly out of frame and the 'difficult' tag.

* Update docs/docs/plus/improving_model.md

* Update docs/docs/plus/improving_model.md

---------

Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>
2024-05-15 06:08:14 -05:00
Josh Hawkins
1757f4cb04 Use prettier-plugin-tailwindcss (#11373)
* use prettier-plugin-tailwindcss to keep class names organized

* use prettierrc file to ensure formatting on save works with vscode

* classname reorder with prettier-plugin-tailwindcss
2024-05-14 09:06:44 -06:00
Nicolas Mowen
b10ae68c1f Tweaks and fixes (#11372)
* Ensure camera activity is up to date

* Persist playback rate between cameras

* Add setting for default playback rate

* Fix audio events saving image

* Formatting

* Use select component
2024-05-14 08:38:03 -05:00
Nicolas Mowen
b451d0a4f1 Improve mask error (#11361)
* Don't apply masks / zones that are outside of the detect resolution

* formatting
2024-05-13 10:00:34 -05:00
Marc Altmann
67bff1e79e update FFmpeg for Rockchip (#11351) 2024-05-13 06:52:11 -06:00
Josh Hawkins
fbec08354c bugfixes and small UI tweaks (#11360) 2024-05-13 06:42:11 -06:00
Nicolas Mowen
9680f2a574 Bug fixes (#11332)
* Fix external events saving

* Only show relevant labels

* Set on recordings view too

* Fix video control width on motion page

* use overlay so player state is maintained between camera switches

* use overlay so player state is maintained between camera switches

* mobile only

* Formatting

* Use higher amount

* Only wrap when needed
2024-05-10 11:42:56 -06:00
Josh Hawkins
82e443a5c3 Camera group layout fixes (#11334)
* camera group layout changes and tweaks

* lock aspect ratio

* no compacting

* prevent collisions

* revert

* readd limit aspect
2024-05-10 11:54:37 -05:00
Josh Hawkins
386ffbf5a6 Tweak camera group layout editor buttons (#11317)
* tweak layout editor buttons

* remove bubble

* spacing

* button backgrounds
2024-05-09 15:08:22 -06:00
Nicolas Mowen
8b344cea81 Implement recordings fullscreen and rework recordings layout size calculation (#11318)
* Implement fullscreen button

* wrap items on mobile

* control based on width

* refresh

* Implement basic fullscreen

* Fix scrolling

* Add observer to detect of row overflows

* Use cn to simplify classnames

* dynamically respond to layout sizing

* Simplify listener

* Simplify layout

* Handle tall browser
2024-05-09 15:06:29 -06:00
Josh Hawkins
021ffb2437 fix nan check in system graphs (#11312) 2024-05-09 07:55:19 -06:00
Josh Hawkins
f8523d9ddf Icon picker component (#11310)
* icon picker component

* keep box the same size when filtering icons
2024-05-09 07:22:48 -06:00
Marc Altmann
50ee447e52 Fix aarch64 build (#11289)
* fix aarch64 build

* change order of packages
2024-05-09 07:22:34 -06:00
Nicolas Mowen
4216d08099 Backend and webui fixes (#11309)
* Ensure that items without end times are set to not have a snapshot

* Save full frame if no frame is currently saved

* Webui fixes

* Cleanup
2024-05-09 08:20:33 -05:00
Nicolas Mowen
4bcbf7435a Web Deps (#11304)
* Update easy web deps

* Update react

* Update final
2024-05-09 08:20:07 -05:00
Nicolas Mowen
e1cbefb692 Add link to system stats from status bar (#11303) 2024-05-09 08:19:41 -05:00
Josh Hawkins
2be15b6c01 Improve config validation error messages (#11292) 2024-05-08 08:46:31 -06:00
Nicolas Mowen
3ed89ec042 Simplify preview refreshing with custom hook (#11293) 2024-05-08 08:46:10 -06:00
Josh Hawkins
db8c820677 Draggable camera grid tweaks (#11291)
* better math and other tweaks

* change icon
2024-05-08 07:53:22 -05:00
Nicolas Mowen
e7ba556919 Fix setting manual event update time (#11290) 2024-05-08 07:34:22 -05:00
Josh Hawkins
ff2948a76b Drag to reorder/resize cameras in camera groups (#11279)
* draggable/resizable cameras in camera groups on desktop/tablets

* fix edit button location on tablets

* assume 1rem is 16px
2024-05-07 08:28:10 -06:00
Josh Hawkins
08e5c791c8 Use cn() for class names throughout (#11278)
* add scrollbar on ptz presets dropdown

* use cn function for class names throughout

* Revert "add scrollbar on ptz presets dropdown"

This reverts commit 2cee93dc3e.
2024-05-07 08:00:25 -06:00
Josh Hawkins
a0da5018bf add scrollbar on ptz presets dropdown (#11276) 2024-05-07 06:27:20 -06:00
Nicolas Mowen
fc0f6d6095 Implement infinite scrolling for frigate+ view (#11273)
* Implement infinite scrolling for frigate+ view

* Also fixes safari preview glitch

* Show sub label name in hover
2024-05-06 18:00:21 -05:00
Nicolas Mowen
e5e18a5026 UI Tweaks (#11263)
* Add icons for frigate+ items

* Fix bug where export didn't start

* Fix mobile overflow

* Capitalize first letter function
2024-05-06 15:18:13 -06:00
Josh Hawkins
c0073db859 fix touch events (#11265) 2024-05-06 12:35:18 -06:00
Josh Hawkins
306c11d730 use portal on all sidebar tooltips (#11267) 2024-05-06 11:18:28 -06:00
Josh Hawkins
ca8ef70096 Support desktop touchscreens for timelines (#11241)
* support desktop touchscreens

* remove placeholder select

* add max height to settings cameras dropdown
2024-05-04 21:00:33 -06:00
Josh Hawkins
ad87f5786e Misc UI fixes (#11237)
* add close button to all toasters

* check if persistent options are loaded

* add id to prevent message duplication in bottom bar
2024-05-04 14:54:50 -05:00
Nicolas Mowen
2dd5b893a0 Cleanup config validation (#11235)
* Fix reading model config dict

* Fix irrelevant warnings

* Fix tests
2024-05-04 10:15:03 -05:00
Josh Hawkins
51dcdd6f4b Zone/mask editor improvements (#11236)
* add points to completed polygons in zone/mask editor

* change line order so edges are more easily clickable
2024-05-04 08:37:35 -06:00
Nicolas Mowen
f0054ceba4 Adjust stationary reqs depending on state (#11226) 2024-05-03 17:28:06 -05:00
Nicolas Mowen
216e44bc34 Event cleanup (#11225)
* remove duplicate event purging

* Slightly increase stationary object sensitivity

* Add toast for export starting

* Increase stationary threshold as well

* Update message

* Make text consistent

* Update message
2024-05-03 08:03:41 -06:00
Nicolas Mowen
e7950abec3 Add ability to submit frames from recordings (#11212)
* add ability to parse and upload image from recording to frigate+

* Show dialog with current frame to be uploaded

* Implement uploading image in frontend

* Cleanup

* Update title
2024-05-03 09:00:19 -05:00
Josh Hawkins
b69c1828cb Fix overflowing portrait images in debug and motion tuner views (#11209)
* fix overflowing camera image and remove mse console debug

* move calc into onLoad

* check container aspect
2024-05-02 14:05:20 -06:00
Josh Hawkins
7a5df6045a make circle radius larger on mobile only (#11210) 2024-05-02 13:06:32 -06:00
Nicolas Mowen
a3267f7d44 Add more icons (#11204) 2024-05-02 07:52:44 -05:00
Nicolas Mowen
28dd871d44 Show motion playback on page initially (#11196)
* motion video controls handle current time better

* Make sure state is updated
2024-05-01 21:23:03 -05:00
Nicolas Mowen
2e63941598 Fix scroll back (#11192) 2024-05-01 09:24:19 -05:00
Nicolas Mowen
b5b819c866 Add severity filter (#11190)
* Allow viewing all types on single screen

* Implement for mobile as well

* fix import

* Show all is optional
2024-05-01 09:11:16 -05:00
Josh Hawkins
499f70cfd3 config validation fixes (#11191) 2024-05-01 08:08:10 -06:00
Josh Hawkins
6d2457ebad Revamp object debug view (#11186)
* revamp object debug view

* fix vite

* remove console log

* don't display empty fields

* clarify masks as motion masks

* add descriptions

* color and spacing

* add sub_label to camera activity

* add sub_label to type

* rename to debug
2024-05-01 08:07:56 -06:00
Josh Hawkins
bb335638a4 use alert/detection colors as background for motion segments (#11182) 2024-04-30 18:38:22 -06:00
Nicolas Mowen
297444375c UI Fixes (#11179)
* Better scaling for frigate+ dialog and thumbnails

* Always show live objects chip

* Handle sub labels

* Send sub label correctly

* Formatting

* Undo vite

* Update web/src/utils/iconUtil.tsx
2024-04-30 19:35:23 -05:00
Nicolas Mowen
90bdb07463 Simplify on connect (#11176) 2024-04-30 07:27:39 -06:00
Nicolas Mowen
461442b399 Save initial camera state to update when websocket connects (#11174)
* Send camera state to dispatcher

* Fix logic

* Cleanup

* Send camera activitiy in on connect

* Support reading initial camera state

* Fix key

* Formatting

* Sorting
2024-04-30 07:09:50 -06:00
Josh Hawkins
0080c28c4d fix crash for when group includes birdseye (#11175) 2024-04-30 06:59:45 -06:00
Josh Hawkins
11ff7cb2b7 Use full resolution aspect ratio when available (#11173)
* base recordings and live views off of actual video resolution

* don't set for jsmpeg

* reset when changing main cam

* rename

* Only use resolution for main camera

* fix lint

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-04-30 06:52:56 -06:00
Nicolas Mowen
1c9626ecff UI fixes (#11161)
* Don't save animated webp

* Fix bad export state

* Contain scroll for camera group

* Use dvh
2024-04-29 15:23:24 -06:00
Josh Hawkins
7745313cdc add chips for active objects on live dashboard (#11162) 2024-04-29 15:23:14 -06:00
Nicolas Mowen
f946cf55be Use pre buffer for other links (#11160) 2024-04-29 14:20:50 -05:00
Nicolas Mowen
c9246bd4ab Open to recordings with pre-buffer (#11143)
* Open to recordings with pre-buffer

* Reduce buffer

* Use variable for preview FPS
2024-04-29 11:12:57 -05:00
Nicolas Mowen
9117043adc UI tweaks for screen sizes (#11155)
* Make bottom bar items easier to tap

* Set max height on list of cameras and labels

* remove incorrect character

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-04-29 10:59:27 -05:00
Nicolas Mowen
0c8e155afa Fix handling mixed masks (#11157) 2024-04-29 10:58:53 -05:00
Sean Kelly
5bc9f9a388 [stats] Fix tooltip showing as undefined for first tick (#11150)
* Fix tooltip showing as undefined for first tick

* Rearrange to simplify diff

* Remove offset for mobile
2024-04-29 08:52:32 -06:00
Nicolas Mowen
5858eee1fe Explicitly set pandas dtype to reduce memory usage and fix warning (#11145)
* Explicitly set dtype to reduce memory usage and fix warning

* remove extra line
2024-04-29 06:23:08 -05:00
Sean Kelly
90468c8bf5 Force X axis labels to be rotated correctly (#11148)
* Adjust number of ticks to have consistent X axes

* Revert "Adjust number of ticks to have consistent X axes"

This reverts commit 941e296750.

* set rotate instead
2024-04-28 22:55:43 -06:00
Sean Kelly
1c90f62ea5 Fix rounding (#11147) 2024-04-28 22:00:57 -06:00
Nicolas Mowen
acf37f9920 Link to relevant page from status bar warnings / errors (#11140)
* Use hash state for system pages

* Add links to items

* Add stats to other types

* Link on mobile as well

* Use link

* Cleanup using util
2024-04-28 16:59:03 -06:00
leccelecce
c2c6113299 Live view not loading for MSE/JSMpeg if overriding live stream (#11141) 2024-04-28 16:28:19 -06:00
Nicolas Mowen
8c610bea49 Remove dev env var requirement and update docs for latest config (#10483)
* Update docs for alerts and event review

* Add docs for camera groups

* Update reference config with new config values

* Remove env variable requirement

* Add to sidebar

* Update snapshot docs

* add zones example to detection docs too

* Generalize the zone docs
2024-04-28 09:35:50 -05:00
Josh Hawkins
3348af1e6d add page titles for settings views (#11132) 2024-04-27 11:02:01 -06:00
Nicolas Mowen
cc851555e4 Security improvement: ensure user provided file names don't exceed max length (#11129)
* Security fixes

* formatting
2024-04-27 11:27:23 -05:00
Nicolas Mowen
f36e86feb6 Cleanup error gpu (#11130) 2024-04-27 11:26:51 -05:00
Josh Hawkins
ab032aa004 sane colors for themes (#11126) 2024-04-26 14:30:57 -06:00
Josh Hawkins
d0aefc2121 Camera group dialog changes and fixes (#11117)
* camera group dialog changes and fixes

* use drawer on mobile

* spacing
2024-04-25 17:19:31 -06:00
Nicolas Mowen
c035241b39 Clear ongoing reviews on startup (#11097)
* Add topic to clear ongoing review segments

* Clear ongoing review items on startup
2024-04-24 08:44:28 -05:00
Nicolas Mowen
313e7c016c fix motion updating (#11083) 2024-04-23 09:57:29 -05:00
Nicolas Mowen
647bcb2618 Add camera fps to graphs (#11080)
* Add camera fps to graphs

* Use more generic name
2024-04-23 09:32:46 -05:00
Nicolas Mowen
2d71cd7fe2 Improve review mqtt topic (#11072)
* Don't request preview for current hour and fix content type

* Send before / after on messages

* Send before / after for end

* Handle specific cases

* remove log

* Fix update type
2024-04-22 21:20:30 -05:00
Josh Hawkins
d6e93d039d Make all corners less rounded on mobile (#11068)
* make corners less rounded on mobile

* fix live dashboard classes
2024-04-22 09:12:45 -06:00
Josh Hawkins
ba3930ab02 Add status bar provider (#11066) 2024-04-22 08:20:23 -06:00
Josh Hawkins
acadfb6959 Fix array out of range error in reviews (#11059) 2024-04-21 19:03:43 -06:00
Nicolas Mowen
baf363fcb0 Make a backup DB before doing migrations (#11048) 2024-04-20 08:55:51 -05:00
Josh Hawkins
57800d3843 Use export name in export deletion dialog instead of file id (#11049)
* use export name in dialog instead of file id

* add type for deletion
2024-04-20 07:44:59 -06:00
dependabot[bot]
8092b28710 Bump docker/login-action from 3.0.0 to 3.1.0 (#10446)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](343f7c4344...e92390c5fb)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-20 06:20:55 -06:00
Aida Syoko
3d612e510c chore: fix some typos in comments (#11028)
Signed-off-by: alongdate <alongyear@outlook.com>
2024-04-20 06:16:43 -05:00
Josh Hawkins
3ca2d599d3 fix logs scrolling on mobile (#11045) 2024-04-19 17:01:45 -06:00
Nicolas Mowen
c83c13938c Update deps (#11044)
* Update web deps

* Update docs deps

* Update python deps
2024-04-19 17:13:01 -05:00
Nicolas Mowen
bfefed4d6e Dynamically scale the slider height when hovering + other UI tweaks (#11042)
* Make no thumb slider height dynamic

* Use existing switch component

* Use existing switch component for general filter content

* Show message when no reordings found for time

* Don't show while scrubbing

* Fix key error

* Fix background color for controls on motion page
2024-04-19 17:12:03 -05:00
Nicolas Mowen
fe4fb645d3 Save exports to database (#11040)
* Save review thumbs in dedicated folder

* Create exports table

* Save exports to DB and save thumbnail for export

* Save full frame always

* Fix rounded corners

* Save exports that are in progress

* No need to remove spaces

* Reorganize apis to use IDs

* Use new apis for frontend

* Get video playback working

* Fix deleting and renaming

* Import existing exports to DB

* Implement downloading

* Formatting
2024-04-19 17:11:41 -05:00
Josh Hawkins
3b0f9988df UI tweaks (#11036)
* spacing, mobile navbar, and minor color updates

* tab scrolling behavior
2024-04-19 12:17:23 -05:00
Josh Hawkins
d6dfa596de undo points based on order added to polygon (#11035) 2024-04-19 07:59:28 -06:00
Josh Hawkins
5f15641b1b New mask/zone editor and motion tuner (#11020)
* initial working konva

* working multi polygons

* multi zones

* clean up

* new zone dialog

* clean up

* relative coordinates and colors

* fix color order

* better motion tuner

* objects for zones

* progress

* merge dev

* edit pane

* motion and object masks

* filtering

* add objects and unsaved to type

* motion tuner, edit controls, tooltips

* object and motion edit panes

* polygon item component, switch color, object form, hover cards

* working zone edit pane

* working motion masks

* object masks and deletion of all types

* use FilterSwitch

* motion tuner fixes and tweaks

* clean up

* tweaks

* spaces in camera name

* tweaks

* allow dragging of points while drawing polygon

* turn off editing mode when switching camera

* limit interpolated coordinates and use crosshair cursor

* padding

* fix tooltip trigger for icons

* konva tweaks

* consolidate

* fix top menu items on mobile
2024-04-19 05:34:07 -06:00
Nicolas Mowen
a1905f5604 Remove gifs and use existing views (#11027)
* Use existing components for preview filmstrip instead of gif

* Allow setting format
2024-04-18 22:34:57 -05:00
Nicolas Mowen
0bad001ac9 Show coral temps on system page if available (#11026) 2024-04-18 22:34:16 -05:00
Nicolas Mowen
03e25b3f94 Improve config validation for zones and object masks (#11022)
* Add verification for required zone names

* Make global object masks use relative coordinates as well

* Ensure event image cleanup doesn't fail

* Return passed value
2024-04-18 11:35:16 -05:00
Nicolas Mowen
fb721ad031 UI fixes (#11012)
* Get pip working correctly

* Fix system graphs click and hover states
2024-04-18 11:34:18 -05:00
Nicolas Mowen
8230813b79 Migrate export filenames (#11005)
* Migrate export filenames

* formatting

* Remove test.yaml saving
2024-04-17 16:26:16 -05:00
Nicolas Mowen
392ff1319d Remove use_experimental config as part of config migration (#11003)
* Remove experimental config as part of config migration

* Remove from config

* remove config from docs
2024-04-17 07:02:59 -05:00
Nicolas Mowen
a87cca23ea Add ability to link to review items directly (#11002)
* Fix action group icon colors

* Add ability to query specific review item

* Pull id search key and open recordings to review item
2024-04-17 07:02:03 -05:00
Nicolas Mowen
ff823b87c8 Add support for arbitrary sub labels in reviews (#10990)
* store arbitrary sub labels

* Include sub labels in tooltip

* Update tooltips on filmstrip

* Fix item display

* Fix bug with creating review segment
2024-04-16 15:56:28 -05:00
Nicolas Mowen
9be5951076 UI tweaks (#10998)
* Make buttons consistent and have hover state

* Use switch for camera to be consistent

* Use everywhere and remove unused

* Use green for normal stats color

* Fix logs copy icon

* Remove warnings from pydantic serialization

* Ignore warnings

* Fix wsdl resolution

* Fix loading on switch
2024-04-16 15:55:24 -05:00
Nicolas Mowen
a823a18496 Fix camera switching and loading position (#10982)
* Fix alignment

* Set loading when switching cameras
2024-04-16 15:21:52 -05:00
Nicolas Mowen
d7ae0eedf8 More UI tweaks (#10974)
* Show loading indicator when switching between preview and recording if it takes a while

* Scroll down to avoid automatic upscroll
2024-04-14 14:43:43 -06:00
Nicolas Mowen
7f424bb3f8 UI Improvements (#10972)
* Update web deps

* Fix tooltip on storage page

* Always show video controls even when zooming

* Get video controls working when video is paused

* Fix control hovering

* Add loading indicator to logs tab

* Show metrics correctly when hovering graph

* Show loading indicators for previews on recordings page

* Remove vitest update

* remove unused

* Make volume props optional
2024-04-14 10:14:10 -06:00
Nicolas Mowen
a3e2171675 Implement score filtering on Frigate+ Page (#10968)
* Fix portrait layout disappearing

* Refactor sliders

* Reuse camera filter

* Reuse label filter content

* Implement score slider including keyboard input

* Implement ability to sort frigate plus submissions
2024-04-14 10:06:11 -06:00
Martin Weinelt
b65656fa87 Make wsdl_dir path resolving more robust (#10967)
Relying on importlib to resolve the path to the wsdl directory is more
robust, since it traverses all site-packages directories, that are part
of the PYTHONPATH.
2024-04-13 12:25:58 -05:00
Nicolas Mowen
3788df5bc6 Implement config migration and restructure config for new review format (#10961)
* Update reference config to reflect new config

* Migrate 0.13 config to match 0.14 config style

* Overwrite existing config

* Adjust config schema to remove events required zones and include reviews

* Update object config to check correct required zones config

* Refactor reviews to remove motion and only create review segments in expected circumstances

* Cleanup

* Formatting

* Fix update ordering

* Update pydantic

* Remove rtmp references as part of migration

* Catch file not found for alert frame
2024-04-13 06:08:20 -06:00
Nicolas Mowen
11dc407b36 Further improve event loading (#10949)
* Further improve loading

* Add document titles to pages

* Cleanup
2024-04-12 07:31:30 -05:00
Nicolas Mowen
13cac082d5 UI tweaks (#10946)
* fix warning

* Improve event switching speed

* Fix icon colors

* Only show frigate+ page when frigate+ is enabled

* Add link from reecordings to live as well
2024-04-11 15:54:09 -05:00
Josh Hawkins
7a7ae81d50 always use full resolution time when dragging (#10939) 2024-04-11 07:29:34 -06:00
Nicolas Mowen
fb6f415b27 Fix build formatting (#10937) 2024-04-11 07:49:21 -05:00
Nicolas Mowen
049f27d710 Ongoing review segments (#10924)
* Update review maintainer to save events when ongoing

* Handle previews for in progress review items

* Reset DB items in app

* Handle in progress review items

* Scroll back down to selected event item

* Handle undefined end time

* Formatting

* remove unused

* Make export handles have full resolution

* reduce preview thumbnail props

* fix missing return

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-04-11 07:42:16 -05:00
Nicolas Mowen
cf7698e7e1 Fix vertical camera layout scaling (#10936) 2024-04-11 07:39:53 -05:00
Matt Brown
2d5a3c6963 Clarify Proxmox LXC instructions; reference #5773 instead of #1111 (#10759)
* Clarify Proxmox LXC instructions

There is a lot of confusing information online. This provides some
simple general guidelines to help people get started.

* Update docs/docs/frigate/installation.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Reference #5773 instead of #1111

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-04-11 06:42:45 -05:00
Austin Kirsch
0c5aef0907 small docs typo fix for zones (#10549)
* Update zones.md

* Update zones.md round 2
2024-04-11 06:41:48 -05:00
Michal Vašíček
4a7a47a931 docker: modify listen directive in nginx.conf to listen on both IPv4&v6 (#10653) 2024-04-11 06:41:29 -05:00
Felix Zenk
5970aead0d Include leading slash of path in rewrite rule for frigate_api in nginx.conf (#10888)
Noticed the healthcheck curl requests were failing as they were routed to http://127.0.0.1:5001version instead of http://127.0.0.1:5001/version
2024-04-11 06:41:07 -05:00
Nicolas Mowen
3d43c5e811 Ui Tweaks (#10920)
* Cleanup live activity indicators for cameras

* Rename to reviews and redirect events to reviews

* Use reviews

* Remove plural

* Simplify recordings view

* Adjust icon
2024-04-10 08:40:17 -05:00
Nicolas Mowen
503dfba719 Fix button colors (#10915)
* Simplify button colors

* fix colors

* Add back in colors

* Fix color vars
2024-04-09 18:19:31 -05:00
Nicolas Mowen
524732ec73 Improve stats (#10911)
* Add overview stats for overall detection and skipped fps

* Fix intel memory stats

* Fix iOS image long pressing

* Cleanup
2024-04-09 17:08:11 -06:00
Nicolas Mowen
15e4f5c771 use relative coordinates for masks & zones (#10912)
* Handle zones and masks as relative coords

* Ensure that zone coords are saved as relative

* Get motion mask working with relative coordinates

* Rewrite object mask to use relative coordinates as well

* Formatting

* Fix always trying to convert

* fix mask logic
2024-04-09 17:51:38 -05:00
Josh Hawkins
ef52a1d6f0 Fix colors for default light mode theme (#10909)
* fix colors for default light mode theme

* remove redundancy

* fix export dialog

* don't use primary-foreground

* change secondary button variant to be default button

* change filters button to bg-selected when filtering

* slightly lighten secondary-foreground in light mode

* fix mobile motion only button
2024-04-09 17:49:14 -05:00
Nicolas Mowen
c08a198354 Always handle random lines on frigate logs (#10904) 2024-04-09 08:53:21 -05:00
Josh Hawkins
9281093740 fix export button colors (#10903) 2024-04-09 07:49:14 -06:00
Nicolas Mowen
8163c036ef Use zmq for event end queue and update python deps (#10886)
* Use zmq for events ended

* Cleanup

* Update deps

* formatting
2024-04-08 18:19:45 -05:00
Nicolas Mowen
c577361923 Fix frigate startup stats (#10887) 2024-04-08 18:19:00 -05:00
Josh Hawkins
55018372d4 Fix button color dark mode logic (#10884)
* fix button color dark mode logic

* make calendar use active color when not default
2024-04-08 11:34:15 -05:00
Josh Hawkins
f210c4b6f4 UI tweaks and bugfixes (#10882)
* small tweaks and bugfixes

* spacing

* simplify
2024-04-08 07:35:35 -06:00
Nicolas Mowen
73c093be43 Use fast start for exports (#10879) 2024-04-08 07:36:50 -05:00
Nicolas Mowen
8148a4f9d6 Update web deps (#10875) 2024-04-07 15:37:54 -05:00
Nicolas Mowen
25d81b5c6d Improve Landscape mobile views (#10873)
* Fix landscape live view

* Improve recording landscape view

* Fix height
2024-04-07 15:37:33 -05:00
Nicolas Mowen
f6ff1c84b8 Truncate write ahead log if it gets too big (#10866)
* Truncate write ahead log if it gets too big

* formatting

* Reduce size
2024-04-07 15:37:12 -05:00
Nicolas Mowen
12e6e43d6c Add y axis to camera stats graphs (#10854)
* Add y axis to camera stats graphs

* Add y axis to gneral graph too

* Improve data label distribution

* Cleanup
2024-04-07 15:36:28 -05:00
Nicolas Mowen
cf2dfd9a54 Redesign logs page (#10853)
* Adjust outline and structure to match designs

* More color changes to fit design

* Properly parse go2rtc severity

* Add ability to filter by clicking item

* Implement sheet / drawer for viewing full log

* Add toast and filtering

* Add links to docs when specific log items are selected

* Cleanup log seeking

* Use header in layout

* Fix mobile menus

* Fix safari theme

* Hide rings

* Theme adjustment
2024-04-07 15:36:08 -05:00
Nicolas Mowen
b26ceff44d Add ability to search exports (#10850)
* Add ability to search exports

* Fix export saving
2024-04-07 15:35:45 -05:00
dependabot[bot]
af320c8c09 Bump actions/setup-python from 5.0.0 to 5.1.0 (#10703)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.0.0...v5.1.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-07 06:13:26 -06:00
Josh Hawkins
5085fa7135 UI bugfixes and tweaks (#10848)
* fix ios z-index scrolling bug

* skeleton size
2024-04-05 08:44:00 -05:00
Nicolas Mowen
07ee39b9b8 Write default config if no config is saved (#10847) 2024-04-05 08:39:43 -05:00
Nicolas Mowen
2318e79502 Cleanup (#10846)
* Hide motion playback controls during scrubbing

* Fix portrait recordings on mobile

* Don't apply to desktop
2024-04-05 08:38:05 -05:00
Nicolas Mowen
fb7cfe5471 Implement camera stats graphs (#10831)
* Implement camera graphs

* Cleanup naming

* Cleanup rendering

* Cleanup spacing

* Fix audio name

* theme updates to match design corretly

* Mobile color fixes

* Mobile color fixes
2024-04-04 15:55:04 -05:00
Josh Hawkins
466a9104e5 Motion review improvements (#10833)
* render skeleton for preview player until motion data is loaded

* skeleton for timeline
2024-04-04 14:54:58 -06:00
Nicolas Mowen
42559fa55d Storage Graphs (#10826)
* Rename graph

* Use separate view for general metrics

* Get storage graph formatted

* Show camera storage usage

* Cleanup ticks

* Remove storage link

* Add icons and frigate logo

* Undo

* Use optimistic state for metrics toggle

* Use optimistic state and skeletons for loading
2024-04-04 10:24:23 -06:00
Josh Hawkins
46e3157c7f optimistic ui for mobile buttons too (#10827) 2024-04-04 09:46:19 -06:00
Nicolas Mowen
80e330594b Fix exports (#10824)
* Avoid crash from opening motion time right now

* Cleanup export margins

* Fix mobile filter

* Fix export

* Improve spacing
2024-04-04 10:43:54 -05:00
Josh Hawkins
fbc0da6016 Optimistic UI (#10825)
* debounce motion only button

* implement custom hook

* optimistic severity toggle

* optimistic reviewed switch
2024-04-04 09:09:19 -06:00
Nicolas Mowen
0096a6d778 Implement general page of system graphs (#10815)
* Reorganize stats and show graphs in system metrics

* Break apart all cpu / mem graphs

* Auto update stats

* Show camera graphs

* Get system graphs working for inference time

* Update stats every 10 seconds, keeping the last 10 minutes

* Use types for thresholds

* Use keys api

* Break system metrics into different pages

* Add dialog for viewing and copying vainfo

* remove unused for now

* Formatting

* Make tooltip match theme

* Make betters color in light mode

* Include gpu

* Make scaling consistent

* Fix name

* address feedback
2024-04-03 21:22:11 -06:00
Josh Hawkins
427c6a6afb Timeline tweaks (#10816)
* limit handles from overdragging when segments don't fill up timeline

* use separate state for switch

* add key
2024-04-03 19:20:47 -06:00
Nicolas Mowen
483d64e419 Don't show warning for disabled cameras (#10811) 2024-04-03 11:56:04 -05:00
Nicolas Mowen
59335c0628 Redesign log page and pull logs in chunks (#10809)
* Redesign log page to have formatting

* Support other log types as well

* fix border

* Support log data format

* Only load necessary logs

* Load incrementally

* Cleanup

* Cleanup

* Render all items

* avoid flashing scroll to bottom

* Fix not listening at first

* Always ensure logLine is defined

* Group logs based on timestamp

* Formatting

* remove scrollbar

* Don't repull when there are no items to pull

* Add newline to end

* Fix log lines missing

* typo
2024-04-03 11:55:13 -05:00
Nicolas Mowen
476a900708 Add ability to rename exports (#10791)
* Add ability to rename exports

* Address feedback
2024-04-03 09:02:07 -05:00
Nicolas Mowen
15dcf1fcc8 Don't stop mse in background when using pip (#10794)
* Don't stop mse when pip is enabled and not visible

* Cleanup visibility listener
2024-04-02 14:39:11 -05:00
Nicolas Mowen
759ad427d5 Link live recordings (#10799)
* Add button to link to recordings from camera live view

* Change name and show text on both

* Use history button next to back button

* Match designs better
2024-04-02 14:25:02 -05:00
Nicolas Mowen
d1082ec305 Support manual detections in review items (#10784)
* Only update frame time if it is older

* Support manual detections as review items

* Don't handle api detections in recordings

* Store recordings for manual events
2024-04-02 07:07:50 -06:00
Josh Hawkins
d7a87fff60 move span inside of content to fix crash (#10790) 2024-04-02 07:07:38 -06:00
Nicolas Mowen
4d8d3cd22e Live view improvements (#10781)
* Show frigate features in bottom sheet on mobile

* Use flex wrap on mobile so the ptz icons are not cutoff

* Support opening pip from live view

* Remove unused
2024-04-02 07:45:16 -05:00
faurel
a886b6a3e5 Support ONVIF exceptions when sending pan-tilt commands (#10777)
Co-authored-by: Aurel <me@home.com>
2024-04-01 13:19:24 -06:00
Josh Hawkins
bd70bf1c31 fix outlines (#10779) 2024-04-01 10:03:10 -06:00
Josh Hawkins
99878d9eee use single lookup for motion data (#10778) 2024-04-01 09:57:35 -06:00
Nicolas Mowen
52f65a4dc4 Use drawer instead of dropdown menu for mobile settings (#10761)
* Separate settings items so layout is more consistent

* Convert settings on mobile to drawer

* Fix sizing on mobile and make scrollable

* remove padding

* Use dialog instead of popover

* Don't focus on first item

* Simpler tab fix
2024-04-01 10:31:31 -05:00
Josh Hawkins
7fac91dce4 UI tweaks and bugfixes (#10775)
* fix wrong segments when changing filters in motion only mode

* pixel alignment, better outlines, and more figma matching

* fix stats from crashing the ui

* separate layout from aspect classes

* check for invalid value

* avoid undefined classnames
2024-04-01 08:23:57 -06:00
Nicolas Mowen
5853393396 Fix mobile playback (#10774) 2024-04-01 09:20:27 -05:00
Daniel
7e5eb82882 Delete download-models (#10755) 2024-03-30 13:23:32 -06:00
Nicolas Mowen
5b5606cb8a Make export date/time respect configured timezone in config (#10750)
* Make export page timezone aware

* Fix changeover
2024-03-30 14:07:30 -05:00
Nicolas Mowen
4d522be7fb Improve review book keeping (#10735)
* Improve review book keeping

* Cleanup

* Cleanup for new labels

* Final cleanup

* Fix sub label checking
2024-03-30 13:45:42 -05:00
Nicolas Mowen
89f843cf95 Implement alerts when a potential problem is detected (#10734)
* Implement alerts on statusbar when a potential problem is detected

* Add alert to mobile
2024-03-30 13:45:13 -05:00
Nicolas Mowen
190cdc471a Recording fixes (#10728)
* Use timerange everywhere and ensure recordings has last 24 hours

* Pause recording when selecting timeline

* Fix loading layout

* Fix updating current time not always working

* Simplify dynamic video player

* Clean up desktop sizing

* Fix current hour

* Make padding consistent

* Improve spacing for extra cameras

* Make back button consistent

* Fix preview player not jumping to correct time

* Dont use useEffect due to preview changing

* Simplify

* Fix transition
2024-03-30 13:44:12 -05:00
Josh Hawkins
7d3b481181 fix missing collapsed prop after refactor (#10751) 2024-03-30 09:51:03 -06:00
JohnEndson
37394fbe19 chore: fix some comments (#10729)
Signed-off-by: JohnEndson <jiayuzhen@outlook.com>
2024-03-30 05:51:41 -05:00
Blake Blackshear
14235c42b9 Remove all AGPL licensed YOLO references from Frigate (#10717)
* Remove yolov8 support from Frigate

* Remove yolov8 from dev

* Remove builds

* Formatting and remove yolov5

* Fix lint

* remove models download

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-03-30 05:46:17 -05:00
Blake Blackshear
b65aa640c9 Remove all AGPL licensed YOLO references from Frigate (#10716)
* Remove yolov8 support from Frigate

* Remove automatic build

* Formatting and remove yolov5

* Formatting

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-03-30 05:44:44 -05:00
Nicolas Mowen
0223d6df60 UI Tweaks (#10727)
* Fix drawer not being scrollable

* Fix margin

* Use 2 columns for large mobile devices

* Move padding

* Add review summary to mobile calendar

* Make header spacing consistent between pages

* remove red
2024-03-28 11:53:36 -06:00
Josh Hawkins
36d5e5b45f Timeline tweaks for mobile (#10726)
* add dense prop, combine duplicate code, fix mobile bug

* put segment height in hook

* playground
2024-03-28 10:03:06 -05:00
Nicolas Mowen
985b2d7b27 Cleanup event filters (#10724)
* Add specific button / switch for showing reviewed items and use intermediate drawer for mobile

* Match design for filters
2024-03-28 09:43:05 -05:00
Nicolas Mowen
35ecb342bb Fix inconsistent spacing (#10714)
* Fix inconsistent spacing

* Fix motion button alignment
2024-03-28 07:49:38 -05:00
Nicolas Mowen
f3abc590e7 Fix camera list not scrolling (#10713) 2024-03-27 18:24:41 -05:00
Nicolas Mowen
4e800e19ff Mobile recordings redesign (#10711)
* Only show back button text on desktop

* Add mobile camera drawer to separate component

* Use bottom sheet for export on mobile

* Add intermediary mobile bottom sheet

* fix filter

* Fix mobile layout jumping

* Fix desktop vertical camera view

* Fix horizontal camera list

* Add overlay instead of using same button for timeline exports

* Don't use native hls for now

* Fix export bottom sheet

* Fix scrolling

* Simplify checks

* Adjust hls compat approach

* Fix events shadow

* Make corners consistent

* Make corners consistent

* fix max drawer height

* Use separate buttons for export control

* Add icons

* Fix list views

* Fix new items to review

* bottom padding on bottom sheets

* bottom padding on bottom sheets
2024-03-27 18:03:05 -05:00
Nicolas Mowen
559e6910c4 Improve restart timing (#10709) 2024-03-27 10:03:13 -05:00
Nicolas Mowen
d5989c91a8 Make deleting review items delete recordings as well (#10707)
* Make deleting review items delete recordings as well

* Fix wrong camera bug
2024-03-27 08:22:28 -05:00
Josh Hawkins
98a1e6ee22 fix draggable element pixel alignment (#10708) 2024-03-27 07:21:38 -06:00
Nicolas Mowen
d945e77443 Quick UI fixes (#10695)
* Quick fixes

* remove log
2024-03-26 18:54:00 -06:00
Nicolas Mowen
8f69edeb33 Add ability to export from recordings page (#10692)
* Add dialog to export recordings

* Add export dialog functionality

* Add ability to name exports

* Add ability to choose custom time range on timeline

* Add ability to choose custom time range on timeline

* Add custom time selection

* Make hot keys optional for typing name of export

* Tweaks to dialog

* Tweaks to dialog

* round corners more

* Final tweaks
2024-03-26 15:37:45 -06:00
Josh Hawkins
c82ed43c13 Timeline tweaks (#10693)
* make segment height static

* fix timeline overscrolling

* better alignment of motion timeline segments
2024-03-26 15:36:28 -06:00
Nicolas Mowen
1377d33e25 Redesign Recordings View (#10690)
* Use full width top bar

* Make each item in review filter group optional

* Remove export creation from export page

* Consolidate packages and fix opening recording from event

* Use common type for time range

* Move timeline to separate component

* Add events list view to recordings view

* Fix loading of images

* Fix incorrect labels

* use overlay state for selected timeline type

* Fix up for mobile view for now

* replace overlay state

* fix comparison

* remove unused
2024-03-26 15:03:58 -06:00
Josh Hawkins
1cd374d3ad add option to only scrollintoview initially (#10689) 2024-03-26 10:29:07 -06:00
Josh Hawkins
6fbd272acf Add tooltips for review item chips (#10685)
* tooltips for review item chips

* use flexbox instead of margins
2024-03-26 07:07:49 -06:00
Josh Hawkins
bc6b4c38b8 improve timeline scrolling with dynamic speed (#10677) 2024-03-25 20:29:42 -06:00
Nicolas Mowen
30d93e1d90 Improve refreshing of review items (#10675) 2024-03-25 21:25:06 -05:00
dependabot[bot]
7b7d3c56cc Bump pytz from 2023.3.post1 to 2024.1 in /docker/main (#9592) 2024-03-25 18:08:31 -06:00
Josh Hawkins
71c7504de5 fix timeline upward scrolling limit (#10673) 2024-03-25 14:56:20 -06:00
Nicolas Mowen
6dd6ca5de5 Only allow visible cameras to go live on dashboard (#10671)
* Only show live cameras that are currently visible

* Add back black background

* fix
2024-03-25 15:56:13 -05:00
Josh Hawkins
51db63e42b Motion review changes (#10667)
* Add outlines in motion only mode

* fix playground
2024-03-25 10:19:55 -06:00
Nicolas Mowen
258cd5b6d7 Include which cameras detected motion during aggregated data (#10663) 2024-03-25 11:00:28 -05:00
Josh Hawkins
7b64091128 Motion review playback optimizations (#10659)
* handle motion timestamps with ranges

* check for overlaps when checking segment for events

* rename motion color vars to significant_motion for consistency

* safelist significant_motion

* rename vars for clarity and use timeout instead of interval
2024-03-24 20:37:44 -06:00
dependabot[bot]
24d29dd32c Bump dependabot/fetch-metadata from 1 to 2 (#10607)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1 to 2.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1...v2)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-24 19:55:15 -06:00
Josh Hawkins
37f60f7140 UI changes (#10651)
* Check if event time is in segment

* conditionally render minimap bounds for event segments
2024-03-24 11:39:28 -06:00
Nicolas Mowen
0fda7147be UI tweaks (#10645)
* Use green chip instead of dimming to show that item has been reviewed

* Redesign log page to use similar style to events

* Use icon only in mobile

* Remove unused
2024-03-24 12:23:39 -05:00
Josh Hawkins
f91dc37399 Add outline for alerts/detections in motion review (#10642) 2024-03-24 06:54:34 -06:00
Nicolas Mowen
d260c6926a Fix safari preview transition (#10638) 2024-03-23 18:47:25 -05:00
Nicolas Mowen
e3a7aa6b6c Smooth transitions between preview scrubbing (#10636)
* Use canvas to save video state before switching to smooth transitions between previews

* Smooth current hour as well
2024-03-23 17:11:35 -06:00
Nicolas Mowen
bb50b2b6f4 Respect motion only when playing back (#10632)
* Respect motion only when playing back motion

* Increase efficiency

* Fix import
2024-03-23 14:49:31 -05:00
Nicolas Mowen
c2a32bd6c1 Make saving preview frames on restart more reliable (#10630)
* increase priority of saving preview frames

* Improve checking for ended recording
2024-03-23 14:45:15 -05:00
Josh Hawkins
3a9607e59b Add relative movement by clicking on camera image for supported ptzs (#10629) 2024-03-23 10:53:33 -06:00
Nicolas Mowen
63bf986e08 Add ability to set playback speed on motion playback (#10628)
* Allow control of playback rate on motion page

* Apply playback rate
2024-03-23 11:24:57 -05:00
Nicolas Mowen
76a114a3cd Rewrite events communication to use zmq instead of mp.Queue (#10627)
* Move to using zmq for events updating

* Use event updater in manual events handler

* Formatting
2024-03-23 11:11:32 -05:00
Josh Hawkins
4159334520 option to show motion only on motion timeline (#10626) 2024-03-23 07:33:50 -06:00
Nicolas Mowen
8e1d18d06b Move keyboard controls to video controls (#10617) 2024-03-22 22:11:50 -05:00
Nicolas Mowen
4cf19458fe Only create docs dependabot PRs for docusaurus deps (#10593)
* Only create docs dependabot PRs for docusaurus deps

* Fix

* Update dependabot.yml
2024-03-22 20:39:30 -06:00
Nicolas Mowen
622dddd2c4 Motion playback (#10609)
* Move controls to separate component and make features configurable

* Allow playback on motion screen

* Simplify layout

* Fix seeking

* Fix playback

* fix preview scrubbing

* Fix player controls visibility

* Use opacity for both dark and light mode
2024-03-22 11:56:53 -05:00
Nicolas Mowen
83517f59b4 WebUI Fixes (#10608)
* Fix camera with -

* Fix not playing player after making slight adjustment

* Fix hovering getting stuck
2024-03-22 09:31:20 -05:00
Nicolas Mowen
df6c3b14dd Make stationary detection more resilient to inaccurate boxes (#10597) 2024-03-21 17:44:26 -05:00
Nicolas Mowen
e5595ebb2f Update docs deps (#10591)
* remove deprecated caution in facor of warning

* Update last dep
2024-03-21 12:52:45 -05:00
Josh Hawkins
0ac7aaabe3 Timeline minimap and scrolling changes (#10589)
* add function to get visible timeline duration

* Don't show minimap when minimap bounds exceed timeline area

* when minimap is hidden, only scroll timeline when needed

* observe only when not showing minimap

* no need to duplicate observer

* fix out of order param

* timeline utils hook props

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-03-21 11:49:04 -06:00
Nicolas Mowen
973275e163 Update rest of web deps (#10588)
* Update easy deps

* Update shadcn deps

* Update date functions and fix breaking change

* Remove unused
2024-03-21 09:26:13 -05:00
Josh Hawkins
4040191101 fixes and changes (#10587) 2024-03-21 08:00:04 -06:00
Nicolas Mowen
865c26ff18 Update recordings view (#10585)
* Update recordings view

* Fix opening recordings view from gif
2024-03-21 08:43:37 -05:00
Josh Hawkins
f113acee33 Summary timeline (#10569)
* implement summary timeline

* implement summary timeline

* merge dev

* conditionally attach listeners only when dragging

* set up listeners with a ref
2024-03-20 20:56:15 -06:00
Nicolas Mowen
c8fd23caa1 Update web deps (#10564) 2024-03-20 20:56:56 -05:00
Nicolas Mowen
8babe57d63 UI cleanup (#10567)
* Fix selected items text

* Use action icons from design and fix spacing

* Fix icons for live grid

* Fix viewed select api

* Setup default theme as system

* Make conig editor respect system theme
2024-03-20 20:46:45 -05:00
Nicolas Mowen
5af083cd8a Web deps again (#10562)
* Bump react-icons from 4.12.0 to 5.0.1 in /web

Bumps [react-icons](https://github.com/react-icons/react-icons) from 4.12.0 to 5.0.1.
- [Release notes](https://github.com/react-icons/react-icons/releases)
- [Commits](https://github.com/react-icons/react-icons/compare/v4.12.0...v5.0.1)

---
updated-dependencies:
- dependency-name: react-icons
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update jsdom

* Update drawer component

* Bump eslint

* Update more deps

* Fix lint

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-20 07:36:58 -06:00
Nicolas Mowen
f474bc4037 Always check previews when refocusing the page (#10546) 2024-03-19 22:16:22 -05:00
Nicolas Mowen
741f0a5115 Update Web deps (#10544)
* Bump react-icons from 4.12.0 to 5.0.1 in /web

Bumps [react-icons](https://github.com/react-icons/react-icons) from 4.12.0 to 5.0.1.
- [Release notes](https://github.com/react-icons/react-icons/releases)
- [Commits](https://github.com/react-icons/react-icons/compare/v4.12.0...v5.0.1)

---
updated-dependencies:
- dependency-name: react-icons
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update jsdom

* Update drawer component

* Bump eslint

* Update more deps

* Fix lint

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 22:06:00 -05:00
Nicolas Mowen
8589ef50a6 Ability to configure loitering time in a zone (#10543)
* Add loitering config

* Configure loitering

* simplify

* Add docs

* grammar

* Formatting
2024-03-19 15:58:04 -05:00
Nicolas Mowen
ab6bac1d2c Clean up selected data for recording (#10537) 2024-03-19 15:56:38 -05:00
Nicolas Mowen
f835e86df1 Don't use apple icon for android pwa (#10535)
* Don't use apple icon for android

* Fix dimensions

* fix icon name
2024-03-19 08:41:24 -05:00
Nicolas Mowen
ccdf9a2f0a Fix preview getting wrong update time (#10534)
* Fix preview getting wrong update time

* remove dead logic

* Cleanup

* Fix case where multiple previews play at the same time

* Fix typing
2024-03-19 08:34:49 -05:00
itsmesid
13b4e5ff41 Add C520WS to ONVIF PTZ camera recommendations. (#10466)
* Add C520WS to onvif supported camera list

* Spelling corrections

* Tapo C210 PTZ is working in version 1.3.11
2024-03-19 06:55:04 -05:00
Alex Yao
5c3925ab50 Add snapshot-clean.png API endpoint (#10510)
* Add snapshot-clean.png API endpoint

* fix lint

* enable on inprogress event
2024-03-19 06:54:25 -05:00
Josh Hawkins
3bd0ad63b4 ensure div by zero is replaced with 0 after normalization (#10528) 2024-03-18 21:21:09 -06:00
Josh Hawkins
d249e5b27f Timeline fixes and export handles (#10522)
* select an export range from timeline

* height tweak
2024-03-18 14:58:54 -06:00
Nicolas Mowen
880bae1eb2 Fix android/chrome seeking on previews (#10512) 2024-03-17 18:53:47 -06:00
Nicolas Mowen
bb6f153e2e Use preview quality setting to set image height and webp quality (#10502)
* Use preview quality setting to set image height and webp quality

* Increase keyframe interval as well with higher quality

* Don't use dynamic height
2024-03-17 18:30:14 -05:00
Josh Hawkins
e4d0e222e3 move handlebar timestamp outside of timeline on mobile (#10501) 2024-03-17 07:28:50 -06:00
Nicolas Mowen
4a360d8142 Fix thumbnails for panoramic cameras (#10499) 2024-03-17 07:31:02 -05:00
Nicolas Mowen
4e7808ac0c Normalize motion data in chunks (#10497) 2024-03-17 07:30:39 -05:00
Nicolas Mowen
1983de6528 Consolidate recordings view into one (#10496) 2024-03-17 07:30:19 -05:00
Nicolas Mowen
4e8600a0ef Maintain existing overlay state when setting hash (#10495) 2024-03-17 07:29:59 -05:00
Nicolas Mowen
cf6ef84271 Mark items as reviewed when manually seeking (#10494) 2024-03-17 07:29:41 -05:00
Josh Hawkins
89bd3867a9 Make all motion segments clickable (#10488) 2024-03-15 19:26:13 -06:00
Nicolas Mowen
c14f3c3902 Fix frigate+ submit and recordings layouts for portrait cameras (#10486)
* Fix plus submission dialog

* Different layout for portrait recordings

* Fix now preview found pulsing

* Fix bug with uneven milliseconds

* Improve consistency of video scaling
2024-03-15 18:28:57 -05:00
Nicolas Mowen
64763293a2 Add birdseye live view (#10485)
* Add birdseye viewer and make it linkable

* Add on click from main dashboard
2024-03-15 18:28:32 -05:00
Nicolas Mowen
657fab2787 Save motion as motion box count (#10484) 2024-03-15 13:13:40 -06:00
Nicolas Mowen
380b15b286 WebUI Fixes (#10481)
* Update previews on the hour

* Allow tap to toggle controls so zooming still works

* Use hash location insteaad of state for live camera view

* Add typing
2024-03-15 13:46:17 -05:00
Nicolas Mowen
93260f6cfd Add region count to database and use for motion activity (#10480)
* Add region count to database and use for motion activity

* Fix test
2024-03-15 09:29:22 -06:00
Josh Hawkins
c93b186eda Fix switching camera group bug (#10478)
* give default group a name

* use "default" as default value

* optional param

* fix string

* clean up
2024-03-15 08:59:41 -06:00
Nicolas Mowen
df0291db5c Fix zoom scaling for live view (#10479) 2024-03-15 09:57:58 -05:00
Nicolas Mowen
f5a26c5962 Add ability to zoom in to live and recordings views (#10475)
* Make live view zoomable

* Add zooming to full recordings
2024-03-15 07:03:14 -06:00
Nicolas Mowen
c66f552280 Improve Recordings loading (#10462)
* Show skeleton until video players finishes loading

* Clean up android logic

* Ensure mobile view video is consistent

* Cleanup

* Only show when not scrubbing

* Don't use loading

* Start preview at correct time too

* Fix react race condition

* Be wait for seek to show video player
2024-03-15 07:52:38 -05:00
Nicolas Mowen
d882cb0f63 Add skeleton for loading exports and improve spacing on bottom sheet (#10463)
* Add skeleton for loading exports and improve spacing on bottom sheet

* Hide non object frigate plus items
2024-03-15 05:59:03 -06:00
Nicolas Mowen
8d85a69203 Update UI and then run api call (#10460) 2024-03-14 15:49:03 -05:00
Nicolas Mowen
61c4ed9f12 Rework motion data calculation (#10459)
* Store motion data as a percent of total area

* Exclude historical data

* Use max so cameras without motion don't invlidate good data:
2024-03-14 13:57:14 -06:00
Josh Hawkins
6a02e65fc2 Use Inter webfont instead of ttf (#10456) 2024-03-14 09:50:06 -06:00
Josh Hawkins
98977f1ded dim motion segments for motion during alerts and detections (#10454) 2024-03-14 09:35:13 -06:00
Nicolas Mowen
45a318dfed Reduce outliers in motion data to ensure consistent scaling (#10452) 2024-03-14 09:31:33 -05:00
Josh Hawkins
39a29d148e Recording scrubbing fixes (#10439)
* use a single source of truth for scrubbing

* simplify controller state

* Cleanup scrubbing logic

* Apply same logic to mobile

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-03-14 08:28:06 -06:00
Nicolas Mowen
2decdeadb4 Persist selected camera group for live (#10448)
* Persist camera group selected

* Cleanup
2024-03-14 08:27:27 -06:00
Blake Blackshear
a660e3ae27 use credentials for webmanifest (#10447) 2024-03-14 06:36:56 -06:00
Nicolas Mowen
8937e3fd59 Mute video by default and allow control of volume (#10435)
* Mute video by default and allow control of volume

* Adjust volume behavior

* Adjust volume behavior

* Simplify more
2024-03-13 18:13:52 -05:00
Nicolas Mowen
c88a263a23 Cleanup gifs (#10434) 2024-03-13 17:37:15 -05:00
Nicolas Mowen
f9ed082e35 Use react lazy to break js files into smaller chunks & remove videojs in favor of hls.js (#10431)
* Use dynamic imports to reduce initial load times

Remove videojs

* Convert to using hls.js instead of videojs

* Improve mobile controls experience

* Cleanup

* Ensure playback rate stays teh same when source changes

* Use webp for latest camera image

* Switch to hls.js on error

* Don't rerun error if hls already tried

* Fix error checking

* also check for media decode error to fallback to HLS

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-03-13 15:24:24 -05:00
Nicolas Mowen
0e8350ea7f Fix jumping to segment in recordings view (#10424)
* Fix skeletons showing incorrectly

* Handle clicking segment from different time range
2024-03-13 09:05:01 -05:00
Nicolas Mowen
52ce6190ae Fix two way talk starting webrtc session (#10422)
* Fix two way talk starting webrtc session

* Remove logs
2024-03-13 09:04:11 -05:00
Josh Hawkins
79ca599ace Fix jsmpeg player component (#10425)
* fix jsmpeg component

* preserve aspect ratio

* remove forcing of jsmpeg

* full height only
2024-03-13 08:00:37 -06:00
Nicolas Mowen
9d01a7dc74 Fix gif layout (#10421) 2024-03-13 08:58:46 -05:00
Nicolas Mowen
b8e472643d Optimize web config to be installed as PWA (#10405)
* Update values and add site manifest

* Use appropriate icon types

* Add purpose to all

* Adjust dark theme color

* Remove unused
2024-03-12 19:58:29 -06:00
Nicolas Mowen
09cf54c731 Improve preview loading (#10406)
* Use skeleton for gif loading

* cache gifs as well

* Show skeleton when switching previews

* Fix touch controls for mobile

* Fix android mobile scrub logic

* Cleanup
2024-03-12 18:19:16 -05:00
Nicolas Mowen
92255f771b Add micropohone button for two way talk (#10408) 2024-03-12 18:19:02 -05:00
Josh Hawkins
9e10b914c9 Add ability to add legacy birdseye to camera groups (#10404)
* initial try

* add birdseye

* remove vite

* cleanup

* memoize

* remove console

* ensure birdseye is actually enabled in config

* birdseye first in select list and fix jsmpeg player size
2024-03-12 13:53:01 -06:00
Josh Hawkins
dce2e9b366 filter review items and motion to be main camera in recordings view only (#10403) 2024-03-12 11:08:31 -06:00
Nicolas Mowen
8c0275fe2f Add special casing for android preview scrubbing (#10398)
* Add special casing for android scrubbing

* Fix motion data
2024-03-12 09:24:18 -06:00
Nicolas Mowen
483a95b06b Override default player controls (#10401)
* Override default player controls

* Improve mouse behavior
2024-03-12 09:24:07 -06:00
Josh Hawkins
a2b0ca07cc UI tweaks (#10402)
* add minor ticks to timeline

* don't display motion events on veritcal bars on motion timeline

* color tweaks and spacing on config editor

* pad start and end of timeline to ensure handlebar is always visible
2024-03-12 09:23:54 -06:00
Nicolas Mowen
579a7c8900 Fix preview update (#10388) 2024-03-11 21:42:13 -05:00
Nicolas Mowen
1c5d6765a1 Preview improvements (#10384)
* Write preview frames as webp instead of jpg and ensure webp are cached in nginx

* Support preview player that shows current hour images

* Update to get preview player working

* Use timestamp based recordings check instead of calendar

* Start motion review from current time

* Adjust layout

* Use preview players for previews

* remove vite

* Cleanup

* Fix up the layout
2024-03-11 18:31:05 -05:00
Josh Hawkins
fa22f01f39 use flexbox for recordings view (#10385) 2024-03-11 17:07:56 -05:00
Nicolas Mowen
8d4b9bc7ed Indicate on calendar which days have unreviewed activity (#10381) 2024-03-11 10:14:41 -05:00
Nicolas Mowen
3515361320 refactor motion calculation (#10380)
* refactor motion calculation

* Use float
2024-03-11 08:53:13 -05:00
Nicolas Mowen
838ef636f8 Layout tweaks (#10365)
* Cleanup review items

* Fix spacing

* Fix -1 text

* Cleanup scroll

* Show activity indicator when review items are null

* Show no preview text when not found

* Add padding to buttons

* Simplify comparisons
2024-03-11 08:05:44 -05:00
Josh Hawkins
cac5bccbe7 Fix segments on motion review (#10370)
* fix segments on motion review

* remove unneeded data attribute
2024-03-11 06:56:36 -06:00
Daniel Harrelson
359e45a748 Update live.md (#10366)
Incorrectly stated tailscale used 100.0.0.0/8 CIDR block.

Correct CIDR block for tailscale in 100.64.0.0/10

RFC6598
2024-03-11 07:13:07 -05:00
Nicolas Mowen
020b09216b Fix image cleanup (#10364) 2024-03-10 14:18:44 -04:00
Nicolas Mowen
ee239744d8 Redesign exports page (#10359)
* Redesign exports page

* Cleanup

* fix overhange
2024-03-10 07:25:16 -06:00
Josh Hawkins
70825bc938 rename vars and change which div is absolutely positioned (#10358) 2024-03-10 07:23:36 -06:00
Nicolas Mowen
efaa95b742 Fix dst offset calculation (#10357) 2024-03-10 08:17:48 -05:00
Nicolas Mowen
b910db4f05 Fix handling of recordings and switching cameras (#10351)
* Fix handling of recordings and switching cameras

* mobile switch

* Cleanup

* Cleanup autoplay

* Remove vite
2024-03-10 08:17:09 -05:00
Kyler
e46b020395 Fix: rename docker images and tags in Jetson configuration docs (#10263)
* rename docker image tags in configuration docs for jetson, add correct image in sample codeblocks, fix typo in 'come'

The image names/tags for Jetson instructions were incorrect. I have updated the docs to point to the correct images.

* revert jetson docs phrasing to properly refer to Jetpack docker images
2024-03-09 15:01:09 +00:00
Josh Hawkins
9fc1286568 Don't check autotracking onvif requirements for users with autotracking disabled (#10350)
* separate autotracking onvif needs from standard ptz control setup

* try/except around GetServiceCapabilities call
2024-03-09 08:48:31 -06:00
Nicolas Mowen
62d13024f6 Adjustments and fixes (#10346)
* Increase duration of alerts and detections

* Add key

* Fix cancel button

* Fix motion review when switching days

* Add reset buttons and make calendar apply immediately

* Adjust apis for motion and audio activity

* Write review thumbs as webp and reduce size
2024-03-09 07:08:06 -07:00
Nicolas Mowen
eeb2187b97 Separate extra amd64 builds (#10319) 2024-03-09 06:04:57 -06:00
Nicolas Mowen
a50e955b3e Add job to delete old images (#10332) 2024-03-09 06:04:17 -06:00
Tacheev Alexey
034aaa7ef7 Fixed incorrect label link (#10342) 2024-03-09 06:03:40 -06:00
Nicolas Mowen
c721e7cfa9 fix preview comparison (#10338) 2024-03-08 17:45:42 -06:00
Nicolas Mowen
f7122a766e Ensure at least 2 frames are saved per minute in preview video (#10337)
* simplify

* Formatting
2024-03-08 17:24:47 -06:00
Nicolas Mowen
086eb37ece Cleanup to use new preview video player in dynamic player (#10335)
* Cleanup to use new preview video player

* Make it so motion persists the selected time

* Don't jump when player first starts

* Get autoplay working right
2024-03-08 17:24:12 -06:00
Josh Hawkins
05a66ce90d Timeline handlebar tweaks (#10336)
* initial offset click for desktop only

* align start timeline and update pixel math
2024-03-08 15:49:10 -07:00
Nicolas Mowen
3d539c93eb Fix motion review (#10329)
* Break preview only video player out

* Simplify

* Load after current preview changes

* Clear out waiting for seek state

* Start at correct time of hour

* Fix layout for tall video
2024-03-08 11:56:00 -06:00
Nicolas Mowen
ea5cb4fd8b Rework mobile drawers to have a max height (#10330) 2024-03-08 11:14:58 -06:00
Josh Hawkins
cb3045b424 Handlebar dragging fix (#10333)
* account for initial click position on handlebar when dragging

* fix wrong start time in playground
2024-03-08 09:13:42 -07:00
Josh Hawkins
dfab850b61 Better segment clicking (#10321)
* better segment clicking on motion segments

* move handlebar on click when handlebar is showing

* only scroll handlebar if needed
2024-03-07 21:02:29 -07:00
Nicolas Mowen
507c6afa2c Add filters to plus page and fix layout (#10320) 2024-03-07 18:32:26 -06:00
Nicolas Mowen
90a40d2509 Fix motion and recording views (#10318)
* Fix switching between different hours

* Simplify book keeping of different time ranges

* Rewrite player to handle changing of previews outside of video player

* Simplify switching between cameras

* Fix previews causing cameras to not load

* Simplify listeners

* Always clear existing listener
2024-03-07 18:31:43 -06:00
Nicolas Mowen
fc6d6a4e9a Fix layout shifting (#10313)
* Fix layout shifting

* Change value for current data

* Fix motion scrubbing lockout
2024-03-07 10:11:24 -06:00
Nicolas Mowen
8776cdfd5b Tweaks fixes (#10311)
* Save numbers as int instead of string

* Fix hover logic

* Fix delay for new alerts

* Fixup dialog and marking item as uploaded

* Make preview progress larger and easier to grab

* Allow hovering to control preview on desktop
2024-03-07 08:34:11 -06:00
Nicolas Mowen
b2931bcaa9 Remove paging (#10310)
* Remove paging and use reviewed as an internal filter

* Fix new reviews not going away
2024-03-07 08:33:36 -06:00
Nate Meyer
8bfc0c98dc Set Compute Level for CI build (#10276) 2024-03-07 05:59:33 -06:00
Nicolas Mowen
ccb5e05e3e Cleanup overlay state with types and use overlay for severity (#10299) 2024-03-06 19:17:35 -06:00
Nicolas Mowen
3d90f50d84 Ability to add, edit, and delete camera groups in the UI (#10296)
* Add dialog for creating new camera group

* Support adding of camera groups and dynamically updating the config

* Support deleting and edit existing camera groups

* Don't show separator if user has no groups

* Formatting

* fix background
2024-03-06 19:15:50 -06:00
Josh Hawkins
90db27e3c8 Scrolling fixes and motion timeline changes (#10295)
* scrolling updates

* only scroll by 1 segment on desktop
2024-03-06 14:35:10 -07:00
Nicolas Mowen
fb81e44283 UI Tweaks (#10289)
* Use different cursor for dragging preview

* Improve filters UI and add audio labels

* Use switch and adjust colors

* Disable chromecast button and remove dimming

* Change marked reviewed text
2024-03-06 14:49:51 -06:00
Nicolas Mowen
55077a0bc9 Add page for submitting to frigate+ (#10273)
* Add screen for submitting to frigate+

* Fix sizing
2024-03-06 06:24:21 -06:00
Nicolas Mowen
68ed18d3f4 Reviewed buttons (#10271)
* mark items as reviewed when they are opened

* Update api to use json and add button to mark all as reviewed

* fix api so last24 hours has its own review summary

* fix sidebar spacing

* formatting

* Bug fixes

* Make motion activity respect filters
2024-03-05 18:39:37 -06:00
Josh Hawkins
b5edcd2fae better timeline scrolling behavior when dragging (#10269) 2024-03-05 14:53:49 -07:00
Nicolas Mowen
ac9cd72f28 Organize api docs and add new review and preview apis (#10268)
* reorganize api docs into sections

* Add current apis to docs
2024-03-05 15:33:39 -06:00
Josh Hawkins
ed99be0856 Live camera aspect ratio fixes (#10266)
* dynamically manage aspect ratio

* full size

* always use camera aspect ratio for mobile

* no need for different handling for pano cams

* don't set aspect ratio on fullscreen
2024-03-05 13:19:56 -07:00
Nicolas Mowen
7be2923d2d Save previews when restarting (#10261) 2024-03-05 13:56:38 -06:00
Nicolas Mowen
a174d0000f Fix combined build (#10264) 2024-03-05 13:56:12 -06:00
Nicolas Mowen
9e8a42ca0e Motion timeline data (#10245)
* Refactor activity api to send motion and audio data

* Prepare for using motion data timeline

* Get working

* reduce to 0

* fix

* Formatting

* fix typing

* add motion data to timelines and allow motion cameas to be selectable

* Fix tests

* cleanup

* Fix not loading preview when changing hours
2024-03-05 13:55:44 -06:00
Nicolas Mowen
a174d82eb9 Disable hvc check (#10260) 2024-03-05 14:11:08 +00:00
Blake Blackshear
43c623be25 upgrade deps (#10257)
* upgrade web deps

* docs deps

* actions deps
2024-03-05 07:00:27 -06:00
Nate Meyer
390403d957 Pass computes value to libyolo_layer build (#10210) 2024-03-05 06:04:13 -06:00
Nicolas Mowen
30b68e59f2 Multi cam recording view (#10244)
* Split recording view for mobile and desktop and get desktop working

* Get stuff working well

* Handle onclick for video

* Fix camera grid

* set onclick
2024-03-05 06:03:10 -06:00
Nicolas Mowen
bbdb8d36ca Improve review data (#10246)
* Adjust remaining summary items when items are marked as reviewed

* Add api for filtering and show correct number when filtering

* Fix default group config

* Update review summary when data is reloaded

* Fix quick items not getting reviewed
2024-03-05 06:02:34 -06:00
Nicolas Mowen
b4b2162ada Camera groups (#10223)
* Add camera group config

* Add saving of camera group selection

* Implement camera groups in config and live view

* Fix warnings

* Add tooltips to camera group items on desktop

* Add camera groups to the filters for events

* Fix tooltips and group selection

* Cleanup
2024-03-04 16:18:30 -07:00
Josh Hawkins
38e76666e7 Motion timeline updates (#10242)
* adjust segment math

* simplify interp and fix math

* fix math and update dependency

* push debug

* Revert "push debug"

This reverts commit 07c171b341.
2024-03-04 15:18:27 -07:00
Josh Hawkins
282c92c9c8 Motion review timeline (#10235)
* initial motion and audio timeline with dummy data

* initial motion and audio timeline with dummy data
2024-03-04 09:42:51 -07:00
Josh Hawkins
0f168dfc1a fix overflowing review timeline on mobile (#10231) 2024-03-04 06:35:10 -07:00
Josh Hawkins
85ce672b53 add tooltip portal (#10233) 2024-03-04 06:34:23 -07:00
Nicolas Mowen
c2a537ce22 Motion review (#10221)
* Break detection grid into separate function

* Implement backward preview jump and jump lockout

* ensure lockout is engaged when starting

* Add preview only mode to make loading more efficeint

* remove scrollbar and match gaps/margins with live view

* Rewrite dynamic player to use html video for preview and fix grid gaps

* consistent check for aspect ratio for tall cameras

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-03-03 22:21:30 -06:00
Nicolas Mowen
d3f9fd1a60 Review summary (#10196)
* Create review summary api to get information about reviewed and unreviewed events on each day

* remove unused

* Fix tests

* Format tests

* Fix
2024-03-03 18:19:02 -06:00
Nicolas Mowen
fa0f509e18 Fix case where model path is set but not labelmap path (#10215) 2024-03-03 18:17:56 -06:00
Nicolas Mowen
1441a83151 Fix resolution of timeline dragging (#10219) 2024-03-03 18:17:24 -06:00
Josh Hawkins
a515697e08 Use touch events for mobile review timeline (#10212)
* mobile touch events

* rebase

* fix scroll mode

* clean up deps and remove unneeded useeffect

* remove vite
2024-03-03 12:50:38 -07:00
Josh Hawkins
c74eb75554 Update camera activity indicator (#10208)
* new indicator

* create indicators directory and update imports

* create indicators directory and update imports

* remove vite
2024-03-03 09:32:47 -07:00
Josh Hawkins
312dc95156 More intelligent timeline scrolling (#10209)
* more intelligent timeline scrolling

* keep as div
2024-03-03 09:32:35 -07:00
Nicolas Mowen
8645545ef4 Add support for live fullscreen mode (#10191)
* Fix timeline colors

* Add support for full screen mode

* Add support for live view full screen

* Cleanup

* Add border to sidebar and statusbar
2024-03-02 21:59:50 -06:00
Nicolas Mowen
3c4b1fb6f2 Update flask and restructure into api folder with apis put into separate folders (#10193)
* Update flask

* Update flask and break apart different sections into different files

* formatting

* Fix test and add safety check
2024-03-02 22:10:37 +00:00
dependabot[bot]
0022c1aad0 Bump @types/node from 20.11.19 to 20.11.24 in /web (#10168)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.19 to 20.11.24.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 13:37:12 -07:00
dependabot[bot]
d008dd0e27 Bump autoprefixer from 10.4.16 to 10.4.17 in /web (#10129)
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.16 to 10.4.17.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.16...10.4.17)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 13:36:17 -07:00
dependabot[bot]
41da8e8b25 Bump react-router-dom from 6.20.1 to 6.22.2 in /web (#10148)
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.20.1 to 6.22.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.2/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-02 13:35:34 -07:00
Nicolas Mowen
837f30cbf0 Update frontend colors to match style guide (#10188)
* Get main background colors going

* Finish sidebar

* Get light mode colors working

* Adjust icons

* Adjust icons

* remove unused

* Fix mobile colors
2024-03-02 09:00:50 -06:00
vanseforge
64f142a5dd Endpoint for last clip (#9710)
* Added endpoint for last clip

* Update frigate/http.py

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/integrations/api.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update frigate/http.py

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update frigate/http.py

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Formatted with ruff

---------

Co-authored-by: Vader <info@vanse.de>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-03-02 08:36:12 -06:00
Nicolas Mowen
5028a9632e Individual live view (#10178)
* Get live camera view working

* Get ptz working

* Add button for ptz presets

* Add camera feature buttons

* Add button for camera audio

* Cleanup

* Cleanup mobile live

* Only use landscape check on mobile
2024-03-01 18:43:02 -06:00
Nicolas Mowen
a67e970fca Implement scroll lock for previews (#10180)
* Implement scroll lock

* Fix seekbar not working
2024-03-01 17:34:41 -07:00
Nicolas Mowen
ebf34ce378 Revamp multiselect (#10172)
* Just use multiselect for mobile

* Update revamped design and add export to values

* Get actions looking good on mobile and desktop
2024-03-01 11:56:45 -06:00
Josh Hawkins
a49e1bbc64 Timeline handlebar changes (#10170)
* auto scrolling handlebar with preview time

* tablets can show 2 columns on the event view grid

* font sizes

* hide minimap when previewing
2024-03-01 08:36:13 -07:00
Nicolas Mowen
49530dc2e4 Handle case where review spans across two hours (#10169) 2024-03-01 07:19:26 -07:00
Nicolas Mowen
96bf06a7d8 update paho requirement (#10166) 2024-03-01 05:50:57 -07:00
Nicolas Mowen
63d8c3662a Add multiselect and batch actions to review items (#10161)
* Implement context menu for batch operations and implement apis

* reduce preview calculations on rerenders

* Add button to mark above items as reviewed

* Use context menu for mark as reviewed

* Cleanup
2024-02-29 19:53:29 -07:00
Nicolas Mowen
ea9316e770 Update and migrate mqtt to v2 (#10160) 2024-03-01 00:59:47 +00:00
Nicolas Mowen
dcc0886305 Fix tooltips (#10154)
* use portal for tooltips

* Fix tooltips for desktop and mobile nav bars

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-03-01 00:59:26 +00:00
Nicolas Mowen
e7f8bca2c3 Preview player upgrades (#10152)
* Implement manual slider control for previews

* Automatically end preview video on mobile

* Show current time on timeline

* remove z height
2024-03-01 00:58:50 +00:00
Nicolas Mowen
cb30450060 Migrate pydantic to V2 (#10142)
* Run pydantic migration tool

* Finish removing deprecated functions

* Formatting

* Fix movement weights type

* Fix movement weight test

* Fix config checks

* formatting

* fix typing

* formatting

* Fix

* Fix serialization issues

* Formatting

* fix model namespace warnings

* Update formatting

* Format go2rtc file

* Cleanup migrations

* Fix warnings

* Don't include null values in config json

* Formatting

* Fix test

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-02-29 16:10:13 -07:00
Andrew Jackson
a1424bad6c Fix permission error accessing /run/secrets (#10097)
Checks that the service has read access to the directory before trying
to read it
2024-02-28 17:18:34 -06:00
Nicolas Mowen
3bf2a496e1 Fix linter and fix lint issues (#10141) 2024-02-28 16:23:56 -06:00
Nicolas Mowen
b6ef1e4330 Fix reload spamming (#10139) 2024-02-28 14:25:02 -06:00
Nicolas Mowen
d416ae86d7 Fix tall cameras not fitting in current hour frame (#10136) 2024-02-28 14:24:49 -06:00
Nicolas Mowen
b5becad63f Use alerts for live page gifs and allow opening recordings directly from them (#10135)
* Use alerts for gifs at top instead of events

* Add ability to open to recordings from event gif

* cleanup

* Formatting

* Add padding
2024-02-28 14:24:34 -06:00
Josh Hawkins
dce4e3fb0b Make full recordings view usable on mobile (#10134)
* adapt timeline to mobile

* remove unused

* tweaks

* pointer cursor on segments

* make full recordings view look better on mobile

* explicitly set timeline width for md

* button positioning
2024-02-28 08:57:56 -07:00
Nicolas Mowen
a978adc5a9 Fix reload (#10109)
* Fix reloading data

* Don't show new review data when not looking at last 24 hours

* Fix refresh button and no items text

* Cleanup
2024-02-28 08:16:32 -06:00
Nicolas Mowen
8072ce25c6 Use persistence for live layout (#10114)
* Use persistence for live layout

* Fix typing

* Fix persistence typing

* remove type

* More type fixing
2024-02-28 08:16:16 -06:00
Josh Hawkins
485057abc1 Adapt review timeline for mobile devices (#10120)
* adapt timeline to mobile

* remove unused

* tweaks

* pointer cursor on segments
2024-02-28 06:18:08 -07:00
Sjoerd Oostdijck
8034613beb Update cameras.md add tapo C225 camera (#10101) 2024-02-28 03:41:56 +00:00
Andrew Reiter
5edaaceaf2 Fix iOS playback of H.265 clips (#10105)
* Fix iOS playback of H.265 clips

* CI
2024-02-28 03:41:36 +00:00
Nicolas Mowen
9893741990 Update tailwind css and cleanup classNames (#10107)
* Bump tailwindcss from 3.3.5 to 3.4.1 in /web

Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.3.5 to 3.4.1.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.3.5...v3.4.1)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update tailwind css and cleanup

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-28 03:40:57 +00:00
Nicolas Mowen
7fa9a3df42 Update web deps (#10108)
* Bump vitest from 1.0.0 to 1.3.1 in /web

Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 1.0.0 to 1.3.1.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v1.3.1/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump clsx from 2.0.0 to 2.1.0 in /web

Bumps [clsx](https://github.com/lukeed/clsx) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/lukeed/clsx/releases)
- [Commits](https://github.com/lukeed/clsx/compare/v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: clsx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump @vitejs/plugin-react-swc from 3.5.0 to 3.6.0 in /web

Bumps [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/vitejs/vite-plugin-react-swc/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react-swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react-swc/compare/v3.5.0...v3.6.0)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react-swc"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump react-use-websocket from 4.5.0 to 4.7.0 in /web

Bumps [react-use-websocket](https://github.com/robtaussig/react-use-websocket) from 4.5.0 to 4.7.0.
- [Release notes](https://github.com/robtaussig/react-use-websocket/releases)
- [Commits](https://github.com/robtaussig/react-use-websocket/commits)

---
updated-dependencies:
- dependency-name: react-use-websocket
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-28 03:40:08 +00:00
Nicolas Mowen
3fed6a0ab3 Implement swipe gesture instead of autoplay for mobile (#10110)
* Implement swipe gesture instead of autoplay

* Cleanup
2024-02-28 03:39:06 +00:00
Nicolas Mowen
fd24007618 Revamp mobile UI (#10103)
* Simplify nav components

* Allow ability to choose live layout on mobile

* Combine event views

* Undo vite

* Fix autoplay

* Remove import

* Show filters on mobile view

* Spacing

* Don't separate properties
2024-02-27 15:39:05 -06:00
Josh Hawkins
622e9741c0 Review timeline improvements (#10102)
* make event bars clickable

* outline and scroll when segment is clicked

* match outline colors to event type

* hover thumbnails

* make event bars clickable

* outline and scroll when segment is clicked

* match outline colors to event type

* hover thumbnails

* fix merge from rebase

* remove minimap opacity classes

* live player outline colors

* safelist shadow classes
2024-02-27 12:41:26 -07:00
Nicolas Mowen
8663fbba01 Fix autoplay (#10099) 2024-02-27 12:24:15 -06:00
Nicolas Mowen
d94710171d Don't lazy load on iOS and don't use skeleton (#10096)
* Don't lazy load on iOS and don't use skeleton

* Cleanup banner

* All safari
2024-02-27 10:55:14 -06:00
Nicolas Mowen
21defbea9d Rewrite websocket to use tracked state instead of context (#10091)
* Rewrite websocket to use tracked state instead of context

* Cleanup

* Use component for updating items

* Fix scroll update

* Don't save vite
2024-02-27 09:05:28 -07:00
Nicolas Mowen
f95ce913b1 Publish finished reviews to mqtt / ws and use that for source of update banner (#10072)
* Add reviews to frontend

* Update ready when new review is saved

* fix

* Formatting
2024-02-27 06:37:39 -07:00
Florisz
57cddc5372 Update installation.md (#10020)
* Update installation.md

According to the v13 release the config.yml mapping needs to be the entire directory and not only the config.yml file

* Update docs/docs/frigate/installation.md

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2024-02-27 06:08:30 -07:00
Andrew Reiter
00c2caa1b7 Fix erroneous warning (#10070)
Customizing only the detector model path results in the warning
"Customizing more than a detector model path is unsupported." because
`{} is not {}` evaluates to True
2024-02-27 06:48:56 -06:00
JC
7eb89ca67c Add missing frame_time argument to ObjectTracker.match_and_update() (#10079)
And some little type hints
2024-02-27 06:48:01 -06:00
Nicolas Mowen
849f343b25 Reduce rerenders on some components (#10068)
* Remove direct callback

* don't rerender for callback

* Move websocket to top level events

* Be smarter about updating timeago

* Cleanup
2024-02-26 16:08:55 -06:00
Nicolas Mowen
e9076c0213 Show correct time range when time filter is active (#10066)
* Show correct time range when time filter is active

* remove console
2024-02-26 14:47:44 -06:00
Nicolas Mowen
20578de9d0 Conditionally show no items (#10065)
* Conditionally show no items

* Clean up view
2024-02-26 14:47:20 -06:00
Nicolas Mowen
3c5ed474af Add message when there are no items to review (#10064) 2024-02-26 12:00:49 -07:00
Josh Hawkins
93bd9ded88 Faster skeleton with refs (#10063)
* don't load metadata until image has loaded

* correct class name and remove lazy loading pkg

* try refs

* hook

* don't load metadata until image has loaded

* correct class name and remove lazy loading pkg

* try refs

* hook
2024-02-26 11:34:52 -07:00
Nicolas Mowen
1dd904d89a Don't show minimap when view is not scrollable (#10062) 2024-02-26 12:31:21 -06:00
Nicolas Mowen
76ad91f9b5 remove vis timeline (#10059)
* remove vis timeline

* Cleanup playground

* Cleanup

* fix
2024-02-26 12:00:53 -06:00
Josh Hawkins
da04dc0918 Skeleton fixes (#10060)
* don't load metadata until image has loaded

* correct class name and remove lazy loading pkg
2024-02-26 10:55:44 -07:00
Nicolas Mowen
2fd7fe7928 Update web deps (#10058)
* Bump follow-redirects from 1.15.3 to 1.15.5 in /web

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.5.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.5)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump prettier from 3.1.0 to 3.2.5 in /web

Bumps [prettier](https://github.com/prettier/prettier) from 3.1.0 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.1.0...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump monaco-yaml from 4.0.4 to 5.1.1 in /web

Bumps [monaco-yaml](https://github.com/remcohaszing/monaco-yaml) from 4.0.4 to 5.1.1.
- [Release notes](https://github.com/remcohaszing/monaco-yaml/releases)
- [Commits](https://github.com/remcohaszing/monaco-yaml/compare/v4.0.4...v5.1.1)

---
updated-dependencies:
- dependency-name: monaco-yaml
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump swr from 2.2.4 to 2.2.5 in /web

Bumps [swr](https://github.com/vercel/swr) from 2.2.4 to 2.2.5.
- [Release notes](https://github.com/vercel/swr/releases)
- [Commits](https://github.com/vercel/swr/compare/v2.2.4...v2.2.5)

---
updated-dependencies:
- dependency-name: swr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump msw from 2.0.10 to 2.2.1 in /web

Bumps [msw](https://github.com/mswjs/msw) from 2.0.10 to 2.2.1.
- [Release notes](https://github.com/mswjs/msw/releases)
- [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mswjs/msw/compare/v2.0.10...v2.2.1)

---
updated-dependencies:
- dependency-name: msw
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump vite from 5.0.5 to 5.1.4 in /web

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.5 to 5.1.4.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.1.4/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-26 10:21:21 -06:00
Josh Hawkins
8d96111184 Use skeleton for review image loading (#10040)
* don't show chips and date when image is loading

* add skeleton and change observer threshold

* remove debug

* use skeleton for live view too

* old activity indicator looks better on live

* fix gradients and lazy load with skeleton

* fading effects
2024-02-26 09:07:54 -07:00
Nicolas Mowen
4061be602d Automatically skip to next preview / clip when watching full recordings (#10055)
* Fix useEffect and try to load next clip for preview

* Get scrubbing to next preview working

* Handle skipping to next preview
2024-02-26 10:04:56 -06:00
Nicolas Mowen
41194966c7 Delete web-old directory (#10053) 2024-02-26 08:48:04 -07:00
Nicolas Mowen
3f1bd891e4 Use a rolling average of iou to determine if an object is no longer stationary (#9381)
* Use a rolling average of iou to determine if an object is no longer stationary

* Use different box variation to designate when an object is stationary on debug

* In progress

* Use average of boxes instead of average of iou

* Update frigate/track/norfair_tracker.py

Co-authored-by: Blake Blackshear <blake@frigate.video>

---------

Co-authored-by: Blake Blackshear <blake@frigate.video>
2024-02-26 07:37:56 -06:00
Chamila
0a15ef022b Add a section to dev guide on non-local development (#10049)
This adds a section with instructions on editing the source to run the
Web UI against a non-local backend server.

This resolves #10048
2024-02-26 12:15:32 +00:00
f1d094
e9d4e81f77 Updated troubleshooting per request: blakeblackshear#5392 (comment) (#10021)
* Update recordings.md

Updated troubleshooting per request: https://github.com/blakeblackshear/frigate/discussions/5392#discussioncomment-8571128

* Update recordings.md

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2024-02-26 12:15:14 +00:00
Andreas Ehn
b9c0e345e9 Update cameras.md (#10030)
Document Hanwha XNP-6550RH capabilities
2024-02-26 12:14:19 +00:00
Marc Altmann
2aee974e11 Update FFmpeg presets for Rockchip (#10034)
* update Rockchip FFmpeg presets

* disable afbc for rockchip ffmpeg presets

* allow changing aspect ratio
2024-02-26 12:13:42 +00:00
Nicolas Mowen
7b11ff1af6 Fix reviewed filter (#10039) 2024-02-25 15:36:18 -07:00
Nicolas Mowen
4e5546cc78 Fix reviewed filter (#10038) 2024-02-25 15:49:08 -06:00
Nicolas Mowen
9801534f11 Implement Review Filters (#10031)
* Get cameras filter working

* Implement label and review filters

* Fix

* Add time selection

* Cleanup

* Cleanup

* cleanup

* remove commented code

* Fix
2024-02-25 13:04:44 -06:00
Nicolas Mowen
4a7c159a44 Convert preview player to use html5 video (#10016)
* Convert preview player to use html5

* Cleanup

* Increase padding and use constant

* Firefox doesn't support high fps either

* Cleanup

* no need to special case firefox
2024-02-25 12:37:53 -06:00
Jeppe Stærk
47fba0d553 Update onvif table with tapo c220 (#9905)
* Update cameras.md

Tapo C220 added to ONVIF PTZ camera recommendations

* Update docs/docs/configuration/cameras.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-25 06:35:32 -06:00
Nicolas Mowen
7ccc7fb393 Allow 2 fps for previews where active fast objects are detected (#10025)
* Allow 2 fps for previews where active fast objects are detected

* Cleanup
2024-02-25 06:35:11 -06:00
Nicolas Mowen
c7e9fe7234 Live preview gifs should be updated on refocus (#10007) 2024-02-24 07:50:33 -06:00
Josh Hawkins
824e5ec3a3 Use first onvif profile with ptz config (#10012)
* Use zoom space id in Onvif RelativeMove setup (#9859)

* use zoom space id in onvif relativemove setup

* better handle cases when zooming is disabled

* Fix birdseye camera comparison (#9887)

* Format (#9889)

* use first onvif profile with ptz config

* Use zoom space id in Onvif RelativeMove setup (#9859)

* use zoom space id in onvif relativemove setup

* better handle cases when zooming is disabled

* use first onvif profile with ptz config

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-24 06:49:34 -07:00
Nicolas Mowen
d73c8bb90c Fix overlay in safari and firefox (#10015) 2024-02-24 07:48:18 -06:00
Nicolas Mowen
02dfa1222e Fix cross contaimation of labels (#10009) 2024-02-23 19:15:08 -06:00
Nicolas Mowen
318cdeb005 Fade (#10010) 2024-02-23 18:38:57 -06:00
Nicolas Mowen
3621f93d40 Review items right click menu (#10002)
* Add custom context menu for review items

* Only show mark as reviewed when it has not been reviewed

* Fix float comparison
2024-02-23 17:26:26 -07:00
Nicolas Mowen
50ab988d81 Add button to scroll to bottom of logs (#10006)
* Add button to scroll to bottom of logs

* Cleanup
2024-02-23 18:25:00 -06:00
Nicolas Mowen
74a8fee69c Use manual jpg when preview is not finished yet (#9997)
* Use manual jpg when preview is not finished yet

* Ensure safe filename and improve sorting

* Ensure name is correct

* Formatting
2024-02-23 14:38:11 -06:00
Josh Hawkins
64eaf60b24 remove overflow and scrollbar classes from grid (#10000) 2024-02-23 09:39:19 -07:00
Josh Hawkins
de3a6a8738 fix pointer events on review grid (#9998) 2024-02-23 08:30:18 -07:00
Josh Hawkins
7d18c2c03d UI tweaks (#9996)
* various tweaks

* update debounce time

* scroll to top with new events
2024-02-23 06:52:54 -07:00
JC
fc94fcb2ac Setting motion masks to zero, rather than 255, will speed up calibration, as the average frame starts out at zero (#9992) 2024-02-23 06:08:05 -06:00
Josh Hawkins
a6aa5328aa UI fixes (#9986)
* scroll minimap to keep it in view

* remove console log

* change ref

* rebase to dev

* rebase to dev

* rebase to dev

* fix history flexbox and live extra scrollbar

* remove extra class
2024-02-22 20:15:50 -07:00
Nicolas Mowen
f84d2db406 Recordings viewer (#9985)
* Reduce redundant code and don't pull new items when marking as reviewed

* Chunk recording times and run playback

* fix overwriting existing data

* Implement scrubbing

* Show refresh button

* Remove old history

* Fix race condition

* Cleanup handling

* Remove console
2024-02-22 18:03:34 -06:00
Nicolas Mowen
fa57a3db28 No reviews for objects without position changes, create frame initially for detection / alert (#9984) 2024-02-22 18:03:13 -06:00
Josh Hawkins
9d8b568438 timeline zooming demo (#9980) 2024-02-22 09:28:05 -06:00
Josh Hawkins
a5a1a54c55 Expose setter for review timeline handlebar (#9978)
* expose setter for handlebar

* use as much resolution as possible
2024-02-22 08:16:37 -06:00
Nicolas Mowen
746939ed4f Fix safari preview speed and other cleanup (#9976)
* Cleanups and fix safari preview speed on iOS

* Clarifying comment

* Update paging when loading page with no items

* Use chip for detections and show all the time

* make time ago dense

* Be smarter about paging empty

* Fix elevation
2024-02-22 07:08:55 -07:00
Nicolas Mowen
6626b8d758 Show statusbar with cpu and gpu stats (#9968)
* Show statusbar with cpu and gpu stats

* fix gif logic
2024-02-21 20:27:02 -06:00
Nicolas Mowen
33c77d03c7 Reorganize stats (#9960)
* Reorganize stats

* Fix tests
2024-02-21 14:10:28 -06:00
Nicolas Mowen
509e46adc8 Review segment UI (#9945)
* Add ui for events

* Display data for review items

* Use preview thumbnails

* Implement paging

* Show icons for what was detected

* Show progress bar on preview thumbnail

* Hide the overlays on hover and update reviewed status

* Dim previews that have been reviewed

* Show audio icons

* Cleanup preview thumb player

* initial implementation of review timeline

* Use timeout for hover playback

* Break apart mobile and desktop views

* Show icons for sub labels

* autoplay first video on mobile

* Only show the last 24 hours by default

* Rework scrolling to fix nested scrolling

* Final scroll cleanups

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2024-02-21 13:07:32 -07:00
Josh Hawkins
be4b570346 Review timeline bugfixes (#9962)
* fix severity logic

* timestamp line height

* use timestamp for end of timeline instead of duration
2024-02-21 10:58:41 -07:00
Nicolas Mowen
e608297c31 quick db fix (#9946) 2024-02-20 18:53:56 -07:00
Nicolas Mowen
940be5dc6f Create ReviewSegment table in DB for organizing detections to be reviewed (#9918)
* Add review to database

* Create main manager for review segments

* Upsert and maintain review segments

* Update logic for adding new segments

* Add api

* Support deleting review segments on recording cleanup

* Add field for alert labels

* Formatting

* Logic fixes

* Save 16:9 thumbnail for review segment

* Ensure that crop is 16:9

* Fix non detected objects being added

* Only include true positives

* Add sub labels to data
2024-02-20 16:26:09 -07:00
Josh Hawkins
cdd6ac9071 Implement event review timeline (#9941)
* initial implementation of review timeline

* hooks

* clean up and comments

* reorganize components

* colors and tweaks

* remove touch events for now

* remove touch events for now

* fix vite config

* use unix timestamps everywhere

* fix corner rounding

* comparison

* use ReviewSegment type

* update mock review event generator

* severity type enum

* remove testing code
2024-02-20 23:22:59 +00:00
Rob Arnold
aa99e11e1a Autodetect AMD GPUs for VAAPI GPU stats (#9898)
* Add autodetection logic

* Fix formatting

* Add some explanatory comments

* Actually fix lint
2024-02-20 23:21:54 +00:00
Marc Altmann
299511cd9d Update FFmpeg for Rockchip image (#9912)
* update build files

* update ffmpeg presets

* remove fix for HA add-on
2024-02-20 23:21:24 +00:00
Nicolas Mowen
f64ffa3a56 Fix black bar at bottom of previews (#9923) 2024-02-20 23:20:56 +00:00
Nicolas Mowen
dba21b606d Convert config updating and video/audio queues to use zmq (#9893)
* Add config pub / sub pattern

* remove recording from feature metrics

* remove audio and feature metrics

* Check for updates from all cameras

* remove birdseye from camera metrics

* remove motion and detection camera metrics

* Ensure that all processes are stopped

* Stop communicators

* Detections

* Cleanup video output queue

* Use select for time sensitive polls

* Use ipc instead of tcp
2024-02-19 07:26:59 -06:00
John Vandenberg
3cff3a086b fix typos (#9895) 2024-02-17 16:01:50 -06:00
Nicolas Mowen
6476f8ade7 Format (#9889) 2024-02-16 09:35:21 -06:00
Nicolas Mowen
42bf614131 Fix birdseye camera comparison (#9887) 2024-02-16 08:43:46 -06:00
Blake Blackshear
617c728a88 another name fix (#9886) 2024-02-16 06:51:19 -06:00
Blake Blackshear
d1bc90b225 Rename Camera Support.yml to camera-support.yml 2024-02-16 06:48:23 -06:00
Blake Blackshear
170f2ac27f Rename camera support.yml to Camera Support.yml 2024-02-16 06:45:20 -06:00
Blake Blackshear
68e1f4670b Update question.yml 2024-02-16 06:43:32 -06:00
Blake Blackshear
57eed11f39 fix names (#9885) 2024-02-16 06:31:37 -06:00
Blake Blackshear
d38a9f7c6d remove invalid keys (#9884) 2024-02-16 06:18:20 -06:00
Nicolas Mowen
a1b5fb81fd Issue -> discussion (#9830)
* Link to discussions for support

* Move camera support

* Delete .github/ISSUE_TEMPLATE/camera_support_request.yml

* Create config_support.yml

* Delete .github/ISSUE_TEMPLATE/config_support_request.yml

* Delete .github/ISSUE_TEMPLATE/detector_support_request.yml

* Create detector_support.yml

* Move remaining items

* Create question.yml
2024-02-16 06:12:40 -06:00
Josh Hawkins
616eb5f96a Use zoom space id in Onvif RelativeMove setup (#9859)
* use zoom space id in onvif relativemove setup

* better handle cases when zooming is disabled
2024-02-16 06:09:30 -06:00
Martin Weinelt
5720b63d70 Import escape function directly from markupsafe (#9858)
Adds a direct dependency on markupsafe, instead of relying on the
implicit dependency via Flask.

This is in preparation of Flask 3.0 support, which will drop compat for
importing escape indirectly.
2024-02-16 06:08:44 -06:00
Nicolas Mowen
dd3dc7949a Use zmq for inter process communication (#9309)
* Use zmq for inter process communication

* Use localhost for reply and request

* Use pyobj instead of json and Need to use separate requestors for each audio listener

* Cleanup port defining
2024-02-14 18:24:36 -06:00
Blake Blackshear
198dbbdff1 Merge remote-tracking branch 'origin/master' into dev 2024-02-14 18:20:55 -06:00
Nicolas Mowen
8c4811ed69 Use webrtc for safari live view (#9839)
* Move safari function

* Use webrtc for safari

* Use taller aspect ratio for tall thumbnails

* Simplify thumbnail sizing

* Use correct aspect ratio on all devices
2024-02-14 18:19:55 -06:00
Blake Blackshear
bad80a64ef Fix builds (#9852)
* show images for troubleshooting

* more debug and try max space action

* fixes

* oops

* maximize first

* mount build volume for docker use

* moved to shared setup and cleanup

* remove temp branch

* remove rocm for master
2024-02-14 18:16:53 -06:00
Josh Hawkins
764736b223 update dev builds message (#9853) 2024-02-14 18:12:33 -06:00
Josh Hawkins
fa384a7f9d ensure jsmpeg canvas is rounded and clipped (#9842) 2024-02-13 23:25:28 +00:00
Nicolas Mowen
ac0059cc1a Make default region multiplier consistent (#9685)
* Make default region multiplier consistent

* Adjust tests
2024-02-13 23:25:00 +00:00
Nicolas Mowen
63bc1b1582 Improve thumbnails and live player (#9828)
* Don't show gif until event is over and fix aspect

* Be more efficient about updating events

* ensure previews are sorted

* Don't show live view when window is not visible

* Move debug camera to separate view

* Improve jpg loading

* Ensure still is updated on player live finish

* Don't reload when window not visible

* Only disconnect instead of full remove

* Use start time instead of event over to determine gif
2024-02-13 01:28:36 +00:00
lawm
e93e5ed931 docs: fix links to full configuration reference (#9808) 2024-02-12 17:38:55 -06:00
Josh Hawkins
f54cb21bd0 UI changes (#9823)
* fix button within button

* add subtle overlay gradient

* try disconnecting to improve memory usage

* rounded corners on gradients
2024-02-12 17:34:45 -06:00
harakas
09153a154a ci: rocm builds (#9796) 2024-02-12 06:24:02 -06:00
Michael Scheiffler
77e77775b2 Added documentation for time-lapse export (master) (#9804)
* Added documentation for time-lapse export (master)

* Changed accoring to review comments

* Update docs/docs/configuration/record.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/record.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-12 06:23:48 -06:00
Blake Blackshear
f4a44fd93c remove reference to the term credit (#9799) 2024-02-11 16:40:35 +00:00
Nicolas Mowen
b9e20fc833 Fix gif creation and add better error handling (#9797)
* Add better error handling

* Fix end_ts logic

* Formatting
2024-02-11 08:06:16 -06:00
Nicolas Mowen
bcbea8da7d Create API to create gif from previews and show instead of still thumbnails (#9786)
* Start working on animation

* Change output file

* Create preview gif

* Show animated gif for event thumb

* Remove favorite

* Cleanup
2024-02-11 07:23:45 -06:00
Josh Hawkins
9de09f6cdf fix tooltips on mobile and make 2-row cameras full height (#9787) 2024-02-11 06:30:52 -06:00
Matt Brown
89f4db617a Docs: Fix and clarify which /dev/video devices to use with Raspberry Pi (#9509)
* Docs: Fix and clarify which /dev/video devices to use with Raspberry Pi

* Update docs/docs/configuration/hardware_acceleration.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/hardware_acceleration.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-10 13:44:52 -06:00
printplaatreparatie
b5aaa6759a Revise VSCode hostname info in docs (#9709)
* Revise VSCode hostname info in docs

* Fix misplaced backtick

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-10 13:43:24 -06:00
Sven-Hendrik Haase
54bbad12f8 Mention that AMD CPUs work just fine with OpenVINO (#9740)
* Mention that AMD CPUs work just fine with OpenVINO

* Doc consistency fixes
2024-02-10 13:42:32 -06:00
Josh Hawkins
dc2e8f7f70 Onvif: skip non-video profiles in setup (#9708)
* use first h264 onvif profile

* error if profile remains unset

* move create_ptz_service call

* add profile logger debug
2024-02-10 13:41:24 -06:00
harakas
cd5f4b1534 detectors/edgetpu: yolov8 support (#9782)
* detectors/edgetpu: add support for yolov8 models

* docs: edgetpu yolov8 running

* docs: edgetpu yolov8 attribution and language

* Update docs/docs/configuration/object_detectors.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-10 13:39:28 -06:00
Maximo Guk
86341c3172 Add error handling for unsupported label uploading to frigate+ (#9775) 2024-02-10 13:35:17 -06:00
Nicolas Mowen
91cdf64602 Birdseye enhancements (#9778)
* Center single camera view

* Implement scaling factor

* Add config for maximum number of cameras

* Add config for inactivity threshold

* update docs
2024-02-10 11:55:13 -06:00
harakas
cad7cdfb7e download-models: fix startup failure caused by unset variable (#9781) 2024-02-10 11:54:18 -06:00
Josh Hawkins
2d22800a3d Set aspect ratios on live display (#9780)
* set aspect ratios on live display

* try 8/9
2024-02-10 16:28:23 +00:00
harakas
44d8cdbba1 AMD GPU support with the rocm detector and YOLOv8 pretrained model download (#9762)
* ROCm AMD/GPU based build and detector, WIP

* detectors/rocm: separate yolov8 postprocessing into own function; fix box scaling; use cv2.dnn.blobForImage for preprocessing; assert on required model parameters

* AMD/ROCm: add couple of more ultralytics models; comments

* docker/rocm: make imported model files readable by all

* docker/rocm: readme about running on AMD GPUs

* docker/rocm: updated README

* docker/rocm: updated README

* docker/rocm: updated README

* detectors/rocm: separated preprocessing functions into yolo_utils.py

* detector/plugins: added onnx cpu plugin

* docker/rocm: updated container with limite label sets

* example detectors view

* docker/rocm: updated README.md

* docker/rocm: update README.md

* docker/rocm: do not set HSA_OVERRIDE_GFX_VERSION at all for the general version as the empty value broke rocm

* detectors: simplified/optimized yolov8_postprocess

* detector/yolo_utils: indentation, remove unused variable

* detectors/rocm: default option to conserve cpu usage at the expense of latency

* detectors/yolo_utils: use nms to prefilter overlapping boxes if too many detected

* detectors/edgetpu_tfl: add support for yolov8

* util/download_models: script to download yolov8 model files

* docker/main: add download-models overlay into s6 startup

* detectors/rocm: assume models are in /config/model_cache/yolov8/

* docker/rocm: compile onnx files into mxr files at startup

* switch model download into bash script

* detectors/rocm: automatically override HSA_OVERRIDE_GFX_VERSION for couple of known chipsets

* docs: rocm detector first notes

* typos

* describe builds (harakas temporary)

* docker/rocm: also build a version for gfx1100

* docker/rocm: use cp instead of tar

* docker.rocm: remove README as it is now in detector config

* frigate/detectors: renamed yolov8_preprocess->preprocess, pass input tensor element type

* docker/main: use newer openvino (2023.3.0)

* detectors: implement class aggregation

* update yolov8 model

* add openvino/yolov8 support for label aggregation

* docker: remove pointless s6/timeout-up files

* Revert "detectors: implement class aggregation"

This reverts commit dcfe6bbf6f.

* detectors/openvino: remove class aggregation

* detectors: increase yolov8 postprocessing score trershold to 0.5

* docker/rocm: separate rocm distributed files into its own build stage

* Update object_detectors.md

* updated CODEOWNERS file for rocm

* updated build names for documentation

* Revert "docker/main: use newer openvino (2023.3.0)"

This reverts commit dee95de908.

* reverrted openvino detector

* reverted edgetpu detector

* scratched rocm docs from any mention of edgetpu or openvino

* Update docs/docs/configuration/object_detectors.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* renamed frigate.detectors.yolo_utils.py -> frigate.detectors.util.py

* clarified rocm example performance

* Improved wording and clarified text

* Mentioned rocm detector for AMD GPUs

* applied ruff formating

* applied ruff suggested fixes

* docker/rocm: fix missing argument resulting in larger docker image sizes

* docs/configuration/object_detectors: fix links to yolov8 release files

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-02-10 06:41:46 -06:00
Nicolas Mowen
64988c9be0 Streamline live view (#9772)
* Break out live page

* Improving layouts and add chip component

* Improve default camera player sizing

* Improve live updating

* Cleanup and fit figma

* Use fixed height

* Masonry layout

* Fix stuff

* Don't force heights

* Adjust scaling

* Cleanup

* remove sidebar (#9731)

* remove sidebar

* keep sidebar on mobile for now and add icons

* Fix revalidation

* Cleanup

* Cleanup width

* Add chips for activity on cameras

* Remove dashboard from header

* Use Inter font (#9735)

* Show still image when no activity is occurring

* remove unused search params

* add playing check for webrtc

* Don't use grid at all for single column

* Fix height on mobile

* a few style updates to better match figma (#9745)

* Remove active objects when they become stationary

* Move to sidebar only and make settings separate component

* Fix layout

* Animate visibility of chips

* Sidebar is full screen

* Fix tall aspect ratio cameras

* Fix complicated aspect logic

* remove

* Adjust thumbnail aspect and add text

* margin on single column layout

* Smaller event thumb text

* Simplify basic image view

* Only show the red dot when camera is recording

* Improve typing for camera toggles

* animate chips with react-transition-group (#9763)

* don't flash when going to still image

* revalidate

* tooltips and active tracking outline (#9766)

* tooltips

* fix tooltip provider and add active tracking outline

* remove unused icon

* remove figma comment

* Get live mode working for jsmpeg

* add small gradient below timeago on event thumbnails (#9767)

* Create live mode hook and make sure jsmpeg can be used

* Enforce env var

* Use print

* Remove unstable

* Add tooltips to thumbnails

* Put back vite

* Format

* Update web/src/components/player/JSMpegPlayer.tsx

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Co-authored-by: Blake Blackshear <blake@frigate.video>
2024-02-10 05:30:53 -07:00
Stephen Advincula
f6a4c2a7b3 bump go2rtc to 1.8.5 (#9487) 2024-02-06 06:52:20 -06:00
Josh Hawkins
92a0705b03 show version in production builds (#9602) 2024-02-05 17:55:08 -06:00
Nicolas Mowen
f4310862aa WebUI Improvements and fixes (#9613)
* Show toast instead of text for success and errors

* Show correct times

* Start playing next hour when current hour ends

* Fix refreshing camera image

* Fix timeline
2024-02-05 17:54:08 -06:00
Nicolas Mowen
00804a0f81 Don't fail if message is received before websocket start (#9634) 2024-02-05 17:53:16 -06:00
Josh Hawkins
a33f2f117e more robust onvif checks (#9635) 2024-02-05 17:52:47 -06:00
Nicolas Mowen
50563eef8d Nms optimize for stationary cars (#9684)
* Use different nms values for different object types

* Add tests

* Format tests
2024-02-05 17:52:06 -06:00
Nicolas Mowen
97a619eaf0 Update Makefile for 0.13.2 (#9687) 2024-02-05 17:50:35 -06:00
Josh Hawkins
3df8b5829c Small autotracking changes (#9571)
* ignore web-new

* remove web-new

* catch exceptions for unsupported cameras

* don't split up large ptz movements

* fix ruff
2024-02-02 06:23:14 -06:00
Nicolas Mowen
2d0864c723 Adjust kalman filter used for norfair tracker (#9538)
* Adjust kalman filter

* Add comment

* Formatting
2024-02-02 06:22:56 -06:00
Nicolas Mowen
c5819478d3 Web & ffmpeg bug fixes (#9525)
* Fix scaling for long timeline lists

* Better handle taller video in player

* Fix birdseye options

* Fix ffmpeg auto detect
2024-02-01 06:44:10 -06:00
Nicolas Mowen
af3f6dadcb Improve graph using pandas (#9234)
* Ensure viewport is always full screen

* Protect against hour with no cards and ensure data is consistent

* Reduce grouped up image refreshes

* Include current hour and fix scrubbing bugginess

* Scroll initially selected timeline in to view

* Expand timelne class type

* Use poster image for preview on video player instead of using separate image view

* Fix available streaming modes

* Incrase timing for grouping timline items

* Fix audio activity listener

* Fix player not switching views correctly

* Use player time to convert to timeline time

* Update sub labels for previous timeline items

* Show mini timeline bar for non selected items

* Rewrite desktop timeline to use separate dynamic video player component

* Extend improvements to mobile as well

* Improve time formatting

* Fix scroll

* Fix no preview case

* Mobile fixes

* Audio toggle fixes

* More fixes for mobile

* Improve scaling of graph motion activity

* Add keyboard shortcut hook and support shortcuts for playback page

* Fix sizing of dialog

* Improve height scaling of dialog

* simplify and fix layout system for timeline

* Fix timeilne items not working

* Implement basic Frigate+ submitting from timeline
2024-01-31 12:56:11 +00:00
Nicolas Mowen
9c4b69191b Add graph showing motion and object activity to history timeline desktop view (#9184)
* Add timeline graph component

* Add more custom colors and improve graph

* Add api and data

* Fix data sorting

* Add graph to timeline

* Only show timeline for selected hour

* Make data full range
2024-01-31 12:56:11 +00:00
Nicolas Mowen
6dd9d54f70 UI Fixes (#9177)
* Fix mobile crash

* Reduce tap timeout

* Fix selection

* Try to fix safari empty frame

* Fix config editor
2024-01-31 12:56:11 +00:00
Josh Hawkins
d2ab44ce72 Reactify MSE player component (#9163)
* make mse a functional component with react hooks

* iOS 17 fixes

* birdseye mse

* remove debug

* fix test
2024-01-31 12:56:11 +00:00
Nicolas Mowen
160e331035 Improve desktop timeline view (#9150)
* Break apart mobile and desktop timeline views

* Set aspect ratio for player correctly

* more modest default width

* Add timeline item card

* Get video player to fit

* get layout going

* More work on youtube view

* Get video scaling working

* Better dialog sizes

* Show all timelines for day

* Add full day of timelines

* Improve hooks

* Fix previews

* Separate mobile and desktop views and don't rerender

* cleanup

* Optimizations and improvements

* make preview dates more efficient

* Remove seekbar and use timeline as seekbar

* Improve background and scrubbing
2024-01-31 12:56:11 +00:00
Nicolas Mowen
0ee81c7526 Automatically detect hwaccel args (#9142)
* Automatically detect nvidia / vaapi hwaccel args

* Update docs

* Use auto for hwaccel args

* Formatting
2024-01-31 12:56:11 +00:00
Nicolas Mowen
a946a8f099 Refactor history viewer to show player / timeline for full hour and use preview while scrubbing timeline (#9051)
* Move history card view to separate view and create timeline view

* Get custom time scrubber working

* Add back nav

* Show timeline bounding boxes

* Implement seeking limiter

* Use browser history to allow back button to close timeline viewer

* Fix mobile timeline and add more icons for detections

* Play when item is initially visible
2024-01-31 12:56:11 +00:00
Nicolas Mowen
9a0dfa723a Add logs to new webui (#9118)
* Add logs to new webui

* Automatically refresh logs while viewing

* Clean up hooks
2024-01-31 12:56:11 +00:00
Nicolas Mowen
9efb6b1caf Add mse live view (#9117) 2024-01-31 12:56:11 +00:00
Pierre Belanger
15f79d91e3 Remove deprecated RTMP port 1935 (#9137) 2024-01-31 12:56:11 +00:00
Nicolas Mowen
928dbd8335 Update dashboard cameras dynamically (#9100)
* Automatically update camera image when detecting objects and show activity indicators

* Update ws typing

* Cleanup type
2024-01-31 12:56:11 +00:00
Josh Hawkins
d430b99562 Autotracking: better handle objects that touch frame edges (#9062)
* handle edge cases better

* don't lowercase status strings

* ruff formatting
2024-01-31 12:56:11 +00:00
Nicolas Mowen
a1e5c658d5 Add support for filtering history page and add support for creating timeline entries for audio / custom events (#9034)
* Add filter popover

* Add api filter hook and use UI with filtering

* Get history filtering working for cameras and labels

* Allow filtering on detail level

* Save timeline entries for api events

* reset

* fix width
2024-01-31 12:56:11 +00:00
Nicolas Mowen
feb3ee0703 Allow deletion of history items (#9030)
* Allow deletion of history items

* Remove type
2024-01-31 12:56:11 +00:00
Josh Hawkins
7bec162353 Scrubber UI component (#9036)
* add scrubber and ui playground when running dev

* fix mobile dropdown menu width

* timeline scrubber and revamp for all event handlers
2024-01-31 12:56:11 +00:00
Nicolas Mowen
2236ae5d3b Add jsmpeg support to new webUI and make birdseye default for live page (#8995)
* Add jsmpeg and make birdseye default for live view

* Fix jsmpeg

* Fix
2024-01-31 12:56:11 +00:00
Nicolas Mowen
1a27c7db29 Fix birdseye memory leak (#8992) 2024-01-31 12:56:11 +00:00
Nicolas Mowen
f8d114cd33 Webui cleanups (#8991)
* Fix mobile event timeago

* Reduce preview playback rate for safari browser

* Fix dashboard buttons

* Update recent events correctly

* Fix opening page on icon toggle

* Fix video player remote playback check

* fix history image

* Add sticky headers to history page

* Fix iOS empty frame

* reduce duplicate items and improve time format

* Organize data more effictively and ensure data is not overwritten

* Use icon to indicate preview
2024-01-31 12:56:11 +00:00
Blake Blackshear
bdebb99b5a Use new UI (#8983)
* fixup build

* swap frontends
2024-01-31 12:56:11 +00:00
Nicolas Mowen
a2c6f45454 Camera dashboard (#8981)
* Show camera dashboard

* Cleanup

* Cleanup

* Cleanup

* Cleanup

* fix

* Fix input color

* Show recent events on dashboard
2024-01-31 12:56:11 +00:00
Nicolas Mowen
3a33090984 Review grid playback (#8971)
* Playback recording when clicking on review item

* Add timeline overlay selector

* Lint fixes

* Lint fixes

* Set video plays inline

* Stop autoplay on open

* Reverse order

* Improve autoplay performance

* Remove chromecast icon by default

* Improve margin and remove lazy image loading to reduce jumping

* Fix root margin for mobile

* Fix scrolling behavior

* Fix width
2024-01-31 12:56:11 +00:00
Nicolas Mowen
e3387de48f Add live views to new webui (#8970)
* Add support for live views

* Lint fixes

* Fix width

* Fix lint

* Cleanup hooks
2024-01-31 12:56:11 +00:00
Nicolas Mowen
fbe58652d5 Improve review grid (#8953)
* Use constant aspect ratio for review grid

* Add infinite scrolling

* Don't have horizontal scrolling

* Handle autoplay for mobile

* Load more efficiently
2024-01-31 12:56:11 +00:00
Nicolas Mowen
1961a0afc1 Support storage page in new ui (#8948)
* Add table and oveview components

* Add toooltips for cards

* Add storage

* Undo
2024-01-31 12:56:11 +00:00
Nicolas Mowen
4524d9440c Add initial implementation of history view in new webui framework (#8895)
* Add support for review grid

* Cleanup reloading on focus

* Adjust timeline api to include metadata and before

* Be more efficient about getting info

* Adjust to new data format

* Cleanup types

* Cleanup text

* Transition to history

* Cleanup

* remove old web implementations

* Cleanup
2024-01-31 12:56:11 +00:00
Nicolas Mowen
c1f14e2d87 Support config editor in new webUI (#8928)
* Add config editor to new webUI and fix double scroll

* Address review comments and enable light theme for vscode
2024-01-31 12:56:11 +00:00
Nicolas Mowen
0e6528a989 Add export page in to new web UI (#8929) 2024-01-31 12:56:11 +00:00
Nicolas Mowen
d2d1278a4d Remove rtmp (#8941)
* remove rtmp from python

* remove rtmp from nginx

* remove rtmp from docs

* fix test for missing role
2024-01-31 12:56:11 +00:00
Josh Hawkins
696434b36d Initial framework for new UI with React/Typescript (#8885)
* Write a low resolution low fps stream from decoded frames (#8673)

* Generate low res low fps previews for recordings viewer

* Make sure previews end on the hour

* Fix durations and decrase keyframe interval to ensure smooth scrubbing

* Ensure minimized resolution is compatible with yuv

* Add ability to configure preview quality

* Fix

* Clean up previews more efficiently

* Use iterator

* Ensure final frame in preview is not duplicated

* initial react/ts framework

* fix gitignore glob excluding ts files

* ignore folders in web-new

* SWRConfig changes for swr 2.x

* use frigateConfig type in websocket handlers

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-01-31 12:56:11 +00:00
Nicolas Mowen
b1cd5f0926 Add external sub label as timeline entry (#8855)
* Add external sub label to timeline

* Include icon

* Update timeline.py

Co-authored-by: Sergey Krashevich <svk@svk.su>

* Formatting

---------

Co-authored-by: Sergey Krashevich <svk@svk.su>
2024-01-31 12:56:11 +00:00
Nicolas Mowen
c716e4b1cb Ensure final frame in preview is not duplicated 2024-01-31 12:56:11 +00:00
Nicolas Mowen
cfda531f5a Write a low resolution low fps stream from decoded frames (#8673)
* Generate low res low fps previews for recordings viewer

* Make sure previews end on the hour

* Fix durations and decrase keyframe interval to ensure smooth scrubbing

* Ensure minimized resolution is compatible with yuv

* Add ability to configure preview quality

* Fix

* Clean up previews more efficiently

* Use iterator
2024-01-31 12:56:11 +00:00
Blake Blackshear
c80b8140b8 increment version 2024-01-31 06:23:54 -06:00
Blake Blackshear
34fb1c2ef5 Increase hash map size (#9515)
* bump version

* increase map hash size
2024-01-31 05:53:59 -06:00
Nicolas Mowen
bf23a21486 Quick fix docs (#9506)
fixes https://github.com/blakeblackshear/frigate/issues/9505
2024-01-30 12:11:43 -06:00
Blake Blackshear
01e2d209d0 Merge pull request #6262 from blakeblackshear/dev
0.13.0 Release
2024-01-30 07:30:11 -06:00
Nicolas Mowen
27567b49db Update go2rtc debug tip (#9463)
closes https://github.com/blakeblackshear/frigate/issues/9187
2024-01-30 06:14:53 -06:00
Blake Blackshear
d15ab0922b Docs updates (#9476)
* revamp plus docs

* consolidate label guidance

* add some common complete config examples

* clarify zone presence

* bottom center example of mask

* update recommended hardware

* update nav

* update getting started

* add openvino example

* explain why we track stationary objects

* move false positive guide to config folder

* fix link

* update record and parked car guide

* tweaks
2024-01-30 06:14:16 -06:00
leccelecce
64a91f552f Add info logging at startup if vacuuming database (#9432) 2024-01-26 07:18:29 -06:00
Kevin David
b1a034fbd4 false_positives.md: expand definition of ratios (#9332)
I found this thread pretty helpful: https://github.com/blakeblackshear/frigate/issues/8350#issuecomment-1782863838

I figured it'd be worth including in the docs themselves.

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2024-01-26 07:17:50 -06:00
Blake Blackshear
61d285ba13 Merge remote-tracking branch 'origin/master' into dev 2024-01-26 07:09:28 -06:00
Nicolas Mowen
65c47531f6 Update record docs to mention UTC (#9248)
* Update record docs to mention UTC

* Update docs/docs/configuration/record.md

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2024-01-26 06:02:26 -07:00
Nicolas Mowen
393f44aac6 Use continuous instead of 24/7 (#9329) 2024-01-26 06:47:02 -06:00
Nicolas Mowen
700c0fb410 Create glossary for commonly used frigate terms (#9356)
* Add glossary with commonly used terms for frigate

* Link back to full docs pages

* Add glossary to sidebar

* Clarifications and grammar fixes

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2024-01-26 12:13:39 +00:00
Alex Errant
346524c660 Add ghcr.io/blakeblackshear/frigate:stable-tensorrt example (#9383) 2024-01-22 05:08:31 +00:00
danielszilagyi
487c626e00 Mention NVR setup (#9404) 2024-01-22 05:07:38 +00:00
Andreas Lindhé
c5ccc0fb08 Fix typo: an environment variables (#9157) 2024-01-03 17:58:40 -06:00
Nicolas Mowen
66701b9cf9 note that only 5MP reolink cameras support the recommended config (#9190)
* Make note that only 5MP and lower reolink cameras support the recommended config

* clarify
2024-01-03 17:40:43 -06:00
Hydromel Victor Doledji
4c1d34f0e9 update docs to clarify variable substitution in go2rtc (#9181)
* update docs to clarify variable substitution in go2rtc

* update to complet

* cleanup spacing

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2024-01-03 17:39:51 -06:00
Nicolas Mowen
86cd97609d Remove mention of restream role from docs (#9176) 2024-01-03 17:39:30 -06:00
Nicolas Mowen
8e419132ea Clean user / pass from stats command line (#9189) 2024-01-03 07:30:25 -06:00
Nicholas Page
49814b34d3 Update Jetson ffmpeg patch for Jetpack 5.1.2 compatibility (#8914) 2023-12-31 07:38:29 -06:00
kaydee123
7b71c21c12 Update reverse_proxy.md (#9070)
Spelling mistake
2023-12-24 19:55:07 +00:00
Nicolas Mowen
c35c7da82a Don't fail if deepstack detector times out (#8979) 2023-12-15 23:25:21 +00:00
Nicolas Mowen
e390533760 Make recording docs more clear about 24/7 recording (#8931)
* Make recording docs more clear about 24/7 recording

* Add note about partial days

* remove `X`
2023-12-12 23:21:06 +00:00
FinnakaLite
64bee7a64f Included caution about Snapcraft docker issues. (#8925)
* Included caution about Snapcraft docker issues.

* Accepted format suggestion from NickM-27

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-12-12 10:48:42 +00:00
Nicolas Mowen
ca4e0dbc75 Fix ffmpeg input arg parsing (#8924) 2023-12-12 10:48:09 +00:00
Nicolas Mowen
ee7eaff965 Don't fail if NaN is returned for segment duration (#8923) 2023-12-12 10:47:40 +00:00
Matti Hiljanen
e512406764 Fix inertia calculation check (#8890) 2023-12-08 07:30:22 -06:00
Josh Hawkins
a4f5ad3a94 Proxy websockets in devcontainers (#8886)
* proxy websockets

* remove whitespace
2023-12-08 01:08:35 +00:00
Blake Blackshear
a47068922f Update deps (#8872)
* update web deps

* update docs deps

* update gh actions
2023-12-07 06:09:20 -06:00
Nicolas Mowen
f8153bdacc Add docs specifically for reolink doorbell (#8851)
* Add docs specifically for reolink doorbell

* Update docs/docs/configuration/camera_specific.md
2023-12-04 18:46:54 -06:00
Nicolas Mowen
0de800a8e5 don't fail on empty producers (#8854) 2023-12-04 18:46:26 -06:00
Nicolas Mowen
ebcf25741b Fix timeline overlay for in progress events (#8852) 2023-12-04 13:43:23 -07:00
Eric M
eed08f534f Update output.py with NTSC DVT, Amcrest DV1 aspect ratio 704x480 (#8835)
* Update output.py with NTSC DVT, Amcrest DV1 aspect ratio 704x480

* linter fix
2023-12-03 03:22:50 +00:00
Nicolas Mowen
da5cf1867b Clarify radeon env variable (#8809)
* Clarify radeon env variable

* Make note consistent for intel as well
2023-12-03 03:15:43 +00:00
Josh Hawkins
cc5297f180 handle onvif connection failure in autotrack init (#8838)
* handle onvif connection failure in autotrack init

* remove whitespace and add consistency

* error message consistency

* more consistency
2023-12-03 03:14:52 +00:00
Nicolas Mowen
f27025aef3 don't fail on go2rtc stream with no url (#8839) 2023-12-03 03:14:30 +00:00
Nicolas Mowen
595fa3d111 Re-add support for go2rtc webrtc api (#8828) 2023-12-01 06:47:09 -07:00
Nicolas Mowen
89051c1b90 Create Edgetpu troubleshooting docs (#8827)
* Link to edgetpu troublehsooting

* Add troubleshooting docs for edgetpu

* Add to sidebar

* Add section about dual edge tpu
2023-12-01 07:41:30 -06:00
Blake Blackshear
f00ced5a33 Show bbox on in_progress events (#8785)
* fix default value in docs

* use default snapshot config for in progress
2023-11-29 23:37:53 +00:00
Nicolas Mowen
9b003e175d Don't incorrectly overwrite score history (#8795) 2023-11-29 23:37:28 +00:00
Blake Blackshear
a490c375f4 Limit exposed go2rtc api to bare minimum (#8762)
* only permit GET requests to go2rtc

* bare minimum go2rtc passthrough

* support frigate card

* expose go2rtc streams data only
2023-11-27 18:25:47 -06:00
Nicolas Mowen
15644a2b0c Fix dark color scheme for exports (#8770) 2023-11-27 18:13:41 -06:00
Marc Altmann
27cf1cdf15 Fix path of device tree on HassOS add on (#8764)
* fix device tree path for HassOS

* fix symlink call

* fix formatting
2023-11-27 18:13:12 -06:00
Jennifer
fef6a7ca74 Update reverse_proxy.md (#8763)
Thhe
2023-11-27 18:12:57 -06:00
Blake Blackshear
5c4501efbc remove mqtt password from config api (#8757) 2023-11-26 15:45:16 -06:00
Justin Dhillon
614a36af9f Fix Broken Links (#8711)
* fixed broken link https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/

* fixed broken link https://www.nginx.com/resources/wiki/start/topics/examples/xsendfile/

* fixed broken link https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_headers

* fixed broken link https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_headers
2023-11-24 07:33:50 -06:00
Blake Blackshear
a0bc3a3626 clarifications to guide based on feedback (#8727) 2023-11-24 07:33:30 -06:00
Nicolas Mowen
18062eca06 Don't fail when tz is incorrect (#8723)
* Don't fail when tz is incorrect

* Fix import
2023-11-23 11:43:02 +00:00
Marc Altmann
1dc42d2904 update github links (#8705) 2023-11-21 23:20:26 +00:00
Sergey Krashevich
500d369c50 Fix: workaround for drawing non-latin characters (#7686)
* Add transliteration support to draw_box_with_label function

* isort
2023-11-21 02:05:51 +00:00
tpjanssen
3dd0192fe6 Add rename exports function to API (#8687)
* Add rename exports function to API

* Update http.py

* Feedback
* Formatting fixes

* Update http.py

Formatting fix

* Update http.py

Lint fix
2023-11-20 19:11:18 -06:00
Marc Altmann
1eb5105b24 Adding go2rtc presets for Rockchip hardware acceleration (#8686)
* add go2rtc presets for rk hw accel

* code formatting

* add docs about go2rtc presets

* Update comment
2023-11-20 19:10:44 -06:00
Sergey Krashevich
463865db55 fix go2rtc run (#8692) 2023-11-20 19:09:40 -06:00
Sergey Krashevich
ea247ca816 go2rtc 1.8.4 (#8691) 2023-11-21 01:07:54 +00:00
tpjanssen
8864e33d1c Customize regions grid overlay API (#8668)
* Customize regions grid overlay

* Update http.py

Fix
2023-11-19 14:51:54 +00:00
trademark789
934b16723b make go2rtc always rebuild config at startup (#8664)
* make go2rtc always rebuild config at startup

/dev/shm can be left mounted (in fact im pretty sure it's always left mounted) on the docker host after shutting down the frigate container.
If we only check that the file doesn't exist, stale data gets re-read every startup 
This will make troubleshooting a nightmare for the average user.

I had given up troubleshooting go2rtc several times because of this.

* generate config after supervisor data is loaded

* Fix fi

* fix fi

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-11-19 07:08:42 -06:00
Blake Blackshear
fc186e4d5f update web deps (#8663) 2023-11-19 05:24:52 -06:00
Nicolas Mowen
7d157dfeb0 Set max value for pre_capture (#8656) 2023-11-18 15:37:06 -06:00
Marc Altmann
977eef9138 fix chrash after restart (#8661) 2023-11-18 15:36:24 -06:00
Josh Hawkins
678f1201c6 use timeout for move queues (#8662) 2023-11-18 15:36:13 -06:00
Blake Blackshear
4879de263b Docs improvements (#8641)
* go all in on ruff

* upgrade docusaurus

* add netlify toml

* broken link

* fix netlify toml

* start filling out guide

* add debian setup detail

* simplify bash command
2023-11-18 08:04:43 -06:00
Marc Altmann
c6208b266b Include libraries and .rknn models for other Rockchip SoCs (#8649)
* support for other yolov models and config checks

* apply code formatting

* Information about core mask and inference speed

* update rknn postprocess and remove params

* update model selection

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* support rknn on all socs

* apply changes from review and fix post process bug

* apply code formatting

* update tip in object_detectors docs

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-11-18 07:53:49 -06:00
Nicolas Mowen
2da99c2308 Improve periodic sync reliability and make it optional (#8647)
* Improve recordings sync reliability

* Cleanup

* Formatting

* Make logs consistent

* Make syncing optional
2023-11-18 06:06:00 -06:00
Tibladar
9ac40cd953 Add H265 preset for Raspberry Pi (#8640)
* Add h265 pi preset to preset docs

* Add h265 pi preset to hardware acceleration docs

* Add preset for raspberry pi h265
2023-11-17 01:09:15 +00:00
Marc Altmann
7522bb6fab Add features to rknn detector (#8631)
* support for other yolov models and config checks

* apply code formatting

* Information about core mask and inference speed

* update rknn postprocess and remove params

* update model selection

* Apply suggestions from code review

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-11-17 01:08:41 +00:00
Josh Hawkins
7b520e8a9d use enabled_in_config for switch in HA integration (#8630) 2023-11-16 01:25:48 +00:00
Nicolas Mowen
cadb1a6a5b Fix reolink link in recommended hardware (#8628) 2023-11-16 01:25:16 +00:00
Nicolas Mowen
97c15f7ef3 Update go2rtc to 1.8.3 (#8627) 2023-11-16 01:24:26 +00:00
Francisco Matias Cuenca-Acuna
9fa70c3455 Add vision pipeline diagram to documentation (#7689)
* Add vision pipeline diagram

* Moved pipeline to the Guides section

* Fixing segment storage and other flows

* Added text

* Update docs/docs/guides/video_pipeline.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Keeping case as other pages

* Changing sections to ##

* Update docs/docs/guides/video_pipeline.md

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

* Update docs/docs/guides/video_pipeline.md

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: cat101 <cat101@nowhere.com>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-11-16 01:23:44 +00:00
Marc Altmann
8c7f6d4a76 Add static FFmpeg with rockchip hardware acceleration to rk- image (#8599)
* add static ffmpeg with rockchip hw accel

* add ffmpeg presets

* fix scaling preset and update docs for rk hwaccel

* update usage info in ffmpeg_presets docs

* Add note about hardware acceleration support

---------

Co-authored-by: MarcA711 <>
2023-11-15 05:41:55 -06:00
Josh Hawkins
266b4099b5 a few small onvif fixes and relativemove debug (#8583) 2023-11-15 05:41:41 -06:00
Sch0field9
a1e68a62d0 Update cameras.md (#8556)
Added Reolink RLC-823A 16x
2023-11-15 05:41:25 -06:00
Nicolas Mowen
8a010fc1f5 Fix vaapi color mapping (#8604) 2023-11-14 00:35:29 +00:00
Nicolas Mowen
563fdec211 Fix safari timezone (#8574)
* Fix safari bad time format

* Fix processing
2023-11-10 18:12:48 -06:00
Nicolas Mowen
3457dcddfe Don't run forever in autotracking (#8579) 2023-11-10 18:12:20 -06:00
Blake Blackshear
57a06d2220 fix image tag (#8560) 2023-11-09 19:02:16 -06:00
Nicolas Mowen
aa93d4fbdd Fix nginx cache (#8558) 2023-11-09 16:09:25 -06:00
Nicolas Mowen
d0036b2f77 Update go2rtc to 1.8.2 (#8459)
* Update go2rtc to 1.8.2

* Update docs for 1.8.2
2023-11-09 06:43:06 -06:00
Nicolas Mowen
1b57f8c7e2 Show error when clicking on image before mask (#8547) 2023-11-09 06:42:19 -06:00
Nicolas Mowen
fa96ec64e4 Detect Resolution Docs (#8542) 2023-11-09 06:41:50 -06:00
Josh Hawkins
e89db13282 fix restart from webui (#8541) 2023-11-08 09:37:54 -07:00
Nicolas Mowen
fe6577736e Tuning Motion guide (#6877)
* start working on motion guide

* Update motion_detection.md

* Add to sidebar

* Add title / ID

* Fix typos

* Fix typos and clarify

* Formatting

* Add default values from reference config for each section

* Small grammar fix

* Move to cameras section

* Updates

* Clarify and improve wording

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-11-08 14:04:27 +00:00
Blake Blackshear
64537672e6 use skopeo to copy images (#8539) 2023-11-08 07:22:23 -06:00
Nicolas Mowen
ef36aabd30 Make output writing asynchronous (#8530)
* Don't wait for frame write in output process

* Formatting

* Handle websocket exception

* Limit camera queeue size to 1 second
2023-11-07 16:24:56 -07:00
Nicolas Mowen
ca84732574 Ensure storage cleanup doesn't fail (#8531) 2023-11-07 23:21:43 +00:00
Nicolas Mowen
0b828ef1ec Only cache json requests with nginx (#8529)
* Only cache json requests

* Use map instead
2023-11-07 23:18:58 +00:00
tpjanssen
3359123364 Performance increase with lots of recordings (#8525)
* Performance increase with lots of recordings

* Formatting + review

* Update 020_update_index_recordings.py

Formatting

* Feedback + check fix

* Update 020_update_index_recordings.py
2023-11-07 23:18:26 +00:00
Nicolas Mowen
cc5357a31a Remove iterator from recordings events (#8522) 2023-11-07 07:02:02 -07:00
Nicolas Mowen
f1b60f76eb Fix go2rtc UDP port default config (#8469)
* Fix go2rtc UDP port

* fix

* Use correct port

* fix comment

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-11-07 11:33:33 +00:00
Nicolas Mowen
f29e152619 Revert TRT class id filtering (#8497) 2023-11-07 11:32:52 +00:00
Nicolas Mowen
92906a500a Fix event only datetime check (#8500) 2023-11-07 11:32:31 +00:00
Nicolas Mowen
257bd89733 Reduce recording info timeout (#8506)
* Decrease timeout

* Use const for queue timeout
2023-11-07 11:32:11 +00:00
Josh Hawkins
1d99bb908d only use max target box for relative zoom limiter (#8509) 2023-11-07 11:31:39 +00:00
Nicolas Mowen
591b91194a Cleanup existing timeline entries (#8495)
* Cleanup existing timeline entries for beta users

* Formatting
2023-11-06 06:43:26 -07:00
Nicolas Mowen
2b2c831253 Set the min region size as the model size (#8486) 2023-11-06 06:45:37 -06:00
tpjanssen
08777100b5 Add /vod and /exports to Vite proxy config (#8490) 2023-11-06 06:44:53 -06:00
Nicolas Mowen
a482160691 Cleanup timeline entries (#8489) 2023-11-06 06:42:10 -06:00
Nicolas Mowen
89dd114da1 Write recording segments to cache with timezone info (#8468)
* Store recording segments with timezone info

* Don't use _

* Use different separator due to timezone
2023-11-05 14:30:29 -06:00
Nicolas Mowen
4c05ef48a7 Add dependabot to tensorrt python deps (#8455) 2023-11-05 14:29:06 -06:00
Nicolas Mowen
14c89c9b63 Fix periodic sync check (#8472)
* Fix periodic sync

* Formatting
2023-11-05 09:28:40 -07:00
Blake Blackshear
65e3e67a83 avoid import error for non-rk builds (#8454)
* avoid import error for non-rk builds

* linter
2023-11-04 07:56:35 -05:00
Nicolas Mowen
63233a5830 Periodically sync for stale recordings (#8433)
* Periodically cleanup recordings files / DB

* Make automatic sync limited ot last 36 hours
2023-11-04 02:21:29 +00:00
Nicolas Mowen
4f7b710112 Don't fail on invalid class IDs for TensorRT detector (#8438)
* Don't fail on invalid class IDs

* Fix whitespace

* Make log warning
2023-11-04 02:19:58 +00:00
coperni
ac53993f70 Add endpoint to restart Frigate (#8440)
* Add endpoint to restart Frigate

The only means of restarting Frigate remotely is to issue
a restart topic on the server's websocket. It's
convenient to also expose this capability via HTTP endpoint.

* Add new section to API docs

* Remove extra line
2023-11-04 02:19:29 +00:00
Josh Hawkins
ef750e73a2 add motion mask recommendation (#8448) 2023-11-04 02:18:43 +00:00
Nicolas Mowen
7270eef6bf Don't fail on 0 rms (#8447) 2023-11-04 02:18:23 +00:00
Marc Altmann
b54aaad382 fix rknn.py (#8434)
Co-authored-by: MarcA711 <>
2023-11-03 00:12:54 +00:00
Josh Hawkins
fc36be4f88 suppress error by overriding class func (#8431) 2023-11-02 23:24:14 +00:00
Blake Blackshear
aefecad4c0 Update deps (#8426)
* update web deps

* other deps
2023-11-02 13:36:49 +00:00
Nicolas Mowen
c57528cbcf Fix rk build (#8430) 2023-11-02 13:36:34 +00:00
Marc Altmann
090294e89b Initial support for rockchip boards (#8382)
* initial support for rockchip boards

* Apply suggestions from code review

apply requested changes

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* requested changes

* rewrite dockerfile

* adjust targets

* Update .github/workflows/ci.yml

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/object_detectors.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/object_detectors.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* add information to docs

* Update docs/docs/configuration/object_detectors.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* format rknn.py

* apply changes from isort and ruff

---------

Co-authored-by: MarcA711 <>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-11-02 12:55:24 +00:00
Nicolas Mowen
a6279a0337 Clean up RPi ffmpeg presets (#8428)
* Clean up rpi ffmpeg presets

* Remove from docs

* Put back encoding
2023-11-02 12:54:51 +00:00
wbradmoore
37b82c0d60 Update getting_started.md (#8420)
fix configuring_go2rtc link
2023-11-02 06:20:19 -05:00
Blake Blackshear
0dd3dd23aa add support for docker secrets (#8409)
* add support for docker secrets

* check for directory first
2023-11-02 05:35:30 -05:00
Blake Blackshear
4bd29b2ee8 fix build tag (#8408) 2023-11-02 05:35:19 -05:00
Nicolas Mowen
cc79cbcadc Improve robustness of storage maintenance (#8411)
* Improve robustness of storage maintenance

* Fix tests

* Fix test
2023-11-01 23:21:59 +00:00
Nicolas Mowen
89366d7b12 Add endpoint to return camera frame with regions grid overlaid (#8413)
* Add endpoint to view grid overload on camera frame

* Add api to docs

* Formatting
2023-11-01 23:21:30 +00:00
Josh Hawkins
6eff08eb2d Add MQTT topic for active autotracking (#8419)
* prevent estimate clipping when autotracking

* use unclipped estimate in distance function only

* remove autotracking velocity changes

* publish on init
2023-11-01 23:20:26 +00:00
tpjanssen
8b6b83bd62 Filtering on Frigate+ submits in frontend (#8344)
* Initial draft for filtering Frigate+ submits in frontend

* Hide filter when Frigate+ is not enabled

* Update http.py

* Revert "Update http.py"

This reverts commit fa292682d6.
2023-11-01 23:19:46 +00:00
Nicolas Mowen
8b6e3a0d37 Fix region when no data in grid (#8415)
* Fix region when no data in grid

* Make comment more clear
2023-11-01 23:19:17 +00:00
tpjanssen
8a9b26df4e Visit camera directly from system page (#8405)
* Visit camera directly from system page

* Processed all feedback

* Changed button caption
2023-11-01 07:08:59 -06:00
tpjanssen
fd6a3bd5d2 API recordings snapsnot PNG fix (#8401)
* Update http.py

* Update http.py

Limit query results
2023-11-01 06:14:51 -05:00
Nicolas Mowen
8085ad4b4c Ensure that birdseye error correction uses a resolution that is divisible by 4 (#8398) 2023-11-01 06:13:12 -05:00
Josh Hawkins
af24eb7dbf Autotracking tweaks (#8400)
* optimize motion and velocity estimation

* change recommended fps and fix config validate

* remove unneeded var

* process at most 3 objects per second

* fix test
2023-11-01 06:12:43 -05:00
Blake Blackshear
d1620b4e39 clean passwords when both rtsp and http present (#8399) 2023-10-31 08:04:42 -05:00
Nicolas Mowen
ba603c1937 Make initialization configurable (#8392) 2023-10-30 20:26:31 -04:00
Nicolas Mowen
e89dafa82e Handle recording checks in utc (#8379)
* Handle recording checks in utc

* Formatting
2023-10-30 20:25:21 -04:00
Nicolas Mowen
9d717b371c Improve logic of birdseye (#8375)
* Improve logic of birdseye

* Formatting
2023-10-30 20:24:42 -04:00
Nicolas Mowen
3d70d29672 Delete export if it fails (#8381)
* Delete export if it fails

* Fix import
2023-10-30 20:24:11 -04:00
Nicolas Mowen
f1efd8dbe2 Use int for drawing box (#8388) 2023-10-30 19:53:29 -04:00
Blake Blackshear
159fb51518 implement nginx caching (#8333)
* implement nginx caching

* bypass cache from frigate frontend, reduce to 5s

* set cache time to 2s

* cache 200s for 5s

* exclude vod endpoints from cache
2023-10-29 06:47:24 -05:00
Blake Blackshear
cd64399fe5 add release workflow for images (#8362) 2023-10-28 10:08:53 -04:00
Blake Blackshear
d72e1c38ae plus docs clarification (#8352) 2023-10-28 10:08:29 -04:00
Sergey Krashevich
979c49fd35 Update build_nginx.sh (#8361) 2023-10-28 06:35:11 -05:00
Miguel Valenzuela
ac41b6e181 Update Output Args Presets AAC (#8161)
* Update Output Args Presets AAC

Upon researching the nuances of preset-record-generic-audio-copy & preset-record-generic-audio-aac

4c7ea01137/frigate/ffmpeg_presets.py (L341)
https://ffmpeg.org/ffmpeg.html#Main-options
https://stackoverflow.com/questions/70148683/will-ffmpeg-try-to-transcode-to-same-encoding

I'd suggest to disambiguate what these two do

* fix: lowercase
2023-10-19 17:14:56 -05:00
805 changed files with 99122 additions and 47237 deletions

View File

@@ -0,0 +1,311 @@
aarch
absdiff
airockchip
Alloc
Amcrest
amdgpu
analyzeduration
Annke
apexcharts
arange
argmax
argmin
argpartition
ascontiguousarray
astype
authelia
authentik
autodetected
automations
autotrack
autotracked
autotracker
autotracking
balena
Beelink
BGRA
BHWC
blackshear
blakeblackshear
bottombar
buildx
castable
cdist
Celeron
cgroups
chipset
chromadb
Chromecast
cmdline
codeowner
CODEOWNERS
codeproject
colormap
colorspace
comms
coro
ctypeslib
CUDA
Cuvid
Dahua
datasheet
debconf
deci
deepstack
defragment
devcontainer
DEVICEMAP
discardcorrupt
dpkg
dsize
dtype
ECONNRESET
edgetpu
fastapi
faststart
fflags
ffprobe
fillna
flac
foscam
fourcc
framebuffer
fregate
frégate
fromarray
frombuffer
frontdoor
fstype
fullchain
fullscreen
genai
generativeai
genpts
getpid
gpuload
HACS
Hailo
hass
hconcat
healthcheck
hideable
Hikvision
homeassistant
homekit
homography
hsize
hstack
httpx
hwaccel
hwdownload
hwmap
hwupload
iloc
imagestream
imdecode
imencode
imread
imutils
imwrite
interp
iostat
iotop
itemsize
Jellyfin
jetson
jetsons
joserfc
jsmpeg
jsonify
Kalman
keepalive
keepdims
labelmap
letsencrypt
levelname
LIBAVFORMAT
libedgetpu
libnvinfer
libva
libwebp
libx
libyolo
linalg
localzone
logpipe
Loryta
lstsq
lsusb
markupsafe
maxsplit
MEMHOSTALLOC
memlimit
meshgrid
metadatas
migraphx
minilm
mjpeg
mkfifo
mobiledet
mobilenet
modelpath
mosquitto
mountpoint
movflags
mpegts
mqtt
mse
msenc
namedtuples
nbytes
nchw
ndarray
ndimage
nethogs
newaxis
nhwc
NOBLOCK
nobuffer
nokey
NONBLOCK
noninteractive
noprint
Norfair
nptype
NTSC
numpy
nvenc
nvhost
nvml
nvmpi
ollama
onnx
onnxruntime
onvif
ONVIF
openai
opencv
openvino
OWASP
paho
passwordless
popleft
posthog
postprocess
poweroff
preexec
probesize
protobuf
pstate
psutil
pubkey
putenv
pycache
pydantic
pyobj
pysqlite
pytz
pywebpush
qnap
quantisation
Radeon
radeonsi
radeontop
rawvideo
rcond
RDONLY
rebranded
referer
reindex
Reolink
restream
restreamed
restreaming
rkmpp
rknn
rkrga
rockchip
rocm
rocminfo
rootfs
rtmp
RTSP
ruamel
scroller
setproctitle
setpts
shms
SIGUSR
skylake
sleeptime
SNDMORE
socs
sqliteq
sqlitevecq
ssdlite
statm
stimeout
stylelint
subclassing
substream
superfast
surveillance
svscan
Swipeable
sysconf
tailscale
Tapo
tensorrt
tflite
thresholded
timelapse
tmpfs
tobytes
toggleable
traefik
tzlocal
Ubiquiti
udev
udevadm
ultrafast
unichip
unidecode
Unifi
unixepoch
unraid
unreviewed
userdata
usermod
uvicorn
vaapi
vainfo
variations
vbios
vconcat
vitb
vstream
vsync
wallclock
webp
webpush
webrtc
websockets
webui
werkzeug
workdir
WRONLY
wsgirefserver
wsgiutils
wsize
xaddr
xmaxs
xmins
XPUB
XSUB
ymaxs
ymins
yolo
yolonas
yolox
zeep
zerolatency

View File

@@ -10,10 +10,14 @@
"features": {
"ghcr.io/devcontainers/features/common-utils:1": {}
},
"forwardPorts": [5000, 5001, 5173, 1935, 8554, 8555],
"forwardPorts": [8971, 5000, 5001, 5173, 8554, 8555],
"portsAttributes": {
"8971": {
"label": "External NGINX",
"onAutoForward": "silent"
},
"5000": {
"label": "NGINX",
"label": "Internal NGINX",
"onAutoForward": "silent"
},
"5001": {
@@ -24,10 +28,6 @@
"label": "Vite Server",
"onAutoForward": "silent"
},
"1935": {
"label": "RTMP",
"onAutoForward": "silent"
},
"8554": {
"label": "gortc RTSP",
"onAutoForward": "silent"
@@ -42,7 +42,6 @@
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"visualstudioexptteam.vscodeintellicode",
"mhutchie.git-graph",
"ms-azuretools.vscode-docker",
@@ -53,13 +52,11 @@
"csstools.postcss",
"blanu.vscode-styled-jsx",
"bradlc.vscode-tailwindcss",
"ms-python.isort",
"charliermarsh.ruff"
"charliermarsh.ruff",
"eamodio.gitlens"
],
"settings": {
"remote.autoForwardPorts": false,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "none",
"python.languageServer": "Pylance",
"editor.formatOnPaste": false,
@@ -72,7 +69,7 @@
"eslint.workingDirectories": ["./web"],
"isort.args": ["--settings-path=./pyproject.toml"],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,

View File

@@ -3,10 +3,12 @@
set -euxo pipefail
# Cleanup the old github host key
sed -i -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31\/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi\/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==/d' ~/.ssh/known_hosts
# Add new github host key
curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | \
sed -e 's/^/github.com /' >> ~/.ssh/known_hosts
if [[ -f ~/.ssh/known_hosts ]]; then
# Add new github host key
sed -i -e '/AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31\/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi\/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==/d' ~/.ssh/known_hosts
curl -L https://api.github.com/meta | jq -r '.ssh_keys | .[]' | \
sed -e 's/^/github.com /' >> ~/.ssh/known_hosts
fi
# Frigate normal container runs as root, so it have permission to create
# the folders. But the devcontainer runs as the host user, so we need to
@@ -17,7 +19,7 @@ sudo chown -R "$(id -u):$(id -g)" /media/frigate
# When started as a service, LIBAVFORMAT_VERSION_MAJOR is defined in the
# s6 service file. For dev, where frigate is started from an interactive
# shell, we define it in .bashrc instead.
echo 'export LIBAVFORMAT_VERSION_MAJOR=$(ffmpeg -version | grep -Po "libavformat\W+\K\d+")' >> $HOME/.bashrc
echo 'export LIBAVFORMAT_VERSION_MAJOR=$(/usr/lib/ffmpeg/7.0/bin/ffmpeg -version | grep -Po "libavformat\W+\K\d+")' >> $HOME/.bashrc
make version

View File

@@ -0,0 +1,138 @@
title: "[Camera Support]: "
labels: ["support", "triage"]
body:
- type: markdown
attributes:
value: |
Use this form for support or questions for an issue with your cameras.
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
[docs]: https://docs.frigate.video
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
validations:
required: true
- type: input
attributes:
label: What browser(s) are you using?
placeholder: Google Chrome 88.0.4324.150
description: >
Provide the full name and don't forget to add the version!
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: frigatelogs
attributes:
label: Relevant Frigate log output
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: go2rtclogs
attributes:
label: Relevant go2rtc log output
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: ffprobe
attributes:
label: FFprobe output from your camera
description: Run `ffprobe <camera_url>` from within the Frigate container if possible, and provide output below
render: shell
validations:
required: true
- type: textarea
id: stats
attributes:
label: Frigate stats
description: Output from frigate's /api/stats endpoint
render: json
- type: dropdown
id: os
attributes:
label: Operating system
options:
- HassOS
- Debian
- Other Linux
- Proxmox
- UNRAID
- Windows
- Other
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
- Proxmox via Docker
- Proxmox via TTeck Script
- Windows WSL2
validations:
required: true
- type: dropdown
id: object-detector
attributes:
label: Object Detector
options:
- Coral
- OpenVino
- TensorRT
- RKNN
- Other
- CPU (no coral)
validations:
required: true
- type: dropdown
id: network
attributes:
label: Network connection
options:
- Wired
- Wireless
- Mixed
validations:
required: true
- type: input
id: camera
attributes:
label: Camera make and model
description: Dahua, hikvision, amcrest, reolink, etc and model number
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots of the Frigate UI's System metrics pages
description: Drag and drop for images is possible in this field. Please post screenshots of at least General and Cameras tabs.
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -0,0 +1,113 @@
title: "[Config Support]: "
labels: ["support", "triage"]
body:
- type: markdown
attributes:
value: |
Use this form for support or questions related to Frigate's configuration and config file.
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
[docs]: https://docs.frigate.video
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
validations:
required: true
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: frigatelogs
attributes:
label: Relevant Frigate log output
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: go2rtclogs
attributes:
label: Relevant go2rtc log output
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: stats
attributes:
label: Frigate stats
description: Output from frigate's /api/stats endpoint
render: json
- type: dropdown
id: os
attributes:
label: Operating system
options:
- HassOS
- Debian
- Other Linux
- Proxmox
- UNRAID
- Windows
- Other
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
- Proxmox via Docker
- Proxmox via TTeck Script
- Windows WSL2
validations:
required: true
- type: textarea
id: docker
attributes:
label: docker-compose file or Docker CLI command
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: dropdown
id: object-detector
attributes:
label: Object Detector
options:
- Coral
- OpenVino
- TensorRT
- RKNN
- Other
- CPU (no coral)
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots of the Frigate UI's System metrics pages
description: Drag and drop or simple cut/paste is possible in this field
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -0,0 +1,87 @@
title: "[Detector Support]: "
labels: ["support", "triage"]
body:
- type: markdown
attributes:
value: |
Use this form for support or questions related to Frigate's object detectors.
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
[docs]: https://docs.frigate.video
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
validations:
required: true
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: docker
attributes:
label: docker-compose file or Docker CLI command
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: frigatelogs
attributes:
label: Relevant Frigate log output
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
- Proxmox via Docker
- Proxmox via TTeck Script
- Windows WSL2
validations:
required: true
- type: dropdown
id: object-detector
attributes:
label: Object Detector
options:
- Coral
- OpenVino
- TensorRT
- RKNN
- Other
- CPU (no coral)
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots of the Frigate UI's System metrics pages
description: Drag and drop for images is possible in this field. Please post screenshots of at least General and Cameras tabs.
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -0,0 +1,130 @@
title: "[Support]: "
labels: ["support", "triage"]
body:
- type: markdown
attributes:
value: |
Use this form for support for issues that don't fall into any specific category.
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
[docs]: https://docs.frigate.video
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
validations:
required: true
- type: input
attributes:
label: What browser(s) are you using?
placeholder: Google Chrome 88.0.4324.150
description: >
Provide the full name and don't forget to add the version!
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: frigatelogs
attributes:
label: Relevant Frigate log output
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: go2rtclogs
attributes:
label: Relevant go2rtc log output
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: ffprobe
attributes:
label: FFprobe output from your camera
description: Run `ffprobe <camera_url>` from within the Frigate container if possible, and provide output below
render: shell
validations:
required: true
- type: textarea
id: stats
attributes:
label: Frigate stats
description: Output from frigate's /api/stats endpoint
render: json
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
- Proxmox via Docker
- Proxmox via TTeck Script
- Windows WSL2
validations:
required: true
- type: textarea
id: docker
attributes:
label: docker-compose file or Docker CLI command
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: dropdown
id: object-detector
attributes:
label: Object Detector
options:
- Coral
- OpenVino
- TensorRT
- RKNN
- Other
- CPU (no coral)
validations:
required: true
- type: dropdown
id: network
attributes:
label: Network connection
options:
- Wired
- Wireless
- Mixed
validations:
required: true
- type: input
id: camera
attributes:
label: Camera make and model
description: Dahua, hikvision, amcrest, reolink, etc and model number
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots of the Frigate UI's System metrics pages
description: Drag and drop for images is possible in this field
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -0,0 +1,120 @@
title: "[HW Accel Support]: "
labels: ["support", "triage"]
body:
- type: markdown
attributes:
value: |
Use this form to submit a support request for hardware acceleration issues.
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
[docs]: https://docs.frigate.video
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
validations:
required: true
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: docker
attributes:
label: docker-compose file or Docker CLI command
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: frigatelogs
attributes:
label: Relevant Frigate log output
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: go2rtclogs
attributes:
label: Relevant go2rtc log output
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: ffprobe
attributes:
label: FFprobe output from your camera
description: Run `ffprobe <camera_url>` from within the Frigate container if possible, and provide output below
render: shell
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
- Proxmox via Docker
- Proxmox via TTeck Script
- Windows WSL2
validations:
required: true
- type: dropdown
id: object-detector
attributes:
label: Object Detector
options:
- Coral
- OpenVino
- TensorRT
- RKNN
- Other
- CPU (no coral)
validations:
required: true
- type: dropdown
id: network
attributes:
label: Network connection
options:
- Wired
- Wireless
- Mixed
validations:
required: true
- type: input
id: camera
attributes:
label: Camera make and model
description: Dahua, hikvision, amcrest, reolink, etc and model number
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots of the Frigate UI's System metrics pages
description: Drag and drop for images is possible in this field. Please post screenshots of at least General and Cameras tabs.
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -0,0 +1,21 @@
title: "[Question]: "
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Use this form for questions you have about Frigate.
Before submitting your question, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
**If you are looking for support, start a new discussion and use a support category.**
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
[docs]: https://docs.frigate.video
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
- type: textarea
id: description
attributes:
label: "What is your question?"
validations:
required: true

View File

@@ -0,0 +1,146 @@
title: "[Bug]: "
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Use this form to submit a reproducible bug in Frigate or Frigate's UI.
Before submitting your bug report, please [search the discussions][discussions], look at recent open and closed [pull requests][prs], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your bug has already been fixed by the developers or reported by the community.
**If you are unsure if your issue is actually a bug or not, please submit a support request first.**
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
[prs]: https://www.github.com/blakeblackshear/frigate/pulls
[docs]: https://docs.frigate.video
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
- type: checkboxes
attributes:
label: Checklist
description: Please verify that you've followed these steps
options:
- label: I have updated to the latest available Frigate version.
required: true
- label: I have cleared the cache of my browser.
required: true
- label: I have tried a different browser to see if it is related to my browser.
required: true
- label: I have tried reproducing the issue in [incognito mode](https://www.computerworld.com/article/1719851/how-to-go-incognito-in-chrome-firefox-safari-and-edge.html) to rule out problems with any third party extensions or plugins I have installed.
- type: textarea
id: description
attributes:
label: Describe the problem you are having
description: Provide a clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
description: |
Please tell us exactly how to reproduce your issue.
Provide clear and concise step by step instructions and add code snippets if needed.
value: |
1.
2.
3.
...
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
validations:
required: true
- type: input
attributes:
label: In which browser(s) are you experiencing the issue with?
placeholder: Google Chrome 88.0.4324.150
description: >
Provide the full name and don't forget to add the version!
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: docker
attributes:
label: docker-compose file or Docker CLI command
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: frigatelogs
attributes:
label: Relevant Frigate log output
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: go2rtclogs
attributes:
label: Relevant go2rtc log output
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating system
options:
- HassOS
- Debian
- Other Linux
- Proxmox
- UNRAID
- Windows
- Other
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
validations:
required: true
- type: dropdown
id: network
attributes:
label: Network connection
options:
- Wired
- Wireless
- Mixed
validations:
required: true
- type: input
id: camera
attributes:
label: Camera make and model
description: Dahua, hikvision, amcrest, reolink, etc and model number
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots of the Frigate UI's System metrics pages
description: Drag and drop for images is possible in this field. Please post screenshots of all tabs.
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

1
.github/FUNDING.yml vendored
View File

@@ -1,3 +1,4 @@
github:
- blakeblackshear
- NickM-27
- hawkeye217

View File

@@ -1,107 +0,0 @@
name: Camera Support Request
description: Support for setting up cameras in Frigate
title: "[Camera Support]: "
labels: ["support", "triage"]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the Debug page in the Web UI
validations:
required: true
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: ffprobe
attributes:
label: FFprobe output from your camera
description: Run `ffprobe <camera_url>` and provide output below
render: shell
validations:
required: true
- type: textarea
id: stats
attributes:
label: Frigate stats
description: Output from frigate's /api/stats endpoint
render: json
- type: dropdown
id: os
attributes:
label: Operating system
options:
- HassOS
- Debian
- Other Linux
- Proxmox
- UNRAID
- Windows
- Other
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
validations:
required: true
- type: dropdown
id: coral
attributes:
label: Coral version
options:
- USB
- PCIe
- M.2
- Dev Board
- Other
- CPU (no coral)
validations:
required: true
- type: dropdown
id: network
attributes:
label: Network connection
options:
- Wired
- Wireless
- Mixed
validations:
required: true
- type: input
id: camera
attributes:
label: Camera make and model
description: Dahua, hikvision, amcrest, reolink, etc and model number
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -1 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Frigate Support
url: https://github.com/blakeblackshear/frigate/discussions/new/choose
about: Get support for setting up or troubleshooting Frigate.
- name: Frigate Bug Report
url: https://github.com/blakeblackshear/frigate/discussions/new/choose
about: Report a specific UI or backend bug.

View File

@@ -1,82 +0,0 @@
name: Config Support Request
description: Support for Frigate configuration
title: "[Config Support]: "
labels: ["support", "triage"]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the Debug page in the Web UI
validations:
required: true
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: stats
attributes:
label: Frigate stats
description: Output from frigate's /api/stats endpoint
render: json
- type: dropdown
id: os
attributes:
label: Operating system
options:
- HassOS
- Debian
- Other Linux
- Proxmox
- UNRAID
- Windows
- Other
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
validations:
required: true
- type: dropdown
id: coral
attributes:
label: Coral version
options:
- USB
- PCIe
- M.2
- Dev Board
- Other
- CPU (no coral)
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -1,84 +0,0 @@
name: Detector Support Request
description: Support for setting up object detector in Frigate (Coral, OpenVINO, TensorRT, etc.)
title: "[Detector Support]: "
labels: ["support", "triage"]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the Debug page in the Web UI
validations:
required: true
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: docker
attributes:
label: docker-compose file or Docker CLI command
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating system
options:
- HassOS
- Debian
- Other Linux
- Proxmox
- UNRAID
- Windows
- Other
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
validations:
required: true
- type: dropdown
id: coral
attributes:
label: Coral version
options:
- USB
- PCIe
- M.2
- Dev Board
- Other
- CPU (no coral)
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -1,107 +0,0 @@
name: General Support Request
description: General support request for Frigate
title: "[Support]: "
labels: ["support", "triage"]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the Debug page in the Web UI
validations:
required: true
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: ffprobe
attributes:
label: FFprobe output from your camera
description: Run `ffprobe <camera_url>` and provide output below
render: shell
validations:
required: true
- type: textarea
id: stats
attributes:
label: Frigate stats
description: Output from frigate's /api/stats endpoint
render: json
- type: dropdown
id: os
attributes:
label: Operating system
options:
- HassOS
- Debian
- Other Linux
- Proxmox
- UNRAID
- Windows
- Other
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
validations:
required: true
- type: dropdown
id: coral
attributes:
label: Coral version
options:
- USB
- PCIe
- M.2
- Dev Board
- Other
- CPU (no coral)
validations:
required: true
- type: dropdown
id: network
attributes:
label: Network connection
options:
- Wired
- Wireless
- Mixed
validations:
required: true
- type: input
id: camera
attributes:
label: Camera make and model
description: Dahua, hikvision, amcrest, reolink, etc and model number
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -1,96 +0,0 @@
name: Hardware Acceleration Support Request
description: Support for setting up GPU hardware acceleration in Frigate
title: "[HW Accel Support]: "
labels: ["support", "triage"]
assignees: []
body:
- type: textarea
id: description
attributes:
label: Describe the problem you are having
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Visible on the Debug page in the Web UI
validations:
required: true
- type: textarea
id: config
attributes:
label: Frigate config file
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: docker
attributes:
label: docker-compose file or Docker CLI command
description: This will be automatically formatted into code, so no need for backticks.
render: yaml
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: true
- type: textarea
id: ffprobe
attributes:
label: FFprobe output from your camera
description: Run `ffprobe <camera_url>` and provide output below
render: shell
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating system
options:
- HassOS
- Debian
- Other Linux
- Proxmox
- UNRAID
- Windows
- Other
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Install method
options:
- HassOS Addon
- Docker Compose
- Docker CLI
validations:
required: true
- type: dropdown
id: network
attributes:
label: Network connection
options:
- Wired
- Wireless
- Mixed
validations:
required: true
- type: input
id: camera
attributes:
label: Camera make and model
description: Dahua, hikvision, amcrest, reolink, etc and model number
validations:
required: true
- type: textarea
id: other
attributes:
label: Any other information that may be helpful

View File

@@ -5,26 +5,37 @@ inputs:
required: true
outputs:
image-name:
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ steps.create-short-sha.outputs.SHORT_SHA }}
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ steps.create-short-sha.outputs.SHORT_SHA }}
cache-name:
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
runs:
using: "composite"
steps:
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
# Stop docker so we can mount more space at /var/lib/docker
- name: Stop docker
run: sudo systemctl stop docker
shell: bash
# This creates a virtual volume at /var/lib/docker to maximize the size
# As of 2/14/2024, this results in 97G for docker images
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
build-mount-path: '/var/lib/docker'
- name: Start docker
run: sudo systemctl start docker
shell: bash
- id: lowercaseRepo
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:

View File

@@ -18,6 +18,12 @@ updates:
interval: daily
open-pull-requests-limit: 10
target-branch: dev
- package-ecosystem: "pip"
directory: "/docker/tensorrt"
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: dev
- package-ecosystem: "npm"
directory: "/web"
schedule:
@@ -28,5 +34,7 @@ updates:
directory: "/docs"
schedule:
interval: daily
allow:
- dependency-name: "@docusaurus/*"
open-pull-requests-limit: 10
target-branch: dev

32
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,32 @@
## Proposed change
<!--
Describe what this pull request does and how it will benefit users of Frigate.
Please describe in detail any considerations, breaking changes, etc. that are
made in this pull request.
-->
## Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code
- [ ] Documentation Update
## Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
## Checklist
<!--
Put an `x` in the boxes that apply.
-->
- [ ] The code change is tested and works locally.
- [ ] Local tests pass. **Your PR cannot be merged unless tests pass**
- [ ] There is no commented out code in this PR.
- [ ] The code has been formatted using Ruff (`ruff format frigate`)

View File

@@ -6,6 +6,8 @@ on:
branches:
- dev
- master
paths-ignore:
- "docs/**"
# only run the latest commit to avoid cache overwrites
concurrency:
@@ -17,11 +19,13 @@ env:
jobs:
amd64_build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: AMD64 Build
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up QEMU and Buildx
id: setup
uses: ./.github/actions/setup
@@ -37,22 +41,14 @@ jobs:
target: frigate
tags: ${{ steps.setup.outputs.image-name }}-amd64
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64
- name: Build and push TensorRT (x86 GPU)
uses: docker/bake-action@v4
with:
push: true
targets: tensorrt
files: docker/tensorrt/trt.hcl
set: |
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64,mode=max
arm64_build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: ARM Build
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up QEMU and Buildx
id: setup
uses: ./.github/actions/setup
@@ -70,8 +66,9 @@ jobs:
${{ steps.setup.outputs.image-name }}-standard-arm64
cache-from: type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64
- name: Build and push RPi build
uses: docker/bake-action@v4
uses: docker/bake-action@v6
with:
source: .
push: true
targets: rpi
files: docker/rpi/rpi.hcl
@@ -80,11 +77,13 @@ jobs:
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-arm64,mode=max
jetson_jp4_build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Jetson Jetpack 4
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up QEMU and Buildx
id: setup
uses: ./.github/actions/setup
@@ -96,8 +95,9 @@ jobs:
BASE_IMAGE: timongentzsch/l4t-ubuntu20-opencv:latest
SLIM_BASE: timongentzsch/l4t-ubuntu20-opencv:latest
TRT_BASE: timongentzsch/l4t-ubuntu20-opencv:latest
uses: docker/bake-action@v4
uses: docker/bake-action@v6
with:
source: .
push: true
targets: tensorrt
files: docker/tensorrt/trt.hcl
@@ -106,11 +106,13 @@ jobs:
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp4
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp4,mode=max
jetson_jp5_build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Jetson Jetpack 5
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up QEMU and Buildx
id: setup
uses: ./.github/actions/setup
@@ -122,8 +124,9 @@ jobs:
BASE_IMAGE: nvcr.io/nvidia/l4t-tensorrt:r8.5.2-runtime
SLIM_BASE: nvcr.io/nvidia/l4t-tensorrt:r8.5.2-runtime
TRT_BASE: nvcr.io/nvidia/l4t-tensorrt:r8.5.2-runtime
uses: docker/bake-action@v4
uses: docker/bake-action@v6
with:
source: .
push: true
targets: tensorrt
files: docker/tensorrt/trt.hcl
@@ -131,30 +134,123 @@ jobs:
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt-jp5
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp5
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-jp5,mode=max
amd64_extra_builds:
runs-on: ubuntu-22.04
name: AMD64 Extra Build
needs:
- amd64_build
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up QEMU and Buildx
id: setup
uses: ./.github/actions/setup
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push TensorRT (x86 GPU)
env:
COMPUTE_LEVEL: "50 60 70 80 90"
uses: docker/bake-action@v6
with:
source: .
push: true
targets: tensorrt
files: docker/tensorrt/trt.hcl
set: |
tensorrt.tags=${{ steps.setup.outputs.image-name }}-tensorrt
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-amd64,mode=max
arm64_extra_builds:
runs-on: ubuntu-22.04
name: ARM Extra Build
needs:
- arm64_build
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up QEMU and Buildx
id: setup
uses: ./.github/actions/setup
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Rockchip build
uses: docker/bake-action@v6
with:
source: .
push: true
targets: rk
files: docker/rockchip/rk.hcl
set: |
rk.tags=${{ steps.setup.outputs.image-name }}-rk
*.cache-from=type=gha
combined_extra_builds:
runs-on: ubuntu-22.04
name: Combined Extra Builds
needs:
- amd64_build
- arm64_build
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up QEMU and Buildx
id: setup
uses: ./.github/actions/setup
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Hailo-8l build
uses: docker/bake-action@v6
with:
source: .
push: true
targets: h8l
files: docker/hailo8l/h8l.hcl
set: |
h8l.tags=${{ steps.setup.outputs.image-name }}-h8l
*.cache-from=type=registry,ref=${{ steps.setup.outputs.cache-name }}-h8l
*.cache-to=type=registry,ref=${{ steps.setup.outputs.cache-name }}-h8l,mode=max
- name: AMD/ROCm general build
env:
AMDGPU: gfx
HSA_OVERRIDE: 0
uses: docker/bake-action@v6
with:
source: .
push: true
targets: rocm
files: docker/rocm/rocm.hcl
set: |
rocm.tags=${{ steps.setup.outputs.image-name }}-rocm
*.cache-from=type=gha
# The majority of users running arm64 are rpi users, so the rpi
# build should be the primary arm64 image
assemble_default_build:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Assemble and push default build
needs:
- amd64_build
- arm64_build
steps:
- id: lowercaseRepo
uses: ASzc/change-string-case-action@v5
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.repository }}
- name: Log in to the Container registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create short sha
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
- uses: int128/docker-manifest-create-action@v1
- uses: int128/docker-manifest-create-action@v2
with:
tags: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
suffixes: |
-amd64
-rpi
tags: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}
sources: |
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-amd64
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-rpi

View File

@@ -1,24 +0,0 @@
name: dependabot-auto-merge
on: pull_request
permissions:
contents: write
jobs:
dependabot-auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Get Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.dependency-type == 'direct:development' && (steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch')
run: |
gh pr review --approve "$PR_URL"
gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,6 +1,9 @@
name: On pull request
on: pull_request
on:
pull_request:
paths-ignore:
- "docs/**"
env:
DEFAULT_PYTHON: 3.9
@@ -16,6 +19,8 @@ jobs:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@master
with:
node-version: 16.x
@@ -35,6 +40,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@master
with:
node-version: 16.x
@@ -49,14 +56,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@master
with:
node-version: 16.x
node-version: 20.x
- run: npm install
working-directory: ./web
- name: Test
run: npm run test
working-directory: ./web
# - name: Test
# run: npm run test
# working-directory: ./web
python_checks:
runs-on: ubuntu-latest
@@ -64,21 +73,20 @@ jobs:
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install requirements
run: |
python3 -m pip install -U pip
python3 -m pip install -r docker/main/requirements-dev.txt
- name: Check black
- name: Check formatting
run: |
black --check --diff frigate migrations docker *.py
- name: Check isort
run: |
isort --check --diff frigate migrations docker *.py
- name: Check ruff
ruff format --check --diff frigate migrations docker *.py
- name: Check lint
run: |
ruff check frigate migrations docker *.py
@@ -88,6 +96,8 @@ jobs:
steps:
- name: Check out code
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@master
with:
node-version: 16.x

52
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: On release
on:
workflow_dispatch:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- id: lowercaseRepo
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.repository }}
- name: Log in to the Container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create tag variables
env:
TAG: ${{ github.ref_name }}
LOWERCASE_REPO: ${{ steps.lowercaseRepo.outputs.lowercase }}
run: |
BUILD_TYPE=$([[ "${TAG}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "stable" || echo "beta")
echo "BUILD_TYPE=${BUILD_TYPE}" >> $GITHUB_ENV
echo "BASE=ghcr.io/${LOWERCASE_REPO}" >> $GITHUB_ENV
echo "BUILD_TAG=${GITHUB_SHA::7}" >> $GITHUB_ENV
echo "CLEAN_VERSION=$(echo ${GITHUB_REF##*/} | tr '[:upper:]' '[:lower:]' | sed 's/^[v]//')" >> $GITHUB_ENV
- name: Tag and push the main image
run: |
VERSION_TAG=${BASE}:${CLEAN_VERSION}
STABLE_TAG=${BASE}:stable
PULL_TAG=${BASE}:${BUILD_TAG}
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG} docker://${VERSION_TAG}
for variant in standard-arm64 tensorrt tensorrt-jp4 tensorrt-jp5 rk h8l rocm; do
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG}-${variant} docker://${VERSION_TAG}-${variant}
done
# stable tag
if [[ "${BUILD_TYPE}" == "stable" ]]; then
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG} docker://${STABLE_TAG}
for variant in standard-arm64 tensorrt tensorrt-jp4 tensorrt-jp5 rk h8l rocm; do
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG}-${variant} docker://${STABLE_TAG}-${variant}
done
fi

View File

@@ -23,4 +23,20 @@ jobs:
exempt-pr-labels: "pinned,security,dependencies"
operations-per-run: 120
- name: Print outputs
run: echo ${{ join(steps.stale.outputs.*, ',') }}
env:
STALE_OUTPUT: ${{ join(steps.stale.outputs.*, ',') }}
run: echo "$STALE_OUTPUT"
# clean_ghcr:
# name: Delete outdated dev container images
# runs-on: ubuntu-latest
# steps:
# - name: Delete old images
# uses: snok/container-retention-policy@v2
# with:
# image-names: dev-*
# cut-off: 60 days ago UTC
# keep-at-least: 5
# account-type: personal
# token: ${{ secrets.GITHUB_TOKEN }}
# token-type: github-token

7
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.DS_Store
*.pyc
__pycache__
.mypy_cache
*.swp
debug
.vscode/*
@@ -8,7 +9,6 @@ config/*
!config/*.example
models
*.mp4
*.ts
*.db
*.csv
frigate/version.py
@@ -17,4 +17,5 @@ web/node_modules
web/coverage
core
!/web/**/*.ts
.idea/*
.idea/*
.ipynb_checkpoints

5
.vscode/launch.json vendored
View File

@@ -3,10 +3,9 @@
"configurations": [
{
"name": "Python: Launch Frigate",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "frigate",
"justMyCode": true
"module": "frigate"
}
]
}

View File

@@ -2,3 +2,6 @@
/docker/tensorrt/ @madsciencetist @NateMeyer
/docker/tensorrt/*arm64* @madsciencetist
/docker/tensorrt/*jetson* @madsciencetist
/docker/rockchip/ @MarcA711
/docker/rocm/ @harakas
/docker/hailo8l/ @spanner3003

View File

@@ -1,11 +1,9 @@
default_target: local
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
VERSION = 0.13.0
VERSION = 0.15.0
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)
BOARDS= #Initialized empty
include docker/*/*.mk
@@ -18,25 +16,38 @@ version:
echo 'VERSION = "$(VERSION)-$(COMMIT_HASH)"' > frigate/version.py
local: version
docker buildx build --target=frigate --tag frigate:latest --load --file docker/main/Dockerfile .
docker buildx build --target=frigate --file docker/main/Dockerfile . \
--tag frigate:latest \
--load
amd64:
docker buildx build --platform linux/amd64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) --file docker/main/Dockerfile .
docker buildx build --target=frigate --file docker/main/Dockerfile . \
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
--platform linux/amd64
arm64:
docker buildx build --platform linux/arm64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) --file docker/main/Dockerfile .
docker buildx build --target=frigate --file docker/main/Dockerfile . \
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
--platform linux/arm64
build: version amd64 arm64
docker buildx build --platform linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) --file docker/main/Dockerfile .
docker buildx build --target=frigate --file docker/main/Dockerfile . \
--tag $(IMAGE_REPO):$(VERSION)-$(COMMIT_HASH) \
--platform linux/arm64/v8,linux/amd64
push: push-boards
docker buildx build --push --platform linux/arm64/v8,linux/amd64 --target=frigate --tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) --file docker/main/Dockerfile .
docker buildx build --target=frigate --file docker/main/Dockerfile . \
--tag $(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH) \
--platform linux/arm64/v8,linux/amd64 \
--push
run: local
docker run --rm --publish=5000:5000 --volume=${PWD}/config:/config frigate:latest
run_tests: local
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest python3 -u -m unittest
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest python3 -u -m mypy --config-file frigate/mypy.ini frigate
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest \
python3 -u -m unittest
docker run --rm --workdir=/opt/frigate --entrypoint= frigate:latest \
python3 -u -m mypy --config-file frigate/mypy.ini frigate
.PHONY: run_tests

View File

@@ -29,18 +29,22 @@ If you would like to make a donation to support development, please use [Github
## Screenshots
Integration into Home Assistant
### Live dashboard
<div>
<a href="docs/static/img/media_browser.png"><img src="docs/static/img/media_browser.png" height=400></a>
<a href="docs/static/img/notification.png"><img src="docs/static/img/notification.png" height=400></a>
<img width="800" alt="Live dashboard" src="https://github.com/blakeblackshear/frigate/assets/569905/5e713cb9-9db5-41dc-947a-6937c3bc376e">
</div>
Also comes with a builtin UI:
### Streamlined review workflow
<div>
<a href="docs/static/img/home-ui.png"><img src="docs/static/img/home-ui.png" height=400></a>
<a href="docs/static/img/camera-ui.png"><img src="docs/static/img/camera-ui.png" height=400></a>
<img width="800" alt="Streamlined review workflow" src="https://github.com/blakeblackshear/frigate/assets/569905/6fed96e8-3b18-40e5-9ddc-31e6f3c9f2ff">
</div>
![Events](docs/static/img/events-ui.png)
### Multi-camera scrubbing
<div>
<img width="800" alt="Multi-camera scrubbing" src="https://github.com/blakeblackshear/frigate/assets/569905/d6788a15-0eeb-4427-a8d4-80b93cae3d74">
</div>
### Built-in mask and zone editor
<div>
<img width="800" alt="Multi-camera scrubbing" src="https://github.com/blakeblackshear/frigate/assets/569905/d7885fc3-bfe6-452f-b7d0-d957cb3e31f5">
</div>

View File

@@ -4,6 +4,7 @@ from statistics import mean
import numpy as np
import frigate.util as util
from frigate.config import DetectorTypeEnum
from frigate.object_detection import (
ObjectDetectProcess,
@@ -60,7 +61,7 @@ def start(id, num_detections, detection_queue, event):
object_detector.cleanup()
print(f"{id} - Processed for {duration:.2f} seconds.")
print(f"{id} - FPS: {object_detector.fps.eps():.2f}")
print(f"{id} - Average frame processing time: {mean(frame_times)*1000:.2f}ms")
print(f"{id} - Average frame processing time: {mean(frame_times) * 1000:.2f}ms")
######
@@ -90,7 +91,7 @@ edgetpu_process_2 = ObjectDetectProcess(
)
for x in range(0, 10):
camera_process = mp.Process(
camera_process = util.Process(
target=start, args=(x, 300, detection_queue, events[str(x)])
)
camera_process.daemon = True

22
cspell.json Normal file
View File

@@ -0,0 +1,22 @@
{
"version": "0.2",
"ignorePaths": [
"Dockerfile",
"Dockerfile.*",
"CMakeLists.txt",
"*.db",
"node_modules",
"__pycache__",
"dist",
"/audio-labelmap.txt"
],
"language": "en",
"dictionaryDefinitions": [
{
"name": "frigate-dictionary",
"path": "./.cspell/frigate-dictionary.txt",
"addWords": true
}
],
"dictionaries": ["frigate-dictionary"]
}

View File

@@ -14,15 +14,16 @@ services:
dockerfile: docker/main/Dockerfile
# Use target devcontainer-trt for TensorRT dev
target: devcontainer
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
## Uncomment this block for nvidia gpu support
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [gpu]
environment:
YOLO_MODELS: yolov7-320
YOLO_MODELS: ""
devices:
- /dev/bus/usb:/dev/bus/usb
# - /dev/dri:/dev/dri # for intel hwaccel, needs to be updated for your hardware

40
docker/hailo8l/Dockerfile Normal file
View File

@@ -0,0 +1,40 @@
# syntax=docker/dockerfile:1.6
ARG DEBIAN_FRONTEND=noninteractive
# Build Python wheels
FROM wheels AS h8l-wheels
COPY docker/main/requirements-wheels.txt /requirements-wheels.txt
COPY docker/hailo8l/requirements-wheels-h8l.txt /requirements-wheels-h8l.txt
RUN sed -i "/https:\/\//d" /requirements-wheels.txt
# Create a directory to store the built wheels
RUN mkdir /h8l-wheels
# Build the wheels
RUN pip3 wheel --wheel-dir=/h8l-wheels -c /requirements-wheels.txt -r /requirements-wheels-h8l.txt
FROM wget AS hailort
ARG TARGETARCH
RUN --mount=type=bind,source=docker/hailo8l/install_hailort.sh,target=/deps/install_hailort.sh \
/deps/install_hailort.sh
# Use deps as the base image
FROM deps AS h8l-frigate
# Copy the wheels from the wheels stage
COPY --from=h8l-wheels /h8l-wheels /deps/h8l-wheels
COPY --from=hailort /hailo-wheels /deps/hailo-wheels
COPY --from=hailort /rootfs/ /
# Install the wheels
RUN pip3 install -U /deps/h8l-wheels/*.whl
RUN pip3 install -U /deps/hailo-wheels/*.whl
# Copy base files from the rootfs stage
COPY --from=rootfs / /
# Set workdir
WORKDIR /opt/frigate/

34
docker/hailo8l/h8l.hcl Normal file
View File

@@ -0,0 +1,34 @@
target wget {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/arm64","linux/amd64"]
target = "wget"
}
target wheels {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/arm64","linux/amd64"]
target = "wheels"
}
target deps {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/arm64","linux/amd64"]
target = "deps"
}
target rootfs {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/arm64","linux/amd64"]
target = "rootfs"
}
target h8l {
dockerfile = "docker/hailo8l/Dockerfile"
contexts = {
wget = "target:wget"
wheels = "target:wheels"
deps = "target:deps"
rootfs = "target:rootfs"
}
platforms = ["linux/arm64","linux/amd64"]
}

15
docker/hailo8l/h8l.mk Normal file
View File

@@ -0,0 +1,15 @@
BOARDS += h8l
local-h8l: version
docker buildx bake --file=docker/hailo8l/h8l.hcl h8l \
--set h8l.tags=frigate:latest-h8l \
--load
build-h8l: version
docker buildx bake --file=docker/hailo8l/h8l.hcl h8l \
--set h8l.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-h8l
push-h8l: build-h8l
docker buildx bake --file=docker/hailo8l/h8l.hcl h8l \
--set h8l.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-h8l \
--push

View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -euxo pipefail
hailo_version="4.19.0"
if [[ "${TARGETARCH}" == "amd64" ]]; then
arch="x86_64"
elif [[ "${TARGETARCH}" == "arm64" ]]; then
arch="aarch64"
fi
wget -qO- "https://github.com/frigate-nvr/hailort/releases/download/v${hailo_version}/hailort-${TARGETARCH}.tar.gz" |
tar -C / -xzf -
mkdir -p /hailo-wheels
wget -P /hailo-wheels/ "https://github.com/frigate-nvr/hailort/releases/download/v${hailo_version}/hailort-${hailo_version}-cp39-cp39-linux_${arch}.whl"

View File

@@ -0,0 +1,12 @@
appdirs==1.4.*
argcomplete==2.0.*
contextlib2==0.6.*
distlib==0.3.*
filelock==3.8.*
future==0.18.*
importlib-metadata==5.1.*
importlib-resources==5.1.*
netaddr==0.8.*
netifaces==0.10.*
verboselogs==1.7.*
virtualenv==20.17.*

View File

@@ -0,0 +1,48 @@
#!/bin/bash
# Update package list and install dependencies
sudo apt-get update
sudo apt-get install -y build-essential cmake git wget
arch=$(uname -m)
if [[ $arch == "x86_64" ]]; then
sudo apt install -y linux-headers-$(uname -r);
else
sudo apt install -y linux-modules-extra-$(uname -r);
fi
# Clone the HailoRT driver repository
git clone --depth 1 --branch v4.19.0 https://github.com/hailo-ai/hailort-drivers.git
# Build and install the HailoRT driver
cd hailort-drivers/linux/pcie
sudo make all
sudo make install
# Load the Hailo PCI driver
sudo modprobe hailo_pci
if [ $? -ne 0 ]; then
echo "Unable to load hailo_pci module, common reasons for this are:"
echo "- Key was rejected by service: Secure Boot is enabling disallowing install."
echo "- Permissions are not setup correctly."
exit 1
fi
# Download and install the firmware
cd ../../
./download_firmware.sh
# verify the firmware folder is present
if [ ! -d /lib/firmware/hailo ]; then
sudo mkdir /lib/firmware/hailo
fi
sudo mv hailo8_fw.*.bin /lib/firmware/hailo/hailo8_fw.bin
# Install udev rules
sudo cp ./linux/pcie/51-hailo-udev.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && sudo udevadm trigger
echo "HailoRT driver installation complete."
echo "reboot your system to load the firmware!"

View File

@@ -30,18 +30,31 @@ RUN --mount=type=tmpfs,target=/tmp --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=cache,target=/root/.ccache \
/deps/build_nginx.sh
FROM wget AS sqlite-vec
ARG DEBIAN_FRONTEND
# Build sqlite_vec from source
COPY docker/main/build_sqlite_vec.sh /deps/build_sqlite_vec.sh
RUN --mount=type=tmpfs,target=/tmp --mount=type=tmpfs,target=/var/cache/apt \
--mount=type=bind,source=docker/main/build_sqlite_vec.sh,target=/deps/build_sqlite_vec.sh \
--mount=type=cache,target=/root/.ccache \
/deps/build_sqlite_vec.sh
FROM scratch AS go2rtc
ARG TARGETARCH
WORKDIR /rootfs/usr/local/go2rtc/bin
ADD --link --chmod=755 "https://github.com/AlexxIT/go2rtc/releases/download/v1.8.1/go2rtc_linux_${TARGETARCH}" go2rtc
ADD --link --chmod=755 "https://github.com/AlexxIT/go2rtc/releases/download/v1.9.2/go2rtc_linux_${TARGETARCH}" go2rtc
FROM wget AS tempio
ARG TARGETARCH
RUN --mount=type=bind,source=docker/main/install_tempio.sh,target=/deps/install_tempio.sh \
/deps/install_tempio.sh
####
#
# OpenVino Support
#
# 1. Download and convert a model from Intel's Public Open Model Zoo
# 2. Build libUSB without udev to handle NCS2 enumeration
#
####
# Download and Convert OpenVino model
@@ -51,17 +64,24 @@ ARG DEBIAN_FRONTEND
# Install OpenVino Runtime and Dev library
COPY docker/main/requirements-ov.txt /requirements-ov.txt
RUN apt-get -qq update \
&& apt-get -qq install -y wget python3 python3-distutils \
&& apt-get -qq install -y wget python3 python3-dev python3-distutils gcc pkg-config libhdf5-dev \
&& wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
&& python3 get-pip.py "pip" \
&& pip install -r /requirements-ov.txt
# Get OpenVino Model
RUN mkdir /models \
&& cd /models && omz_downloader --name ssdlite_mobilenet_v2 \
&& cd /models && omz_converter --name ssdlite_mobilenet_v2 --precision FP16
RUN --mount=type=bind,source=docker/main/build_ov_model.py,target=/build_ov_model.py \
mkdir /models && cd /models \
&& wget http://download.tensorflow.org/models/object_detection/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz \
&& tar -xvf ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz \
&& python3 /build_ov_model.py
####
#
# Coral Compatibility
#
# Builds libusb without udev. Needed for synology and other devices with USB coral
####
# libUSB - No Udev
FROM wget as libusb-build
ARG TARGETARCH
@@ -97,11 +117,12 @@ RUN wget -qO edgetpu_model.tflite https://github.com/google-coral/test_data/raw/
RUN wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite
COPY labelmap.txt .
# Copy OpenVino model
COPY --from=ov-converter /models/public/ssdlite_mobilenet_v2/FP16 openvino-model
COPY --from=ov-converter /models/ssdlite_mobilenet_v2.xml openvino-model/
COPY --from=ov-converter /models/ssdlite_mobilenet_v2.bin openvino-model/
RUN wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt -O openvino-model/coco_91cl_bkgr.txt && \
sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt
# Get Audio Model and labels
RUN wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite
RUN wget -qO - https://www.kaggle.com/api/v1/models/google/yamnet/tfLite/classification-tflite/1/download | tar xvz && mv 1.tflite cpu_audio_model.tflite
COPY audio-labelmap.txt .
@@ -137,6 +158,8 @@ RUN apt-get -qq update \
gfortran openexr libatlas-base-dev libssl-dev\
libtbb2 libtbb-dev libdc1394-22-dev libopenexr-dev \
libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev \
# sqlite3 dependencies
tclsh \
# scipy dependencies
gcc gfortran libopenblas-dev liblapack-dev && \
rm -rf /var/lib/apt/lists/*
@@ -150,6 +173,10 @@ RUN wget -q https://bootstrap.pypa.io/get-pip.py -O get-pip.py \
COPY docker/main/requirements.txt /requirements.txt
RUN pip3 install -r /requirements.txt
# Build pysqlite3 from source
COPY docker/main/build_pysqlite3.sh /build_pysqlite3.sh
RUN /build_pysqlite3.sh
COPY docker/main/requirements-wheels.txt /requirements-wheels.txt
RUN pip3 wheel --wheel-dir=/wheels -r /requirements-wheels.txt
@@ -157,8 +184,10 @@ RUN pip3 wheel --wheel-dir=/wheels -r /requirements-wheels.txt
# Collect deps in a single layer
FROM scratch AS deps-rootfs
COPY --from=nginx /usr/local/nginx/ /usr/local/nginx/
COPY --from=sqlite-vec /usr/local/lib/ /usr/local/lib/
COPY --from=go2rtc /rootfs/ /
COPY --from=libusb-build /usr/local/lib /usr/local/lib
COPY --from=tempio /rootfs/ /
COPY --from=s6-overlay /rootfs/ /
COPY --from=models /rootfs/ /
COPY docker/main/rootfs/ /
@@ -176,7 +205,16 @@ ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
ENV PATH="/usr/lib/btbn-ffmpeg/bin:/usr/local/go2rtc/bin:/usr/local/nginx/sbin:${PATH}"
# Disable tokenizer parallelism warning
# https://stackoverflow.com/questions/62691279/how-to-disable-tokenizers-parallelism-true-false-warning/72926996#72926996
ENV TOKENIZERS_PARALLELISM=true
# https://github.com/huggingface/transformers/issues/27214
ENV TRANSFORMERS_NO_ADVISORY_WARNINGS=1
# Set OpenCV ffmpeg loglevel to fatal: https://ffmpeg.org/doxygen/trunk/log_8h.html
ENV OPENCV_FFMPEG_LOGLEVEL=8
ENV PATH="/usr/local/go2rtc/bin:/usr/local/tempio/bin:/usr/local/nginx/sbin:${PATH}"
# Install dependencies
RUN --mount=type=bind,source=docker/main/install_deps.sh,target=/deps/install_deps.sh \
@@ -191,17 +229,18 @@ COPY --from=deps-rootfs / /
RUN ldconfig
EXPOSE 5000
EXPOSE 1935
EXPOSE 8554
EXPOSE 8555/tcp 8555/udp
# Configure logging to prepend timestamps, log to stdout, keep 0 archives and rotate on 10MB
ENV S6_LOGGING_SCRIPT="T 1 n0 s10000000 T"
# Do not fail on long-running download scripts
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
ENTRYPOINT ["/init"]
CMD []
HEALTHCHECK --start-period=120s --start-interval=5s --interval=15s --timeout=5s --retries=3 \
HEALTHCHECK --start-period=300s --start-interval=5s --interval=15s --timeout=5s --retries=3 \
CMD curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1
# Frigate deps with Node.js and NPM for devcontainer
@@ -215,13 +254,13 @@ COPY docker/main/fake_frigate_run /etc/s6-overlay/s6-rc.d/frigate/run
RUN mkdir -p /opt/frigate \
&& ln -svf /workspace/frigate/frigate /opt/frigate/frigate
# Install Node 16
RUN apt-get update \
&& apt-get install wget -y \
&& wget -qO- https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs \
# Install Node 20
RUN curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh && \
chmod 500 nsolid_setup_deb.sh && \
./nsolid_setup_deb.sh 20 && \
apt-get install nodejs -y \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g npm@9
&& npm install -g npm@10
WORKDIR /workspace/frigate
@@ -232,12 +271,14 @@ RUN apt-get update \
RUN --mount=type=bind,source=./docker/main/requirements-dev.txt,target=/workspace/frigate/requirements-dev.txt \
pip3 install -r requirements-dev.txt
HEALTHCHECK NONE
CMD ["sleep", "infinity"]
# Frigate web build
# This should be architecture agnostic, so speed up the build on multiarch by not using QEMU.
FROM --platform=$BUILDPLATFORM node:16 AS web-build
FROM --platform=$BUILDPLATFORM node:20 AS web-build
WORKDIR /work
COPY web/package.json web/package-lock.json ./

View File

@@ -2,10 +2,11 @@
set -euxo pipefail
NGINX_VERSION="1.25.2"
NGINX_VERSION="1.25.3"
VOD_MODULE_VERSION="1.31"
SECURE_TOKEN_MODULE_VERSION="1.5"
RTMP_MODULE_VERSION="1.2.2"
SET_MISC_MODULE_VERSION="v0.33"
NGX_DEVEL_KIT_VERSION="v0.3.3"
cp /etc/apt/sources.list /etc/apt/sources.list.d/sources-src.list
sed -i 's|deb http|deb-src http|g' /etc/apt/sources.list.d/sources-src.list
@@ -49,10 +50,16 @@ mkdir /tmp/nginx-secure-token-module
wget https://github.com/kaltura/nginx-secure-token-module/archive/refs/tags/${SECURE_TOKEN_MODULE_VERSION}.tar.gz
tar -zxf ${SECURE_TOKEN_MODULE_VERSION}.tar.gz -C /tmp/nginx-secure-token-module --strip-components=1
rm ${SECURE_TOKEN_MODULE_VERSION}.tar.gz
mkdir /tmp/nginx-rtmp-module
wget -nv https://github.com/arut/nginx-rtmp-module/archive/refs/tags/v${RTMP_MODULE_VERSION}.tar.gz
tar -zxf v${RTMP_MODULE_VERSION}.tar.gz -C /tmp/nginx-rtmp-module --strip-components=1
rm v${RTMP_MODULE_VERSION}.tar.gz
mkdir /tmp/ngx_devel_kit
wget https://github.com/vision5/ngx_devel_kit/archive/refs/tags/${NGX_DEVEL_KIT_VERSION}.tar.gz
tar -zxf ${NGX_DEVEL_KIT_VERSION}.tar.gz -C /tmp/ngx_devel_kit --strip-components=1
rm ${NGX_DEVEL_KIT_VERSION}.tar.gz
mkdir /tmp/nginx-set-misc-module
wget https://github.com/openresty/set-misc-nginx-module/archive/refs/tags/${SET_MISC_MODULE_VERSION}.tar.gz
tar -zxf ${SET_MISC_MODULE_VERSION}.tar.gz -C /tmp/nginx-set-misc-module --strip-components=1
rm ${SET_MISC_MODULE_VERSION}.tar.gz
cd /tmp/nginx
@@ -60,10 +67,13 @@ cd /tmp/nginx
--with-file-aio \
--with-http_sub_module \
--with-http_ssl_module \
--with-http_auth_request_module \
--with-http_realip_module \
--with-threads \
--add-module=../ngx_devel_kit \
--add-module=../nginx-set-misc-module \
--add-module=../nginx-vod-module \
--add-module=../nginx-secure-token-module \
--add-module=../nginx-rtmp-module \
--with-cc-opt="-O3 -Wno-error=implicit-fallthrough"
make CC="ccache gcc" -j$(nproc) && make install

View File

@@ -0,0 +1,11 @@
import openvino as ov
from openvino.tools import mo
ov_model = mo.convert_model(
"/models/ssdlite_mobilenet_v2_coco_2018_05_09/frozen_inference_graph.pb",
compress_to_fp16=True,
transformations_config="/usr/local/lib/python3.9/dist-packages/openvino/tools/mo/front/tf/ssd_v2_support.json",
tensorflow_object_detection_api_pipeline_config="/models/ssdlite_mobilenet_v2_coco_2018_05_09/pipeline.config",
reverse_input_channels=True,
)
ov.save_model(ov_model, "/models/ssdlite_mobilenet_v2.xml")

35
docker/main/build_pysqlite3.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
set -euxo pipefail
SQLITE3_VERSION="96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e" # 3.46.0
PYSQLITE3_VERSION="0.5.3"
# Fetch the source code for the latest release of Sqlite.
if [[ ! -d "sqlite" ]]; then
wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=${SQLITE3_VERSION} -O sqlite.tar.gz
tar xzf sqlite.tar.gz
cd sqlite/
LIBS="-lm" ./configure --disable-tcl --enable-tempstore=always
make sqlite3.c
cd ../
rm sqlite.tar.gz
fi
# Grab the pysqlite3 source code.
if [[ ! -d "./pysqlite3" ]]; then
git clone https://github.com/coleifer/pysqlite3.git
fi
cd pysqlite3/
git checkout ${PYSQLITE3_VERSION}
# Copy the sqlite3 source amalgamation into the pysqlite3 directory so we can
# create a self-contained extension module.
cp "../sqlite/sqlite3.c" ./
cp "../sqlite/sqlite3.h" ./
# Create the wheel and put it in the /wheels dir.
sed -i "s|name='pysqlite3-binary'|name=PACKAGE_NAME|g" setup.py
python3 setup.py build_static
pip3 wheel . -w /wheels

31
docker/main/build_sqlite_vec.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
set -euxo pipefail
SQLITE_VEC_VERSION="0.1.3"
cp /etc/apt/sources.list /etc/apt/sources.list.d/sources-src.list
sed -i 's|deb http|deb-src http|g' /etc/apt/sources.list.d/sources-src.list
apt-get update
apt-get -yqq build-dep sqlite3 gettext git
mkdir /tmp/sqlite_vec
# Grab the sqlite_vec source code.
wget -nv https://github.com/asg017/sqlite-vec/archive/refs/tags/v${SQLITE_VEC_VERSION}.tar.gz
tar -zxf v${SQLITE_VEC_VERSION}.tar.gz -C /tmp/sqlite_vec
cd /tmp/sqlite_vec/sqlite-vec-${SQLITE_VEC_VERSION}
mkdir -p vendor
wget -O sqlite-amalgamation.zip https://www.sqlite.org/2024/sqlite-amalgamation-3450300.zip
unzip sqlite-amalgamation.zip
mv sqlite-amalgamation-3450300/* vendor/
rmdir sqlite-amalgamation-3450300
rm sqlite-amalgamation.zip
# build loadable module
make loadable
# install it
cp dist/vec0.* /usr/local/lib

View File

@@ -8,11 +8,13 @@ apt-get -qq install --no-install-recommends -y \
apt-transport-https \
gnupg \
wget \
lbzip2 \
procps vainfo \
unzip locales tzdata libxml2 xz-utils \
python3.9 \
python3-pip \
curl \
lsof \
jq \
nethogs
@@ -39,39 +41,68 @@ apt-get -qq install --no-install-recommends --no-install-suggests -y \
# btbn-ffmpeg -> amd64
if [[ "${TARGETARCH}" == "amd64" ]]; then
mkdir -p /usr/lib/btbn-ffmpeg
wget -qO btbn-ffmpeg.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linux64-gpl-5.1.tar.xz"
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/btbn-ffmpeg --strip-components 1
rm -rf btbn-ffmpeg.tar.xz /usr/lib/btbn-ffmpeg/doc /usr/lib/btbn-ffmpeg/bin/ffplay
mkdir -p /usr/lib/ffmpeg/5.0
mkdir -p /usr/lib/ffmpeg/7.0
wget -qO btbn-ffmpeg.tar.xz "https://github.com/NickM-27/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linux64-gpl-5.1.tar.xz"
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/ffmpeg/5.0 --strip-components 1
rm -rf btbn-ffmpeg.tar.xz /usr/lib/ffmpeg/5.0/doc /usr/lib/ffmpeg/5.0/bin/ffplay
wget -qO btbn-ffmpeg.tar.xz "https://github.com/NickM-27/FFmpeg-Builds/releases/download/autobuild-2024-09-19-12-51/ffmpeg-n7.0.2-18-g3e6cec1286-linux64-gpl-7.0.tar.xz"
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/ffmpeg/7.0 --strip-components 1
rm -rf btbn-ffmpeg.tar.xz /usr/lib/ffmpeg/7.0/doc /usr/lib/ffmpeg/7.0/bin/ffplay
fi
# ffmpeg -> arm64
if [[ "${TARGETARCH}" == "arm64" ]]; then
mkdir -p /usr/lib/btbn-ffmpeg
wget -qO btbn-ffmpeg.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linuxarm64-gpl-5.1.tar.xz"
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/btbn-ffmpeg --strip-components 1
rm -rf btbn-ffmpeg.tar.xz /usr/lib/btbn-ffmpeg/doc /usr/lib/btbn-ffmpeg/bin/ffplay
mkdir -p /usr/lib/ffmpeg/5.0
mkdir -p /usr/lib/ffmpeg/7.0
wget -qO btbn-ffmpeg.tar.xz "https://github.com/NickM-27/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linuxarm64-gpl-5.1.tar.xz"
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/ffmpeg/5.0 --strip-components 1
rm -rf btbn-ffmpeg.tar.xz /usr/lib/ffmpeg/5.0/doc /usr/lib/ffmpeg/5.0/bin/ffplay
wget -qO btbn-ffmpeg.tar.xz "https://github.com/NickM-27/FFmpeg-Builds/releases/download/autobuild-2024-09-19-12-51/ffmpeg-n7.0.2-18-g3e6cec1286-linuxarm64-gpl-7.0.tar.xz"
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/ffmpeg/7.0 --strip-components 1
rm -rf btbn-ffmpeg.tar.xz /usr/lib/ffmpeg/7.0/doc /usr/lib/ffmpeg/7.0/bin/ffplay
fi
# arch specific packages
if [[ "${TARGETARCH}" == "amd64" ]]; then
# use debian bookworm for hwaccel packages
# use debian bookworm for amd / intel-i965 driver packages
echo 'deb https://deb.debian.org/debian bookworm main contrib non-free' >/etc/apt/sources.list.d/debian-bookworm.list
apt-get -qq update
apt-get -qq install --no-install-recommends --no-install-suggests -y \
intel-opencl-icd \
mesa-va-drivers radeontop libva-drm2 intel-media-va-driver-non-free i965-va-driver libmfx1 intel-gpu-tools
i965-va-driver intel-gpu-tools onevpl-tools \
libva-drm2 \
mesa-va-drivers radeontop
# something about this dependency requires it to be installed in a separate call rather than in the line above
apt-get -qq install --no-install-recommends --no-install-suggests -y \
i965-va-driver-shaders
# intel packages use zst compression so we need to update dpkg
apt-get install -y dpkg
rm -f /etc/apt/sources.list.d/debian-bookworm.list
# use intel apt intel packages
wget -qO - https://repositories.intel.com/gpu/intel-graphics.key | gpg --yes --dearmor --output /usr/share/keyrings/intel-graphics.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/gpu/ubuntu jammy client" | tee /etc/apt/sources.list.d/intel-gpu-jammy.list
apt-get -qq update
apt-get -qq install --no-install-recommends --no-install-suggests -y \
intel-opencl-icd=24.35.30872.31-996~22.04 intel-level-zero-gpu=1.3.29735.27-914~22.04 intel-media-va-driver-non-free=24.3.3-996~22.04 \
libmfx1=23.2.2-880~22.04 libmfxgen1=24.2.4-914~22.04 libvpl2=1:2.13.0.0-996~22.04
rm -f /usr/share/keyrings/intel-graphics.gpg
rm -f /etc/apt/sources.list.d/intel-gpu-jammy.list
fi
if [[ "${TARGETARCH}" == "arm64" ]]; then
apt-get -qq install --no-install-recommends --no-install-suggests -y \
libva-drm2 mesa-va-drivers
libva-drm2 mesa-va-drivers radeontop
fi
# install vulkan
apt-get -qq install --no-install-recommends --no-install-suggests -y \
libvulkan1 mesa-vulkan-drivers
apt-get purge gnupg apt-transport-https xz-utils -y
apt-get clean autoclean -y
apt-get autoremove --purge -y

16
docker/main/install_tempio.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
set -euxo pipefail
tempio_version="2021.09.0"
if [[ "${TARGETARCH}" == "amd64" ]]; then
arch="amd64"
elif [[ "${TARGETARCH}" == "arm64" ]]; then
arch="aarch64"
fi
mkdir -p /rootfs/usr/local/tempio/bin
wget -q -O /rootfs/usr/local/tempio/bin/tempio "https://github.com/home-assistant/tempio/releases/download/${tempio_version}/tempio_${arch}"
chmod 755 /rootfs/usr/local/tempio/bin/tempio

View File

@@ -1,3 +1 @@
black == 23.10.*
isort
ruff

View File

@@ -1,5 +1,3 @@
numpy
# Openvino Library - Custom built with MYRIAD support
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino-2022.3.1-1-cp39-cp39-manylinux_2_31_x86_64.whl; platform_machine == 'x86_64'
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino-2022.3.1-1-cp39-cp39-linux_aarch64.whl; platform_machine == 'aarch64'
openvino-dev[tensorflow2] @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino_dev-2022.3.1-1-py3-none-any.whl
tensorflow
openvino-dev>=2024.0.0

View File

@@ -1,28 +1,47 @@
click == 8.1.*
Flask == 2.3.*
# FastAPI
aiohttp == 3.11.2
starlette == 0.41.2
starlette-context == 0.3.6
fastapi == 0.115.*
uvicorn == 0.30.*
slowapi == 0.1.*
imutils == 0.5.*
matplotlib == 3.7.*
joserfc == 1.0.*
pathvalidate == 3.2.*
markupsafe == 2.1.*
mypy == 1.6.1
numpy == 1.23.*
numpy == 1.26.*
onvif_zeep == 0.2.12
opencv-python-headless == 4.7.0.*
paho-mqtt == 1.6.*
opencv-python-headless == 4.9.0.*
paho-mqtt == 2.1.*
pandas == 2.2.*
peewee == 3.17.*
peewee_migrate == 1.12.*
psutil == 5.9.*
pydantic == 1.10.*
peewee_migrate == 1.13.*
psutil == 6.1.*
pydantic == 2.8.*
git+https://github.com/fbcotter/py3nvml#egg=py3nvml
PyYAML == 6.0.*
pytz == 2023.3
ruamel.yaml == 0.17.*
tzlocal == 5.1
types-PyYAML == 6.0.*
requests == 2.31.*
types-requests == 2.31.*
scipy == 1.11.*
pytz == 2024.*
pyzmq == 26.2.*
ruamel.yaml == 0.18.*
tzlocal == 5.2
requests == 2.32.*
types-requests == 2.32.*
scipy == 1.13.*
norfair == 2.2.*
setproctitle == 1.3.*
ws4py == 0.5.*
# Openvino Library - Custom built with MYRIAD support
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino-2022.3.1-1-cp39-cp39-manylinux_2_31_x86_64.whl; platform_machine == 'x86_64'
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino-2022.3.1-1-cp39-cp39-linux_aarch64.whl; platform_machine == 'aarch64'
unidecode == 1.3.*
# OpenVino & ONNX
openvino == 2024.3.*
onnxruntime-openvino == 1.19.* ; platform_machine == 'x86_64'
onnxruntime == 1.19.* ; platform_machine == 'aarch64'
# Embeddings
transformers == 4.45.*
# Generative AI
google-generativeai == 0.8.*
ollama == 0.3.*
openai == 1.51.*
# push notifications
py-vapid == 1.9.*
pywebpush == 2.0.*

View File

@@ -0,0 +1 @@
certsync

View File

@@ -0,0 +1 @@
certsync-pipeline

View File

@@ -0,0 +1,4 @@
#!/command/with-contenv bash
# shellcheck shell=bash
exec logutil-service /dev/shm/logs/certsync

View File

@@ -0,0 +1 @@
longrun

View File

@@ -0,0 +1,30 @@
#!/command/with-contenv bash
# shellcheck shell=bash
# Take down the S6 supervision tree when the service fails
set -o errexit -o nounset -o pipefail
# Logs should be sent to stdout so that s6 can collect them
declare exit_code_container
exit_code_container=$(cat /run/s6-linux-init-container-results/exitcode)
readonly exit_code_container
readonly exit_code_service="${1}"
readonly exit_code_signal="${2}"
readonly service="CERTSYNC"
echo "[INFO] Service ${service} exited with code ${exit_code_service} (by signal ${exit_code_signal})"
if [[ "${exit_code_service}" -eq 256 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo $((128 + exit_code_signal)) >/run/s6-linux-init-container-results/exitcode
fi
if [[ "${exit_code_signal}" -eq 15 ]]; then
exec /run/s6/basedir/bin/halt
fi
elif [[ "${exit_code_service}" -ne 0 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo "${exit_code_service}" >/run/s6-linux-init-container-results/exitcode
fi
exec /run/s6/basedir/bin/halt
fi

View File

@@ -0,0 +1 @@
certsync-log

View File

@@ -0,0 +1,58 @@
#!/command/with-contenv bash
# shellcheck shell=bash
# Start the CERTSYNC service
set -o errexit -o nounset -o pipefail
# Logs should be sent to stdout so that s6 can collect them
echo "[INFO] Starting certsync..."
lefile="/etc/letsencrypt/live/frigate/fullchain.pem"
tls_enabled=`python3 /usr/local/nginx/get_tls_settings.py | jq -r .enabled`
while true
do
if [[ "$tls_enabled" == 'false' ]]; then
sleep 9999
continue
fi
if [ ! -e $lefile ]
then
echo "[ERROR] TLS certificate does not exist: $lefile"
fi
leprint=`openssl x509 -in $lefile -fingerprint -noout 2>&1 || echo 'failed'`
case "$leprint" in
*Fingerprint*)
;;
*)
echo "[ERROR] Missing fingerprint from $lefile"
;;
esac
liveprint=`echo | openssl s_client -showcerts -connect 127.0.0.1:8971 2>&1 | openssl x509 -fingerprint 2>&1 | grep -i fingerprint || echo 'failed'`
case "$liveprint" in
*Fingerprint*)
;;
*)
echo "[ERROR] Missing fingerprint from current nginx TLS cert"
;;
esac
if [[ "$leprint" != "failed" && "$liveprint" != "failed" && "$leprint" != "$liveprint" ]]
then
echo "[INFO] Reloading nginx to refresh TLS certificate"
echo "$lefile: $leprint"
/usr/local/nginx/sbin/nginx -s reload
fi
sleep 60
done
exit 0

View File

@@ -0,0 +1 @@
30000

View File

@@ -0,0 +1 @@
longrun

View File

@@ -16,8 +16,8 @@ function migrate_db_path() {
if [[ -f "${config_file_yaml}" ]]; then
config_file="${config_file_yaml}"
elif [[ ! -f "${config_file}" ]]; then
echo "[ERROR] Frigate config file not found"
return 1
# Frigate will create the config file on startup
return 0
fi
unset config_file_yaml
@@ -42,10 +42,14 @@ function migrate_db_path() {
fi
}
function set_libva_version() {
local ffmpeg_path=$(python3 /usr/local/ffmpeg/get_ffmpeg_path.py)
export LIBAVFORMAT_VERSION_MAJOR=$($ffmpeg_path -version | grep -Po "libavformat\W+\K\d+")
}
echo "[INFO] Preparing Frigate..."
migrate_db_path
export LIBAVFORMAT_VERSION_MAJOR=$(ffmpeg -version | grep -Po 'libavformat\W+\K\d+')
set_libva_version
echo "[INFO] Starting Frigate..."
cd /opt/frigate || echo "[ERROR] Failed to change working directory to /opt/frigate"

View File

@@ -43,10 +43,18 @@ function get_ip_and_port_from_supervisor() {
export FRIGATE_GO2RTC_WEBRTC_CANDIDATE_INTERNAL="${ip_address}:${webrtc_port}"
}
export LIBAVFORMAT_VERSION_MAJOR=$(ffmpeg -version | grep -Po 'libavformat\W+\K\d+')
function set_libva_version() {
local ffmpeg_path=$(python3 /usr/local/ffmpeg/get_ffmpeg_path.py)
export LIBAVFORMAT_VERSION_MAJOR=$($ffmpeg_path -version | grep -Po "libavformat\W+\K\d+")
}
if [[ -f "/dev/shm/go2rtc.yaml" ]]; then
echo "[INFO] Removing stale config from last run..."
rm /dev/shm/go2rtc.yaml
fi
if [[ ! -f "/dev/shm/go2rtc.yaml" ]]; then
echo "[INFO] Preparing go2rtc config..."
echo "[INFO] Preparing new go2rtc config..."
if [[ -n "${SUPERVISOR_TOKEN:-}" ]]; then
# Running as a Home Assistant add-on, infer the IP address and port
@@ -54,8 +62,12 @@ if [[ ! -f "/dev/shm/go2rtc.yaml" ]]; then
fi
python3 /usr/local/go2rtc/create_config.py
else
echo "[WARNING] Unable to remove existing go2rtc config. Changes made to your frigate config file may not be recognized. Please remove the /dev/shm/go2rtc.yaml from your docker host manually."
fi
set_libva_version
readonly config_path="/config"
if [[ -x "${config_path}/go2rtc" ]]; then

View File

@@ -4,7 +4,7 @@
set -o errexit -o nounset -o pipefail
dirs=(/dev/shm/logs/frigate /dev/shm/logs/go2rtc /dev/shm/logs/nginx)
dirs=(/dev/shm/logs/frigate /dev/shm/logs/go2rtc /dev/shm/logs/nginx /dev/shm/logs/certsync)
mkdir -p "${dirs[@]}"
chown nobody:nogroup "${dirs[@]}"

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
# Wait for PID file to exist.
while ! test -f /run/nginx.pid; do sleep 1; done

View File

@@ -0,0 +1 @@
3

View File

@@ -8,6 +8,84 @@ set -o errexit -o nounset -o pipefail
echo "[INFO] Starting NGINX..."
# Taken from https://github.com/felipecrs/cgroup-scripts/commits/master/get_cpus.sh
function get_cpus() {
local quota=""
local period=""
if [ -f /sys/fs/cgroup/cgroup.controllers ]; then
if [ -f /sys/fs/cgroup/cpu.max ]; then
read -r quota period </sys/fs/cgroup/cpu.max
if [ "$quota" = "max" ]; then
quota=""
period=""
fi
else
echo "[WARN] /sys/fs/cgroup/cpu.max not found. Falling back to /proc/cpuinfo." >&2
fi
else
if [ -f /sys/fs/cgroup/cpu/cpu.cfs_quota_us ] && [ -f /sys/fs/cgroup/cpu/cpu.cfs_period_us ]; then
quota=$(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us)
period=$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us)
if [ "$quota" = "-1" ]; then
quota=""
period=""
fi
else
echo "[WARN] /sys/fs/cgroup/cpu/cpu.cfs_quota_us or /sys/fs/cgroup/cpu/cpu.cfs_period_us not found. Falling back to /proc/cpuinfo." >&2
fi
fi
local cpus
if [ "${period}" != "0" ] && [ -n "${quota}" ] && [ -n "${period}" ]; then
cpus=$((quota / period))
if [ "$cpus" -eq 0 ]; then
cpus=1
fi
else
cpus=$(grep -c ^processor /proc/cpuinfo)
fi
printf '%s' "$cpus"
}
function set_worker_processes() {
# Capture number of assigned CPUs to calculate worker processes
local cpus
cpus=$(get_cpus)
if [[ "${cpus}" -gt 4 ]]; then
cpus=4
fi
# we need to catch any errors because sed will fail if user has bind mounted a custom nginx file
sed -i "s/worker_processes auto;/worker_processes ${cpus};/" /usr/local/nginx/conf/nginx.conf || true
}
set_worker_processes
# ensure the directory for ACME challenges exists
mkdir -p /etc/letsencrypt/www
# Create self signed certs if needed
letsencrypt_path=/etc/letsencrypt/live/frigate
mkdir -p $letsencrypt_path
if [ ! \( -f "$letsencrypt_path/privkey.pem" -a -f "$letsencrypt_path/fullchain.pem" \) ]; then
echo "[INFO] No TLS certificate found. Generating a self signed certificate..."
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
-subj "/O=FRIGATE DEFAULT CERT/CN=*" \
-keyout "$letsencrypt_path/privkey.pem" -out "$letsencrypt_path/fullchain.pem" 2>/dev/null
fi
# build templates for optional TLS support
python3 /usr/local/nginx/get_tls_settings.py | \
tempio -template /usr/local/nginx/templates/listen.gotmpl \
-out /usr/local/nginx/conf/listen.conf
# Replace the bash process with the NGINX process, redirecting stderr to stdout
exec 2>&1
exec nginx
exec \
s6-notifyoncheck -t 30000 -n 1 \
nginx

View File

@@ -0,0 +1,80 @@
0 person
1 bicycle
2 car
3 motorcycle
4 airplane
5 car
6 train
7 car
8 boat
9 traffic light
10 fire hydrant
11 stop sign
12 parking meter
13 bench
14 bird
15 cat
16 dog
17 horse
18 sheep
19 cow
20 elephant
21 bear
22 zebra
23 giraffe
24 backpack
25 umbrella
26 handbag
27 tie
28 suitcase
29 frisbee
30 skis
31 snowboard
32 sports ball
33 kite
34 baseball bat
35 baseball glove
36 skateboard
37 surfboard
38 tennis racket
39 bottle
40 wine glass
41 cup
42 fork
43 knife
44 spoon
45 bowl
46 banana
47 apple
48 sandwich
49 orange
50 broccoli
51 carrot
52 hot dog
53 pizza
54 donut
55 cake
56 chair
57 couch
58 potted plant
59 bed
60 dining table
61 toilet
62 tv
63 laptop
64 mouse
65 remote
66 keyboard
67 cell phone
68 microwave
69 oven
70 toaster
71 sink
72 refrigerator
73 book
74 clock
75 vase
76 scissors
77 teddy bear
78 hair drier
79 toothbrush

View File

@@ -0,0 +1,91 @@
0 person
1 bicycle
2 car
3 motorcycle
4 airplane
5 bus
6 train
7 car
8 boat
9 traffic light
10 fire hydrant
11 street sign
12 stop sign
13 parking meter
14 bench
15 bird
16 cat
17 dog
18 horse
19 sheep
20 cow
21 elephant
22 bear
23 zebra
24 giraffe
25 hat
26 backpack
27 umbrella
28 shoe
29 eye glasses
30 handbag
31 tie
32 suitcase
33 frisbee
34 skis
35 snowboard
36 sports ball
37 kite
38 baseball bat
39 baseball glove
40 skateboard
41 surfboard
42 tennis racket
43 bottle
44 plate
45 wine glass
46 cup
47 fork
48 knife
49 spoon
50 bowl
51 banana
52 apple
53 sandwich
54 orange
55 broccoli
56 carrot
57 hot dog
58 pizza
59 donut
60 cake
61 chair
62 couch
63 potted plant
64 bed
65 mirror
66 dining table
67 window
68 desk
69 toilet
70 door
71 tv
72 laptop
73 mouse
74 remote
75 keyboard
76 cell phone
77 microwave
78 oven
79 toaster
80 sink
81 refrigerator
82 blender
83 book
84 clock
85 vase
86 scissors
87 teddy bear
88 hair drier
89 toothbrush
90 hair brush

View File

@@ -0,0 +1,45 @@
import json
import os
import shutil
import sys
from ruamel.yaml import YAML
sys.path.insert(0, "/opt/frigate")
from frigate.const import (
DEFAULT_FFMPEG_VERSION,
INCLUDED_FFMPEG_VERSIONS,
)
sys.path.remove("/opt/frigate")
yaml = YAML()
config_file = os.environ.get("CONFIG_FILE", "/config/config.yml")
# Check if we can use .yaml instead of .yml
config_file_yaml = config_file.replace(".yml", ".yaml")
if os.path.isfile(config_file_yaml):
config_file = config_file_yaml
try:
with open(config_file) as f:
raw_config = f.read()
if config_file.endswith((".yaml", ".yml")):
config: dict[str, any] = yaml.load(raw_config)
elif config_file.endswith(".json"):
config: dict[str, any] = json.loads(raw_config)
except FileNotFoundError:
config: dict[str, any] = {}
path = config.get("ffmpeg", {}).get("path", "default")
if path == "default":
if shutil.which("ffmpeg") is None:
print(f"/usr/lib/ffmpeg/{DEFAULT_FFMPEG_VERSION}/bin/ffmpeg")
else:
print("ffmpeg")
elif path in INCLUDED_FFMPEG_VERSIONS:
print(f"/usr/lib/ffmpeg/{path}/bin/ffmpeg")
else:
print(f"{path}/bin/ffmpeg")

View File

@@ -2,20 +2,33 @@
import json
import os
import shutil
import sys
from pathlib import Path
import yaml
from ruamel.yaml import YAML
sys.path.insert(0, "/opt/frigate")
from frigate.const import BIRDSEYE_PIPE # noqa: E402
from frigate.ffmpeg_presets import ( # noqa: E402
parse_preset_hardware_acceleration_encode,
from frigate.const import (
BIRDSEYE_PIPE,
DEFAULT_FFMPEG_VERSION,
INCLUDED_FFMPEG_VERSIONS,
)
from frigate.ffmpeg_presets import parse_preset_hardware_acceleration_encode
sys.path.remove("/opt/frigate")
yaml = YAML()
FRIGATE_ENV_VARS = {k: v for k, v in os.environ.items() if k.startswith("FRIGATE_")}
# read docker secret files as env vars too
if os.path.isdir("/run/secrets"):
for secret_file in os.listdir("/run/secrets"):
if secret_file.startswith("FRIGATE_"):
FRIGATE_ENV_VARS[secret_file] = (
Path(os.path.join("/run/secrets", secret_file)).read_text().strip()
)
config_file = os.environ.get("CONFIG_FILE", "/config/config.yml")
# Check if we can use .yaml instead of .yml
@@ -23,13 +36,16 @@ config_file_yaml = config_file.replace(".yml", ".yaml")
if os.path.isfile(config_file_yaml):
config_file = config_file_yaml
with open(config_file) as f:
raw_config = f.read()
try:
with open(config_file) as f:
raw_config = f.read()
if config_file.endswith((".yaml", ".yml")):
config: dict[str, any] = yaml.safe_load(raw_config)
elif config_file.endswith(".json"):
config: dict[str, any] = json.loads(raw_config)
if config_file.endswith((".yaml", ".yml")):
config: dict[str, any] = yaml.load(raw_config)
elif config_file.endswith(".json"):
config: dict[str, any] = json.loads(raw_config)
except FileNotFoundError:
config: dict[str, any] = {}
go2rtc_config: dict[str, any] = config.get("go2rtc", {})
@@ -49,7 +65,15 @@ if go2rtc_config.get("log") is None:
elif go2rtc_config["log"].get("format") is None:
go2rtc_config["log"]["format"] = "text"
if not go2rtc_config.get("webrtc", {}).get("candidates", []):
# ensure there is a default webrtc config
if not go2rtc_config.get("webrtc"):
go2rtc_config["webrtc"] = {}
# go2rtc should listen on 8555 tcp & udp by default
if not go2rtc_config["webrtc"].get("listen"):
go2rtc_config["webrtc"]["listen"] = ":8555"
if not go2rtc_config["webrtc"].get("candidates", []):
default_candidates = []
# use internal candidate if it was discovered when running through the add-on
internal_candidate = os.environ.get(
@@ -85,16 +109,32 @@ else:
**FRIGATE_ENV_VARS
)
# ensure ffmpeg path is set correctly
path = config.get("ffmpeg", {}).get("path", "default")
if path == "default":
if shutil.which("ffmpeg") is None:
ffmpeg_path = f"/usr/lib/ffmpeg/{DEFAULT_FFMPEG_VERSION}/bin/ffmpeg"
else:
ffmpeg_path = "ffmpeg"
elif path in INCLUDED_FFMPEG_VERSIONS:
ffmpeg_path = f"/usr/lib/ffmpeg/{path}/bin/ffmpeg"
else:
ffmpeg_path = f"{path}/bin/ffmpeg"
if go2rtc_config.get("ffmpeg") is None:
go2rtc_config["ffmpeg"] = {"bin": ffmpeg_path}
elif go2rtc_config["ffmpeg"].get("bin") is None:
go2rtc_config["ffmpeg"]["bin"] = ffmpeg_path
# need to replace ffmpeg command when using ffmpeg4
if int(os.environ["LIBAVFORMAT_VERSION_MAJOR"]) < 59:
if int(os.environ.get("LIBAVFORMAT_VERSION_MAJOR", "59") or "59") < 59:
if go2rtc_config["ffmpeg"].get("rtsp") is None:
go2rtc_config["ffmpeg"]["rtsp"] = (
"-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
)
else:
if go2rtc_config.get("ffmpeg") is None:
go2rtc_config["ffmpeg"] = {
"rtsp": "-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
}
elif go2rtc_config["ffmpeg"].get("rtsp") is None:
go2rtc_config["ffmpeg"][
"rtsp"
] = "-fflags nobuffer -flags low_delay -stimeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i {input}"
go2rtc_config["ffmpeg"] = {"path": ""}
for name in go2rtc_config.get("streams", {}):
stream = go2rtc_config["streams"][name]
@@ -125,7 +165,7 @@ if config.get("birdseye", {}).get("restream", False):
birdseye: dict[str, any] = config.get("birdseye")
input = f"-f rawvideo -pix_fmt yuv420p -video_size {birdseye.get('width', 1280)}x{birdseye.get('height', 720)} -r 10 -i {BIRDSEYE_PIPE}"
ffmpeg_cmd = f"exec:{parse_preset_hardware_acceleration_encode(config.get('ffmpeg', {}).get('hwaccel_args'), input, '-rtsp_transport tcp -f rtsp {output}')}"
ffmpeg_cmd = f"exec:{parse_preset_hardware_acceleration_encode(ffmpeg_path, config.get('ffmpeg', {}).get('hwaccel_args', ''), input, '-rtsp_transport tcp -f rtsp {output}')}"
if go2rtc_config.get("streams"):
go2rtc_config["streams"]["birdseye"] = ffmpeg_cmd

View File

@@ -0,0 +1,43 @@
set $upstream_auth http://127.0.0.1:5001/auth;
## Virtual endpoint created by nginx to forward auth requests.
location /auth {
## Essential Proxy Configuration
internal;
proxy_pass $upstream_auth;
## Headers
# First strip out all the request headers
# Note: This is important to ensure that upgrade requests for secure
# websockets dont cause the backend to fail
proxy_pass_request_headers off;
# Pass info about the request
proxy_set_header X-Original-Method $request_method;
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
proxy_set_header X-Server-Port $server_port;
proxy_set_header Content-Length "";
# Pass along auth related info
proxy_set_header Authorization $http_authorization;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-CSRF-TOKEN "1";
# include headers from common auth proxies
include proxy_trusted_headers.conf;
## Basic Proxy Configuration
proxy_pass_request_body off;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; # Timeout if the real server is dead
proxy_redirect http:// $scheme://;
proxy_http_version 1.1;
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
proxy_buffers 4 32k;
client_body_buffer_size 128k;
## Advanced Proxy Configuration
send_timeout 5m;
proxy_read_timeout 240;
proxy_send_timeout 240;
proxy_connect_timeout 240;
}

View File

@@ -0,0 +1,22 @@
## Send a subrequest to verify if the user is authenticated and has permission to access the resource.
auth_request /auth;
## Save the upstream metadata response headers from Authelia to variables.
auth_request_set $user $upstream_http_remote_user;
auth_request_set $groups $upstream_http_remote_groups;
auth_request_set $name $upstream_http_remote_name;
auth_request_set $email $upstream_http_remote_email;
## Inject the metadata response headers from the variables into the request made to the backend.
proxy_set_header Remote-User $user;
proxy_set_header Remote-Groups $groups;
proxy_set_header Remote-Email $email;
proxy_set_header Remote-Name $name;
## Refresh the cookie as needed
auth_request_set $auth_cookie $upstream_http_set_cookie;
add_header Set-Cookie $auth_cookie;
## Pass the location header back up if it exists
auth_request_set $redirection_url $upstream_http_location;
add_header Location $redirection_url;

View File

@@ -0,0 +1,4 @@
upstream go2rtc {
server 127.0.0.1:1984;
keepalive 1024;
}

View File

@@ -10,6 +10,8 @@ events {
}
http {
map_hash_bucket_size 256;
include mime.types;
default_type application/octet-stream;
@@ -32,6 +34,13 @@ http {
gzip_proxied no-cache no-store private expired auth;
gzip_vary on;
proxy_cache_path /dev/shm/nginx_cache levels=1:2 keys_zone=api_cache:10m max_size=10m inactive=1m use_temp_path=off;
map $sent_http_content_type $should_not_cache {
'application/json' 0;
default 1;
}
upstream frigate_api {
server 127.0.0.1:5001;
keepalive 1024;
@@ -47,13 +56,10 @@ http {
keepalive 1024;
}
upstream go2rtc {
server 127.0.0.1:1984;
keepalive 1024;
}
include go2rtc_upstream.conf;
server {
listen 5000;
include listen.conf;
# vod settings
vod_base_url '';
@@ -86,7 +92,10 @@ http {
gzip on;
gzip_types application/vnd.apple.mpegurl;
include auth_location.conf;
location /vod/ {
include auth_request.conf;
aio threads;
vod hls;
@@ -95,9 +104,12 @@ http {
add_header Cache-Control "no-store";
expires off;
keepalive_disable safari;
}
location /stream/ {
include auth_request.conf;
add_header Cache-Control "no-store";
expires off;
@@ -112,12 +124,14 @@ http {
}
location /clips/ {
include auth_request.conf;
types {
video/mp4 mp4;
image/jpeg jpg;
}
expires 7d;
add_header Cache-Control "public";
autoindex on;
root /media/frigate;
}
@@ -128,6 +142,7 @@ http {
}
location /recordings/ {
include auth_request.conf;
types {
video/mp4 mp4;
}
@@ -138,6 +153,7 @@ http {
}
location /exports/ {
include auth_request.conf;
types {
video/mp4 mp4;
}
@@ -148,59 +164,121 @@ http {
}
location /ws {
include auth_request.conf;
proxy_pass http://mqtt_ws/;
include proxy.conf;
}
location /live/jsmpeg/ {
include auth_request.conf;
proxy_pass http://jsmpeg/;
include proxy.conf;
}
location /live/mse/ {
proxy_pass http://go2rtc/;
# frigate lovelace card uses this path
location /live/mse/api/ws {
include auth_request.conf;
limit_except GET {
deny all;
}
proxy_pass http://go2rtc/api/ws;
include proxy.conf;
}
location /live/webrtc/ {
proxy_pass http://go2rtc/;
location /live/webrtc/api/ws {
include auth_request.conf;
limit_except GET {
deny all;
}
proxy_pass http://go2rtc/api/ws;
include proxy.conf;
}
location ~* /api/go2rtc([/]?.*)$ {
proxy_pass http://go2rtc;
rewrite ^/api/go2rtc(.*)$ /api$1 break;
# pass through go2rtc player
location /live/webrtc/webrtc.html {
include auth_request.conf;
limit_except GET {
deny all;
}
proxy_pass http://go2rtc/webrtc.html;
include proxy.conf;
}
location ~* /api/.*\.(jpg|jpeg|png)$ {
rewrite ^/api/(.*)$ $1 break;
# frontend uses this to fetch the version
location /api/go2rtc/api {
include auth_request.conf;
limit_except GET {
deny all;
}
proxy_pass http://go2rtc/api;
include proxy.conf;
}
# integration uses this to add webrtc candidate
location /api/go2rtc/webrtc {
include auth_request.conf;
limit_except POST {
deny all;
}
proxy_pass http://go2rtc/api/webrtc;
include proxy.conf;
}
location ~* /api/.*\.(jpg|jpeg|png|webp|gif)$ {
include auth_request.conf;
rewrite ^/api/(.*)$ /$1 break;
proxy_pass http://frigate_api;
include proxy.conf;
}
location /api/ {
include auth_request.conf;
add_header Cache-Control "no-store";
expires off;
proxy_pass http://frigate_api/;
include proxy.conf;
proxy_cache api_cache;
proxy_cache_lock on;
proxy_cache_use_stale updating;
proxy_cache_valid 200 5s;
proxy_cache_bypass $http_x_cache_bypass;
proxy_no_cache $should_not_cache;
add_header X-Cache-Status $upstream_cache_status;
location /api/vod/ {
include auth_request.conf;
proxy_pass http://frigate_api/vod/;
include proxy.conf;
proxy_cache off;
}
location /api/login {
auth_request off;
rewrite ^/api(/.*)$ $1 break;
proxy_pass http://frigate_api;
include proxy.conf;
}
location /api/stats {
include auth_request.conf;
access_log off;
rewrite ^/api/(.*)$ $1 break;
rewrite ^/api(/.*)$ $1 break;
proxy_pass http://frigate_api;
include proxy.conf;
}
location /api/version {
include auth_request.conf;
access_log off;
rewrite ^/api/(.*)$ $1 break;
rewrite ^/api(/.*)$ $1 break;
proxy_pass http://frigate_api;
include proxy.conf;
}
}
location / {
# do not require auth for static assets
add_header Cache-Control "no-store";
expires off;
@@ -222,22 +300,7 @@ http {
sub_filter_once off;
root /opt/frigate/web;
try_files $uri $uri/ /index.html;
try_files $uri $uri.html $uri/ /index.html;
}
}
}
rtmp {
server {
listen 1935;
chunk_size 4096;
allow publish 127.0.0.1;
deny publish all;
allow play all;
application live {
live on;
record off;
meta copy;
}
}
}

View File

@@ -1,4 +1,26 @@
proxy_http_version 1.1;
## Headers
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-URI $request_uri;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
## Basic Proxy Configuration
client_body_buffer_size 128k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; ## Timeout if the real server is dead.
proxy_redirect http:// $scheme://;
proxy_http_version 1.1;
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
proxy_buffers 64 256k;
## Advanced Proxy Configuration
send_timeout 5m;
proxy_read_timeout 360;
proxy_send_timeout 360;
proxy_connect_timeout 360;

View File

@@ -0,0 +1,25 @@
# Header used to validate reverse proxy trust
proxy_set_header X-Proxy-Secret $http_x_proxy_secret;
# these headers will be copied to the /auth request and are available
# to be mapped in the config to Frigate's remote-user header
# List of headers sent by common authentication proxies:
# - Authelia
# - Traefik forward auth
# - oauth2_proxy
# - Authentik
proxy_set_header Remote-User $http_remote_user;
proxy_set_header Remote-Groups $http_remote_groups;
proxy_set_header Remote-Email $http_remote_email;
proxy_set_header Remote-Name $http_remote_name;
proxy_set_header X-Forwarded-User $http_x_forwarded_user;
proxy_set_header X-Forwarded-Groups $http_x_forwarded_groups;
proxy_set_header X-Forwarded-Email $http_x_forwarded_email;
proxy_set_header X-Forwarded-Preferred-Username $http_x_forwarded_preferred_username;
proxy_set_header X-authentik-username $http_x_authentik_username;
proxy_set_header X-authentik-groups $http_x_authentik_groups;
proxy_set_header X-authentik-email $http_x_authentik_email;
proxy_set_header X-authentik-name $http_x_authentik_name;
proxy_set_header X-authentik-uid $http_x_authentik_uid;

View File

@@ -0,0 +1,30 @@
"""Prints the tls config as json to stdout."""
import json
import os
from ruamel.yaml import YAML
yaml = YAML()
config_file = os.environ.get("CONFIG_FILE", "/config/config.yml")
# Check if we can use .yaml instead of .yml
config_file_yaml = config_file.replace(".yml", ".yaml")
if os.path.isfile(config_file_yaml):
config_file = config_file_yaml
try:
with open(config_file) as f:
raw_config = f.read()
if config_file.endswith((".yaml", ".yml")):
config: dict[str, any] = yaml.load(raw_config)
elif config_file.endswith(".json"):
config: dict[str, any] = json.loads(raw_config)
except FileNotFoundError:
config: dict[str, any] = {}
tls_config: dict[str, any] = config.get("tls", {"enabled": True})
print(json.dumps(tls_config))

View File

@@ -0,0 +1,33 @@
# intended for internal traffic, not protected by auth
listen 5000;
{{ if not .enabled }}
# intended for external traffic, protected by auth
listen 8971;
{{ else }}
# intended for external traffic, protected by auth
listen 8971 ssl;
ssl_certificate /etc/letsencrypt/live/frigate/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/frigate/privkey.pem;
# generated 2024-06-01, Mozilla Guideline v5.7, nginx 1.25.3, OpenSSL 1.1.1w, modern configuration, no OCSP
# https://ssl-config.mozilla.org/#server=nginx&version=1.25.3&config=modern&openssl=1.1.1w&ocsp=false&guideline=5.7
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off;
# modern configuration
ssl_protocols TLSv1.3;
ssl_prefer_server_ciphers off;
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
add_header Strict-Transport-Security "max-age=63072000" always;
# ACME challenge location
location /.well-known/acme-challenge/ {
default_type "text/plain";
root /etc/letsencrypt/www;
}
{{ end }}

View File

@@ -0,0 +1,27 @@
# syntax=docker/dockerfile:1.6
# https://askubuntu.com/questions/972516/debian-frontend-environment-variable
ARG DEBIAN_FRONTEND=noninteractive
FROM wheels as rk-wheels
COPY docker/main/requirements-wheels.txt /requirements-wheels.txt
COPY docker/rockchip/requirements-wheels-rk.txt /requirements-wheels-rk.txt
RUN sed -i "/https:\/\//d" /requirements-wheels.txt
RUN pip3 wheel --wheel-dir=/rk-wheels -c /requirements-wheels.txt -r /requirements-wheels-rk.txt
FROM deps AS rk-frigate
ARG TARGETARCH
RUN --mount=type=bind,from=rk-wheels,source=/rk-wheels,target=/deps/rk-wheels \
pip3 install -U /deps/rk-wheels/*.whl
WORKDIR /opt/frigate/
COPY --from=rootfs / /
ADD https://github.com/MarcA711/rknn-toolkit2/releases/download/v2.0.0/librknnrt.so /usr/lib/
RUN rm -rf /usr/lib/btbn-ffmpeg/bin/ffmpeg
RUN rm -rf /usr/lib/btbn-ffmpeg/bin/ffprobe
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-7/ffmpeg /usr/lib/ffmpeg/6.0/bin/
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-7/ffprobe /usr/lib/ffmpeg/6.0/bin/
ENV PATH="/usr/lib/ffmpeg/6.0/bin/:${PATH}"

View File

@@ -0,0 +1 @@
rknn-toolkit-lite2 @ https://github.com/MarcA711/rknn-toolkit2/releases/download/v2.0.0/rknn_toolkit_lite2-2.0.0b0-cp39-cp39-linux_aarch64.whl

27
docker/rockchip/rk.hcl Normal file
View File

@@ -0,0 +1,27 @@
target wheels {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/arm64"]
target = "wheels"
}
target deps {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/arm64"]
target = "deps"
}
target rootfs {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/arm64"]
target = "rootfs"
}
target rk {
dockerfile = "docker/rockchip/Dockerfile"
contexts = {
wheels = "target:wheels",
deps = "target:deps",
rootfs = "target:rootfs"
}
platforms = ["linux/arm64"]
}

15
docker/rockchip/rk.mk Normal file
View File

@@ -0,0 +1,15 @@
BOARDS += rk
local-rk: version
docker buildx bake --file=docker/rockchip/rk.hcl rk \
--set rk.tags=frigate:latest-rk \
--load
build-rk: version
docker buildx bake --file=docker/rockchip/rk.hcl rk \
--set rk.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rk
push-rk: build-rk
docker buildx bake --file=docker/rockchip/rk.hcl rk \
--set rk.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rk \
--push

108
docker/rocm/Dockerfile Normal file
View File

@@ -0,0 +1,108 @@
# syntax=docker/dockerfile:1.4
# https://askubuntu.com/questions/972516/debian-frontend-environment-variable
ARG DEBIAN_FRONTEND=noninteractive
ARG ROCM=5.7.3
ARG AMDGPU=gfx900
ARG HSA_OVERRIDE_GFX_VERSION
ARG HSA_OVERRIDE
#######################################################################
FROM ubuntu:focal as rocm
ARG ROCM
RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install gnupg wget
RUN mkdir --parents --mode=0755 /etc/apt/keyrings
RUN wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null
COPY docker/rocm/rocm.list /etc/apt/sources.list.d/
COPY docker/rocm/rocm-pin-600 /etc/apt/preferences.d/
RUN apt-get update
RUN apt-get -y install --no-install-recommends migraphx hipfft roctracer
RUN apt-get -y install --no-install-recommends migraphx-dev
RUN mkdir -p /opt/rocm-dist/opt/rocm-$ROCM/lib
RUN cd /opt/rocm-$ROCM/lib && cp -dpr libMIOpen*.so* libamd*.so* libhip*.so* libhsa*.so* libmigraphx*.so* librocm*.so* librocblas*.so* libroctracer*.so* librocfft*.so* /opt/rocm-dist/opt/rocm-$ROCM/lib/
RUN cd /opt/rocm-dist/opt/ && ln -s rocm-$ROCM rocm
RUN mkdir -p /opt/rocm-dist/etc/ld.so.conf.d/
RUN echo /opt/rocm/lib|tee /opt/rocm-dist/etc/ld.so.conf.d/rocm.conf
#######################################################################
FROM --platform=linux/amd64 debian:11 as debian-base
RUN apt-get update && apt-get -y upgrade
RUN apt-get -y install --no-install-recommends libelf1 libdrm2 libdrm-amdgpu1 libnuma1 kmod
RUN apt-get -y install python3
#######################################################################
# ROCm does not come with migraphx wrappers for python 3.9, so we build it here
FROM debian-base as debian-build
ARG ROCM
COPY --from=rocm /opt/rocm-$ROCM /opt/rocm-$ROCM
RUN ln -s /opt/rocm-$ROCM /opt/rocm
RUN apt-get -y install g++ cmake
RUN apt-get -y install python3-pybind11 python3.9-distutils python3-dev
WORKDIR /opt/build
COPY docker/rocm/migraphx .
RUN mkdir build && cd build && cmake .. && make install
#######################################################################
FROM deps AS deps-prelim
# need this to install libnuma1
RUN apt-get update
# no ugprade?!?!
RUN apt-get -y install libnuma1
WORKDIR /opt/frigate/
COPY --from=rootfs / /
COPY docker/rocm/requirements-wheels-rocm.txt /requirements.txt
RUN python3 -m pip install --upgrade pip \
&& pip3 uninstall -y onnxruntime-openvino \
&& pip3 install -r /requirements.txt
#######################################################################
FROM scratch AS rocm-dist
ARG ROCM
ARG AMDGPU
COPY --from=rocm /opt/rocm-$ROCM/bin/rocminfo /opt/rocm-$ROCM/bin/migraphx-driver /opt/rocm-$ROCM/bin/
COPY --from=rocm /opt/rocm-$ROCM/share/miopen/db/*$AMDGPU* /opt/rocm-$ROCM/share/miopen/db/
COPY --from=rocm /opt/rocm-$ROCM/share/miopen/db/*gfx908* /opt/rocm-$ROCM/share/miopen/db/
COPY --from=rocm /opt/rocm-$ROCM/lib/rocblas/library/*$AMDGPU* /opt/rocm-$ROCM/lib/rocblas/library/
COPY --from=rocm /opt/rocm-dist/ /
COPY --from=debian-build /opt/rocm/lib/migraphx.cpython-39-x86_64-linux-gnu.so /opt/rocm-$ROCM/lib/
#######################################################################
FROM deps-prelim AS rocm-prelim-hsa-override0
ENV HSA_ENABLE_SDMA=0
COPY --from=rocm-dist / /
RUN ldconfig
#######################################################################
FROM rocm-prelim-hsa-override0 as rocm-prelim-hsa-override1
ARG HSA_OVERRIDE_GFX_VERSION
ENV HSA_OVERRIDE_GFX_VERSION=$HSA_OVERRIDE_GFX_VERSION
#######################################################################
FROM rocm-prelim-hsa-override$HSA_OVERRIDE as rocm-deps

View File

@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
project(migraphx_py)
include_directories(/opt/rocm/include)
find_package(pybind11 REQUIRED)
pybind11_add_module(migraphx migraphx_py.cpp)
target_link_libraries(migraphx PRIVATE /opt/rocm/lib/libmigraphx.so /opt/rocm/lib/libmigraphx_tf.so /opt/rocm/lib/libmigraphx_onnx.so)
install(TARGETS migraphx
COMPONENT python
LIBRARY DESTINATION /opt/rocm/lib
)

View File

@@ -0,0 +1,582 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/numpy.h>
#include <migraphx/program.hpp>
#include <migraphx/instruction_ref.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/quantization.hpp>
#include <migraphx/generate.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/ref/target.hpp>
#include <migraphx/stringutils.hpp>
#include <migraphx/tf.hpp>
#include <migraphx/onnx.hpp>
#include <migraphx/load_save.hpp>
#include <migraphx/register_target.hpp>
#include <migraphx/json.hpp>
#include <migraphx/make_op.hpp>
#include <migraphx/op/common.hpp>
#ifdef HAVE_GPU
#include <migraphx/gpu/hip.hpp>
#endif
using half = half_float::half;
namespace py = pybind11;
#ifdef __clang__
#define MIGRAPHX_PUSH_UNUSED_WARNING \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wused-but-marked-unused\"")
#define MIGRAPHX_POP_WARNING _Pragma("clang diagnostic pop")
#else
#define MIGRAPHX_PUSH_UNUSED_WARNING
#define MIGRAPHX_POP_WARNING
#endif
#define MIGRAPHX_PYBIND11_MODULE(...) \
MIGRAPHX_PUSH_UNUSED_WARNING \
PYBIND11_MODULE(__VA_ARGS__) \
MIGRAPHX_POP_WARNING
#define MIGRAPHX_PYTHON_GENERATE_SHAPE_ENUM(x, t) .value(#x, migraphx::shape::type_t::x)
namespace migraphx {
migraphx::value to_value(py::kwargs kwargs);
migraphx::value to_value(py::list lst);
template <class T, class F>
void visit_py(T x, F f)
{
if(py::isinstance<py::kwargs>(x))
{
f(to_value(x.template cast<py::kwargs>()));
}
else if(py::isinstance<py::list>(x))
{
f(to_value(x.template cast<py::list>()));
}
else if(py::isinstance<py::bool_>(x))
{
f(x.template cast<bool>());
}
else if(py::isinstance<py::int_>(x) or py::hasattr(x, "__index__"))
{
f(x.template cast<int>());
}
else if(py::isinstance<py::float_>(x))
{
f(x.template cast<float>());
}
else if(py::isinstance<py::str>(x))
{
f(x.template cast<std::string>());
}
else if(py::isinstance<migraphx::shape::dynamic_dimension>(x))
{
f(migraphx::to_value(x.template cast<migraphx::shape::dynamic_dimension>()));
}
else
{
MIGRAPHX_THROW("VISIT_PY: Unsupported data type!");
}
}
migraphx::value to_value(py::list lst)
{
migraphx::value v = migraphx::value::array{};
for(auto val : lst)
{
visit_py(val, [&](auto py_val) { v.push_back(py_val); });
}
return v;
}
migraphx::value to_value(py::kwargs kwargs)
{
migraphx::value v = migraphx::value::object{};
for(auto arg : kwargs)
{
auto&& key = py::str(arg.first);
auto&& val = arg.second;
visit_py(val, [&](auto py_val) { v[key] = py_val; });
}
return v;
}
} // namespace migraphx
namespace pybind11 {
namespace detail {
template <>
struct npy_format_descriptor<half>
{
static std::string format()
{
// following: https://docs.python.org/3/library/struct.html#format-characters
return "e";
}
static constexpr auto name() { return _("half"); }
};
} // namespace detail
} // namespace pybind11
template <class F>
void visit_type(const migraphx::shape& s, F f)
{
s.visit_type(f);
}
template <class T, class F>
void visit(const migraphx::raw_data<T>& x, F f)
{
x.visit(f);
}
template <class F>
void visit_types(F f)
{
migraphx::shape::visit_types(f);
}
template <class T>
py::buffer_info to_buffer_info(T& x)
{
migraphx::shape s = x.get_shape();
assert(s.type() != migraphx::shape::tuple_type);
if(s.dynamic())
MIGRAPHX_THROW("MIGRAPHX PYTHON: dynamic shape argument passed to to_buffer_info");
auto strides = s.strides();
std::transform(
strides.begin(), strides.end(), strides.begin(), [&](auto i) { return i * s.type_size(); });
py::buffer_info b;
visit_type(s, [&](auto as) {
// migraphx use int8_t data to store bool type, we need to
// explicitly specify the data type as bool for python
if(s.type() == migraphx::shape::bool_type)
{
b = py::buffer_info(x.data(),
as.size(),
py::format_descriptor<bool>::format(),
s.ndim(),
s.lens(),
strides);
}
else
{
b = py::buffer_info(x.data(),
as.size(),
py::format_descriptor<decltype(as())>::format(),
s.ndim(),
s.lens(),
strides);
}
});
return b;
}
migraphx::shape to_shape(const py::buffer_info& info)
{
migraphx::shape::type_t t;
std::size_t n = 0;
visit_types([&](auto as) {
if(info.format == py::format_descriptor<decltype(as())>::format() or
(info.format == "l" and py::format_descriptor<decltype(as())>::format() == "q") or
(info.format == "L" and py::format_descriptor<decltype(as())>::format() == "Q"))
{
t = as.type_enum();
n = sizeof(as());
}
else if(info.format == "?" and py::format_descriptor<decltype(as())>::format() == "b")
{
t = migraphx::shape::bool_type;
n = sizeof(bool);
}
});
if(n == 0)
{
MIGRAPHX_THROW("MIGRAPHX PYTHON: Unsupported data type " + info.format);
}
auto strides = info.strides;
std::transform(strides.begin(), strides.end(), strides.begin(), [&](auto i) -> std::size_t {
return n > 0 ? i / n : 0;
});
// scalar support
if(info.shape.empty())
{
return migraphx::shape{t};
}
else
{
return migraphx::shape{t, info.shape, strides};
}
}
MIGRAPHX_PYBIND11_MODULE(migraphx, m)
{
py::class_<migraphx::shape> shape_cls(m, "shape");
shape_cls
.def(py::init([](py::kwargs kwargs) {
auto v = migraphx::to_value(kwargs);
auto t = migraphx::shape::parse_type(v.get("type", "float"));
if(v.contains("dyn_dims"))
{
auto dyn_dims =
migraphx::from_value<std::vector<migraphx::shape::dynamic_dimension>>(
v.at("dyn_dims"));
return migraphx::shape(t, dyn_dims);
}
auto lens = v.get<std::size_t>("lens", {1});
if(v.contains("strides"))
return migraphx::shape(t, lens, v.at("strides").to_vector<std::size_t>());
else
return migraphx::shape(t, lens);
}))
.def("type", &migraphx::shape::type)
.def("lens", &migraphx::shape::lens)
.def("strides", &migraphx::shape::strides)
.def("ndim", &migraphx::shape::ndim)
.def("elements", &migraphx::shape::elements)
.def("bytes", &migraphx::shape::bytes)
.def("type_string", &migraphx::shape::type_string)
.def("type_size", &migraphx::shape::type_size)
.def("dyn_dims", &migraphx::shape::dyn_dims)
.def("packed", &migraphx::shape::packed)
.def("transposed", &migraphx::shape::transposed)
.def("broadcasted", &migraphx::shape::broadcasted)
.def("standard", &migraphx::shape::standard)
.def("scalar", &migraphx::shape::scalar)
.def("dynamic", &migraphx::shape::dynamic)
.def("__eq__", std::equal_to<migraphx::shape>{})
.def("__ne__", std::not_equal_to<migraphx::shape>{})
.def("__repr__", [](const migraphx::shape& s) { return migraphx::to_string(s); });
py::enum_<migraphx::shape::type_t>(shape_cls, "type_t")
MIGRAPHX_SHAPE_VISIT_TYPES(MIGRAPHX_PYTHON_GENERATE_SHAPE_ENUM);
py::class_<migraphx::shape::dynamic_dimension>(shape_cls, "dynamic_dimension")
.def(py::init<>())
.def(py::init<std::size_t, std::size_t>())
.def(py::init<std::size_t, std::size_t, std::set<std::size_t>>())
.def_readwrite("min", &migraphx::shape::dynamic_dimension::min)
.def_readwrite("max", &migraphx::shape::dynamic_dimension::max)
.def_readwrite("optimals", &migraphx::shape::dynamic_dimension::optimals)
.def("is_fixed", &migraphx::shape::dynamic_dimension::is_fixed);
py::class_<migraphx::argument>(m, "argument", py::buffer_protocol())
.def_buffer([](migraphx::argument& x) -> py::buffer_info { return to_buffer_info(x); })
.def(py::init([](py::buffer b) {
py::buffer_info info = b.request();
return migraphx::argument(to_shape(info), info.ptr);
}))
.def("get_shape", &migraphx::argument::get_shape)
.def("data_ptr",
[](migraphx::argument& x) { return reinterpret_cast<std::uintptr_t>(x.data()); })
.def("tolist",
[](migraphx::argument& x) {
py::list l{x.get_shape().elements()};
visit(x, [&](auto data) { l = py::cast(data.to_vector()); });
return l;
})
.def("__eq__", std::equal_to<migraphx::argument>{})
.def("__ne__", std::not_equal_to<migraphx::argument>{})
.def("__repr__", [](const migraphx::argument& x) { return migraphx::to_string(x); });
py::class_<migraphx::target>(m, "target");
py::class_<migraphx::instruction_ref>(m, "instruction_ref")
.def("shape", [](migraphx::instruction_ref i) { return i->get_shape(); })
.def("op", [](migraphx::instruction_ref i) { return i->get_operator(); });
py::class_<migraphx::module, std::unique_ptr<migraphx::module, py::nodelete>>(m, "module")
.def("print", [](const migraphx::module& mm) { std::cout << mm << std::endl; })
.def(
"add_instruction",
[](migraphx::module& mm,
const migraphx::operation& op,
std::vector<migraphx::instruction_ref>& args,
std::vector<migraphx::module*>& mod_args) {
return mm.add_instruction(op, args, mod_args);
},
py::arg("op"),
py::arg("args"),
py::arg("mod_args") = std::vector<migraphx::module*>{})
.def(
"add_literal",
[](migraphx::module& mm, py::buffer data) {
py::buffer_info info = data.request();
auto literal_shape = to_shape(info);
return mm.add_literal(literal_shape, reinterpret_cast<char*>(info.ptr));
},
py::arg("data"))
.def(
"add_parameter",
[](migraphx::module& mm, const std::string& name, const migraphx::shape shape) {
return mm.add_parameter(name, shape);
},
py::arg("name"),
py::arg("shape"))
.def(
"add_return",
[](migraphx::module& mm, std::vector<migraphx::instruction_ref>& args) {
return mm.add_return(args);
},
py::arg("args"))
.def("__repr__", [](const migraphx::module& mm) { return migraphx::to_string(mm); });
py::class_<migraphx::program>(m, "program")
.def(py::init([]() { return migraphx::program(); }))
.def("get_parameter_names", &migraphx::program::get_parameter_names)
.def("get_parameter_shapes", &migraphx::program::get_parameter_shapes)
.def("get_output_shapes", &migraphx::program::get_output_shapes)
.def("is_compiled", &migraphx::program::is_compiled)
.def(
"compile",
[](migraphx::program& p,
const migraphx::target& t,
bool offload_copy,
bool fast_math,
bool exhaustive_tune) {
migraphx::compile_options options;
options.offload_copy = offload_copy;
options.fast_math = fast_math;
options.exhaustive_tune = exhaustive_tune;
p.compile(t, options);
},
py::arg("t"),
py::arg("offload_copy") = true,
py::arg("fast_math") = true,
py::arg("exhaustive_tune") = false)
.def("get_main_module", [](const migraphx::program& p) { return p.get_main_module(); })
.def(
"create_module",
[](migraphx::program& p, const std::string& name) { return p.create_module(name); },
py::arg("name"))
.def("run",
[](migraphx::program& p, py::dict params) {
migraphx::parameter_map pm;
for(auto x : params)
{
std::string key = x.first.cast<std::string>();
py::buffer b = x.second.cast<py::buffer>();
py::buffer_info info = b.request();
pm[key] = migraphx::argument(to_shape(info), info.ptr);
}
return p.eval(pm);
})
.def("run_async",
[](migraphx::program& p,
py::dict params,
std::uintptr_t stream,
std::string stream_name) {
migraphx::parameter_map pm;
for(auto x : params)
{
std::string key = x.first.cast<std::string>();
py::buffer b = x.second.cast<py::buffer>();
py::buffer_info info = b.request();
pm[key] = migraphx::argument(to_shape(info), info.ptr);
}
migraphx::execution_environment exec_env{
migraphx::any_ptr(reinterpret_cast<void*>(stream), stream_name), true};
return p.eval(pm, exec_env);
})
.def("sort", &migraphx::program::sort)
.def("print", [](const migraphx::program& p) { std::cout << p << std::endl; })
.def("__eq__", std::equal_to<migraphx::program>{})
.def("__ne__", std::not_equal_to<migraphx::program>{})
.def("__repr__", [](const migraphx::program& p) { return migraphx::to_string(p); });
py::class_<migraphx::operation> op(m, "op");
op.def(py::init([](const std::string& name, py::kwargs kwargs) {
migraphx::value v = migraphx::value::object{};
if(kwargs)
{
v = migraphx::to_value(kwargs);
}
return migraphx::make_op(name, v);
}))
.def("name", &migraphx::operation::name);
py::enum_<migraphx::op::pooling_mode>(op, "pooling_mode")
.value("average", migraphx::op::pooling_mode::average)
.value("max", migraphx::op::pooling_mode::max)
.value("lpnorm", migraphx::op::pooling_mode::lpnorm);
py::enum_<migraphx::op::rnn_direction>(op, "rnn_direction")
.value("forward", migraphx::op::rnn_direction::forward)
.value("reverse", migraphx::op::rnn_direction::reverse)
.value("bidirectional", migraphx::op::rnn_direction::bidirectional);
m.def(
"argument_from_pointer",
[](const migraphx::shape shape, const int64_t address) {
return migraphx::argument(shape, reinterpret_cast<void*>(address));
},
py::arg("shape"),
py::arg("address"));
m.def(
"parse_tf",
[](const std::string& filename,
bool is_nhwc,
unsigned int batch_size,
std::unordered_map<std::string, std::vector<std::size_t>> map_input_dims,
std::vector<std::string> output_names) {
return migraphx::parse_tf(
filename, migraphx::tf_options{is_nhwc, batch_size, map_input_dims, output_names});
},
"Parse tf protobuf (default format is nhwc)",
py::arg("filename"),
py::arg("is_nhwc") = true,
py::arg("batch_size") = 1,
py::arg("map_input_dims") = std::unordered_map<std::string, std::vector<std::size_t>>(),
py::arg("output_names") = std::vector<std::string>());
m.def(
"parse_onnx",
[](const std::string& filename,
unsigned int default_dim_value,
migraphx::shape::dynamic_dimension default_dyn_dim_value,
std::unordered_map<std::string, std::vector<std::size_t>> map_input_dims,
std::unordered_map<std::string, std::vector<migraphx::shape::dynamic_dimension>>
map_dyn_input_dims,
bool skip_unknown_operators,
bool print_program_on_error,
int64_t max_loop_iterations) {
migraphx::onnx_options options;
options.default_dim_value = default_dim_value;
options.default_dyn_dim_value = default_dyn_dim_value;
options.map_input_dims = map_input_dims;
options.map_dyn_input_dims = map_dyn_input_dims;
options.skip_unknown_operators = skip_unknown_operators;
options.print_program_on_error = print_program_on_error;
options.max_loop_iterations = max_loop_iterations;
return migraphx::parse_onnx(filename, options);
},
"Parse onnx file",
py::arg("filename"),
py::arg("default_dim_value") = 0,
py::arg("default_dyn_dim_value") = migraphx::shape::dynamic_dimension{1, 1},
py::arg("map_input_dims") = std::unordered_map<std::string, std::vector<std::size_t>>(),
py::arg("map_dyn_input_dims") =
std::unordered_map<std::string, std::vector<migraphx::shape::dynamic_dimension>>(),
py::arg("skip_unknown_operators") = false,
py::arg("print_program_on_error") = false,
py::arg("max_loop_iterations") = 10);
m.def(
"parse_onnx_buffer",
[](const std::string& onnx_buffer,
unsigned int default_dim_value,
migraphx::shape::dynamic_dimension default_dyn_dim_value,
std::unordered_map<std::string, std::vector<std::size_t>> map_input_dims,
std::unordered_map<std::string, std::vector<migraphx::shape::dynamic_dimension>>
map_dyn_input_dims,
bool skip_unknown_operators,
bool print_program_on_error) {
migraphx::onnx_options options;
options.default_dim_value = default_dim_value;
options.default_dyn_dim_value = default_dyn_dim_value;
options.map_input_dims = map_input_dims;
options.map_dyn_input_dims = map_dyn_input_dims;
options.skip_unknown_operators = skip_unknown_operators;
options.print_program_on_error = print_program_on_error;
return migraphx::parse_onnx_buffer(onnx_buffer, options);
},
"Parse onnx file",
py::arg("filename"),
py::arg("default_dim_value") = 0,
py::arg("default_dyn_dim_value") = migraphx::shape::dynamic_dimension{1, 1},
py::arg("map_input_dims") = std::unordered_map<std::string, std::vector<std::size_t>>(),
py::arg("map_dyn_input_dims") =
std::unordered_map<std::string, std::vector<migraphx::shape::dynamic_dimension>>(),
py::arg("skip_unknown_operators") = false,
py::arg("print_program_on_error") = false);
m.def(
"load",
[](const std::string& name, const std::string& format) {
migraphx::file_options options;
options.format = format;
return migraphx::load(name, options);
},
"Load MIGraphX program",
py::arg("filename"),
py::arg("format") = "msgpack");
m.def(
"save",
[](const migraphx::program& p, const std::string& name, const std::string& format) {
migraphx::file_options options;
options.format = format;
return migraphx::save(p, name, options);
},
"Save MIGraphX program",
py::arg("p"),
py::arg("filename"),
py::arg("format") = "msgpack");
m.def("get_target", &migraphx::make_target);
m.def("create_argument", [](const migraphx::shape& s, const std::vector<double>& values) {
if(values.size() != s.elements())
MIGRAPHX_THROW("Values and shape elements do not match");
migraphx::argument a{s};
a.fill(values.begin(), values.end());
return a;
});
m.def("generate_argument", &migraphx::generate_argument, py::arg("s"), py::arg("seed") = 0);
m.def("fill_argument", &migraphx::fill_argument, py::arg("s"), py::arg("value"));
m.def("quantize_fp16",
&migraphx::quantize_fp16,
py::arg("prog"),
py::arg("ins_names") = std::vector<std::string>{"all"});
m.def("quantize_int8",
&migraphx::quantize_int8,
py::arg("prog"),
py::arg("t"),
py::arg("calibration") = std::vector<migraphx::parameter_map>{},
py::arg("ins_names") = std::vector<std::string>{"dot", "convolution"});
#ifdef HAVE_GPU
m.def("allocate_gpu", &migraphx::gpu::allocate_gpu, py::arg("s"), py::arg("host") = false);
m.def("to_gpu", &migraphx::gpu::to_gpu, py::arg("arg"), py::arg("host") = false);
m.def("from_gpu", &migraphx::gpu::from_gpu);
m.def("gpu_sync", [] { migraphx::gpu::gpu_sync(); });
#endif
#ifdef VERSION_INFO
m.attr("__version__") = VERSION_INFO;
#else
m.attr("__version__") = "dev";
#endif
}

View File

@@ -0,0 +1 @@
onnxruntime-rocm @ https://github.com/NickM-27/frigate-onnxruntime-rocm/releases/download/v1.0.0/onnxruntime_rocm-1.17.3-cp39-cp39-linux_x86_64.whl

3
docker/rocm/rocm-pin-600 Normal file
View File

@@ -0,0 +1,3 @@
Package: *
Pin: release o=repo.radeon.com
Pin-Priority: 600

38
docker/rocm/rocm.hcl Normal file
View File

@@ -0,0 +1,38 @@
variable "AMDGPU" {
default = "gfx900"
}
variable "ROCM" {
default = "5.7.3"
}
variable "HSA_OVERRIDE_GFX_VERSION" {
default = ""
}
variable "HSA_OVERRIDE" {
default = "1"
}
target deps {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/amd64"]
target = "deps"
}
target rootfs {
dockerfile = "docker/main/Dockerfile"
platforms = ["linux/amd64"]
target = "rootfs"
}
target rocm {
dockerfile = "docker/rocm/Dockerfile"
contexts = {
deps = "target:deps",
rootfs = "target:rootfs"
}
platforms = ["linux/amd64"]
args = {
AMDGPU = AMDGPU,
ROCM = ROCM,
HSA_OVERRIDE_GFX_VERSION = HSA_OVERRIDE_GFX_VERSION,
HSA_OVERRIDE = HSA_OVERRIDE
}
}

1
docker/rocm/rocm.list Normal file
View File

@@ -0,0 +1 @@
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/5.7.3 focal main

53
docker/rocm/rocm.mk Normal file
View File

@@ -0,0 +1,53 @@
BOARDS += rocm
# AMD/ROCm is chunky so we build couple of smaller images for specific chipsets
ROCM_CHIPSETS:=gfx900:9.0.0 gfx1030:10.3.0 gfx1100:11.0.0
local-rocm: version
$(foreach chipset,$(ROCM_CHIPSETS), \
AMDGPU=$(word 1,$(subst :, ,$(chipset))) \
HSA_OVERRIDE_GFX_VERSION=$(word 2,$(subst :, ,$(chipset))) \
HSA_OVERRIDE=1 \
docker buildx bake --file=docker/rocm/rocm.hcl rocm \
--set rocm.tags=frigate:latest-rocm-$(word 1,$(subst :, ,$(chipset))) \
--load \
&&) true
unset HSA_OVERRIDE_GFX_VERSION && \
HSA_OVERRIDE=0 \
AMDGPU=gfx \
docker buildx bake --file=docker/rocm/rocm.hcl rocm \
--set rocm.tags=frigate:latest-rocm \
--load
build-rocm: version
$(foreach chipset,$(ROCM_CHIPSETS), \
AMDGPU=$(word 1,$(subst :, ,$(chipset))) \
HSA_OVERRIDE_GFX_VERSION=$(word 2,$(subst :, ,$(chipset))) \
HSA_OVERRIDE=1 \
docker buildx bake --file=docker/rocm/rocm.hcl rocm \
--set rocm.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rocm-$(chipset) \
&&) true
unset HSA_OVERRIDE_GFX_VERSION && \
HSA_OVERRIDE=0 \
AMDGPU=gfx \
docker buildx bake --file=docker/rocm/rocm.hcl rocm \
--set rocm.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rocm
push-rocm: build-rocm
$(foreach chipset,$(ROCM_CHIPSETS), \
AMDGPU=$(word 1,$(subst :, ,$(chipset))) \
HSA_OVERRIDE_GFX_VERSION=$(word 2,$(subst :, ,$(chipset))) \
HSA_OVERRIDE=1 \
docker buildx bake --file=docker/rocm/rocm.hcl rocm \
--set rocm.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rocm-$(chipset) \
--push \
&&) true
unset HSA_OVERRIDE_GFX_VERSION && \
HSA_OVERRIDE=0 \
AMDGPU=gfx \
docker buildx bake --file=docker/rocm/rocm.hcl rocm \
--set rocm.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rocm \
--push

View File

@@ -1,10 +1,15 @@
BOARDS += rpi
local-rpi: version
docker buildx bake --load --file=docker/rpi/rpi.hcl --set rpi.tags=frigate:latest-rpi rpi
docker buildx bake --file=docker/rpi/rpi.hcl rpi \
--set rpi.tags=frigate:latest-rpi \
--load
build-rpi: version
docker buildx bake --file=docker/rpi/rpi.hcl --set rpi.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rpi rpi
docker buildx bake --file=docker/rpi/rpi.hcl rpi \
--set rpi.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rpi
push-rpi: build-rpi
docker buildx bake --push --file=docker/rpi/rpi.hcl --set rpi.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rpi rpi
docker buildx bake --file=docker/rpi/rpi.hcl rpi \
--set rpi.tags=$(IMAGE_REPO):${GITHUB_REF_NAME}-$(COMMIT_HASH)-rpi \
--push

View File

@@ -18,6 +18,7 @@ RUN --mount=type=bind,from=trt-wheels,source=/trt-wheels,target=/deps/trt-wheels
pip3 install -U /deps/trt-wheels/*.whl && \
ldconfig
ENV LD_LIBRARY_PATH=/usr/local/lib/python3.9/dist-packages/tensorrt:/usr/local/cuda/lib64:/usr/local/lib/python3.9/dist-packages/nvidia/cufft/lib
WORKDIR /opt/frigate/
COPY --from=rootfs / /
@@ -26,6 +27,7 @@ FROM devcontainer AS devcontainer-trt
COPY --from=trt-deps /usr/local/lib/libyolo_layer.so /usr/local/lib/libyolo_layer.so
COPY --from=trt-deps /usr/local/src/tensorrt_demos /usr/local/src/tensorrt_demos
COPY --from=trt-deps /usr/local/cuda-12.1 /usr/local/cuda
COPY docker/tensorrt/detector/rootfs/ /
COPY --from=trt-deps /usr/local/lib/libyolo_layer.so /usr/local/lib/libyolo_layer.so
RUN --mount=type=bind,from=trt-wheels,source=/trt-wheels,target=/deps/trt-wheels \

View File

@@ -10,8 +10,8 @@ ARG DEBIAN_FRONTEND
# Use a separate container to build wheels to prevent build dependencies in final image
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends \
python3.9 python3.9-dev \
wget build-essential cmake git \
python3.9 python3.9-dev \
wget build-essential cmake git \
&& rm -rf /var/lib/apt/lists/*
# Ensure python3 defaults to python3.9
@@ -41,7 +41,11 @@ RUN --mount=type=bind,source=docker/tensorrt/detector/build_python_tensorrt.sh,t
&& TENSORRT_VER=$(cat /etc/TENSORRT_VER) /deps/build_python_tensorrt.sh
COPY docker/tensorrt/requirements-arm64.txt /requirements-tensorrt.txt
RUN pip3 wheel --wheel-dir=/trt-wheels -r /requirements-tensorrt.txt
ADD https://nvidia.box.com/shared/static/9aemm4grzbbkfaesg5l7fplgjtmswhj8.whl /tmp/onnxruntime_gpu-1.15.1-cp39-cp39-linux_aarch64.whl
RUN pip3 uninstall -y onnxruntime-openvino \
&& pip3 wheel --wheel-dir=/trt-wheels -r /requirements-tensorrt.txt \
&& pip3 install --no-deps /tmp/onnxruntime_gpu-1.15.1-cp39-cp39-linux_aarch64.whl
FROM build-wheels AS trt-model-wheels
ARG DEBIAN_FRONTEND

View File

@@ -8,6 +8,8 @@ ARG TRT_BASE=nvcr.io/nvidia/tensorrt:23.03-py3
# Build TensorRT-specific library
FROM ${TRT_BASE} AS trt-deps
ARG COMPUTE_LEVEL
RUN apt-get update \
&& apt-get install -y git build-essential cuda-nvcc-* cuda-nvtx-* libnvinfer-dev libnvinfer-plugin-dev libnvparsers-dev libnvonnxparsers-dev \
&& rm -rf /var/lib/apt/lists/*
@@ -22,8 +24,9 @@ ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
COPY --from=trt-deps /usr/local/lib/libyolo_layer.so /usr/local/lib/libyolo_layer.so
COPY --from=trt-deps /usr/local/src/tensorrt_demos /usr/local/src/tensorrt_demos
COPY --from=trt-deps /usr/local/cuda-12.* /usr/local/cuda
COPY docker/tensorrt/detector/rootfs/ /
ENV YOLO_MODELS="yolov7-320"
ENV YOLO_MODELS=""
HEALTHCHECK --start-period=600s --start-interval=5s --interval=15s --timeout=5s --retries=3 \
CMD curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1

View File

@@ -23,8 +23,8 @@ else
fi
tar xaf jetson_multimedia_api.tbz2 -C / && rm jetson_multimedia_api.tbz2
wget -q https://github.com/madsciencetist/jetson-ffmpeg/archive/refs/heads/master.zip
unzip master.zip && rm master.zip && cd jetson-ffmpeg-master
wget -q https://github.com/AndBobsYourUncle/jetson-ffmpeg/archive/9c17b09.zip -O jetson-ffmpeg.zip
unzip jetson-ffmpeg.zip && rm jetson-ffmpeg.zip && mv jetson-ffmpeg-* jetson-ffmpeg && cd jetson-ffmpeg
LD_LIBRARY_PATH=$(pwd)/stubs:$LD_LIBRARY_PATH # tegra multimedia libs aren't available in image, so use stubs for ffmpeg build
mkdir build
cd build
@@ -42,7 +42,7 @@ cd ../ && rm -rf nv-codec-headers-master
# Build ffmpeg with nvmpi patch
wget -q https://ffmpeg.org/releases/ffmpeg-6.0.tar.xz
tar xaf ffmpeg-*.tar.xz && rm ffmpeg-*.tar.xz && cd ffmpeg-*
patch -p1 < ../jetson-ffmpeg-master/ffmpeg_patches/ffmpeg6.0_nvmpi.patch
patch -p1 < ../jetson-ffmpeg/ffmpeg_patches/ffmpeg6.0_nvmpi.patch
export PKG_CONFIG_PATH=$INSTALL_PREFIX/lib/pkgconfig
# enable Jetson codecs but disable dGPU codecs
./configure --cc='ccache gcc' --cxx='ccache g++' \

View File

@@ -11,6 +11,7 @@ set -o errexit -o nounset -o pipefail
MODEL_CACHE_DIR=${MODEL_CACHE_DIR:-"/config/model_cache/tensorrt"}
TRT_VER=${TRT_VER:-$(cat /etc/TENSORRT_VER)}
OUTPUT_FOLDER="${MODEL_CACHE_DIR}/${TRT_VER}"
YOLO_MODELS=${YOLO_MODELS:-""}
# Create output folder
mkdir -p ${OUTPUT_FOLDER}
@@ -19,6 +20,11 @@ FIRST_MODEL=true
MODEL_DOWNLOAD=""
MODEL_CONVERT=""
if [ -z "$YOLO_MODELS"]; then
echo "tensorrt model preparation disabled"
exit 0
fi
for model in ${YOLO_MODELS//,/ }
do
# Remove old link in case path/version changed

View File

@@ -11,7 +11,7 @@ git clone --depth 1 https://github.com/NateMeyer/tensorrt_demos.git -b condition
if [ ! -e /usr/local/cuda ]; then
ln -s /usr/local/cuda-* /usr/local/cuda
fi
cd ./tensorrt_demos/plugins && make all -j$(nproc)
cd ./tensorrt_demos/plugins && make all -j$(nproc) computes="${COMPUTE_LEVEL:-}"
cp libyolo_layer.so /usr/local/lib/libyolo_layer.so
# Store yolo scripts for later conversion

View File

@@ -8,5 +8,7 @@ nvidia-cuda-runtime-cu12 == 12.1.*; platform_machine == 'x86_64'
nvidia-cuda-runtime-cu11 == 11.8.*; platform_machine == 'x86_64'
nvidia-cublas-cu11 == 11.11.3.6; platform_machine == 'x86_64'
nvidia-cudnn-cu11 == 8.6.0.*; platform_machine == 'x86_64'
onnx==1.14.0; platform_machine == 'x86_64'
protobuf==3.20.3; platform_machine == 'x86_64'
nvidia-cufft-cu11==10.*; platform_machine == 'x86_64'
onnx==1.16.*; platform_machine == 'x86_64'
onnxruntime-gpu==1.18.*; platform_machine == 'x86_64'
protobuf==3.20.3; platform_machine == 'x86_64'

View File

@@ -1 +1 @@
cuda-python == 11.7; platform_machine == 'aarch64'
cuda-python == 11.7; platform_machine == 'aarch64'

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