SVO compression ratio not matching the expected 4x for H265 lossless

I have used SVO recording through ROS2. I used H.265 lossless compression, but the compressed file is more than 30x; however, the documentation says the expected is 4x.

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.

Steps to Reproduce

  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.

I face the same issue when recording simply thourgh the ZED Explorer also (without using ROS2)

Hi @Parv-Maheshwari
Have you noticed frame drops while recording the SVO file?

Do you notice missing frames while reproducing it with ZED Explorer, ZED Studio, or ZED Depth Viewer?

What’s the output of the command ZED_SVO_Editor -inf <svo_filename>?

Hello @Myzhar. Thank you for helping with this.

I only see 2/1546 frames getting dropped when I replay the SVO using ZED_Explorer

output of ZED_SVO_Editor

airlab@ubuntu:~/code/tartan_rgbt_ws$ ZED_SVO_Editor -inf test3_1080_motion.svo2 -inf option detected
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 279 
NvMMLiteBlockCreate : Block : BlockType = 279 
SVO Infos : SVO v 2
Image Size : [ 1920  x  1080 ]
Framerate :  30
Number of Frames :  1547
ZED Serial Number :  40735594
Compression mode :  " H265 Lossless (GPU) compression"
Product : ZED-X
Sensors Fw version :  1000
Camera Fw version :  2001
ZED SDK version that generated this file :  5.0.0

I faced the same issue with ZED_Explorer where also I only noticed negligible frame drop similar to the above analysis.
I have also uploaded the recording here for your analysis - Microsoft OneDrive

Please check with the new ZED SDK v5.2:

Thanks. Will check will 5.2 and report here

Did the analysis with the latest SDK 5.2 and Quad link driver 1.4. Recorded file using ZED_Explorer (no ROS2 involved)

TL;DR The same file size discrepancy issue exists

File link : link
Frame Drops - 0/1991
Duration ~1min
Actual File size: 683.3MB
Expected file size - 4.5G
ZED_SVO_Editor Output

airlab@ubuntu:~/code/tartan_rgbt_ws$ ZED_SVO_Editor -inf HD1080_SN40735594_18-25-31.svo2 
-inf option detected
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 279 
NvMMLiteBlockCreate : Block : BlockType = 279 
SVO Infos : SVO v 2
Image Size : [ 1920  x  1080 ]
Framerate :  30
Number of Frames :  1992
ZED Serial Number :  40735594
Compression mode :  " H265 Lossless (GPU) compression"
Camera model :  "ZED X"
Camera Fw version :  2001
ZED SDK version that generated this file :  5.2.0

Hi @Parv-Maheshwari
The ZED SDK team tested the SVO recording behaviors, and what you are facing is expected.
The support page that you linked refers to results obtained with older versions of the ZED SDK.
Meanwhile, the recording module evolved, enhancing the quality of the compression and reducing the final size.

We have scheduled a series of tests to update the documentation with “numbers” generated with the latest version of the ZED SDK.

Thank you @Myzhar for confirming this. To understand this better, could you provide more details on the encoding format of the raw images and the compressed images? From what I understand, the raw images after the ZED ISP are in YUV422 or YUV420, which is 12-16 bits. If this is correct, then lossless algorithms usually achieve about 4x compression, but we are seeing 25x. I want to understand how this significant difference is possible.

Hi @Parv-Maheshwari
Unfortunately, this is part of the ZED SDK processing information that is not disclosed.