mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-08 06:15:43 +03:00
hide resolution if both width and height are zero
This commit is contained in:
parent
53b9b00e10
commit
42f11c71e7
@ -111,9 +111,14 @@ export default function Step2ProbeOrSnapshot({
|
|||||||
s.codec_name?.includes("pcm_alaw"),
|
s.codec_name?.includes("pcm_alaw"),
|
||||||
);
|
);
|
||||||
|
|
||||||
const resolution = videoStream
|
let resolution: string | undefined = undefined;
|
||||||
? `${videoStream.width}x${videoStream.height}`
|
if (videoStream) {
|
||||||
: undefined;
|
const width = Number(videoStream.width || 0);
|
||||||
|
const height = Number(videoStream.height || 0);
|
||||||
|
if (width > 0 && height > 0) {
|
||||||
|
resolution = `${width}x${height}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const fps = videoStream?.avg_frame_rate
|
const fps = videoStream?.avg_frame_rate
|
||||||
? parseFloat(videoStream.avg_frame_rate.split("/")[0]) /
|
? parseFloat(videoStream.avg_frame_rate.split("/")[0]) /
|
||||||
|
|||||||
@ -240,9 +240,14 @@ export default function Step3StreamConfig({
|
|||||||
s.codec_name?.includes("pcm_alaw"),
|
s.codec_name?.includes("pcm_alaw"),
|
||||||
);
|
);
|
||||||
|
|
||||||
const resolution = videoStream
|
let resolution: string | undefined = undefined;
|
||||||
? `${videoStream.width}x${videoStream.height}`
|
if (videoStream) {
|
||||||
: undefined;
|
const width = Number(videoStream.width || 0);
|
||||||
|
const height = Number(videoStream.height || 0);
|
||||||
|
if (width > 0 && height > 0) {
|
||||||
|
resolution = `${width}x${height}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const fps = videoStream?.avg_frame_rate
|
const fps = videoStream?.avg_frame_rate
|
||||||
? parseFloat(videoStream.avg_frame_rate.split("/")[0]) /
|
? parseFloat(videoStream.avg_frame_rate.split("/")[0]) /
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user