NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Merge remote-tracking branch 'origin/master' into dev
Blake Blackshearea131e1663cb
diff --cc docker/main/rootfs/usr/local/go2rtc/create_config.pyindex 2b0fe3c925,dfd8b722ca..77cfc1b880--- a/docker/main/rootfs/usr/local/go2rtc/create_config.py+++ b/docker/main/rootfs/usr/local/go2rtc/create_config.py@@@ -14,8 -14,13 +14,11 @@@ from frigate.const importLIBAVFORMAT_VERSION_MAJOR,)from frigate.ffmpeg_presets import parse_preset_hardware_acceleration_encode-from frigate.util.config import find_config_file+from frigate.util.config import find_config_file, resolve_ffmpeg_path- from frigate.util.services import is_restricted_go2rtc_source+ from frigate.util.services import (+ is_go2rtc_arbitrary_exec_allowed,+ is_restricted_go2rtc_source,+ )sys.path.remove("/opt/frigate")diff --cc docs/docs/configuration/masks.mdindex e497de2c19,0fcf366eda..64710cb07c--- a/docs/docs/configuration/masks.md+++ b/docs/docs/configuration/masks.md@@@ -3,10 -3,8 +3,12 @@@ id: masktitle: Masks---+import ConfigTabs from "@site/src/components/ConfigTabs";+import TabItem from "@theme/TabItem";+import NavPath from "@site/src/components/NavPath";++ Frigate has two kinds of masks: motion masks and object filter masks. Both are narrow tools for fine-tuning, **not for hiding an area from Frigate**. Masks should be used sparingly; in most cases where users reach for one, a [zone](zones.md) with `required_zones` is the right tool instead. See [Which tool do I need?](#which-tool-do-i-need) and [Common mistakes](#common-mistakes) below if you're new to Frigate's mask behavior.+## Motion masksMotion masks are used to prevent unwanted types of motion from triggering detection. Try watching the Debug feed (Settings --> Debug) with `Motion Boxes` enabled to see what may be regularly detected as motion. For example, you want to mask out your timestamp, the sky, rooftops, etc. Keep in mind that this mask only prevents motion from being detected and does not prevent objects from being detected if object detection was started due to motion in unmasked areas. Motion is also used during object tracking to refine the object detection area in the next frame. _Over-masking will make it more difficult for objects to be tracked._@@@ -21,15 -19,26 +23,24 @@@ Object filter masks can be used to filt- ## Creating masks+ ## Which tool do I need?++ | What you're trying to do | Recommended tool | How it works |+ | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+ | Don't get alerts or recordings for activity in an area (e.g., the sidewalk in front of your house) | A [zone](zones.md) combined with `review.alerts.required_zones` (and/or `review.detections.required_zones`) | Frigate keeps detecting and tracking activity in the area, but a review item is only created once the bottom-center of an object's bounding box enters a required zone. |+ | Stop a stubborn false positive at a specific fixed spot (e.g., a tree base that keeps being detected as a person) | An **object filter mask** for that object type | Any detection of that object type whose bounding-box bottom-center lands inside the mask is treated as a false positive and discarded. |+ | Ignore motion in an area that obviously isn't an object of interest (e.g., the camera timestamp, sky, flags, treetops swaying) | A **motion mask** | Motion inside the mask is ignored when deciding whether to run object detection. Objects can still be detected in a motion masked area if motion elsewhere in the frame triggers detection. |+ | Stop tracking an object type altogether on this camera (e.g., you never care about cats) | Remove the object from the camera's [`objects.track`](objects.md) list | Frigate skips this object type entirely on this camera, regardless of where it appears. |++ ## Using the mask creator-To create a poly mask:+<ConfigTabs>+<TabItem value="ui">++Navigate to <NavPath path="Settings > Camera configuration > Masks / Zones" /> and select a camera. Use the mask editor to draw motion masks and object filter masks directly on the camera feed. Each mask can be given a friendly name and toggled on or off.-1. Visit the Web UI-2. Click/tap the gear icon and open "Settings"-3. Select "Mask / zone editor"-4. At the top right, select the camera you wish to create a mask or zone for-5. Click the plus icon under the type of mask or zone you would like to create-6. Click on the camera's latest image to create the points for a masked area. Click the first point again to close the polygon.-7. When you've finished creating your mask, press Save.+</TabItem>+<TabItem value="yaml">Your config file will be updated with the relative coordinates of the mask/zone:diff --cc docs/docs/troubleshooting/faqs.mdindex 8fee36b83b,bba4a1c187..744f64602a--- a/docs/docs/troubleshooting/faqs.md+++ b/docs/docs/troubleshooting/faqs.md@@@ -111,16 -111,18 +111,32 @@@ TCP ensures that all data packets arrivYou can still configure Frigate to use UDP by using ffmpeg input args or the preset `preset-rtsp-udp`. See the [ffmpeg presets](/configuration/ffmpeg_presets) documentation.+### Frigate is slow to start up with a "probing detect stream" message in the logs++When `detect.width` and `detect.height` are not set, Frigate probes each camera's detect stream on startup (and when saving the config) to auto-detect its resolution. For RTSP streams Frigate probes with ffprobe and automatically retries over TCP if UDP doesn't respond, with a 5 second timeout per attempt. A camera that cannot be reached over either transport will add up to ~10 seconds to startup before Frigate falls through with default dimensions, which may show up as width `0` and height `0` in Camera Probe Info under System Metrics.++To skip the probe entirely and make startup instant, set `detect.width` and `detect.height` explicitly in your camera config:++```yaml+cameras:+ my_camera:+ detect:+ width: 1280+ height: 720+```+++ ### Why does Frigate keep creating new events for my parked car?++ Stationary tracking is designed to _prevent_ this — a parked car should stay one tracked object and not generate new events. If you're getting repeated events for the same car, it's likely that Frigate is losing the tracked object and re-detecting it as a new one.++ Open one of the events in Explore → **Tracking Details**. If the detection scores are low (< 70% or so), the model isn't confident the parked car is a car. This is common with the free [COCO-trained](https://cocodataset.org/#explore) object detection models on steep/top-down angles, partially occluded cars, foliage, or low-light footage. When detections fall below `min_score` for too many frames the tracker loses the object, and the next confident frame creates a brand new one.++ What helps:++ - **Improve the view** — even a small angle change that gets more of the car visible could lift scores enough to stabilize tracking.+ - **Use a more accurate model** — switching from `mobiledet` to `yolov9`, or stepping up to a larger variant like `yolov9-s` over `yolov9-t`, can help (at the cost of inference time, and still on the COCO dataset). The biggest gains usually come from fine-tuning a model on images from your own cameras so it learns your specific scene. [Frigate+](https://frigate.video/plus) is a paid option that does this - models are trained on security-camera footage and can be fine-tuned on images you submit from your own setup.+ - **Don't set `detect -> stationary -> max_frames` for `car`** — it artificially ends tracking and forces re-detection as a new object. See [Stationary Objects](../configuration/stationary_objects.md).+ - **Restrict alerts to the areas you care about** with `required_zones` — see [Zones](../configuration/zones.md#restricting-alerts-and-detections-to-specific-zones). Make sure those zones use the default `loitering_time: 0` unless you specifically want the review item to stay open until the car leaves.+ - **Filter impossible locations** with [object filter masks](../configuration/masks.md#object-filter-masks) if cars are being detected on rooftops, treetops, etc.++ See [Object Filters](../configuration/object_filters.md) for more on tuning `min_score` and `threshold` — note that raising them too high will make this exact problem worse.diff --cc docs/static/frigate-api.yamlindex 0ee41a0feb,f1a00fe61b..af3a019b4c--- a/docs/static/frigate-api.yaml+++ b/docs/static/frigate-api.yaml@@@ -7383,92 -4738,6 +7383,99 @@@ componentsrequired:- filetitle: Body_register_face_faces__name__register_post+ CameraSetBody:+ properties:+ value:+ type: string+ title: Value+ description: The value to set for the feature+ type: object+ required:+ - value+ title: CameraSetBody++ ChaptersEnum:++ type: string++ enum:++ - none++ - recording_segments++ - review_items++ title: ChaptersEnum+ ChatCompletionRequest:+ properties:+ messages:+ items:+ $ref: '#/components/schemas/ChatMessage'+ type: array+ title: Messages+ description: List of messages in the conversation+ max_tool_iterations:+ type: integer+ maximum: 10.0+ minimum: 1.0+ title: Max Tool Iterations+ description: 'Maximum number of tool call iterations (default: 5)'+ default: 5+ stream:+ type: boolean+ title: Stream+ description: If true, stream the final assistant response in the body+ as newline-delimited JSON.+ default: false+ enable_thinking:+ anyOf:+ - type: boolean+ - type: 'null'+ title: Enable Thinking+ description: Per-request thinking toggle. None means use the provider+ default. Ignored by providers that do not expose a per-request+ thinking switch.+ type: object+ required:+ - messages+ title: ChatCompletionRequest+ description: Request for chat completion with tool calling.+ ChatMessage:+ properties:+ role:+ type: string+ title: Role+ description: "Message role: 'user', 'assistant', 'system', or 'tool'"+ content:+ anyOf:+ - {}+ - type: 'null'+ title: Content+ description: Message content. Usually a string, but may be a+ multimodal content list (e.g. text + image_url) or null for+ assistant turns that only request tool calls.+ tool_call_id:+ anyOf:+ - type: string+ - type: 'null'+ title: Tool Call Id+ description: For tool messages, the ID of the tool call+ name:+ anyOf:+ - type: string+ - type: 'null'+ title: Name+ description: For tool messages, the tool name+ tool_calls:+ anyOf:+ - items:+ type: object+ type: array+ - type: 'null'+ title: Tool Calls+ description: For assistant messages replayed from prior turns, the+ OpenAI-format tool calls the model previously requested. Replaying+ these verbatim keeps the conversation prefix byte-for-byte identical+ so the model server's prompt cache hits on follow-up turns.+ type: object+ required:+ - role+ title: ChatMessage+ description: A single message in a chat conversation.DayReview:properties:day:@@@ -8099,32 -5076,12 +8106,39 @@@description: Model representing a single export.ExportRecordingsBody:properties:- playback:- $ref: "#/components/schemas/PlaybackFactorEnum"- title: Playback factor- default: realtimesource:- $ref: "#/components/schemas/PlaybackSourceEnum"+ $ref: '#/components/schemas/PlaybackSourceEnum'+ title: Playback source+ default: recordings+ name:+ anyOf:+ - type: string+ maxLength: 256+ - type: 'null'+ title: Friendly name+ image_path:+ type: string+ title: Image Path+ export_case_id:+ anyOf:+ - type: string+ maxLength: 30+ - type: 'null'+ title: Export case ID+ description: ID of the export case to assign this export to++ chapters:++ anyOf:++ - $ref: '#/components/schemas/ChaptersEnum'++ - type: 'null'++ title: Chapter mode++ description: Optional chapter metadata to embed in the export. When++ omitted, the camera's configured export chapter mode is used.+ type: object+ title: ExportRecordingsBody+ ExportRecordingsCustomBody:+ properties:+ source:+ $ref: '#/components/schemas/PlaybackSourceEnum'title: Playback sourcedefault: recordingsname:diff --cc frigate/api/defs/request/export_recordings_body.pyindex 96ecccaa4c,aef5aa9520..b035203a24--- a/frigate/api/defs/request/export_recordings_body.py+++ b/frigate/api/defs/request/export_recordings_body.py@@@ -3,7 -3,11 +3,10 @@@ from typing import Optional, Uniofrom pydantic import BaseModel, Fieldfrom pydantic.json_schema import SkipJsonSchema- from frigate.record.export import PlaybackSourceEnum+ from frigate.record.export import (+ ChaptersEnum,- PlaybackFactorEnum,+ PlaybackSourceEnum,+ )class ExportRecordingsBody(BaseModel):@@@ -12,38 -19,11 +15,46 @@@)name: Optional[str] = Field(title="Friendly name", default=None, max_length=256)image_path: Union[str, SkipJsonSchema[None]] = None+ export_case_id: Optional[str] = Field(+ default=None,+ title="Export case ID",+ max_length=30,+ description="ID of the export case to assign this export to",+ )+ 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."++ "the camera's configured export chapter mode is used."+ ),+ )+++class ExportRecordingsCustomBody(BaseModel):+ source: PlaybackSourceEnum = Field(+ default=PlaybackSourceEnum.recordings, title="Playback source"+ )+ name: str = Field(title="Friendly name", default=None, max_length=256)+ image_path: Union[str, SkipJsonSchema[None]] = None+ export_case_id: Optional[str] = Field(+ default=None,+ title="Export case ID",+ max_length=30,+ description="ID of the export case to assign this export to",+ )+ ffmpeg_input_args: Optional[str] = Field(+ default=None,+ title="FFmpeg input arguments",+ description="Custom FFmpeg input arguments. If not provided, defaults to timelapse input args.",+ )+ ffmpeg_output_args: Optional[str] = Field(+ default=None,+ title="FFmpeg output arguments",+ description="Custom FFmpeg output arguments. If not provided, defaults to timelapse output args.",+ )+ cpu_fallback: bool = Field(+ default=False,+ title="CPU Fallback",+ description="If true, retry export without hardware acceleration if the initial export fails.",+ )diff --cc frigate/api/export.pyindex 09ded84124,8f916eaf17..1e92374c0d--- a/frigate/api/export.py+++ b/frigate/api/export.py@@@ -56,20 -29,11 +56,21 @@@ from frigate.api.defs.response.export_rfrom frigate.api.defs.response.generic_response import GenericResponsefrom frigate.api.defs.tags import Tagsfrom frigate.const import CLIPS_DIR, EXPORT_DIR-from frigate.models import Export, Previews, Recordings+from frigate.jobs.export import (+ ExportJob,+ ExportQueueFullError,+ available_export_queue_slots,+ cancel_queued_export_jobs_for_case,+ get_export_job,+ list_active_export_jobs,+ start_export_job,+)+from frigate.models import Export, ExportCase, Previews, Recordingsfrom frigate.record.export import (- PlaybackFactorEnum,+ DEFAULT_TIME_LAPSE_FFMPEG_ARGS,++ ChaptersEnum,PlaybackSourceEnum,- RecordingExporter,+ validate_ffmpeg_args,)from frigate.util.time import is_current_hour@@@ -78,209 -42,6 +79,220 @@@ logger = logging.getLogger(__name__router = APIRouter(tags=[Tags.export])+def _generate_id(length: int = 12) -> str:+ return "".join(random.choices(string.ascii_lowercase + string.digits, k=length))+++def _generate_export_id(camera_name: str) -> str:+ return f"{camera_name}_{_generate_id(6)}"+++def _create_export_case_record(+ name: str,+ description: Optional[str],+) -> ExportCase:+ now = datetime.datetime.fromtimestamp(time.time())+ return ExportCase.create(+ id=_generate_id(),+ name=name,+ description=description,+ created_at=now,+ updated_at=now,+ )+++def _validate_camera_name(request: Request, camera_name: str) -> Optional[JSONResponse]:+ if camera_name and request.app.frigate_config.cameras.get(camera_name):+ return None++ return JSONResponse(+ content={"success": False, "message": f"{camera_name} is not a valid camera."},+ status_code=404,+ )+++def _validate_export_case(export_case_id: Optional[str]) -> Optional[JSONResponse]:+ if export_case_id is None:+ return None++ try:+ ExportCase.get(ExportCase.id == export_case_id)+ except DoesNotExist:+ return JSONResponse(+ content={"success": False, "message": "Export case not found"},+ status_code=404,+ )++ return None+++def _sanitize_existing_image(+ image_path: Optional[str],+) -> tuple[Optional[str], Optional[JSONResponse]]:++ # sanitize_filepath normalizes "\" to "/" but leaves ".." intact, so a path++ # like "clips\..\..\etc/passwd" passes the CLIPS_DIR prefix check yet still++ # escapes the directory once resolved. A valid snapshot path never uses "..".++ if image_path and ".." in image_path:++ return None, JSONResponse(++ content={"success": False, "message": "Invalid image path"},++ status_code=400,++ )+++ existing_image = sanitize_filepath(image_path) if image_path else None++ if existing_image and not existing_image.startswith(CLIPS_DIR):+ return None, JSONResponse(+ content={"success": False, "message": "Invalid image path"},+ status_code=400,+ )++ return existing_image, None+++def _validate_export_source(+ camera_name: str,+ start_time: float,+ end_time: float,+ playback_source: PlaybackSourceEnum,+) -> Optional[str]:+ if playback_source == PlaybackSourceEnum.recordings:+ recordings_count = (+ Recordings.select()+ .where(+ Recordings.start_time.between(start_time, end_time)+ | Recordings.end_time.between(start_time, end_time)+ | (+ (start_time > Recordings.start_time)+ & (end_time < Recordings.end_time)+ )+ )+ .where(Recordings.camera == camera_name)+ .count()+ )++ if recordings_count <= 0:+ return "No recordings found for time range"++ return None++ previews_count = (+ Previews.select()+ .where(+ Previews.start_time.between(start_time, end_time)+ | Previews.end_time.between(start_time, end_time)+ | ((start_time > Previews.start_time) & (end_time < Previews.end_time))+ )+ .where(Previews.camera == camera_name)+ .count()+ )++ if not is_current_hour(start_time) and previews_count <= 0:+ return "No previews found for time range"++ return None+++def _get_item_recording_export_errors(+ request: Request,+ items: list[BatchExportItem],+) -> dict[int, str]:+ """Return {item_index: error message} for items with invalid state.++ Checks camera configuration and recording presence per item. Groups by+ camera and issues one query per unique camera covering that camera's+ full requested range, then checks each item's range against the returned+ rows in Python. This avoids O(N) DB round-trips on large batches.+ """+ configured_cameras = request.app.frigate_config.cameras+ errors: dict[int, str] = {}++ # Validate camera configuration first+ item_ranges_by_camera: dict[str, list[tuple[int, float, float]]] = {}+ for index, item in enumerate(items):+ if not configured_cameras.get(item.camera):+ errors[index] = f"{item.camera} is not a valid camera."+ continue+ item_ranges_by_camera.setdefault(item.camera, []).append(+ (index, item.start_time, item.end_time)+ )++ if not item_ranges_by_camera:+ return errors++ # For each camera, fetch recordings that cover the union of ranges+ for camera_name, indexed_ranges in item_ranges_by_camera.items():+ min_start = min(r[1] for r in indexed_ranges)+ max_end = max(r[2] for r in indexed_ranges)++ recording_ranges = list(+ Recordings.select(Recordings.start_time, Recordings.end_time)+ .where(+ Recordings.camera == camera_name,+ Recordings.start_time.between(min_start, max_end)+ | Recordings.end_time.between(min_start, max_end)+ | (+ (min_start > Recordings.start_time)+ & (max_end < Recordings.end_time)+ ),+ )+ .iterator()+ )++ for index, start_time, end_time in indexed_ranges:+ has_recording = any(+ (+ start_time <= rec.start_time <= end_time+ or start_time <= rec.end_time <= end_time+ or (start_time > rec.start_time and end_time < rec.end_time)+ )+ for rec in recording_ranges+ )+ if not has_recording:+ errors[index] = "No recordings found for time range"++ return errors+++def _build_export_job(+ camera_name: str,+ start_time: float,+ end_time: float,+ friendly_name: Optional[str],+ existing_image: Optional[str],+ playback_source: PlaybackSourceEnum,+ export_case_id: Optional[str],+ ffmpeg_input_args: Optional[str] = None,+ ffmpeg_output_args: Optional[str] = None,+ cpu_fallback: bool = False,++ chapters: Optional[ChaptersEnum] = None,+) -> ExportJob:+ return ExportJob(+ id=_generate_export_id(camera_name),+ camera=camera_name,+ name=friendly_name,+ image_path=existing_image,+ export_case_id=export_case_id,+ request_start_time=int(start_time),+ request_end_time=int(end_time),+ playback_source=playback_source.value,+ ffmpeg_input_args=ffmpeg_input_args,+ ffmpeg_output_args=ffmpeg_output_args,+ cpu_fallback=cpu_fallback,++ chapters=chapters,+ )+++def _export_case_to_dict(case: ExportCase) -> dict[str, object]:+ case_dict = model_to_dict(case)++ for field in ("created_at", "updated_at"):+ value = case_dict.get(field)+ if isinstance(value, datetime.datetime):+ case_dict[field] = value.timestamp()++ return case_dict++@router.get("/exports",response_model=ExportsResponse,@@@ -291,483 -52,15 +303,486 @@@)def get_exports(allowed_cameras: List[str] = Depends(get_allowed_cameras_for_filter),+ export_case_id: Optional[str] = None,+ cameras: Optional[str] = Query(default="all"),+ start_date: Optional[float] = None,+ end_date: Optional[float] = None,+):+ query = Export.select().where(Export.camera << allowed_cameras)++ if export_case_id is not None:+ if export_case_id == "unassigned":+ query = query.where(Export.export_case.is_null(True))+ else:+ query = query.where(Export.export_case == export_case_id)++ if cameras and cameras != "all":+ requested = set(cameras.split(","))+ filtered_cameras = list(requested.intersection(allowed_cameras))+ if not filtered_cameras:+ return JSONResponse(content=[])+ query = query.where(Export.camera << filtered_cameras)++ if start_date is not None:+ query = query.where(Export.date >= start_date)++ if end_date is not None:+ query = query.where(Export.date <= end_date)++ exports = query.order_by(Export.date.desc()).dicts().iterator()+ return JSONResponse(content=[e for e in exports])+++ "/cases",+ response_model=ExportCasesResponse,+ dependencies=[Depends(allow_any_authenticated())],+ summary="Get export cases",+ description="Gets all export cases from the database.",+)+def get_export_cases():+ cases = ExportCase.select().order_by(ExportCase.created_at.desc()).iterator()+ return JSONResponse(content=[_export_case_to_dict(case) for case in cases])+++ "/cases",+ response_model=ExportCaseModel,+ dependencies=[Depends(require_role(["admin"]))],+ summary="Create export case",+ description="Creates a new export case.",+)+def create_export_case(body: ExportCaseCreateBody):+ case = _create_export_case_record(body.name, body.description)+ return JSONResponse(content=_export_case_to_dict(case))+++ "/cases/{case_id}",+ response_model=ExportCaseModel,+ dependencies=[Depends(allow_any_authenticated())],+ summary="Get a single export case",+ description="Gets a specific export case by ID.",+)+def get_export_case(case_id: str):+ try:+ case = ExportCase.get(ExportCase.id == case_id)+ return JSONResponse(content=_export_case_to_dict(case))+ except DoesNotExist:+ return JSONResponse(+ content={"success": False, "message": "Export case not found"},+ status_code=404,+ )+++_ZIP_STREAM_CHUNK_SIZE = 1024 * 1024 # 1 MiB+++class _StreamingZipBuffer:+ """File-like sink for ZipFile that exposes written bytes via drain().++ ZipFile writes synchronously into this buffer; the generator drains the+ queue between writes so StreamingResponse can yield bytes without+ materializing the whole archive in memory.+ """++ def __init__(self) -> None:+ self._queue: deque[bytes] = deque()+ self._offset = 0++ def write(self, data: bytes) -> int:+ if data:+ self._queue.append(bytes(data))+ self._offset += len(data)+ return len(data)++ def tell(self) -> int:+ return self._offset++ def flush(self) -> None:+ pass++ def drain(self) -> Iterator[bytes]:+ while self._queue:+ yield self._queue.popleft()+++def _unique_archive_name(export: Export, used: set[str]) -> str:+ base = sanitize_filename(export.name) if export.name else None+ if not base:+ base = f"{export.camera}_{int(export.date)}"++ candidate = f"{base}.mp4"+ counter = 1+ while candidate in used:+ candidate = f"{base}_{counter}.mp4"+ counter += 1++ used.add(candidate)+ return candidate+++def _stream_case_archive(exports: List[Export]) -> Iterator[bytes]:+ """Yield bytes of a zip archive built from the given exports' mp4 files."""+ buffer = _StreamingZipBuffer()+ used_names: set[str] = set()++ # ZIP_STORED: mp4 is already compressed, recompressing wastes CPU for ~0% size win.+ with zipfile.ZipFile(+ buffer,+ mode="w",+ compression=zipfile.ZIP_STORED,+ allowZip64=True,+ ) as archive:+ for export in exports:+ source = Path(export.video_path)+ if not source.exists():+ continue++ arcname = _unique_archive_name(export, used_names)++ with (+ archive.open(arcname, mode="w", force_zip64=True) as entry,+ source.open("rb") as src,+ ):+ while True:+ chunk = src.read(_ZIP_STREAM_CHUNK_SIZE)+ if not chunk:+ break++ entry.write(chunk)+ yield from buffer.drain()++ yield from buffer.drain()++ yield from buffer.drain()+++ "/cases/{case_id}/download",+ dependencies=[Depends(allow_any_authenticated())],+ summary="Download export case as zip",+ description="Streams a zip archive containing every completed export's mp4 for the given case.",+)+def download_export_case(+ case_id: str,+ allowed_cameras: List[str] = Depends(get_allowed_cameras_for_filter),):- exports = (+ try:+ case = ExportCase.get(ExportCase.id == case_id)+ except DoesNotExist:+ return JSONResponse(+ content={"success": False, "message": "Export case not found"},+ status_code=404,+ )++ exports = list(Export.select()- .where(Export.camera << allowed_cameras)- .order_by(Export.date.desc())- .dicts()- .iterator()+ .where(+ Export.export_case == case_id,+ ~Export.in_progress,+ Export.camera << allowed_cameras,+ )+ .order_by(Export.date.asc())+ )++ if not exports:+ return JSONResponse(+ content={"success": False, "message": "No exports available to download."},+ status_code=404,+ )++ archive_base = sanitize_filename(case.name) if case.name else ""+ if not archive_base:+ archive_base = case_id++ return StreamingResponse(+ _stream_case_archive(exports),+ media_type="application/zip",+ headers={+ "Content-Disposition": f'attachment; filename="{archive_base}.zip"',+ },+ )+++ "/cases/{case_id}",+ response_model=GenericResponse,+ dependencies=[Depends(require_role(["admin"]))],+ summary="Update export case",+ description="Updates an existing export case.",+)+def update_export_case(case_id: str, body: ExportCaseUpdateBody):+ try:+ case = ExportCase.get(ExportCase.id == case_id)+ except DoesNotExist:+ return JSONResponse(+ content={"success": False, "message": "Export case not found"},+ status_code=404,+ )++ if body.name is not None:+ case.name = body.name+ if body.description is not None:+ case.description = body.description++ case.updated_at = datetime.datetime.fromtimestamp(time.time())++ case.save()++ return JSONResponse(+ content={"success": True, "message": "Successfully updated export case."}+ )+++ "/cases/{case_id}",+ response_model=GenericResponse,+ dependencies=[Depends(require_role(["admin"]))],+ summary="Delete export case",+ description="""Deletes an export case.\n Exports that reference this case will have their export_case set to null.\n """,+)+def delete_export_case(case_id: str, request: Request, delete_exports: bool = False):+ try:+ case = ExportCase.get(ExportCase.id == case_id)+ except DoesNotExist:+ return JSONResponse(+ content={"success": False, "message": "Export case not found"},+ status_code=404,+ )++ if delete_exports:+ cancel_queued_export_jobs_for_case(request.app.frigate_config, case_id)++ exports = list(Export.select().where(Export.export_case == case_id))+ for export in exports:+ Path(export.video_path).unlink(missing_ok=True)+ if export.thumb_path:+ Path(export.thumb_path).unlink(missing_ok=True)+ export.delete_instance()+ else:+ # Unassign exports from this case but keep the exports themselves+ Export.update(export_case=None).where(Export.export_case == case_id).execute()++ case.delete_instance()++ return JSONResponse(+ content={"success": True, "message": "Successfully deleted export case."}+ )+++ "/jobs/export",+ response_model=ExportJobsResponse,+ dependencies=[Depends(allow_any_authenticated())],+ summary="Get active export jobs",+ description="Gets queued and running export jobs.",+)+def get_active_export_jobs(+ request: Request,+ allowed_cameras: List[str] = Depends(get_allowed_cameras_for_filter),+):+ jobs = list_active_export_jobs(request.app.frigate_config)+ return JSONResponse(+ content=[job.to_dict() for job in jobs if job.camera in allowed_cameras]+ )+++ "/jobs/export/{export_id}",+ response_model=ExportJobModel,+ dependencies=[Depends(allow_any_authenticated())],+ summary="Get export job status",+ description="Gets queued, running, or completed status for a specific export job.",+)+async def get_export_job_status(export_id: str, request: Request):+ job = get_export_job(request.app.frigate_config, export_id)+ if job is None:+ return JSONResponse(+ content={"success": False, "message": "Job not found"},+ status_code=404,+ )++ await require_camera_access(job.camera, request=request)++ return JSONResponse(content=job.to_dict())+++ "/exports/batch",+ response_model=BatchExportResponse,+ dependencies=[Depends(allow_any_authenticated())],+ summary="Start recording export batch",+ description=(+ "Starts recording exports for a batch of items, each with its own camera "+ "and time range, and assigns them to a single export case. Attaching to "+ "an existing case is temporarily admin-only until case-level ACLs exist."+ ),+)+def export_recordings_batch(+ request: Request,+ body: BatchExportBody,+ allowed_cameras: List[str] = Depends(get_allowed_cameras_for_filter),+ current_user: dict = Depends(get_current_user),+):+ if isinstance(current_user, JSONResponse):+ return current_user++ # Stopgap: attaching to an existing case remains admin-only until+ # case-level ACLs exist. Non-admins can still create a fresh case+ # as a side effect of queueing items they already have camera access to.+ if body.export_case_id is not None and current_user["role"] != "admin":+ return JSONResponse(+ content={+ "success": False,+ "message": "Only admins can attach exports to an existing case.",+ },+ status_code=403,+ )++ case_validation_error = _validate_export_case(body.export_case_id)+ if case_validation_error is not None:+ return case_validation_error++ # Fail-closed camera access: any item referencing an inaccessible+ # camera rejects the whole request. The UI's review list is already+ # filtered by camera access, so reaching this branch implies a stale+ # session or a crafted request — reject loudly rather than silently+ # dropping items.+ allowed_camera_set = set(allowed_cameras)+ for item in body.items:+ if item.camera not in allowed_camera_set:+ return JSONResponse(+ content={+ "success": False,+ "message": f"Cannot export from {item.camera}: access denied",+ },+ status_code=403,+ )++ # Sanitize each item's image_path up front. A bad path in any item+ # kills the whole request, consistent with single-export behavior.+ sanitized_images: list[Optional[str]] = []+ for item in body.items:+ existing_image, image_validation_error = _sanitize_existing_image(+ item.image_path+ )+ if image_validation_error is not None:+ return image_validation_error+ sanitized_images.append(existing_image)++ item_errors = _get_item_recording_export_errors(request, body.items)++ queueable_indexes = [+ index for index in range(len(body.items)) if index not in item_errors+ ]++ if not queueable_indexes:+ return JSONResponse(+ content={+ "success": False,+ "message": (+ "No exports could be queued: no recordings found for the "+ "requested ranges."+ ),+ },+ status_code=400,+ )++ # Preflight admission: reject the whole batch if we can't fit every+ # queueable item. Prevents partial batches where the tail fails with+ # "queue full" after we've already created a case.+ if available_export_queue_slots(request.app.frigate_config) < len(+ queueable_indexes+ ):+ return JSONResponse(+ content={+ "success": False,+ "message": "Export queue is full. Try again once current exports finish.",+ },+ status_code=503,+ )++ export_case = None+ export_case_id = body.export_case_id+ if export_case_id is None and body.new_case_name:+ export_case = _create_export_case_record(+ body.new_case_name,+ body.new_case_description,+ )+ export_case_id = export_case.id++ export_ids: list[str] = []+ results: list[dict[str, Optional[str] | bool | int]] = []+ for index, item in enumerate(body.items):+ if index in item_errors:+ results.append(+ {+ "camera": item.camera,+ "export_id": None,+ "success": False,+ "status": None,+ "error": item_errors[index],+ "item_index": index,+ "client_item_id": item.client_item_id,+ }+ )+ continue++ export_job = _build_export_job(+ item.camera,+ item.start_time,+ item.end_time,+ item.friendly_name,+ sanitized_images[index],+ PlaybackSourceEnum.recordings,+ export_case_id,++ chapters=request.app.frigate_config.cameras[++ item.camera++ ].record.export.chapters,+ )+ try:+ start_export_job(request.app.frigate_config, export_job)+ except Exception:+ logger.exception("Failed to queue export job %s", export_job.id)+ results.append(+ {+ "camera": item.camera,+ "export_id": None,+ "success": False,+ "status": None,+ "error": "Failed to queue export job",+ "item_index": index,+ "client_item_id": item.client_item_id,+ }+ )+ continue++ export_ids.append(export_job.id)+ results.append(+ {+ "camera": item.camera,+ "export_id": export_job.id,+ "success": True,+ "status": "queued",+ "error": None,+ "item_index": index,+ "client_item_id": item.client_item_id,+ }+ )++ if export_case is not None and not export_ids:+ export_case.delete_instance()+ export_case_id = None++ return JSONResponse(+ content={+ "export_case_id": export_case_id,+ "export_ids": export_ids,+ "results": results,+ },+ status_code=202,)- return JSONResponse(content=[e for e in exports])@router.post(@@@ -786,72 -79,109 +801,81 @@@ def export_recordingstart_time: float,end_time: float,body: ExportRecordingsBody,+ current_user: dict = Depends(get_current_user),):- if not camera_name or not request.app.frigate_config.cameras.get(camera_name):- return JSONResponse(- content=(- {"success": False, "message": f"{camera_name} is not a valid camera."}- ),- status_code=404,- )+ if isinstance(current_user, JSONResponse):+ return current_user++ camera_validation_error = _validate_camera_name(request, camera_name)+ if camera_validation_error is not None:+ return camera_validation_error- playback_factor = body.playbackplayback_source = body.sourcefriendly_name = body.name+ existing_image, image_validation_error = _sanitize_existing_image(body.image_path)+ if image_validation_error is not None:+ return image_validation_error- # sanitize_filepath normalizes "\" to "/" but leaves ".." intact, so a path- # like "clips\..\..\etc/passwd" passes the CLIPS_DIR prefix check yet still- # escapes the directory once resolved. A valid snapshot path never uses "..".- if body.image_path and ".." in body.image_path:- return JSONResponse(- content=({"success": False, "message": "Invalid image path"}),- status_code=400,- )-- existing_image = sanitize_filepath(body.image_path) if body.image_path else None+ export_case_id = body.export_case_id+ # a chapters value in the request body overrides the camera's export config+ camera_config = request.app.frigate_config.cameras[camera_name]+ chapters = (+ body.chapters+ if body.chapters is not None+ else camera_config.record.export.chapters+ )+- # Ensure that existing_image is a valid path- if existing_image and not existing_image.startswith(CLIPS_DIR):+ # Attaching to an existing case requires admin. Single-export for+ # cameras the user can access is otherwise non-admin; we only gate+ # the case-attachment side effect.+ if export_case_id is not None and current_user["role"] != "admin":return JSONResponse(- content=({"success": False, "message": "Invalid image path"}),- status_code=400,+ content={+ "success": False,+ "message": "Only admins can attach exports to an existing case.",+ },+ status_code=403,)- if playback_source == "recordings":- recordings_count = (- Recordings.select()- .where(- Recordings.start_time.between(start_time, end_time)- | Recordings.end_time.between(start_time, end_time)- | (- (start_time > Recordings.start_time)- & (end_time < Recordings.end_time)- )- )- .where(Recordings.camera == camera_name)- .count()- )+ case_validation_error = _validate_export_case(export_case_id)+ if case_validation_error is not None:+ return case_validation_error- if recordings_count <= 0:- return JSONResponse(- content=(- {"success": False, "message": "No recordings found for time range"}- ),- status_code=400,- )- else:- previews_count = (- Previews.select()- .where(- Previews.start_time.between(start_time, end_time)- | Previews.end_time.between(start_time, end_time)- | ((start_time > Previews.start_time) & (end_time < Previews.end_time))- )- .where(Previews.camera == camera_name)- .count()+ source_error = _validate_export_source(+ camera_name,+ start_time,+ end_time,+ playback_source,+ )+ if source_error is not None:+ return JSONResponse(+ content={"success": False, "message": source_error},+ status_code=400,)- if not is_current_hour(start_time) and previews_count <= 0:- return JSONResponse(- content=(- {"success": False, "message": "No previews found for time range"}- ),- status_code=400,- )-- export_id = f"{camera_name}_{''.join(random.choices(string.ascii_lowercase + string.digits, k=6))}"- exporter = RecordingExporter(- request.app.frigate_config,- export_id,+ export_job = _build_export_job(camera_name,+ start_time,+ end_time,friendly_name,existing_image,- int(start_time),- int(end_time),- (- PlaybackFactorEnum[playback_factor]- if playback_factor in PlaybackFactorEnum.__members__.values()- else PlaybackFactorEnum.realtime- ),- (- PlaybackSourceEnum[playback_source]- if playback_source in PlaybackSourceEnum.__members__.values()- else PlaybackSourceEnum.recordings- ),+ playback_source,+ export_case_id,+ chapters=chapters,)- exporter.start()+ try:+ start_export_job(request.app.frigate_config, export_job)+ except ExportQueueFullError:+ logger.warning("Export queue is full; rejecting %s", export_job.id)+ return JSONResponse(+ content={+ "success": False,+ "message": "Export queue is full. Try again once current exports finish.",+ },+ status_code=503,+ )+return JSONResponse(content=({diff --cc frigate/comms/ws.pyindex 5b555999e3,9af231da30..f3d3234420--- a/frigate/comms/ws.py+++ b/frigate/comms/ws.py@@@ -101,325 -106,29 +108,344 @@@ def _check_ws_authorizationif "admin" in roles:return True- # Non-admin: only viewer topics allowed- return topic in _WS_VIEWER_TOPICS+ # Read-only topics any authenticated user can send+ if topic in _WS_VIEWER_TOPICS:+ return True++ # Camera-scoped command like "<camera>/ptz": allow when the user's role(s)+ # grant access to that camera.+ parts = topic.split("/")+ if (+ roles_config is not None+ and len(parts) == 2+ and parts[1] in _WS_CAMERA_COMMAND_TOPICS+ ):+ allowed: set[str] = set()+ # No role header maps to the default viewer role (e.g. proxy-only setups)+ for role in roles or ["viewer"]:+ allowed.update(+ User.get_allowed_cameras(role, roles_config, camera_names or set())+ )+ return parts[0] in allowed++ return False+# ---- Outbound filtering ---------------------------------------------------+#+# Every WebSocket broadcast is classified into one of a small set of scopes,+# then materialized per recipient. Connections with restricted roles only see+# data for cameras they are authorized to access; admin and full-access roles+# behave as today.++# Topics that are safe to broadcast to every authenticated client.+_WS_GLOBAL_OUTBOUND_TOPICS = frozenset(+ {+ "model_state",+ "embeddings_reindex_progress",+ "audio_transcription_state",+ "profile/state",+ "notifications/state",+ "notification_test",+ }+)++# Topics that restricted roles must never receive. Birdseye composites span+# all cameras, so the existing JSMPEG policy already restricts birdseye access+# to unrestricted roles; the layout broadcast follows the same rule.+_WS_UNRESTRICTED_ONLY_TOPICS = frozenset(+ {+ "birdseye_layout",+ }+)++# Topics whose payload (parsed as JSON) names a single owning camera at the+# given key path. Used to scope events, reviews, triggers, etc.+_WS_PAYLOAD_CAMERA_TOPICS: dict[str, tuple[str, ...]] = {+ "events": ("after", "camera"),+ "reviews": ("after", "camera"),+ "tracked_object_update": ("camera",),+ "triggers": ("camera",),+ "camera_monitoring": ("camera",),+}++# Topics whose payload is a dict keyed by camera name; filter keys per+# recipient.+_WS_RESHAPE_BY_CAMERA_KEY_TOPICS = frozenset(+ {+ "camera_activity",+ "audio_detections",+ }+)++# Topics whose payload is a dict keyed by job_type, where each entry may+# contain a "camera" or "source_camera" field, or a nested ``results.jobs``+# list of per-camera sub-jobs (export broadcasts).+_WS_RESHAPE_JOB_STATE_TOPICS = frozenset(+ {+ "job_state",+ }+)++# Topics whose payload mixes global aggregates with a ``cameras`` sub-dict+# keyed by camera name. Aggregates and detector data stay; per-camera entries+# are filtered.+_WS_RESHAPE_STATS_TOPICS = frozenset(+ {+ "stats",+ }+)+++def _collect_zone_names(config: FrigateConfig) -> set[str]:+ """Return the set of all zone names defined across cameras."""+ names: set[str] = set()+ for camera in config.cameras.values():+ zones = getattr(camera, "zones", None) or {}+ names.update(zones.keys())+ return names+++def _parse_json_payload(payload: Any) -> Any:+ """Return payload parsed as JSON if it is a string, else as-is."""+ if isinstance(payload, str):+ try:+ return json.loads(payload)+ except (ValueError, TypeError):+ return None+ return payload+++def _scope_job_entry_to_allowed(entry: Any, allowed: set[str]) -> dict[str, Any] | None:+ """Filter a single job_state entry to the recipient's allowed cameras.++ Returns the (possibly reshaped) entry, or None to drop it. Four shapes+ are handled:++ * Top-level ``camera`` or ``source_camera`` (motion_search, vlm_watch,+ export sub-job dicts): drop the entry if not allowed.+ * Nested ``results.jobs`` list of per-camera sub-jobs (the aggregated+ export broadcast): filter the list; drop the entry if nothing remains.+ * Nested ``results.camera`` or ``results.source_camera`` (debug_replay,+ which puts replay-specific fields inside ``results``): drop the entry+ if not allowed.+ * No camera anywhere (e.g. ``media_sync``): treat as global and keep.+ """+ if not isinstance(entry, dict):+ return None++ cam = entry.get("camera") or entry.get("source_camera")++ if cam is None:+ results = entry.get("results")+ if isinstance(results, dict):+ sub_jobs = results.get("jobs")+ if isinstance(sub_jobs, list):+ filtered_jobs = [+ j+ for j in sub_jobs+ if isinstance(j, dict)+ and (j.get("camera") or j.get("source_camera")) in allowed+ ]+ if not filtered_jobs:+ return None+ reshaped = dict(entry)+ reshaped["results"] = dict(results)+ reshaped["results"]["jobs"] = filtered_jobs+ return reshaped++ cam = results.get("camera") or results.get("source_camera")++ if cam is not None:+ return entry if cam in allowed else None++ return entry+++def _extract_payload_camera(payload: Any, path: tuple[str, ...]) -> str | None:+ """Walk the dotted path through a (possibly JSON-encoded) payload."""+ cur = _parse_json_payload(payload)+ for key in path:+ if not isinstance(cur, dict):+ return None+ cur = cur.get(key)+ return cur if isinstance(cur, str) else None+++def _classify_outbound(+ topic: str, all_cameras: set[str], all_zones: set[str]+) -> tuple[str, Any]:+ """Classify an outbound topic into (kind, extra).++ kind values:+ - "global" : send to every authenticated client+ - "drop" : send to nobody (fail-closed for unknowns)+ - "unrestricted_only" : send only to admin/full-access roles+ - "camera" : extra is the owning camera name+ - "payload_camera" : extra is the JSON key path to the camera name+ - "reshape_by_camera_key"+ - "reshape_job_state"+ - "reshape_stats"+ """+ if topic in _WS_GLOBAL_OUTBOUND_TOPICS:+ return ("global", None)+ if topic in _WS_UNRESTRICTED_ONLY_TOPICS:+ return ("unrestricted_only", None)+ if topic in _WS_RESHAPE_BY_CAMERA_KEY_TOPICS:+ return ("reshape_by_camera_key", None)+ if topic in _WS_RESHAPE_JOB_STATE_TOPICS:+ return ("reshape_job_state", None)+ if topic in _WS_RESHAPE_STATS_TOPICS:+ return ("reshape_stats", None)+ if topic in _WS_PAYLOAD_CAMERA_TOPICS:+ return ("payload_camera", _WS_PAYLOAD_CAMERA_TOPICS[topic])++ # Topic-prefix based: first segment names the owning camera or zone.+ first = topic.split("/", 1)[0]+ if first in all_cameras:+ return ("camera", first)+ if first in all_zones:+ # Zone aggregates span cameras; restricted users see nothing here.+ return ("unrestricted_only", None)++ return ("drop", None)+++def _ws_role_header(ws: Any) -> str | None:+ """Return the HTTP_REMOTE_ROLE header value, if any."""+ environ = getattr(ws, "environ", None)+ if not environ:+ return None+ value = environ.get("HTTP_REMOTE_ROLE")+ return value if isinstance(value, str) else None+++def _ws_valid_roles(ws: Any, config: FrigateConfig) -> list[str]:+ """Return the list of recognized roles for this connection."""+ header = _ws_role_header(ws)+ if not header:+ return []+ roles = [r.strip() for r in header.split(config.proxy.separator) if r.strip()]+ return [r for r in roles if r in config.auth.roles]+++def _ws_is_unrestricted(ws: Any, config: FrigateConfig) -> bool:+ """True when the connection has unrestricted camera access.++ Mirrors the policy in ``frigate.output.ws_auth``: admin or any role with+ an empty allow-list grants full access.+ """+ roles = _ws_valid_roles(ws, config)+ if not roles:+ return False+ roles_dict = config.auth.roles+ return any(r == "admin" or not roles_dict.get(r) for r in roles)+++def _ws_allowed_cameras(ws: Any, config: FrigateConfig) -> set[str]:+ """Return the union of cameras this connection may access across its roles."""+ roles = _ws_valid_roles(ws, config)+ if not roles:+ return set()+ all_cameras = set(config.cameras.keys())+ allowed: set[str] = set()+ for role in roles:+ if role == "admin" or not config.auth.roles.get(role):+ return all_cameras+ allowed.update(User.get_allowed_cameras(role, config.auth.roles, all_cameras))+ return allowed+++def _wrap_envelope(topic: str, inner_payload: Any) -> str:+ """Re-serialize a (topic, payload) message after payload reshaping.++ Frigate's wire format keeps payloads as JSON-encoded strings inside the+ outer envelope, mirroring what producers send today.+ """+ return json.dumps({"topic": topic, "payload": json.dumps(inner_payload)})+++def _materialize_for_ws(+ ws: Any,+ topic: str,+ full_message: str,+ scope: tuple[str, Any],+ parsed_payload: Any,+ config: FrigateConfig,+) -> str | None:+ """Return the JSON string to deliver to ``ws``, or None to skip it."""+ kind, extra = scope+ has_role = _ws_role_header(ws) is not None++ if kind == "drop":+ return None++ if kind == "global":+ # Globals still require an authenticated connection. Missing role+ # falls back to viewer semantics (matching the inbound rule).+ return full_message++ # Beyond globals, an authenticated role header is required (fail-closed).+ if not has_role:+ return None++ if kind == "unrestricted_only":+ return full_message if _ws_is_unrestricted(ws, config) else None++ if kind == "camera":+ return full_message if ws_has_camera_access(ws, extra, config) else None++ if kind == "payload_camera":+ camera = _extract_payload_camera(parsed_payload, extra)+ if camera is None:+ return None+ return full_message if ws_has_camera_access(ws, camera, config) else None++ if kind == "reshape_by_camera_key":+ if _ws_is_unrestricted(ws, config):+ return full_message+ if not isinstance(parsed_payload, dict):+ return None+ allowed = _ws_allowed_cameras(ws, config)+ filtered = {cam: data for cam, data in parsed_payload.items() if cam in allowed}+ if not filtered:+ return None+ return _wrap_envelope(topic, filtered)++ if kind == "reshape_job_state":+ if _ws_is_unrestricted(ws, config):+ return full_message+ if not isinstance(parsed_payload, dict):+ return None+ allowed = _ws_allowed_cameras(ws, config)+ filtered_jobs: dict[str, Any] = {}+ for job_type, job_payload in parsed_payload.items():+ scoped = _scope_job_entry_to_allowed(job_payload, allowed)+ if scoped is not None:+ filtered_jobs[job_type] = scoped+ if not filtered_jobs:+ return None+ return _wrap_envelope(topic, filtered_jobs)++ if kind == "reshape_stats":+ if _ws_is_unrestricted(ws, config):+ return full_message+ if not isinstance(parsed_payload, dict):+ return None+ allowed = _ws_allowed_cameras(ws, config)+ cameras_block = parsed_payload.get("cameras")+ if isinstance(cameras_block, dict):+ filtered_cameras = {+ name: data for name, data in cameras_block.items() if name in allowed+ }+ reshaped = dict(parsed_payload)+ reshaped["cameras"] = filtered_cameras+ return _wrap_envelope(topic, reshaped)+ return full_message++ return None++class WebSocket(WebSocket_): # type: ignore[misc]def unhandled_error(self, error: Any) -> None:"""diff --cc frigate/config/camera/record.pyindex 1f7afc6ceb,4c8f873568..441a585375--- a/frigate/config/camera/record.py+++ b/frigate/config/camera/record.py@@@ -86,18 -67,19 +87,28 @@@ class RecordPreviewConfig(FrigateBaseMo)+ class ChaptersEnum(str, Enum):+ none = "none"+ recording_segments = "recording_segments"++ review_items = "review_items"++class RecordExportConfig(FrigateBaseModel):- timelapse_args: str = Field(- default=DEFAULT_TIME_LAPSE_FFMPEG_ARGS, title="Timelapse Args"+ hwaccel_args: Union[str, list[str]] = Field(+ default="auto",+ title="Export hwaccel args",+ description="Hardware acceleration args to use for export/transcode operations.",+ )+ max_concurrent: int = Field(+ default=3,+ ge=1,+ title="Maximum concurrent exports",+ description="Maximum number of export jobs to process at the same time.",)+ chapters: ChaptersEnum = Field(- default=ChaptersEnum.none,++ default=ChaptersEnum.review_items,+ title="Chapter metadata to embed in exported recordings",+ )class RecordConfig(FrigateBaseModel):diff --cc frigate/jobs/export.pyindex a74b91713e,0000000000..63bd4e7596mode 100644,000000..100644--- a/frigate/jobs/export.py+++ b/frigate/jobs/export.py@@@ -1,504 -1,0 +1,507 @@@+"""Export job management with queued background execution."""++import logging+import os+import threading+import time+from dataclasses import dataclass+from pathlib import Path+from queue import Full, Queue+from typing import Any, Callable, Optional++from peewee import DoesNotExist++from frigate.comms.inter_process import InterProcessRequestor+from frigate.config import FrigateConfig++from frigate.config.camera.record import ChaptersEnum+from frigate.const import UPDATE_JOB_STATE+from frigate.jobs.job import Job+from frigate.models import Export+from frigate.record.export import PlaybackSourceEnum, RecordingExporter+from frigate.types import JobStatusTypesEnum++logger = logging.getLogger(__name__)++# Maximum number of jobs that can sit in the queue waiting to run.+# Prevents a runaway client from unbounded memory growth.+MAX_QUEUED_EXPORT_JOBS = 100++# Minimum interval between progress broadcasts. FFmpeg can emit progress+# events many times per second; we coalesce them so the WebSocket isn't+# flooded with redundant updates.+PROGRESS_BROADCAST_MIN_INTERVAL = 1.0++# Delay before removing a completed job from the in-memory map. Gives the+# frontend a chance to receive the final state via WebSocket before SWR+# polling takes over.+COMPLETED_JOB_CLEANUP_DELAY = 5.0+++class ExportQueueFullError(RuntimeError):+ """Raised when the export queue is at capacity."""+++@dataclass+class ExportJob(Job):+ """Job state for export operations."""++ job_type: str = "export"+ camera: str = ""+ name: Optional[str] = None+ image_path: Optional[str] = None+ export_case_id: Optional[str] = None+ request_start_time: float = 0.0+ request_end_time: float = 0.0+ playback_source: str = PlaybackSourceEnum.recordings.value+ ffmpeg_input_args: Optional[str] = None+ ffmpeg_output_args: Optional[str] = None+ cpu_fallback: bool = False++ chapters: Optional[ChaptersEnum] = None+ current_step: str = "queued"+ progress_percent: float = 0.0++ def to_dict(self) -> dict[str, Any]:+ """Convert to dictionary for API responses.++ Only exposes fields that are part of the public ExportJobModel schema.+ Internal execution details (image_path, ffmpeg args, cpu_fallback) are+ intentionally omitted so they don't leak through the API.+ """+ return {+ "id": self.id,+ "job_type": self.job_type,+ "status": self.status,+ "camera": self.camera,+ "name": self.name,+ "export_case_id": self.export_case_id,+ "request_start_time": self.request_start_time,+ "request_end_time": self.request_end_time,+ "start_time": self.start_time,+ "end_time": self.end_time,+ "error_message": self.error_message,+ "results": self.results,+ "current_step": self.current_step,+ "progress_percent": self.progress_percent,+ }+++class ExportQueueWorker(threading.Thread):+ """Worker that executes queued exports."""++ def __init__(self, manager: "ExportJobManager", worker_index: int) -> None:+ super().__init__(+ daemon=True,+ name=f"export_queue_worker_{worker_index}",+ )+ self.manager = manager++ def run(self) -> None:+ while True:+ job = self.manager.queue.get()++ try:+ self.manager.run_job(job)+ except Exception:+ logger.exception(+ "Export queue worker failed while processing %s", job.id+ )+ finally:+ self.manager.queue.task_done()+++class JobStatePublisher:+ """Publishes a single job state payload to the dispatcher.++ Each call opens a short-lived :py:class:`InterProcessRequestor`, sends+ the payload, and closes the socket. The short-lived design avoids+ REQ/REP state corruption that would arise from sharing a single REQ+ socket across the API thread and worker threads (REQ sockets must+ strictly alternate send/recv).++ With the 1s broadcast throttle in place, socket creation overhead is+ negligible. The class also exists so tests can substitute a no-op+ instance instead of stubbing ZMQ — see ``BaseTestHttp.setUp``.+ """++ def publish(self, payload: dict[str, Any]) -> None:+ try:+ requestor = InterProcessRequestor()+ except Exception as err:+ logger.warning("Failed to open job state requestor: %s", err)+ return++ try:+ requestor.send_data(UPDATE_JOB_STATE, payload)+ except Exception as err:+ logger.debug("Job state broadcast failed: %s", err)+ finally:+ try:+ requestor.stop()+ except Exception:+ pass+++class ExportJobManager:+ """Concurrency-limited manager for queued export jobs."""++ def __init__(+ self,+ config: FrigateConfig,+ max_concurrent: int,+ max_queued: int = MAX_QUEUED_EXPORT_JOBS,+ publisher: Optional[JobStatePublisher] = None,+ ) -> None:+ self.config = config+ self.max_concurrent = max(1, max_concurrent)+ self.queue: Queue[ExportJob] = Queue(maxsize=max(1, max_queued))+ self.jobs: dict[str, ExportJob] = {}+ self.lock = threading.Lock()+ self.workers: list[ExportQueueWorker] = []+ self.started = False+ self.publisher = publisher if publisher is not None else JobStatePublisher()+ self._last_broadcast_monotonic: float = 0.0+ self._broadcast_throttle_lock = threading.Lock()++ def _broadcast_all_jobs(self, force: bool = False) -> None:+ """Publish aggregate export job state via the job_state WS topic.++ When ``force`` is False, broadcasts within+ ``PROGRESS_BROADCAST_MIN_INTERVAL`` of the previous one are skipped+ to avoid flooding the WebSocket with rapid progress updates.+ ``force`` bypasses the throttle and is used for status transitions+ (enqueue/start/finish) where the frontend needs the latest state.+ """+ now = time.monotonic()+ with self._broadcast_throttle_lock:+ if (+ not force+ and now - self._last_broadcast_monotonic+ < PROGRESS_BROADCAST_MIN_INTERVAL+ ):+ return+ self._last_broadcast_monotonic = now++ with self.lock:+ active = [+ j+ for j in self.jobs.values()+ if j.status in (JobStatusTypesEnum.queued, JobStatusTypesEnum.running)+ ]++ any_running = any(j.status == JobStatusTypesEnum.running for j in active)+ payload: dict[str, Any] = {+ "job_type": "export",+ "status": "running" if any_running else "queued",+ "results": {"jobs": [j.to_dict() for j in active]},+ }++ try:+ self.publisher.publish(payload)+ except Exception as err:+ logger.warning("Publisher raised during job state broadcast: %s", err)++ def _make_progress_callback(self, job: ExportJob) -> Callable[[str, float], None]:+ """Build a callback the exporter can invoke during execution."""++ def on_progress(step: str, percent: float) -> None:+ job.current_step = step+ job.progress_percent = percent+ self._broadcast_all_jobs()++ return on_progress++ def _schedule_job_cleanup(self, job_id: str) -> None:+ """Drop a completed job from ``self.jobs`` after a short delay."""++ def cleanup() -> None:+ with self.lock:+ self.jobs.pop(job_id, None)++ timer = threading.Timer(COMPLETED_JOB_CLEANUP_DELAY, cleanup)+ timer.daemon = True+ timer.start()++ def ensure_started(self) -> None:+ """Ensure worker threads are started exactly once."""+ with self.lock:+ if self.started:+ self._restart_dead_workers_locked()+ return++ for index in range(self.max_concurrent):+ worker = ExportQueueWorker(self, index)+ worker.start()+ self.workers.append(worker)++ self.started = True++ def _restart_dead_workers_locked(self) -> None:+ for index, worker in enumerate(self.workers):+ if worker.is_alive():+ continue++ logger.error(+ "Export queue worker %s died unexpectedly, restarting", worker.name+ )+ replacement = ExportQueueWorker(self, index)+ replacement.start()+ self.workers[index] = replacement++ def enqueue(self, job: ExportJob) -> str:+ """Queue a job for background execution.++ Raises ExportQueueFullError if the queue is at capacity.+ """+ self.ensure_started()++ try:+ self.queue.put_nowait(job)+ except Full as err:+ raise ExportQueueFullError(+ "Export queue is full; try again once current exports finish"+ ) from err++ with self.lock:+ self.jobs[job.id] = job++ self._broadcast_all_jobs(force=True)++ return job.id++ def get_job(self, job_id: str) -> Optional[ExportJob]:+ """Get a job by ID."""+ with self.lock:+ return self.jobs.get(job_id)++ def list_active_jobs(self) -> list[ExportJob]:+ """List queued and running jobs."""+ with self.lock:+ return [+ job+ for job in self.jobs.values()+ if job.status in (JobStatusTypesEnum.queued, JobStatusTypesEnum.running)+ ]++ def cancel_queued_jobs_for_case(self, case_id: str) -> list[ExportJob]:+ """Cancel queued export jobs assigned to a deleted case."""+ cancelled_jobs: list[ExportJob] = []++ with self.lock:+ with self.queue.mutex:+ retained_jobs: list[ExportJob] = []++ while self.queue.queue:+ job = self.queue.queue.popleft()++ if (+ job.export_case_id == case_id+ and job.status == JobStatusTypesEnum.queued+ ):+ job.status = JobStatusTypesEnum.cancelled+ job.end_time = time.time()+ cancelled_jobs.append(job)+ continue++ retained_jobs.append(job)++ self.queue.queue.extend(retained_jobs)++ if cancelled_jobs:+ self.queue.unfinished_tasks = max(+ 0,+ self.queue.unfinished_tasks - len(cancelled_jobs),+ )+ if self.queue.unfinished_tasks == 0:+ self.queue.all_tasks_done.notify_all()+ self.queue.not_full.notify_all()++ return cancelled_jobs++ def available_slots(self) -> int:+ """Approximate number of additional jobs that could be queued right now.++ Uses Queue.qsize() which is best-effort; callers should treat the+ result as advisory since another thread could enqueue between+ checking and enqueueing.+ """+ return max(0, self.queue.maxsize - self.queue.qsize())++ def run_job(self, job: ExportJob) -> None:+ """Execute a queued export job."""+ job.status = JobStatusTypesEnum.running+ job.start_time = time.time()+ self._broadcast_all_jobs(force=True)++ exporter = RecordingExporter(+ self.config,+ job.id,+ job.camera,+ job.name,+ job.image_path,+ int(job.request_start_time),+ int(job.request_end_time),+ PlaybackSourceEnum(job.playback_source),+ job.export_case_id,+ job.ffmpeg_input_args,+ job.ffmpeg_output_args,+ job.cpu_fallback,++ job.chapters,+ on_progress=self._make_progress_callback(job),+ )++ try:+ exporter.run()+ export = Export.get_or_none(Export.id == job.id)+ if export is None:+ job.status = JobStatusTypesEnum.failed+ job.error_message = "Export failed"+ elif export.in_progress:+ job.status = JobStatusTypesEnum.failed+ job.error_message = "Export did not complete"+ else:+ job.status = JobStatusTypesEnum.success+ job.results = {+ "export_id": export.id,+ "export_case_id": export.export_case_id,+ "video_path": export.video_path,+ "thumb_path": export.thumb_path,+ }+ except DoesNotExist:+ job.status = JobStatusTypesEnum.failed+ job.error_message = "Export not found"+ except Exception as err:+ logger.exception("Export job %s failed: %s", job.id, err)+ job.status = JobStatusTypesEnum.failed+ job.error_message = str(err)+ finally:+ job.end_time = time.time()+ self._broadcast_all_jobs(force=True)+ self._schedule_job_cleanup(job.id)+++_job_manager: Optional[ExportJobManager] = None+_job_manager_lock = threading.Lock()+++def _get_max_concurrent(config: FrigateConfig) -> int:+ return int(config.record.export.max_concurrent)+++def reap_stale_exports() -> None:+ """Sweep Export rows stuck with in_progress=True from previous sessions.++ On Frigate startup no export job is alive yet, so any in_progress=True+ row must be a leftover from a previous session that crashed, was killed+ mid-export, or returned early from RecordingExporter.run() without+ flipping the flag. For each stale row we either:++ - delete the row (and any thumb) if the video file is missing or empty,+ since there is nothing worth recovering+ - flip in_progress to False if the video file exists on disk and is+ non-empty, treating it as a completed export the user can manage+ through the normal UI++ Must only be called when the export job manager is certain to have no+ active jobs — i.e., at Frigate startup, before any worker runs.++ All exceptions are caught and logged; the caller does not need to wrap+ this in a try/except. A failure on a single row will not stop the rest+ of the sweep, and a failure in the top-level query will log and return.+ """+ try:+ stale_exports = list(Export.select().where(Export.in_progress == True)) # noqa: E712+ except Exception:+ logger.exception("Failed to query stale in-progress exports")+ return++ if not stale_exports:+ logger.debug("No stale in-progress exports found on startup")+ return++ flipped = 0+ deleted = 0+ errored = 0++ for export in stale_exports:+ try:+ video_path = export.video_path+ has_usable_file = False++ if video_path:+ try:+ has_usable_file = os.path.getsize(video_path) > 0+ except OSError:+ has_usable_file = False++ if has_usable_file:+ # Unassign from any case on recovery: the user should+ # re-triage a recovered export rather than have it silently+ # reappear inside a case they curated.+ Export.update(+ {Export.in_progress: False, Export.export_case: None}+ ).where(Export.id == export.id).execute()+ flipped += 1+ logger.info(+ "Recovered stale in-progress export %s (file intact on disk)",+ export.id,+ )+ continue++ if export.thumb_path:+ Path(export.thumb_path).unlink(missing_ok=True)+ if video_path:+ Path(video_path).unlink(missing_ok=True)+ Export.delete().where(Export.id == export.id).execute()+ deleted += 1+ logger.info(+ "Deleted stale in-progress export %s (no usable file on disk)",+ export.id,+ )+ except Exception:+ errored += 1+ logger.exception("Failed to reap stale export %s", export.id)++ logger.info(+ "Stale export cleanup complete: %d recovered, %d deleted, %d errored",+ flipped,+ deleted,+ errored,+ )+++def get_export_job_manager(config: FrigateConfig) -> ExportJobManager:+ """Get or create the singleton export job manager."""+ global _job_manager++ with _job_manager_lock:+ if _job_manager is None:+ _job_manager = ExportJobManager(config, _get_max_concurrent(config))+ _job_manager.ensure_started()+ return _job_manager+++def start_export_job(config: FrigateConfig, job: ExportJob) -> str:+ """Queue an export job and return its ID."""+ return get_export_job_manager(config).enqueue(job)+++def get_export_job(config: FrigateConfig, job_id: str) -> Optional[ExportJob]:+ """Get a queued or completed export job by ID."""+ return get_export_job_manager(config).get_job(job_id)+++def list_active_export_jobs(config: FrigateConfig) -> list[ExportJob]:+ """List queued and running export jobs."""+ return get_export_job_manager(config).list_active_jobs()+++def cancel_queued_export_jobs_for_case(+ config: FrigateConfig, case_id: str+) -> list[ExportJob]:+ """Cancel queued export jobs that still point at a deleted case."""+ return get_export_job_manager(config).cancel_queued_jobs_for_case(case_id)+++def available_export_queue_slots(config: FrigateConfig) -> int:+ """Approximate number of additional export jobs that could be queued now."""+ return get_export_job_manager(config).available_slots()diff --cc frigate/record/export.pyindex 5da5e818ff,28a72d05ea..16f322e42f--- a/frigate/record/export.py+++ b/frigate/record/export.py@@@ -212,12 -64,9 +213,13 @@@ class RecordingExporter(threading.Threaimage: Optional[str],start_time: int,end_time: int,- playback_factor: PlaybackFactorEnum,playback_source: PlaybackSourceEnum,+ export_case_id: Optional[str] = None,+ ffmpeg_input_args: Optional[str] = None,+ ffmpeg_output_args: Optional[str] = None,+ cpu_fallback: bool = False,+ chapters: Optional[ChaptersEnum] = None,+ on_progress: Optional[Callable[[str, float], None]] = None,) -> None:super().__init__()self.config = config@@@ -227,12 -76,9 +229,13 @@@self.user_provided_image = imageself.start_time = start_timeself.end_time = end_time- self.playback_factor = playback_factorself.playback_source = playback_source+ self.export_case_id = export_case_id+ self.ffmpeg_input_args = ffmpeg_input_args+ self.ffmpeg_output_args = ffmpeg_output_args+ self.cpu_fallback = cpu_fallback+ self.chapters = chapters+ self.on_progress = on_progress# ensure export thumb dirPath(os.path.join(CLIPS_DIR, "export")).mkdir(exist_ok=True)@@@ -380,135 -90,74 +383,203 @@@def _chapter_metadata_path(self) -> str:return os.path.join(CACHE_DIR, f"export_chapters_{self.export_id}.txt")+ def _build_chapter_metadata_file(self, recordings: list) -> Optional[str]:+ """Write an FFmpeg metadata file with chapters for review items in range.++ Chapter offsets are computed in *output time*: the VOD endpoint+ concatenates recording clips back-to-back, so wall-clock gaps+ between recordings collapse in the produced video. We walk the+ same recording rows that feed the playlist and convert each+ review item's wall-clock boundaries into output-time offsets.+ Returns ``None`` when there are no recordings, no review items,+ or any chapter would have zero output duration.+ """+ if not recordings:+ return None++ windows: list[tuple[float, float, float]] = []+ output_offset = 0.0+ for rec in recordings:+ clipped_start = max(float(rec.start_time), float(self.start_time))+ clipped_end = min(float(rec.end_time), float(self.end_time))+ if clipped_end <= clipped_start:+ continue+ windows.append((clipped_start, clipped_end, output_offset))+ output_offset += clipped_end - clipped_start++ if not windows:+ return None++ try:+ review_rows = list(+ ReviewSegment.select(+ ReviewSegment.start_time,+ ReviewSegment.end_time,+ ReviewSegment.severity,+ ReviewSegment.data,+ )+ .where(+ ReviewSegment.start_time.between(self.start_time, self.end_time)+ | ReviewSegment.end_time.between(self.start_time, self.end_time)+ | (+ (self.start_time > ReviewSegment.start_time)+ & (self.end_time < ReviewSegment.end_time)+ )+ )+ .where(ReviewSegment.camera == self.camera)+ .order_by(ReviewSegment.start_time.asc())+ .iterator()+ )+ except Exception:+ logger.exception(+ "Failed to query review segments for export %s", self.export_id+ )+ return None++ if not review_rows:+ return None++ total_output = windows[-1][2] + (windows[-1][1] - windows[-1][0])+ last_recorded_end = windows[-1][1]++ def wall_to_output(t: float) -> float:+ t = max(float(self.start_time), min(float(self.end_time), t))+ for w_start, w_end, w_offset in windows:+ if t < w_start:+ return w_offset+ if t <= w_end:+ return w_offset + (t - w_start)+ return total_output++ chapter_blocks: list[str] = []+ for review in review_rows:+ if review.start_time is None:+ continue+ # In-progress segments have a NULL end_time until the activity+ # closes; clamp to the last recorded second so the chapter never+ # extends past the actual video.+ review_end = (+ float(review.end_time)+ if review.end_time is not None+ else last_recorded_end+ )+ start_out = wall_to_output(float(review.start_time))+ end_out = wall_to_output(review_end)++ # Drop chapters that fall entirely in a recording gap, or are+ # too short to be navigable in a player.+ if end_out - start_out < 1.0:+ continue++ data = review.data or {}+ labels: list[str] = []+ for obj in data.get("objects") or []:+ label = str(obj).split("-")[0]+ if label and label not in labels:+ labels.append(label)++ metadata = data.get("metadata") or {}+ title = metadata.get("title")++ if not title:+ title = str(review.severity).capitalize()++ if labels:+ title = f"{title}: {', '.join(labels)}"++ chapter_blocks.append(+ "[CHAPTER]\n"+ "TIMEBASE=1/1000\n"+ f"START={int(start_out * 1000)}\n"+ f"END={int(end_out * 1000)}\n"+ f"title={title}"+ )++ if not chapter_blocks:+ return None++ meta_path = self._chapter_metadata_path()+ try:+ with open(meta_path, "w", encoding="utf-8") as f:+ f.write(";FFMETADATA1\n")+ f.write("\n".join(chapter_blocks))+ f.write("\n")+ except OSError:+ logger.exception(+ "Failed to write chapter metadata file for export %s", self.export_id+ )+ return None++ return meta_path++ def _build_recording_segment_chapter_metadata_file(+ self, recordings: list+ ) -> Optional[str]:+ """Write an FFmpeg metadata file with one chapter per recording segment.++ Each chapter's title is the segment's wallclock start time in+ strict ISO 8601 form so a viewer can map any point in the+ export's playback timeline back to real-world time without+ OCR-ing a burnt-in timestamp. Chapter offsets are computed in+ *output time*: the VOD endpoint concatenates recording clips+ back-to-back, so wall-clock gaps between recordings collapse in+ the produced video. Returns ``None`` when there are no+ recordings or every segment is empty after clipping.+ """+ if not recordings:+ return None++ tz_name = self.config.ui.timezone+ tz: Optional[datetime.tzinfo] = None+ if tz_name:+ try:+ tz = pytz.timezone(tz_name)+ except pytz.UnknownTimeZoneError:+ tz = None+ if tz is None:+ tz = datetime.timezone.utc++ chapter_blocks: list[str] = []+ output_offset_ms = 0+ for rec in recordings:+ clipped_start = max(float(rec.start_time), float(self.start_time))+ clipped_end = min(float(rec.end_time), float(self.end_time))+ if clipped_end <= clipped_start:+ continue++ duration_ms = int(round((clipped_end - clipped_start) * 1000))+ if duration_ms <= 0:+ continue++ title = datetime.datetime.fromtimestamp(clipped_start, tz=tz).isoformat(+ timespec="seconds"+ )+ chapter_blocks.append(+ "[CHAPTER]\n"+ "TIMEBASE=1/1000\n"+ f"START={output_offset_ms}\n"+ f"END={output_offset_ms + duration_ms}\n"+ f"title={title}"+ )+ output_offset_ms += duration_ms++ if not chapter_blocks:+ return None++ meta_path = self._chapter_metadata_path()+ try:+ with open(meta_path, "w", encoding="utf-8") as f:+ f.write(";FFMETADATA1\n")+ f.write("\n".join(chapter_blocks))+ f.write("\n")+ except OSError:+ logger.exception(+ "Failed to write chapter metadata file for export %s", self.export_id+ )+ return None++ return meta_path+def save_thumbnail(self, id: str) -> str:thumb_path = os.path.join(CLIPS_DIR, f"export/{id}.webp")@@@ -671,16 -339,6 +742,27 @@@EncodeTypeEnum.timelapse,)).split(" ")+ else:- chapters_path = self._build_chapter_metadata_file(recordings)++ # Realtime/stream-copy export. Embed chapter metadata according to++ # the camera's configured chapter mode: per-recording-segment++ # timestamps or per-review-item titles.++ if self.chapters == ChaptersEnum.recording_segments:++ chapters_path = self._build_recording_segment_chapter_metadata_file(++ recordings++ )++ elif self.chapters == ChaptersEnum.review_items:++ chapters_path = self._build_chapter_metadata_file(recordings)++ else:++ chapters_path = None+++ chapter_args = (+ f" -i {chapters_path} -map 0 -dn -map_metadata 1"+ if chapters_path+ else ""+ )+ ffmpeg_cmd = (+ f"{self.config.ffmpeg.ffmpeg_path} -hide_banner {ffmpeg_input}{chapter_args} -c copy -movflags +faststart"+ ).split(" ")# add metadatatitle = f"Frigate Recording for {self.camera}, {self.get_datetime_from_timestamp(self.start_time)} - {self.get_datetime_from_timestamp(self.end_time)}"@@@ -768,16 -436,12 +862,16 @@@ffmpeg_cmd = (parse_preset_hardware_acceleration_encode(self.config.ffmpeg.ffmpeg_path,- self.config.ffmpeg.hwaccel_args,- f"{TIMELAPSE_DATA_INPUT_ARGS} {ffmpeg_input}",- f"{self.config.cameras[self.camera].record.export.timelapse_args} -movflags +faststart",+ hwaccel_args,+ f"{self.ffmpeg_input_args} {TIMELAPSE_DATA_INPUT_ARGS} {ffmpeg_input}".strip(),- f"{self.ffmpeg_output_args} -movflags +faststart {video_path}".strip(),++ f"{self.ffmpeg_output_args} -movflags +faststart".strip(),EncodeTypeEnum.timelapse,)).split(" ")+ else:+ ffmpeg_cmd = (- f"{self.config.ffmpeg.ffmpeg_path} -hide_banner {ffmpeg_input} {codec} -movflags +faststart {video_path}"++ f"{self.config.ffmpeg.ffmpeg_path} -hide_banner {ffmpeg_input} {codec} -movflags +faststart"+ ).split(" ")# add metadatatitle = f"Frigate Preview for {self.camera}, {self.get_datetime_from_timestamp(self.start_time)} - {self.get_datetime_from_timestamp(self.end_time)}"diff --cc frigate/util/services.pyindex 3938dff884,5bf958198c..6bc0bcbe0e--- a/frigate/util/services.py+++ b/frigate/util/services.py@@@ -743,54 -556,7 +743,54 @@@ def get_jetson_stats() -> Optional[dictreturn results+def get_hailo_temps() -> dict[str, float]:+ """Get temperatures for Hailo devices."""+ try:+ from hailo_platform import Device+ except ModuleNotFoundError:+ return {}++ temps = {}++ try:+ device_ids = Device.scan()+ for i, device_id in enumerate(device_ids):+ try:+ with Device(device_id) as device:+ temp_info = device.control.get_chip_temperature()++ # Get board name and normalise it+ identity = device.control.identify()+ board_name = None+ for line in str(identity).split("\n"):+ if line.startswith("Board Name:"):+ board_name = (+ line.split(":", 1)[1].strip().lower().replace("-", "")+ )+ break++ if not board_name:+ board_name = f"hailo{i}"++ # Use indexed name if multiple devices, otherwise just the board name+ device_name = (+ f"{board_name}-{i}" if len(device_ids) > 1 else board_name+ )++ # ts1_temperature is also available, but appeared to be the same as ts0 in testing.+ temps[device_name] = round(temp_info.ts0_temperature, 1)+ except Exception as e:+ logger.debug(+ f"Failed to get temperature for Hailo device {device_id}: {e}"+ )+ continue+ except Exception as e:+ logger.debug(f"Failed to scan for Hailo devices: {e}")++ return temps++- def _go2rtc_arbitrary_exec_allowed() -> bool:+ def is_go2rtc_arbitrary_exec_allowed() -> bool:"""Read the GO2RTC_ALLOW_ARBITRARY_EXEC override from env, dockersecrets, or the Home Assistant add-on options file."""raw: Optional[str] = Nonediff --cc web/public/locales/en/config/cameras.jsonindex 7a0651c50a,67015bde5b..2ddc30b6b8--- a/web/public/locales/en/config/cameras.json+++ b/web/public/locales/en/config/cameras.json@@@ -483,471 -411,351 +483,474 @@@}}},- "review": {- "label": "Review configuration.",- "properties": {- "alerts": {- "label": "Review alerts config.",- "properties": {- "enabled": {- "label": "Enable alerts."- },- "labels": {- "label": "Labels to create alerts for."- },- "required_zones": {- "label": "List of required zones to be entered in order to save the event as an alert."- },- "enabled_in_config": {- "label": "Keep track of original state of alerts."- },- "cutoff_time": {- "label": "Time to cutoff alerts after no alert-causing activity has occurred."- }- }- },- "detections": {- "label": "Review detections config.",- "properties": {- "enabled": {- "label": "Enable detections."- },- "labels": {- "label": "Labels to create detections for."- },- "required_zones": {- "label": "List of required zones to be entered in order to save the event as a detection."- },- "cutoff_time": {- "label": "Time to cutoff detection after no detection-causing activity has occurred."- },- "enabled_in_config": {- "label": "Keep track of original state of detections."- }- }- },- "genai": {- "label": "Review description genai config.",- "properties": {- "enabled": {- "label": "Enable GenAI descriptions for review items."- },- "alerts": {- "label": "Enable GenAI for alerts."- },- "detections": {- "label": "Enable GenAI for detections."- },- "additional_concerns": {- "label": "Additional concerns that GenAI should make note of on this camera."- },- "debug_save_thumbnails": {- "label": "Save thumbnails sent to generative AI for debugging purposes."- },- "enabled_in_config": {- "label": "Keep track of original state of generative AI."- },- "preferred_language": {- "label": "Preferred language for GenAI Response"- },- "activity_context_prompt": {- "label": "Custom activity context prompt defining normal activity patterns for this property."- }- }- }+ "export": {+ "label": "Export config",+ "description": "Settings used when exporting recordings such as timelapse and hardware acceleration.",+ "hwaccel_args": {+ "label": "Export hwaccel args",+ "description": "Hardware acceleration args to use for export/transcode operations."+ },+ "max_concurrent": {+ "label": "Maximum concurrent exports",+ "description": "Maximum number of export jobs to process at the same time."++ },++ "chapters": {++ "label": "Chapter metadata to embed in exported recordings"}},- "semantic_search": {- "label": "Semantic search configuration.",- "properties": {- "triggers": {- "label": "Trigger actions on tracked objects that match existing thumbnails or descriptions",- "properties": {- "enabled": {- "label": "Enable this trigger"- },- "type": {- "label": "Type of trigger"- },- "data": {- "label": "Trigger content (text phrase or image ID)"- },- "threshold": {- "label": "Confidence score required to run the trigger"- },- "actions": {- "label": "Actions to perform when trigger is matched"- }- }- }+ "preview": {+ "label": "Preview config",+ "description": "Settings controlling the quality of recording previews shown in the UI.",+ "quality": {+ "label": "Preview quality",+ "description": "Preview quality level (very_low, low, medium, high, very_high)."}},- "snapshots": {- "label": "Snapshot configuration.",- "properties": {- "enabled": {- "label": "Snapshots enabled."- },- "clean_copy": {- "label": "Create a clean copy of the snapshot image."- },- "timestamp": {- "label": "Add a timestamp overlay on the snapshot."- },- "bounding_box": {- "label": "Add a bounding box overlay on the snapshot."- },- "crop": {- "label": "Crop the snapshot to the detected object."- },- "required_zones": {- "label": "List of required zones to be entered in order to save a snapshot."- },- "height": {- "label": "Snapshot image height."- },- "retain": {- "label": "Snapshot retention.",- "properties": {- "default": {- "label": "Default retention period."- },- "mode": {- "label": "Retain mode."- },- "objects": {- "label": "Object retention period."- }- }- },- "quality": {- "label": "Quality of the encoded jpeg (0-100)."- }+ "enabled_in_config": {+ "label": "Original recording state",+ "description": "Indicates whether recording was enabled in the original static configuration."+ }+ },+ "review": {+ "label": "Review",+ "description": "Settings that control alerts, detections, and GenAI review summaries used by the UI and storage for this camera.",+ "alerts": {+ "label": "Alerts config",+ "description": "Settings for which tracked objects generate alerts and how alerts are retained.",+ "enabled": {+ "label": "Enable alerts",+ "description": "Enable or disable alert generation for this camera."+ },+ "labels": {+ "label": "Alert labels",+ "description": "List of object labels that qualify as alerts (for example: car, person)."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones that an object must enter to be considered an alert; leave empty to allow any zone."+ },+ "enabled_in_config": {+ "label": "Original alerts state",+ "description": "Tracks whether alerts were originally enabled in the static configuration."+ },+ "cutoff_time": {+ "label": "Alerts cutoff time",+ "description": "Seconds to wait after no alert-causing activity before cutting off an alert."}},- "timestamp_style": {- "label": "Timestamp style configuration.",- "properties": {- "position": {- "label": "Timestamp position."- },- "format": {- "label": "Timestamp format."- },- "color": {- "label": "Timestamp color.",- "properties": {- "red": {- "label": "Red"- },- "green": {- "label": "Green"- },- "blue": {- "label": "Blue"- }- }- },- "thickness": {- "label": "Timestamp thickness."- },- "effect": {- "label": "Timestamp effect."- }+ "detections": {+ "label": "Detections config",+ "description": "Settings for which tracked objects generate detections (non-alert) and how detections are retained.",+ "enabled": {+ "label": "Enable detections",+ "description": "Enable or disable detection events for this camera."+ },+ "labels": {+ "label": "Detection labels",+ "description": "List of object labels that qualify as detection events."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones that an object must enter to be considered a detection; leave empty to allow any zone."+ },+ "cutoff_time": {+ "label": "Detections cutoff time",+ "description": "Seconds to wait after no detection-causing activity before cutting off a detection."+ },+ "enabled_in_config": {+ "label": "Original detections state",+ "description": "Tracks whether detections were originally enabled in the static configuration."}},- "best_image_timeout": {- "label": "How long to wait for the image with the highest confidence score."- },- "mqtt": {- "label": "MQTT configuration.",- "properties": {- "enabled": {- "label": "Send image over MQTT."- },- "timestamp": {- "label": "Add timestamp to MQTT image."- },- "bounding_box": {- "label": "Add bounding box to MQTT image."- },- "crop": {- "label": "Crop MQTT image to detected object."- },- "height": {- "label": "MQTT image height."- },- "required_zones": {- "label": "List of required zones to be entered in order to send the image."- },- "quality": {- "label": "Quality of the encoded jpeg (0-100)."- }+ "genai": {+ "label": "GenAI config",+ "description": "Controls use of generative AI for producing descriptions and summaries of review items.",+ "enabled": {+ "label": "Enable GenAI descriptions",+ "description": "Enable or disable GenAI-generated descriptions and summaries for review items."+ },+ "alerts": {+ "label": "Enable GenAI for alerts",+ "description": "Use GenAI to generate descriptions for alert items."+ },+ "detections": {+ "label": "Enable GenAI for detections",+ "description": "Use GenAI to generate descriptions for detection items."+ },+ "image_source": {+ "label": "Review image source",+ "description": "Source of images sent to GenAI ('preview' or 'recordings'); 'recordings' uses higher quality frames but more tokens."+ },+ "additional_concerns": {+ "label": "Additional concerns",+ "description": "A list of additional concerns or notes the GenAI should consider when evaluating activity on this camera."+ },+ "debug_save_thumbnails": {+ "label": "Save thumbnails",+ "description": "Save thumbnails that are sent to the GenAI provider for debugging and review."+ },+ "enabled_in_config": {+ "label": "Original GenAI state",+ "description": "Tracks whether GenAI review was originally enabled in the static configuration."+ },+ "preferred_language": {+ "label": "Preferred language",+ "description": "Preferred language to request from the GenAI provider for generated responses."+ },+ "activity_context_prompt": {+ "label": "Activity context prompt",+ "description": "Custom prompt describing what is and is not suspicious activity to provide context for GenAI summaries."}- },- "notifications": {- "label": "Notifications configuration.",- "properties": {- "enabled": {- "label": "Enable notifications"- },- "email": {- "label": "Email required for push."- },- "cooldown": {- "label": "Cooldown period for notifications (time in seconds)."- },- "enabled_in_config": {- "label": "Keep track of original state of notifications."- }+ }+ },+ "semantic_search": {+ "label": "Semantic Search",+ "description": "Settings for semantic search which builds and queries object embeddings to find similar items.",+ "triggers": {+ "label": "Triggers",+ "description": "Actions and matching criteria for camera-specific semantic search triggers.",+ "friendly_name": {+ "label": "Friendly name",+ "description": "Optional friendly name displayed in the UI for this trigger."+ },+ "enabled": {+ "label": "Enable this trigger",+ "description": "Enable or disable this semantic search trigger."+ },+ "type": {+ "label": "Trigger type",+ "description": "Type of trigger: 'thumbnail' (match against image) or 'description' (match against text)."+ },+ "data": {+ "label": "Trigger content",+ "description": "Text phrase or thumbnail ID to match against tracked objects."+ },+ "threshold": {+ "label": "Trigger threshold",+ "description": "Minimum similarity score (0-1) required to activate this trigger."+ },+ "actions": {+ "label": "Trigger actions",+ "description": "List of actions to execute when trigger matches (notification, sub_label, attribute)."}+ }+ },+ "snapshots": {+ "label": "Snapshots",+ "description": "Settings for API-generated snapshots of tracked objects for this camera.",+ "enabled": {+ "label": "Enable snapshots",+ "description": "Enable or disable saving snapshots for this camera."},- "onvif": {- "label": "Camera Onvif Configuration.",- "properties": {- "host": {- "label": "Onvif Host"- },- "port": {- "label": "Onvif Port"- },- "user": {- "label": "Onvif Username"- },- "password": {- "label": "Onvif Password"- },- "tls_insecure": {- "label": "Onvif Disable TLS verification"- },- "autotracking": {- "label": "PTZ auto tracking config.",- "properties": {- "enabled": {- "label": "Enable PTZ object autotracking."- },- "calibrate_on_startup": {- "label": "Perform a camera calibration when Frigate starts."- },- "zooming": {- "label": "Autotracker zooming mode."- },- "zoom_factor": {- "label": "Zooming factor (0.1-0.75)."- },- "track": {- "label": "Objects to track."- },- "required_zones": {- "label": "List of required zones to be entered in order to begin autotracking."- },- "return_preset": {- "label": "Name of camera preset to return to when object tracking is over."- },- "timeout": {- "label": "Seconds to delay before returning to preset."- },- "movement_weights": {- "label": "Internal value used for PTZ movements based on the speed of your camera's motor."- },- "enabled_in_config": {- "label": "Keep track of original state of autotracking."- }- }- },- "ignore_time_mismatch": {- "label": "Onvif Ignore Time Synchronization Mismatch Between Camera and Server"- }+ "timestamp": {+ "label": "Timestamp overlay",+ "description": "Overlay a timestamp on snapshots from API."+ },+ "bounding_box": {+ "label": "Bounding box overlay",+ "description": "Draw bounding boxes for tracked objects on snapshots from API."+ },+ "crop": {+ "label": "Crop snapshot",+ "description": "Crop snapshots from API to the detected object's bounding box."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones an object must enter for a snapshot to be saved."+ },+ "height": {+ "label": "Snapshot height",+ "description": "Height (pixels) to resize snapshots from API to; leave empty to preserve original size."+ },+ "retain": {+ "label": "Snapshot retention",+ "description": "Retention settings for snapshots including default days and per-object overrides.",+ "default": {+ "label": "Default retention",+ "description": "Default number of days to retain snapshots."+ },+ "objects": {+ "label": "Object retention",+ "description": "Per-object overrides for snapshot retention days."}},- "type": {- "label": "Camera Type"+ "quality": {+ "label": "Snapshot quality",+ "description": "Encode quality for saved snapshots (0-100)."+ }+ },+ "timestamp_style": {+ "label": "Timestamp style",+ "description": "Styling options for timestamps applied to snapshots and Debug view.",+ "position": {+ "label": "Timestamp position",+ "description": "Position of the timestamp on the image (tl/tr/bl/br)."},- "ui": {- "label": "Camera UI Modifications.",- "properties": {- "order": {- "label": "Order of camera in UI."- },- "dashboard": {- "label": "Show this camera in Frigate dashboard UI."- }+ "format": {+ "label": "Timestamp format",+ "description": "Datetime format string used for timestamps (Python datetime format codes)."+ },+ "color": {+ "label": "Timestamp color",+ "description": "RGB color values for the timestamp text (all values 0-255).",+ "red": {+ "label": "Red",+ "description": "Red component (0-255) for timestamp color."+ },+ "green": {+ "label": "Green",+ "description": "Green component (0-255) for timestamp color."+ },+ "blue": {+ "label": "Blue",+ "description": "Blue component (0-255) for timestamp color."}},- "webui_url": {- "label": "URL to visit the camera directly from system page"- },- "zones": {- "label": "Zone configuration.",- "properties": {- "filters": {- "label": "Zone filters.",- "properties": {- "min_area": {- "label": "Minimum area of bounding box for object to be counted. Can be pixels (int) or percentage (float between 0.000001 and 0.99)."- },- "max_area": {- "label": "Maximum area of bounding box for object to be counted. Can be pixels (int) or percentage (float between 0.000001 and 0.99)."- },- "min_ratio": {- "label": "Minimum ratio of bounding box's width/height for object to be counted."- },- "max_ratio": {- "label": "Maximum ratio of bounding box's width/height for object to be counted."- },- "threshold": {- "label": "Average detection confidence threshold for object to be counted."- },- "min_score": {- "label": "Minimum detection confidence for object to be counted."- },- "mask": {- "label": "Detection area polygon mask for this filter configuration."- }- }- },- "coordinates": {- "label": "Coordinates polygon for the defined zone."- },- "distances": {- "label": "Real-world distances for the sides of quadrilateral for the defined zone."- },- "inertia": {- "label": "Number of consecutive frames required for object to be considered present in the zone."- },- "loitering_time": {- "label": "Number of seconds that an object must loiter to be considered in the zone."- },- "speed_threshold": {- "label": "Minimum speed value for an object to be considered in the zone."- },- "objects": {- "label": "List of objects that can trigger the zone."- }+ "thickness": {+ "label": "Timestamp thickness",+ "description": "Line thickness of the timestamp text."+ },+ "effect": {+ "label": "Timestamp effect",+ "description": "Visual effect for the timestamp text (none, solid, shadow)."+ }+ },+ "best_image_timeout": {+ "label": "Best image timeout",+ "description": "How long to wait for the image with the highest confidence score."+ },+ "mqtt": {+ "label": "MQTT",+ "description": "MQTT image publishing settings.",+ "enabled": {+ "label": "Send image",+ "description": "Enable publishing image snapshots for objects to MQTT topics for this camera."+ },+ "timestamp": {+ "label": "Add timestamp",+ "description": "Overlay a timestamp on images published to MQTT."+ },+ "bounding_box": {+ "label": "Add bounding box",+ "description": "Draw bounding boxes on images published over MQTT."+ },+ "crop": {+ "label": "Crop image",+ "description": "Crop images published to MQTT to the detected object's bounding box."+ },+ "height": {+ "label": "Image height",+ "description": "Height (pixels) to resize images published over MQTT."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones that an object must enter for an MQTT image to be published."+ },+ "quality": {+ "label": "JPEG quality",+ "description": "JPEG quality for images published to MQTT (0-100)."+ }+ },+ "notifications": {+ "label": "Notifications",+ "description": "Settings to enable and control notifications for this camera.",+ "enabled": {+ "label": "Enable notifications",+ "description": "Enable or disable notifications for this camera."+ },+ "email": {+ "label": "Notification email",+ "description": "Email address used for push notifications or required by certain notification providers."+ },+ "cooldown": {+ "label": "Cooldown period",+ "description": "Cooldown (seconds) between notifications to avoid spamming recipients."+ },+ "enabled_in_config": {+ "label": "Original notifications state",+ "description": "Indicates whether notifications were enabled in the original static configuration."+ }+ },+ "onvif": {+ "label": "ONVIF",+ "description": "ONVIF connection and PTZ autotracking settings for this camera.",+ "host": {+ "label": "ONVIF host",+ "description": "Host (and optional scheme) for the ONVIF service for this camera."+ },+ "port": {+ "label": "ONVIF port",+ "description": "Port number for the ONVIF service."+ },+ "user": {+ "label": "ONVIF username",+ "description": "Username for ONVIF authentication; some devices require admin user for ONVIF."+ },+ "password": {+ "label": "ONVIF password",+ "description": "Password for ONVIF authentication."+ },+ "tls_insecure": {+ "label": "Disable TLS verify",+ "description": "Skip TLS verification and disable digest auth for ONVIF (unsafe; use in safe networks only)."+ },+ "profile": {+ "label": "ONVIF profile",+ "description": "Specific ONVIF media profile to use for PTZ control, matched by token or name. If not set, the first profile with valid PTZ configuration is selected automatically."+ },+ "autotracking": {+ "label": "Autotracking",+ "description": "Automatically track moving objects and keep them centered in the frame using PTZ camera movements.",+ "enabled": {+ "label": "Enable Autotracking",+ "description": "Enable or disable automatic PTZ camera tracking of detected objects."+ },+ "calibrate_on_startup": {+ "label": "Calibrate on start",+ "description": "Measure PTZ motor speeds on startup to improve tracking accuracy. Frigate will update config with movement_weights after calibration."+ },+ "zooming": {+ "label": "Zoom mode",+ "description": "Control zoom behavior: disabled (pan/tilt only), absolute (most compatible), or relative (concurrent pan/tilt/zoom)."+ },+ "zoom_factor": {+ "label": "Zoom factor",+ "description": "Control zoom level on tracked objects. Lower values keep more scene in view; higher values zoom in closer but may lose tracking. Values between 0.1 and 0.75."+ },+ "track": {+ "label": "Tracked objects",+ "description": "List of object types that should trigger autotracking."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Objects must enter one of these zones before autotracking begins."+ },+ "return_preset": {+ "label": "Return preset",+ "description": "ONVIF preset name configured in camera firmware to return to after tracking ends."+ },+ "timeout": {+ "label": "Return timeout",+ "description": "Wait this many seconds after losing tracking before returning camera to preset position."+ },+ "movement_weights": {+ "label": "Movement weights",+ "description": "Calibration values automatically generated by camera calibration. Do not modify manually."+ },+ "enabled_in_config": {+ "label": "Original autotrack state",+ "description": "Internal field to track whether autotracking was enabled in configuration."}},+ "ignore_time_mismatch": {+ "label": "Ignore time mismatch",+ "description": "Ignore time synchronization differences between camera and Frigate server for ONVIF communication."+ }+ },+ "type": {+ "label": "Camera type",+ "description": "Camera Type"+ },+ "ui": {+ "label": "Camera UI",+ "description": "Display ordering and visibility for this camera in the UI. Ordering affects the default dashboard. For more granular control, use camera groups.",+ "order": {+ "label": "UI order",+ "description": "Numeric order used to sort the camera in the UI (default dashboard and lists); larger numbers appear later."+ },+ "dashboard": {+ "label": "Show in UI",+ "description": "Toggle whether this camera is visible everywhere in the Frigate UI. Disabling this will require manually editing the config to view this camera in the UI again."+ },+ "review": {+ "label": "Show in review",+ "description": "Toggle whether this camera is visible in review (the review page and its camera filter, motion review, and the history view)."+ }+ },+ "webui_url": {+ "label": "Camera URL",+ "description": "URL to visit the camera directly from system page"+ },+ "profiles": {+ "label": "Profiles",+ "description": "Named config profiles with partial overrides that can be activated at runtime."+ },+ "zones": {+ "label": "Zones",+ "description": "Zones allow you to define a specific area of the frame so you can determine whether or not an object is within a particular area.",+ "friendly_name": {+ "label": "Zone name",+ "description": "A user-friendly name for the zone, displayed in the Frigate UI. If not set, a formatted version of the zone name will be used."+ },+ "enabled": {+ "label": "Enabled",+ "description": "Enable or disable this zone. Disabled zones are ignored at runtime."+ },"enabled_in_config": {- "label": "Keep track of original state of camera."+ "label": "Keep track of original state of zone."+ },+ "filters": {+ "label": "Zone filters",+ "description": "Filters to apply to objects within this zone. Used to reduce false positives or restrict which objects are considered present in the zone.",+ "min_area": {+ "label": "Minimum object area",+ "description": "Minimum bounding box area (pixels or percentage) required for this object type. Can be pixels (int) or percentage (float between 0.000001 and 0.99)."+ },+ "max_area": {+ "label": "Maximum object area",+ "description": "Maximum bounding box area (pixels or percentage) allowed for this object type. Can be pixels (int) or percentage (float between 0.000001 and 0.99)."+ },+ "min_ratio": {+ "label": "Minimum aspect ratio",+ "description": "Minimum width/height ratio required for the bounding box to qualify."+ },+ "max_ratio": {+ "label": "Maximum aspect ratio",+ "description": "Maximum width/height ratio allowed for the bounding box to qualify."+ },+ "threshold": {+ "label": "Confidence threshold",+ "description": "Average detection confidence threshold required for the object to be considered a true positive."+ },+ "min_score": {+ "label": "Minimum confidence",+ "description": "Minimum single-frame detection confidence required for the object to be counted."+ },+ "mask": {+ "label": "Filter mask",+ "description": "Polygon coordinates defining where this filter applies within the frame."+ },+ "raw_mask": {+ "label": "Raw Mask"+ }+ },+ "coordinates": {+ "label": "Coordinates",+ "description": "Polygon coordinates that define the zone area. Can be a comma-separated string or a list of coordinate strings. Coordinates should be relative (0-1) or absolute (legacy)."+ },+ "distances": {+ "label": "Real-world distances",+ "description": "Optional real-world distances for each side of the zone quadrilateral, used for speed or distance calculations. Must have exactly 4 values if set."+ },+ "inertia": {+ "label": "Inertia frames",+ "description": "Number of consecutive frames an object must be detected in the zone before it is considered present. Helps filter out transient detections."+ },+ "loitering_time": {+ "label": "Loitering seconds",+ "description": "Number of seconds an object must remain in the zone to be considered as loitering. Set to 0 to disable loitering detection."+ },+ "speed_threshold": {+ "label": "Minimum speed",+ "description": "Minimum speed (in real-world units if distances are set) required for an object to be considered present in the zone. Used for speed-based zone triggers."+ },+ "objects": {+ "label": "Trigger objects",+ "description": "List of object types (from labelmap) that can trigger this zone. Can be a string or a list of strings. If empty, all objects are considered."}+ },+ "enabled_in_config": {+ "label": "Original camera state",+ "description": "Keep track of original state of camera."}-}+}diff --cc web/public/locales/en/config/global.jsonindex 56ec0c3650,0000000000..e3b7c65c68mode 100644,000000..100644--- a/web/public/locales/en/config/global.json+++ b/web/public/locales/en/config/global.json@@@ -1,1627 -1,0 +1,1630 @@@+{+ "version": {+ "label": "Current config version",+ "description": "Numeric or string version of the active configuration to help detect migrations or format changes."+ },+ "safe_mode": {+ "label": "Safe mode",+ "description": "When enabled, start Frigate in safe mode with reduced features for troubleshooting."+ },+ "environment_vars": {+ "label": "Environment variables",+ "description": "Key/value pairs of environment variables to set for the Frigate process in Home Assistant OS. Non-HAOS users must use Docker environment variable configuration instead."+ },+ "logger": {+ "label": "Logging",+ "description": "Controls default log verbosity and per-component log level overrides.",+ "default": {+ "label": "Logging level",+ "description": "Default global log verbosity (debug, info, warning, error)."+ },+ "logs": {+ "label": "Per-process log level",+ "description": "Per-component log level overrides to increase or decrease verbosity for specific modules."+ }+ },+ "auth": {+ "label": "Authentication",+ "description": "Authentication and session-related settings including cookie and rate limit options.",+ "enabled": {+ "label": "Enable authentication",+ "description": "Enable native authentication for the Frigate UI."+ },+ "reset_admin_password": {+ "label": "Reset admin password",+ "description": "If true, reset the admin user's password on startup and print the new password in logs."+ },+ "cookie_name": {+ "label": "JWT cookie name",+ "description": "Name of the cookie used to store the JWT token for native authentication."+ },+ "cookie_secure": {+ "label": "Secure cookie flag",+ "description": "Set the secure flag on the auth cookie; should be true when using TLS."+ },+ "session_length": {+ "label": "Session length",+ "description": "Session duration in seconds for JWT-based sessions."+ },+ "refresh_time": {+ "label": "Session refresh window",+ "description": "When a session is within this many seconds of expiring, refresh it back to full length."+ },+ "failed_login_rate_limit": {+ "label": "Failed login limits",+ "description": "Rate limiting rules for failed login attempts to reduce brute-force attacks."+ },+ "trusted_proxies": {+ "label": "Trusted proxies",+ "description": "List of trusted proxy IPs used when determining client IP for rate limiting."+ },+ "hash_iterations": {+ "label": "Hash iterations",+ "description": "Number of PBKDF2-SHA256 iterations to use when hashing user passwords."+ },+ "roles": {+ "label": "Role mappings",+ "description": "Map roles to camera lists. An empty list grants access to all cameras for the role."+ },+ "admin_first_time_login": {+ "label": "First-time admin flag",+ "description": "When true the UI may show a help link on the login page informing users how to sign in after an admin password reset. "+ }+ },+ "database": {+ "label": "Database",+ "description": "Settings for the SQLite database used by Frigate to store tracked object and recording metadata.",+ "path": {+ "label": "Database path",+ "description": "Filesystem path where the Frigate SQLite database file will be stored."+ }+ },+ "go2rtc": {+ "label": "go2rtc",+ "description": "Settings for the integrated go2rtc restreaming service used for live stream relaying and translation."+ },+ "mqtt": {+ "label": "MQTT",+ "description": "Settings for connecting and publishing telemetry, snapshots, and event details to an MQTT broker.",+ "enabled": {+ "label": "Enable MQTT",+ "description": "Enable or disable MQTT integration for state, events, and snapshots."+ },+ "host": {+ "label": "MQTT host",+ "description": "Hostname or IP address of the MQTT broker."+ },+ "port": {+ "label": "MQTT port",+ "description": "Port of the MQTT broker (usually 1883 for plain MQTT)."+ },+ "topic_prefix": {+ "label": "Topic prefix",+ "description": "MQTT topic prefix for all Frigate topics; must be unique if running multiple instances."+ },+ "client_id": {+ "label": "Client ID",+ "description": "Client identifier used when connecting to the MQTT broker; should be unique per instance."+ },+ "stats_interval": {+ "label": "Stats interval",+ "description": "Interval in seconds for publishing system and camera stats to MQTT."+ },+ "user": {+ "label": "MQTT username",+ "description": "Optional MQTT username; can be provided via environment variables or secrets."+ },+ "password": {+ "label": "MQTT password",+ "description": "Optional MQTT password; can be provided via environment variables or secrets."+ },+ "tls_ca_certs": {+ "label": "TLS CA certs",+ "description": "Path to CA certificate for TLS connections to the broker (for self-signed certs)."+ },+ "tls_client_cert": {+ "label": "Client cert",+ "description": "Client certificate path for TLS mutual authentication; do not set user/password when using client certs."+ },+ "tls_client_key": {+ "label": "Client key",+ "description": "Private key path for the client certificate."+ },+ "tls_insecure": {+ "label": "TLS insecure",+ "description": "Allow insecure TLS connections by skipping hostname verification (not recommended)."+ },+ "qos": {+ "label": "MQTT QoS",+ "description": "Quality of Service level for MQTT publishes/subscriptions (0, 1, or 2)."+ }+ },+ "notifications": {+ "label": "Notifications",+ "description": "Settings to enable and control notifications for all cameras; can be overridden per-camera.",+ "enabled": {+ "label": "Enable notifications",+ "description": "Enable or disable notifications for all cameras; can be overridden per-camera."+ },+ "email": {+ "label": "Notification email",+ "description": "Email address used for push notifications or required by certain notification providers."+ },+ "cooldown": {+ "label": "Cooldown period",+ "description": "Cooldown (seconds) between notifications to avoid spamming recipients."+ },+ "enabled_in_config": {+ "label": "Original notifications state",+ "description": "Indicates whether notifications were enabled in the original static configuration."+ }+ },+ "networking": {+ "label": "Networking",+ "description": "Network-related settings such as IPv6 enablement for Frigate endpoints.",+ "ipv6": {+ "label": "IPv6 configuration",+ "description": "IPv6-specific settings for Frigate network services.",+ "enabled": {+ "label": "Enable IPv6",+ "description": "Enable IPv6 support for Frigate services (API and UI) where applicable."+ }+ },+ "listen": {+ "label": "Listening ports configuration",+ "description": "Configuration for internal and external listening ports. This is for advanced users. For the majority of use cases it's recommended to change the ports section of your Docker compose file.",+ "internal": {+ "label": "Internal port",+ "description": "Internal listening port for Frigate (default 5000)."+ },+ "external": {+ "label": "External port",+ "description": "External listening port for Frigate (default 8971)."+ }+ }+ },+ "proxy": {+ "label": "Proxy",+ "description": "Settings for integrating Frigate behind a reverse proxy that passes authenticated user headers.",+ "header_map": {+ "label": "Header mapping",+ "description": "Map incoming proxy headers to Frigate user and role fields for proxy-based auth.",+ "user": {+ "label": "User header",+ "description": "Header containing the authenticated username provided by the upstream proxy."+ },+ "role": {+ "label": "Role header",+ "description": "Header containing the authenticated user's role or groups from the upstream proxy."+ },+ "role_map": {+ "label": "Role mapping",+ "description": "Map upstream group values to Frigate roles (for example map admin groups to the admin role)."+ }+ },+ "logout_url": {+ "label": "Logout URL",+ "description": "URL to redirect users to when logging out via the proxy."+ },+ "auth_secret": {+ "label": "Proxy secret",+ "description": "Optional secret checked against the X-Proxy-Secret header to verify trusted proxies."+ },+ "default_role": {+ "label": "Default role",+ "description": "Default role assigned to proxy-authenticated users when no role mapping applies."+ },+ "separator": {+ "label": "Separator character",+ "description": "Character used to split multiple values provided in proxy headers."+ }+ },+ "telemetry": {+ "label": "Telemetry",+ "description": "System telemetry and stats options including GPU and network bandwidth monitoring.",+ "network_interfaces": {+ "label": "Network interfaces",+ "description": "List of network interface name prefixes to monitor for bandwidth statistics."+ },+ "stats": {+ "label": "System stats",+ "description": "Options to enable/disable collection of various system and GPU statistics.",+ "amd_gpu_stats": {+ "label": "AMD GPU stats",+ "description": "Enable collection of AMD GPU statistics if an AMD GPU is present."+ },+ "intel_gpu_stats": {+ "label": "Intel GPU stats",+ "description": "Enable collection of Intel GPU statistics if an Intel GPU is present."+ },+ "network_bandwidth": {+ "label": "Network bandwidth",+ "description": "Enable per-process network bandwidth monitoring for camera ffmpeg processes and detectors (requires capabilities)."+ },+ "intel_gpu_device": {+ "label": "Intel GPU device",+ "description": "PCI bus address or DRM device path (e.g. /dev/dri/card1) used to pin Intel GPU stats to a specific device when multiple are present."+ }+ },+ "version_check": {+ "label": "Version check",+ "description": "Enable an outbound check to detect if a newer Frigate version is available."+ }+ },+ "tls": {+ "label": "TLS",+ "description": "TLS settings for Frigate's web endpoints (port 8971).",+ "enabled": {+ "label": "Enable TLS",+ "description": "Enable TLS for Frigate's web UI and API on the configured TLS port."+ }+ },+ "ui": {+ "label": "UI",+ "description": "User interface preferences such as timezone, time/date formatting, and units.",+ "timezone": {+ "label": "Timezone",+ "description": "Optional timezone to display across the UI (defaults to browser local time if unset)."+ },+ "time_format": {+ "label": "Time format",+ "description": "Time format to use in the UI (browser, 12hour, or 24hour)."+ },+ "unit_system": {+ "label": "Unit system",+ "description": "Unit system for display (metric or imperial) used in the UI and MQTT."+ }+ },+ "detectors": {+ "label": "Detector hardware",+ "description": "Configuration for object detectors (CPU, GPU, ONNX backends) and any detector-specific model settings.",+ "type": {+ "label": "Type"+ },+ "model": {+ "label": "Detector specific model configuration",+ "description": "Detector-specific model configuration options (path, input size, etc.).",+ "path": {+ "label": "Custom object detector model path",+ "description": "Path to a custom detection model file (or plus://<model_id> for Frigate+ models)."+ },+ "labelmap_path": {+ "label": "Label map for custom object detector",+ "description": "Path to a labelmap file that maps numeric classes to string labels for the detector."+ },+ "width": {+ "label": "Object detection model input width",+ "description": "Width of the model input tensor in pixels."+ },+ "height": {+ "label": "Object detection model input height",+ "description": "Height of the model input tensor in pixels."+ },+ "labelmap": {+ "label": "Labelmap customization",+ "description": "Overrides or remapping entries to merge into the standard labelmap."+ },+ "attributes_map": {+ "label": "Map of object labels to their attribute labels",+ "description": "Mapping from object labels to attribute labels used to attach metadata (for example 'car' -> ['license_plate'])."+ },+ "input_tensor": {+ "label": "Model Input Tensor Shape",+ "description": "Tensor format expected by the model: 'nhwc' or 'nchw'."+ },+ "input_pixel_format": {+ "label": "Model Input Pixel Color Format",+ "description": "Pixel colorspace expected by the model: 'rgb', 'bgr', or 'yuv'."+ },+ "input_dtype": {+ "label": "Model Input D Type",+ "description": "Data type of the model input tensor (for example 'float32')."+ },+ "model_type": {+ "label": "Object Detection Model Type",+ "description": "Detector model architecture type (ssd, yolox, yolonas) used by some detectors for optimization."+ }+ },+ "model_path": {+ "label": "Detector specific model path",+ "description": "File path to the detector model binary if required by the chosen detector."+ },+ "axengine": {+ "label": "AXEngine NPU",+ "description": "AXERA AX650N/AX8850N NPU detector running compiled .axmodel files via the AXEngine runtime."+ },+ "cpu": {+ "label": "CPU",+ "description": "CPU TFLite detector that runs TensorFlow Lite models on the host CPU without hardware acceleration. Not recommended.",+ "num_threads": {+ "label": "Number of detection threads",+ "description": "The number of threads used for CPU-based inference."+ }+ },+ "deepstack": {+ "label": "DeepStack",+ "description": "DeepStack/CodeProject.AI detector that sends images to a remote DeepStack HTTP API for inference. Not recommended.",+ "api_url": {+ "label": "DeepStack API URL",+ "description": "The URL of the DeepStack API."+ },+ "api_timeout": {+ "label": "DeepStack API timeout (in seconds)",+ "description": "Maximum time allowed for a DeepStack API request."+ },+ "api_key": {+ "label": "DeepStack API key (if required)",+ "description": "Optional API key for authenticated DeepStack services."+ }+ },+ "degirum": {+ "label": "DeGirum",+ "description": "DeGirum detector for running models via DeGirum cloud or local inference services.",+ "location": {+ "label": "Inference Location",+ "description": "Location of the DeGirim inference engine (e.g. '@cloud', '127.0.0.1')."+ },+ "zoo": {+ "label": "Model Zoo",+ "description": "Path or URL to the DeGirum model zoo."+ },+ "token": {+ "label": "DeGirum Cloud Token",+ "description": "Token for DeGirum Cloud access."+ }+ },+ "edgetpu": {+ "label": "EdgeTPU",+ "description": "EdgeTPU detector that runs TensorFlow Lite models compiled for Coral EdgeTPU using the EdgeTPU delegate.",+ "device": {+ "label": "Device Type",+ "description": "The device to use for EdgeTPU inference (e.g. 'usb', 'pci')."+ }+ },+ "hailo8l": {+ "label": "Hailo-8/Hailo-8L",+ "description": "Hailo-8/Hailo-8L detector using HEF models and the HailoRT SDK for inference on Hailo hardware.",+ "device": {+ "label": "Device Type",+ "description": "The device to use for Hailo inference (e.g. 'PCIe', 'M.2')."+ }+ },+ "memryx": {+ "label": "MemryX",+ "description": "MemryX MX3 detector that runs compiled DFP models on MemryX accelerators.",+ "device": {+ "label": "Device Path",+ "description": "The device to use for MemryX inference (e.g. 'PCIe')."+ }+ },+ "onnx": {+ "label": "ONNX",+ "description": "ONNX detector for running ONNX models; will use available acceleration backends (CUDA/ROCm/OpenVINO) when available.",+ "device": {+ "label": "Device Type",+ "description": "The device to use for ONNX inference (e.g. 'AUTO', 'CPU', 'GPU')."+ }+ },+ "openvino": {+ "label": "OpenVINO",+ "description": "OpenVINO detector for AMD and Intel CPUs, Intel GPUs and Intel VPU hardware.",+ "device": {+ "label": "Device Type",+ "description": "The device to use for OpenVINO inference (e.g. 'CPU', 'GPU', 'NPU')."+ }+ },+ "rknn": {+ "label": "RKNN",+ "description": "RKNN detector for Rockchip NPUs; runs compiled RKNN models on Rockchip hardware.",+ "num_cores": {+ "label": "Number of NPU cores to use.",+ "description": "The number of NPU cores to use (0 for auto)."+ }+ },+ "synaptics": {+ "label": "Synaptics",+ "description": "Synaptics NPU detector for models in .synap format using the Synap SDK on Synaptics hardware."+ },+ "teflon_tfl": {+ "label": "Teflon",+ "description": "Teflon delegate detector for TFLite using Mesa Teflon delegate library to accelerate inference on supported GPUs."+ },+ "tensorrt": {+ "label": "TensorRT",+ "description": "TensorRT detector for Nvidia Jetson devices using serialized TensorRT engines for accelerated inference.",+ "device": {+ "label": "GPU Device Index",+ "description": "The GPU device index to use."+ }+ },+ "zmq": {+ "label": "ZMQ IPC",+ "description": "ZMQ IPC detector that offloads inference to an external process via a ZeroMQ IPC endpoint.",+ "endpoint": {+ "label": "ZMQ IPC endpoint",+ "description": "The ZMQ endpoint to connect to."+ },+ "request_timeout_ms": {+ "label": "ZMQ request timeout in milliseconds",+ "description": "Timeout for ZMQ requests in milliseconds."+ },+ "linger_ms": {+ "label": "ZMQ socket linger in milliseconds",+ "description": "Socket linger period in milliseconds."+ }+ }+ },+ "model": {+ "label": "Detection model",+ "description": "Settings to configure a custom object detection model and its input shape.",+ "path": {+ "label": "Custom object detector model path",+ "description": "Path to a custom detection model file (or plus://<model_id> for Frigate+ models)."+ },+ "labelmap_path": {+ "label": "Label map for custom object detector",+ "description": "Path to a labelmap file that maps numeric classes to string labels for the detector."+ },+ "width": {+ "label": "Object detection model input width",+ "description": "Width of the model input tensor in pixels."+ },+ "height": {+ "label": "Object detection model input height",+ "description": "Height of the model input tensor in pixels."+ },+ "labelmap": {+ "label": "Labelmap customization",+ "description": "Overrides or remapping entries to merge into the standard labelmap."+ },+ "attributes_map": {+ "label": "Map of object labels to their attribute labels",+ "description": "Mapping from object labels to attribute labels used to attach metadata (for example 'car' -> ['license_plate'])."+ },+ "input_tensor": {+ "label": "Model Input Tensor Shape",+ "description": "Tensor format expected by the model: 'nhwc' or 'nchw'."+ },+ "input_pixel_format": {+ "label": "Model Input Pixel Color Format",+ "description": "Pixel colorspace expected by the model: 'rgb', 'bgr', or 'yuv'."+ },+ "input_dtype": {+ "label": "Model Input D Type",+ "description": "Data type of the model input tensor (for example 'float32')."+ },+ "model_type": {+ "label": "Object Detection Model Type",+ "description": "Detector model architecture type (ssd, yolox, yolonas) used by some detectors for optimization."+ }+ },+ "genai": {+ "label": "Generative AI configuration",+ "description": "Settings for integrated generative AI providers used to generate object descriptions and review summaries.",+ "api_key": {+ "label": "API key",+ "description": "API key required by some providers (can also be set via environment variables)."+ },+ "base_url": {+ "label": "Base URL",+ "description": "Base URL for self-hosted or compatible providers (for example an Ollama instance)."+ },+ "model": {+ "label": "Model",+ "description": "The model to use from the provider for generating descriptions or summaries."+ },+ "provider": {+ "label": "Provider",+ "description": "The GenAI provider to use (for example: ollama, gemini, openai)."+ },+ "roles": {+ "label": "Roles",+ "description": "GenAI roles (chat, descriptions, embeddings); one provider per role."+ },+ "provider_options": {+ "label": "Provider options",+ "description": "Additional provider-specific options to pass to the GenAI client."+ },+ "runtime_options": {+ "label": "Runtime options",+ "description": "Runtime options passed to the provider for each inference call."+ }+ },+ "audio": {+ "label": "Audio detection",+ "description": "Settings for audio-based event detection for all cameras; can be overridden per-camera.",+ "enabled": {+ "label": "Enable audio detection",+ "description": "Enable or disable audio event detection for all cameras; can be overridden per-camera."+ },+ "max_not_heard": {+ "label": "End timeout",+ "description": "Amount of seconds without the configured audio type before the audio event is ended."+ },+ "min_volume": {+ "label": "Minimum volume",+ "description": "Minimum RMS volume threshold required to run audio detection; lower values increase sensitivity (e.g., 200 high, 500 medium, 1000 low)."+ },+ "listen": {+ "label": "Listen types",+ "description": "List of audio event types to detect (for example: bark, fire_alarm, speech, yell)."+ },+ "filters": {+ "label": "Audio filters",+ "description": "Per-audio-type filter settings such as confidence thresholds used to reduce false positives.",+ "threshold": {+ "label": "Minimum audio confidence",+ "description": "Minimum confidence threshold for the audio event to be counted."+ }+ },+ "enabled_in_config": {+ "label": "Original audio state",+ "description": "Indicates whether audio detection was originally enabled in the static config file."+ },+ "num_threads": {+ "label": "Detection threads",+ "description": "Number of threads to use for audio detection processing."+ }+ },+ "birdseye": {+ "label": "Birdseye",+ "description": "Settings for the Birdseye composite view that composes multiple camera feeds into a single layout.",+ "enabled": {+ "label": "Enable Birdseye",+ "description": "Enable or disable the Birdseye view feature."+ },+ "mode": {+ "label": "Tracking mode",+ "description": "Mode for including cameras in Birdseye: 'objects', 'motion', or 'continuous'."+ },+ "restream": {+ "label": "Restream RTSP",+ "description": "Re-stream the Birdseye output as an RTSP feed; enabling this will keep Birdseye running continuously."+ },+ "width": {+ "label": "Width",+ "description": "Output width (pixels) of the composed Birdseye frame."+ },+ "height": {+ "label": "Height",+ "description": "Output height (pixels) of the composed Birdseye frame."+ },+ "quality": {+ "label": "Encoding quality",+ "description": "Encoding quality for the Birdseye mpeg1 feed (1 highest quality, 31 lowest)."+ },+ "inactivity_threshold": {+ "label": "Inactivity threshold",+ "description": "Seconds of inactivity after which a camera will stop being shown in Birdseye."+ },+ "layout": {+ "label": "Layout",+ "description": "Layout options for the Birdseye composition.",+ "scaling_factor": {+ "label": "Scaling factor",+ "description": "Scaling factor used by the layout calculator (range 1.0 to 5.0)."+ },+ "max_cameras": {+ "label": "Max cameras",+ "description": "Maximum number of cameras to display at once in Birdseye; shows the most recent cameras."+ }+ },+ "idle_heartbeat_fps": {+ "label": "Idle heartbeat FPS",+ "description": "Frames-per-second to resend the last composed Birdseye frame when idle; set to 0 to disable."+ },+ "order": {+ "label": "Position",+ "description": "Numeric position controlling the camera's ordering in the Birdseye layout."+ }+ },+ "detect": {+ "label": "Object Detection",+ "description": "Settings for the detection/detect role used to run object detection and initialize trackers.",+ "enabled": {+ "label": "Enable object detection",+ "description": "Enable or disable object detection for all cameras; can be overridden per-camera."+ },+ "height": {+ "label": "Detect height",+ "description": "Height (pixels) of frames used for the detect stream; leave empty to use the native stream resolution."+ },+ "width": {+ "label": "Detect width",+ "description": "Width (pixels) of frames used for the detect stream; leave empty to use the native stream resolution."+ },+ "fps": {+ "label": "Detect FPS",+ "description": "Desired frames per second to run detection on; lower values reduce CPU usage (recommended value is 5, only set higher - at most 10 - if tracking extremely fast moving objects)."+ },+ "min_initialized": {+ "label": "Minimum initialization frames",+ "description": "Number of consecutive detection hits required before creating a tracked object. Increase to reduce false initializations. Default value is fps divided by 2."+ },+ "max_disappeared": {+ "label": "Maximum disappeared frames",+ "description": "Number of frames without a detection before a tracked object is considered gone."+ },+ "stationary": {+ "label": "Stationary objects config",+ "description": "Settings to detect and manage objects that remain stationary for a period of time.",+ "interval": {+ "label": "Stationary interval",+ "description": "How often (in frames) to run a detection check to confirm a stationary object."+ },+ "threshold": {+ "label": "Stationary threshold",+ "description": "Number of frames with no position change required to mark an object as stationary."+ },+ "max_frames": {+ "label": "Max frames",+ "description": "Limits how long stationary objects are tracked before being discarded.",+ "default": {+ "label": "Default max frames",+ "description": "Default maximum frames to track a stationary object before stopping."+ },+ "objects": {+ "label": "Object max frames",+ "description": "Per-object overrides for maximum frames to track stationary objects."+ }+ },+ "classifier": {+ "label": "Enable visual classifier",+ "description": "Use a visual classifier to detect truly stationary objects even when bounding boxes jitter."+ }+ },+ "annotation_offset": {+ "label": "Annotation offset",+ "description": "Milliseconds to shift detect annotations to better align timeline bounding boxes with recordings; can be positive or negative."+ }+ },+ "ffmpeg": {+ "label": "FFmpeg",+ "description": "FFmpeg settings including binary path, args, hwaccel options, and per-role output args.",+ "path": {+ "label": "FFmpeg path",+ "description": "Path to the FFmpeg binary to use or a version alias (\"7.0\" or \"8.0\")."+ },+ "global_args": {+ "label": "FFmpeg global arguments",+ "description": "Global arguments passed to FFmpeg processes."+ },+ "hwaccel_args": {+ "label": "Hardware acceleration arguments",+ "description": "Hardware acceleration arguments for FFmpeg. Provider-specific presets are recommended."+ },+ "input_args": {+ "label": "Input arguments",+ "description": "Input arguments applied to FFmpeg input streams."+ },+ "output_args": {+ "label": "Output arguments",+ "description": "Default output arguments used for different FFmpeg roles such as detect and record.",+ "detect": {+ "label": "Detect output arguments",+ "description": "Default output arguments for detect role streams."+ },+ "record": {+ "label": "Record output arguments",+ "description": "Default output arguments for record role streams."+ }+ },+ "retry_interval": {+ "label": "FFmpeg retry time",+ "description": "Seconds to wait before attempting to reconnect a camera stream after failure. Default is 10."+ },+ "apple_compatibility": {+ "label": "Apple compatibility",+ "description": "Enable HEVC tagging for better Apple player compatibility when recording H.265."+ },+ "gpu": {+ "label": "GPU index",+ "description": "Default GPU index used for hardware acceleration if available."+ },+ "inputs": {+ "label": "Camera inputs",+ "description": "List of input stream definitions (paths and roles) for this camera.",+ "path": {+ "label": "Input path",+ "description": "Camera input stream URL or path."+ },+ "roles": {+ "label": "Input roles",+ "description": "Roles for this input stream."+ },+ "global_args": {+ "label": "FFmpeg global arguments",+ "description": "FFmpeg global arguments for this input stream."+ },+ "hwaccel_args": {+ "label": "Hardware acceleration arguments",+ "description": "Hardware acceleration arguments for this input stream."+ },+ "input_args": {+ "label": "Input arguments",+ "description": "Input arguments specific to this stream."+ }+ }+ },+ "live": {+ "label": "Live playback",+ "description": "Settings to control the jsmpeg live stream resolution and quality. This does not affect restreamed cameras that use go2rtc for live view.",+ "streams": {+ "label": "Live stream names",+ "description": "Mapping of configured stream names to restream/go2rtc names used for live playback."+ },+ "height": {+ "label": "Live height",+ "description": "Height (pixels) to render the jsmpeg live stream in the Web UI; must be <= detect stream height."+ },+ "quality": {+ "label": "Live quality",+ "description": "Encoding quality for the jsmpeg stream (1 highest, 31 lowest)."+ }+ },+ "motion": {+ "label": "Motion detection",+ "description": "Default motion detection settings applied to cameras unless overridden per-camera.",+ "enabled": {+ "label": "Enable motion detection",+ "description": "Enable or disable motion detection for all cameras; can be overridden per-camera."+ },+ "threshold": {+ "label": "Motion threshold",+ "description": "Pixel difference threshold used by the motion detector; higher values reduce sensitivity (range 1-255)."+ },+ "lightning_threshold": {+ "label": "Lightning threshold",+ "description": "Threshold to detect and ignore brief lighting spikes (lower is more sensitive, values between 0.3 and 1.0). This does not prevent motion detection entirely; it merely causes the detector to stop analyzing additional frames once the threshold is exceeded. Motion-based recordings are still created during these events."+ },+ "skip_motion_threshold": {+ "label": "Skip motion threshold",+ "description": "If set to a value between 0.0 and 1.0, and more than this fraction of the image changes in a single frame, the detector will return no motion boxes and immediately recalibrate. This can save CPU and reduce false positives during lightning, storms, etc., but may miss real events such as a PTZ camera auto‑tracking an object. The trade‑off is between dropping a few megabytes of recordings versus reviewing a couple short clips. Leave unset (None) to disable this feature."+ },+ "improve_contrast": {+ "label": "Improve contrast",+ "description": "Apply contrast improvement to frames before motion analysis to help detection."+ },+ "contour_area": {+ "label": "Contour area",+ "description": "Minimum contour area in pixels required for a motion contour to be counted."+ },+ "delta_alpha": {+ "label": "Delta alpha",+ "description": "Alpha blending factor used in frame differencing for motion calculation."+ },+ "frame_alpha": {+ "label": "Frame alpha",+ "description": "Alpha value used when blending frames for motion preprocessing."+ },+ "frame_height": {+ "label": "Frame height",+ "description": "Height in pixels to scale frames to when computing motion."+ },+ "mask": {+ "label": "Mask coordinates",+ "description": "Ordered x,y coordinates defining the motion mask polygon used to include/exclude areas."+ },+ "mqtt_off_delay": {+ "label": "MQTT off delay",+ "description": "Seconds to wait after last motion before publishing an MQTT 'off' state."+ },+ "enabled_in_config": {+ "label": "Original motion state",+ "description": "Indicates whether motion detection was enabled in the original static configuration."+ },+ "raw_mask": {+ "label": "Raw Mask"+ }+ },+ "objects": {+ "label": "Objects",+ "description": "Object tracking defaults including which labels to track and per-object filters.",+ "track": {+ "label": "Objects to track",+ "description": "List of object labels to track for all cameras; can be overridden per-camera."+ },+ "filters": {+ "label": "Object filters",+ "description": "Filters applied to detected objects to reduce false positives (area, ratio, confidence).",+ "min_area": {+ "label": "Minimum object area",+ "description": "Minimum bounding box area (pixels or percentage) required for this object type. Can be pixels (int) or percentage (float between 0.000001 and 0.99)."+ },+ "max_area": {+ "label": "Maximum object area",+ "description": "Maximum bounding box area (pixels or percentage) allowed for this object type. Can be pixels (int) or percentage (float between 0.000001 and 0.99)."+ },+ "min_ratio": {+ "label": "Minimum aspect ratio",+ "description": "Minimum width/height ratio required for the bounding box to qualify."+ },+ "max_ratio": {+ "label": "Maximum aspect ratio",+ "description": "Maximum width/height ratio allowed for the bounding box to qualify."+ },+ "threshold": {+ "label": "Confidence threshold",+ "description": "Average detection confidence threshold required for the object to be considered a true positive."+ },+ "min_score": {+ "label": "Minimum confidence",+ "description": "Minimum single-frame detection confidence required for the object to be counted."+ },+ "mask": {+ "label": "Filter mask",+ "description": "Polygon coordinates defining where this filter applies within the frame."+ },+ "raw_mask": {+ "label": "Raw Mask"+ }+ },+ "mask": {+ "label": "Object mask",+ "description": "Mask polygon used to prevent object detection in specified areas."+ },+ "raw_mask": {+ "label": "Raw Mask"+ },+ "genai": {+ "label": "GenAI object config",+ "description": "GenAI options for describing tracked objects and sending frames for generation.",+ "enabled": {+ "label": "Enable GenAI",+ "description": "Enable GenAI generation of descriptions for tracked objects by default."+ },+ "use_snapshot": {+ "label": "Use snapshots",+ "description": "Use object snapshots instead of thumbnails for GenAI description generation."+ },+ "prompt": {+ "label": "Caption prompt",+ "description": "Default prompt template used when generating descriptions with GenAI."+ },+ "object_prompts": {+ "label": "Object prompts",+ "description": "Per-object prompts to customize GenAI outputs for specific labels."+ },+ "objects": {+ "label": "GenAI objects",+ "description": "List of object labels to send to GenAI by default."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones that must be entered for objects to qualify for GenAI description generation."+ },+ "debug_save_thumbnails": {+ "label": "Save thumbnails",+ "description": "Save thumbnails sent to GenAI for debugging and review."+ },+ "send_triggers": {+ "label": "GenAI triggers",+ "description": "Defines when frames should be sent to GenAI (on end, after updates, etc.).",+ "tracked_object_end": {+ "label": "Send on end",+ "description": "Send a request to GenAI when the tracked object ends."+ },+ "after_significant_updates": {+ "label": "Early GenAI trigger",+ "description": "Send a request to GenAI after a specified number of significant updates for the tracked object."+ }+ },+ "enabled_in_config": {+ "label": "Original GenAI state",+ "description": "Indicates whether GenAI was enabled in the original static config."+ }+ },+ "filters_attribute": {+ "label": "Attribute filters",+ "description": "Filters applied to detected attributes to reduce false positives (area, ratio, confidence).",+ "min_area": {+ "label": "Minimum attribute area",+ "description": "Minimum bounding box area (pixels or percentage) required for this attribute. Can be pixels (int) or percentage (float between 0.000001 and 0.99)."+ },+ "max_area": {+ "label": "Maximum attribute area",+ "description": "Maximum bounding box area (pixels or percentage) allowed for this attribute. Can be pixels (int) or percentage (float between 0.000001 and 0.99)."+ },+ "min_ratio": {+ "label": "Minimum aspect ratio",+ "description": "Minimum width/height ratio required for the bounding box to qualify."+ },+ "max_ratio": {+ "label": "Maximum aspect ratio",+ "description": "Maximum width/height ratio allowed for the bounding box to qualify."+ },+ "threshold": {+ "label": "Confidence threshold",+ "description": "Average detection confidence threshold required for the attribute to be considered a true positive."+ },+ "min_score": {+ "label": "Minimum confidence",+ "description": "Minimum single-frame detection confidence required to associate this attribute with its parent object."+ },+ "mask": {+ "label": "Filter mask",+ "description": "Polygon coordinates defining where this filter applies within the frame."+ },+ "raw_mask": {+ "label": "Raw Mask"+ }+ }+ },+ "record": {+ "label": "Recording",+ "description": "Recording and retention settings applied to cameras unless overridden per-camera.",+ "enabled": {+ "label": "Enable recording",+ "description": "Enable or disable recording for all cameras; can be overridden per-camera."+ },+ "expire_interval": {+ "label": "Record cleanup interval",+ "description": "Minutes between cleanup passes that remove expired recording segments."+ },+ "continuous": {+ "label": "Continuous retention",+ "description": "Number of days to retain recordings regardless of tracked objects or motion. Set to 0 if you only want to retain recordings of alerts and detections.",+ "days": {+ "label": "Retention days",+ "description": "Days to retain recordings."+ }+ },+ "motion": {+ "label": "Motion retention",+ "description": "Number of days to retain recordings triggered by motion regardless of tracked objects. Set to 0 if you only want to retain recordings of alerts and detections.",+ "days": {+ "label": "Retention days",+ "description": "Days to retain recordings."+ }+ },+ "detections": {+ "label": "Detection retention",+ "description": "Recording retention settings for detection events including pre/post capture durations.",+ "pre_capture": {+ "label": "Pre-capture seconds",+ "description": "Number of seconds before the detection event to include in the recording."+ },+ "post_capture": {+ "label": "Post-capture seconds",+ "description": "Number of seconds after the detection event to include in the recording."+ },+ "retain": {+ "label": "Event retention",+ "description": "Retention settings for recordings of detection events.",+ "days": {+ "label": "Retention days",+ "description": "Number of days to retain recordings of detection events."+ },+ "mode": {+ "label": "Retention mode",+ "description": "Mode for retention: all (save all segments), motion (save segments with motion), or active_objects (save segments with active objects)."+ }+ }+ },+ "alerts": {+ "label": "Alert retention",+ "description": "Recording retention settings for alert events including pre/post capture durations.",+ "pre_capture": {+ "label": "Pre-capture seconds",+ "description": "Number of seconds before the detection event to include in the recording."+ },+ "post_capture": {+ "label": "Post-capture seconds",+ "description": "Number of seconds after the detection event to include in the recording."+ },+ "retain": {+ "label": "Event retention",+ "description": "Retention settings for recordings of detection events.",+ "days": {+ "label": "Retention days",+ "description": "Number of days to retain recordings of detection events."+ },+ "mode": {+ "label": "Retention mode",+ "description": "Mode for retention: all (save all segments), motion (save segments with motion), or active_objects (save segments with active objects)."+ }+ }+ },+ "export": {+ "label": "Export config",+ "description": "Settings used when exporting recordings such as timelapse and hardware acceleration.",+ "hwaccel_args": {+ "label": "Export hwaccel args",+ "description": "Hardware acceleration args to use for export/transcode operations."+ },+ "max_concurrent": {+ "label": "Maximum concurrent exports",+ "description": "Maximum number of export jobs to process at the same time."++ },++ "chapters": {++ "label": "Chapter metadata to embed in exported recordings"+ }+ },+ "preview": {+ "label": "Preview config",+ "description": "Settings controlling the quality of recording previews shown in the UI.",+ "quality": {+ "label": "Preview quality",+ "description": "Preview quality level (very_low, low, medium, high, very_high)."+ }+ },+ "enabled_in_config": {+ "label": "Original recording state",+ "description": "Indicates whether recording was enabled in the original static configuration."+ }+ },+ "review": {+ "label": "Review",+ "description": "Settings that control alerts, detections, and GenAI review summaries used by the UI and storage.",+ "alerts": {+ "label": "Alerts config",+ "description": "Settings for which tracked objects generate alerts and how alerts are retained.",+ "enabled": {+ "label": "Enable alerts",+ "description": "Enable or disable alert generation for all cameras; can be overridden per-camera."+ },+ "labels": {+ "label": "Alert labels",+ "description": "List of object labels that qualify as alerts (for example: car, person)."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones that an object must enter to be considered an alert; leave empty to allow any zone."+ },+ "enabled_in_config": {+ "label": "Original alerts state",+ "description": "Tracks whether alerts were originally enabled in the static configuration."+ },+ "cutoff_time": {+ "label": "Alerts cutoff time",+ "description": "Seconds to wait after no alert-causing activity before cutting off an alert."+ }+ },+ "detections": {+ "label": "Detections config",+ "description": "Settings for which tracked objects generate detections (non-alert) and how detections are retained.",+ "enabled": {+ "label": "Enable detections",+ "description": "Enable or disable detection events for all cameras; can be overridden per-camera."+ },+ "labels": {+ "label": "Detection labels",+ "description": "List of object labels that qualify as detection events."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones that an object must enter to be considered a detection; leave empty to allow any zone."+ },+ "cutoff_time": {+ "label": "Detections cutoff time",+ "description": "Seconds to wait after no detection-causing activity before cutting off a detection."+ },+ "enabled_in_config": {+ "label": "Original detections state",+ "description": "Tracks whether detections were originally enabled in the static configuration."+ }+ },+ "genai": {+ "label": "GenAI config",+ "description": "Controls use of generative AI for producing descriptions and summaries of review items.",+ "enabled": {+ "label": "Enable GenAI descriptions",+ "description": "Enable or disable GenAI-generated descriptions and summaries for review items."+ },+ "alerts": {+ "label": "Enable GenAI for alerts",+ "description": "Use GenAI to generate descriptions for alert items."+ },+ "detections": {+ "label": "Enable GenAI for detections",+ "description": "Use GenAI to generate descriptions for detection items."+ },+ "image_source": {+ "label": "Review image source",+ "description": "Source of images sent to GenAI ('preview' or 'recordings'); 'recordings' uses higher quality frames but more tokens."+ },+ "additional_concerns": {+ "label": "Additional concerns",+ "description": "A list of additional concerns or notes the GenAI should consider when evaluating activity on this camera."+ },+ "debug_save_thumbnails": {+ "label": "Save thumbnails",+ "description": "Save thumbnails that are sent to the GenAI provider for debugging and review."+ },+ "enabled_in_config": {+ "label": "Original GenAI state",+ "description": "Tracks whether GenAI review was originally enabled in the static configuration."+ },+ "preferred_language": {+ "label": "Preferred language",+ "description": "Preferred language to request from the GenAI provider for generated responses."+ },+ "activity_context_prompt": {+ "label": "Activity context prompt",+ "description": "Custom prompt describing what is and is not suspicious activity to provide context for GenAI summaries."+ }+ }+ },+ "snapshots": {+ "label": "Snapshots",+ "description": "Settings for API-generated snapshots of tracked objects for all cameras; can be overridden per-camera.",+ "enabled": {+ "label": "Enable snapshots",+ "description": "Enable or disable saving snapshots for all cameras; can be overridden per-camera."+ },+ "timestamp": {+ "label": "Timestamp overlay",+ "description": "Overlay a timestamp on snapshots from API."+ },+ "bounding_box": {+ "label": "Bounding box overlay",+ "description": "Draw bounding boxes for tracked objects on snapshots from API."+ },+ "crop": {+ "label": "Crop snapshot",+ "description": "Crop snapshots from API to the detected object's bounding box."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones an object must enter for a snapshot to be saved."+ },+ "height": {+ "label": "Snapshot height",+ "description": "Height (pixels) to resize snapshots from API to; leave empty to preserve original size."+ },+ "retain": {+ "label": "Snapshot retention",+ "description": "Retention settings for snapshots including default days and per-object overrides.",+ "default": {+ "label": "Default retention",+ "description": "Default number of days to retain snapshots."+ },+ "objects": {+ "label": "Object retention",+ "description": "Per-object overrides for snapshot retention days."+ }+ },+ "quality": {+ "label": "Snapshot quality",+ "description": "Encode quality for saved snapshots (0-100)."+ }+ },+ "timestamp_style": {+ "label": "Timestamp style",+ "description": "Styling options for in-feed timestamps applied to debug view and snapshots.",+ "position": {+ "label": "Timestamp position",+ "description": "Position of the timestamp on the image (tl/tr/bl/br)."+ },+ "format": {+ "label": "Timestamp format",+ "description": "Datetime format string used for timestamps (Python datetime format codes)."+ },+ "color": {+ "label": "Timestamp color",+ "description": "RGB color values for the timestamp text (all values 0-255).",+ "red": {+ "label": "Red",+ "description": "Red component (0-255) for timestamp color."+ },+ "green": {+ "label": "Green",+ "description": "Green component (0-255) for timestamp color."+ },+ "blue": {+ "label": "Blue",+ "description": "Blue component (0-255) for timestamp color."+ }+ },+ "thickness": {+ "label": "Timestamp thickness",+ "description": "Line thickness of the timestamp text."+ },+ "effect": {+ "label": "Timestamp effect",+ "description": "Visual effect for the timestamp text (none, solid, shadow)."+ }+ },+ "audio_transcription": {+ "label": "Audio transcription",+ "description": "Settings for live and speech audio transcription used for events and live captions.",+ "enabled": {+ "label": "Enable audio transcription",+ "description": "Enable or disable automatic audio transcription for all cameras; can be overridden per-camera."+ },+ "language": {+ "label": "Transcription language",+ "description": "Language code used for transcription/translation (for example 'en' for English). See https://whisper-api.com/docs/languages/ for supported language codes."+ },+ "device": {+ "label": "Transcription device",+ "description": "Device key (CPU/GPU) to run the transcription model on. Only NVIDIA CUDA GPUs are currently supported for transcription."+ },+ "model_size": {+ "label": "Model size",+ "description": "Model size to use for offline audio event transcription."+ },+ "live_enabled": {+ "label": "Live transcription",+ "description": "Enable streaming live transcription for audio as it is received."+ }+ },+ "classification": {+ "label": "Object classification",+ "description": "Settings for classification models used to refine object labels or state classification.",+ "bird": {+ "label": "Bird classification config",+ "description": "Settings specific to bird classification models.",+ "enabled": {+ "label": "Bird classification",+ "description": "Enable or disable bird classification."+ },+ "threshold": {+ "label": "Minimum score",+ "description": "Minimum classification score required to accept a bird classification."+ }+ },+ "custom": {+ "label": "Custom Classification Models",+ "description": "Configuration for custom classification models used for objects or state detection.",+ "enabled": {+ "label": "Enable model",+ "description": "Enable or disable the custom classification model."+ },+ "name": {+ "label": "Model name",+ "description": "Identifier for the custom classification model to use."+ },+ "threshold": {+ "label": "Score threshold",+ "description": "Score threshold used to change the classification state."+ },+ "save_attempts": {+ "label": "Save attempts",+ "description": "How many classification attempts to save for recent classifications UI."+ },+ "object_config": {+ "objects": {+ "label": "Classify objects",+ "description": "List of object types to run object classification on."+ },+ "classification_type": {+ "label": "Classification type",+ "description": "Classification type applied: 'sub_label' (adds sub_label) or other supported types."+ }+ },+ "state_config": {+ "cameras": {+ "label": "Classification cameras",+ "description": "Per-camera crop and settings for running state classification.",+ "crop": {+ "label": "Classification crop",+ "description": "Crop coordinates to use for running classification on this camera."+ }+ },+ "motion": {+ "label": "Run on motion",+ "description": "If true, run classification when motion is detected within the specified crop."+ },+ "interval": {+ "label": "Classification interval",+ "description": "Interval (seconds) between periodic classification runs for state classification."+ }+ }+ }+ },+ "semantic_search": {+ "label": "Semantic Search",+ "description": "Settings for Semantic Search which builds and queries object embeddings to find similar items.",+ "enabled": {+ "label": "Enable semantic search",+ "description": "Enable or disable the semantic search feature."+ },+ "reindex": {+ "label": "Reindex on startup",+ "description": "Trigger a full reindex of historical tracked objects into the embeddings database."+ },+ "model": {+ "label": "Semantic search model or GenAI provider name",+ "description": "The embeddings model to use for semantic search (for example 'jinav1'), or the name of a GenAI provider with the embeddings role."+ },+ "model_size": {+ "label": "Model size",+ "description": "Select model size; 'small' runs on CPU and 'large' typically requires GPU."+ },+ "device": {+ "label": "Device",+ "description": "This is an override, to target a specific device. See https://onnxruntime.ai/docs/execution-providers/ for more information"+ },+ "triggers": {+ "label": "Triggers",+ "description": "Actions and matching criteria for camera-specific semantic search triggers.",+ "friendly_name": {+ "label": "Friendly name",+ "description": "Optional friendly name displayed in the UI for this trigger."+ },+ "enabled": {+ "label": "Enable this trigger",+ "description": "Enable or disable this semantic search trigger."+ },+ "type": {+ "label": "Trigger type",+ "description": "Type of trigger: 'thumbnail' (match against image) or 'description' (match against text)."+ },+ "data": {+ "label": "Trigger content",+ "description": "Text phrase or thumbnail ID to match against tracked objects."+ },+ "threshold": {+ "label": "Trigger threshold",+ "description": "Minimum similarity score (0-1) required to activate this trigger."+ },+ "actions": {+ "label": "Trigger actions",+ "description": "List of actions to execute when trigger matches (notification, sub_label, attribute)."+ }+ }+ },+ "face_recognition": {+ "label": "Face recognition",+ "description": "Settings for face detection and recognition for all cameras; can be overridden per-camera.",+ "enabled": {+ "label": "Enable face recognition",+ "description": "Enable or disable face recognition for all cameras; can be overridden per-camera."+ },+ "model_size": {+ "label": "Model size",+ "description": "Model size to use for face embeddings (small/large); larger may require GPU."+ },+ "unknown_score": {+ "label": "Unknown score threshold",+ "description": "Distance threshold below which a face is considered a potential match (higher = stricter)."+ },+ "detection_threshold": {+ "label": "Detection threshold",+ "description": "Minimum detection confidence required to consider a face detection valid."+ },+ "recognition_threshold": {+ "label": "Recognition threshold",+ "description": "Face embedding distance threshold to consider two faces a match."+ },+ "min_area": {+ "label": "Minimum face area",+ "description": "Minimum area (pixels) of a detected face box required to attempt recognition."+ },+ "min_faces": {+ "label": "Minimum faces",+ "description": "Minimum number of face recognitions required before applying a recognized sub-label to a person."+ },+ "save_attempts": {+ "label": "Save attempts",+ "description": "Number of face recognition attempts to retain for recent recognition UI."+ },+ "blur_confidence_filter": {+ "label": "Blur confidence filter",+ "description": "Adjust confidence scores based on image blur to reduce false positives for poor quality faces."+ },+ "device": {+ "label": "Device",+ "description": "This is an override, to target a specific device. See https://onnxruntime.ai/docs/execution-providers/ for more information"+ }+ },+ "lpr": {+ "label": "License Plate Recognition",+ "description": "License plate recognition settings including detection thresholds, formatting, and known plates.",+ "enabled": {+ "label": "Enable LPR",+ "description": "Enable or disable license plate recognition for all cameras; can be overridden per-camera."+ },+ "model_size": {+ "label": "Model size",+ "description": "Model size used for text detection/recognition. Most users should use 'small'."+ },+ "detection_threshold": {+ "label": "Detection threshold",+ "description": "Detection confidence threshold to begin running OCR on a suspected plate."+ },+ "min_area": {+ "label": "Minimum plate area",+ "description": "Minimum plate area (pixels) required to attempt recognition."+ },+ "recognition_threshold": {+ "label": "Recognition threshold",+ "description": "Confidence threshold required for recognized plate text to be attached as a sub-label."+ },+ "min_plate_length": {+ "label": "Min plate length",+ "description": "Minimum number of characters a recognized plate must contain to be considered valid."+ },+ "format": {+ "label": "Plate format regex",+ "description": "Optional regex to validate recognized plate strings against an expected format."+ },+ "match_distance": {+ "label": "Match distance",+ "description": "Number of character mismatches allowed when comparing detected plates to known plates."+ },+ "known_plates": {+ "label": "Known plates",+ "description": "List of plates or regexes to specially track or alert on."+ },+ "enhancement": {+ "label": "Enhancement level",+ "description": "Enhancement level (0-10) to apply to plate crops prior to OCR; higher values may not always improve results, levels above 5 may only work with night time plates and should be used with caution."+ },+ "debug_save_plates": {+ "label": "Save debug plates",+ "description": "Save plate crop images for debugging LPR performance."+ },+ "device": {+ "label": "Device",+ "description": "This is an override, to target a specific device. See https://onnxruntime.ai/docs/execution-providers/ for more information"+ },+ "replace_rules": {+ "label": "Replacement rules",+ "description": "Regex replacement rules used to normalize detected plate strings before matching.",+ "pattern": {+ "label": "Regex pattern"+ },+ "replacement": {+ "label": "Replacement string"+ }+ },+ "expire_time": {+ "label": "Expire seconds",+ "description": "Time in seconds after which an unseen plate is expired from the tracker (for dedicated LPR cameras only)."+ }+ },+ "camera_groups": {+ "label": "Camera groups",+ "description": "Configuration for named camera groups used to organize cameras in the UI.",+ "cameras": {+ "label": "Camera list",+ "description": "Array of camera names included in this group."+ },+ "icon": {+ "label": "Group icon",+ "description": "Icon used to represent the camera group in the UI."+ },+ "order": {+ "label": "Sort order",+ "description": "Numeric order used to sort camera groups in the UI; larger numbers appear later."+ }+ },+ "profiles": {+ "label": "Profiles",+ "description": "Named profile definitions with friendly names. Camera profiles must reference names defined here.",+ "friendly_name": {+ "label": "Friendly name",+ "description": "Display name for this profile shown in the UI."+ }+ },+ "active_profile": {+ "label": "Active profile",+ "description": "Currently active profile name. Runtime-only, not persisted in YAML."+ },+ "camera_mqtt": {+ "label": "MQTT",+ "description": "MQTT image publishing settings.",+ "enabled": {+ "label": "Send image",+ "description": "Enable publishing image snapshots for objects to MQTT topics for this camera."+ },+ "timestamp": {+ "label": "Add timestamp",+ "description": "Overlay a timestamp on images published to MQTT."+ },+ "bounding_box": {+ "label": "Add bounding box",+ "description": "Draw bounding boxes on images published over MQTT."+ },+ "crop": {+ "label": "Crop image",+ "description": "Crop images published to MQTT to the detected object's bounding box."+ },+ "height": {+ "label": "Image height",+ "description": "Height (pixels) to resize images published over MQTT."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Zones that an object must enter for an MQTT image to be published."+ },+ "quality": {+ "label": "JPEG quality",+ "description": "JPEG quality for images published to MQTT (0-100)."+ }+ },+ "camera_ui": {+ "label": "Camera UI",+ "description": "Display ordering and visibility for this camera in the UI. Ordering affects the default dashboard. For more granular control, use camera groups.",+ "order": {+ "label": "UI order",+ "description": "Numeric order used to sort the camera in the UI (default dashboard and lists); larger numbers appear later."+ },+ "dashboard": {+ "label": "Show in UI",+ "description": "Toggle whether this camera is visible everywhere in the Frigate UI. Disabling this will require manually editing the config to view this camera in the UI again."+ },+ "review": {+ "label": "Show in review",+ "description": "Toggle whether this camera is visible in review (the review page and its camera filter, motion review, and the history view)."+ }+ },+ "onvif": {+ "label": "ONVIF",+ "description": "ONVIF connection and PTZ autotracking settings for this camera.",+ "host": {+ "label": "ONVIF host",+ "description": "Host (and optional scheme) for the ONVIF service for this camera."+ },+ "port": {+ "label": "ONVIF port",+ "description": "Port number for the ONVIF service."+ },+ "user": {+ "label": "ONVIF username",+ "description": "Username for ONVIF authentication; some devices require admin user for ONVIF."+ },+ "password": {+ "label": "ONVIF password",+ "description": "Password for ONVIF authentication."+ },+ "tls_insecure": {+ "label": "Disable TLS verify",+ "description": "Skip TLS verification and disable digest auth for ONVIF (unsafe; use in safe networks only)."+ },+ "profile": {+ "label": "ONVIF profile",+ "description": "Specific ONVIF media profile to use for PTZ control, matched by token or name. If not set, the first profile with valid PTZ configuration is selected automatically."+ },+ "autotracking": {+ "label": "Autotracking",+ "description": "Automatically track moving objects and keep them centered in the frame using PTZ camera movements.",+ "enabled": {+ "label": "Enable Autotracking",+ "description": "Enable or disable automatic PTZ camera tracking of detected objects."+ },+ "calibrate_on_startup": {+ "label": "Calibrate on start",+ "description": "Measure PTZ motor speeds on startup to improve tracking accuracy. Frigate will update config with movement_weights after calibration."+ },+ "zooming": {+ "label": "Zoom mode",+ "description": "Control zoom behavior: disabled (pan/tilt only), absolute (most compatible), or relative (concurrent pan/tilt/zoom)."+ },+ "zoom_factor": {+ "label": "Zoom factor",+ "description": "Control zoom level on tracked objects. Lower values keep more scene in view; higher values zoom in closer but may lose tracking. Values between 0.1 and 0.75."+ },+ "track": {+ "label": "Tracked objects",+ "description": "List of object types that should trigger autotracking."+ },+ "required_zones": {+ "label": "Required zones",+ "description": "Objects must enter one of these zones before autotracking begins."+ },+ "return_preset": {+ "label": "Return preset",+ "description": "ONVIF preset name configured in camera firmware to return to after tracking ends."+ },+ "timeout": {+ "label": "Return timeout",+ "description": "Wait this many seconds after losing tracking before returning camera to preset position."+ },+ "movement_weights": {+ "label": "Movement weights",+ "description": "Calibration values automatically generated by camera calibration. Do not modify manually."+ },+ "enabled_in_config": {+ "label": "Original autotrack state",+ "description": "Internal field to track whether autotracking was enabled in configuration."+ }+ },+ "ignore_time_mismatch": {+ "label": "Ignore time mismatch",+ "description": "Ignore time synchronization differences between camera and Frigate server for ONVIF communication."+ }+ }+}