Question / Help OBS Preview/OBS FPS drop unless outside of game window

NoTick

New Member
So, this is an extremely odd situation...

I just built a brand new Threadripper system (1950x) specifically for streaming.

I'm attempting to stream at 720p@60fps -- which, lets face it, is a cake walk for this system.

Whenever I'm inside the game, the fps meter drops by 30+ frames. (E.g. the FPS meter says 60, then drops). The preview even looks choppy as hell. It does this when streaming or not -- it does it whether I'm in full-screen, or windowed boarder-less. It does it in multiple games. It does it whether I have Gsync on, or not. It does it whether I have Vsync on or not. IT does it whether I have my 144hz monitor set as such, or 60hz. Nothing I do resolves this. I've changed the render preset from Slow to Very fast - it's unaffected. I've turned the FPS down to 30 -- it'll still do it there, albeit not as much.

What's even more odd -- I can go to a scene in a single player game and have massive FPS drop in the OBS preview and FPS meter, but as soon as I cursor out of the window, the FPS goes back to a perfect 60fps and looks smooth in the preview, with all the action going on in the game being displayed correctly.


...Anyone have even the foggiest idea?


Log:
https://gist.github.com/f7ce9a657155addf04a94b4a7aba89f7
 
Last edited:

vencabot

Member
Of course... My apologies.

https://gist.github.com/f7ce9a657155addf04a94b4a7aba89f7

If you go to ~1:35 in this VOD (https://www.twitch.tv/videos/170899395), you can see the robots shooting while inside the game, then when I tab out, it immediately smooths and everything is perfect.

Pretty unusual problem. My first thought, from reading the title, was that it had something to do with the framebuffer ownership of full-screen games, which is known to cause problems like this, but you say that it happens whether you're in full-screen or borderless fullscreen (which shouldn't cause the issue), or in Windowed mode, etc.

What I find especially interesting is that it happens just from you mousing over the game window. That's super bizarre and sounds like something particular to your rig, the software you're using in your OS, etc. I'd be very interested to see a desktop capture showing a game window and OBS Studio's window, where you can move your mouse back and forth and we can see the FPS drops. That's pretty nuts.

Do you have Windows 10's 'Game Mode' overlay disabled? That's the most voodoo thing I could think of, and an issue like this seems like it'd have to be some voodoo. I hear that the Game Mode overlay causes all kinds of weird problems -- and if it's some piece of software detecting whether your mouse is over a particular window...? Seems like it'd need to be something Windows-related or something else relatively deep in the OS (drivery stuff).

That's my take! I'll be watching this thread. Good luck.
 

brettcadet

New Member
I just built a Threadripper machine and am having similar issues. I've been streaming 3 years with my 4790k and never had dropped frames or had my stream FPS dropping like I do with the TR machine. I have 50 up/50 down internet and my CPU is only using about 30% of its resources with good thermals. I posted a similar thread about my issue last night. It seems like more and more threads are popping up about it.

https://youtu.be/PQnCWQDlQA4?t=240

This Youtube reviewer describes a similar problem around the 4 minute mark.

https://obsproject.com/forum/threads/presets-fps-loss.73660/

^ It seems like explicitly setting the encoder to use 22 threads helped this person a bit. I have yet to try that, but I have disabled Game Mode in Windows and set OBS to always run as Administrator.

Definitely seems fishy that such a powerful CPU would struggle, but it's early days so maybe some bugs just need to be worked out?
 

c3r1c3

Member
Make sure that Game mode in Windows 10 is turned off. Same for GameDVR. Also check your AV and make sure it doesn't have any type of pseudo-"Game Mode" option turned on.

Don't have a game and display capture in the same scene.

Make sure that your GPU is in an 8x+ PCIe slot running off the CPU (run GPU-z for confirmation).

Make sure your system is running in Quad or Dual-channel mode (run CPU-z for confirmation).

If you do all of that and still no dice, then please post a link to a clean log with profiler information. First restart OBS, then start your stream/recording for ~30 seconds and stop it again. Make sure you replicate any issues as best you can, which means having any games/apps open and captured, etc. When you're done, close OBS, Open OBS, and select Help > Log Files > Upload Last Log File. Copy the URL and paste it here.
 

NoTick

New Member
What I find especially interesting is that it happens just from you mousing over the game window. That's super bizarre and sounds like something particular to your rig, the software you're using in your OS, etc. I'd be very interested to see a desktop capture showing a game window and OBS Studio's window, where you can move your mouse back and forth and we can see the FPS drops. That's pretty nuts.

