> ## Documentation Index
> Fetch the complete documentation index at: https://docs.efference.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Parameters

> InitParameters, RuntimeParameters, RecordingParameters

## InitParameters

Passed to `open()`. Transport selection plus the session configuration,
validated against the device's advertised capabilities. An unsupported
combination fails with `INVALID_RESOLUTION` / `INVALID_FPS` /
`UNSUPPORTED_COMPRESSION`.

### Transport

| Field          | Default    | Meaning                                                                                            |
| -------------- | ---------- | -------------------------------------------------------------------------------------------------- |
| `input_type`   | `USB`      | `USB`, `STREAM` (BLE control), or `MCAP` (replay)                                                  |
| `ble_address`  | none       | BLE MAC, required for `STREAM`                                                                     |
| `mcap_path`    | none       | file path, required for `MCAP`                                                                     |
| `device_id`    | `0`        | which M1 when several are on USB                                                                   |
| `udp_host`     | `""`       | `STREAM` only: this host's IP, where the device pushes video and IMU. Empty = control-only session |
| `udp_port`     | `5005`     | UDP stream port                                                                                    |
| `ble_password` | `"123456"` | control password; used on any BLE link, and on USB once locked                                     |

### Session

| Field               | Default | Meaning                                            |
| ------------------- | ------- | -------------------------------------------------- |
| `resolution`        | `AUTO`  | capture geometry (`AUTO` = device native)          |
| `fps`               | `30`    | frame rate                                         |
| `compression`       | `H265`  | wire codec (see `COMPRESSION_MODE`)                |
| `flip_mode`         | `OFF`   | 180° host-side rotation (`AUTO` = decide from IMU) |
| `enable_imu`        | `true`  | include IMU packets on the wire                    |
| `coordinate_system` | `IMAGE` | convention for IMU/pose data                       |

### Grab behavior

| Field                 | Default | Meaning                          |
| --------------------- | ------- | -------------------------------- |
| `grab_timeout_ms`     | `1000`  | max block in `grab()`            |
| `drop_partial_frames` | `true`  | silently discard lossy frames    |
| `verbose`             | `0`     | `1` = connection trace on stderr |

## RuntimeParameters

Passed to `grab()`, per call:

| Field            | Default | Meaning                                                       |
| ---------------- | ------- | ------------------------------------------------------------- |
| `timeout_ms`     | `0`     | override `grab_timeout_ms` (`0` = use init value)             |
| `return_partial` | `false` | deliver lossy frames as `CORRUPTED_FRAME` instead of dropping |

## RecordingParameters

Passed to `enable_recording()`:

| Field                       | Default     | Meaning                                                             |
| --------------------------- | ----------- | ------------------------------------------------------------------- |
| `target`                    | `HOST_FILE` | `HOST_FILE` (local `.mcap`) or `DEVICE_LOCAL` (on-device)           |
| `path`                      | none        | HOST\_FILE: output `.mcap` path                                     |
| `name`                      | `""`        | DEVICE\_LOCAL: session name (`""` = device picks `rec_<utc>_<seq>`) |
| `has_location` / `location` | unset       | per-session `Location` override                                     |
