Commit Graph

1874 Commits

Author SHA1 Message Date
Josh Hawkins
d480635ee8 Merge branch 'dev' into autotracking 2023-07-06 08:54:11 -05:00
Cody Cutrer
2fae9dcb93
reduce contention on frame_queue (#6890)
* reduce contention on frame_queue

don't check if the queue is full, just attempt to add the frame
in a non-blocking manner, and then if it fails, skip it

* don't check if the frame queue is empty, just try and get from it

* Update frigate/video.py

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-07-06 08:18:39 -05:00
Sergey Krashevich
c38c981cd0
Performance: multiprocessing improvement: step 2 (#6986)
* Refactored queues to use faster_fifo instead of mp.Queue

* Refactored LimitedQueue to include a counter for the number of items in the queue and updated put and get methods to use the counter

* Refactor app.py and util.py to use a custom Queue implementation called LQueue instead of the existing Queue

* Refactor put and get methods in LimitedQueue to handle queue size and blocking behavior more efficiently

* code format

* remove code from other branch (merging fuckup)
2023-07-06 07:56:38 -05:00
Nicolas Mowen
d0891e5183
Ptz cleanup (#6999)
* Use _ instead of - for ptz presets

* Update mqtt.md

* Fix

* Formatting
2023-07-06 07:42:17 -05:00
Andrew Reiter
325205740b
Check ffmpeg version instead of checking for presence of BTBN_PATH (#7023)
* Check ffmpeg version instead of checking for presence of BTBN_PATH

* Query ffmpeg version in s6 run script instead of subprocessing in every import

* Define LIBAVFORMAT_VERSION_MAJOR in devcontainer too

* Formatting

* Default ffmpeg version to current btbn version so unit tests pass
2023-07-06 07:35:26 -05:00
Andrew Reiter
f30ba25444
Reduce framerate before downscaling (#7022)
* Reduce framerate before downscaling

It is cheaper to drop frames and downscale those that remain than it is
to downscale all frames and then drop some of them. This is achieved
with the filter chain `-cv fps=FPS,scale=W:H`, and perhaps was the
original intention. The plain `-r` and `-s` flags do not execute in
order though - they each put themselves at the *end* of the filterchain,
so `-r FPS -s WxH` actually applies the scale filter first, and then the
rate filter.

This fix can halve the CPU used by the detect ffmpeg process.

* Bring back hard rate limits
2023-07-06 07:31:17 -05:00
Nicolas Mowen
339b6944f1
Force birdseye cameras into standard aspect ratios (#7026)
* Force birdseye cameras into standard aspect ratios

* Clarify comment

* Formatting

* Actually use the calculated aspect ratio when building the layout

* Fix Y aspect

* Force canvas into known aspect ratio as well

* Save canvas size and don't recalculate

* Cache coefficients that are used for different size layouts

* Further optimize calculations to not be done multiple times
2023-07-06 07:30:05 -05:00
Nicolas Mowen
0f68fbc8db
Use pre capture for custom events (#7038)
* Use pre capture for custom events

* Formatting
2023-07-06 07:26:53 -05:00
Nicolas Mowen
998bffe706
Fix min region size not being divisible by 4 (#7040)
* Fix min region size not being divisible by 4

* Simplify half calculation
2023-07-06 07:25:37 -05:00
Josh Hawkins
1a13cf601e verify required_zones in config 2023-07-03 12:47:44 -05:00
Josh Hawkins
3e95661e8a ptz module 2023-07-03 12:14:15 -05:00
Josh Hawkins
4f2624022a disable autotracking if onvif init fails 2023-07-03 12:05:14 -05:00
Josh Hawkins
70e4ee9fea disable autotracking if onvif init fails 2023-07-03 11:51:49 -05:00
Josh Hawkins
4279342cd3 Error message when onvif init fails 2023-07-03 11:44:48 -05:00
Josh Hawkins
0feaef0031 fix type 2023-07-03 11:41:20 -05:00
Josh Hawkins
714a3e28eb default return preset 2023-07-03 11:34:31 -05:00
Josh Hawkins
df59636ff9 pass actual instances directly 2023-07-03 11:27:02 -05:00
Josh Hawkins
54300bf50d Merge branch 'autotracking' of https://github.com/hawkeye217/frigate into autotracking 2023-07-03 10:42:17 -05:00
Josh Hawkins
6ee03f1e54 clarify wording 2023-07-03 10:42:13 -05:00
Josh Hawkins
fbc6e7deca
Update docs/docs/configuration/autotracking.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-07-03 10:34:36 -05:00
Josh Hawkins
f84f6d12e2 docs: update link to object_detectors page 2023-07-03 10:26:47 -05:00
Josh Hawkins
2c29b4f16c merge conflict fix 2023-07-03 10:23:16 -05:00
Josh Hawkins
c9a9734c73 remove unused code 2023-07-03 10:15:14 -05:00
Josh Hawkins
ce2070ff7f Merge branch 'autotracking' of https://github.com/hawkeye217/frigate into autotracking 2023-07-03 10:14:15 -05:00
Josh Hawkins
c840c9c655 Clean up 2023-07-03 10:14:04 -05:00
Josh Hawkins
bef54c537f clean up 2023-07-03 10:10:43 -05:00
Josh Hawkins
c690bb8500 fix event type for mypy 2023-07-03 10:08:27 -05:00
Josh Hawkins
39fbe47fc3 fix merge conflict 2023-07-03 09:51:11 -05:00
Sergey Krashevich
12d4a47e3d
End audio event and update detections if successful, otherwise log a warning if ending audio event fails with a specific status code (#6984) 2023-07-03 09:50:25 -05:00
Sergey Krashevich
1171f01683
Refactor camera rendering logic in System component to only render enabled cameras (#6992) 2023-07-03 09:49:14 -05:00
Sergey Krashevich
f905704479
UI: add audio process stats to System page (#6993)
* Add audio process PID to the list of processes and log the start of the audio process

* Update audio process PID key in processes dictionary to "audioDetector" instead of "audio".
2023-07-03 09:48:29 -05:00
Nicolas Mowen
58c6ef1e12
Add designator when events are from the api (#6997)
* Add designator when events are custom

* Add type field and set via API
2023-07-03 09:48:00 -05:00
Josh Hawkins
9362775eae Merge dev 2023-07-03 09:46:16 -05:00
Josh Hawkins
5195204604 update autotrack at half fps 2023-07-03 09:22:59 -05:00
Josh Hawkins
b267cfb520 use mp event instead of value for ptz status 2023-07-03 09:22:21 -05:00
Josh Hawkins
8e0d492ad8 remove size ratio 2023-07-02 19:06:44 -05:00
Josh Hawkins
1d588dcdc0 clarify fov support 2023-07-02 18:07:25 -05:00
Josh Hawkins
1f56b93824 docs 2023-07-02 18:02:43 -05:00
Josh Hawkins
59e539375e Always use motion estimator 2023-07-02 16:52:12 -05:00
Josh Hawkins
1be67e2606 Thread names 2023-07-02 16:08:08 -05:00
Josh Hawkins
6f170358ed Fix init 2023-07-02 14:02:52 -05:00
Josh Hawkins
98d534918a Init if enabled when initially disabled in config 2023-07-02 13:40:16 -05:00
Josh Hawkins
e883e00c74 only draw thicker box if autotracking is enabled 2023-07-02 13:10:17 -05:00
Josh Hawkins
f05ca2b9c6 tracked object should be initially motionless 2023-07-02 13:00:12 -05:00
Josh Hawkins
3059fd83c9 mqtt callback 2023-07-02 12:58:07 -05:00
Josh Hawkins
8f590bf5cc iou value for tracked object 2023-07-02 10:53:20 -05:00
Josh Hawkins
98c161bdde Move autotracker start to app.py 2023-07-02 10:52:38 -05:00
Nicolas Mowen
83edf9574e
Scale birdseye layout up to max size after it has been calculated (#6825)
* Scale layout up to max size after it has been calculated

* Limit portrait cameras to taking up 2 rows

* Fix bug

* Fix birdsye not removing cameras once objects are no longer visible

* Fix lint
2023-07-02 07:45:45 -05:00
Josh Hawkins
a5f407dba8 Move queues per camera 2023-07-01 22:35:06 -05:00
Josh Hawkins
56d074ec4e Add threaded queue for movement for slower ptzs 2023-07-01 20:26:55 -05:00