# Recording Containers: VRS, MCAP and GPMF

> How the three multi-sensor recording formats used in egocentric capture (MCAP, Meta's VRS and GoPro's GPMF) store streams, timestamps, schemas and calibration, how they differ from training formats such as LeRobotDataset v3.0, and the command-line tools to inspect, convert and repair them.

Page: https://egocam.ai/capture-ops/recording-formats-vrs-mcap-gpmf/

A **recording container** is a file format that holds time-stamped records from several sensors in one file: camera streams, IMU samples, audio, pose tracks, plus the schema definitions and device metadata needed to decode them. A plain video file holds compressed frames and audio. A multi-sensor container also keeps per-sample timestamps, sensor configuration and, often, [calibration](https://egocam.ai/calibration/calibration-in-datasets/).

Three containers cover most public egocentric capture today:

- **MCAP (`.mcap`)**, an open container for timestamped pub/sub messages, and the default storage format of ROS 2 bags. Lightwheel ships its head-only [EgoStandard](https://huggingface.co/datasets/LightwheelAI/EgoStandard) and head-plus-wrist [EgoPro](https://huggingface.co/datasets/LightwheelAI/EgoPro) datasets as MCAP (and as LeRobot).
- **VRS (`.vrs`)**, Meta's format for per-device sensor streams, used by [Project Aria](https://egocam.ai/hardware/research-glasses-project-aria/) glasses (Gen 1 and Gen 2) and by the raw release of [Ego-1K](https://arxiv.org/abs/2603.13741), whose head rig has 12 fisheye cameras around a Quest 3 headset with 4 forward-facing cameras.
- **GPMF**, GoPro's telemetry format, stored as a metadata track inside the camera's MP4. Anything built on a GoPro, such as the [UMI gripper](https://egocam.ai/hardware/handheld-grippers-umi/), gets its IMU data from it.

After quality control, many teams repackage episodes into a training format such as Hugging Face's [LeRobotDataset v3.0](https://huggingface.co/docs/lerobot/lerobot-dataset-v3). That is a different job, covered at the end of this page. Where containers sit in the whole pipeline is on [Anatomy of a Capture Pipeline](https://egocam.ai/basics/anatomy-of-a-capture-pipeline/); data rates and disk sizing are on [Power, Storage and Bandwidth](https://egocam.ai/hardware/power-storage-and-bandwidth/).

## Terms used on this page

For the field guide's terms in one place, grouped by topic, see the [glossary](https://egocam.ai/reference/glossary/).

| Term | Meaning |
| :--- | :--- |
| **Recording container** | A file format that interleaves several sensor streams, their timestamps and metadata in one file. |
| **Stream / channel** | The records from one sensor or topic. MCAP calls it a *Channel* (`op=0x04`); VRS a *stream*, identified by a `StreamId`; GPMF nests each one in a `STRM` inside a device block (`DEVC`). |
| **Schema** | The definition that tells a reader how to parse a record's bytes. MCAP: `Schema` records (`op=0x03`). VRS: `RecordFormat` and `DataLayout` definitions stored in each stream's tags. GPMF: modifier keys such as `TYPE`, `SCAL` and `SIUN` placed before the data. |
| **Chunk** | In MCAP, a batch of records compressed together (`zstd`, `lz4` or none) and indexed as a block. |
| **Append-only writing** | The recorder writes forward and never seeks back, so a crash or power loss damages at most the record being written. |
| **Index / summary** | Metadata written at the end of the file that maps time and stream to byte offsets, for fast seeking. If a recording is cut off, it is missing and must be rebuilt. |
| **Attachment / tag** | A slot for things that are not streams: calibration files, serial numbers, firmware versions. MCAP has `Attachment` (`op=0x09`) and `Metadata` (`op=0x0C`) records; VRS has file tags and stream tags. |
| **Time domain** | The clock that timestamps are expressed in (device boot time, Unix epoch, a shared trigger clock). See [Why Synchronisation Matters](https://egocam.ai/sync/why-sync-matters/). |
| **KLV** | Key-Length-Value: each item is a key, a length field describing the data, then the data. GPMF is built this way. |

## The formats side by side

| Feature | MCAP | VRS | GPMF (in GoPro MP4) | LeRobotDataset v3.0 |
| :--- | :--- | :--- | :--- | :--- |
| **Role** | General multi-sensor log for pub/sub systems such as ROS 2 | Per-device sensor streams; Meta's wearables | Telemetry track inside action-camera video | Training dataset, written after capture or by LeRobot's recorder |
| **Public 2025–2026 examples** | EgoStandard, EgoPro | Ego-1K raw release, [Aria Gen 2 Pilot Dataset](https://arxiv.org/abs/2510.16134), Aria Gen 1 datasets | GoPro HERO5 to HERO13, MAX, MAX2, MISSION 1; [UMI](https://egocam.ai/umi/handheld-gripper-capture/) | EgoStandard and EgoPro (alternative release); LeRobot Hub datasets |
| **Payload encoding** | Any; the spec registers well-known encodings such as ROS 2 CDR, Protobuf and JSON | Typed content blocks: `DataLayout` metadata, images (`raw`, `png`, `jpg`, `jxl`, `video`), audio (`audio/pcm` in the docs' example), custom | Big-endian, 32-bit-aligned KLV with FourCC keys | Parquet for states, actions and timestamps; MP4 per camera |
| **Timestamps** | Two `uint64` nanosecond fields per message, `log_time` and `publish_time` | One `double` in seconds per record, one time domain for the whole file | Taken from the MP4 track timing; `TSMP` sample counts let you recover each sensor's real rate | `timestamp` per frame; `delta_timestamps` selects temporal windows when loading |
| **Calibration** | `Attachment` or `Metadata` records, or a dedicated topic | File or stream tags (Aria stores factory calibration as the `calib_json` file tag), or `Configuration` records | `FOVL` lens model (`ZFOV`, `VFOV`, `PYCF`, `POLY`) and `SROT` readout time in global metadata | No calibration slot in the format; ship it alongside |
| **Compression** | Per chunk, `zstd` or `lz4` | Per record, `lz4` or `zstd`; video codecs for images | Video is H.264 or HEVC; telemetry is raw, often scaled integers | Parquet compression; encoded MP4 |
| **Interrupted recording** | Append-only; only the last message is at risk | Records are daisy-chained; the index can be rebuilt (`vrs fix-index`) | Not covered by the README (HERO4 and HERO5 add an `SOS` recovery track) | Parquet files are corrupt unless `finalize()` was called |

Sources for the table: [MCAP spec](https://mcap.dev/spec), [VRS File Structure](https://facebookresearch.github.io/vrs/docs/FileStructure), [VRS Image Support](https://facebookresearch.github.io/vrs/docs/ImageSupport), [VRS CLI tool](https://facebookresearch.github.io/vrs/docs/VrsCliTool), [projectaria_tools `VrsDataProviderFactory.cpp`](https://github.com/facebookresearch/projectaria_tools/blob/main/core/data_provider/VrsDataProviderFactory.cpp), [gpmf-parser README](https://github.com/gopro/gpmf-parser), [LeRobotDataset v3.0 docs](https://huggingface.co/docs/lerobot/lerobot-dataset-v3), and the dataset cards linked above.

> **Diagram:** What is inside each file, top to bottom. MCAP batches timestamped messages into compressed chunks and writes indexes in a summary at the end. VRS keeps one stream per device, each with configuration, state and data records, and writes its index last, so a cut-off file can be repaired. A GoPro MP4 carries telemetry as a fourth track of nested key-length-value items. From the MCAP spec, the VRS docs and the gpmf-parser README.

### What each format is built for

- **MCAP** suits rigs that already publish messages, ROS 2 or otherwise. Its schemas travel inside the file, so other tools can decode custom message types without your code. Foxglove lists official libraries in C++, Python, Go and TypeScript ([Introducing the MCAP file format](https://foxglove.dev/blog/introducing-the-mcap-file-format)), and Foxglove and PlotJuggler both open MCAP ([Announcing the MCAP storage plugin for ROS 2](https://www.foxglove.dev/blog/announcing-the-mcap-storage-plugin-for-ros2)).
- **VRS** is the native format when you work with Aria glasses or Meta's tooling. Meta's own description of its use cases is records that are "similar looking bundles of data produced repeatedly over a period of time"; it calls VRS "a poor choice" for data without temporal regularity, such as point clouds or 3D models ([VRS docs: Overview](https://facebookresearch.github.io/vrs/docs/Overview)).
- **GPMF** is what you read when the camera is a GoPro. It is not a general logging format for your own rig; GoPro keeps writing tools in a separate repository ([gpmf-parser README](https://github.com/gopro/gpmf-parser)).

Before MCAP, Foxglove notes, teams used ROS 1 `.bag` files, ROS 2's SQLite `.db3` (which it calls "not fully self-contained"), length-delimited Protobuf, or opaque bytes inside HDF5 files ([Introducing the MCAP file format](https://foxglove.dev/blog/introducing-the-mcap-file-format)).

## MCAP

The [MCAP Format Specification](https://mcap.dev/spec) opens: "MCAP is a modular container file format for recording timestamped pub/sub messages with arbitrary serialization formats." Its media type is `application/vnd.mcap`. Foxglove introduced it in 2022 and credits the ROS Tooling Working Group for collaborating on the spec ([Introducing the MCAP file format](https://foxglove.dev/blog/introducing-the-mcap-file-format)). The [rosbag2 README](https://github.com/ros2/rosbag2) states that the default storage plugin for ROS 2 bags is `mcap`.

### File layout and records

A file begins and ends with the magic bytes `0x89, M, C, A, P, 0x30, \r, \n` (`0x30` is ASCII `0`, the major version) and follows `<Magic><Header><Data section>[<Summary section>][<Summary Offset section>]<Footer><Magic>`. Every record is a one-byte opcode, a `uint64` content length, then the content. Integers are little-endian ([MCAP spec](https://mcap.dev/spec)).

| Section | Record (opcode) | Fields and use |
| :--- | :--- | :--- |
| Header | `Header` (`0x01`) | `profile` and `library` strings. |
| Data | `Schema` (`0x03`) | `id` (`uint16`, non-zero), `name`, `encoding`, `data`. |
| Data | `Channel` (`0x04`) | `id`, `schema_id`, `topic` (for example a left camera or a wrist IMU), `message_encoding`, `metadata` map. |
| Data | `Message` (`0x05`) | `channel_id`, `sequence` (`uint32`, an optional counter "to detect message gaps"), `log_time`, `publish_time`, `data`. |
| Data | `Chunk` (`0x06`) | A batch of Schema, Channel and Message records, with `message_start_time`, `message_end_time`, `uncompressed_size`, `uncompressed_crc` and `compression` (`zstd`, `lz4` or empty). |
| Data | `Message Index` (`0x07`) | Follows each chunk, one per channel in the chunk: `log_time` and offset of each message. |
| Data | `Attachment` (`0x09`) | `log_time`, `create_time`, `name`, `media_type`, `data`, `crc`. Never inside a chunk. |
| Data | `Metadata` (`0x0C`) | A `name` and a string map; the spec's example keys are `part_id`, `serial`, `board_revision`. |
| Data | `Data End` (`0x0F`) | Ends the data section, with an optional `data_section_crc`. |
| Summary | `Schema`, `Channel`, `Chunk Index` (`0x08`), `Attachment Index` (`0x0A`), `Metadata Index` (`0x0D`), `Statistics` (`0x0B`) | Copies of schemas and channels plus indexes and per-channel message counts, so a reader can seek from the end. |
| Summary Offset, Footer | `Summary Offset` (`0x0E`), `Footer` (`0x02`) | Where each group of summary records starts; `summary_start`, `summary_offset_start`, `summary_crc`. |

Messages can sit directly in the data section, but in an indexed file they should go inside chunks. The spec explains: "Message records outside of chunks cannot be indexed, and may not be found by readers using the index."

### Timestamps

Both message timestamps are `uint64` nanoseconds "since a user-understood epoch (i.e unix epoch, robot boot time, etc.)". `log_time` is the "Time at which the message was recorded"; `publish_time` is the "Time at which the message was published. If not available, must be set to the log time" ([MCAP spec](https://mcap.dev/spec)). Neither field is defined as the moment of exposure. If your rig knows the true capture time, for example a hardware trigger or exposure timestamp, it has to go in the message payload, such as the `header.stamp` of a ROS image message. The [synchronisation section](https://egocam.ai/sync/why-sync-matters/) explains why that instant matters.

### Calibration and self-describing files

The spec names calibration as a use for attachments: "Attachment records contain auxiliary artifacts such as text, core dumps, calibration data, or other arbitrary data." Attachments are never inside compressed chunks and are listed in the summary by `Attachment Index` records, so a reader can find a calibration file without scanning the recording.

Because schemas are embedded, a reader needs nothing else to decode a file. Voxel51, describing its own tool on Lightwheel's EgoSuite-Open100K episodes (one MCAP file each, with stereo head-camera video, hand and body pose and action segments), writes: "Because MCAP embeds its own Protobuf schemas, FiftyOne decodes Lightwheel's custom pose and annotation message types with no .proto files, no SDK, and no ROS or Foxglove toolchain" ([EgoSuite Open100K in FiftyOne](https://voxel51.com/blog/egosuite-open100k-mcap-fiftyone)).

## VRS

Meta's repository describes it: "VRS is a file format optimized to record & playback streams of sensor data, such as images, audio samples, and any other discrete sensors (IMU, temperature, etc), stored in per-device streams of time-stamped records." It was "first created to record images and sensor data from early prototypes of the Quest device", and "It is also the file format used by the Aria glasses" ([VRS (GitHub)](https://github.com/facebookresearch/vrs)). On size, the overview says "typical VRS files range from 5 to 80 GB, but 1.5 TB VRS files exist" ([VRS docs: Overview](https://facebookresearch.github.io/vrs/docs/Overview)).

On Ego-1K, the 12 rig cameras go to one VRS file on a backpack PC and the Quest 3 data to another on the headset; a shared LTC timestamp lets the two be aligned and merged. The raw release averages 93 GB per VRS file, 88 TB in total, for recordings of 8 to 10 seconds ([Ego-1K](https://arxiv.org/abs/2603.13741)).

### Streams, tags and record types

Each stream has a `StreamId` made of a `RecordableTypeId` (a device type) and an instance ID unique within the file. In the CLI documentation's sample file, `200-1` is a "Forward Camera Class" stream and `372-1` a "Motion Data Class" stream ([VRS CLI tool](https://facebookresearch.github.io/vrs/docs/VrsCliTool)).

The file and each stream carry **tags**, string name/value pairs readable as soon as the file is open. Streams hold three record types ([VRS docs: File Structure](https://facebookresearch.github.io/vrs/docs/FileStructure)):

1. **Configuration records** hold device settings that change rarely, such as a camera's resolution and exposure settings. The docs say they "are not meant to store parameters that never change, such as serial numbers"; those belong in stream tags.
2. **State records** hold a device or algorithm's internal state so playback can jump back in time. "Typically, state records are empty"
3. **Data records** hold the samples: images, IMU samples, poses. They usually include metadata such as internal counters and timestamps alongside an image or audio block.

Records are built from typed content blocks: metadata (`DataLayout`), image, audio and custom. The format of each record is declared once per stream, so "The marginal cost of adding 1 byte of data to each metadata content block of a stream is 1 byte per record (or less, when lossless compression happens)." Records can be compressed with `lz4` or `zstd`, and "Multiple threads can create records concurrently for the same file, without CPU contention" ([VRS (GitHub)](https://github.com/facebookresearch/vrs)).

### Timestamps and device clocks

Record timestamps are `double` values counting seconds from a fixed point such as the epoch or boot time. The rule that matters for multi-sensor rigs: "All records in a VRS file must use timestamps in the same time domain. VRS sorts the records in the file and in playback in that order. If your data has device-specific timestamps you need to keep, you must save those timestamps inside the records" ([VRS docs: File Structure](https://facebookresearch.github.io/vrs/docs/FileStructure)). The CLI docs' example camera stream does this, with `hal_frame_counter`, `hal_exposure_time` and `hal_arrival_time` fields in its `DataLayout` ([VRS CLI tool](https://facebookresearch.github.io/vrs/docs/VrsCliTool)).

The same page warns that an audio device is its own clock. If records are stamped with the system clock, counting audio samples and dividing by the sample rate drifts away from system time: "Ten minutes after that, your system clock and the audio clock will no longer be in sync and the gap will be visually noticeable." More on this in [Audio Capture](https://egocam.ai/hardware/audio-capture/).

## GPMF

GoPro designed GPMF to be light on a camera's CPU, memory and storage. It is "a modified Key, Length, Value solution, with a 32-bit aligned payload", and "All data is Big Endian" ([gpmf-parser README](https://github.com/gopro/gpmf-parser)).

### Where it sits in the MP4

"Telemetry carrying MP4 files will have a minimum of four tracks: Video, audio, timecode and telemetry (GPMF)." The README lists them as `vide` ("GoPro AVC"), `soun` ("GoPro AAC"), `tmcd` ("GoPro TCD", the starting timecode) and `meta` ("GoPro MET"), whose sample description (`stsd`) has the data format `gpmd`. HERO4 and HERO5 also have a fifth `SOS` track used for file recovery, which can be ignored. The MP4 sample tables (`stts`, `stsz`, `stco`) give each GPMF payload's duration, size and offset; the README notes the track "might be stored at 1Hz" while the sensor data inside runs much faster.

### KLV structure

Each KLV item has a four-character key (FourCC), then a 32-bit length split into an 8-bit type character (`f` 32-bit float, `s` 16-bit signed integer, `L` 32-bit unsigned, null for nested GPMF, and others), an 8-bit structure size (so samples are at most 255 bytes) and a 16-bit repeat count. A payload starts with a device block, `DEVC`, which nests streams, `STRM`. Modifier keys apply to the data that follows them in the same stream: `SCAL` is a divisor, `SIUN` a standard unit such as `m/s²`, `TYPE` a structure definition.

Storing scaled 16-bit integers instead of floats roughly halves the size; the README's 100-sample accelerometer example is "1216 vs 628 bytes". Modifiers that change the meaning of data (`TYPE`, `SIUN`, `SCAL`, `DVNM`, `STNM`) are written as "sticky" metadata in every payload, so that a file cut into segments keeps each segment decodable ([gpmf-parser README](https://github.com/gopro/gpmf-parser)).

### FourCC keys that matter for SLAM and calibration

All from the per-model tables in the [gpmf-parser README](https://github.com/gopro/gpmf-parser). Each model's table lists changes and otherwise "supports all" metadata of the model before it.

| FourCC | Meaning | Model notes |
| :--- | :--- | :--- |
| `ACCL` / `GYRO` | Accelerometer (`m/s²`), gyroscope (`rad/s`) | Axis order differs: HERO5 `Z,X,Y` (accel about 200 Hz, gyro about 400 Hz); Fusion `-Y,X,Z` (200 Hz, 3200 Hz); HERO6 `Y,-X,Z` (200 Hz, 200 Hz). |
| `TSMP` | Total samples delivered since recording start | Use it to measure each sensor's real sample rate (below). |
| `STMP` | Microsecond timestamps | Listed for Fusion, at 1 Hz. |
| `SHUT` / `ISOE` | Exposure time in seconds; sensor ISO | At video frame rate. `ISOE` replaces HERO5's `ISOG` from HERO6. Needed to move a frame's time to its [exposure midpoint](https://egocam.ai/sync/why-sync-matters/). |
| `SROT` | Sensor read-out time, in ms | Per frame on HERO7; "moves to a global value in HERO8". Use it for [rolling-shutter calibration](https://egocam.ai/calibration/rolling-shutter-calibration/). |
| `CORI` / `IORI` / `GRAV` | Camera orientation and image orientation quaternions; gravity vector | From HERO8 and GoPro MAX, at frame rate. |
| `MSKP` / `LSKP` | Frames skipped or duplicated between sensor and encoder, main and low-res video | From HERO9; "Normally 0". |
| `GPS5` / `GPS9` | GPS fix, speed and time | HERO11 adds 10 Hz `GPS9` with millisecond time and deprecates `GPS5`; HERO12 has "No GPS receiver"; "GPS returns for HERO13". |
| `FOVL` keys | Lens distortion: `ZFOV` diagonal FOV in degrees, `VFOV` style (Linear, Wide, SuperView, HyperView), `PYCF` and `POLY` polynomial mapping normalised radius to world radians | Global metadata. |

### Why GPMF stores no sample rates

GPMF deliberately leaves nominal sample rates out. Video and audio share one crystal; GoPro gives a 50 ppm crystal (±0.005%) as an example. But "Camera internal sensors or data via a connected Bluetooth device, will have timing errors in the range ±1%. There is no value to storing timing metadata that will be significantly wrong in most cases." In the README's example clip, a 200 Hz accelerometer measured 201.923 Hz, a 400 Hz gyro 403.846 Hz and an 18 Hz GPS 18.169 Hz. The camera's operating system adds jitter as well: a 200 Hz sensor flushed once a second "could have payload sample counts of 199, 202, 201, 198, 199, etc."

The fix GoPro describes is to measure: "If you compare the TSMP of the first payload with the last, you can easily determine the number of samples, then compare with the time of the video track (or MP4 clock timing), establishing the average sample rate for the GPMF data" ([gpmf-parser README](https://github.com/gopro/gpmf-parser)). For aligning the IMU to the frames more precisely, see [Camera–IMU Time Offset](https://egocam.ai/calibration/camera-imu-time-offset/).

## Training formats: LeRobotDataset v3.0

Capture containers are organised by session and sensor. Training needs something else: many episodes, read fast and at random. Hugging Face's LeRobotDataset v3.0 moved from one file per episode (v2) to "Many episodes per Parquet/MP4 file", citing "Lower file-system pressure : Fewer, larger files ⇒ faster initialization and fewer issues at scale." The docs explain: "To scale to millions of episodes, tabular rows and video frames from multiple episodes are concatenated into larger files. Episode‑specific views are reconstructed via metadata , not file boundaries" ([LeRobotDataset v3.0 docs](https://huggingface.co/docs/lerobot/lerobot-dataset-v3)).

The simplified layout:

- `data/`: Parquet shards of frame-by-frame states, actions and timestamps, many episodes per file.
- `videos/`: MP4 shards per camera, many episodes per file.
- `meta/info.json` (schema, FPS, path templates), `meta/stats.json` (normalisation statistics), `meta/tasks.parquet` (task descriptions), `meta/episodes/` (per-episode lengths, tasks and offsets, as chunked Parquet).

When creating or recording a dataset, "you must call dataset.finalize() to properly close parquet writers"; otherwise "the parquet files will be corrupt". That matters if the recording process can die, as a battery-powered rig can ([LeRobotDataset v3.0 docs](https://huggingface.co/docs/lerobot/lerobot-dataset-v3)).

If you publish both a capture format and a training format, say they are the same episodes. Lightwheel's cards do: "LeRobot and MCAP are alternative representations of the same episodes and must not be counted as additional hours" ([EgoStandard](https://huggingface.co/datasets/LightwheelAI/EgoStandard); [EgoPro](https://huggingface.co/datasets/LightwheelAI/EgoPro)). [Quality Control](https://egocam.ai/capture-ops/quality-control/) covers manifests and hour counting.

## Command-line tools

### VRS: the `vrs` tool

The `vrs` command-line tool is built from the [VRS repository](https://github.com/facebookresearch/vrs); `vrsplayer` is the viewer app. VRS files are not edited in place: "VRS file modifications are basically not possible. Instead, files can be copied, record-by-record, and during copies, certain transformations can be applied" ([VRS CLI tool](https://facebookresearch.github.io/vrs/docs/VrsCliTool)). All commands below are from that page.

| Task | Command | What it does |
| :--- | :--- | :--- |
| Overview | `vrs file.vrs` (no sub-command) or `vrs json-description file.vrs` | File size, file tags, streams, record counts, time range, records per second, stream tags including `RecordFormat` and `DataLayout` definitions. |
| Record formats | `vrs record-formats file.vrs + 1100-7` | Full `RecordFormat` and `DataLayout` definitions, here for one stream. Note the space after `+`. |
| List records | `vrs list file.vrs` | Timestamp, stream, record type and uncompressed size of each record. |
| Decode metadata | `vrs print file.vrs --first-records`, `print-details`, `print-json`, `print-json-pretty` | Decodes `DataLayout` blocks; `--first-records` shows the first record of each type per stream. |
| Filter by time | `--before`, `--after`, `--range`, `--around` | `+` is relative to the first data record, `-` to the last: `vrs print file.vrs --range +1 -1` skips the first and last second. |
| Extract | `vrs extract-images file.vrs --to dir [--raw-images]`, `extract-audio`, `extract-all` | RAW images are saved as PNG, which "might require a lossy pixel format conversion" unless `--raw-images` is given. `extract-all` writes metadata as one `.jsons` file, one record per line, in timestamp order. |
| Copy and recompress | `vrs copy original.vrs --to new.vrs --range +2 +12 --compression=zmedium` | Re-sorts records and writes a fresh index. Default is `zlight` (zstd level 3); `zmedium` is level 5, `ztight` level 18. Levels: `none`, `fast`, `tight`, `zfast`, `zlight`, `zmedium`, `ztight`, `zmax`. Stream instance IDs "might not be preserved". |
| Zeroed copy | `vrs copy original.vrs --to new.vrs --zero` | Replaces image and audio data with zeros, keeping all metadata: "Zeroed files can be over 99% smaller than the original files." |
| Combine files | `vrs copy a.vrs b.vrs --to out.vrs` or `vrs merge a.vrs b.vrs --to out.vrs` | `copy` keeps every stream side by side; `merge` joins streams of the same type into one and drops records with identical timestamps. Both assume one time domain and do not check it. |
| Validate | `vrs check file.vrs`; `vrs checksum file.vrs` | `check` decodes every record; `checksum` is a logical checksum that stays the same after recompression, so an archive copy can be compared with the original. |
| Repair | `vrs fix-index file.vrs` | For a recording cut off by a crash or full disk: may truncate the half-written last record, then writes a rebuilt index in place. The alternative is `vrs copy`, which is slower but leaves the original untouched. |

For H.265 streams in VRS, the README describes optional NVIDIA GPU decoding: build with `-DBUILD_WITH_XPRS=ON -DENABLE_NVCODEC=ON`; colour (YUV420) streams are accelerated, and "monochrome streams always use CPU, as NVDEC does not support them" ([VRS (GitHub)](https://github.com/facebookresearch/vrs)).

### MCAP: `ros2 bag` and the MCAP libraries

Commands from the [rosbag2_storage_mcap README](https://github.com/ros2/rosbag2/blob/rolling/rosbag2_storage_mcap/README.md) and the [rosbag2 README](https://github.com/ros2/rosbag2):

```bash
# Install the plugin (replace $ROS_DISTRO with your distribution, e.g. jazzy)
sudo apt install ros-$ROS_DISTRO-rosbag2-storage-mcap

# Record all topics to MCAP; -o sets the output name
ros2 bag record -s mcap -o my_bag -a

# Writer options from a YAML file (keys from the plugin README)
cat << EOF > mcap_writer_options.yml
noChunking: false
chunkSize: 786432
compression: "Zstd"
compressionLevel: "Fast"
EOF
ros2 bag record -s mcap -o my_bag -a --storage-config-file mcap_writer_options.yml

# Or a preset: fastwrite, zstd_fast or zstd_small
ros2 bag record -s mcap -o my_bag -a --storage-preset-profile zstd_fast

# Inspect and play back; -e/--regex plays only matching topics
ros2 bag info my_bag
ros2 bag play my_bag -e ".*camera.*"
```

The plugin README says the `fastwrite` preset disables chunking and CRCs and writes no message index, and that files written this way are not recommended for long-term storage; it suggests post-processing them, for example with `mcap compress fast.mcap -o compressed.mcap`. Older SQLite `.db3` bags convert with `ros2 bag convert -i <input_bag> -o <output_options.yaml>`, where the YAML names `storage_id: mcap` for the output.

Foxglove gives the crash behaviour: "MCAP, on the other hand, has an append-only design. This means that even if recording is interrupted, MCAP can guarantee that only the last recorded message has any danger of being corrupted." For Python pipelines without ROS installed, the `mcap-ros2-support` library reads ROS 2 messages from MCAP files ([Announcing the MCAP storage plugin for ROS 2](https://www.foxglove.dev/blog/announcing-the-mcap-storage-plugin-for-ros2)).

### GPMF: `gpmfdemo`

From the [gpmf-parser README](https://github.com/gopro/gpmf-parser):

```bash
git clone https://github.com/gopro/gpmf-parser
cd gpmf-parser/demo/
make
./gpmfdemo ../samples/Fusion.mp4      # overview of the metadata in the file
./gpmfdemo ../samples/Fusion.mp4 -g   # the first few samples of each stream

# Or with Docker, mounting your own file
docker run -v "/path/to/my/movie.mp4:/input.mp4" runsascoded/gpmf-parser
```

## Prompts you can give an AI

```text
Write a Python script using the official `mcap` library that opens an .mcap recording from a stereo or head-plus-wrist rig and:
1. Reads the summary section to print every channel's topic, schema name, message encoding and message count from the Statistics record, without scanning the data section.
2. Saves every Attachment record (for example a calibration file) and every Metadata record to disk.
3. For each camera and IMU channel, computes the median interval between messages from log_time, reports gaps in the sequence field where it is non-zero, and prints the largest gaps so I can decide a threshold for my rig.
```

```text
Write a Python parser for GoPro MP4 files, following the gpmf-parser README, that:
1. Extracts ACCL and GYRO, reads the camera model from DVNM, and applies the documented axis order (Z,X,Y for HERO5, -Y,X,Z for Fusion, Y,-X,Z for HERO6) to one coordinate frame.
2. Uses TSMP across payloads and the MP4 track timing to estimate each sensor's real sample rate instead of assuming the nominal one.
3. Reads SHUT per frame, SROT, and MSKP where present, and writes exposure-midpoint timestamps for every video frame.
```

## Sources

- [VRS (GitHub)](https://github.com/facebookresearch/vrs) — Meta.
- [VRS docs: Overview](https://facebookresearch.github.io/vrs/docs/Overview) — Meta.
- [VRS docs: File Structure](https://facebookresearch.github.io/vrs/docs/FileStructure) — Meta.
- [VRS docs: Image Support](https://facebookresearch.github.io/vrs/docs/ImageSupport) — Meta.
- [VRS CLI tool](https://facebookresearch.github.io/vrs/docs/VrsCliTool) — Meta.
- [projectaria_tools `VrsDataProviderFactory.cpp`](https://github.com/facebookresearch/projectaria_tools/blob/main/core/data_provider/VrsDataProviderFactory.cpp) — Meta; reads the `calib_json` file tag.
- [MCAP Format Specification](https://mcap.dev/spec) — MCAP project.
- [rosbag2 README](https://github.com/ros2/rosbag2) — ROS 2.
- [rosbag2_storage_mcap README](https://github.com/ros2/rosbag2/blob/rolling/rosbag2_storage_mcap/README.md) — ROS 2.
- [Introducing the MCAP file format](https://foxglove.dev/blog/introducing-the-mcap-file-format) — Foxglove, 2022.
- [Announcing the MCAP storage plugin for ROS 2](https://www.foxglove.dev/blog/announcing-the-mcap-storage-plugin-for-ros2) — Foxglove, 2022.
- [gpmf-parser README](https://github.com/gopro/gpmf-parser) — GoPro.
- [EgoSuite Open100K in FiftyOne](https://voxel51.com/blog/egosuite-open100k-mcap-fiftyone) — Voxel51, 2026.
- [LeRobotDataset v3.0 docs](https://huggingface.co/docs/lerobot/lerobot-dataset-v3) — Hugging Face.
- [EgoStandard](https://huggingface.co/datasets/LightwheelAI/EgoStandard) — Lightwheel dataset card, 2026.
- [EgoPro](https://huggingface.co/datasets/LightwheelAI/EgoPro) — Lightwheel dataset card, 2026.
- [Ego-1K: A Large-Scale Multiview Video Dataset for Egocentric Vision](https://arxiv.org/abs/2603.13741) — Lee et al., CVPR 2026.
- [Aria Gen 2 Pilot Dataset](https://arxiv.org/abs/2510.16134) — Meta, 2025.
