diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index 68248241ce..165569638d 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -1936,7 +1936,8 @@ "inputDimensionsNotDetectResolution": "Model input width and height are the input dimensions of the object detection model, not your camera's detect resolution. They should match the dimensions of the model you're using — typically a square size like 320x320 or 640x640." }, "ffmpeg": { - "hwaccelManualNotRecommended": "Manual hardware acceleration arguments are not recommended. Unless a specific requirement exists, select the preset that matches your hardware." + "hwaccelManualNotRecommended": "Manual hardware acceleration arguments are not recommended. Unless a specific requirement exists, select the preset that matches your hardware.", + "inputsMissingGo2rtcStream": "An input below points at a go2rtc restream that no longer exists. Select an existing restream or enter the camera's URL manually, otherwise this camera will fail to connect." }, "objects": { "genaiNoDescriptionsProvider": "You must configure a GenAI provider with the 'descriptions' role for descriptions to be generated." diff --git a/web/src/components/config-form/section-configs/ffmpeg.ts b/web/src/components/config-form/section-configs/ffmpeg.ts index 6f9cffad9e..62117d1b4b 100644 --- a/web/src/components/config-form/section-configs/ffmpeg.ts +++ b/web/src/components/config-form/section-configs/ffmpeg.ts @@ -1,3 +1,4 @@ +import { parseRestreamStreamName } from "../theme/fields/streamSource"; import type { SectionConfigOverrides } from "./types"; const arrayAsTextWidget = { @@ -42,6 +43,29 @@ const ffmpeg: SectionConfigOverrides = { return false; }, }, + { + key: "inputs-missing-go2rtc-stream", + field: "inputs", + position: "before", + messageKey: "configMessages.ffmpeg.inputsMissingGo2rtcStream", + severity: "warning", + docLink: "/configuration/restream", + condition: (ctx) => { + const streams = ctx.fullConfig?.go2rtc?.streams; + const inputs = ctx.formData?.inputs; + if (!Array.isArray(inputs)) { + return false; + } + + return inputs.some((input) => { + const path = (input as { path?: unknown } | null)?.path; + const streamName = parseRestreamStreamName( + typeof path === "string" ? path : undefined, + ); + return streamName !== undefined && !(streamName in (streams ?? {})); + }); + }, + }, ], fieldDocs: { hwaccel_args: "/configuration/ffmpeg_presets#hwaccel-presets",