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

More
3 weeks 3 days ago - 3 weeks 3 days ago #1 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: 3 weeks 3 days ago by NotSoSweet.

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

More
3 weeks 3 days ago - 3 weeks 2 days ago #2 by lordbean
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: 3 weeks 2 days ago by lordbean.

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

More
3 weeks 2 days ago - 3 weeks 2 days ago #3 by NotSoSweet
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: 3 weeks 2 days ago by NotSoSweet.

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

More
3 weeks 2 days ago - 3 weeks 2 days ago #4 by lordbean
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: 3 weeks 2 days ago by lordbean.

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

More
3 weeks 2 days ago - 3 weeks 2 days ago #5 by NotSoSweet
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: 3 weeks 2 days ago by NotSoSweet.

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

More
2 days 23 hours ago #6 by crosire
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.