Question / Help PUBG drops frames due to render latency - but not when tabbed out?

zomg

New Member
I have a weird issue with capturing PUBG.

Whenever the game maxes out my GPU to over 95% use (according to GPU monitoring in task manager), OBS starts dropping frames.

Digging through the log files, I've found it appears to be "render lag/stalls". This value tends to be around 15% dropped frames.

But the really weird thing is... there are almost no dropped frames if I tab out of the game.

I've noticed several threads suggesting that maxing out your GPU can cause this issue, but why am I not dropping frames when tabbed out, when all other conditions remain exactly the same? Similarly, running a GPU stress test program such as FurMark has no effect on capture performance. FurMark easily maxes out the GPU at 100%, yet if I use OBS to capture the FurMark window, there are no dropped frames and the capture FPS remains a solid 60.

GPU use is same, ingame framerate is the same, monitor refresh rate is the same according to the monitor's builtin refresh rate counter... I can't see any difference in the circumstances except whether the game is focused or not.

Infact I don't even have to be recording and I can see the OBS preview already becoming choppy... except it's 100% fluid if I tab out.

I was also looking in the "Stats" dialog which reports the following:
- When game is focused, "average time to render frame" hovers around 20-30ms
- When game is not focused, "average time to render frame" is under 1ms.
- The stats screen also reports a large amount of frames dropped due to rendering lag when game is focused (similarly to what the log file suggested)


Things I've tried:
- Different encoders (both NVENC and x264)
- Different encoder settings (bitrates, presets, bframes..)
- Different video settings (output resolution, framerate)
- Turning off preview
- Turning off gsync
- Disabling my other monitors
- Clearing out all my scenes and leaving out just one with nothing but a game capture source
- All the possible setting combinations in the game capture source
- Monitor capture
- Even weird things like turning game mode on (have it off otherwise)
- Fiddling with random Nvidia control panel settings

None of these or anything else I can think of has had any effect on this.

Specs:
- Core i7 6900K (total CPU use during a typical problematic session hovers around 25-30%, with OBS itself reporting around 1-2% CPU use with NVENC)
- GTX 1080 Ti
- 32 GB RAM
- Windows 10


(I'm not discounting the possibility this is an issue with PUBG - it being kind of terribly optimized - but I see plenty of people capturing it at high framerates with no issues)
 

Osiris

Active Member
OBS needs a bit of GPU power too, you want to use vsync or a fps limiter to make sure the game doesn't max out your GPU on it's own.
 

zomg

New Member
Yes, but as mentioned, maxing out GPU with FurMark or simply tabbing out of the game - and there is no issue.

At least to me that seems to suggest it wouldn't be a GPU use% issue. Especially when FurMark is literally designed to get as much GPU use going as possible, and that still leaves enough for OBS to work with.
 

BK-Morpheus

Active Member
Does Tabbing out reduce GPU load (in many games, that's the case and the reason, why OBS render times is getting better)?
When creating a high GPU load, how many FPS you get ingame at that time?
I doubt, that Game+Furmark+OBS will get smooth rendertimes in OBS.
 

zomg

New Member
Alt tabbing out of the game has no effect whatsoever on framerate or GPU use. Framerate is usually around 120-130 at the time. I'm using Steam's FPS overlay for this, and also the monitor refresh rate remains pegged around the same number with the monitor's own refresh rate overlay (G-Sync)

FurMark at 100% GPU usage at 100 fps the OBS capture is still smooth as silk.

When tabbed out or in FurMark, there is a trivial amount of frameskip due to render lag at around 0.3% but that's such a small amount it's not noticeable in the recording at all. Especially when compared to 15% ingame when the issue occurs.
 

Steven Mears

New Member
I am having the same exact issue, I just made a thread about it, I was having this issue the other week and made a small setting change and it fixed it but I cannot remember what I did to save my life
 

zomg

New Member
I am having the same exact issue, I just made a thread about it, I was having this issue the other week and made a small setting change and it fixed it but I cannot remember what I did to save my life
Would love to know if you can figure out what it was :) PUBG is such a pain in the ass, literally changing any setting could have done it.

Tried with the latest OBS update - no change.
 

Steven Mears

New Member
Would love to know if you can figure out what it was :) PUBG is such a pain in the ass, literally changing any setting could have done it.

Tried with the latest OBS update - no change.

Im almost certain it was something in the properties of the game capture but ive messed with every combination and nothing works. I am going to try at it more tomorrow ill let you know if I can find the fix
 

zomg

New Member
Unfortunately it seems it may be a GPU scheduling issue with Windows and/or Nvidia's driver. Shadowplay suffers no lag whatsoever regardless of what's going on, but I also tested with Xsplit which suffers from exactly the same problem as OBS does.