Do you have Windows 10's 'Game Mode' overlay disabled? That's the most voodoo thing I could think of, and an issue like this seems like it'd have to be some voodoo. I hear that the Game Mode overlay causes all kinds of weird problems -- and if it's some piece of software detecting whether your mouse is over a particular window...? Seems like it'd need to be something Windows-related or something else relatively deep in the OS (drivery stuff).

This is happening in all forms of capturing -- Game, Window, and Screen Captures. The VOD I posted was using Screen Capture -- but I've already tested all three capture types and get the same result. When I disable the capture (simply clicking the 'show' icon and disabling), the FPS drop goes away.

I've already disabled gaming mode in windows 10 -- I have also disabled video recording in Blizzard. I believe I disabled nVidia's recording service but I need to verify this, as it may have been re-enabled because one of the steps I tried was to use 3dGuru's display driver scrubber to wipe out all nVidia stuffs and reinstall the nVidia drivers.

I'll try again tonight and do a screen capture again - but put the OBS window on the screen too as you suggest. It's really weird to watch.

I just built a Threadripper machine and am having similar issues. I've been streaming 3 years with my 4790k and never had dropped frames or had my stream FPS dropping like I do with the TR machine. I have 50 up/50 down internet and my CPU is only using about 30% of its resources with good thermals. I posted a similar thread about my issue last night. It seems like more and more threads are popping up about it.

https://youtu.be/PQnCWQDlQA4?t=240

This Youtube reviewer describes a similar problem around the 4 minute mark.

https://obsproject.com/forum/threads/presets-fps-loss.73660/

^ It seems like explicitly setting the encoder to use 22 threads helped this person a bit. I have yet to try that, but I have disabled Game Mode in Windows and set OBS to always run as Administrator.

Definitely seems fishy that such a powerful CPU would struggle, but it's early days so maybe some bugs just need to be worked out?

I've actually come across some of your messages in other posts and tried the "threads=22" method... But it did not help. I even forced OBS by altering its Affinity in windows -- reducing it's access to threads. I gave it only 8 CPU threads, and it still happens.

My issue appears to be entirely BEFORE encoding. It's almost as if the 'capture' scenes (Window/Screen/Game) are lagging themselves. The FPS counter is dropping whether OBS is streaming and utilizing CPU, or not. (E.g. the Window is open - but not streaming - the FPS counter still drops while inside a 'captured' game whether it be Window Capture, Game Capture, or Screen Capture)

As aforementioned, this is happening in all forms of capturing -- Game, Window, and Screen Captures.


Make sure that Game mode in Windows 10 is turned off. Same for GameDVR. Also check your AV and make sure it doesn't have any type of pseudo-"Game Mode" option turned on.

Don't have a game and display capture in the same scene.

Make sure that your GPU is in an 8x+ PCIe slot running off the CPU (run GPU-z for confirmation).

Make sure your system is running in Quad or Dual-channel mode (run CPU-z for confirmation).

If you do all of that and still no dice, then please post a link to a clean log with profiler information. First restart OBS, then start your stream/recording for ~30 seconds and stop it again. Make sure you replicate any issues as best you can, which means having any games/apps open and captured, etc. When you're done, close OBS, Open OBS, and select Help > Log Files > Upload Last Log File. Copy the URL and paste it here.

GPU is in a PCi-E 16x slot

Windows 10 pro install is Three days old (literally a brand new rig)

RAM is confirmed running in QUAD channel. MEMtest ran for two hours after overclocking it to 2933 (16/16/16/36@1.35)

The log I attached to this was from the same ~2 minute stream posted in the VOD. I will, however, do as you suggest after verifying a few other things this evening when I get home.


I appreciate everyone's input.
 
Last edited:

NoTick

New Member
Kind of dumb to say this but try recording with no sources and see if it still causes rendering lags.

Hah -- Not dumb at all. I had tried that already. The FPS meter in the stats bar at the bottom stays a full 60 fps while streaming with no capturing - it's only when any form of capturing is on going. Even if I turn 'display capture' on, it stays a full 60 when I'm just on desktop.

It only appears to happen when I am inside the game itself (E.g. not tabbed out).

I've just tried rolling back nVidia drivers to previous version... Same issue. Also ran it with absolutely nothing running aside from my Antivirus software, Battlenet App, Overwatch, and OBS. I even tried a run with Battlenet app closed after game launch. Same thing, still.

This is extremely perplexing.
 

Coma

New Member
While I can not offer any help with your issue I can also confirm this behavior in OBS with my setup.

There have been MANY posts about the problem with the FPS meter shown in OBS dropping below 30 or 60 fps and I have even created a report on the OBS Bug Tracker.

Unfortunately the developers do not seem to want to even consider it might be a problem in the OBS software.

I can appreciate the developers could get frustrated when they have to deal with a lot of user created problems, but it does appear there may be an issue somewhere in the software.
 

Teddie

New Member
It's a shame, hope it gets figured out soon. Im running a 1440p 144Hz setup on a i7 6700K system and my OBS drops frames. A temp fix for me unfortunately is to change the resolution of the game to 1080p and that seems to be more stable. Also not sure if its a high refresh rate issue.
 

NoTick

New Member
My current estimation to the issue I, specifically, am seeing:

The Capture plugin's don't like the high Core/Thread count and don't know how to handle it. My previous CPU - an i7 3770k - could CAPTURE 60fps with no dips what-so-ever (Game will capture, and FPS list full 60fps in bottom stats and never drop). It couldn't, however, encode it. (E.g. when I hit 'record' or 'start stream' it would drop as there's not enough headroom for game and encoding with that CPU at that high of a framerate.)

To test my theory, I stopped down-scaling on the CPU, and switched to doing it on the GPU. (E.g. down-scaling done in the Video tab, not the Output tab). Once I did this, the frame-rate goes up in the capture... But it still drops 5-10 fps (vs. the 25-30+ fps). This tells me that the plug-in is getting confused by the CPU for some reason. With 32 active threads -- there's no reason this should be.

I'm having the exact opposite issue that the majority of people face with FPS drop. I can encode it, but the capture plugins are lagging for whatever reason and they're only lagging when my cursor is actively inside of the game itself. When tabbed out of the game, it's capturing a full 60fps, and can be seen while I'm streaming.

I'm at a complete and utter loss. At this point, I'm going to try a couple other streaming software's to see if I experience the same issue or not.
 
Last edited:

Osiris

Active Member
If there are lagged frames, it usually means your game is maxing out the GPU. Limit FPS in the game to avoid that.
 

Teddie

New Member
If there are lagged frames, it usually means your game is maxing out the GPU. Limit FPS in the game to avoid that.
Weird how it can max out a 1080 and a 1080ti. I did change the resolution in the game to 1080p and that seemed to stable things. But then whats the point in gaming on my 1440p 144Hz monitor.
 

NoTick

New Member
OK -- So I solved my issue. It was two total things.

I had 6 total sources listed in the 'sources' window. 3 were Browser Captures (Two for alerts - One was the 'event' box -- all streamlabs). I also have two 'captures' in there -- only one active at a time (display and game - both there depending on my needs at the time of streaming). And finally, I had a 'media source' which had an Animated Gif on a loop.

So -- what the cause was:
  1. Media source on a loop (animated .GIF) was problem one. Removing this heavily increased the captured frames.
  2. My 'Events' was custom CSS made on Streamlabs, and I had an animated .GIF in it. Replacing my Custom CSS with one of stream-labs default selections removed the remaining loss.

I, still, think this is very odd... But at least it makes some sense. I know OBS, for each 'plugin' in the sources list, has it's own process that runs in windows. I suspect that the Capture process isn't playing nice with active FPS driven sources (such as animated gifs) simultaneously. Maybe they're all being forced to run on the same thread?... ¯\_(ツ)_/¯
 

Teddie

New Member
So pretty much twitch alerts with custom gifs and sound could be the culprit of taking up resources? Damn....I liked mine. would turning them off work, or would you have to either completely remove them or just do default icons in streamlabs?
 

NoTick

New Member
It was only the ones that had an animated GIF in it.

I am still getting some FPS drop after encoding now... Which is still weird... But it's entirely different than what it was before.
 

Mike9823

New Member
Wow I have researched this so much and literally just decided I'd hop on and make a post about it! Then went to see recent threads and here you are with the SAME issue hahaha!
 

NoTick

New Member
The 'encoding' issue I was seeing on the Threadripper was solved by using AMD Ryzen Master, and switching the memory distribution from 'Distributed' to 'Local'. This is supposed to distribute the CPU data to it's direct, correlating Cache memory on the die -- but I noticed it also distributed the load evenly across the threads, as well.

It was interesting to watch... When streaming with it on distributed, the stream was being assigned to every other thread. When switching to Local, it got evenly distributed to a grouping of threads (in my case - threads 16 thru 32)

This also tells me that OBS doesn't want to talk to more than 16 threads, since no matter what I do it won't encode on any more threads than that.
 
Last edited:
Top