title: screen recording and video encoding with ffmpeg
body: <p>1.we need to record screenshots into video with 2-3 fps. Quality - the minimum possible to make text on the screen readable, 256 colors. It is important to reduce the output video file size as much as possible.</p>
  
  <p>2.we've made a lot of tests, and currently the most suitable way is to make screenshots every 300-500msec, save them in PNG, then run ffmpeg to encode to H.267 with these params:</p>
  
  <pre><code>ffmpeg -f image2 -i "C:\png5min\image%04d.png" -y -an -vcodec libx264 -preset veryfast -crf 30 "C:\output.mp4"
  </code></pre>
  
  <p>3.is it the best way to get minimum output size with 2-3fps screencast?</p>
  
  <p>4.the output file plays very quickly, codec by default concerns that images represent 25fps. But they are 2fps actually.
  Ok, but if we try to decrease the output frame rate, output file size increases for about twice!! (from 3mb to 6mb for a 3m:26s video). And if we set the output frame rate as 2 - video does not play frames at all or plays just 2 frames for 3mins...:</p>
  
  <pre><code>-r 2 -f image2 -i "C:\png5min\image%04d.png" -y -an -vcodec libx264 -preset veryfast -crf 30 -r 2 "C:\image5min_2fps_crf30_test__R2-2.mp4"
  </code></pre>
  
  <p>so, how can we just add some latency after each frame without increasing the output file size???</p>