# Holistic Record

This example demonstrates how to record all selected input streams (such as video and IMU data) holistically during a DepthAI
pipeline run, enabling full replay for development and testing.

This example requires the DepthAI v3 API, see [installation instructions](https://docs.luxonis.com/software-v3/depthai.md).

## Pipeline

### examples/holistic_record.pipeline.json

```json
{"pipeline": {"connections": [{"node1Id": 0, "node1Output": "0", "node1OutputGroup": "dynamicOutputs", "node2Id": 22, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 0, "node1Output": "1", "node1OutputGroup": "dynamicOutputs", "node2Id": 6, "node2Input": "inputImage", "node2InputGroup": ""}, {"node1Id": 1, "node1Output": "0", "node1OutputGroup": "dynamicOutputs", "node2Id": 24, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 1, "node1Output": "1", "node1OutputGroup": "dynamicOutputs", "node2Id": 9, "node2Input": "inputImage", "node2InputGroup": ""}, {"node1Id": 2, "node1Output": "0", "node1OutputGroup": "dynamicOutputs", "node2Id": 26, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 2, "node1Output": "1", "node1OutputGroup": "dynamicOutputs", "node2Id": 12, "node2Input": "inputImage", "node2InputGroup": ""}, {"node1Id": 3, "node1Output": "out", "node1OutputGroup": "", "node2Id": 14, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 5, "node1Output": "out", "node1OutputGroup": "", "node2Id": 16, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 6, "node1Output": "out", "node1OutputGroup": "", "node2Id": 5, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 8, "node1Output": "out", "node1OutputGroup": "", "node2Id": 18, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 9, "node1Output": "out", "node1OutputGroup": "", "node2Id": 8, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 11, "node1Output": "out", "node1OutputGroup": "", "node2Id": 20, "node2Input": "in", "node2InputGroup": ""}, {"node1Id": 12, "node1Output": "out", "node1OutputGroup": "", "node2Id": 11, "node2Input": "in", "node2InputGroup": ""}], "globalProperties": {"calibData": null, "cameraTuningBlobSize": null, "cameraTuningBlobUri": "", "leonCssFrequencyHz": 700000000.0, "leonMssFrequencyHz": 700000000.0, "pipelineName": null, "pipelineVersion": null, "sippBufferSize": 18432, "sippDmaBufferSize": 16384, "xlinkChunkSize": -1}, "nodes": [[26, {"alias": "", "id": 26, "ioInfo": [[["", "in"], {"blocking": true, "group": "", "id": 41, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "XLinkOut", "parentId": -1, "properties": {"maxFpsLimit": -1.0, "metadataOnly": false, "streamName": "__x_2_0"}}], [24, {"alias": "", "id": 24, "ioInfo": [[["", "in"], {"blocking": true, "group": "", "id": 40, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "XLinkOut", "parentId": -1, "properties": {"maxFpsLimit": -1.0, "metadataOnly": false, "streamName": "__x_1_0"}}], [22, {"alias": "", "id": 22, "ioInfo": [[["", "in"], {"blocking": true, "group": "", "id": 39, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "XLinkOut", "parentId": -1, "properties": {"maxFpsLimit": -1.0, "metadataOnly": false, "streamName": "__x_0_0"}}], [20, {"alias": "", "id": 20, "ioInfo": [[["", "in"], {"blocking": true, "group": "", "id": 38, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "XLinkOut", "parentId": -1, "properties": {"maxFpsLimit": -1.0, "metadataOnly": false, "streamName": "__x_11__out"}}], [0, {"alias": "", "id": 0, "ioInfo": [[["dynamicOutputs", "0"], {"blocking": false, "group": "dynamicOutputs", "id": 4, "name": "0", "queueSize": 8, "type": 0, "waitForMessage": false}], [["dynamicOutputs", "1"], {"blocking": false, "group": "dynamicOutputs", "id": 3, "name": "1", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "raw"], {"blocking": false, "group": "", "id": 2, "name": "raw", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "mockIsp"], {"blocking": true, "group": "", "id": 1, "name": "mockIsp", "queueSize": 8, "type": 3, "waitForMessage": false}], [["", "inputControl"], {"blocking": true, "group": "", "id": 0, "name": "inputControl", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "Camera", "parentId": -1, "properties": {"boardSocket": 0, "cameraName": "", "fps": -1.0, "imageOrientation": -1, "initialControl": {"aeLockMode": false, "aeMaxExposureTimeUs": 2836209808, "aeRegion": {"height": 0, "priority": 1112, "width": 22694, "x": 8464, "y": 43277}, "afRegion": {"height": 43277, "priority": 22694, "width": 8336, "x": 1, "y": 6516}, "antiBandingMode": 0, "autoFocusMode": 3, "awbLockMode": false, "awbMode": 12, "brightness": 0, "captureIntent": 0, "chromaDenoise": 136, "cmdMask": 0, "contrast": 12, "controlMode": 0, "effectMode": 0, "enableHdr": false, "expCompensation": 0, "expManual": {"exposureTimeUs": 22694, "frameDurationUs": 0, "sensitivityIso": 12}, "frameSyncMode": 0, "lensPosAutoInfinity": 144, "lensPosAutoMacro": 32, "lensPosition": 0, "lensPositionRaw": 0.0, "lowPowerNumFramesBurst": 80, "lowPowerNumFramesDiscard": 33, "lumaDenoise": 0, "miscControls": [], "saturation": 0, "sceneMode": 0, "sharpness": 0, "strobeConfig": {"activeLevel": 48, "enable": 0, "gpioNumber": 33}, "strobeTimings": {"durationUs": 109641728, "exposureBeginOffsetUs": 22694, "exposureEndOffsetUs": 1111}, "wbColorTemp": 1416}, "isp3aFps": 0, "mockIspHeight": -1, "mockIspWidth": -1, "numFramesPoolIsp": 3, "numFramesPoolPreview": 4, "numFramesPoolRaw": 3, "numFramesPoolStill": 4, "numFramesPoolVideo": 4, "outputRequests": [{"enableUndistortion": null, "fps": {"value": null}, "resizeMode": 0, "size": {"value": {"index": 0, "value": [600, 400]}}, "type": null}, {"enableUndistortion": null, "fps": {"value": null}, "resizeMode": 0, "size": {"value": {"index": 0, "value": [1344, 1008]}}, "type": 22}], "resolutionHeight": -1, "resolutionWidth": -1}}], [1, {"alias": "", "id": 1, "ioInfo": [[["dynamicOutputs", "0"], {"blocking": false, "group": "dynamicOutputs", "id": 9, "name": "0", "queueSize": 8, "type": 0, "waitForMessage": false}], [["dynamicOutputs", "1"], {"blocking": false, "group": "dynamicOutputs", "id": 8, "name": "1", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "raw"], {"blocking": false, "group": "", "id": 7, "name": "raw", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "mockIsp"], {"blocking": true, "group": "", "id": 6, "name": "mockIsp", "queueSize": 8, "type": 3, "waitForMessage": false}], [["", "inputControl"], {"blocking": true, "group": "", "id": 5, "name": "inputControl", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "Camera", "parentId": -1, "properties": {"boardSocket": 1, "cameraName": "", "fps": -1.0, "imageOrientation": -1, "initialControl": {"aeLockMode": false, "aeMaxExposureTimeUs": 5, "aeRegion": {"height": 0, "priority": 2833250064, "width": 0, "x": 97, "y": 0}, "afRegion": {"height": 43711, "priority": 22694, "width": 9840, "x": 22694, "y": 0}, "antiBandingMode": 191, "autoFocusMode": 3, "awbLockMode": false, "awbMode": 64, "brightness": 0, "captureIntent": 170, "chromaDenoise": 104, "cmdMask": 0, "contrast": 119, "controlMode": 166, "effectMode": 88, "enableHdr": false, "expCompensation": 0, "expManual": {"exposureTimeUs": 0, "frameDurationUs": 0, "sensitivityIso": 0}, "frameSyncMode": 0, "lensPosAutoInfinity": 0, "lensPosAutoMacro": 0, "lensPosition": 0, "lensPositionRaw": 0.0, "lowPowerNumFramesBurst": 0, "lowPowerNumFramesDiscard": 0, "lumaDenoise": 116, "miscControls": [], "saturation": 105, "sceneMode": 39, "sharpness": 100, "strobeConfig": {"activeLevel": 0, "enable": 0, "gpioNumber": 40}, "strobeTimings": {"durationUs": 22694, "exposureBeginOffsetUs": 22694, "exposureEndOffsetUs": -1430313488}, "wbColorTemp": 0}, "isp3aFps": 0, "mockIspHeight": -1, "mockIspWidth": -1, "numFramesPoolIsp": 3, "numFramesPoolPreview": 4, "numFramesPoolRaw": 3, "numFramesPoolStill": 4, "numFramesPoolVideo": 4, "outputRequests": [{"enableUndistortion": null, "fps": {"value": null}, "resizeMode": 0, "size": {"value": {"index": 0, "value": [600, 400]}}, "type": null}, {"enableUndistortion": null, "fps": {"value": null}, "resizeMode": 0, "size": {"value": {"index": 0, "value": [1280, 720]}}, "type": 22}], "resolutionHeight": -1, "resolutionWidth": -1}}], [14, {"alias": "", "id": 14, "ioInfo": [[["", "in"], {"blocking": true, "group": "", "id": 35, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "XLinkOut", "parentId": -1, "properties": {"maxFpsLimit": -1.0, "metadataOnly": false, "streamName": "__x_3__out"}}], [2, {"alias": "", "id": 2, "ioInfo": [[["dynamicOutputs", "0"], {"blocking": false, "group": "dynamicOutputs", "id": 14, "name": "0", "queueSize": 8, "type": 0, "waitForMessage": false}], [["dynamicOutputs", "1"], {"blocking": false, "group": "dynamicOutputs", "id": 13, "name": "1", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "raw"], {"blocking": false, "group": "", "id": 12, "name": "raw", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "mockIsp"], {"blocking": true, "group": "", "id": 11, "name": "mockIsp", "queueSize": 8, "type": 3, "waitForMessage": false}], [["", "inputControl"], {"blocking": true, "group": "", "id": 10, "name": "inputControl", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "Camera", "parentId": -1, "properties": {"boardSocket": 2, "cameraName": "", "fps": -1.0, "imageOrientation": -1, "initialControl": {"aeLockMode": false, "aeMaxExposureTimeUs": 2864658720, "aeRegion": {"height": 0, "priority": 550883072, "width": 0, "x": 96, "y": 0}, "afRegion": {"height": 0, "priority": 0, "width": 0, "x": 22691, "y": 0}, "antiBandingMode": 0, "autoFocusMode": 3, "awbLockMode": false, "awbMode": 96, "brightness": 0, "captureIntent": 0, "chromaDenoise": 0, "cmdMask": 0, "contrast": 0, "controlMode": 0, "effectMode": 0, "enableHdr": false, "expCompensation": 0, "expManual": {"exposureTimeUs": 0, "frameDurationUs": 29552, "sensitivityIso": 1181641069}, "frameSyncMode": 0, "lensPosAutoInfinity": 6, "lensPosAutoMacro": 0, "lensPosition": 0, "lensPositionRaw": 0.0, "lowPowerNumFramesBurst": 224, "lowPowerNumFramesDiscard": 57, "lumaDenoise": 0, "miscControls": [], "saturation": 0, "sceneMode": 2, "sharpness": 0, "strobeConfig": {"activeLevel": 96, "enable": 0, "gpioNumber": 0}, "strobeTimings": {"durationUs": 22691, "exposureBeginOffsetUs": 0, "exposureEndOffsetUs": 550867491}, "wbColorTemp": 0}, "isp3aFps": 0, "mockIspHeight": -1, "mockIspWidth": -1, "numFramesPoolIsp": 3, "numFramesPoolPreview": 4, "numFramesPoolRaw": 3, "numFramesPoolStill": 4, "numFramesPoolVideo": 4, "outputRequests": [{"enableUndistortion": null, "fps": {"value": null}, "resizeMode": 0, "size": {"value": {"index": 0, "value": [600, 400]}}, "type": null}, {"enableUndistortion": null, "fps": {"value": null}, "resizeMode": 0, "size": {"value": {"index": 0, "value": [1280, 720]}}, "type": 22}], "resolutionHeight": -1, "resolutionWidth": -1}}], [3, {"alias": "", "id": 3, "ioInfo": [[["", "out"], {"blocking": false, "group": "", "id": 16, "name": "out", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "mockIn"], {"blocking": true, "group": "", "id": 15, "name": "mockIn", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "IMU", "parentId": -1, "properties": {"batchReportThreshold": 100, "enableFirmwareUpdate": false, "imuSensors": [{"changeSensitivity": 0, "reportRate": 500, "sensitivityEnabled": false, "sensitivityRelative": false, "sensorId": 20}, {"changeSensitivity": 0, "reportRate": 400, "sensitivityEnabled": false, "sensitivityRelative": false, "sensorId": 21}], "maxBatchReports": 5}}], [16, {"alias": "", "id": 16, "ioInfo": [[["", "in"], {"blocking": true, "group": "", "id": 36, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "XLinkOut", "parentId": -1, "properties": {"maxFpsLimit": -1.0, "metadataOnly": false, "streamName": "__x_5__out"}}], [5, {"alias": "", "id": 5, "ioInfo": [[["", "out"], {"blocking": false, "group": "", "id": 19, "name": "out", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "bitstream"], {"blocking": false, "group": "", "id": 18, "name": "bitstream", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "in"], {"blocking": true, "group": "", "id": 17, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "VideoEncoder", "parentId": -1, "properties": {"bitrate": 0, "frameRate": 30.0, "keyframeFrequency": 30, "lossless": false, "maxBitrate": 0, "numBFrames": 0, "numFramesPool": 0, "outputFrameSize": 0, "profile": 2, "quality": 80, "rateCtrlMode": 0}}], [18, {"alias": "", "id": 18, "ioInfo": [[["", "in"], {"blocking": true, "group": "", "id": 37, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "XLinkOut", "parentId": -1, "properties": {"maxFpsLimit": -1.0, "metadataOnly": false, "streamName": "__x_8__out"}}], [6, {"alias": "", "id": 6, "ioInfo": [[["", "out"], {"blocking": false, "group": "", "id": 22, "name": "out", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "inputImage"], {"blocking": true, "group": "", "id": 21, "name": "inputImage", "queueSize": 3, "type": 3, "waitForMessage": false}], [["", "inputConfig"], {"blocking": true, "group": "", "id": 20, "name": "inputConfig", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "ImageManip", "parentId": -1, "properties": {"backend": 0, "initialConfig": {"base": {"background": 0, "backgroundB": 0, "backgroundG": 0, "backgroundR": 0, "center": true, "colormap": 0, "operations": [], "outputHeight": 0, "outputWidth": 0, "resizeMode": 0, "undistort": false}, "outputFrameType": 22, "reusePreviousImage": false, "skipCurrentImage": false}, "numFramesPool": 4, "outputFrameSize": 4064256, "performanceMode": 0}}], [8, {"alias": "", "id": 8, "ioInfo": [[["", "out"], {"blocking": false, "group": "", "id": 25, "name": "out", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "bitstream"], {"blocking": false, "group": "", "id": 24, "name": "bitstream", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "in"], {"blocking": true, "group": "", "id": 23, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "VideoEncoder", "parentId": -1, "properties": {"bitrate": 0, "frameRate": 30.0, "keyframeFrequency": 30, "lossless": false, "maxBitrate": 0, "numBFrames": 0, "numFramesPool": 0, "outputFrameSize": 0, "profile": 2, "quality": 80, "rateCtrlMode": 0}}], [9, {"alias": "", "id": 9, "ioInfo": [[["", "out"], {"blocking": false, "group": "", "id": 28, "name": "out", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "inputImage"], {"blocking": true, "group": "", "id": 27, "name": "inputImage", "queueSize": 3, "type": 3, "waitForMessage": false}], [["", "inputConfig"], {"blocking": true, "group": "", "id": 26, "name": "inputConfig", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "ImageManip", "parentId": -1, "properties": {"backend": 0, "initialConfig": {"base": {"background": 0, "backgroundB": 0, "backgroundG": 0, "backgroundR": 0, "center": true, "colormap": 0, "operations": [], "outputHeight": 0, "outputWidth": 0, "resizeMode": 0, "undistort": false}, "outputFrameType": 22, "reusePreviousImage": false, "skipCurrentImage": false}, "numFramesPool": 4, "outputFrameSize": 2764800, "performanceMode": 0}}], [11, {"alias": "", "id": 11, "ioInfo": [[["", "out"], {"blocking": false, "group": "", "id": 31, "name": "out", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "bitstream"], {"blocking": false, "group": "", "id": 30, "name": "bitstream", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "in"], {"blocking": true, "group": "", "id": 29, "name": "in", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "VideoEncoder", "parentId": -1, "properties": {"bitrate": 0, "frameRate": 30.0, "keyframeFrequency": 30, "lossless": false, "maxBitrate": 0, "numBFrames": 0, "numFramesPool": 0, "outputFrameSize": 0, "profile": 2, "quality": 80, "rateCtrlMode": 0}}], [12, {"alias": "", "id": 12, "ioInfo": [[["", "out"], {"blocking": false, "group": "", "id": 34, "name": "out", "queueSize": 8, "type": 0, "waitForMessage": false}], [["", "inputImage"], {"blocking": true, "group": "", "id": 33, "name": "inputImage", "queueSize": 3, "type": 3, "waitForMessage": false}], [["", "inputConfig"], {"blocking": true, "group": "", "id": 32, "name": "inputConfig", "queueSize": 3, "type": 3, "waitForMessage": false}]], "logLevel": 3, "name": "ImageManip", "parentId": -1, "properties": {"backend": 0, "initialConfig": {"base": {"background": 0, "backgroundB": 0, "backgroundG": 0, "backgroundR": 0, "center": true, "colormap": 0, "operations": [], "outputHeight": 0, "outputWidth": 0, "resizeMode": 0, "undistort": false}, "outputFrameType": 22, "reusePreviousImage": false, "skipCurrentImage": false}, "numFramesPool": 4, "outputFrameSize": 2764800, "performanceMode": 0}}]]}}
```

## Source code

#### Python

```python
#!/usr/bin/env python3

import cv2
import depthai as dai
import argparse
from pathlib import Path

parser = argparse.ArgumentParser()
parser.add_argument("-o", "--output", default="recordings", help="Output path")
parser.add_argument("-fps", "--fps", default=30, type=int, help="FPS for recording")
args = parser.parse_args()

# Create output directory if it doesn't exist
Path(args.output).mkdir(parents=True, exist_ok=True)

# Create pipeline
with dai.Pipeline(True) as pipeline:
    config = dai.RecordConfig()
    config.outputDir = args.output
    # config.videoEncoding.enabled = True
    # config.videoEncoding.bitrate = 0 # Automatic
    # config.videoEncoding.profile = dai.VideoEncoderProperties.Profile.H264_MAIN

    pipeline.enableHolisticRecord(config)

    # Define source and output
    camA = pipeline.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_A)
    camAOut = camA.requestFullResolutionOutput(fps=args.fps)
    camB = pipeline.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_B)
    camBOut = camB.requestFullResolutionOutput(fps=args.fps)
    camC = pipeline.create(dai.node.Camera).build(dai.CameraBoardSocket.CAM_C)
    camCOut = camC.requestFullResolutionOutput(fps=args.fps)

    viewFinderOut = camA.requestOutput((640, 480), fps=args.fps)

    imu = pipeline.create(dai.node.IMU)
    imu.enableIMUSensor(dai.IMUSensor.ACCELEROMETER_RAW, 400)
    imu.enableIMUSensor(dai.IMUSensor.GYROSCOPE_RAW, 400)
    imu.setBatchReportThreshold(100)

    sync = pipeline.create(dai.node.Sync)
    sync.setSyncAttempts(0)
    camAOut.link(sync.inputs["camA"])
    camBOut.link(sync.inputs["camB"])
    camCOut.link(sync.inputs["camC"])

    viewFinderQueue = viewFinderOut.createOutputQueue()

    # Connect to device and start pipeline
    pipeline.start()
    try:
        while pipeline.isRunning():
            frame = viewFinderQueue.get()
            cv2.imshow("video", frame.getCvFrame())
            if cv2.waitKey(1) == ord('q'):
                break
    except KeyboardInterrupt:
        pass

    pipeline.stop()
```

#### C++

```cpp
#include <atomic>
#include <csignal>
#include <filesystem>
#include <opencv2/highgui.hpp>

#include "depthai/common/CameraBoardSocket.hpp"
#include "depthai/depthai.hpp"
#include "depthai/utility/RecordReplay.hpp"
#include "utility.hpp"
#ifndef DEPTHAI_MERGED_TARGET
    #error This example needs OpenCV support, which is not available on your system
#endif

// Signal handling for clean shutdown
static std::atomic<bool> isRunning = true;
void signalHandler(int signum) {
    (void)signum;
    isRunning = false;
}

int main(int argc, char** argv) {
    // Register signal handler
    std::signal(SIGINT, signalHandler);

    dai::Pipeline pipeline;

    dai::RecordConfig config;
    config.outputDir = argc > 1 ? std::string(argv[1]) : getDefaultRecordingPath();
    // config.videoEncoding.enabled = true;  // Use video encoding
    // config.videoEncoding.bitrate = 0;     // Automatic
    // config.videoEncoding.profile = dai::VideoEncoderProperties::Profile::H264_MAIN;

    pipeline.enableHolisticRecord(config);

    auto camA = pipeline.create<dai::node::Camera>()->build(dai::CameraBoardSocket::CAM_A);
    auto* camAOut = camA->requestFullResolutionOutput(std::nullopt, 10);
    auto camB = pipeline.create<dai::node::Camera>()->build(dai::CameraBoardSocket::CAM_B);
    auto* camBOut = camB->requestFullResolutionOutput(std::nullopt, 10);
    auto camC = pipeline.create<dai::node::Camera>()->build(dai::CameraBoardSocket::CAM_C);
    auto* camCOut = camC->requestFullResolutionOutput(std::nullopt, 10);

    auto* viewFinderOut = camA->requestOutput({640, 480});

    auto imu = pipeline.create<dai::node::IMU>();

    // enable ACCELEROMETER_RAW at 400 hz rate
    imu->enableIMUSensor(dai::IMUSensor::ACCELEROMETER_RAW, 400);
    // enable GYROSCOPE_RAW at 400 hz rate
    imu->enableIMUSensor(dai::IMUSensor::GYROSCOPE_RAW, 400);
    imu->setBatchReportThreshold(100);

    // Discard frames by passing through sync
    auto sync = pipeline.create<dai::node::Sync>();
    sync->setSyncAttempts(0);  // Don't wait for frames to sync
    camAOut->link(sync->inputs["camA"]);
    camBOut->link(sync->inputs["camB"]);
    camCOut->link(sync->inputs["camC"]);

    auto viewFinderQueue = viewFinderOut->createOutputQueue();

    pipeline.start();

    while(isRunning && pipeline.isRunning()) {
        auto frame = viewFinderQueue->get<dai::ImgFrame>();
        if(!frame) continue;
        cv::imshow("Video", frame->getCvFrame());
        auto key = cv::waitKey(10);
        if(key == 'q') {
            break;
        }
    }

    pipeline.stop();
}
```

### Need assistance?

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