SVO playback is slow

We are trying to record and use the svo file.
The playback of svo file in zed explorer works fine, but the playback in code is much slower than recorded fps.
For playback, we are using the example provided by stereolabs.

Hi @Gopi-htic
you can force the playback of SVO to match the real time by setting the parameter svo_real_time_mode (C++/Python) to true in InitParameters.

Hi @Myzhar,
The fps get lower when the svo_real_time_mode is set as True.

The code used for the playback is attached below.

def playback():
    zed = sl.Camera()
    input_type = sl.InputType()
    input_type.set_from_svo_file("/home/user/Documents/ZED/RECORDING/HD1200_SN41082402_11-27-20.svo")
    start_time = time.time()
    init_params = sl.InitParameters(input_t=input_type, svo_real_time_mode=True)
    init_params.camera_resolution = sl.RESOLUTION.HD1080 
    init_params.camera_fps = 60
    init_params.sdk_verbose = 1 
    init_params.depth_mode = (
        sl.DEPTH_MODE.NONE
    ) 

    err = zed.open(init_params)
    if err != sl.ERROR_CODE.SUCCESS:
        exit(1)


    image = sl.Mat()

    while True:
        if zed.grab() == sl.ERROR_CODE.SUCCESS:
            zed.retrieve_image(image, sl.VIEW.LEFT)
            cv2.imshow("ZED",image.get_data())
            print("FPS",zed.get_current_fps())
            key = cv2.waitKey(1)
            if key==113: # q 
                break

    zed.close()

@Gopi-htic I noticed it’s a ZED X. What NVIDIA Jetson device are you using for recording?
The problem that you are facing is not related to SVO Playback but rather SVO recording.

SVO recording at 60 FPS can be problematic with some configurations so many frames will be dropped. We recommend using 30 FPS instead.

We are using zed box ( Orin NX 16gb )

In that case, 30 FPS at HD1080 for recording is recommended.