stereolabs / zed-python-api

Python API for the ZED SDK
https://www.stereolabs.com/docs/app-development/python/install/
MIT License
209 stars 95 forks source link

ZED svo playback fps error #225

Open mikeszabi opened 1 year ago

mikeszabi commented 1 year ago

Preliminary Checks

Description

With the python-api I'm trying to play a saved svo file (saved at 15fps). I'm using the grab() method and the playback fps is much higher than at recording.

init = sl.InitParameters() init.set_from_svo_file(svo_file)

def zed_playback_loop(init): zed1 = sl.Camera() status = zed.open(init) if status != sl.ERROR_CODE.SUCCESS: print(repr(status)) exit()

exit_app=False
svo_image = sl.Mat()
while not exit_app:
  if zed1.grab() == sl.ERROR_CODE.SUCCESS:
      print(f"fps: {zed.get_current_fps()}")
      zed1.retrieve_image(svo_image, sl.VIEW.SIDE_BY_SIDE)
      # Get frame count
      svo_position = zed1.get_svo_position();
  else:
      exit_app=True

Steps to Reproduce

1.Save an svo file 2.Playback the svo with python -api 3. ...

Expected Result

Same fps at playback, as at recording

Actual Result

Playback at ~80 fps instead of 15

ZED Camera model

ZED Mini

Environment

OS: Ubuntu 20.04
Python: 3.9
ZED SDK 3.8.2
pyzed: 3.8 
ZED Mini

Anything else?

No response