Question / Help Streaming on Youtube: ping spikes and other problems

maNii

New Member
Hello. So I tried streaming on Youtube few months ago, I used 1080p 30fps and 3500 bitrate, my ping was completely normal and in Youtube live dashboard it said stream health is excellent. Stream was running with no problems and I was really happy with that. Now, after a month or so I want to start streaming and I keep getting in to some problems. Firstly, I get ping spikes on the same settings, so I tried lowering bitrate to 2500 and it's still not good, I get ping spikes quite often... Then my screen is lagging to viewers sometimes. In Youtube live dashboard stream health keeps jumping from excellent to "Bad. Video output low ". CPU usage is fine, it's around 5% or so. Any ideas what could be the problem? Doesn't make any sense to me since it was completely fine when I tested how it works.

My internet speed: http://www.speedtest.net/result/7884781138
My OBS Settings: https://gyazo.com/a2f74a00e96b0b910e72da3308bc1fc1 and https://gyazo.com/2691f4ba591af8a3ffef4b7e5dd0da5b
GPU: Nvidia GTX 1060 3GB
CPU: Intel i5-4460
RAM: 8gb
 

Narcogen

Active Member
Speedtest isn't really relevant.

If you're getting messages in the status bar about "dropped frames" this is a network issue. If you post a log from a session where the problem occurs we could see for sure, but from the description above, this is an issue to raise with your ISP.
 

maNii

New Member
I tried many different speed testing sites and they all are about the same. Attaching the log file from my last stream, upped bitrate to 3500 how it used to be and got this problem.
 

Attachments

  • 2018-12-16 19-22-43.txt
    14 KB · Views: 17

maNii

