Is it possible to speed up PNG Screenshot capture/saving?

  • NotSoSweet
  • Topic Author
More
2 years 3 months ago - 2 years 3 months ago #1 by NotSoSweet Is it possible to speed up PNG Screenshot capture/saving? was created by NotSoSweet
Is it possible to speed up screen capture process somehow?

It was fairly slow but still tolerable when i was on 1080p screen, but on 4K screen/resolutions it not just slow - it is painfully slow for non-static games i.e. practically useless - like i cannot even capture what i want to because ReShade is always 1-2 seconds too late... and with these lags you likely to lose that special moment you wanted to memorize. Some character emotion or pose, awesome explosion or fast moving object for example. There is no way to capture these moments with ReShade in 4K and PNG.

Also the whole game lags when i use screenshot feature. Why it is just so unoptimized?

I'm not even talking about series of screenshots with minimal delay like you can do in Steam or MSI Afterburner, it's just not possible in ReShade@4K

For example:
1) i hit screen capture key
2) game stutters for 1-2 sec, the moment is lost forever
3) ReShade pops with delayed screen capture notice
4) delayed screen capture appears on my SSD

Like, if its not possible to optimize file writing process by some reason, then can ReShade at least cache screenshots to the RAM and write them later?
Also i'm not even sure that this is a write lag. If it was a write lag, then the result screen capture would not lag behind in time? Right?
So can it be both write and capture lag?
So could there be a delay in recording and capturing? Oh man...

Something need to be changed. Please?
Last edit: 2 years 3 months ago by NotSoSweet.

Please Log in or Create an account to join the conversation.

  • lordbean
More
2 years 3 months ago - 2 years 3 months ago #2 by lordbean Replied by lordbean on topic Is it possible to speed up PNG Screenshot capture/saving?
ReShade's screenshotting code is already reasonably fast considering it saves a much higher quality screenshot than most overlays. If you take a screenshot using the Steam UI there's still a stutter and you get a jpeg with lossy compression enabled (which is fast, but not necessarily 100% accurate to what was on the screen). ReShade's is a BIT slower, yes, but not by much, and you get a png in lossless mode (which is large, but can be optimized to be a lot smaller with a third party utility).

