`frame_width = int(cap.get(3))
frame_height = int(cap.get(4))
frame_size = (frame_width,frame_height)
fourcc = cv2.VideoWriter_fourcc(*‘MP42’)
formatVideo = f.get() + ‘–’ + strftime("%Y-%m-%d—%H-%M-%S") + ‘.avi’
print(formatVideo)
out=cv2.VideoWriter(formatVideo, fourcc, 20, (frame_size))`