Commit Graph

341 Commits

Author SHA1 Message Date
Nicolas Mowen
c3b313a70d
Audio events (#6848)
* Initial audio classification model implementation

* fix mypy

* Keep audio labelmap local

* Cleanup

* Start adding config for audio

* Add the detector

* Add audio detection process keypoints

* Build out base config

* Load labelmap correctly

* Fix config bugs

* Start audio process

* Fix startup issues

* Try to cleanup restarting

* Add ffmpeg input args

* Get audio detection working

* Save event to db

* End events if not heard for 30 seconds

* Use not heard config

* Stop ffmpeg when shutting down

* Fixes

* End events correctly

* Use api instead of event queue to save audio events

* Get events working

* Close threads when stop event is sent

* remove unused

* Only start audio process if at least one camera is enabled

* Add const for float

* Cleanup labelmap

* Add audio icon in frontend

* Add ability to toggle audio with mqtt

* Set initial audio value

* Fix audio enabling

* Close logpipe

* Isort

* Formatting

* Fix web tests

* Fix web tests

* Handle cases where args are a string

* Remove log

* Cleanup process close

* Use correct field

* Simplify if statement

* Use var for localhost

* Add audio detectors docs

* Add restream docs to mention audio detection

* Add full config docs

* Fix links to other docs

---------

Co-authored-by: Jason Hunter <hunterjm@gmail.com>
2023-07-01 08:18:33 -05:00
Bernt Christian Egeland
f1dc3a639c
fixed TimeAgo abbreviation (#6977)
* fixed TimeAgo abbreviation

* Update web/src/components/TimeAgo.tsx

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-07-01 08:16:19 -05:00
Blake Blackshear
2f401bd8da
update deps (#6973)
* update web deps

* update python deps
2023-07-01 07:47:16 -05:00
Nicolas Mowen
0a8249d6fb
Fix Bad Resize For Camera Snapshot (#6797)
* Catch cases where incorrect size is requested

* Set a default if calculated height is incorrect
2023-06-30 07:34:10 -05:00
Nicolas Mowen
bd17e7d824
Show object attributes when hovering or tapping timeline bounding box (#6879)
* Show overlay when hovering on timeline box

* Make it work with mobile too

* Fix lint

* Fix ratio

* Update web/src/components/TimelineEventOverlay.jsx

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

* Show overlay when hovering on timeline box

* Make it work with mobile too

* Fix lint

* Fix ratio

* Remove label and make overlay respect selected theme

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-06-30 07:15:19 -05:00
Nicolas Mowen
ece070fee1
Load labels dynamically for event filters (#6896)
* Load labels dynamically to include custom events and audio, do not include attribute labels

* Formatting

* Fix sorting

* Also filter tracked object list on camera page

* isort

* Don't fail before load
2023-06-28 05:51:53 -05:00
spacebares
3d40ed5d47
fix tooltip not showing if too far left (#6909) 2023-06-28 05:45:54 -05:00
Nicolas Mowen
ff1b5c87aa
Fix stream name not being used for MSE (#6796) 2023-06-14 06:49:32 -06:00
Sergey Krashevich
a8f282515f
Bugfix: Refactor date and time initialization in Export.jsx (#6794)
* Refactor date and time initialization in Export.jsx to use local timezone

* Update error message to include specific reason for failure in Export.jsx
2023-06-14 07:32:36 -05:00
Sergey Krashevich
dfd574beeb
Refactor storage stats calculation to use powers of 2 for more accurate values (#6765)
* "Refactor storage stats calculation to use powers of 2 for more accurate values"

* replace 1000000 to 2^20

* Refactor storage unit size display to use binary prefixes

This commit updates the display of storage unit sizes in both the camera storage stats and the Storage component in the web UI to use binary prefixes (MiB and GiB) instead of decimal prefixes (MB and GB). This provides more accurate and consistent representation of storage sizes
2023-06-11 14:49:13 -05:00
Bernt Christian Egeland
b359ff1b8e
[Feature] Add timepicker to calendar (#5183)
* added timepicker as children to calendar

* new timepicker component

* Add timepicker

* new timePicker component

* timepicker as calendar child

* hover:border and rounded

* adjusted width

* complete rework

* more code comments

* memorization

* preselect hover, transition

* numberOfDaysSelected has minimum of 1

* prefill hours when component mounts

* persist hours when component mount

* accommodate for the new timePicker

* add reset state

* scroll into view

* reuse before, after

* fix LastDayInRange when a time is selected

* do not add hours if before is zero

* use hours instead of days

* useeffect to reset hour. check timerange before scroll

* scroll to last element, not first
2023-06-11 14:48:45 -05:00
Nicolas Mowen
32569842d3
Option to enable / disable stats that require external processes (#6615)
* Add option for network bandwidth and only calculate if enabled

* Don't show network bandwidth in system stats page if not enabled

* Formatting

* Hide other rows as well

* Add docs

* Add config options for AMD and Intel GPU stats

* Fix stats access

* Update docs

* Use correct bool syntax

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-06-11 08:26:34 -05:00
Sergey Krashevich
7459a1cdde
Enhancement: Add Date and Time Inputs to Export Component with Time Validation (#6750)
* Add date and time inputs to Export component and ensure end time is larger than start time

* Update web/src/routes/Export.jsx

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-06-11 08:01:16 -05:00
Nicolas Mowen
d3949eebfa
Add API and WebUI to export recordings (#6550)
* Add ability to export frigate clips

* Add http endpoint

* Add dir to nginx

* Add webUI

* Formatting

* Cleanup unused

* Optimize timelapse

* Fix pts

* Use JSON body for params

* Use hwaccel to encode when available

* Print ffmpeg command when fail

* Print ffmpeg command when fail

* Add separate ffmpeg preset for timelapse

* Add docs outlining the export directory

* Add export docs

* Use ''

* Fix playlist max time

* Lower max playlist time

* Add api docs for export

* isort fixes
2023-06-08 07:32:35 -04:00
Blake Blackshear
699248d769
Update deps (#6669)
* fix gh host key

* python deps

* update web deps

* update docs deps
2023-06-01 06:59:50 -05:00
Nicolas Mowen
53d63e0f75
Update go2rtc to 1.5.0 (#5814)
* Update go2rtc to 1.3.0

* Increment to 1.3.1

* Increment to 1.3.2

* Update webrtc player to match latest

* Update version to 1.4.0

* Update mse player

* Update birdseye mse player

* remove logs

* Update docs to link to new version

* Final web lint fixes

* Update versions
2023-05-21 06:53:25 -06:00
Blake Blackshear
42f3ee3de5 sync master 2023-05-19 05:47:49 -05:00
Nicolas Mowen
e357715a8c
Ability to manually create events through the API (#3184)
* Move to events package

* Improve handling of external events

* Handle external events in the event queue

* Pass in event processor

* Check event json

* Fix json parsing and change defaults

* Fix snapshot saving

* Hide % score when not available

* Correct docs and add json example

* Save event png db

* Adjust image

* Formatting

* Add catch for failure ending event

* Add init to modules

* Fix naming

* Formatting

* Fix http creation

* fix test

* Change to PUT and include response in docs

* Add ability to set bounding box locations in snapshot

* Support multiple box annotations

* Cleanup docs example response

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

* Cleanup docs wording

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

* Store full frame for thumbnail

* Formatting

* Set thumbnail height to 175

* Formatting

---------

Co-authored-by: Blake Blackshear <blake@frigate.video>
2023-05-19 05:16:11 -05:00
Sergey Krashevich
6d0c2ec5c8
Add go2rtc & remote detectors network bandwidth usage to System table (#6526)
* Add network bandwidth usage to System table display in System.jsx and update get_bandwidth_stats function in util.py to include go2rtc processes

* black...

* Add network bandwidth usage to system table in web UI and improve regex in get_bandwidth_stats function to include frigate detector processes

* black...

* Update bandwidth calculation to include both incoming and outgoing traffic

* black:(
2023-05-18 06:40:24 -05:00
Korneliusz Jarzębski
17e8a46c7d
add ffmpeg bandwidth stats (#6492)
* add ffmpeg bandwidth stats

* add ffmpeg bandwidth stats

* Change column name

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

* fix lint formatting

---------

Co-authored-by: Korneliusz Jarzębski <k.jarzebski@netverse.pl>
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-05-17 20:01:56 -05:00
Sergey Krashevich
5fb96c777a
Add cmdline information to CPU usage stats in get_cpu_stats() function and display it in the System page's ffmpeg table with a copy-to-clipboard button (#6430) 2023-05-15 07:39:03 -05:00
Nicolas Mowen
5951a740d2
Prevent recordings from being turned on if disabled in config (#6444)
* Prevent enabling recordings if not enabled in config

* Fix conflict

* Fix spacing

* Update wording

* Update wording

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-05-15 07:36:26 -05:00
Blake Blackshear
e3b9998879
Upgrade deps (#6395)
* update js build tools

* update frontend deps

* python updates

* update requests again
2023-05-05 07:45:13 -05:00
Sergey Krashevich
f52b1212cd
add go2rtc version (#6390)
Update System.jsx
2023-05-04 21:04:06 -05:00
Nicolas Mowen
aded314f3c
Timeline UI optimizations (#6367)
* Fix centering of bottom_center

* Make bottom_center overlap vertically

* Fix timeline icon behavior

* Make disclaimer hidden under aria label

* Don't literally say disclaimer
2023-05-04 17:34:48 -06:00
Stephen Horvath
0751358e5b
Fix site.webmanifest + add svg as favicon (#6304) 2023-05-04 18:04:24 -05:00
Peeter N
17b92aa657
Do not show the loader during recordings api call (#6366)
* Do not show the loader during recordings api call

Showing the loader during the recordings API call will rerender the recordings list and rerenders the video player

* Fix defauting to 0 seekSeconds if recordings results are missings
2023-05-04 18:02:48 -05:00
Nicolas Mowen
ef50af03f2
Add icon to explain in more detail the system stats / storage info (#6358)
* Add info icon with additional info for each process.

* Specify single CPU core

* Include storage in tooltips
2023-05-04 18:01:27 -05:00
Sergey Krashevich
02f577347d
Hide PTZ Controls in Birdseye when no cameras support it (#6353)
* Refactor filter logic to exclude cameras with empty onvif host address

* Refactor filter logic to exclude cameras with empty onvif host address-2

* Apply suggestions from code review

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

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-05-04 18:00:18 -05:00
Sergey Krashevich
2add675d42
Refactor Process Stats and Bugfixes (#6344)
* test refactor process stats

* Update util.py

* bugfix

* black formatting

* add missing processes field to StatsTrackingTypes class

* fix python checks and tests...

* use psutil for calcilate cpu utilization on get_cpu_stats

* black...black...black...

* add cpu average

* calculate statiscts for logger process

* add P-ID for other processes in System.jsx

* Apply suggestions from code review

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

* make page beautiful again :)

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-05-04 17:58:59 -05:00
Nicolas Mowen
ad52e238ce
Refactor events to be more generic (#6320)
* Organize event table to be more generalized

* Add appropriate fields to data

* Move tracked object logic to own function

* Add source type to event queue

* rename enum

* Fix types that are used in webUI

* remove redundant

* Formatting

* fix typing

* Rename enum
2023-04-30 12:07:14 -05:00
Nicolas Mowen
37360edbc1
Show other system processes in system page (#6276) 2023-04-28 07:47:49 -05:00
Nicolas Mowen
b48f6d750f
Add annotation support (#6288) 2023-04-28 06:02:06 -05:00
Blake Blackshear
6dc82b6cef
dependency updates (#6246)
* python

* easy web deps
2023-04-26 06:20:29 -05:00
Nicolas Mowen
43ade86796
Support Controlling PTZ Cameras Via WebUI (#4715)
* Add support for ptz commands via websocket

* Fix startup issues

* Fix bugs

* Set config manually

* Add more commands

* Add presets

* Add zooming

* Fixes

* Set name

* Cleanup

* Add ability to set presets from UI

* Add ability to set preset from UI

* Cleanup for errors

* Ui tweaks

* Add visual design for pan / tilt

* Add pan/tilt support

* Support zooming

* Try to set wsdl

* Fix duplicate logs

* Catch auth errors

* Don't init onvif for disabled cameras

* Fix layout sizing

* Don't comment out

* Fix formatting

* Add ability to control camera with keyboard shortcuts

* Disallow user selection

* Fix mobile pressing

* Remove logs

* Substitute onvif password

* Add ptz controls ot birdseye

* Put wsdl back

* Add padding

* Formatting

* Catch onvif error

* Optimize layout for mobile and web

* Place ptz controls next to birdseye view in large layout

* Fix pt support

* Center text titles

* Update tests

* Update docs

* Write camera docs for PTZ

* Add MQTT docs for PTZ

* Add ptz info docs for http

* Fix test

* Make half width when full screen

* Fix preset panel logic

* Fix parsing

* Update mqtt.md

* Catch preset error

* Add onvif example to docs

* Remove template example from main camera docs
2023-04-26 06:08:53 -05:00
Blake Blackshear
0d16bd0144
False positives (#6217)
* add false positive submission

* switch timeline events to x,y,w,h

* update docs

* fix type checks

* convert to upsert

* fix config test
2023-04-24 07:24:28 -05:00
Nicolas Mowen
7f96d89ec4
Use correct method for retrieving current unix time (#6218) 2023-04-24 05:19:38 -05:00
Nicolas Mowen
04a22f8283
Fix timeline event overlay when recordings mode is not all (#6215)
* Fix case where not all segments are saved in recording for timeline overlay

* Remove unused vars
2023-04-23 15:02:52 -05:00
Nicolas Mowen
fbaab71d78
Metadata Timeline (#6194)
* Create timeline table

* Fix indexes

* Add other fields

* Adjust schema to be less descriptive

* Handle timeline queue from tracked object data

* Setup timeline queue in events

* Add source id for index

* Add other fields

* Fixes

* Formatting

* Store better data

* Add api with filtering

* Setup basic UI for timeline in events

* Cleanups

* Add recordings snapshot url

* Start working on timeline ui

* Add tooltip with info

* Improve icons

* Fix start time with clip

* Move player logic back to clips

* Make box in timeline relative coordinates

* Make region relative

* Get box overlay working

* Remove overlay when playing again

* Add disclaimer when selecting overlay points

* Add docs for new apis

* Fix mobile

* Fix docs

* Change color of bottom center box

* Fix vscode formatting
2023-04-23 10:45:19 -05:00
lucas_nz
3c72b96042
Use browser timezone if not specified in config (#6205) 2023-04-23 07:42:15 -05:00
Blake Blackshear
f8f76fcb94
update to 8.3.x (#6100) 2023-04-16 07:09:51 -05:00
Blake Blackshear
15415bab10
update deps (#6093)
* update dev deps

* update deps

* docs deps

* python dev deps

* update python deps
2023-04-15 14:17:59 -05:00
Bernt Christian Egeland
dee471e9e9
[Rework RelativeModal] calculate available window height (#6000)
* overflow-auto

* removed the restrict menu height from #5601.

* remove top from the equations due to scroll height

* calculate available height
2023-04-14 07:14:28 -05:00
Patrick Decat
4c5cd02ab7
Fix confusing storage display when calculating per camera usage (#5835) 2023-03-25 16:49:46 -05:00
Nicolas Mowen
e454daf727
Fix timezone issues with strftime (#5762)
* Fix timezone issues with strftime

* Fix timezone adjustment

* Fix bug
2023-03-18 07:32:39 -05:00
Nicolas Mowen
a5e561c81d
Restrict menu height to ensure it does not overflow (#5601) 2023-03-03 17:45:25 -06:00
Nicolas Mowen
c4ebafe777
Fix plus menu not showing (#5606)
* Set end time for download event

* Set the value
2023-03-03 17:44:58 -06:00
Nicolas Mowen
318240c14c
Add docs for time / date styling (#5572)
* Add docs for time / date styling

* Convert 12hour time format option to enum

* Change option in web

* Add docs with examples

* Fix errors in docs

* Fix mismatched names
2023-02-26 09:37:18 -06:00
Nicolas Mowen
34bdf2fc10
Clean up output for vainfo and ffprobe (#5586)
* Clean up output for vainfo and ffprobe

* Fix cleanup

* Format vainfo display

* Fix ffprobe output

* Fix stringification

* remove unused
2023-02-26 07:05:27 -06:00
Bernt Christian Egeland
3611e874ca
Events Page: Added option to override browser time format and style (#5538)
* use12hour optional config

* use12hour config arg

* added use12HourFormat arg to format function

* dateStyle & timeStyle option

* moved timezone & locales to format function

* added dateStyle & timeStyle

* re-formatted

* added strftime_fmt config entry

* strftime package

* added strftime option

* underscore instead of camelCase

* underscore props instead of camelCase
2023-02-22 06:54:16 -07:00