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:
Josh Hawkins
2026-08-16 12:59:03 -06:00
committed by GitHub
parent 6fe7d68fe7
commit 836b0bbb9f
68 changed files with 6813 additions and 602 deletions
@@ -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")}