Reducing stream choppiness with Streamlabs OBS on Twitch

in #gaming5 years ago (edited)

Hi!

Thanks for opening this up, it's possible you opened or found this because you experience some variation of choppiness / stream lag while attempting to broadcast to twitch.tv

I made this guide for those who already have a pretty good grasp on streaming but want to optimize a few options that would help with dropping / skipping frames during stream. The TL;DR version is under "Overview" at the bottom of this post.

I used to use obs-studio 64, but in the last couple years Streamlabs OBS (nicknamed SLOBS) has significantly taken market share with its slew of features. These tips are also mainly for broadcasting to Twitch, while a lot of it can also be applied to Mixer/YouTube Gaming/Facebook Gaming etc. those mainly just have different (mainly higher) bitrate maximums...

PC download for Streamlabs OBS: https://streamlabs.com/ Direct download link: https://streamlabs.com/slobs/download

So, the very first thing to consider, if budget allows or if you have a second gaming PC lying around is to use a dual-pc streaming setup. Many top streamers (although not all) employ a two pc streaming setup, one computer for the stream and one computer for the game. This is the the top tier way to reduce most choppiness because all processing is taking place on the stream PC, if you have no problem investing $.

However, this guide is also mainly for single PC streaming, since most modern CPUs and GPUs can support a solid single streaming setup. I attempted to organize it in main helpful tips but there's a lot of information here. These are the most effective ways I've been able to combat choppiness / stream lag / skipped or dropped frames and maintain an average of 60fps:

Tip #1: Keep an eye on performance metrics in SLOBS

The biggest indicator of why your stream is choppy is actually shown directly at the bottom of the application as seen in this screenshot:

alt text

(kb/s is 0 at the present time since I wasn't live, but if your bitrate is set to the maximum for twitch it should hover around 5900-6000kb/s - the other metrics are explained further in tip 2)

I will often have this just always up on another monitor and if there's choppiness in the live stream preview, you can see a direct correlation with a dip in the metrics on this window.

There is even a notification window the "i" that gives you a history of where for instance frames dropped and automated recommendations of what you can do to remedy those issues. However, the automated recommendations of course sometimes can be a little lacking...

Tip #2: NVENC encoding and maxing out GPU Usage

NVENC coding has greatly increased streaming efficiency you can enable this in your output settings. As you can see it reduced CPU usage to record lows, sometimes never utilizing more than 10% of your CPU on your stream.

This combined with the above tip has been the greatest remedy for choppiness in my personal experience. Often, you can open your task manager and see your GPU usage like here:

alt text

Now, whenever you see a dip in your metrics from your set FPS value it's very likely your GPU is hitting 100% and you'll be able to keep track of it here. For non motion intensive games it's advised you have an FPS value (set in video options) of 30FPS, and for first person shooters etc. 60FPS. The same is true if you're using x264 encoding it may be maxing out your CPU usage.

I personally have liked using just 59.94 (although nothing wrong with 60FPS). When noticing the 100% usage there's a few things to help alleviate this:

  • Firstly, it's good to start with a fresh OBS scene and adding things minimally (you'd be surprised on how sometimes a rogue browser source can drop your frames). Often certain extremely intensive games (like the dropship of Apex Legends or an intense Real Time Stategy situation) you may see benefit in right clicking your preview on SLOBS and activating "performance mode." If you anticipate an intensive GPU portion of your gameplay if you have a previous generation GPU you can enable performance mode during these times to see a boost in GPU usage with SLOBS not having to render a preview.

  • If you're running Chrome you DEFINITELY want to navigate to "chrome://settings/system" and DISABLE hardware acceleration. Even if you're not streaming and trying to watch YouTube or play Overwatch at the same time, you'll notice an instant FPS boost and decrease of frame drops with hardware acceleration deactivated.

  • The above step also greatly helps if you are running multiple monitors with different refresh rates

  • You also want to have as few Chrome tabs or other browser tabs open at once, you can see how intensive they are in your task manager. Like, closing YouTube music videos when not playing etc. and trying to utilize the SLOBS app as much as possible, or a separate chat app to keep track of w/e you want instead of having a browser tab open.

  • Now, Windows 10 has been less than stellar in setups with different monitor resolutions, refresh rates, and with resource allocation so you want to do the following:

I've found the most success with just making sure your graphics card display settings and your monitor refresh rates are as your hardware should be (i.e. 144hz for your 144hz monitor not 60-120). As well as in your Windows settings. You may have some success in setting everything to 60hz if you have for instance a 60hz and a 144hz monitor and might be worth troubleshooting, but generally I would set it all to your standard.

It's long since been an unwritten rule of thumb that your output resolution and FPS should be 720p 60fps with a 2500-3500 bitrate but that has changed as well in the last couple years... With current gen hardware and a good connection you shouldn't have a problem with 1080p / 60fps / 6k bitrate output. You definitely want to output in 1080p, and consider your hardware if you're trying to game with a 2k monitor or greater.

Tip #3: Specifications and more

Ideally you've done some research and have a good setup already but just in case you wanted to read about it again:

One of the biggest bottlenecks is your CPU, hopefully you have an AMD Ryzen 5 or Intel i5 or equivalent CPU from one the last 2-3 recent generations. This is just a a general consensus I've gathered from many different forums and other broadcasters shared specs. Ideally you want an i7 or Ryzen 7, 32GB of RAM, and a 1070 or RX Vega 56 or greater.

