text: import cv2
  
  cap = cv2.VideoCapture('./video/cocacola.mp4')
  size = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)), int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
  fourcc = cv2.VideoWriter_fourcc(*'XVID')
  out = cv2.VideoWriter('./video/output.avi', fourcc, 20.0, size)
  
  while True:
      ret, frame = cap.read()
      if not ret:
          break
      gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
      out.write(frame)
      cv2.imshow('frame', frame)
      cv2.imshow('gray', gray)
  
      if cv2.waitKey(1) & 0xff == ord('q'):
          break
  
  cap.release()
  out.release()
  cv2.destroyAllWindows()
  