3
I am wanting to make a screen recorder. What I thought to do was the following: From the recording event hit 30 screenshots per second and then join them in sequence to form a video. At this point some doubts arise:
- This is the right way to think about how to make a screen recording?
- If yes, how could I capture a screenshot and convert a set of images into a video?
- If not, what would be the right way to do it?
As I said at the beginning of the question, everything is still in the field of ideas, I still have no algorithm and, also, I do not want a complete program, I wanted one more answer regarding theoretical doubts and a direction in how to do this in c++.
So, from what I understand, he does exactly what I said... He hits a screenshot and then puts it all together in a video. Or I’m wrong? .__.
– Felipe Avelar
In my opinion it was not clear what the author of the question ultimately used. But I believe that this is what he did. The answer with the highest number of votes (16 at the moment) does nothing more than describe how to take printscreen. The interesting thing, at least, is that with that code you can take printscreen from a single window instead of the entire desktop: just use the window DC instead of the desktop DC.
– Vinícius Gobbo A. de Oliveira
Good, that takes me to the second question, as I would to "compress" all the images and turn them into video?
– Felipe Avelar
This is another completely different saga. From a look at
libav
. It is dedicated to audio and video encoding and decoding. This example should help:https://www.ffmpeg.org/doxygen/0.6/api-example_8c-source.html
– Vinícius Gobbo A. de Oliveira