Commit Graph

726 Commits

Author SHA1 Message Date
Nick Mowen
3be336afa8 Handle case where hwaccel is not setup 2022-11-28 14:17:04 -07:00
Nick Mowen
baeb3ddc75 Formatting 2022-11-28 14:17:04 -07:00
Nick Mowen
86074e69d2 Add intel_gpu_top for testing 2022-11-28 14:17:04 -07:00
Nick Mowen
61cac3c2f9 Formatting 2022-11-28 14:17:04 -07:00
Nick Mowen
eb25935dd2 Add nvidia gpu stats test 2022-11-28 14:17:04 -07:00
Nick Mowen
9b5516caa5 Add tests and fix AMD formatting 2022-11-28 14:17:04 -07:00
Nick Mowen
b0a282236f Remove name from gpu map 2022-11-28 14:17:04 -07:00
Nick Mowen
fa698514ab Fix percent formatting 2022-11-28 14:17:04 -07:00
Nick Mowen
f1a8a7981d Strip for float conversion 2022-11-28 14:17:04 -07:00
Nick Mowen
c7d461ccc1 Strip for float conversion 2022-11-28 14:17:04 -07:00
Nick Mowen
250440ca5e Fix mypy 2022-11-28 14:17:04 -07:00
Nick Mowen
447df28746 Formatting 2022-11-28 14:17:04 -07:00
Nick Mowen
beb8229e4d Block out RPi as util is not currently available 2022-11-28 14:17:04 -07:00
Nick Mowen
2e1958a20b Start to add support for intel GPU stats 2022-11-28 14:17:04 -07:00
Nick Mowen
987bc050ed Get correct nvidia % 2022-11-28 14:17:04 -07:00
Nick Mowen
1d7265f453 Format AMD with space between percent 2022-11-28 14:17:04 -07:00
Nick Mowen
cc150147d1 Use nvidia stats 2022-11-28 14:17:04 -07:00
Nick Mowen
4ffdfe66ba Add nvidia gpu stats 2022-11-28 14:17:04 -07:00
Nick Mowen
c97975eb19 Fix vram 2022-11-28 14:17:04 -07:00
Nick Mowen
615135d624 Use only the values 2022-11-28 14:17:04 -07:00
Nick Mowen
41ac558642 pass config 2022-11-28 14:17:04 -07:00
Nick Mowen
17c2522ee1 Fix missed arg 2022-11-28 14:17:04 -07:00
Nick Mowen
38317b9ed4 Add real amd GPU stats 2022-11-28 14:17:04 -07:00
Nick Mowen
497ebf63f2 Add util to get radeontop results 2022-11-28 14:17:04 -07:00
Nick Mowen
3180dfd617 Catch RPi args as well 2022-11-28 14:17:04 -07:00
Nick Mowen
96b970430f Setup general tracking for GPU stats 2022-11-28 14:17:04 -07:00
Nick Mowen
fa765da19d Add driver env var name 2022-11-28 14:17:04 -07:00
Nick Mowen
1dd80f422d Add driver names to consts 2022-11-28 14:17:02 -07:00
Nick Mowen
2bf706cf4b Make ffprobe button show dialog with output and option to copy 2022-11-28 14:16:43 -07:00
Nick Mowen
1337c78ef8 Return full output of ffprobe process 2022-11-28 14:16:43 -07:00
Nick Mowen
f294ec1ca1 Return full output of ffprobe process 2022-11-28 14:16:43 -07:00
Nick Mowen
ff45b6dbe1 Fix bad if statement 2022-11-28 14:16:43 -07:00
Nick Mowen
97a56b8aeb Copy ffprobe in output 2022-11-28 14:16:43 -07:00
Nick Mowen
18b0840e6b Get ffprobe for multiple inputs 2022-11-28 14:16:43 -07:00
Nick Mowen
aadc8a8d3d Add ffprobe endpoint 2022-11-28 14:16:43 -07:00
Nicolas Mowen
68248cc274
Clean http password, clean path in debug config as well (#4519)
* Clean ffmpeg paths

* Clean http passwords too

* Make check optional
2022-11-26 19:18:33 -06:00
Blake Blackshear
047c2408d2
fix support for yuv models (#4523) 2022-11-26 19:15:47 -06:00
Nicolas Mowen
91982c4f7e
Remove topic prefix (#4515) 2022-11-25 20:10:09 -06:00
Nicolas Mowen
4e5512e35d
Fix stats prefix (#4505) 2022-11-24 20:12:43 -06:00
Nicolas Mowen
6c0978498d
Abstract MQTT from communication and make mqtt optional (#4462)
* 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
2022-11-23 20:03:20 -06:00
Nicolas Mowen
ebdf36e0b9
Refactor mqtt to handle reconnects and not cause frigate to stop. (#4440)
* Refactor mqtt client

* Protect callback method

* Use async to handle reconnects

* Set types and clenup

* Don't set connected until rc code is checked
2022-11-20 07:36:01 -06:00
herostrat
2e81c94d8e
Typing Part 3: events.py (#3352)
* 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>
2022-11-19 07:16:33 -06:00
Nicolas Mowen
a04fa105ef
Fix internal restream error and add docs for reducing camera connections (#4431)
* 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
2022-11-19 07:15:20 -06:00
Nicolas Mowen
4eb3e98076
Update go2rtc, simplify manual stream, and support audio for MSE & WebRTC (#4391)
* 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
2022-11-16 06:29:47 -06:00
Nicolas Mowen
c97aac6c94
Revamped debug UI and add camera / process info, ffprobe copying (#4349)
* 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
2022-11-13 12:48:14 -06:00
Nicolas Mowen
9e31873520
More config checks (#4310)
* 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
2022-11-08 19:47:45 -06:00
Nate Meyer
40cb5102b0
Support more special chars in camera passwords (#4259)
* Support more special chars in camera passwords

* End password test with double @ chars

* Escape passwords in paths for go2rtc

* Fixes for formatting
2022-11-05 21:42:32 -05:00
Nate Meyer
4383b883c0
Refactor to simplify support for additional detector types (#3656)
* 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>
2022-11-03 21:23:09 -05:00
Nicolas Mowen
1bc9efd529
Support special characters in passwords, redacted logs & debug config (#4057)
* 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
2022-11-02 07:00:54 -05:00
banthungprong
8163afce79
Allow cameras to be disabled in config (#4162)
* 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
2022-11-02 06:41:44 -05:00