New Member
Something is definately not right, I even tried streaming on 1280x720 and my fps still spikes like crazy. This log is with 1080p 30 fps and 2000 bitrate (I know it's too low for 1080, just testing). It was still spiking above 100. My internet is surely good enough to stream on at least 1080 30fps. 8mb upload speed should do it, since it says it's best to use bitrate 80% of your upload speed.
 

Attachments

  • 2018-12-16 22-24-17.txt
    10.3 KB · Views: 3

Narcogen

Active Member
According to the log you've got rendering lag, encoding lag and network lag:

19:27:17.247: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 986 (51.7%)
19:27:17.247: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 174 (9.8%)

9:33:29.694: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 1477 (13.8%)
19:33:29.702: [rtmp stream: 'adv_stream'] Freeing 4 remaining packets
19:33:29.710: ==== Streaming Stop ================================================


51% rendering lag means massive GPU overload, indicating you should cap your in-game framerate. You are starving OBS of the resources it needs to render frames prior to encoding.

Near 10% dropped frames is also significant.

The only relevant bandwidth benchmarks are those that test streaming sites directly, like the built-in Auto Configuration Wizard or TwitchTest or TwitchInspector do. If your ISP is not the problem then there may be a problem with your local network; however the test programs would also find this.

You seem to be also overloading your encoder, at least in the test of 1080p60:

19:27:17.260: Video stopped, number of skipped frames due to encoding lag: 1017/1884 (54.0%)

19:33:29.740: Video stopped, number of skipped frames due to encoding lag: 1440/10590 (13.6%)

It may help to turn Windows gaming features off:

19:22:44.600: Windows 10 Gaming Features:
19:22:44.600: Game DVR: On

https://www.windowscentral.com/how-disable-and-remove-game-bar-windows-10-creators-update
 

maNii

New Member
Thank you for your help, I tried Auto Configuration Wizard and turning off Game DVR. It didn't help. It worked at first, but after 10 mins my ping was still alright, my in game FPS didn't drop but on youtube live dashboard it said stream health is bad and viewers will experience buffering. Log file from this test stream attached.
 

Attachments

  • 2018-12-17 19-40-48.txt
    8.9 KB · Views: 1

Narcogen

Active Member
Can you expand a bit on what you mean by ping spikes? Are you sending pings to a YouTube ingest server while streaming and seeing increases?
 

Narcogen

Active Member
Also, you're still overloading your GPU, which means you still need to change your in-game settings so that OBS can work:

19:54:08.828: Output 'simple_stream': Number of lagged frames due to rendering lag/stalls: 904 (4.7%)
19:54:08.834: ==== Streaming Stop ================================================
19:54:08.839: Video stopped, number of skipped frames due to encoding lag: 222/19376 (1.1%)
 

maNii

New Member
By ping spikes, I mean it goes from like normal 30-40 to 100-150+. I see my ping in game, I had stats on screen. Even with normal ping it said bad stream health on youtube live dashboard, probably it's GPU overload problem, like you said. What should I change in game? I'm not playing on high graphics or anything, if I record, for example, with Nvidia Shadowplay it doesn't drop a single frame. I mean recording and streaming is different, but still, I don't think I should get my GPU overloaded when I used recommended settings and even tho it captures my screen 1920x1080, it set my output to 1280x720. I'm out of ideas to be honest...
 

Narcogen

Active Member
Cap framerate.

Shadowplay doesn't cause extra load because it doesn't render frames-- it just captures them as-is from right on the GPU. OBS has to pull them from the card because it needs to be able to composite other content onto it-- webcams, overlays, whatever-- even if you're not actually using those.

So if you've set your canvas to 1080p and then are scaling, OBS has to pull down each frame from the card as 1080p, render it, and then rescale.

If you want to record at maximum quality and framerate without reducing in-game performance, absolutely use ShadowPlay.
 

maNii

New Member
So I got new CPU, new motherboard and 16GB of RAM (used to be 8GB). I'm starting to think there is something wrong with my OBS and not my pc. I tested 2 streams on 1920x1080 30fps and one said my resolution is too high from the beginning, another one said stream health is excellent but changed to bad later. FPS is really good, can't complain about any drops or anything. Ping still goes over 100 at some points, which with my 7mb upload speed should be completely fine since I'm using 3500 bitrate. Then I tested recommended settings, 1280x1080 output resolution, and at the beginning it said that my stream health is okay, but not excellent, even got this message which is completely non sense: "Please check the video resolution. The current resolution is (1280x720), which is not optimal". Attaching all 3 log files, any ideas?
 

Attachments

  • 2018-12-22 16-24-45 1920x1080 30 fps test 1.txt
    10.2 KB · Views: 2
  • 2018-12-22 16-24-45 1920x1080 30 fps test 2.txt
    11.9 KB · Views: 1
  • 2018-12-22 16-24-45 recommended settings, 1280x720 output.txt
    13.9 KB · Views: 3

Narcogen

Active Member
Nobody suggested to you to buy a CPU. Nobody suggested doing that would help. I said "cap framerate".

CPU has *nothing* to do with network ping. Nothing whatsoever.

Your log still shows GPU overload, like before, just not as much, but 6% would still be noticeable, especially if it was distributed evenly across the video instead of being a temporary problem that happens all at once.

16:29:15.748: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 393 (6.0%)

The suggestion to resolving that is to allow for OBS to have access to the GPU for rendering frames by capping the in-game framerate, reducing visual fidelity, etc.
 

maNii

New Member
CPU wasn't purchased because of this problem. Just stated a fact. Thank you for your help. To allow for OBS to have access to the GPU you mean stream on NVENC H.264 Encoder? I already did that, I must stream today so I picked 1280x720 on 3000 bitrate, seems to be working fine, will give more info after the stream.
 

Narcogen

Active Member
That's not what I mean, no. NVENC is the encoder, not the renderer. Rendering happens before encoding, and it is only done on the GPU, never on the CPU. (NVENC also uses a custom, dedicated hardware encoder on your card, so that is separate from the other things your GPU is doing and doesn't affect GPU load. It has other limitations that need to be considered, such as lower quality than x264 especially at low bitrates, but that's another issue.

What I mean you need to limit the use of the application you are capturing so that it does not use up 100% of the GPU. You should aim for 90-95% utilization. This traditionally means setting your game to run at a framerate lower than the maximum you could run it at while playing and not streaming. Lowering resolution is another, more dramatic, way of achieving the same thing. For most ordinary rigs, 1080p60 in a high motion game is a challenge to achieve. Most often people trade off, going either for 1080p30 or 720p60.

If you don't do this, you will see the error in the log "rendering lag". This is OBS telling you that your game is using so much of your GPU that there is nothing left for it to use to render frames. If this happens, OBS will just use duplicate frames and this will appear in your video as stutter. If you lowered to 720p this should go away on your system (and that resolution will look better at 3000 bitrate anyway.

Glad you didn't buy the CPU for this reason :)
 

maNii

New Member
Thanks for all your help. I think I found the right settings for me, I locked in game fps to 144 and streamed for 1 hour, and everything went smooth: no ping spikes, no lag, stream health was excellent. Log file attached.
 

Attachments

  • 2018-12-23 23-50-37.txt
    9 KB · Views: 12

Narcogen

Active Member
00:40:30.913: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 498 (0.6%)

Looks good! If it were me I might be looking to get rid of even those few lagged frames, but below 1% I don't know how noticeable that would really be.
 
Top