So you’ve decided that you want to start streaming content to Twitch, YouTube, or similar. When I say streaming, I mean live streaming, not publishing pre-recorded videos to be watched on-demand. Streaming is so popular that you might think it’s as easy as opening your web camera and clicking stream. The reality is that there’s a little more to it, more so around stream quality and performance.
Take my stream for example. I stream a few times per month on Twitch using The Polyglot Developer. The first few streams had a large amount of framerate stuttering, audio and video synchronization issues, and computers sounding like airplane jet engines. I was able to resolve these problems by changing the way I streamed with Open Broadcast Studio (OBS).
In this tutorial, I’m going to walk you through some of the things that can be improved in Open Broadcast Studio to give you better stream performance on the popular content streaming networks.
Before diving into the what should we change and how should we change it, I wanted to point out that Twitch offers inspector tooling to help measure the quality of your stream. While this inspector doesn’t let you see the actual stream, it acts as a test mode with metrics in terms of frames per second, bandwidth, and a bunch of other useful things.
The Twitch Inspector should be used prior to starting every stream.
If you’ve got a lot of scenes in OBS, you’re probably going to have a lot of sources. For example, you might have numerous camera feeds, images, browser components, etc., each doing something different or appearing different between scenes.
The problem with this, for most sources at least, is that these sources remain active regardless if they are in the scene that is currently active. To be clear, these sources are continuously taking valuable resources from your computer.
So what can you do to help with the problem?
Open Broadcast Studio and the Streamlabs alternative allow for sources to be re-used between scenes. So rather than having the camera feed be created numerous times, each acting independently, the same camera feed can be used, reducing resources taken.
When I was learning how to stream, for whatever reason, I was creating new sources rather than reusing them. For example, I thought that because my webcam feed was sized different between scenes, they could not be the same source. This is not correct. By recycling sources, I was able to drop my CPU usage within OBS at idle by about 20%. When I say idle, I mean my CPU was very high without even streaming or recording. This is because my computer had to process all these sources to be previewed, something that improved after I fixed everything.
Being able to include a browser source in your scene or scenes offers a lot of flexibility in terms of what can be accomplished. Take for example Streamlabs, which has a ton of widgets that can be included through browser sources. These widgets for example include chat overlays, alert statuses for new followers, countdown timers, and a whole lot more.
The problem is that these browser sources take a lot of resources because they generally use extensive HTML, complex JavaScript, and need to be encoded as video. So think twice before you decide to add a few browser sources to each of your scenes.
There is, however, a few things that can be done to improve your performance, should you need to include a browser source or two in your project.
When adding a browser source, there are a few settings you can tweak.
Browser sources tend to operate at 30 frames per second by default. This is great for making things render smooth, but if you’re using something like a chat overlay, 30 frames per second is probably more than you need. Instead consider dropping the frames per second to 10 or lower in the source properties. I tend to use a countdown timer and a chat overlay, both of which have their frames per second set to 10 frames per second.
In addition to changing the FPS, it is worth disabling the source when it is not visible. In the source properties, there is an option titled, Shutdown source when not visible. Check that box and when you change scenes, the browser source will be disabled and will not use further resources.
There are, however, some reasons why shutting down a browser source might not be ideal. For example if you have a chat overlay that you use in numerous scenes, shutting down the browser source will likely clear the chat overlay as the transition between scenes happens. It also takes resources to restart the source.
It’s fine to use browser sources, but use them in moderation. These sources are one of the most resource intense features of Open Broadcast Studio.
Me, like a lot streamers, have massive amounts of trust in the configuration settings that Open Broadcast Studio chooses when you launch it for the very first time. I’m a developer, so a lot of the audio and video jargon used in OBS is a bit complicated for me.
There are a few things that can go wrong with letting OBS choose your settings:
Letting Open Broadcast Studio choose my settings was the single largest mistake I made when getting into streaming.
My streams generally consist of around four scenes with a mixture of sources which include video inputs, audio inputs, browser sources, display sources, and NDI sources. Since most of my streaming was done on a Mac, I didn’t have access to hardware encoding, and my CPU was nothing more than average.
The audio and video lag that I experienced for a good while was so bad that the stream was not tolerable to watch. This was more so if I was using an NDI source which I often do when streaming with guests on Twitch.
So what was the problem?
After experimenting with the settings of OBS and using the Twitch Inspector, the low FPS origin was from my streaming bitrate being too high. The bitrate was 6,000, something my network could handle, but not my CPU. The CPU could not encode the video fast enough to keep up with the desired bitrate settings.
The video input source, typically used for web cameras and similar, come in a wide variety of resolutions. For example, the built-in web camera on my iMac is 720p, while my external Logitech BRIO camera can operate at 4K. If you’ve ever done any video editing, you know that editing 4K video requires a lot of juice in terms of computer specifications. OBS has to work extra hard to render and encode large resolution video, just like any other video processing application.
So what can be done?
If you’re using a 4K video input source, do you really need the 4K resolution? I stream to Twitch at 1080p and a lot of people I know stream at 720p. So in this circumstance the 4K resolution would be wasted computing power. However, in reality, even though I stream at 1080p, my video input never uses the full resolution within my scene. My camera feed is usually small and sits at the corner of my screen.
So you have to think about what your video input source offers in terms of resolution, and what you actually need.
There’s more to the story though.
If you configure your video input source to use whatever the default is and tell yourself that you’ll just scale it later within the scene, your computer is going to do just as much work because it is taking the full size of the feed and now processing it to be smaller. Instead, you should change the default resolution for your video input source before finalizing the addition.
When reducing the size in the properties for the video input source, you’re doing it from the input level before it even reaches your computer. This means less processing for your computer and better performance.
When you’re first getting into streaming with Open Broadcast Studio, you might be tempted to create a scene for literally every scenario you can think up. You might even be tempted to maintain several different projects as different scenes. This is something that affected how I streamed and ultimately my performance.
I have two different projects that I stream about. I stream content for The Polyglot Developer and I stream content for the Tracy Developer Meetup. While these streams might have similar content, they are not the same projects and are meant for different audiences. At first I would maintain both projects as different scenes within OBS. However, that meant I had a lot of sources floating around, and as we know, the more sources you have, the more work you’re putting on your computer.
Instead, you can make a few modifications to your setup.
If you’re like me and stream for numerous projects, create a scene collection for each project. With a scene collection, you now have groups of scenes that are only loaded when you choose to load them. Once you separate your projects, then focus on figuring out what scenes you actually need. Most streamers don’t need to host a stream comparable to TV news outlets and similar.
To put things into perspective, I generally use a three scene stream. I have a scene to represent that the stream is starting soon, a scene to represent the currently active stream, and a scene to thank everyone for tuning in. If you operate longer streams, you might even have a scene to tell viewers you’ve gone to the restroom or similar.
Don’t over-complicate your OBS setup with too many scenes, just like you shouldn’t over-complicate the setup with too many sources.
The sad truth about Open Broadcast Studio (OBS) and the Streamlabs counterpart is that they work better on Windows. When using Windows, OBS is able to access features of your graphics processing unit (GPU) for hardware encoding, features that aren’t properly accessible when using macOS. This doesn’t mean that you can’t use and optimize OBS on Mac, it just means that it will be crippled in comparison, regardless of if you’re on an average Mac or a high-end Mac.
I started my streaming career on a MacBook Pro with Intel i7 CPU, but have since started switching to a custom built computer that uses the Windows operating system.
You can learn more about the hardware that I’m transitioning to here.
Does this mean that you need a Windows computer with the same specifications as me? Absolutely not! If you’re using a Mac and want to make that switch to Windows for streaming, pick the parts or buy the computer that makes the most sense to you.
Open Broadcast Studio (OBS) is the most popular tool when it comes to streaming to services like Twitch. Since so many people are doing it, you’d think the process would be easy and on average computer hardware. The reality is that if you want to have a high quality stream with great performance, there are things to account for:
If you’ve been streaming for a while and have your own tips and tricks for getting the most out of your quality and performance, drop those tips in the comments. I’m by no means a professional streamer, but I’m getting better every time I go live. Consider following the channel so you can get ideas and learn something new.
If you like how I have guests on the stream and want to know how to do that yourself, check out my other tutorial titled, Live Stream with Guests Using OBS with Skype and NDI.