# 仅记录元数据节点

RecordMetadataOnly 主机节点用于将
[ImgFrame](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/img_frame.md)、[EncodedFrame](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/encodedframe.md)、[IMUData](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/imu_data.md)
和 [PointCloudData](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/pointcloud_data.md) 消息录制到 mcap 文件中。

## 如何放置

#### Python

```python
with dai.Pipeline() as pipeline:
    record = pipeline.create(dai.node.RecordMetadataOnly)
```

#### C++

```cpp
dai::Pipeline pipeline;
auto record = pipeline.create<dai::node::RecordMetadataOnly>();
```

## 输入和输出

## 使用

#### Python

```python
with dai.Pipeline() as pipeline:
    record = pipeline.create(dai.node.RecordMetadataOnly)
    record.setRecordFile("metadata.mcap")
```

#### C++

```cpp
dai::Pipeline pipeline;
auto record = pipeline.create<dai::node::RecordMetadataOnly>();
record->setRecordFile("metadata.mcap");
```

## 参考

### dai::node::RecordMetadataOnly

Kind: class

RecordMetadataOnly node, used to record a source stream to a file.

#### dai::RecordConfig::CompressionLevel CompressionLevel

Kind: enum

#### Input input

Kind: variable

Input IMU messages to be recorded (will support other types in the future) Default queue is blocking with size 8

#### void run()

Kind: function

#### std::filesystem::path getRecordFile()

Kind: function

#### CompressionLevel getCompressionLevel()

Kind: function

#### RecordMetadataOnly & setRecordFile(const std::filesystem::path & recordFile)

Kind: function

#### RecordMetadataOnly & setCompressionLevel(CompressionLevel compressionLevel)

Kind: function

### 需要帮助？

请前往 [OAKChina 官网](https://www.oakchina.cn/) 获取技术支持或解答您的任何疑问。
