Commit Graph

407 Commits

Author SHA1 Message Date
Blake Blackshear
3b695040d1 send clip_ready mqtt to event topic 2021-06-14 18:20:12 -05:00
Blake Blackshear
40bf7a0f41 cleanup 2021-06-14 07:48:35 -05:00
Blake Blackshear
cbdf2c2c71 remove gevent fixes #920 2021-06-14 07:48:35 -05:00
Blake Blackshear
bbe3f07ec6 overlay the frigate logo on the blank frame 2021-06-13 12:35:39 -05:00
Blake Blackshear
35281c037c trickle in some frames after activity stops 2021-06-13 12:35:39 -05:00
Blake Blackshear
e0eb247028 output the current frame from each active camera instead of last active 2021-06-13 12:35:39 -05:00
Blake Blackshear
a7ecc2af4b lock before iterating web sockets 2021-06-13 12:35:39 -05:00
Blake Blackshear
58cfb8bba4 set jsmpeg video size to same as camera 2021-06-12 07:23:14 -05:00
Blake Blackshear
ed761d1767 cap the array size of the output queue 2021-06-12 07:23:14 -05:00
Blake Blackshear
babe1dd1eb precompute the layout offsets and dimensions 2021-06-12 07:23:14 -05:00
Blake Blackshear
cbd418b8de use actual logger 2021-06-12 07:23:14 -05:00
Blake Blackshear
9c5b0d4138 implement birdseye modes 2021-06-12 07:23:14 -05:00
Blake Blackshear
94c21a6363 use values from config 2021-06-12 07:23:14 -05:00
Blake Blackshear
d1a5e2e8e0 add config for birdseye 2021-06-12 07:23:14 -05:00
Blake Blackshear
17179abf5a use quality value and faster resize 2021-06-12 07:23:14 -05:00
Blake Blackshear
c70419bd0b update birdseye layout calculations 2021-06-12 07:23:14 -05:00
Blake Blackshear
4eed27e178 add layout calculations 2021-06-12 07:23:14 -05:00
Blake Blackshear
8e2ba4a8ea move birdseye placeholder to output process 2021-06-12 07:23:14 -05:00
Blake Blackshear
4596ada801 manage multiple cameras 2021-06-12 07:23:14 -05:00
Blake Blackshear
a8df97dc1a only send frames to ffmpeg if there are clients listening 2021-06-12 07:23:14 -05:00
Blake Blackshear
4e0203ca68 increase read size and listen on local 2021-06-12 07:23:14 -05:00
Blake Blackshear
8413e10091 ensure output exits properly 2021-06-12 07:23:14 -05:00
Blake Blackshear
7aaf5bd29f remove node jsmpeg server 2021-06-12 07:23:14 -05:00
Blake Blackshear
5afda72b84 handle exit signals 2021-06-12 07:23:14 -05:00
Blake Blackshear
7a6ffb1032 adding output process to handle downstream processing of frames 2021-06-12 07:23:14 -05:00
Blake Blackshear
7fc9026ca6 basic plumbing for birdseye view 2021-06-12 07:23:14 -05:00
Blake Blackshear
f4a0ec43a6 wip yuv_rgb refactor 2021-06-12 07:23:14 -05:00
Patrick
e8c342e162 Update http.py
comparison of constants, use T/F instead
2021-06-10 20:58:28 -05:00
Jason Hunter
098e293c82 fetch recordings until end of hour, not top of next hour 2021-06-10 07:04:28 -05:00
Jason Hunter
78a0b5e6c9 clean up VOD endpoint 2021-06-10 07:04:28 -05:00
Jason Hunter
055bd22138 initial implementation of recordings table 2021-06-10 07:04:28 -05:00
Mingkwan Burckhardt
8dfff83447 Added support for authentication with client certificate with MQTT broker 2021-06-06 07:57:46 -05:00
Jason Hunter
68dfaaf767 hide recordings page if record is not enabled, show error if no recordings available. 2021-06-06 07:54:58 -05:00
Jason Hunter
b53a50cd54 restyle to match Material Design List specs 2021-06-05 07:30:18 -05:00
Jason Hunter
9822d614e2 fix videojs bug when switching cameras, support recording delay, fix navigation highlight 2021-06-05 07:30:18 -05:00
Jason Hunter
ca20c735f7 add event card to overlay 2021-06-05 07:30:18 -05:00
Jason Hunter
5461308d30 Initial Recordings UI 2021-06-05 07:30:18 -05:00
Sean Vig
abbc608ee4 Updates to object processing
Lock updates to tracked objects, current frame time, motion boxes, and
regions on `update()`.

