Question / Help What Next?

Sajakain

New Member
Hey folks!

Thanks for taking the time to review this request. It is greatly appreciated. I am now at a point to where I'm grasping at straws and have reached the end of my know-how. I'm hoping someone can help me here.

Some time ago (a few months) I was actively streaming a game titled FiveM. Current streamers, today, are still streaming it as it's popularity is steadily growing for the time being. That aside, however, I have started streaming again and these two programs act as if they're fighting each other for dominance. When both are running the game (FiveM) is, for a lack of better description, choked to an unplayable extent. Graphics rendering is extremely slow, input is severely delayed, it's horrible. What doesn't make sense is everything is pretty much the same as it was a few months ago when I was previously streaming the title. Additionally, I haven't experienced this kind of choke while streaming World of Warcraft (the only other title I've tried since getting back into streaming). WoW runs just fine with no graphic or input issues to any degree.

Some scenarios:
  • With OBS + FiveM running, FiveM chokes horribly.
  • With FiveM running by itself, there are zero issues.
  • With OBS + WoW running, there are no issues.
Previously I mentioned that things were "pretty much" the same. What I mean by this is that all the PC hardware has remained the same with an exception to some peripherals changing. My headset, keyboard, and mouse are all different. The hardware inside the tower is the same. Another difference (may be related, may not be related) is I will, in absolutely random times, get quick spikes in latency. They arrive for a very brief moment and are gone just as fast as it comes. I spent an entire morning on the phone with my ISP and we determined it is not on their end to any extent. (We literally spent 2 - 3 hours on the phone going through a lot of troubleshooting processes and it wasn't with a "new guy" rep, either.) Lastly, I am working on a clean installation of my PC. I formatted it a few weeks ago and did a clean install from top to bottom; OS, all software, etc.

What have I tried?
  • I've completely uninstalled / reinstalled FiveM
  • I've adjusted almost all settings in OBS to one extent or another:
    • I've done research on proper OBS settings and lowered them below what tests / recommendations say I can run at.
  • I've tried running with my AV disabled.
  • I've tried running with my webcam disabled.
  • I've shut down all unnecessary software.
  • I've tried running OBS as admin / not running as admin
Please help.

---

PC Hardware:
Mobo
: MSI Z270 M7 LGA 1151
PSU: EVGA SuperNOVA G2 1000W
CPU: Core i5-7600K Kaby Lake Quad-Core 3.8GHz
RAM: 16GB Corsair Vengeance DDR4 2400 (4x4GB)
GPU #1: 8GB EVGA GeForce GTX 1070 SC
GPU #2: 4GB EVGA GeForce GTX 970
Bandwidth: 300 Mbps Up / 120 Mbps Down*

Last OBS Log File: Click Me

GPU Drivers are up to date with the latest ones from NVIDIA.
* I do notice that, with these two software running (FiveM and OBS) a speed test actually shows reduced bandwidth to roughly 240 Mbps U / 90-100 Mbps D.

If there is anything I'm missing / if you have any questions, please don't hesitate to ask. I would love to get back to streaming this title without such an issue. I honestly don't know what's causing this.
 
Last edited:

Sajakain

New Member
I've since spoken to @Fenrir on Discord in between my OP and this post here. Per his suggestion, I've made an adjustment in my hardware:
  • I removed the 4GB GeForce GTX 970.
Both monitors are now on my primary GPU (GTX 1070). Primary monitor is via DP and the secondary is via HDMI. (144Hz / 120Hz respectively).

While there is a noticeable improvement to the game, it still is taking an unexpected hit in performance. It hasn't been so bad that I've fallen through the world, in the game, but the game still suffers from a noticeable performance issue overall.

Also, during this time, it's worth noting that I streamed my guild's raid tonight (3 hours) without a single hit in performance or issues arising. It went smooth the entire time. One would naturally say "Well, it's FiveM causing the issue." and I would agree with that about 80%. The other 20% says "FiveM works perfectly without OBS running."

Any further suggestions or questions about this issue, don't hesitate to ask. As of this point I'm still needing assistance in figuring this out.
 

Narcogen

Active Member
"FiveM works perfectly without OBS running" just means "OBS does not consume zero resources".

18:50:57.714: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 152 (4.0%)
18:50:57.714: Video stopped, number of skipped frames due to encoding lag: 2233/3784 (59.0%)


Not sure what the logfile of your attempt would look like after the change, but the above shows the major problem is encoding lag, which means your problem is CPU. You should probably switch to using the NVENC encoder on your 1070 to alleviate this.
 

Narcogen

Active Member
Not according to your log. Your log flags NVENC as available, but not selected. Did you change it? Or perhaps you set it to that for recording, but not for streaming?

18:48:50.532: [x264 encoder: 'streaming_h264'] preset: veryfast
18:48:50.533: [x264 encoder: 'streaming_h264'] settings:

18:48:50.533: rate_control: CBR
18:48:50.533: bitrate: 3500
18:48:50.533: buffer size: 3500
18:48:50.533: crf: 0
18:48:50.533: fps_num: 30
18:48:50.533: fps_den: 1
18:48:50.533: width: 1280
18:48:50.533: height: 720
18:48:50.533: keyint: 250


18:50:57.714: [rtmp stream: 'adv_stream'] User stopped the stream
18:50:57.714: Output 'adv_stream': stopping
18:50:57.714: Output 'adv_stream': Total frames output: 3519
18:50:57.714: Output 'adv_stream': Total drawn frames: 3663 (3815 attempted)
18:50:57.714: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 152 (4.0%)
18:50:57.714: Video stopped, number of skipped frames due to encoding lag: 2233/3784 (59.0%)
 

Sajakain

New Member
Not according to your log. Your log flags NVENC as available, but not selected. Did you change it? Or perhaps you set it to that for recording, but not for streaming?

OBS_Settings.jpg


Edit:

For clarification, I have not changed it. Since the installation and implementation of the new encoder (NVIDIA NVENC H.264 (new)), it has been the setting I've used (or, at least, had selected).
 
Last edited:

Narcogen

Active Member
The log line "18:48:50.532: [x264 encoder: 'streaming_h264'] preset: veryfast" indicates that x264 (cpu) encoding was active for that session. You'll notice that "veryfast" is not a configuration option associated with NVENC, but is with the CPU x264 encoder.

There's only one mention of NVENC in your logfile:

18:47:36.909: NVENC supported

So either you're selecting NVENC and OBS isn't using it for some reason, or that's the wrong logfile, one or the other.
 

Sajakain

New Member
@Fenrir @Narcogen

I just wanted to give you both an update as you two have been helping me with this situation.

It didn't make sense as to why the setting in OBS wasn't actually being applied. Despite the fact that NVENC was set as the encoder, it was still using the CPU. I completely uninstalled OBS Studio and removed all preferences / data / etc associated with the software. I then did a legacy shut down on the PC, started it back up, and reinstalled OBS Studio fresh. I, obviously, had to go through and reset all my settings and scenes, etc, but it seems that process has fixed my issue. I am, once again, able to stream FiveM just fine without issues. I haven't checked a log yet but I would guess it's now properly using the NVENC as the settings are set.

Thank you, both, again for all your help. It was appreciated.
 

Fenrir

Forum Admin
Hey, sorry for not getting back to you sooner, has been a very busy week for me. Glad it's sorted out! Very strange indeed that certain settings were not taking effect, likely a fluke.
 
Top