You'll also want at least a 10 megabits / second download speed and 5 upload. Although, it's possible to stream with a lower upload rate it's not recommended. There are many calculators you can find to further explain bitrate and upload speed but it's generally recommended your bitrate is no more than half your upload (so if you're going to have a bitrate of 6000 kb/s you want an upload speed of 12 megabits / second) as a good starting off point and even that's a little generous.

Again, although possible to stream on less (especially if you're streaming a less intensive game like Hearthstone), for most modern games this will insure a smoother stream. Most laptops will do fine streaming non motion intensive games as well, but will easily overheat and have a tough time streaming anything demanding without completely breaking the bank (it's also much easier to have a better audio setup, multiple monitors, etc. on desktop).

There are also many guides on recommended OBS settings, generally the most important settings tabs are Output and Video, I'll just briefly outline recommended settings on these:

Encoder: NVENC new
Rate Control: CBR
Bitrate: 6000 on optimal rigs and connection, 2500-3500 on 720p, you can try this in increments like overclocking if having issues
Keyframe interval: 2
Preset: Max Performance you can also increment this much higher or even max quality if you want and are not having issues

(if you choose x264 it is using your CPU to process, and you will want to take care setting it slower than the default "veryfast" as setting slower uses more CPU)

Often setting a CPU Usage Preset to "ultrafast" you will instantly have no stream choppiness or dropped frames in rendering your stream, but it will be very blurry and your video quality and fidelity will suffer.

Profile: high

for NVENC Psycho Visual Tuning Checked
GPU: 0
Max B-frames: 2

For Video: your Base resolution should be same as your main monitor's resolution but your output should be 1080p or lower, Downscale filter on Lancsoz helps a lot with quality and FPS at 60.

If your main monitor has a weird resolution or much higher, sometimes it's advisable to have your output at something that is easily divisible by 2, so it puts less stress on encoding.

Obviously if you have limitations you can switch to bilinear, fps 30, and output < = 720p.

Tip #3: Your selected server

It also seems the smoothest streams have at least about a 35 Mbps download / 35 Mbps upload speed and select their appropriate region's server via > Settings > Stream > Server

A great tool to check yours is located here: https://r1ch.net/projects/twitchtest

Once you run it and it finishes testing servers you can see bandwidth, quality, and ping to all the twitch servers and pick the best one for you. You can check North America if you're in the US to see only those, I generally don't need to test for longer than the 10 seconds but you can switch that if you want.

It's not conspicuous that high population centers often show a lower quality like LA, NYC, SF. But, you may see for instance that the Dallas server near you is always 100 quality and still a very lower ping.

Here's my results:
alt text

I'm often jumping between Atlanta, GA or Ashburn, VA but my ping is only a couple points different and the Ashburn, VA server seems to be more congested. After switching to Atlanta instead of automatic I did notice smoother streams and an increase in getting quality options.

In the past only partners had access to quality options for viewers (i.e. being able to switch from 1080p to 480p). That's one reason it was a rule of thumb to have 720p 60fps, since many viewers couldn't switch, and to try to accommodate viewers on mobile or on slower connections. However, affiliates and non affiliates would be able to randomly get these quality options as allocated by the system on an as bandwidth allows basis. Recently though, almost every affiliated stream has been able to support quality options (unless there's a press release I missed somewhere that states it's available 100% of the time now for streams)...

Overview:

Close browser tabs,
Turn off hardware acceleration in Chrome,
Turn Game Mode OFF,
Turn low-latency mode to ULTRA,
Turn on SLOBS performance mode for a few more frames,
Try to avoid highest CPU presets and NVENC presets
Use CBR,
and try and identify anything else that may be maxing out your CPU/GPU
(don't play at 4K resolution on a potato)

Reponse to a twitch subreddit comment on preference for 720p: I would just like to add the greatest things you can do for improved performance is stream at lower resolutions and higher / faster / less intensive presets. This usually means 720p, as mentioned before. Though, my intention is to get you the best possible quality, most people don't mind 720p or even 900p which looks great. This also holds true usually since most people won't have the stream full screen on their screen or other monitor. But, I consistently see broadcasters stream with greater visual and audio fidelity retain the most viewers, with current gen hardware on 900p-1080p.

I'm sure I missed some things and it's by no means an all-inclusive guide but hopefully this helps a lot of people with low-latency mode etc. or any other silver bullets, if I think of more things I'll make a new post, and I'm sure the standard will change again in another 3-5 years!

Also, streamlabs does have a Discord: https://discordapp.com/invite/stream

There a lot of helpful people always active in the #community-support chat and sometimes devs too that you can share your settings with and get help.

You can also actually find a log file under your computer's directory: "%appdata%\slobs-client\node-obs\logs"

It'll usually be your most recent one, it's like an msinfo32 of your OBS and sometimes you can have another set of eyes look at this to solve any glaring issues!

GLHF!

Sort:  

To listen to the audio version of this article click on the play image.

Brought to you by @tts. If you find it useful please consider upvoting this reply.

Congratulations @jdzy! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published your First Post
You got a First Vote
You received more than 10 upvotes. Your next target is to reach 50 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63665.23
ETH 2621.19
USDT 1.00
SBD 2.77