mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-09-29 19:36:57 +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
@@ -42,6 +42,7 @@ export type MotionReviewTimelineProps = {
|
||||
events: ReviewSegment[];
|
||||
motion_events: MotionData[];
|
||||
noRecordingRanges?: RecordingSegment[];
|
||||
subOnlyRanges?: Pick<RecordingSegment, "start_time" | "end_time">[];
|
||||
contentRef: RefObject<HTMLDivElement | null>;
|
||||
timelineRef?: RefObject<HTMLDivElement | null>;
|
||||
onHandlebarDraggingChange?: (isDragging: boolean) => void;
|
||||
@@ -76,6 +77,7 @@ export function MotionReviewTimeline({
|
||||
events,
|
||||
motion_events,
|
||||
noRecordingRanges,
|
||||
subOnlyRanges,
|
||||
contentRef,
|
||||
timelineRef,
|
||||
onHandlebarDraggingChange,
|
||||
@@ -122,6 +124,17 @@ export function MotionReviewTimeline({
|
||||
[noRecordingRanges],
|
||||
);
|
||||
|
||||
const getIsSubOnly = useCallback(
|
||||
(time: number): boolean => {
|
||||
if (subOnlyRanges == undefined) return false;
|
||||
|
||||
return subOnlyRanges.some(
|
||||
(range) => time >= range.start_time && time < range.end_time,
|
||||
);
|
||||
},
|
||||
[subOnlyRanges],
|
||||
);
|
||||
|
||||
const segmentTimes = useMemo(() => {
|
||||
const segments = [];
|
||||
let segmentTime = timelineStartAligned;
|
||||
@@ -245,6 +258,7 @@ export function MotionReviewTimeline({
|
||||
motionOnly={motionOnly}
|
||||
getMotionSegmentValue={getMotionSegmentValue}
|
||||
getRecordingAvailability={getRecordingAvailability}
|
||||
getIsSubOnly={getIsSubOnly}
|
||||
alwaysShowMotionLine={alwaysShowMotionLine}
|
||||
/>
|
||||
</ReviewTimeline>
|
||||
|
||||
Reference in New Issue
Block a user