Question / Help FPS Stutter while streaming with OBS Studio (1 Solid Built PC)

Sprintex67

New Member
Before you even start reading, here are some videos where you can see the actual problem:

PUBG and LoL test 720p GSYNC off VSYNC off:

LoL :
https://www.twitch.tv/videos/369967836

PUBG :
https://www.twitch.tv/videos/369977352

PUBG and LoL test 1080p GSYNC on VSYNC off:

LoL:
https://www.twitch.tv/videos/369982884

PUBG:
https://www.twitch.tv/videos/369986666

To begin with, i'd like to mention that i've already read this post: https://obsproject.com/forum/threads/the-ongoing-saga-with-sli.96068/ (i may not have understood everything in it, so thats why if u guys could explain it to me with my settings that would be helping me even more)
I kinda have the same exact problem, and i would like to still ask you guys what are my possible options before i really, really have to remove 1 GPU to have smooth streaming experience. The thing is that i have 4 monitors and 1 TV, which 3 of them are connected to 1 GPU and the other 2 to the 2nd gpu. I didnt really want to have only 1 gpu and buy an hdmi splitter as that may compromise the performance and put too much strain on only 1 GPU, therefore it is also why i didnt buy a 2nd pc for streaming purpose, i thought if i built this beast i would be able to stream without fps issues. To better explain to you guys what's going on, i will share to you my pc part picker link to the current pc build i have (which is version 3) and i will also send you a log from OBS, although i dont know how much that might be of help. I also changed some settings in nvidia control panel in order to muster the most performance as possible since i have 2 GPUs connected to the same motherboard (even though SLI is disabled) ill link the changes as well so you guys can see whats going on.
Here is the PC Part Picker Link:
https://pcpartpicker.com/user/olympus71/saved/#view=nph4D3
Here is the Nvidia Settings i made in the control panel, the OBS Settings i currently use and of course, the PCIE Express lanes used for each of the GPUs:
https://imgur.com/a/JBqVT8m

P.S The settings i have in PUBG in nvidia settings also apply for any other game, including league of legends. When i dont stream, i gained about ~90 fps in both of them just because i focused them on only 1 GPU instead of the default preset (both of them) which are not even enabled by SLI. I thought this would help if i did the same for the OBS program and choose the 2nd gpu, but it seems that in OBS i can only choose the GPU 0, the GPU 1 is not even noticeable (obs doesnt pick up 2nd gpu). Is this because of the pcie express bandwidth used? hmm.
Anyways ty for reading all this and please let me know what could i possibly do to remove that fps stutter whenever i start streaming.....Im goin' crazy!

I'll include a log file shorty after this post has been posted. Thank you all for helping me in advance!
 

Attachments

  • 1st Log File.txt
    40.2 KB · Views: 19
Last edited:

koala

Active Member
I am unable to comment on a system with 2 GPUs and 5 displays, since I never even remotely had such a device in reach. But I can comment on 2 things seen in your log file:
- most of the nvenc errors result in you having set level to 1. This level is a number that declares the required capabilities for players to play back the video. If you request settings above that level, encoding fails. Level 1 is something absolutely basic like "resolution below 320x200", so trying to encode 720p and setting level 1 will fail. Simply always set level to auto to let OBS choose the correct value according to the other parameters you set.
- the GPU number in the nvenc settings is not the GPU OBS is running on and does its rendering. It is which GPU should be used for nvenc. I don't understand why the second GPU (#1) cannot be selected, but this is a minor problem, since nvenc doesn't stress the GPU, because it is a dedicated circuit on the chip that does not use up any GPU computing resources. Keep it at #0.

Performance issues arise if you run a capture of an app that is running on a monitor that is connected to a GPU different from the GPU OBS is running on. Currently, OBS is running on GPU 0, so avoid capturing apps on the other GPU. Especially if you try to capture that 4k display. The 4k video data has to be captured, sent through the pci-express bus to the other GPU, where OBS does compositing the stream. Then downloaded to CPU memory (again through the pci-express bus) for the encoder. If the encoder happens to be nvenc, it will be uploaded to the GPU again and the encoded frames downloaded again. Since you have 2 GPU cards, both are driven with only x8 pci-e speed each instead of x16 speed if you only have one card. That means you halve the available bus bandwidth and at the same time double the transferred data. This may congest the pci-express bus, result in a performance bottleneck and result in stutters, low frame rate not only with OBS but also with all apps that are running.
 

