OSF Format Description
General description of the OSF format
- Applies to format versions 4 and 5 -
The Open Streaming Format (OSF) is a binary, block-oriented data format for the continuous recording of time-related measurement and process data. It is designed not only for streaming on embedded systems with limited resources but also for the block-wise, efficient processing of large data sets on powerful analysis platforms — whether on servers, PCs, or in post-processing directly on embedded devices.
Core principles
- Time as the central axis: All data is stored with explicit time information — equidistant on a fixed grid or individually with timestamps.
- Streaming-capable: Data can be written continuously to the file during an ongoing measurement, without prior knowledge of the total amount.
- Robustness: Even after a power loss or unexpected shutdown, all data written up to the last completed block remains readable.
- Open structure: A combination of a clear metablock (XML in OSF4, JSON in OSF5) and a simple binary data stream.
- Block-wise storage: Instead of writing individual values sequentially, data blocks are used. This reduces write operations and enables fast loading of large data sets.
- Flexibility: Support for various data types — from simple scalars through vectors and matrices to binary data such as images or audio files.
- Metadata: Each channel can be described with a name, physical unit, dimension, and optional supplementary information.
Basic structure of an OSF file
Regardless of version 4 or version 5, every OSF file follows the same basic schema:

-
Magic header
- Format identifier (OSF4, OSF5, OCEAN_STREAM_FORMAT4, OCEAN_STREAMING_FORMAT4)
- Length of the following metablock
-
Metablock (XML or JSON)
- Contains information about channels, data types, physical units, and context data
- Defines the structure of the following data blocks
-
Binary data blocks
- Contain the actual measurement values in streaming format
- Support equidistant and time-stamped data
- May contain single values, vectors, matrices, or binary data
-
Optional final block
- In OSF4, an optional XML trailer with statistics and a channel overview
- In OSF5, this trailer is omitted by default
Data organization
- Channels: Each data stream is described as a channel containing a name, data type, physical unit, and optionally further attributes.
- Time base: All time values are stored in nanoseconds since epoch and enable high-precision synchronization.
- Block header: Each data block begins with a channel index and a length value, so the stream remains interpretable even with unknown channels or interruptions.
- Control byte: Defines the type and structure of the following data block (e.g. start, continuation, timestamp type). In OSF5 the use of this byte is simplified, but it remains functionally compatible.