Record screen on a headless machine

0

The last time I visited op.gg I stumbled across a new feature which allows to record an active match and download it afterwards.
I am wondering how it is possible to record something without having a monitor (because I do not think they have thousands of personal computers somewhere).
As far as I know it is only possible to record something which is displayed on a monitor. Even if they would use display emulators (amazon) they would need thousands of hdmi ports...

So my questions are:
Is it possible to make a computer running windows 10 think that there are displays connected to it even if they aren't and the port they are connected to doesn't even exists physically?
If it is possible: What's a way to do so?

Nightfighter001

Posted 2019-03-22T15:39:07.310

Reputation: 101

Are you asking how THEY did it, or just how one COULD do it? Do you have an actual question, like, you're trying to do this yourself, or are you just trying to figure out how OP.gg made this work? The short answer is that yes, it is possible. You can have virtual displays. Beyond that it is impossible to answer your question as it is currently phrased. – music2myear – 2019-03-22T15:50:25.503

At the moment I am not trying to do something like this on my own, but I am interested in the way one could do it. – Nightfighter001 – 2019-03-22T15:58:44.757

How are you going to play the game if you cannot see anything? Later downloading the video is not going to help. I think you should reword your post & title. – harrymc – 2019-03-22T16:02:54.953

@harrymc Are you more comfortable with my question now? – Nightfighter001 – 2019-03-22T16:08:25.653

Much better now. – harrymc – 2019-03-22T16:12:45.360

Answers

0

Using Windows API a program can create a graphical window and draw on its canvas. It doesn't need any port, HDMI, or anything else.

It can play a video into this canvas with no problem, as graphics is only about pixels, and the window doesn't need to be visible on a screen.

It can record a video from that canvas, as a video is basically just an encoded series of canvas states.

So no problem - this is easy to program.

harrymc

Posted 2019-03-22T15:39:07.310

Reputation: 306 093

Thank you for your answer. I'll take a look at the API. – Nightfighter001 – 2019-03-22T16:22:21.933

For creating a video from the windows you will need some library. This is only easy if you already have the knowledge for it. But if you don't, then study is required. – harrymc – 2019-03-22T16:26:05.070

I think I would use ffmpeg for it since I already used it some time ago. – Nightfighter001 – 2019-03-22T16:28:32.513

In your answer you write about creating a new program not about create a virtual physical monitor. When I was using ffmpeg I recognized that I can't record a window outside of my physical monitor (because it isn't even processed?). Creating my own window won't help. – Nightfighter001 – 2019-03-22T16:54:35.663

You asked if that was possible and were answered. I don't think that ffmpeg is the tool to use here. You need to better study the subject. – harrymc – 2019-03-22T17:01:41.703