mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-03 13:54:55 +03:00
add detect fps, review, and audio messages
This commit is contained in:
parent
e42b6f75da
commit
78ea005724
@ -1606,5 +1606,16 @@
|
|||||||
"onvif": {
|
"onvif": {
|
||||||
"profileAuto": "Auto",
|
"profileAuto": "Auto",
|
||||||
"profileLoading": "Loading profiles..."
|
"profileLoading": "Loading profiles..."
|
||||||
|
},
|
||||||
|
"configMessages": {
|
||||||
|
"review": {
|
||||||
|
"recordDisabled": "Recording is disabled, review items will not be generated."
|
||||||
|
},
|
||||||
|
"audio": {
|
||||||
|
"noAudioRole": "No streams have the audio role defined. You must enable the audio role for audio detection to function."
|
||||||
|
},
|
||||||
|
"detect": {
|
||||||
|
"fpsGreaterThanFive": "Setting the detect FPS higher than 5 is not recommended."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,21 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const audio: SectionConfigOverrides = {
|
const audio: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/audio_detectors",
|
sectionDocs: "/configuration/audio_detectors",
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
key: "no-audio-role",
|
||||||
|
messageKey: "configMessages.audio.noAudioRole",
|
||||||
|
severity: "warning",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level === "camera" && ctx.fullCameraConfig) {
|
||||||
|
return !ctx.fullCameraConfig.ffmpeg?.inputs?.some((input) =>
|
||||||
|
input.roles?.includes("audio"),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
restartRequired: [],
|
restartRequired: [],
|
||||||
fieldOrder: [
|
fieldOrder: [
|
||||||
"enabled",
|
"enabled",
|
||||||
|
|||||||
@ -3,6 +3,21 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const detect: SectionConfigOverrides = {
|
const detect: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/camera_specific",
|
sectionDocs: "/configuration/camera_specific",
|
||||||
|
fieldMessages: [
|
||||||
|
{
|
||||||
|
key: "fps-greater-than-five",
|
||||||
|
field: "fps",
|
||||||
|
messageKey: "configMessages.detect.fpsGreaterThanFive",
|
||||||
|
severity: "info",
|
||||||
|
position: "after",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level !== "camera" || !ctx.fullCameraConfig) return false;
|
||||||
|
const detectFps = ctx.formData?.fps as number | undefined;
|
||||||
|
const streamFps = ctx.fullCameraConfig.detect?.fps;
|
||||||
|
return detectFps != null && streamFps != null && detectFps > 5;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
fieldOrder: [
|
fieldOrder: [
|
||||||
"enabled",
|
"enabled",
|
||||||
"width",
|
"width",
|
||||||
|
|||||||
@ -3,6 +3,19 @@ import type { SectionConfigOverrides } from "./types";
|
|||||||
const review: SectionConfigOverrides = {
|
const review: SectionConfigOverrides = {
|
||||||
base: {
|
base: {
|
||||||
sectionDocs: "/configuration/review",
|
sectionDocs: "/configuration/review",
|
||||||
|
messages: [
|
||||||
|
{
|
||||||
|
key: "record-disabled",
|
||||||
|
messageKey: "configMessages.review.recordDisabled",
|
||||||
|
severity: "warning",
|
||||||
|
condition: (ctx) => {
|
||||||
|
if (ctx.level === "camera" && ctx.fullCameraConfig) {
|
||||||
|
return ctx.fullCameraConfig.record.enabled === false;
|
||||||
|
}
|
||||||
|
return ctx.fullConfig.record?.enabled === false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
fieldDocs: {
|
fieldDocs: {
|
||||||
"alerts.labels": "/configuration/review/#alerts-and-detections",
|
"alerts.labels": "/configuration/review/#alerts-and-detections",
|
||||||
"detections.labels": "/configuration/review/#alerts-and-detections",
|
"detections.labels": "/configuration/review/#alerts-and-detections",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user