Add ability to control chapters set on MP4 Export (#23310)
CI / AMD64 Build (push) Has been cancelled
CI / ARM Build (push) Has been cancelled
CI / Jetson Jetpack 6 (push) Has been cancelled
CI / AMD64 Extra Build (push) Has been cancelled
CI / ARM Extra Build (push) Has been cancelled
CI / Assemble and push default build (push) Has been cancelled
CI / Synaptics Build (push) Has been cancelled

This commit is contained in:
Nicolas Mowen
2026-05-25 13:06:16 -05:00
committed by GitHub
parent fa07109a85
commit 28e3e1ec74
3 changed files with 128 additions and 1 deletions
@@ -4,6 +4,7 @@ from pydantic import BaseModel, Field
from pydantic.json_schema import SkipJsonSchema
from frigate.record.export import (
ChaptersEnum,
PlaybackFactorEnum,
PlaybackSourceEnum,
)
@@ -18,3 +19,11 @@ class ExportRecordingsBody(BaseModel):
)
name: Optional[str] = Field(title="Friendly name", default=None, max_length=256)
image_path: Union[str, SkipJsonSchema[None]] = None
chapters: Optional[ChaptersEnum] = Field(
default=None,
title="Chapter mode",
description=(
"Optional chapter metadata to embed in the export. When omitted, "
"no chapter track is added."
),
)
+2
View File
@@ -31,6 +31,7 @@ from frigate.api.defs.tags import Tags
from frigate.const import CLIPS_DIR, EXPORT_DIR
from frigate.models import Export, Previews, Recordings
from frigate.record.export import (
ChaptersEnum,
PlaybackFactorEnum,
PlaybackSourceEnum,
RecordingExporter,
@@ -161,6 +162,7 @@ def export_recording(
if playback_source in PlaybackSourceEnum.__members__.values()
else PlaybackSourceEnum.recordings
),
chapters=ChaptersEnum(body.chapters) if body.chapters else None,
)
exporter.start()
return JSONResponse(