add warning to wizard for high res detect streams

This commit is contained in:
Josh Hawkins 2025-10-22 12:17:10 -05:00
parent d6f5d2b0fa
commit b7ce447cc2
2 changed files with 16 additions and 0 deletions

View File

@ -272,6 +272,7 @@
"title": "Stream Validation",
"videoCodecGood": "Video codec is {{codec}}.",
"audioCodecGood": "Audio codec is {{codec}}.",
"resolutionHigh": "A detect stream resolution of {{resolution}} may cause increased resource usage.",
"noAudioWarning": "No audio detected for this stream, recordings will not have audio.",
"audioCodecRecordError": "The AAC audio codec is required to support audio in recordings.",
"audioCodecRequired": "An audio stream is required to support audio detection.",

View File

@ -500,6 +500,21 @@ 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);
if (minDimension > 720) {
result.push({
type: "warning",
message: t("cameraWizard.step3.issues.resolutionHigh", {
resolution: stream.resolution,
}),
});
}
}
}
// Substream Check
if (
wizardData.brandTemplate == "dahua" &&