浏览代码

backwards compatibility for segment_type

Blake Blackshear 3 年之前
父节点
当前提交
2e494477a6
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      frigate/config.py

+ 8 - 0
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"]