Opening files
The Rerun Viewer and SDK have built-in support for opening many kinds of files, and can be extended to support any other file type without needing to modify the Rerun codebase itself.
The Viewer can load files in 3 different ways:
- via CLI arguments (e.g.
rerun myfile.jpeg), - using drag-and-drop,
- using the open dialog in the Rerun Viewer.
All these file loading methods support loading a single file, many files at once (e.g. rerun myfiles/*), or even folders.
The following data types have built-in support in the Rerun Viewer and SDK:
- Native Rerun files:
rrd,rbl - MCAP files:
mcap - Robot descriptions:
urdf - 3D models:
dae,gltf,glb,obj,ply,stl - Images:
avif,bmp,dds,exr,farbfeld,ff,gif,hdr,ico,jpeg,jpg,pam,pbm,pgm,png,ppm,tga,tif,tiff,webp - Depth images:
rvl - Video:
mp4 - Audio:
aac,flac,m4a,mp3,oga,ogg,wav - Point clouds:
ply - Parquet files:
parquet - Text files:
md,txt - LeRobot datasets:
directory
A .ply file can hold either a mesh or a point cloud, so it is listed twice: its header decides which one you get.
Point clouds may leave out z, in which case they load as 2D.
Files can also be opened from an HTTP URL (e.g. rerun https://demo.rerun.io/version/latest/examples/dna/data.rrd).
rrd and rbl files are streamed, while other supported formats are downloaded first and then loaded.
Logging file contents from the SDK
To log the contents of a file from the SDK you can use the log_file_from_path and log_file_from_contents methods (C++, Python, Rust) and the associated examples (C++, Python, Rust).
import sys
import rerun as rr
rr.init("rerun_example_log_file", spawn=True)
rr.log_file_from_path(sys.argv[1])
Formats without a built-in importer
For other formats, read the file with your own code and log the data, or write an importer so the Viewer can open the file directly.
CSV
There is no CSV importer.
Load the file with pandas (or polars), and log the table with rr.send_dataframe:
import pandas as pd
import pyarrow as pa
import rerun as rr
rr.init("rerun_example_csv", spawn=True)
df = pd.read_csv("data.csv") # e.g. columns: frame, x, y
rr.send_dataframe(pa.Table.from_pandas(df), index="frame", entity_path="/data")To show the values as points, boxes, or other archetypes, log them with send_columns instead.
HDF5
There is no built-in HDF5 importer.
In Python, the experimental rerun.experimental.Hdf5Reader maps each HDF5 group to an entity and its datasets to components:
import rerun as rr
from rerun.experimental import Hdf5Reader
rr.init("rerun_example_hdf5", spawn=True)
reader = Hdf5Reader("episode.hdf5")
rr.send_chunks(reader.stream()) # Rows are indexed on a generated `row_index` timeline.All non-scalar datasets must have the same number of rows.
Pass index_column= to stream() to use one of the datasets as the timeline (e.g. IndexColumn.sequence("/frame_id") from rerun.chunk), and ignore_datasets= to skip datasets that don't fit.
Use reader.groups(), reader.datasets(), and reader.attributes() to inspect the file first.
You can also read the file with h5py and log the arrays yourself.
Parquet
.parquet files have a built-in importer (see the list above).
For more control in Python, the experimental rerun.experimental.ParquetReader reads a file into a LazyChunkStream that you can reshape with lenses before sending it with rr.send_chunks.