* 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.
* Add raw config endpoint
* Add config editor
* Add code editor
* Add error
* Add ability to copy config
* Only show the save button when code has been edited
* Update errors
* Remove debug config from system page
* Break out config saving steps to pinpoint where error occurred.
* Show correct config errors
* Switch to monaco editor
* Adjust UI colors and behavior
* Get yaml validation working
* Set success color
* 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
* 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
* 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
* 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 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>
* Send mqtt message when motion is detected
* Use object processing instead of passing mqtt client around
* Cleanup
* Formatting
* add comment
* Make off delay configurable.
* Handle updating each camera based on config off delay
* Formatting
* Update docker-compose.yml
* Fix processing issue
* Update mqtt docs
* Update main config docs
* Make sure multiple True values aren't published for the same motion
* Make sure multiple True values aren't published for the same motion
* Update payload to fit existing HA standard values
* Update docs to fit new values
* Update docs
* Update motion topic
* Use datetime.datetime and remove unused imports
* Cast to int
* Clarify motion detector behavior in docs
* Fix typo
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
* Add options for reordering and hiding cameras selectively
* Add newline at end of camera file
* Make each camera for birdseye togglable as well
* Update names to be less ambiguous
* Update defaults
* Include sidebar change
* Remove birdseye toggle (will be added in separate PR)
* Remove birdseye toggle (will be added in separate PR)
* Remove birdseye toggle (will be added in separate PR)
* Update sidebar to only sort cameras once
* Simplify sorting logic
* Add camera level processing for birdseye
* Add camera level birdseye configruation
* Propogate birdseye from global
* Update docs to show that birdseye is overridable
* Fix incorrect default factory
* Update note to indicate values that can be overridden
* Cleanup config accessing
* Add tests for birdseye config behavior
* Fix mistake on test format
* Update tests
* Add object ratio config parameters
Issue: #2948
* Add config test for object filter ratios
Issue: #2948
* Address review comments
- Accept `ratio` default
- Rename `bounds` to `box` for consistency
- Add migration for new field
Issue: #2948
* Fix logical errors
- field migrations require default values
- `clipped` referenced the wrong index for region, since it shifted
- missed an inclusion of `ratio` for detections in `process_frames`
- revert naming `o[2]` as `box` since it is out of scope!
This has now been test-run against a video, so I believe the kinks are
worked out.
Issue: #2948
* Update contributing notes for `make`
Issue: #2948
* Fix migration
- Ensure that defaults match between Event and migration script
- Deconflict migration script number (from rebase)
Issue: #2948
* Filter objects out of ratio bounds
Issue: #2948
* Update migration file to 009
Issue: #2948
* 📝✅🔧 - Make RTMP config global
Fixes#1671
* 📝✅🔧 - Make timestamp style config global
Fixes#1656
* fix test function names
* formatter
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
Use config data classes to eliminate some of the boilerplate associated
with setting up the configuration. In particular, using dataclasses
removes a lot of the boilerplate around assigning properties to the
object and allows these to be easily immutable by freezing them. In the
case of simple, non-nested dataclasses, this also provides more
convenient `asdict` helpers.
To set this up, where previously the objects would be parsed from the
config via the `__init__` method, create a `build` classmethod that does
this and calls the dataclass initializer.
Some of the objects are mutated at runtime, in particular some of the
zones are mutated to set the color (this might be able to be refactored
out) and some of the camera functionality can be enabled/disabled. Some
of the configs with `enabled` properties don't seem to have mqtt hooks
to be able to toggle this, in particular, the clips, snapshots, and
detect can be toggled but rtmp and record configs do not, but all of
these configs are still not frozen in case there is some other
functionality I am missing.
There are a couple other minor fixes here, one that was introduced
by me recently where `max_seconds` was not defined, the other to
properly `get()` the message payload when handling publishing mqtt
messages sent via websocket.
StatsEmitter thread to send stats to MQTT every 60 seconds by default, optional stats_interval config value.
New service stats attribute, containing uptime in seconds and version.