title: How to improve OpenCV and python VideoWriter resolution?
body: <p>I have a script which uses <code>OpenCV</code> and <code>python</code> and creates a video ( <code>avi</code> format ) from a set of <strong><code>png</code></strong> images.</p>
  
  <p><strong>The resolution of these images is good.</strong></p>
  
  <p>The problem is that the resolution of the resulting video is very low.</p>
  
  <p>How can I improve the resolution?</p>
  
  <p>Is the low resolution related to the images format?</p>
  
  <p><strong>CODE:</strong></p>
  
  <pre><code>writer  = cv2.VideoWriter( "C:\Users\.../demo3_4.avi", -1, 1, ( width, height ) )
  nFrames = 24
  
  for i in range( 1, nFrames ):
      img   = cv2.imread( os.path.join( str( inf ), "colorraster%d.jpg"%i ) )
      writer.write( img )
  
  cv2.destroyAllWindows()  
  writer.release()
  </code></pre>