{
  "description": "Scan one or more videos for motion events and save them. Regions, overlays, config files and time-range options are mostly left out.",
  "options": [
    {
      "names": [
        "--input",
        "-i"
      ],
      "description": "Repeat to scan several videos (not supported with the ffmpeg and copy output modes).",
      "args": {
        "name": "input",
        "description": "Repeat to scan several videos (not supported with the ffmpeg and copy output modes).",
        "isOptional": false,
        "isVariadic": true,
        "template": "filepaths"
      },
      "isRepeatable": true
    },
    {
      "names": [
        "--output-dir",
        "-d"
      ],
      "description": "Defaults to the working directory.",
      "args": {
        "name": "output_dir",
        "description": "Defaults to the working directory.",
        "isOptional": false,
        "template": "folders"
      }
    },
    {
      "names": [
        "--output-mode",
        "-m"
      ],
      "description": "Output mode",
      "args": {
        "name": "output_mode",
        "isOptional": false,
        "suggestions": [
          {
            "name": "encode",
            "description": "Encode (MP4, H.264)"
          },
          {
            "name": "opencv",
            "description": "OpenCV (AVI)"
          },
          {
            "name": "ffmpeg",
            "description": "ffmpeg"
          },
          {
            "name": "copy",
            "description": "Copy streams"
          }
        ]
      }
    },
    {
      "names": [
        "--scan-only",
        "-so"
      ],
      "description": "Detect and list events without saving video."
    },
    {
      "names": [
        "--threshold",
        "-t"
      ],
      "description": "Lower values are more sensitive to motion.",
      "args": {
        "name": "threshold",
        "description": "Lower values are more sensitive to motion.",
        "isOptional": false
      }
    },
    {
      "names": [
        "--min-event-length",
        "-l"
      ],
      "description": "Minimum event length",
      "args": {
        "name": "min_event_length",
        "isOptional": false
      }
    },
    {
      "names": [
        "--time-before-event",
        "-tb"
      ],
      "description": "Time before event",
      "args": {
        "name": "time_before",
        "isOptional": false
      }
    },
    {
      "names": [
        "--time-post-event",
        "-tp"
      ],
      "description": "Time after event",
      "args": {
        "name": "time_post",
        "isOptional": false
      }
    },
    {
      "names": [
        "--start-time",
        "-st"
      ],
      "description": "Timecode to start detection from, for example 00:35:52.",
      "args": {
        "name": "start_time",
        "description": "Timecode to start detection from, for example 00:35:52.",
        "isOptional": false
      }
    },
    {
      "names": [
        "--end-time",
        "-et"
      ],
      "description": "End time",
      "args": {
        "name": "end_time",
        "isOptional": false
      }
    },
    {
      "names": [
        "--downscale-factor",
        "-df"
      ],
      "description": "Downscale factor",
      "args": {
        "name": "downscale_factor",
        "isOptional": false
      }
    },
    {
      "names": [
        "--frame-skip",
        "-fs"
      ],
      "description": "Frame skip",
      "args": {
        "name": "frame_skip",
        "isOptional": false
      }
    },
    {
      "names": [
        "--bg-subtractor",
        "-b"
      ],
      "description": "Background subtractor",
      "args": {
        "name": "bg_subtractor",
        "isOptional": false,
        "suggestions": [
          {
            "name": "MOG2",
            "description": "MOG2"
          },
          {
            "name": "CNT",
            "description": "CNT"
          },
          {
            "name": "MOG2_CUDA",
            "description": "MOG2 (CUDA)"
          }
        ]
      }
    },
    {
      "names": [
        "--bounding-box",
        "-bb"
      ],
      "description": "Draw bounding box"
    },
    {
      "names": [
        "--time-code",
        "-tc"
      ],
      "description": "Draw time code"
    },
    {
      "names": [
        "--report"
      ],
      "description": "A .csv or .json file listing the detected events.",
      "args": {
        "name": "report",
        "description": "A .csv or .json file listing the detected events.",
        "isOptional": false,
        "template": "filepaths"
      },
      "isDangerous": true
    },
    {
      "names": [
        "--quiet",
        "-q"
      ],
      "description": "Quiet"
    }
  ],
  "name": "dvr-scan"
}
