Question / Help Low FPS using NVENC

CinciFan82

New Member
First and foremost, system specs:

i9 9900k 4.8Ghz OC
Asus Z390 ROG Strix-E Motherboard
16gb 3200mhz Corsair Vengeance RAM
EVGA 2080ti FTW 3
Samsung 860 256gb SSD
WD 1TB HDD
Seasonic 850W 80+ Platiunum PSU

System build is recent, but my OBS settings I left alone because they worked for the most part without any problems. I would think a system like this is MORE than capable of streaming and playing games. That was the whole reason I put it together. So last night I decided to throw up a stream with BFV and I could not hold 60fps no matter what I tried. I originally started the night with the settings I have always kept while streaming other games like Black Ops 4 using x264 with the CPU Usage Preset to "faster" , CBR Rate Control and about a 6000kb bitrate. Black Ops 4 seems to hold 60fps almost all the time while playing Blackout, but last night BFV was dipping into the 40'a and occasionally the 30's. BFV has high CPU usage upwards of 60-70% so as I saw the CPU getting towards 90% and almost 100 while streaming and thought maybe this was the cause. I decided to try hardware encoding at this point to see if the relief on the CPU was going to be helpful. This didn't fix anything either at first. As I was streaming I was changing settings in the game as well and trying to find something that would work, when the first thing that made the greatest improvement to the game was turning off DX12. This helped with FPS holding at 60fps MOST of the time, but not always. Changing settings here and there would warrant better or worse results, but I could not find a good mix of settings to make it perfect. I was wondering if it might have something to do with the Ultra wide monitor maybe. At this point Im lost and would like to figure this out. Any and all help would be great. I attached the log files from last night. One when I was using the x264 encoding (23-10-40.txt) and the other when I switched to NVENC (23-20-26.txt) Thanks in advance and let me know if there is any other information you may need from me. I know I probably left something out.
 

Attachments

  • 2018-12-28 23-10-40.txt
    28.3 KB · Views: 64
  • 2018-12-28 23-20-26.txt
    237.7 KB · Views: 31

CinciFan82

New Member
Also I forgot to mention that turning off DX12 made the streaming better, but made the gaming experience worse. The game actually performed worse than it did with DX12 on. I am not sure if there is a connection between this all with DX12, but I would like to have the best gaming performance as well as best streaming performance as possible.
 

DEDRICK

Member
Disable Game Mode, Game DVR and Game bar

1546661030295.png
 

DEDRICK

Member
You also have too many capture sources in the same scene. You don't want to have Display and Game Capture in the same scene, it causes your games to V-sync, this could be one source of your issues.

Set up dedicated scenes for Display Capture, keep them separate from Game Capture.

Your logs are a disaster to read but the most important section is fairly clear.

Code:
01:11:37.872: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 6831 (1.7%)
01:11:37.872: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 169 (0.0%)
01:11:37.873: [ftl stream: 'adv_stream'] ingest disconnect
01:11:37.873: [3] Exited Ping Thread
01:11:37.873:
01:11:37.873: Video stopped, number of skipped frames due to encoding lag: 147/399711 (0.0%)

But you are facing FPS issues in the games themselves, your settings in OBS shouldn't be impacting that much, especially with NVENC

You have a ton of variables.

Personally I would create a new Profile, keep it simple.

x264 6000 2 Fast High
2560x1440/1280x720 60 FPS

Next, create a new Scene Collection, add a Game Capture source, that's it.

Test

1546664196844.png

1546664246715.png
 
Last edited:

CinciFan82

New Member
Thanks for the detailed information. I don't typically notice a loss in fps in game, but if it says there is, then maybe there is. I dk. I'll give it a shot and go from there. I thought that as long as the display capture and/or game captures weren't activated, it didn't matter that they were in the same scene because they weren't being used. The scene is dead/no resources used until its activated. At least that was what I was assuming. I'm still somewhat of a rookie at this stuff. If thats not the case, I'm kinda lost on how it all works. Again, I'll try all that and see how.it all plays out. Thanks again. I really appreciate the help.
 

DEDRICK

Member
If the Display Captures are both deactivated that is fine.

When I re-read your post it seemed like you were saying your Game FPS was dropping, because your second log don't indicate major OBS FPS drops, but I looked at your first one again

23:18:32.989: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 2077 (8.1%)

If it is OBS dropping frames it is probably Game Mode, it has been reeking havoc lately because Microsoft has been pushing the 1809 update on everyone in waves.
 