Narcogen

Active Member
20:03:58.571: Windows Version: 10.0 Build 17134 (revision: 523; 64-bit)
20:03:58.572: Running as administrator: false
20:03:58.572: Aero is Enabled (Aero is always on for windows 8 and above)
20:03:58.572: Windows 10 Gaming Features:
20:03:58.572: Game DVR: On


Your Windows is out of date and Game Mode is on (separate from Game DVR).

Download the October 2018 update and turn game mode off. It's possible that you couldn't set NVENC to use the primary card because the Game DVR process was using an NVENC session.
 

Sprintex67

New Member
UPDATE:
i did the GSYNC test.
With gsync enabled , game running in windowed mode and youtube video fullscreen on 2nd monitor, i get around 105-140 fps (the fps goes up and down real quick, like from 130 to 100 and back and forth), therefore there is a little bit of stutter yes.
I imagine that stutter is because monitor is 165hz. (i call that static stutter, as opposed to dynamic stutter with obs being in foreground on one of the 2ndary monitors minimized or not, that one its not really fps loss, but really like fps stutter its rly weird, thats why i wanna test with the PCIe bandwidth thing.)
Same settings, fullscreen mode this time, i get constant 144fps (limited to 144 instead of unlimited).

With gsync disabled, game running in windowed mode and youtube video fullscreen on 2nd monitor, i get around 104-139 fps (the fps goes up and down real quick, like from 130 to 100 and back and forth), but this one man screen tear is REAL this is became unplayable without gsync jesus, as for stuttering its kinda the same.
Same settings, fullscreen mode this time, i get constant 144fps (limited to 144 instead of unlimited). screen tearing not as bad around this much fps
tests were made with nvidia global vsync settings at use the 3D application settings and the program settings of the game was default as well. (use the 3D application setting)

i did the same tests with vsync off and GSYNC on in global settings and in program settings and results were about the same for the fps speaking wise. But the fact that gsync was enabled was a huge difference, because there was literally no screen tearing and i felt like it was more smooth even though the fps was still dancing around the same ranges.

All these being said, i also tested obs in the foreground in one of the monitors while playing the game on main monitor and...Vsync on or off, Gsync on or off, it still gives the same fps stutter / rippling / call it whatever you may like to the main gaming screen. When i minimize it back to tray BUM, everything works perfectly fine....

Comments on the results:
These tests clearly tell me that this is not hardware issue, but a software issue, because the usage performance is quite not that bad, so this couldnt possibly be the cause of a bad driver or bad hardware for the fps stutter/rippling while OBS Studio is in the background of any of the 4 other monitors. (see attachement below for the image)

