|
@@ -451,7 +451,7 @@ class TestConfig(unittest.TestCase):
|
|
|
runtime_config = frigate_config.runtime_config
|
|
|
assert runtime_config.cameras["back"].detect.max_disappeared == 5 * 5
|
|
|
|
|
|
- def test_motion_frame_height_wont_go_below_180(self):
|
|
|
+ def test_motion_frame_height_wont_go_below_120(self):
|
|
|
|
|
|
config = {
|
|
|
"mqtt": {"host": "mqtt"},
|
|
@@ -475,7 +475,33 @@ class TestConfig(unittest.TestCase):
|
|
|
assert config == frigate_config.dict(exclude_unset=True)
|
|
|
|
|
|
runtime_config = frigate_config.runtime_config
|
|
|
- assert runtime_config.cameras["back"].motion.frame_height >= 180
|
|
|
+ assert runtime_config.cameras["back"].motion.frame_height >= 120
|
|
|
+
|
|
|
+ def test_motion_contour_area_dynamic(self):
|
|
|
+
|
|
|
+ config = {
|
|
|
+ "mqtt": {"host": "mqtt"},
|
|
|
+ "cameras": {
|
|
|
+ "back": {
|
|
|
+ "ffmpeg": {
|
|
|
+ "inputs": [
|
|
|
+ {
|
|
|
+ "path": "rtsp://10.0.0.1:554/video",
|
|
|
+ "roles": ["detect"],
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "height": 1080,
|
|
|
+ "width": 1920,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ }
|
|
|
+
|
|
|
+ frigate_config = FrigateConfig(**config)
|
|
|
+ assert config == frigate_config.dict(exclude_unset=True)
|
|
|
+
|
|
|
+ runtime_config = frigate_config.runtime_config
|
|
|
+ assert round(runtime_config.cameras["back"].motion.contour_area) == 225
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|