It seems the only real solution is to either limit FPS as has been suggested, or use a secondary PC with a capture card and clone my display into it (and hope that it doesn't cause problems with different refresh rates between capture and gameplay monitor)
 

BK-Morpheus

Active Member
Yep, it seems that the API access has something to do with it.
Shadowplay has its own very fast and effective direct API access, which allows to grab the frames super quick without overhead and then put them through the NV-Encoder.
OBS and other tools have no access like that. They hook via DirectX/Windows and can only use the NVENC for encoding, but not the main advantage of Shadowplay.
It also seems, that some times the video stutters, even without any dropped frames (neither render nor encoding lag).
Hopefully, Microsoft and the GPU manufacturers will change this behavior in the future.

Right now, for me PUBG streaming works best with an FPS limit (60, on my 60Hz Monitor) via RTSS, exclusive Fullscreen Mode in PUBG and FastSync activated in Nvidia controlpanel, to prevent tearing.
This way, I got low input/display lag and almost no tearing while the GPU has an avg load of 75% in 1440p.
The recording/stream is pretty smooth 90% of the time and there are no dropped frames.
 

T0XiiC

Member
First of all my specs:

i7 8700k @ 4.9GHz stable OC
GTX 1070
16GB Ram
Windows Clean Install



I noticed the following:

Whenever I record PUBG through OBS (and the GPU usage is at 99%, which isnt the case all the time), the game itself runs smooth, but the recordings drop frames cause of rendering lag..

However, when I record GTA for example (which uses 99% of my GPU most of the time) the recording and game is smooth, no noticeable dropped frames.

Really strange.
 

BK-Morpheus

Active Member
Indeed strange. Both games are running in exclusive full screen mode?
Usually there is not a noticeable performance difference between fullscreen and borderless window (except the higher input or display lag), but in ARK i noticed, that my recordings are choppy very often, even when the game is running at capped 60fps with 80% GPU load.
After switching to exclusive fullscreen mode, the recordings were a lot smoother, although the fps cap and GPU load is the same.
 

T0XiiC

Member
I think I found a fix for myself at least,

Whenever I have my OBS (and the statistics window) open on my second monitor (so not minimized) I DONT drop frames. When its minimized, it drops frames.. Weird..
 
Last edited:

ValkyrieX99

New Member
I think I found a fix for myself at least,

Whenever I have my OBS (and the statistics window) open on my second monitor (so not minimized) I DONT drop frames. When its minimized, it drops frames.. Weird..

There's 3 scenarios;

- If you're in a full-screen game, with the OBS window behind it (same display as game). The OBS window loses focus and therefore loses GPU priority, so if the game maxes the GPU out, OBS suffers.

- If you're in a windowed game, OBS still technically has focus because it is still in the active rendering display, so it doesn't lag, if you minimize it, then it loses focus, and it lags.

- If you're in a full-screen game, with OBS open on the 2nd display, the OBS window then still has focus, so it won't lag. If it's minimized, it will lag as it loses focus, like when running windowed.
 

DEDRICK

Member
You bring up a good point actually.

I've tested out lagged frames before, I opened PUBG 1440p Ultra + Guild Wars 2 1440p Maxed both in borderless, then with OBS open 720p60 frame rendering, no lagged frames even though my GPU usage is pegged at 100%. I always have OBS open on my second monitor with Stats open when testing.

But, If I then open Twitch on my second monitor and watch a stream, whether it is behind or in front of OBS, I lag frames. The combination of Twitch + OBS on 2nd Monitor and Game(s) on 1st is the only time I lag frames.

So it's not GPU usage obviously or I would lag frames the second I open PUBG with OBS on the side.

It's how Windows distributes the resources.
* If I have just PUBG open, I have 99% GPU usage
* if I have PUBG and OBS open, I have 99% GPU usage (94% PUBG, 5% OBS) no lagged frames, the usage is split and shared
* If I have Twitch, OBS, and PUBG open I'm at 99% (PUBG 86%, Firefox 10%, OBS 3%, OBS loses priority and lagged frames begin.

When you cap your FPS or turn on V-sync, you mask the underlying issue by reducing the GPU load the game has, when in reality the issue is still present. OBS is losing GPU resources due to how Windows/Nvidia is handling them.

I don't recall the last time I saw an AMD GPU user complain about lagged frames in the same way, it's always NVIDIA and Windows 10
 
Last edited:

T0XiiC

Member
There's 3 scenarios;

- If you're in a full-screen game, with the OBS window behind it (same display as game). The OBS window loses focus and therefore loses GPU priority, so if the game maxes the GPU out, OBS suffers.

- If you're in a windowed game, OBS still technically has focus because it is still in the active rendering display, so it doesn't lag, if you minimize it, then it loses focus, and it lags.

- If you're in a full-screen game, with OBS open on the 2nd display, the OBS window then still has focus, so it won't lag. If it's minimized, it will lag as it loses focus, like when running windowed.
I guess its the 3rd point then cause I always have my games in normal Fullscreen. However, I still do drop some CPU encoding lag frames (it stays at 0.0% tho, like 20 out of 50000 or something.)
 
Top