* Initial work for adding OpenVino detector. Not functional
* Load model and submit for inference.
Sucessfully load model and initialize OpenVino engine with either CPU or GPU as device.
Does not parse results for objects.
* Detection working with ssdlite_mobilenetv2 FP16 model
* Add OpenVIno support and model to docker image
* Add documentation for OpenVino detector configuration
* Adds support for ARM32/ARM64 and the Myriad X hardware
- Use custom-built openvino wheel for all platforms
- Add libusb build without udev for NCS2 support
* Add documentation around Intel CPU requirements and NCS2 setup
* Print all available output tensors
* Update documentation for config parameters
* Get storage output stats for each camera
* Add storage route
* Add storage route
* Add storage page
* Cleanup
* Add stats and show more storage
* Add tests for mb abbrev util fun
* Rewrite storage logic to use storage maintainer and segment sizes
* Include storage maintainer for http
* Use correct format
* Remove utils
* Fix tests
* Remove total from equation
* Multiply by 100 to get percent
* Add basic storage info
* Fix storage stats
* Fix endpoint and ui
* Fix formatting
* Add hwaccel presets
* Use hwaccel presets
* Add input arg presets
* Use input arg presets
* Make util to clean up redundant code
* Add support for output arg presets
* Add tests
* Update camera specific to use presets
* Update hwaccel to use presets
* Format files and fix tests
* Rewrite tests to test record correctly
* Move presets from string to list to avoid manually separating into a list
* Add mjpeg cuvid decoder preset
* Fix tests
* Fix comment
* Move to images specific folder
* Send error image when camera stream is not available
* Immediately set camera_fps to 0 if camera crashes
* Cache error image so it is not read from file system on each run
* Move camera fps set
* Add ffprobe endpoint
* Get ffprobe for multiple inputs
* Copy ffprobe in output
* Fix bad if statement
* Return full output of ffprobe process
* Return full output of ffprobe process
* Make ffprobe button show dialog with output and option to copy
* Add driver names to consts
* Add driver env var name
* Setup general tracking for GPU stats
* Catch RPi args as well
* Add util to get radeontop results
* Add real amd GPU stats
* Fix missed arg
* pass config
* Use only the values
* Fix vram
* Add nvidia gpu stats
* Use nvidia stats
* Add chart for gpu stats
* Format AMD with space between percent
* Get correct nvidia %
* Start to add support for intel GPU stats
* Block out RPi as util is not currently available
* Formatting
* Fix mypy
* Strip for float conversion
* Strip for float conversion
* Fix percent formatting
* Remove name from gpu map
* Add tests and fix AMD formatting
* Add nvidia gpu stats test
* Formatting
* Add intel_gpu_top for testing
* Formatting
* Handle case where hwaccel is not setup
* Formatting
* Check to remove none
* Don't use set
* Cleanup and fix types
* Handle case where args is list
* Fix mypy
* Cast to str
* Fix type checking
* Return none instead of empty
* Fix organization
* Make keys consistent
* Make gpu match style
* Get support for vainfo
* Add vainfo endpoint
* Set vainfo output in error correctly
* Remove duplicate function
* Fix errors
* Do cpu & gpu work asynchonously
* Fix async
* Fix event loop
* Fix crash
* Fix naming
* Send empty data for gpu if error occurs
* Show error if gpu stats could not be retrieved
* Fix mypy
* Fix test
* Don't use json for vainfo
* Fix cross references
* Strip unicode still
* await vainfo response
* Add gpu deps
* Formatting
* remove comments
* Use empty string
* Add vainfo back in
* Add option for mqtt config
* Setup communication layer
* Have a dispatcher which is responsible for handling and sending messages
* Move mqtt to communication
* Separate ws communications module
* Make ws client conform to communicator
* Cleanup imports
* Migrate to new dispatcher
* Clean up
* Need to set topic prefix
* Remove references to mqtt in dispatcher
* Don't start mqtt until dispatcher is subscribed
* Cleanup
* Shorten package
* Formatting
* Remove unused
* Cleanup
* Rename mqtt to ws on web
* Fix ws mypy
* Fix mypy
* Reformat
* Cleanup if/else chain
* Catch bad set commands
* Refactor mqtt client
* Protect callback method
* Use async to handle reconnects
* Set types and clenup
* Don't set connected until rc code is checked
* Typing: events.py
* Remove unused variable
* Fix return Any from return statement
Not all elements from the event dict are sure to be something that can be evaluated
See e.g.: https://github.com/python/mypy/issues/5697
* Sort out Event disambiguity
There was a name collision of multiprocessing Event type and frigate events
Co-authored-by: Sebastian Englbrecht <sebastian.englbrecht@kabelmail.de>
* Start restream before detection
* Add docs explaining how to reduce connections to the camera
* Fix typos for consistency
* Add link to other part of doc for readability
* Update go2rtc to rc3
* Simplify ffmpeg / audio conversions
* Set ffmpeg bin location
* Manually set video as copied
* Run go2rtc with env vars
* Remove manual ffmpeg declaration
* Enable force_audio by default
* Fix test
* Move each camera to a separate card and show per process info
* Install top
* Add support for cpu usage stats
* Use cpu usage stats in debug
* Increase number of runs to ensure good results
* Add ffprobe endpoint
* Get ffprobe for multiple inputs
* Copy ffprobe in output
* Add fps to camera metrics
* Fix lint errors
* Update stats config
* Add ffmpeg pid
* Use grid display so more cameras can take less vertical space
* Fix hanging characters
* Only show the current detector
* Fix bad if statement
* Return full output of ffprobe process
* Return full output of ffprobe process
* Don't specify rtsp_transport
* Make ffprobe button show dialog with output and option to copy
* Adjust ffprobe api to take paths directly
* Add docs for ffprobe api
* Move existing checks to own functions
* Add config check for zone objects that are not tracked
* Add tests for config error
* Formatting
* Catch case where field is defined multiple times and add test
* Add warning for rtmp
* Refactor EdgeTPU and CPU model handling to detector submodules.
* Fix selecting the correct detection device type from the config
* Remove detector type check when creating ObjectDetectProcess
* Fixes after rebasing to 0.11
* Add init file to detector folder
* Rename to detect_api
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Add unit test for LocalObjectDetector class
* Add configuration for model inputs
Support transforming detection regions to RGB or BGR.
Support specifying the input tensor shape. The tensor shape has a standard format ["BHWC"] when handed to the detector, but can be transformed in the detector to match the model shape using the model input_tensor config.
* Add documentation for new model config parameters
* Add input tensor transpose to LocalObjectDetector
* Change the model input tensor config to use an enumeration
* Updates for model config documentation
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Consts for regex
* Add regex for camera username and password
* Redact user:pass from ffmpeg logs
* Redact ffmpeg commands
* Move common function to util
* Add tests
* Formatting
* Remove unused imports
* Fix test
* Add port to test
* Support special characters in passwords
* Add tests for special character handling
* Remove docs about not supporting special characters
* add option enabled for each camera in config
* Simplified If-block and removed wrong Optional
* Update Docs enabling/disabling camera in config
* correct format for option
* Disabling Camera for processes, no config changes
* Describe effects of disabled cam in documentation
* change if-logic, obsolete copy, info disabled cam
* changed color to white, added top padding in disabled camera info
* changed indentation
* Pull go2rtc dependency
* Add go2rtc to local services and add to s6
* Add relay controller for go2rtc
* Add restream role
* Add restream role
* Add restream to nginx
* Add camera live source config
* Disable RTMP by default and use restream
* Use go2rtc for camera config
* Fix go2rtc move
* Start restream on frigate start
* Send restream to camera level
* Fix restream
* Make sure jsmpeg works as expected
* Make view rspect live size config
* Tweak player options to fit live view
* Adjust VideoPlayer to accept live option which disables irrelevant controls
* Add multiple options from restream live view
* Add base for webrtc option
* Setup specific restream modules
* Make mp4 the default streaming for now
* Expose 8554 for rtsp relay from go2rtc
* Formatting
* Update docs to suggest new restream method.
* Update docs to reflect restream role
* Update docs to reflect restream role
* Add webrtc player
* Improvements to webRTC
* Support webrtc
* Cleanup
* Adjust rtmp test and add restream test
* Fix tests
* Add restream tests
* Add live view docs and show different options
* Small docs tweak
* Support all stream types
* Update to beta 9 of go2rtc
* Formatting
* Make jsmpeg the default
* Support wss if made from https
* Support wss if made from https
* Use onEffect
* Set url outside onEffect
* Fix passed deps
* Update docs about required host mode
* Try memo instead
* Close websocket on changing camera
* Formatting
* Close pc connection
* Set video source to null on cleanup
* Use full path since go2rtc can't see PATH var
* Adjust audio codec to enable browser audio by default
* Cleanup stream creation
* Add restream tests
* Format tests
* Mock requests
* Adjust paths
* Move stream configs to restream
* Remove live source
* Remove live config
* Use live persistence for which view to use on each camera
* Fix live sizes
* Only use jsmpeg sizes for jsmpeg live
* Set max live size
* Remove access of live config
* Add selector for live view source in web view
* Remove RTMP from default list of roles
* Update docs
* Fix tests
* Fix docs for live view modes
* make default undefined to avoid race condition
* Wait until camera source is loaded to avoid race condition
* Fix tests
* Add config to go2rtc
* Work with config
* Set full path for config
* Set to use stun
* Check for mounted file
* Look for frigate-go2rtc
* Update docs to reflect webRTC configuration.
* Add link to go2rtc config
* Update docs to be more clear
* Update docs to be more clear
* Update format
Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
* Update live docs
* Improve bash startup script
* Add option to force audio compatibility
* Formatting
* Fix mapping
* Fix broken link
* Update go2rtc version
* Get go2rtc webui working
* Add support for mse
* Remove mp4 option
* Undo changes to video player
* Update docs for new live view options
* Make separate path for mse
* Remove unused
* Remove mp4 path
* Try to get go2rtc proxy working
* Try to get go2rtc proxy working
* Remove unused callback
* Allow websocket on restrea dashboard
* Make mse default stream option
* Fix mse sizing
* don't assume roles is defined
* Remove nginx mapping to go2rtc ui
Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
* Add field and migration for segment size
* Store the segment size in db
* Add comment
* Add default
* Fix size parsing
* Include segment size in recordings endpoint
* Start adding storage maintainer
* Add storage maintainer and calculate average sizes
* Update comment
* Store segment and hour avg sizes per camera
* Formatting
* Keep track of total segment and hour averages
* Remove unused files
* Cleanup 2 hours of recordings at a time
* Formatting
* Fix bug
* Round segment size
* Cleanup some comments
* Handle case where segments are not deleted on initial run or is only retained segments
* Improve cleanup log
* Formatting
* Fix typo and improve logging
* Catch case where no recordings exist for camera
* Specifically define sort
* Handle edge case for cameras that only record part time
* Increase definition of part time recorder
* Remove warning about not supported storage based retention
* Add note about storage based retention to recording docs
* Add tests for storage maintenance calculation and cleanup
* Format tests
* Don't run for a camera with no recording segments
* Get size of file from cache
* Rework camera stats to be more efficient
* Remove total and other inefficencies
* Rewrite storage cleanup logic to be much more efficient
* Fix existing tests
* Fix bugs from tests
* Add another test
* Improve logging
* Formatting
* Set back correct loop time
* Update name
* Update comment
* Only include segments that have a nonzero size
* Catch case where camera has 0 nonzero segment durations
* Add test to cover zero bandwidth migration case
* Fix test
* Incorrect boolean logic
* Formatting
* Explicity re-define iterator
* Set sub label on object data if event is in progress
* Include sub_label in dict
* Don't need to set and passively get
* Formatting
* Don't expect event to be valid
* Update docs to reflect that sub label is included
* -1 so ensure indexes are correct
* Catch case of zero division
* Due to the -1, it may be negative
* Ignore source of error
The error is occurring due to a detections bounding box starting beyond the frame, this should be immediately ignored
* Formatting
* Check horizontal placement as well
* Remove original frame clamping
* Fix VOD issues with longer keyframe intervals
* Move probe function to util
Update comment
* Use recording duration for keyFrameDurations
* Remove unused early return
* Avoid clipping first clip
* Add log message when discarding recording segments in cache
Currently Frigate silently discards recording segments in cache if there's more than "keep_count" for a camera, which can happen on high load/busy/slow systems.
This results in recording segments being lost with no apparent cause in the logs (even when set to debug).
This PR adds a warning log entry when discarding segments, in the same way as discarding corrupted segments
* Add explanatory warning and properly format cache_path warning
* lint fixes
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
* Set up for http tests
* Setup basics for testing and first test
* Add testing consts
* Cleanup db creation
* Add one more check to test
* Get event that does not exist
* Get events working with cleaner db
* Test retain / un-retain
* Test setting and deleting sub label
* Test getting list of sub labels
* Fix bug caught in tests
* Test deleting event
* Test geting list of events
* Expand test
* Test more event filters
* Write version module so tests don't fail on version import
* Test config
* Test recordings endpoint
* Formatting
* Remove unused imports
* Test stats
* Add cleanup files in const
* Add name to match other checks
* Use default names so filters are more clear
* Add endpoint to get list of sub labels inside DB
* Fix crash on no internet
* Cleanups for sub_label http
* Add sub label selector to events UI
* Add event filtering for sub label
* Formatting files
* Reduce size of filters to fit on one line
* Add handler for tests
* Remove unused imports
* Only show the sub labels filter when there are sub labels in the DB
* Fix tests
* Use distinct instead of group_by
* Formatting
* Cleanup event logic