Directly create Counters using counted values.

Don't convert removed_ids, new_ids, or updated_ids sets to lists.

Update defaultdict's to remove un-necessary lambdas when possible.

When possible, drop un-necessay list comprehensions, such as when
calling `any`.

Use set comprehension, rather than passing a list comprehension into
`set()`.

Do the slightly more pythonic `x not in y` rather than `not x in y` to
check list inclusion.
2021-05-23 21:00:56 -05:00
Sean Vig
9634ec8e31 Allow zone configs to be frozen
Set the color at construction so the zone config objects can be frozen
2021-05-23 20:38:57 -05:00
Sean Vig
84a0827aee Use dataclasses for config handling
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.
2021-05-23 20:38:57 -05:00
Blake Blackshear
1fbcf4d9b9 fixes 2021-05-23 08:21:18 -05:00
Sean Vig
80f8256422 Improve handling of object matching
Use `np.unique` to determine the correct set of row/col pairs to iterate
over when doing the object matching without needing to track which rows
or columns have already been seen.  Add to some of the accompanying
documentation to clarify this algorithm.

Also fix what looks to be an erroneous early return, and change this to
a continue.
2021-05-22 08:04:38 -05:00
Sean Vig
57864f2be6 Wait on stop event when possible
Generally eliminate the `while True` loops while waiting for a stop
event and prefer to condition the loops on if the stop event is set,
blocking on that where it makes sense.  This generally comes in 3
flavors.  First and simplest, when there is a sleep and the stop event
is the only thing the loop blocks on, instead do a check using
`stop_event.wait(timeout)` to instead block on the stop event for the
designated amount of time. Second, when there is a different event that
is blocking in the loop, condition the loop on `stop_event.is_set()`
rather than breaking when it is set. Finally, when there is a separate
internal condition that requires a counter, have the loop iterate over
the counter and use `if stop_event.wait(timeout)` internal to the loop.
2021-05-22 07:54:16 -05:00
Jason Hunter
aab6a00e4c Add support for NGINX VOD Module 2021-05-22 07:48:44 -05:00
Sean Vig
a4e6d9ed9a Improve ffprobe executions
When running ffprobe, use `subprocess.run` rather than
`subprocess.Popen`.  This simplifies the handling that is needed to run
and process the outputs.  Here, filename parsing is also simplified by
explicitly removing the file extension with `os.path.splitext` and
forcing a single split into the camera name and the formatted date.
2021-05-22 07:48:00 -05:00
Mitch Ross
ebb6d348a3
feat(web): Delete events from Event page and API (#991)
Co-authored-by: Scott Roach <scott@thinkpivot.io>
Co-authored-by: Paul Armstrong <paul@spaceyak.com>
2021-05-12 08:19:02 -07:00
Jason Hunter
482399d82f allow logger daemon process to be killed with the main thread, thus allowing us to continue logging during shutdown 2021-05-06 07:01:33 -05:00
Blake Blackshear
4252857e19 remove tmpfs_cache_size option 2021-02-25 07:01:59 -06:00
Blake Blackshear
6d12a34c40 remove thumbnail attribute if null 2021-02-25 07:01:59 -06:00
Blake Blackshear
9e126a4b91 style cleanup 2021-02-25 07:01:59 -06:00