title: Recording application output to video using FFmpeg (or similar)
body: <p>We have a requirement to lets users record a video of our 3D application. I can already grab the individual rendered frames so this question is specifically about how to write frames into a video file.</p>
  
  <p>I don't think writing each frame as a separate file and post-processing is a workable option.</p>
  
  <p>I can look at options to record to a simple video file for later optimising/encoding, or writing directly to a sensibly encoded format.</p>
  
  <p>FFmpeg was suggested in another post but it looks a bit daunting to me. Is it the best option, if not what can be suggested? We can work with LGPL but not full GPL.</p>
  
  <p>We're working on Windows (Win32 not MFC) in C++. Sample/pseudo code with your recommended library is very much appreciated... basically after how to do 3 functions:</p>
  
  <ul>
  <li><code>startRecording()</code> does whatever initialization is needed</li>
  <li><code>recordFrame()</code> takes pointer to frame data and encodes it, ideally with timing data</li>
  <li><code>endRecording()</code> finalizes the video file, shuts down video system, etc</li>
  </ul>