nvr_export_clip
Export a recorded NVR time window to an MP4 clip. Optionally re-encode to fit a target file size, with lossless copy by default.
Instructions
Export a replay window (ISO-8601 start/end, UTC offset required) to an mp4 in the export dir. By default uses ffmpeg -c copy (lossless). Writes to local disk, so it is gated like a write: VIGI_NVR_ALLOW_WRITES=true AND confirm_write=true. VIGI_NVR_DRY_RUN returns the argv with the URL redacted. Window <= VIGI_NVR_EXPORT_MAX_MINUTES. Set target_max_mb (e.g. 20 for Gmail) and/or max_width to re-encode with libx264 (CRF/scale chosen from duration and target) so the file fits; then also returns original_bytes, encoded_bytes and fits_target. Returns path, bytes, duration_s, sha256 and a redacted ffmpeg stderr tail. An empty window surfaces as NO_FOOTAGE_IN_WINDOW.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| start | Yes | ||
| stream | No | ||
| channel | Yes | ||
| max_width | No | ||
| confirm_write | No | Must be the JSON boolean true to authorise this mutating write. A string such as "true"/"1"/"yes" does NOT count and the write is refused with no network call; re-send with the boolean confirm_write=true after confirming the change with the operator. | |
| target_max_mb | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||