title: Can't convert video to grayscale
body: <p>I'm trying to convert a video from my camera feed, which has low fps to gray. I have successfully fetched the video now I want to convert it to grayscale.</p>
  
  <p>I've tried basic opencv operations and it isn't working. I get a video file when I open it there is no video.</p>
  
  <pre><code>import cv2
  import time
  
  cap = cv2.VideoCapture('output.avi')
  fourcc = cv2.VideoWriter_fourcc(*'XVID')
  print(fourcc)
  out = cv2.VideoWriter('grey.avi',fourcc, 30.0, (800,600))
  while True:    
      ret, frame = cap.read()
      time.sleep(0.1)
      cv2.imshow('frame1',frame)
      frame = cv2.cvtColor(frame,cv2.COLOR_BGR2GRAY)
      out.write(frame)
      cv2.imwrite('img.jpg',frame)
      cv2.imshow('frame',frame)
      if cv2.waitKey(1) &amp; 0xFF == ord('q'):
          break
  cap.release()
  out.release()
  cv2.destroyAllWindows()
  </code></pre>