1 2 3 4 5 6 7 8 9 10 11 12 13
| import cv2
capture = cv2.VideoCapture('aespa.mp4')
while cv2.waitKey(33) < 0: if(capture.get(cv2.CAP_PROP_POS_FRAMES) == capture.get(cv2.CAP_PROP_FRAME_COUNT)): capture.get(cv2.CAP_PROP_POS_FRAMES, 0) ret, frame = capture.read() cv2.imshow("Video", frame)
capture.release() cv2.destroyAllWindows()
|