Problem with real drome setup

When trying to calibrate camera on my R Pi5 i got error when running video2calibration script:

File “/home/rock/video2calibration/calibrate.py”, line 91, in
rms, camera_matrix, dist_coefs, rvecs, tvecs = cv2.calibrateCamera(obj_points, img_points, (w, h), None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cv2.error: OpenCV(4.6.0) ./modules/calib3d/src/calibration.cpp:3694: error: (-215:Assertion failed) nimages > 0 in function ‘calibrateCameraRO’

OK, i fixed problem, by using picamera2 instead of (cv2.videoCapture())