* 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
* optimize motion and velocity estimation
* change recommended fps and fix config validate
* remove unneeded var
* process at most 3 objects per second
* fix test
* 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
* Smarter Regions
* Formatting
* Cleanup
* Fix motion region checking logic
* Add database table and migration for regions
* Update region grid on startup
* Revert init delay change
* Fix mypy
* Move object related functions to util
* Remove unused
* Fix tests
* Remove log
* Update the region daily at 2
* Fix logic
* Formatting
* Initialize grid before starting processing frames
* Move back to creating grid in main process
* Formatting
* Fixes
* Formating
* Fix region check
* Accept all but true
* Use regions grid for startup scan
* Add clarifying comment
* Fix new grid requests
* Add tests
* Delete stale region grids from DB
* 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
* refactor existing motion detector
* implement and use cnt bgsub
* pass fps to motion detector
* create a simplified motion detector
* lightning detection
* update default motion config
* lint imports
* use estimated boxes for regions
* use improved motion detector
* update test
* use a different strategy for clustering motion and object boxes
* increase alpha during calibration
* simplify object consolidation
* add some reasonable constraints to the estimated box
* adjust cluster boundary to 10%
* refactor
* add disabled debug code
* fix variable scope
* Add isort and ruff linter
Both linters are pretty common among modern python code bases.
The isort tool provides stable sorting and grouping, as well as pruning
of unused imports.
Ruff is a modern linter, that is very fast due to being written in rust.
It can detect many common issues in a python codebase.
Removes the pylint dev requirement, since ruff replaces it.
* treewide: fix issues detected by ruff
* treewide: fix bare except clauses
* .devcontainer: Set up isort
* treewide: optimize imports
* treewide: apply black
* treewide: make regex patterns raw strings
This is necessary for escape sequences to be properly recognized.
* 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>
* nvml
* black...black...black...
* small fix for avoid errors on strange GPUs and old drivers
* fix type errors
* fix type errors
* fix unittest process crash
where the tests for tests?..
* it's impossible to mock low-level library
* fix double % for other GPU types
* remove space before gpu statistic values
* 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
* Add video codec to restream config
* Add handling of encode engine and video codec
* Add test for video encoding
* Set in main configuration docs as well
* Add example to restream docs
* Put back patch
* Catch when recording segments are not being written to cache and restart ffmpeg responsible for record
* Ensure this check is only run for role with record
* Fix formatting
* Redo recordings validator to watch segments time and restart if no segment for 30 seconds
* Formatting
* Increase wait time to 120 seconds and improve error message
* Add more config checks for record args and add test
* Formatting
* Specify output args.