I have written an openGL application and would like to produce a video of the graphics shown on the Glut window. Do you know how to do it?
From a previous question at SO, I know that one possible solution is to use glReadPixels to get the frames that were rendered by openGL and then use the FFmpeg library to produce the video. I don't really know how to use FFmpeg, so I'm not sure how I could write a program which takes the frames and outputs the video. Although the link is broken in the original question, I've found this example of video encoding, that may be useful for anyone trying to help.
Two questions:
- How can I use FFmpeg to write a program which takes frames and outputs a video?
- My application is written in OCaml, so I'm using
lablgl
andlablglut
. Any ideas on how the FFmpeg ideas could be implemented in that case?