mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-08 13:51:01 +02:00
Fixes (#19414)
* Don't assume video is 16 / 9 * Don't apply docker constraints for rockchp toolkit
This commit is contained in:
parent
f7184c8ed5
commit
5e5beb9837
@ -11,7 +11,7 @@ COPY docker/main/requirements-wheels.txt /requirements-wheels.txt
|
|||||||
COPY docker/rockchip/requirements-wheels-rk.txt /requirements-wheels-rk.txt
|
COPY docker/rockchip/requirements-wheels-rk.txt /requirements-wheels-rk.txt
|
||||||
RUN sed -i "/https:\/\//d" /requirements-wheels.txt
|
RUN sed -i "/https:\/\//d" /requirements-wheels.txt
|
||||||
RUN sed -i "/onnxruntime/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-*
|
RUN rm -rf /rk-wheels/opencv_python-*
|
||||||
|
|
||||||
FROM deps AS rk-frigate
|
FROM deps AS rk-frigate
|
||||||
|
@ -17,7 +17,7 @@ export function useVideoDimensions(
|
|||||||
});
|
});
|
||||||
|
|
||||||
const videoAspectRatio = useMemo(() => {
|
const videoAspectRatio = useMemo(() => {
|
||||||
return videoResolution.width / videoResolution.height || 16 / 9;
|
return videoResolution.width / videoResolution.height;
|
||||||
}, [videoResolution]);
|
}, [videoResolution]);
|
||||||
|
|
||||||
const containerAspectRatio = useMemo(() => {
|
const containerAspectRatio = useMemo(() => {
|
||||||
@ -25,7 +25,7 @@ export function useVideoDimensions(
|
|||||||
}, [containerWidth, containerHeight]);
|
}, [containerWidth, containerHeight]);
|
||||||
|
|
||||||
const videoDimensions = useMemo(() => {
|
const videoDimensions = useMemo(() => {
|
||||||
if (!containerWidth || !containerHeight)
|
if (!containerWidth || !containerHeight || !videoAspectRatio)
|
||||||
return { width: "100%", height: "100%" };
|
return { width: "100%", height: "100%" };
|
||||||
if (containerAspectRatio > videoAspectRatio) {
|
if (containerAspectRatio > videoAspectRatio) {
|
||||||
const height = containerHeight;
|
const height = containerHeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user