reprostim split-video

Utility to to split recorded video files manually or based on embedded QR codes.

Usage

reprostim split-video [OPTIONS]

Options

--buffer-before <buffer_before>

Duration buffer to include before the start time. Accepts seconds (e.g., ‘10’ or ‘10.5’) or ISO 8601 duration (e.g., ‘P10S’). If the buffer extends before the video start, it will be trimmed to 0.

--buffer-after <buffer_after>

Duration buffer to include after the end time. Accepts seconds (e.g., ‘10’ or ‘10.5’) or ISO 8601 duration (e.g., ‘P10S’). If the buffer extends beyond the video end, it will be trimmed to video length.

--buffer-policy <buffer_policy>

Policy for handling buffer overflow. ‘strict’ (default): error if buffers extend beyond video boundaries. ‘flexible’: trim buffers to fit within video boundaries.

Options:

strict | flexible

--spec <spec>

Compact segment specification. Format: START/DURATION or START//END. Repeatable for multiple segments. Mutually exclusive with –start, –duration, –end. Examples: ‘2024-02-02T17:30:00/PT3M’, ‘17:30:00//17:33:00’, ‘300/180’

--start <start>

Start time in ISO 8601 format (e.g., ‘2024-02-02T17:30:00’). Must be within the input video’s time range. In raw mode, only time is used as offset from the start of the video and not the absolute datetime.

--duration <duration>

Duration of the output video. Accepts seconds (e.g., ‘180’ or ‘180.5’) or ISO 8601 duration (e.g., ‘P3M’ for 3 minutes). Mutually exclusive with –end.

--end <end>

End time in ISO 8601 format (e.g., ‘2024-02-02T17:33:00’). Mutually exclusive with –duration. In raw mode, only time is used as offset from the start of the video and not the absolute datetime.

-i, --input <input_path>

Required Input video file path. Filename must include timestamp in format: YYYY.MM.DD.HH.MM.SS.mmm_YYYY.MM.DD.HH.MM.SS.mmm.mkv

-o, --output <output>

Required Output .mkv file path. A sidecar .json file will be created with the same basename containing metadata.

-j, --sidecar-json <sidecar_json>

Create a sidecar JSON file with split metadata. When specified without a path or ‘auto’, creates ‘<output>.split-video.jsonl’. When specified with a path, uses that path. If not specified, or specified as ‘none’, no sidecar file is created.

-a, --video-audit-file <video_audit_file>

Path to video audit TSV file. If provided, uses this file instead of generating video metadata on-the-fly.

--raw

Enable raw mode for video splitting. In this mode any video file can be used as is to split/crop .mkv/.mp4file, utility will work without specific metadata in logs and file name.

-k, --lock <lock>

Whether to acquire the advisory file lock (videos.tsv.lock) before reading the video audit TSV file. Use ‘no’ for dirty-read mode when the lock is held by a different OS user.

Default:

'yes'

Options:

yes | no

-v, --verbose

Enable verbose output with JSON records.