Knowing all this and done all that, there is but 1 thing left to do.
i7 7820X cpu = 28 PCIe express lanes
1 gpu = 16x 2nd gpu = 8x
16x+8x = 24 pcie express lane utilised. That leaves me with 4x express lanes to play with.
Knowing obs has scenes compositor integrated with it, that takes a certain amount i do not exactly know of PCIe Express Bandwidth.
The ultimate fix to knowing why i get that fps stutter when i have opened in one of the monitors background comes down to this.
- Removing graphic card physically and test it again with 16x pcie express lanes free of usage.
RESULTS OF THAT TEST COMING SOON ! hopefully this can help you guys out there who have the same kind of issue i guess when you want to stream.
Here is the new clean log for the test with obs in foreground (that's when I get fps stutter): https://obsproject.com/logs/y-ZPsQfBpHzUCUpo
Here is the usage I get on GPU while having obs in foreground:
https://linustechtips.com/main/uplo...tion.png.16353be671b9c3d2d063a87d6c8b7383.png

P.S. I also tested to see if I get same stutter if I use the same GPU for everything. Global settings in nvidia, program settings for game client as well as obs client same gpu on all of them. Vsync off on all. Still same stuttering. If it really were a bandwidth bottleneck, then why does it stream perfectly fine with obs minimized in the tray (background running) as opposed to it being on the foreground (active window running) ?

I asked a few ppl if they get same stuttering if they have main monitor and obs running in foreground on 2nd monitor and they said they have no problems.....maybe thats because they have only 1 GPU.
That itself is super ludicrous because I made this build with the mindset that it would be able to hold streaming, 4 monitors + 1tv and gaming in the same time....

Or maybe is there any reduction to hardware GPU acceleration in order to reduce the video stutter while in foreground? I refuse to believe that it is a PCIe express lane problem and the bandwidth gets bottlenecked when obs is open in the foreground of a 2ndary monitor man. It's not normal. I did all this in order to try and find solutions to avoid having to physically remove the 2nd GPU in order to solve the problem. If I do end up removing one I'll be left with 3 monitors only and that makes me sad panda.
sad.png




UPDATE #2:

I removed 1 1080ti, i have 16x pcie express lanes on this one card and 12 PCIe express lanes left. That means enough bandwidth for twitch to support it. Yet, i still get the stuttering issues even tho so many people told me to have just 1 card cause SLI causes issues. Guess not ladies and gentlemen, literally same thing happens when i have obs in the foreground, since this post was created.I even updated obs in hope this would fix things ( but i did not uninstall it )....at this point maybe a clean uninstall and reinstallation with new scenes and sources for obs would do the trick...but at this point i doubt it, idk what to do anymore dudes. Im clueless i did everything i could think of
unsure.png
This is such ludicrous and frustrating.



UPDATE #3:

Picking up from update #2, here are the changes i did in hope to fix the so well known foreground obs studio issue problem.

Seeing previous logs, a good guy noticed that i had old windos version and also the fact that i had game DVR, which, according to him:

" Your Windows is out of date and Game Mode is on (separate from Game DVR).
Download the October 2018 update and turn game mode off. It's possible that you couldn't set NVENC to use the primary card because the Game DVR process was using an NVENC session." Reading this, i said to myself alright. Maybe this has something to do with the stutter. Then i did an windows update as well as disabling game dvr in regedit. During that process, i uninstalled every program i could think of that i didnt really use and might have an indirect impact on the obs studio being in the foreground. I was basically left with the basic programs at the end. I even uninstalled antiviruses anything i could think of. Then, to make sure i didnt miss anything, i also completely uninstalled obs studio, removed it's appdata folder so it wont have the previous configurations remembered, and installed it again. Once it was open, i did an obs auto config wizard, and let the options as they were provided. I just created a scene and a display capture source in order to see if the problem persists. To my dismay, the problem still does persist. Then i thought ok, after doing all this i gotta make sure it really is either a software issue or a driver/hardware issue. ( even tho i pretty much did enough hardware tests). So then what i did was that i installed streamlabs obs to test again, and still same issue. Then i installed Xsplit to test, and still same issue. Since xplit is of a different platform than obs studio that pretty much tells me that it might be an underlying driver issue from my own gpu. Didnt really expect this one, but hey, its a possibility. At this point im left with the choice of either reinstalling windows clean (maybe theres still a program malwarebytes, antivirus avira and ccleaner didnt detect and is messing with the obs being in the foreground, or just a bad version of the gpu driver (even though it has the latest one). Maybe i should downgrade the driver of gpu (if that even is a possibility, just to check the tests). Finally, i did some other tests with G-SYNC completely disabled from everything and enabled afterwards, but the issue was still there. I dont know anymore ladies and gentlemen, give me some tips if u can or idk anything at this point. I dont find it normal to experience this kind of issue with such PC, even if it is just as trivial as keeping it in background in order for the fps to become smooth again, i still want to know what is causing this and fix it.

P.S. here is the log after i did the windows update, disabled game DVR, uninstalled unnecessary programs and reinstalled obs studio:
https://obsproject.com/logs/GQR5gFv6cPMfmMVJ

UPDATE #4: A VIABLE SOLUTION (not the ideal but it seems to be working temporarily...lol)

After going through all these tests in order to finds solutions and 1 sleepless night, i found a solution that fixes this problem all meanwhile having obs studio running in foreground.

Here is what i did :

Knowing that my gaming monitor is 165hz 1920x1080 resolution and also set on GSYNC enabled, and that the secondary monitor from which obs is on the foreground (fullscreen) is 75 hz 1920x1080 resolution, i decided to do a little test.

At first i set 60hz on main monitor and 60hz on secondary monitor to see if the stuttering still persists, and it was even worse (lol). because the main monitor used to be on 165hz and although there is no screen tearing because it is gsync enabled, its still way more bad because being on 60 hz doesnt give u the same smoothness anymore than on being on 144+ hz (while having 150+ fps in the game). So 60hz with 60hz is out of the equation.

Secondly, i disabled preview in the foreground to see if i still have as much stutter as opposed to when the preview was on. To my surprise, it alleviated much of the stutter, but didnt make it perfectly stutterless (as to when obs goes to background).

So then i decided to put the preview back on and mess with the fullscreen projector options. (this is when it removed almost all stutter)

Another test :

1) When i have fullscreen projector (source) and i choose the 2ndary 75 hz monitor, there is no more stutter on the main monitor and it works perfectly fine just like it would be in background because it is full screen now.

