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.

I don't think writing each frame as a separate file and post-processing is a workable option.

I can look at options to record to a simple video file for later optimising/encoding, or writing directly to a sensibly encoded format.

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.

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: