Xvid (1) 썸네일형 리스트형 파이썬 open cv 기초 소스 (캠으로 저장하기) import cv2 cap = cv2.VideoCapture(0); width = cap.get(cv2.CAP_PROP_FRAME_WIDTH) height = cap.get(cv2.CAP_PROP_FRAME_HEIGHT) print("size: {0} x {1}".format(width, height)) # 영상 저장을 위한 VideoWriter 인스턴스 생성 fourcc = cv2.VideoWriter_fourcc(*'XVID') writer = cv2.VideoWriter('test.avi', fourcc, 24, (int(width), int(height))) while cap.isOpened(): success, frame = cap.read() if success: writer.write(fra.. 이전 1 다음