2) When i have fullscreen projector (preview) and i choose the 2ndary 75hz monitor, its not as perfect as the source but it still alleviates alot of the stuttering.

hmm....at the end the problem still is not fixed..:( i wonder if i should completely reinstall my windows and wipe everything? and uninstall and reinstall at the drivers of components too? I dont know at this point it might be an underlying driver issue with either gpu or something else. Pretty sure it is not an SLI problem, windows update nope cause i updated it, and i dont think its a hardware problem either.
 
Last edited:

Sprintex67

New Member
20:03:58.571: Windows Version: 10.0 Build 17134 (revision: 523; 64-bit)
20:03:58.572: Running as administrator: false
20:03:58.572: Aero is Enabled (Aero is always on for windows 8 and above)
20:03:58.572: Windows 10 Gaming Features:
20:03:58.572: Game DVR: On


Your Windows is out of date and Game Mode is on (separate from Game DVR).

Download the October 2018 update and turn game mode off. It's possible that you couldn't set NVENC to use the primary card because the Game DVR process was using an NVENC session.
I'll try to fix what u said when I get home but I doubt that it will fix the problem. (Primary card or not doesnt matter because I tried 1 16x pcie lane card and the other 8x pcie lane card. Nothing changed for stutter. Btw thats the old log I had and I fixed it by setting level to auto. Check recent update for the new clean log)
 

Narcogen

Active Member
New log file still shows Windows is out of date, assuming I have the right one from the thread above.

In this build (17134) Game Mode, which reduces OBS performance practically by design, is on by default and cannot be turned off except by registry editing. This mode tells Windows to reserve GPU capacity for a game and to deny it to other programs like OBS.

OBS 22.0.2 (64-bit, windows) log file uploaded at 2019-01-25, 01:56:02
01:52:10.464: CPU Name: Intel(R) Core(TM) i7-7820X CPU @ 3.60GHz
01:52:10.464: CPU Speed: 3600MHz
01:52:10.464: Physical Cores: 8, Logical Cores: 16
01:52:10.464: Physical Memory: 65214MB Total, 56507MB Free
01:52:10.464: Windows Version: 10.0 Build 17134 (revision: 523; 64-bit)

01:52:10.464: Windows 10 Gaming Features:

01:52:10.465: Game DVR: On

Game DVR is also on which does not help.

01:55:05.322: ==== Streaming Start ===============================================
01:55:58.869: [rtmp stream: 'adv_stream'] User stopped the stream


Performance wise one second of data doesn't really tell anybody anything.

01:52:13.612: - source: 'Game Capture' (game_capture)
01:52:13.612: - source: 'Display Capture' (monitor_capture)


Game and monitor captures in the same scene can negatively impact performance.

01:52:13.612: - scene 'Game Scene':
01:52:13.612: - source: 'Rust' (game_capture)
01:52:13.612: - source: 'BRB SCENE' (image_source)
01:52:13.612: - source: 'Video Capture Device' (dshow_input)
01:52:13.612: - source: 'Video panel' (image_source)
01:52:13.612: - source: 'Recent Follower' (text_gdiplus)
01:52:13.612: - source: 'Recent Donator' (text_gdiplus)
01:52:13.612: - filter: 'Scroll' (scroll_filter)
01:52:13.612: - source: 'Top Donator Of The Month' (text_gdiplus)
01:52:13.612: - source: 'Follow Alert' (browser_source)
01:52:13.612: - source: 'Image' (image_source)

01:52:13.612: - source: 'Game Capture' (game_capture)

Multiple game captures in the same scene also negatively impact performance.
 

koala

Active Member
If you plug in 1 GPU card, it runs with x16 speed. If you plug in 2 GPU cards, both run at x8 speed. It's not that the first still runs at x16 and the second one with x8. The first one will be downgraded to x8. This is according to the design of the consumer platform the CPU belongs to. The additional pci-e lanes of the CPU are used for other devices.
You can see the actual pci-e bus speed used with GPU-Z. I might be telling rubbish, but this tool will reveal if I do or not.
 

Sprintex67

New Member
If you plug in 1 GPU card, it runs with x16 speed. If you plug in 2 GPU cards, both run at x8 speed. It's not that the first still runs at x16 and the second one with x8. The first one will be downgraded to x8. This is according to the design of the consumer platform the CPU belongs to. The additional pci-e lanes of the CPU are used for other devices.
You can see the actual pci-e bus speed used with GPU-Z. I might be telling rubbish, but this tool will reveal if I do or not.
Yeah no, what u say is wrong, because when i have 2 gpus this is what i get :
https://gyazo.com/580fe3e8fc2f4b60be0b1247a72e8362
Also, as mentioned in the updated post i just renewed (update #2), that explains it is not a pcie bandwidth problem, hence, having 2 gpus (btw the bridge i removed it so they are just independent right now, not even SLI connected ) has literally no impact on this issue WHATSOEVER. at least not for me, cause i did the test.

P.S Scroll up and re-read the post i updated with update#2, #3 and #4.
 
Last edited:

Sprintex67

New Member
New log file still shows Windows is out of date, assuming I have the right one from the thread above.

In this build (17134) Game Mode, which reduces OBS performance practically by design, is on by default and cannot be turned off except by registry editing. This mode tells Windows to reserve GPU capacity for a game and to deny it to other programs like OBS.

OBS 22.0.2 (64-bit, windows) log file uploaded at 2019-01-25, 01:56:02
01:52:10.464: CPU Name: Intel(R) Core(TM) i7-7820X CPU @ 3.60GHz
01:52:10.464: CPU Speed: 3600MHz
01:52:10.464: Physical Cores: 8, Logical Cores: 16
01:52:10.464: Physical Memory: 65214MB Total, 56507MB Free
01:52:10.464: Windows Version: 10.0 Build 17134 (revision: 523; 64-bit)


01:52:10.464: Windows 10 Gaming Features:
01:52:10.465: Game DVR: On

Game DVR is also on which does not help.

01:55:05.322: ==== Streaming Start ===============================================
01:55:58.869: [rtmp stream: 'adv_stream'] User stopped the stream


Performance wise one second of data doesn't really tell anybody anything.

01:52:13.612: - source: 'Game Capture' (game_capture)
01:52:13.612: - source: 'Display Capture' (monitor_capture)


Game and monitor captures in the same scene can negatively impact performance.

01:52:13.612: - scene 'Game Scene':
01:52:13.612: - source: 'Rust' (game_capture)
01:52:13.612: - source: 'BRB SCENE' (image_source)
01:52:13.612: - source: 'Video Capture Device' (dshow_input)
01:52:13.612: - source: 'Video panel' (image_source)
01:52:13.612: - source: 'Recent Follower' (text_gdiplus)
01:52:13.612: - source: 'Recent Donator' (text_gdiplus)
01:52:13.612: - filter: 'Scroll' (scroll_filter)
01:52:13.612: - source: 'Top Donator Of The Month' (text_gdiplus)
01:52:13.612: - source: 'Follow Alert' (browser_source)
01:52:13.612: - source: 'Image' (image_source)

01:52:13.612: - source: 'Game Capture' (game_capture)

Multiple game captures in the same scene also negatively impact performance.
Ok, so first of all i uninstalled reinstalled obs for a clean new obs with only 1 scene and 1 display capture source.
i did the windows update as mentioned above and disabled game dvr. i still get this issue
When i disable preview when obs is in the foreground, the issue is gone. When i enable preview, the issue of stutter comes back up, thats what it narrowed down to. So how do i fix?
NEW LOG: https://obsproject.com/logs/qC6BMTyCUiZBr_W8
 
Top