Skip to content

NVR with realtime local object detection for IP cameras

sync master

Blake Blackshear42f3ee3de59c
diff --cc docs/docs/configuration/hardware_acceleration.md
index 3c16069cff,bb50d9cfeb..90ede4e54b
--- a/docs/docs/configuration/hardware_acceleration.md
+++ b/docs/docs/configuration/hardware_acceleration.md
@@@ -24,9 -40,9 +40,9 @@@ ffmpeg
hwaccel_args: preset-vaapi
```
-**NOTICE**: With some of the processors, like the J4125, the default driver `iHD` doesn't seem to work correctly for hardware acceleration. You may need to change the driver to `i965` by adding the following environment variable `LIBVA_DRIVER_NAME=i965` to your docker-compose file or [in the frigate.yml for HA OS users](advanced.md#environment_vars).
+**NOTICE**: With some of the processors, like the J4125, the default driver `iHD` doesn't seem to work correctly for hardware acceleration. You may need to change the driver to `i965` by adding the following environment variable `LIBVA_DRIVER_NAME=i965` to your docker-compose file or [in the `frigate.yaml` for HA OS users](advanced.md#environment_vars).
- ### Intel-based CPUs (>=10th Generation) via Quicksync
+ #### Via Quicksync (>=10th Generation only)
QSV must be set specifically based on the video encoding of the stream.
diff --cc frigate/comms/dispatcher.py
index 4f3bdd2fd5,447a35cb8f..d7fd2b4d42
--- a/frigate/comms/dispatcher.py
+++ b/frigate/comms/dispatcher.py
@@@ -194,15 -180,19 +194,21 @@@ class Dispatcher
record_settings = self.config.cameras[camera_name].record
if payload == "ON":
- if not self.record_metrics[camera_name]["record_enabled"].value:
+ if not self.config.cameras[camera_name].record.enabled_in_config:
+ logger.error(
+ f"Recordings must be enabled in the config to be turned on via MQTT."
+ )
+ return
+
+ if not record_settings.enabled:
logger.info(f"Turning on recordings for {camera_name}")
record_settings.enabled = True
+ self.record_metrics[camera_name]["record_enabled"].value = True
elif payload == "OFF":
- if record_settings.enabled:
+ if self.record_metrics[camera_name]["record_enabled"].value:
logger.info(f"Turning off recordings for {camera_name}")
record_settings.enabled = False
+ self.record_metrics[camera_name]["record_enabled"].value = False
self.publish(f"{camera_name}/recordings/state", payload, retain=True)
diff --cc frigate/config.py
index dc66e78968,d62c6efdae..56e4dc4965
--- a/frigate/config.py
+++ b/frigate/config.py
@@@ -953,14 -955,8 +956,16 @@@ class FrigateConfig(FrigateBaseModel)
for input in camera_config.ffmpeg.inputs:
input.path = input.path.format(**FRIGATE_ENV_VARS)
+ # ONVIF substitution
+ if camera_config.onvif.user or camera_config.onvif.password:
+ camera_config.onvif.user = camera_config.onvif.user.format(
+ **FRIGATE_ENV_VARS
+ )
+ camera_config.onvif.password = camera_config.onvif.password.format(
+ **FRIGATE_ENV_VARS
+ )
+ # set config recording value
+ camera_config.record.enabled_in_config = camera_config.record.enabled
# Add default filters
object_keys = camera_config.objects.track