diff --git a/frigate/config.py b/frigate/config.py index 2f07e7189..b570dbf37 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -463,7 +463,7 @@ class FfmpegConfig(FrigateBaseModel): default_factory=FfmpegOutputArgsConfig, title="FFmpeg output arguments per role.", ) - timeout: float = Field( + healthcheck_interval: float = Field( default=10.0, title="Time in seconds in-between ffmpeg health checks." ) diff --git a/frigate/video.py b/frigate/video.py index 09c80344b..171ef72c0 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -232,6 +232,7 @@ class CameraWatchdog(threading.Thread): self.frame_shape = self.config.frame_shape_yuv self.frame_size = self.frame_shape[0] * self.frame_shape[1] self.stop_event = stop_event + self.sleeptime = self.config.ffmpeg.healthcheck_interval def run(self): self.start_ffmpeg_detect() @@ -251,9 +252,8 @@ class CameraWatchdog(threading.Thread): } ) - sleeptime = self.config.ffmpeg.timeout - time.sleep(sleeptime) - while not self.stop_event.wait(sleeptime): + time.sleep(self.sleeptime) + while not self.stop_event.wait(self.sleeptime): now = datetime.datetime.now().timestamp() if not self.capture_thread.is_alive():