mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-12-03 10:47:06 +03:00
Add sub stream recording with adaptive quality playback (#24009)
* add sub stream recording with adaptive quality playback Optionally record a second, lower bitrate stream alongside the main recording stream via a `record_sub` input role and `record.sub` config block, with its own retention windows. Recordings rows now carry the stream type plus the media details needed to serve both streams from one manifest: video codec, audio presence, audio codec and rate, and a record-time keyframe index. Playback resolves coverage across both streams and merges them into a single VOD sequence, falling back to a discontinuity manifest with per-clip init segments when the media signatures differ. The player exposes a quality selector, and an auto governor picks the stream from stall time, bandwidth, codec support, and the save-data hint. * fix tests and i18n
This commit is contained in:
committed by
Nicolas Mowen
parent
f7c5500ea8
commit
1498231eb9
@@ -30,6 +30,7 @@ type PresetField =
|
||||
| "hwaccel_args"
|
||||
| "input_args"
|
||||
| "output_args.record"
|
||||
| "output_args.record_sub"
|
||||
| "output_args.detect";
|
||||
|
||||
const getPresetOptions = (
|
||||
@@ -49,7 +50,10 @@ const getPresetOptions = (
|
||||
}
|
||||
|
||||
if (field.startsWith("output_args.")) {
|
||||
const key = field.split(".")[1] as "record" | "detect";
|
||||
const key =
|
||||
field === "output_args.record_sub"
|
||||
? "record"
|
||||
: (field.split(".")[1] as "record" | "detect");
|
||||
return data.output_args?.[key] ?? [];
|
||||
}
|
||||
|
||||
@@ -127,6 +131,7 @@ export function FfmpegArgsWidget(props: WidgetProps) {
|
||||
const globalFieldPath =
|
||||
(options?.ffmpegGlobalFieldPath as string | undefined) ?? presetField;
|
||||
const allowInherit = options?.allowInherit === true;
|
||||
const unsetLabelKey = options?.unsetLabelKey as string | undefined;
|
||||
const hideDescription = options?.hideDescription === true;
|
||||
const useSplitLayout = options?.splitLayout !== false;
|
||||
|
||||
@@ -287,6 +292,12 @@ export function FfmpegArgsWidget(props: WidgetProps) {
|
||||
: "ffmpeg.output_args.record.description";
|
||||
}
|
||||
|
||||
if (presetField === "output_args.record_sub") {
|
||||
return isInputScoped
|
||||
? "ffmpeg.inputs.output_args.record_sub.description"
|
||||
: "ffmpeg.output_args.record_sub.description";
|
||||
}
|
||||
|
||||
if (presetField === "output_args.detect") {
|
||||
return isInputScoped
|
||||
? "ffmpeg.inputs.output_args.detect.description"
|
||||
@@ -345,7 +356,9 @@ export function FfmpegArgsWidget(props: WidgetProps) {
|
||||
}
|
||||
/>
|
||||
<label htmlFor={`${id}-inherit`} className="cursor-pointer text-sm">
|
||||
{t("configForm.ffmpegArgs.inherit", { ns: "views/settings" })}
|
||||
{t(unsetLabelKey ?? "configForm.ffmpegArgs.inherit", {
|
||||
ns: "views/settings",
|
||||
})}
|
||||
</label>
|
||||
</div>
|
||||
) : (
|
||||
@@ -361,7 +374,9 @@ export function FfmpegArgsWidget(props: WidgetProps) {
|
||||
}
|
||||
/>
|
||||
<label htmlFor={`${id}-none`} className="cursor-pointer text-sm">
|
||||
{t("configForm.ffmpegArgs.none", { ns: "views/settings" })}
|
||||
{t(unsetLabelKey ?? "configForm.ffmpegArgs.none", {
|
||||
ns: "views/settings",
|
||||
})}
|
||||
</label>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user