mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 23:14:12 +02:00
Compare commits
10 Commits
v0.5.1
...
v0.5.1-rc4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c377b0b3bc | ||
|
|
ba272fc0e8 | ||
|
|
7ccf2ef694 | ||
|
|
68bfa6010d | ||
|
|
a810c56811 | ||
|
|
5333b8ae1b | ||
|
|
2bc57d271c | ||
|
|
8507bbbb31 | ||
|
|
b6fcb88e5c | ||
|
|
d3cd4afa65 |
@@ -7,7 +7,7 @@ RUN apt -qq update && apt -qq install --no-install-recommends -y \
|
||||
software-properties-common \
|
||||
# apt-transport-https ca-certificates \
|
||||
build-essential \
|
||||
gnupg wget unzip tzdata \
|
||||
gnupg wget unzip \
|
||||
# libcap-dev \
|
||||
&& add-apt-repository ppa:deadsnakes/ppa -y \
|
||||
&& apt -qq install --no-install-recommends -y \
|
||||
|
||||
@@ -84,8 +84,6 @@ class CameraWatchdog(threading.Thread):
|
||||
while True:
|
||||
# wait a bit before checking
|
||||
time.sleep(10)
|
||||
|
||||
now = datetime.datetime.now().timestamp()
|
||||
|
||||
# check the plasma process
|
||||
rc = self.plasma_process.poll()
|
||||
@@ -96,7 +94,7 @@ class CameraWatchdog(threading.Thread):
|
||||
# check the detection process
|
||||
detection_start = self.tflite_process.detection_start.value
|
||||
if (detection_start > 0.0 and
|
||||
now - detection_start > 10):
|
||||
datetime.datetime.now().timestamp() - detection_start > 10):
|
||||
print("Detection appears to be stuck. Restarting detection process")
|
||||
self.tflite_process.start_or_restart()
|
||||
elif not self.tflite_process.detect_process.is_alive():
|
||||
@@ -129,17 +127,6 @@ class CameraWatchdog(threading.Thread):
|
||||
camera_capture.start()
|
||||
camera_process['ffmpeg_process'] = ffmpeg_process
|
||||
camera_process['capture_thread'] = camera_capture
|
||||
elif now - camera_process['capture_thread'].current_frame > 5:
|
||||
print(f"No frames received from {name} in 5 seconds. Exiting ffmpeg...")
|
||||
ffmpeg_process = camera_process['ffmpeg_process']
|
||||
ffmpeg_process.terminate()
|
||||
try:
|
||||
print("Waiting for ffmpeg to exit gracefully...")
|
||||
ffmpeg_process.communicate(timeout=30)
|
||||
except sp.TimeoutExpired:
|
||||
print("FFmpeg didnt exit. Force killing...")
|
||||
ffmpeg_process.kill()
|
||||
ffmpeg_process.communicate()
|
||||
|
||||
def main():
|
||||
# connect to mqtt and setup last will
|
||||
|
||||
Reference in New Issue
Block a user