title: Using ffmpeg to encode a high quality video
body: <p>I have a set of video frames saved as images in a directory, and I'm trying to encode these to a good quality video, however every setting and every format I try produces very noticeable artifacts.</p>
  
  <p>The basic command is this:</p>
  
  <pre><code>ffmpeg -r 25 -i %4d.png myvideo.mpg
  </code></pre>
  
  <p>and I've tried the minrate and maxrate flags. Any of {mpg, avi, mov, flv} formats will do.</p>
  
  <p>Any suggestions for settings? Final file size is not an issue.</p>