Commit Graph
71 Commits
Author SHA1 Message Date
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
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
Josh HawkinsandGitHub 64eaf60b24 remove overflow and scrollbar classes from grid (#10000) 2024-02-23 09:39:19 -07:00
Josh HawkinsandGitHub de3a6a8738 fix pointer events on review grid (#9998) 2024-02-23 08:30:18 -07:00
Josh HawkinsandGitHub 7d18c2c03d UI tweaks (#9996)
* various tweaks

* update debounce time

* scroll to top with new events
2024-02-23 06:52:54 -07:00
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 9d8b568438 timeline zooming demo (#9980) 2024-02-22 09:28:05 -06:00
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 764736b223 update dev builds message (#9853) 2024-02-14 18:12:33 -06:00
Josh HawkinsandGitHub fa384a7f9d ensure jsmpeg canvas is rounded and clipped (#9842) 2024-02-13 23:25:28 +00:00
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 9de09f6cdf fix tooltips on mobile and make 2-row cameras full height (#9787) 2024-02-11 06:30:52 -06:00
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 92a0705b03 show version in production builds (#9602) 2024-02-05 17:55:08 -06:00
Josh HawkinsandGitHub a33f2f117e more robust onvif checks (#9635) 2024-02-05 17:52:47 -06:00
Josh HawkinsandGitHub 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
Josh HawkinsandBlake Blackshear 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
Josh HawkinsandBlake Blackshear 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
Josh HawkinsandBlake Blackshear 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
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
Josh HawkinsandGitHub a4f5ad3a94 Proxy websockets in devcontainers (#8886)
* proxy websockets

* remove whitespace
2023-12-08 01:08:35 +00:00
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 678f1201c6 use timeout for move queues (#8662) 2023-11-18 15:36:13 -06:00
Josh HawkinsandGitHub 7b520e8a9d use enabled_in_config for switch in HA integration (#8630) 2023-11-16 01:25:48 +00:00
Josh HawkinsandGitHub 266b4099b5 a few small onvif fixes and relativemove debug (#8583) 2023-11-15 05:41:41 -06:00
Josh HawkinsandGitHub e89db13282 fix restart from webui (#8541) 2023-11-08 09:37:54 -07:00
Josh HawkinsandGitHub 1d99bb908d only use max target box for relative zoom limiter (#8509) 2023-11-07 11:31:39 +00:00
Josh HawkinsandGitHub ef750e73a2 add motion mask recommendation (#8448) 2023-11-04 02:18:43 +00:00
Josh HawkinsandGitHub fc36be4f88 suppress error by overriding class func (#8431) 2023-11-02 23:24:14 +00:00
Josh HawkinsandGitHub 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
Josh HawkinsandGitHub 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
Josh HawkinsandNicolas Mowen 16dc9f4bf7 update debug message 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen 52b47a3414 empty assumption for events 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen 139664e598 assumption on empty 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen 441c605312 make sure entire segment is accounted for 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen def889e3a8 start_time is a datetime obj 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen 613f1f6bd6 check frame time for segment 2023-10-26 17:32:58 -06:00
Josh HawkinsandNicolas Mowen e173377859 change warning to debug 2023-10-26 17:32:58 -06:00
Josh HawkinsandGitHub a399cb09fa Autotracking tweaks and docs update (#8345)
* refactor thresholds and reduce a duplicate call

* add camera to docs

* udpate docs
2023-10-26 18:21:58 -04:00
Josh HawkinsandGitHub b9649de327 Don't generate region boxes from motion when autotracking (#8306)
* no region boxes from motion boxes when ptz moving

* debug contours and calibration

* remove debugging

* clarifying comment
2023-10-24 19:25:22 -04:00
Josh HawkinsandGitHub 9df5927ac5 Autotracking bugfixes and zooming updates (#8103)
* zoom in/out in search for lost objects

* predicted box should not be empty

* clean up and update zoom logic

* only zoom if enabled

* more cleanup

* check for valid velocity when zooming

* only try absolute zoom in if obj area has changed

* zoom logic

* don't enqueue lost object zoom if already at limit

* don't disable motion boxes during ptz moves

* velocity threshold based on move coefficients

* fix area zoom logic

* disable debug zoom

* don't process objects if ptz moving

* recalc with exponent

* change exponent

* remove lost object zooming

* increase distance threshold for stationary object

* increase distance threshold constant

* only zoom out if nonzero

* camera name in all debug logging

* add camera name to debug logging

* camera variable name consistency

* update calibration behavior and docs

* docs and better zooming

* more sensible target values

* docs wording

* fix velocity threshold variable

* zooming tweaks and remove iou for current objects

* debug and docs

* get valid velocity

* include zero

* additional debug statements

* add zoom hysteresis

* zoom on initial move if relative

* only update target box if we actually zoom

* merge dev

* use getattr instead of get

* increase distance threshold

* reverse logic

* get_camera_status after preset move to store zoom

* final tweaks and docs

* use constants and catch possible debug exception

* adjust zoom factor exponent

* don't run motion estimation when calling preset

* adjust dimension threshold

* use numpy for velocity estimate calcs

* more numpy conversion

* fix numpy shapes

* numpy zeros dimension

* more zoom out conditions

* fix velocity bug

* ensure init has been called in debug view

* ensure onvif init if enabling by mqtt

* change default hysteresis values

* recalc relative zoom value

* zoom out value

* try to zoom when object isn't moving

* try zoom when tracked object is not moving

* don't try to zoom every time

* negate zoom out condition when needed

* hysteresis constants for absolute zooming

* update zoom conditions

* don't recalc target box on zoom only

* zoom out if above area threshold

* don't print zooming debug for stationary obj

* revamp zooming to use area moving average

* zooming tweaks and expose property

* limit zoom with max target box

* use calibration to determine zoom levels

* zoom logic fix

* docs

* add tapo c200 camera

* fix initial absolute zoom

* small zoom logic fix

* better invalid velocity checks

* fix test

* really fix test this time
2023-10-22 12:59:13 -04:00
Josh HawkinsandGitHub ee1e1b748c fix logic error in preset fetch (#8245) 2023-10-20 19:27:47 -04:00
Josh HawkinsandGitHub dbd21eb6fa use getattr instead of get (#8094) 2023-10-08 14:30:23 -05:00
Josh HawkinsandGitHub 67a5a7d21a onvif: use preset token if name is unsupported (#8046)
* onvif: use preset token if name is unsupported

* move parenthesis
2023-10-07 09:20:42 -05:00
Josh HawkinsandGitHub 8298806028 update list of onvif capable cams (#8021)
* update list of onvif capable cams

* clarify hikvision

* wording

* hikvision

* add sunba and ctronics from forum reports

* add cams
2023-10-07 09:20:10 -05:00
Josh HawkinsandGitHub fe9fcf3eaa remove erroneous check for move threads (#8031) 2023-10-07 09:18:07 -05:00
Josh HawkinsandGitHub 20c2ab39bc disable zooming if relative zoom not supported (#8028) 2023-10-07 09:17:54 -05:00
Josh HawkinsandGitHub 22b9507797 add image of debug view (#8003) 2023-09-30 06:25:39 -05:00
Josh HawkinsandGitHub e77fedc445 docs for onvif camera support (#7999)
* docs for onvif camera support

* fix warning

* warning to caution

* update table

* centering

* no autotracking for reolinks

* zoom only for 511WA
2023-09-29 17:52:57 -05:00
Josh HawkinsandGitHub ead03c381b Autotracking improvements and bugfixes (#7984)
* add zoom factor and catch motion exception

* reword error message

* check euclidean distance of estimate points

* use numpy for euclidean distance

* config entry

* use zoom factor and zoom based on velocity

* move debug inside try

* change log type to info

* logger level warning

* docs

* exception handling
2023-09-28 18:21:37 -05:00
Josh HawkinsandGitHub 50f13b7196 thread lock for move queues (#7973) 2023-09-28 18:01:05 -05:00
Josh HawkinsandGitHub 27144eb0b9 Autotracker: Basic zooming and moves with velocity estimation (#7713)
* don't zoom if camera doesn't support it

* basic zooming

* make zooming configurable

* zooming docs

* optional zooming in camera status

* Use absolute instead of relative zooming

* increase edge threshold

* zoom considering object area

* bugfixes

* catch onvif zooming errors

* relative zooming option for dahua/amcrest cams

* docs

* docs

* don't make small movements

* remove old logger statement

* fix small movements

* use enum in config for zooming

* fix formatting

* empty move queue first

* clear tracked object before waiting for stop

* use velocity estimation for movements

* docs updates

* add tests

* typos

* recalc every 50 moves

* adjust zoom based on estimate box if calibrated

* tweaks for fast objects and large movements

* use real time for calibration and add info logging

* docs updates

* remove area scale

* Add example video to docs

* zooming font header size the same as the others

* log an error if a ptz doesn't report a MoveStatus

* debug logging for onvif service capabilities

* ensure camera supports ONVIF MoveStatus
2023-09-27 06:19:10 -05:00
Josh HawkinsandGitHub 64705c065f update docs sidebar for go2rc 1.7.1 (#7946) 2023-09-27 06:11:37 -05:00
Josh HawkinsandGitHub a3eccce8f3 use useEffect for key listeners on camera control panel (#7827)
* use useEffect for key listeners

* dependencies

* useCallbacks
2023-09-21 05:25:57 -05:00
Josh HawkinsandGitHub b538572afb Clarify autotracking preset docs (#7576) 2023-09-01 07:01:48 -05:00
Josh HawkinsandGitHub dc2e786a6f remove sleeps and improve queue logic (#7163) 2023-07-14 19:01:10 -05:00
Josh HawkinsandGitHub c9254b256a Autotracking: reset motion estimator (#7129)
* reset motion estimator after returning to preset

* small tweaks and a bugfix
2023-07-13 05:32:51 -05:00
Josh HawkinsandGitHub 7a2d09dc35 Autotracking optimizations (#7109)
* much improved motion estimation and tracking

* docs updates

* move ptz specific mp values to ptz_metrics dict

* only check if moving at frame time

* pass full dict instead of individual values
2023-07-11 06:23:20 -05:00
Josh HawkinsandGitHub 691e9d26d2 Autotracking fixes (#7096)
* only check camera status if autotracking enabled

* a more sensible sleep time

* Only check camera status if preparing for a move

* only update tracked obj position when ptz stopped

* both pantilt *and* zoom should be idle

* check more often after moving

* No need to move pan and tilt separately
2023-07-08 16:02:54 -05:00
88fc0fac8f Basic PTZ object autotracking functionality (#6913)
* Basic functionality

* Threaded motion estimator

* Revert "Threaded motion estimator"

This reverts commit 3171801607.

* Don't detect motion when ptz is moving

* fix motion logic

* fix mypy error

* Add threaded queue for movement for slower ptzs

* Move queues per camera

* Move autotracker start to app.py

* iou value for tracked object

* mqtt callback

* tracked object should be initially motionless

* only draw thicker box if autotracking is enabled

* Init if enabled when initially disabled in config

* Fix init

* Thread names

* Always use motion estimator

* docs

* clarify fov support

* remove size ratio

* use mp event instead of value for ptz status

* update autotrack at half fps

* fix merge conflict

* fix event type for mypy

* clean up

* Clean up

* remove unused code

* merge conflict fix

* docs: update link to object_detectors page

* Update docs/docs/configuration/autotracking.md

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

* clarify wording

* pass actual instances directly

* default return preset

* fix type

* Error message when onvif init fails

* disable autotracking if onvif init fails

* disable autotracking if onvif init fails

* ptz module

* verify required_zones in config

* update util after dev merge

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-07-08 07:04:47 -05:00
Josh HawkinsandBlake Blackshear 7845995dfd Adjust threshold and contour_area with mqtt 2022-07-05 08:46:10 -05:00
Josh HawkinsandGitHub 65e0ec7826 Allow improve_contrast to be toggled via mqtt (#3011)
* Toggle improve_contrast for cameras via MQTT

* Process parameter to mqtt toggle improve_contrast

* Update mqtt docs for improve_contrast topic

* Spacing

* Add class variable and update in process_frames

* Pass to constructor

* pass by reference mistake

* remove parameter

* remove parameter
2022-04-16 08:52:02 -05:00