Support main+sub stream exports (#24193)

* Support multi resolution exports

* Fix decoder text

* Add dropdown and ability to select export stream selection

* Fix for review comments

* Fix mypy

* Cleanup wording
This commit is contained in:
Nicolas Mowen
2026-09-12 07:30:04 -06:00
parent 70ce193e09
commit 82be9fff5e
15 changed files with 1164 additions and 49 deletions
+3 -1
View File
@@ -280,6 +280,7 @@ This configuration will retain recording segments that overlap with alerts and d
In addition to the main recording stream, Frigate can record a second, lower quality stream for each camera. This serves two purposes:
- **Quality selection during playback**: A quality selector (`Auto`, `Original`, or `Low`) appears in History view for cameras with sub stream recording enabled. `Original` and `Low` play only that stream's recordings. Time ranges where the selected stream has no footage are skipped during playback, and the selector notes when the selected stream has no recordings at all in the viewed time range. With `Auto` (the default), playback prefers the original quality and automatically falls back to the low quality stream when the connection cannot keep up, or for time ranges where the original recordings have expired. The selector shows each stream's video codec and audio details beneath the options; footage recorded by older Frigate versions shows no details.
- **Quality selection when exporting**: A `Quality` selector (`Auto`, `Original`, or `Low`) is available for cameras with sub stream recording enabled. See [exporting](#exporting-a-camera-that-records-two-streams) for details on each option.
- **Extended retention**: Sub stream recordings have their own retention settings, fully independent of the main recordings. By giving the low quality recordings a longer retention period, you can keep weeks or months of low quality history using a fraction of the storage, and that history remains playable after the main recordings expire. Playback falls back to the low quality recordings automatically, and the timeline shows a muted treatment for time ranges where only low quality footage remains. Timeline previews are kept for as long as either stream still has recordings, so scrubbing works across the whole retained history.
### Configuring sub stream recording
@@ -416,7 +417,8 @@ As a general rule, features that read recordings prefer the main stream and fall
| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| Recording playback (History and Review) | Both (main preferred with sub fallback by default), or exactly one stream when a quality is selected manually |
| Tracking details and Explore clip playback | Main, falling back to sub where the main recordings have expired |
| Exports and clip downloads | Main; sub is used when no main recordings remain in the range (streams are never mixed in one file) |
| Exports | Both (main preferred with sub fallback by default), or exactly one stream when a quality is selected in the export dialog |
| Clip downloads | Main; sub is used when no main recordings remain in the range (streams are never mixed in one file) |
| Frames grabbed from a recording in History (download snapshot, submit frame to Frigate+) | Main preferred, sub fallback |
| Audio extraction (e.g., transcription) | Main preferred, sub fallback |
| Motion search | Main only |
+30
View File
@@ -7671,6 +7671,14 @@ components:
- type: 'null'
title: New case description
description: Optional description for a newly created export case
stream:
$ref: '#/components/schemas/ExportStreamEnum'
title: Recorded stream to export
description: Which recorded stream every item in the batch is exported
from. 'auto' uses the merged timeline, preferring the main stream
and falling back to the sub stream where main has aged out. 'main'
or 'sub' pins the exports to that stream.
default: auto
type: object
required:
- items
@@ -8608,6 +8616,14 @@ components:
title: Chapter mode
description: Optional chapter metadata to embed in the export. When
omitted, the camera's configured export chapter mode is used.
stream:
$ref: '#/components/schemas/ExportStreamEnum'
title: Recorded stream to export
description: Which recorded stream to export. 'auto' uses the merged
timeline, preferring the main stream and falling back to the sub
stream where main has aged out. 'main' or 'sub' pins the export to
that stream alone.
default: auto
type: object
title: ExportRecordingsBody
ExportRecordingsCustomBody:
@@ -8662,6 +8678,20 @@ components:
required:
- name
title: ExportRenameBody
ExportStreamEnum:
type: string
enum:
- auto
- main
- sub
title: ExportStreamEnum
description: |-
Which recorded stream an export should be built from.
``auto`` keeps the merged timeline: main where it exists, sub filling
the gaps main has already aged out of. Pinning to one stream trades
that coverage for a uniform source, which is always a plain stream
copy since nothing hands off mid-export.
Extension:
type: string
enum: