From 2e494477a61c770d142041222e70f5d018b942a6 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 16 Oct 2021 10:36:13 -0500 Subject: [PATCH] backwards compatibility for segment_type --- frigate/config.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frigate/config.py b/frigate/config.py index 922cc24bc..b28a66ff4 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -563,6 +563,14 @@ class CameraConfig(FrigateBaseModel): if isinstance(self.ffmpeg.output_args.record, list) else self.ffmpeg.output_args.record.split(" ") ) + + # backwards compatibility check for segment_format change from mp4 to ts + record_args = ( + " ".join(record_args) + .replace("-segment_format mp4", "-segment_format ts") + .split(" ") + ) + ffmpeg_output_args = ( record_args + [f"{os.path.join(CACHE_DIR, self.name)}-%Y%m%d%H%M%S.ts"]