Ssr: Can SimpleScreenRecorder capture a game frame by frame as image sequence instead of compressed video?

Created on 24 Dec 2018  路  7Comments  路  Source: MaartenBaert/ssr

As title, what I want is 100% image quality, that is, lossless screenshot, not uncompressed from video which is always lossy. And I need a continuous sequence of images captured from the game (preferable 60 fps, but 30 fps is ok too). Since I cannot press PrtScn key 60 times a second because I am a mortal human, and even if I can, the previous screenshot saved in memory is soon overwritten by the next, I am looking for an existing open source that can do it automatically for me. Is there any interface in SimpleScreenRecorder that I can use towards this goal? If no, is the work to add this feature into SimpleScreenRecorder hard so that I can add it in a week? Thanks in advance for your reply.

All 7 comments

Yes, this is possible with codec libx264 or libx264rgb with options crf=0 and keyint=1. For more details see my last comment in #502. You could also try the rawvideo codec, which does exactly what it says, but the file size will grow insanely fast and raw video is poorly supported by other software.

Afterwards you can extract the frames and convert them to PNGs if you prefer with ffmpeg. But for real-time recording, PNG is too slow.

In practice you will always have serious issues with file sizes when dealing with uncompressed video, in most cases you are better off with a near-lossless H.264 file such as with crf=10, keyint=1.

Thanks for the reply. Can we completely forget video, H.264 or mp4, whatever? What I want is a sequence of images, obtained exactly the same way as pressing PrtScn, thus exactly 100% image quality. Not through any video, just directly export the images from the frame buffer to PNG file. Can SimpleScreenRecorder do that? When SimpleScreenRecorder uses libx264 or something to generate video, it has to take the raw data obtained from frame buffer as input, right? These raw data are exactly what I want. My question is whether SimpleScreenRecorder offers any interface to export these raw data captured from frame buffer and save them directly to the disk as image sequence. Or, if not, is it hard to add this feature (by myself) into SimpleScreenRecorder in only one week? To avoid any possible misunderstanding, let me repeat again: what I want is image sequence captured from a game directly, not from uncompressed video.

Like I said, generating 60 full-resolution PNGs per second is not possible. It is too slow. It is possible though to store them as raw video (rawvideo codec). But this produces ~370MB/s of data for 1080p video at 60 fps. This is way too fast for any hard disk, you would need a very fast SSD, and it would fill up within minutes. What you are asking is not practical. The closest practical solution is libx264rgb with crf=0,keyint=1 which is lossless like PNGs, but much faster.

Why "generating 60 full-resolution PNGs per second is not possible"? Your mind is completely trapped in video, video and video. Anyway, it is not what I am asking. My question is: where is the part of SimpleScreenRecorder that capture images from frame buffer? PS: does your code only work on Linux?

Videos are nothing but a sequence of images. Recording raw video is similar to saving a bunch of bitmaps. The question is: what exactly are you trying to achieve? Do you just want a lossless capture?

Just so you know, I have already finished writing a piece of C++ code that can do all I want: capture game frame by frame +100% quality + real time, something you think "impractical". I'm tired of all the bullshit and deviation from you. It's totally a waste of time talking online with you all because internet nowadays is full of nothing but pretentious dilettantes and even idiots like you. Close the ticket now.

Wow, chillax buddy, there's absolutely no reason for such harsh language.

Okay, first, it _is_ "impractical" for most people (as most just want a single video). Then, using a lossless codec, whether it's rgb, yuv, compressed or uncompressed, does exactly what you're saying: realtime capture frame by frame without quality loss. @MaartenBaert just said that PNG is too slow.

Was this page helpful?
0 / 5 - 0 ratings