I write a program like this:
cap = cv2.VideoCapture(self.filePath.text()) counter = 1 while True: ret, frame = cap.read() if not ret: break cv2.im