#想想這段,如果是mp4要怎麼改 cap=cv2.VideoCapture(data['url']) print(data['url']) while True: ret,m=cap.read() if ret==False: break size=m.shape m=cv2.resize(m, (608, int(608/size[1]*size[0]))) cv2.imshow(data['url'],m) if data['url'].find('.mp4')==-1 : cv2.waitKey(0) else: cv2.waitKey(32) cv2.destroyAllWindows()