Edit: incidentally, the frame that ReShade captures is the one that stays on the screen for a moment during the stutter, not the frame the game initially renders after it (meaning that the screenshot you get is the frame that's onscreen when your finger goes down on the screenshot button). If you're missing the exact moment you want to catch, you probably just need to press the button faster. Try binding it to something you can easily reach without moving your hands.
Last edit: 2 years 3 months ago by lordbean.

Please Log in or Create an account to join the conversation.

  • NotSoSweet
  • Topic Author
More
2 years 3 months ago - 2 years 3 months ago #3 by NotSoSweet Replied by NotSoSweet on topic Is it possible to speed up PNG Screenshot capture/saving?
I strongly disagree with "a much higher quality" and especially "a bit slower". ReShade is terrible slow while capturing one-time 4K PNGs. And with ReShade it is impossible to capture series of 4K PNG screens with minimal delay, like at all.

Also i was talking about PNG screen captures and they are lossless in ReShade, Steam and MSI Afterburner. In Steam you need to check "save uncompressed copy" to get PNG.

And finally - Steam does not stutter with saving/writing operations - the UI perhaps lags, but not the data writing. You can hit screenshot key as fast as you can, same as with MSI Afterburner (technically we are talking about RivaTuner Statistics Server which is a part of MSI Afterburner and handles all these captures).

you probably just need to press the button faster. Try binding it to something you can easily reach without moving your hands.


Man stop being white knight to ReShade. ReShade does not need it, it is the most robust game-altering tool on the market, but with a long forgotten screen capture toolset.

TL;DR: I'm sorry, but i dont think that you ever know what you talking about or you have never tried to capture screens with ReShade on 4K screens vs other tools.
Last edit: 2 years 3 months ago by NotSoSweet.

Please Log in or Create an account to join the conversation.

  • lordbean
More
2 years 3 months ago - 2 years 3 months ago #4 by lordbean Replied by lordbean on topic Is it possible to speed up PNG Screenshot capture/saving?
So use one of the other options you mentioned instead? /shrug

The screenshot functionality of ReShade was mostly intended to be an easy way to save before/after screenshots showing the difference between running injected shaders and not, is the way it seems to me. As you point out, there are faster options out there. If all you're interested in is saving a bunch of screenshots, any method of capturing them will work fine.

FWIW, trying to match the perceived speed of capturing a screenshot using an injected overlay (like Steam) via ReShade is an uphill battle because ReShade is injected directly into the game executable, hence when it goes to save a screenshot, it's technically actually the game's own .exe file writing the screenshots to disk. Since it uses the game render thread to do so, the hitch from a ReShade screenshot will very likely always be larger than an equivalent quality screenshot taken from an injected overlay (or perhaps even the game itself, since the native code could multithread) since an overlay only needs the game's render thread to pause long enough for it to copy the backbuffer to RAM. After that, the external process tied to the overlay can take over the I/O (disk writing) part, which won't be felt as hitch time in the game since it is no longer the game render thread handling it.
Last edit: 2 years 3 months ago by lordbean.

Please Log in or Create an account to join the conversation.

  • NotSoSweet
  • Topic Author
More
2 years 3 months ago - 2 years 3 months ago #5 by NotSoSweet Replied by NotSoSweet on topic Is it possible to speed up PNG Screenshot capture/saving?
I know what i am comparing to. ReShade, MSIA and Steam, Ubisoft, EA, Special K, ENB, etc are all processes that are injected into the game memory space. They all work the same but doing different things after the injection. You can event inject ReShade into the Steam, launch the game and it will still alter game image with some basic effects.

uphill battle because ReShade is injected directly into the game executable, hence when it goes to save a screenshot, it's technically actually the game's own .exe file writing the screenshots to disk


The hell. Just stop it...

And you know, this is suggestion forum i.e. the forum about proposed ReShade enhancements. Not the forum about "find me the solution no one asked for".
I wont discuss it with you anymore, as you showed that you have no clue about this topic in your first post, so your second post does not makes it better.

Back to the topic - my suggestion is still valid. Crosire please, if possible, look into the ways to increase capture speed at some point in the future.
Last edit: 2 years 3 months ago by NotSoSweet.

Please Log in or Create an account to join the conversation.

  • crosire
More
2 years 3 months ago #6 by crosire Replied by crosire on topic Is it possible to speed up PNG Screenshot capture/saving?
As of github.com/crosire/reshade/commit/95071c...d27771e53ba485ad2261 and github.com/crosire/reshade/commit/cd46e0...8db5b14c5f88be07995a PNG screenshot saving is now much much faster and no longer blocks the game (from previously ~2s to <1s), so there is no noticeable stutter while it is happening anymore.

Please Log in or Create an account to join the conversation.

  • NotSoSweet
  • Topic Author
More
2 years 2 months ago #7 by NotSoSweet Replied by NotSoSweet on topic Is it possible to speed up PNG Screenshot capture/saving?
Hello. Thank you for this speed bump. I tested it and it seems to be really fast. But I can't check how fast it actually is!
Why? Because now we have small problem - ReShade overwrites files that were captured within 1 sec time frame.

For example
23:13:34:421 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-13-34.png" ...
23:13:34:812 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-13-34.png" ...
23:13:35:024 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-13-35.png" ...
23:13:35:254 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-13-35.png" ...
23:13:35:456 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-13-35.png" ...
23:13:35:651 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-13-35.png" ...
23:13:35:846 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-13-35.png" ...
23:13:36:031 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-13-36.png" ...
23:15:42:602 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-42.png" ...
23:15:42:925 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-42.png" ...
23:15:43:198 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-43.png" ...
23:15:43:461 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-43.png" ...
23:15:43:733 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-43.png" ...
23:15:43:996 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-43.png" ...
23:15:44:277 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-44.png" ...
23:15:44:558 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-44.png" ...
23:15:44:847 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-44.png" ...
23:15:45:111 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-45.png" ...
23:15:45:367 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-45.png" ...
23:15:45:614 [14832] | INFO | Saving screenshot to "C:\some_folder\some_game 2022-02-02 01-15-45.png" ...

Some possible solutions:
- add milliseconds at the end of the file (that's how it's done in RTSS for example)
- add file index at the end of the file

Once again - thank you!

Please Log in or Create an account to join the conversation.

  • crosire
More
2 years 2 months ago #8 by crosire Replied by crosire on topic Is it possible to speed up PNG Screenshot capture/saving?
Why would you need to save more than one image per second though?

Please Log in or Create an account to join the conversation.

  • NotSoSweet
  • Topic Author
More
2 years 2 months ago #9 by NotSoSweet Replied by NotSoSweet on topic Is it possible to speed up PNG Screenshot capture/saving?
To capture something really fast (combat effects etc) without video and then delete these "extra" screens! Kind of picky i know, but why not if the tech is here already?

Please Log in or Create an account to join the conversation.

  • NotSoSweet
  • Topic Author
More
2 years 2 months ago #10 by NotSoSweet Replied by NotSoSweet on topic Is it possible to speed up PNG Screenshot capture/saving?
Perhaps it can be done with additional argument so it will not annoy to the masses, something like
FileNaming=%AppName% %Date% %Time% %ms%

Please Log in or Create an account to join the conversation.

  • crosire
More
2 years 2 months ago #11 by crosire Replied by crosire on topic Is it possible to speed up PNG Screenshot capture/saving?
Fair enough

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.