diff --git a/frigate/app.py b/frigate/app.py index b97f580a0..81cf7c89d 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -250,36 +250,42 @@ class FrigateApp: def start_camera_processors(self) -> None: model_shape = (self.config.model.height, self.config.model.width) for name, config in self.config.cameras.items(): - camera_process = mp.Process( - target=track_camera, - name=f"camera_processor:{name}", - args=( - name, - config, - model_shape, - self.config.model.merged_labelmap, - self.detection_queue, - self.detection_out_events[name], - self.detected_frames_queue, - self.camera_metrics[name], - ), - ) - camera_process.daemon = True - self.camera_metrics[name]["process"] = camera_process - camera_process.start() - logger.info(f"Camera processor started for {name}: {camera_process.pid}") + if self.config.cameras[name].enabled: + camera_process = mp.Process( + target=track_camera, + name=f"camera_processor:{name}", + args=( + name, + config, + model_shape, + self.config.model.merged_labelmap, + self.detection_queue, + self.detection_out_events[name], + self.detected_frames_queue, + self.camera_metrics[name], + ), + ) + camera_process.daemon = True + self.camera_metrics[name]["process"] = camera_process + camera_process.start() + logger.info(f"Camera processor started for {name}: {camera_process.pid}") + else: + logger.info(f"Camera processor not started for disabled camera {name}") def start_camera_capture_processes(self) -> None: for name, config in self.config.cameras.items(): - capture_process = mp.Process( - target=capture_camera, - name=f"camera_capture:{name}", - args=(name, config, self.camera_metrics[name]), - ) - capture_process.daemon = True - self.camera_metrics[name]["capture_process"] = capture_process - capture_process.start() - logger.info(f"Capture process started for {name}: {capture_process.pid}") + if self.config.cameras[name].enabled: + capture_process = mp.Process( + target=capture_camera, + name=f"camera_capture:{name}", + args=(name, config, self.camera_metrics[name]), + ) + capture_process.daemon = True + self.camera_metrics[name]["capture_process"] = capture_process + capture_process.start() + logger.info(f"Capture process started for {name}: {capture_process.pid}") + else: + logger.info(f"Capture process not started for disabled camera {name}") def start_event_processor(self) -> None: self.event_processor = EventProcessor( diff --git a/frigate/config.py b/frigate/config.py index 3ed6feacc..9a9465341 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -823,10 +823,6 @@ class FrigateConfig(FrigateBaseModel): {"name": name, **merged_config} ) - if not camera_config.enabled: - config.cameras.pop(name) - continue - # Default max_disappeared configuration max_disappeared = camera_config.detect.fps * 5 if camera_config.detect.max_disappeared is None: