process

mio process

Command group for video processing.

Usage

mio process [OPTIONS] COMMAND [ARGS]...

concat

Concatenate sequential recording segments from one DAQ into a single video.

Use this to combine multiple segment files (e.g. long-2.avi, long-3.avi, …) from the same DAQ before stitching across DAQs.

Usage

mio process concat [OPTIONS]

Options

-i, --inputs <inputs>

Required Paths to video files. Each requires a .csv with the same stem name.

-o, --output <output>

Required Path to the output concatenated video file or directory. If not specified, saves next to video with ‘_combined’ suffix.

denoise

Denoise a video file by detecting and removing frames with noisy areas.

Processing steps (noisy area detection, frequency masking, minimum projection subtraction) are configured via the YAML config file.

Usage

mio process denoise [OPTIONS]

Options

-i, --input <input>

Required Path to the video file to process.

-c, --denoise_config <denoise_config>

Required Path to the YAML processing configuration file.

-o, --output-dir <output_dir>

Output directory for denoised files. If not specified, uses directory of input video.

-f, --force

Overwrite any existing files

remove-frames

Remove specific frames by index from a video.

A manual cleanup step for removing individual bad frames after reviewing the output. Also updates the companion CSV metadata to match.

Usage

mio process remove-frames [OPTIONS]

Options

-i, --input <input>

Required Path to the video file. Each requires a .csv with the same stem name.

-o, --output <output>

Path to the output video file.If not specified, add a ‘_removed’ suffix and write to same directory

-f, --frames <frames>

Required Comma-separated list of 0-based frame indices to remove (e.g. ‘0,5,10,42’).

--force

stitch

Stitch multiple video recordings into one by selecting the best frame for each device timestamp using metadata scoring and edge detection.

Currently tested with 2 inputs. More may work but are untested.

Usage

mio process stitch [OPTIONS]

Options

-i, --inputs <inputs>

Required Paths to video files. Each requires a .csv with the same stem name.

-o, --output <output>

Directory for output videos and metadata. If none provided, same as the inputs.

-c, --config <config>

A config id or path for a DenoiseConfig used to score frames if no noise score exists.If not provided, default config is used.

--debug-video

Output path for debug video showing frame comparisons.

-f, --force

Overwrite any existing files

trim

Crop a video by removing frames from the start and/or end.

Also trims and renumbers the companion CSV metadata to match.

Usage

mio process trim [OPTIONS]

Options

-i, --input <input>

Required Path to the video file to trim.

-o, --output <output>

Path to the output video file or directory. If a directory, the output filename will be generated from the input filename. If not specified, saves to input file name with ‘_trimmed’ suffix.

-s, --trim-start <trim_start>

Number of frames to remove from the beginning. Default: 0.

-e, --trim-end <trim_end>

Number of frames to remove from the end. Default: 0.

-f, --force

Overwrite any existing files

workflow

Complete workflow: stitch → trim → denoise with validation at each step.

Usage

mio process workflow [OPTIONS]

Options

-i, --inputs <inputs>

Required Paths to video files. Each requires a .csv with the same stem name.

-o, --output <output>

Base path for output files (stitched, cropped, denoised) or directory. If not specified, uses input directory.

-c, --denoise_config <denoise_config>

Required Path to the YAML processing configuration file.

-s, --trim-start <trim_start>

Number of frames to remove from the start (default: 0).

-e, --trim-end <trim_end>

Number of frames to remove from the end (default: 0).

-f, --force

Overwrite any existing files