# Record Video Node

RecordVideo host node is used for recording
[ImgFrames](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/img_frame.md) and
[EncodedFrames](https://docs.luxonis.com/software-v3/depthai/depthai-components/messages/encodedframe.md) to video and metadata
files. Video is recorded using the mp4 format and metadata is recorded with mcap using protobuf serialization.

## How to place it

#### Python

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

#### C++

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

## Inputs and Outputs

## Usage

#### Python

```python
with dai.Pipeline() as pipeline:
    record = pipeline.create(dai.node.RecordVideo)
    record.setRecordVideoFile("video.mp4")
    record.setRecordMetadataFile("metadata.mcap")
```

#### C++

```cpp
dai::Pipeline pipeline;
auto record = pipeline.create<dai::node::RecordVideo>();
record->setRecordVideoFile("video.mp4");
record->setRecordMetadataFile("metadata.mcap");
```

## Examples of functionality

 * [Record video](https://docs.luxonis.com/software-v3/depthai/examples/record_replay/record_video.md)

## Reference

### dai::node::RecordVideo

Kind: class

RecordVideo node, used to record a video source stream to a file.

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

Kind: enum

#### Input input

Kind: variable

Input for ImgFrame or EncodedFrame messages to be recorded Default queue is blocking with size 15

#### void run()

Kind: function

#### std::filesystem::path getRecordMetadataFile()

Kind: function

#### std::filesystem::path getRecordVideoFile()

Kind: function

#### CompressionLevel getCompressionLevel()

Kind: function

#### RecordVideo & setRecordMetadataFile(const std::filesystem::path & recordFile)

Kind: function

#### RecordVideo & setRecordVideoFile(const std::filesystem::path & recordFile)

Kind: function

#### RecordVideo & setCompressionLevel(CompressionLevel compressionLevel)

Kind: function

#### RecordVideo & setFps(unsigned int fps)

Kind: function

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
