ZED SDK C++ - SVO_COMPRESSION_MODE possibly broken?

I’m trying to read the compression mode of my SVO2 recordings from C++ (recorded via SDK 4.2 and 5.1, read via SDK 5.1) but it reports all of them as H264 (recorded multiple sequences in H265, H265_LOSSLESS, LOSSLESS, and sizes seem to correlate)

Here’s the snippet I’m using to read the information

const auto rec_params = zed.getRecordingParameters();
std::cout << "Detected compression mode: " << rec_params.compression_mode << std::endl;

How to resolve this? Am I missing something?

Hi @sourza
What do you get by using the command ZED_SVO_Editor -inf <filename>?

Hi @Myzhar

This is the output from ZED_SVO_Editor -inf ... on the ZEDBOX I recorded this on. (using stereolabs/zed:5.0-tools-devel-l4t-r36.4 docker image)

Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 279
NvMMLiteBlockCreate : Block : BlockType = 279
SVO Infos : SVO v 2
Image Size : [ 960  x  600 ]
Framerate :  15
Number of Frames :  856
ZED Serial Number :  45480267
Compression mode :  " H265 Lossless (GPU) compression"
Camera model :  "ZED X"
Camera Fw version :  2001
ZED SDK version that generated this file :  5.1.0

This is the output for the same file from my app (running on my machine - stereolabs/zed:5.1-devel-cuda12.8-ubuntu22.04)

Detected compression mode: H264
856 images will be extracted from SVO2 file

Thank you. I will report this bug to the team

1 Like

Here’s minimal reproduction steps

Thank you, this is useful and important :slight_smile:

On a related note about SVO compression mode being buggy or unclear

I have used SVO recording through both SDK and ROS2 . I used H.265 lossless compression, but the compressed file is 9x more compresses then it is supposed to be.

The recording can be found here. It is almost a 50s run with complete camera motion. The file is about 500 MB for 30FPS at 1080.

However, based on this, it seems the file should be around 3.75G not 0.5G.

Example in the attached link - 2K 15Hz lossless recording → 3GB/min.

Given 2k recording → 22081242-> 1.33x 1080P and we record at 30 Hz (215), the expected file size = 3*2/1.33 ~ 4.5GB/min . So about 3.75-4 GB for a 50s video. Therefore I am not sure why my file is 0.5 GB.

So my concern is whether the recording was really encoded using lossless H. 265 or it is a mismatch in SVO metadata and the actual algorithm used to encode it

Steps to Reproduce

ZED Explorer Version

  1. Open Zed Explorer
  2. Set mode to be 1080P and 30 FPS
  3. Record SVO using the ZED Explorer GUI.
  4. Playback th efile using ZED_Explorer to Confirm SVO recording is at 1080P, 30Hz and H265 Lossless recording.
  5. Check file size

ROS2 Version

  1. Set your zedx config to record at 1080 P at 30 Hz
  2. ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx
  3. ros2 service call /zed/zed_node/start_svo_rec zed_msgs/srv/StartSvoRec "{svo_filename: '/path/to/svo/file/file.svo2', compression_mode: 4}"
  4. Move camera for 50s-1 min
  5. ros2 service call /zed/zed_node/stop_svo_rec std_srvs/srv/Trigger
  6. Check file size
  7. Using ZED_Explorerer Confirm SVO recording is at 1080P, 30Hz and H265 Lossless recording.

Expected Result

Zed viewer confirms the following

  • frame rate - 30
  • resolution - 1920*1080
  • Compression - H265 lossless
  • duration - 50s ~1min

File size ~3.75-4.5G

Actual Result

Zed viewer confirms the following

  • frame rate - 30
  • resolution - 1920*1080
  • Compression - H265 lossless
  • duration - 50s

File size ~0.5G

ZED Camera model

ZED

Environment

ORIN AGX 64G devkit. ARM 64. Jetpack 6.2.1. Zed SDK 5.1

Anything else?

Please see the recording link to confirm that the recording was made at the right settings, and still the expected file size is not correct.

Please test if this behavior is still present with the new ZED SDK v5.2

1 Like

Please test if this behavior is still present with the new ZED SDK v5.2

[Discourse post]

Walter

Walter Lucetti
Senior Computer Engineer
SDK / Robotics / HW
Stereolabs Support

Hi @Myzhar! I can confirm that this works well now. Thanks :slight_smile:

1 Like