Video Recording
The ZED SDK allows you to record large video datasets using H.264, H.265 or lossless compression. The ZED SDK uses StereoLabs’ SVO format to store videos along with additional metadata such as timestamps and sensor data.
When loading SVO files, the ZED API will behave as if a ZED was connected and a live feed was available. Every module of the ZED API will be available: depth, tracking, spatial mapping and more. To record SVO videos, you can use the ZED Explorer application in GUI or command-line mode or build your own recording app using the ZED API.
Compression Modes
SVO videos can be recorded using various compression modes. We provide both lossless and compressed modes to preserve image quality or reduce file size.
Benefits of Hardware Encoding
For optimal performance, we recommend using the H.264 and H.265 recording modes. They have been designed to use the hardware-based encoder (referred to as NVENC) built into NVIDIA® graphics cards. With encoding offloaded to NVENC, the GPU and the CPU are free for other operations. For example, in a compute-heavy scenario, it is now possible to record video at a full frame rate with minimal impact on the main application.
Encoding Quality
At a given bitrate, hardware encoding quality can vary depending on your GPU generation. The updated NVENC encoder on Turing-based NVIDIA® GPUs (RTX 20-Series, Jetson™ Xavier) will typically produce superior quality than encoders on older generation GPUs (GTX 10-Series, Jetson™ Nano).
Using SVO2
In release 4.1 of the ZED SDK was introduced the SVO2 file format, designed to store high-frequency data from the camera, and introduce the ability to record custom data in order to store data from external sensors. This recording format is enabled by default in the ZED SDK starting from version 4.1.
- High-frequency data: SVO(1) files would previously only record sensor data at the camera’s image frame rate (15-120 Hz). With SVO2, sensors are recorded at their respective frequency, enabling all ZED SDK algorithms which use high-frequency data, for example the Positional Tracking Gen 2.
- Custom Data: the SVO2 format exposes methods to record custom data. This data can be anything defined by the user, from metadata to label the specific SVO sequence, to data from external sensors, such as IMU, GPS, etc. All custom data is timestamped to be read alongside the original ZED data. More information on the Custom Data API here: C++ / Python / C# / C.
Please check out the custom data Recording and Playback samples on GitHub for more information.
Recording with Multiple Cameras
You can record videos with multiple cameras connected to the same PC. When using hardware encoding (H.264, H.265), make sure to check the NVENC support matrix or Jetson one which shows the maximum number of concurrent recording sessions that can be started on a single NVIDIA® GPU. You can also add multiple GPUs in a single server to increase the number of recording sessions with hardware encoding.
Using the Recording API
Video Recording
To record SVO files, you need to enable the Recording module with enableRecording(). Specify an output file name (eg: output.svo) and SVO_COMPRESSION_MODE, then save each grabbed frame. SVO lets you record video and associated metadata (timestamp, IMU data and more if available).
Video Playback
To play SVO files, simply add the file path as an argument in setFromSVOFile(). When loading SVO files, the ZED API will behave as if a ZED was connected and a live feed was available. Every module of the ZED API will be available: depth, tracking, spatial mapping and more. When an SVO file is read entirely, END_OF_SVOFILE_REACHED error code is returned.
Code Example
Check out the SVO Recording, SVO Playback and SVO Export samples on GitHub.

