move width/height/fps under detect and make required

also resizes the output from ffmpeg to specified size
This commit is contained in:
Blake Blackshear
2021-08-14 14:18:35 -05:00
parent 0ccf543ec1
commit f3a1c1de0a
7 changed files with 175 additions and 95 deletions

View File

@@ -15,13 +15,16 @@ export default function CameraMasks({ camera, url }) {
const cameraConfig = config.cameras[camera];
const {
width,
height,
motion: { mask: motionMask },
objects: { filters: objectFilters },
zones,
} = cameraConfig;
const {
width,
height,
} = cameraConfig.detect;
const [{ width: scaledWidth }] = useResizeObserver(imageRef);
const imageScale = scaledWidth / width;