mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
configurable ffmpeg timeout
This commit is contained in:
parent
9e531b0b5b
commit
df85b65fe8
@ -463,6 +463,9 @@ class FfmpegConfig(FrigateBaseModel):
|
||||
default_factory=FfmpegOutputArgsConfig,
|
||||
title="FFmpeg output arguments per role.",
|
||||
)
|
||||
timeout: float = Field(
|
||||
default=10.0, title="Time in seconds in-between ffmpeg health checks."
|
||||
)
|
||||
|
||||
|
||||
class CameraRoleEnum(str, Enum):
|
||||
|
||||
@ -251,8 +251,9 @@ class CameraWatchdog(threading.Thread):
|
||||
}
|
||||
)
|
||||
|
||||
time.sleep(10)
|
||||
while not self.stop_event.wait(10):
|
||||
sleeptime = self.config.ffmpeg.timeout
|
||||
time.sleep(sleeptime)
|
||||
while not self.stop_event.wait(sleeptime):
|
||||
now = datetime.datetime.now().timestamp()
|
||||
|
||||
if not self.capture_thread.is_alive():
|
||||
|
||||
Loading…
Reference in New Issue
Block a user