mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-07 15:22:48 +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:
@@ -193,6 +193,25 @@ export function CameraInputsField(props: FieldProps) {
|
||||
}
|
||||
}, [fieldPathId.path, inputs, onChange]);
|
||||
|
||||
const getRolesUsedByOtherInputs = useCallback(
|
||||
(index: number): string[] => {
|
||||
const used = new Set<string>();
|
||||
inputs.forEach((input, currentIndex) => {
|
||||
if (currentIndex === index || !Array.isArray(input.roles)) {
|
||||
return;
|
||||
}
|
||||
|
||||
input.roles.forEach((role) => {
|
||||
if (typeof role === "string") {
|
||||
used.add(role);
|
||||
}
|
||||
});
|
||||
});
|
||||
return [...used];
|
||||
},
|
||||
[inputs],
|
||||
);
|
||||
|
||||
const handleFieldValueChange = useCallback(
|
||||
(index: number, fieldName: string, nextValue: unknown) => {
|
||||
const nextInputs = cloneDeep(inputs);
|
||||
@@ -466,7 +485,16 @@ export function CameraInputsField(props: FieldProps) {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="w-full">{renderField(index, "roles")}</div>
|
||||
<div className="w-full">
|
||||
{renderField(index, "roles", {
|
||||
extraUiSchema: {
|
||||
"ui:options": {
|
||||
rolesUsedByOtherInputs:
|
||||
getRolesUsedByOtherInputs(index),
|
||||
},
|
||||
},
|
||||
})}
|
||||
</div>
|
||||
|
||||
{renderField(index, "input_args")}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user