docs/content/howto/logging-and-ingestion/mcap.md
The Rerun Viewer has built-in support for opening MCAP files, an open container format for storing timestamped messages.
Here's a quick summary of Rerun's MCAP data loader:
For a detailed overview of Rerun's built-in MCAP support, please refer to our Supported Message Formats page. We are continually expanding the supported MCAP message types and are interested in your feedback.
The simplest way to get started is to load an MCAP file directly:
# View an MCAP file in the Rerun Viewer
rerun your_data.mcap
You can also drag and drop MCAP files into the Rerun Viewer or load them using the SDK:
snippet: howto/load_mcap
Convert MCAP files to Rerun's native format for faster loading:
# Convert MCAP to RRD format for faster loading
rerun mcap convert input.mcap -o output.rrd
# View the converted file
rerun output.rrd
Rerun's data model is based on an entity component system (ECS) that is a bit different to the message-based model of MCAP. To map MCAP messages to Rerun entities we make the following assumptions:
message_log_time and message_publish_time of an MCAP message will be carried over to Rerun as two distinct timelines.Rerun uses a layered architecture to process MCAP files at different levels of abstraction. This design allows the same MCAP file to be ingested in multiple ways simultaneously, from raw bytes to semantically meaningful visualizations.
Each layer extracts different types of information from the MCAP source and each of the following layers will create distinct Rerun archetypes:
raw: Logs the unprocessed message bytes as Rerun blobs without any interpretationschema: Extracts metadata about channels, topics, and schemasstats: Extracts file-level metrics like message counts, time ranges, and channel statisticsmetadata Extracts metadata records (if present) into the __properties of the RRDprotobuf: Automatically decodes protobuf-encoded messages using reflectionros2msg: Provides semantic conversion of common ROS2 message types into Rerun's visualization componentsros2_reflection: Automatically decodes ROS2 messages using reflectionrecording_info: Extracts recording metadata such as message counts, start time, and session informationurdf: Uses Rerun's built-in URDF loader when a ROS 2 /robot_description string topic is presentBy default, Rerun analyzes an MCAP file to determine which decoders are active to provide the most comprehensive view of your data, while avoiding duplication. You can also choose to activate only specific decoders that are relevant to your use case.
The following shows how to select specific decoders:
# Use only specific decoders
rerun mcap convert input.mcap -d protobuf -d stats -o output.rrd
# Use multiple decoders for different perspectives
rerun mcap convert input.mcap -d ros2msg -d raw -d recording_info -o output.rrd
# Add robot geometry from robot_description topics
rerun mcap convert input.mcap -d ros2msg -d urdf -o output.rrd
For a detailed explanation of how each decoder works and when to use them, see Decoders Explained.
For advanced command-line options and automation workflows, see the CLI Reference for complete documentation of all available commands and flags.