diff --git a/frigate/config.py b/frigate/config.py index aee716a84..0ed749d72 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -518,7 +518,7 @@ class CameraConfig(FrigateBaseModel): def ffmpeg_cmds(self) -> List[Dict[str, List[str]]]: return self._ffmpeg_cmds - def create_ffmpeg_cmds(self) -> List[Dict[str, List[str]]]: + def create_ffmpeg_cmds(self): ffmpeg_cmds = [] for ffmpeg_input in self.ffmpeg.inputs: ffmpeg_cmd = self._get_ffmpeg_cmd(ffmpeg_input) diff --git a/frigate/http.py b/frigate/http.py index 32dcdb130..69c06c41d 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -1,6 +1,7 @@ import base64 from collections import OrderedDict from datetime import datetime, timedelta +import copy import json import glob import logging @@ -321,7 +322,7 @@ def config(): # add in the ffmpeg_cmds for camera_name, camera in current_app.frigate_config.cameras.items(): camera_dict = config["cameras"][camera_name] - camera_dict["ffmpeg_cmds"] = camera.ffmpeg_cmds + camera_dict["ffmpeg_cmds"] = copy.deepcopy(camera.ffmpeg_cmds) for cmd in camera_dict["ffmpeg_cmds"]: cmd["cmd"] = " ".join(cmd["cmd"])