mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 05:24:11 +03:00
Improve camera wizard stream validation (#20620)
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
This commit is contained in:
parent
2387dccc19
commit
b38f830b3b
@ -272,6 +272,8 @@
|
|||||||
"title": "Stream Validation",
|
"title": "Stream Validation",
|
||||||
"videoCodecGood": "Video codec is {{codec}}.",
|
"videoCodecGood": "Video codec is {{codec}}.",
|
||||||
"audioCodecGood": "Audio codec is {{codec}}.",
|
"audioCodecGood": "Audio codec is {{codec}}.",
|
||||||
|
"resolutionHigh": "A resolution of {{resolution}} may cause increased resource usage.",
|
||||||
|
"resolutionLow": "A resolution of {{resolution}} may be too low for reliable detection of small objects.",
|
||||||
"noAudioWarning": "No audio detected for this stream, recordings will not have audio.",
|
"noAudioWarning": "No audio detected for this stream, recordings will not have audio.",
|
||||||
"audioCodecRecordError": "The AAC audio codec is required to support audio in recordings.",
|
"audioCodecRecordError": "The AAC audio codec is required to support audio in recordings.",
|
||||||
"audioCodecRequired": "An audio stream is required to support audio detection.",
|
"audioCodecRequired": "An audio stream is required to support audio detection.",
|
||||||
|
|||||||
@ -500,6 +500,29 @@ function StreamIssues({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stream.roles.includes("detect") && stream.resolution) {
|
||||||
|
const [width, height] = stream.resolution.split("x").map(Number);
|
||||||
|
if (!isNaN(width) && !isNaN(height) && width > 0 && height > 0) {
|
||||||
|
const minDimension = Math.min(width, height);
|
||||||
|
const maxDimension = Math.max(width, height);
|
||||||
|
if (minDimension > 1080) {
|
||||||
|
result.push({
|
||||||
|
type: "warning",
|
||||||
|
message: t("cameraWizard.step3.issues.resolutionHigh", {
|
||||||
|
resolution: stream.resolution,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
} else if (maxDimension < 640) {
|
||||||
|
result.push({
|
||||||
|
type: "error",
|
||||||
|
message: t("cameraWizard.step3.issues.resolutionLow", {
|
||||||
|
resolution: stream.resolution,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Substream Check
|
// Substream Check
|
||||||
if (
|
if (
|
||||||
wizardData.brandTemplate == "dahua" &&
|
wizardData.brandTemplate == "dahua" &&
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user