title: Video made up from grayscale images using opencv, shows a fraction of frames and lines
body: <p>I have a sequence of grayscale images. using python code of opencv, I made a video out of these grayscale images.</p>
  <pre><code>import cv2
  import numpy as np
  A = readimages(img_path) # A is a list of uint8 images of size similar to framesize
  framesize = (480,640)
  out = cv2.VideoWriter('output_video.avi',cv2.VideoWriter_fourcc('M','J','P','G'), 30.0, framesize, isColor = False)
  for img in A:
      out.write(cv2.flip(img,0))
  out.release()
  </code></pre>
  <p>the resultant video as shown in the image below (left part) just shows a fraction of the input images along with multiple lines. any help please.
  <a href="https://i.stack.imgur.com/4EA7l.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4EA7l.jpg" alt="Left: Video, Right: sample grayscale image" /></a></p>