* Don't assume video is 16 / 9

* Don't apply docker constraints for rockchp toolkit
This commit is contained in:
Nicolas Mowen 2025-08-07 11:08:33 -06:00 committed by GitHub
parent f7184c8ed5
commit 5e5beb9837
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ COPY docker/main/requirements-wheels.txt /requirements-wheels.txt
COPY docker/rockchip/requirements-wheels-rk.txt /requirements-wheels-rk.txt
RUN sed -i "/https:\/\//d" /requirements-wheels.txt
RUN sed -i "/onnxruntime/d" /requirements-wheels.txt
RUN pip3 wheel --wheel-dir=/rk-wheels -c /requirements-wheels.txt -r /requirements-wheels-rk.txt
RUN pip3 wheel --wheel-dir=/rk-wheels -r /requirements-wheels-rk.txt
RUN rm -rf /rk-wheels/opencv_python-*
FROM deps AS rk-frigate

View File

@ -17,7 +17,7 @@ export function useVideoDimensions(
});
const videoAspectRatio = useMemo(() => {
return videoResolution.width / videoResolution.height || 16 / 9;
return videoResolution.width / videoResolution.height;
}, [videoResolution]);
const containerAspectRatio = useMemo(() => {
@ -25,7 +25,7 @@ export function useVideoDimensions(
}, [containerWidth, containerHeight]);
const videoDimensions = useMemo(() => {
if (!containerWidth || !containerHeight)
if (!containerWidth || !containerHeight || !videoAspectRatio)
return { width: "100%", height: "100%" };
if (containerAspectRatio > videoAspectRatio) {
const height = containerHeight;