Holistic Record and Replay
Holistic Record
tar file. This can be enabled in code:Python
C++
Python
Python
1with dai.Pipeline as pipeline:
2 config = dai.RecordConfig()
3 config.outputDir = "./recordings";
4 config.videoEncoding.enabled = True # Use video encoding
5 config.videoEncoding.profile = dai.VideoEncoderProperties.Profile.H264_MAIN
6
7 pipeline.enableHolisticRecord(config)DEPTHAI_RECORD environment variable:Command Line
1DEPTHAI_RECORD="./recordings" python3 application.pyEnvironment variable configuration
DEPTHAI_RECORD environment variable is set to the recording output directory. This enabled holistic recording with the default configuration options. If you want more control you set the variable to the path to a configuration file:JSON
1{
2 "compressionLevel": 3,
3 "outputDir": "recordings/",
4 "videoEncoding": {
5 "enabled": true,
6 "bitrate": 0,
7 "lossless": false,
8 "profile": "MJPEG",
9 "quality": 80
10 }
11}compressionLevelconfigures the compression of the metadata. It ranges from 0 to 5 (inclusive) which corresponds to the following compression levels:NONE,FASTEST,FAST,DEFAULT,SLOW,SLOWESToutputDirsets the output directory of the recordingvideoEncodingconfigures the VideoEncoder that encodes the camera stream:enabledenables the VideoEncoder. Whenfalse, the output of the Camera node is recorded which can decrease the device CPU usage while increasing bandwidth usageprofilesets the encoding profilebitratesets the VideoEncoder bitrate (when set to 0 it is determined automatically)losslessdetermines whether the encoding should be lossles where applicablequalitydetermines the encoding quality where applicable
Example of functionality
Holistic Replay
Python
C++
Python
Python
1with dai.Pipeline as pipeline:
2 pipeline.enableHolisticReplay("./recordings/recording.tar")DEPTHAI_REPLAY environment variable:Command Line
1DEPTHAI_REPLAY="./recordings/recording.tar" python3 application.pyExample of functionality
Limitations
- As it currently only records source node streams, replaying on a different device can produce unexpected results (e.g. as camera extrinsics are not recorded,
StereoDepthcan produce incorrect results if the calibration differs between the recording and replaying cameras) - At this point in time, only single device pipelines can be holistically recorded and replayed.