Last edited:

CinciFan82

New Member
Ok, so I reset everything, turned off Game Mode, and ran the auto setup tool. It said to run at like 8750 for the bitrate and to run base resolution at 2560x1440 and to run output resolution at 1920x1080 at 60 fps using x264. I applied these settings to start. I had it set to 1600x900 though instead of 1080 thinking it would help slightly, but moved it to 1280x720 later to see if there was a difference. There wasn't any difference at the time. I had one scene and one source. The one source was Game Capture. I wasn't even streaming at the time and OBS was showing fps in the 40's and 50's, but the game (BFV) was running around high 90's up to 120 without any issues. I tried going back to the NVENC to see if that would make a difference and it was worse than x264 which I found odd. I then went back to x264 using the settings you recommended of CBR, 6000, 2, faster, main, and tried again. I was able to hold 60 about 99% of the time even when bumping up to 1080p with some minor game settings changes, but when I switched games, it was a whole new battle. I tried to play Forza Horizon 4 and it was terrible, but then that game kept crashing and would not work, so I moved to Shadow of the Tomb Raider. This game was weird in the sense that when using Game Capture, OBS would hit low 50's and high 40's in the FPS. Then when I switched it to Display Capture, it was running 60fps solid the entire time. The only issue I had other than having to create a new scene with a Display Capture setting was in the game play. FPS was hitting the 80's and 90's as it should, but there was this weird stutter (I don't know how to describe it other than that) while the stream was active, but as soon as the stream was stopped, it was smooth as butter, no issues. I feel like Im fighting a losing battle here. Lol. Im lost on how a PC like this is unable to do what Im asking it to do. I figured 8 cores, 16 threads, and a this GPU would be more than enough to get the job done.

I have found that DX12 screws every thing up when it comes to streaming. I don't know why, but any time I have that on, the FPS drops bad in OBS, but improves in game. Every game I stream, I have to turn it off.
 

CinciFan82

New Member
I was trying different things again, so Im not sure how much the log will help because I am sure it is ridiculous looking, but I have attached it here for you to look at. I notice it says Game DVR is on and Game Bar is on. I didn't think those would matter, but I have turned them off now. I completely missed where you mentioned to turn them all off. I saw the image of Game Mode and skipped the text for some reason. I will try some more streaming tomorrow when I get a chance.
 

Attachments

  • 2019-01-05 18-42-10.txt
    442.1 KB · Views: 35

CinciFan82

New Member
Update. I had to restart the computer and I tried streaming Shadow of the Tomb Raider again and everything was fine for the most part. I was able to stream it using the game capture and It worked a solid 60 fps the entire stream, but there was a huge spike in network lag for some reason which I've never experienced before. It went from 0 to 5200 dropped frames in a matter of 10 seconds. I increased the bitrate to 8000 and it went away, but I was thinking that might be too high of a bitrate because a friend in the stream was saying it was freezing here and there. This is on Mixer of course, so I kind of take it with a grain of salt when he says it was freezing. Even though this was the case, I was sti unsure why I dropped so many frames so fast. I realized later that I should have dropped my bitrate instead of increasing it, but at the time it happened, I was streaming and talking and not thinking about it. Lol. It worked, but I know.i should have lowered it. My upload is 25mpbs though, so again, I'm not sure why it dropped like that.
 
Last edited:

DEDRICK

Member
Routing isn't perfect, dropped frames happen. As long as it's not Lagged or Skipped and you're holding 60 FPS in OBS
 

CinciFan82

New Member
Update. I think everything so far is working as it should. I played three games the other day while running a test stream and all three stayed at 60fps the entire time. I did have some minimal dips from time to time in the menus of a couple games, but it wasn't anything less than 57 fps. I don't know why, but menus seem to drop fps from time to time. Anyways, just wanted to say thanks for the help DEDRICK. I appreciate it greatly. Hopefully I won't have to come back in here for anything else. :)
 

DEDRICK

Member
Random Menu lagged frames is a common issue, it's the only time I lag frames as well, that or alt tabbing. Momentary dips, less than a few frames then goes back to normal.
 

CinciFan82

New Member
Yeah the one thing that sucks and I dont know if its just me, but when I alt tab out of a game, it goes to like 15fps in the game. As soon as I alt tab back, it's fine. I was using borderless there for a while to correct this, but not all games perform well with borderless.
 

DEDRICK

Member
Some games are programmed to reduce FPS when tabbed out of the game, they sometimes have an option to disable it.
 
Top