How to make a screen recorder?

Asked

Viewed 1,283 times

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++.

1 answer

6


Good morning,

The most correct is to capture the information directly from the video card.

Screen shot operations are slow because they can involve up to a redraw of the entire screen, and in the case of applications using Opengl or Directx, it is likely that accelerated Surfaces will not be rederized in the screen shot (before Windows Vista this occurred, today it seems to me that it no longer occurs).

In any case, this issue of the OS in English gives you a reasonable introduction on how to do:

Fastest method of screen capturing

Any questions about the issue in English, I can help you.

  • 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? .__.

  • 1

    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.

  • Good, that takes me to the second question, as I would to "compress" all the images and turn them into video?

  • 1

    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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.