Monday, January 14, 2019

Benchmarking a Game Stream



If you're a gamer at some point you're probably going to want to take a stab at streaming.  After all, you've spent a lot of time perfecting your "skills" and the world should know about it.

So you may dabble with plug and play options like Steam's Broadcasting or step up to an application like Xsplit but when you get serious and would rather not pay the exorbitant subscription fees you'll eventually come upon OBS.

That's where the fun starts.  Well, if you have a decent Internet connection that is.  If you've got at least a 10Mbit upstream you can probably get by with OBS's default settings.  If not, well then you'll have to learn the fine art of compromise.

I find myself in just such a predicament with relatively anemic speeds from my Centurylink DSL connection of 40MB down and 2MBits Upstream speeds.

In the context of streaming your game to services like Twitch or YouTube Gaming there are a number of factors to consider.  The first being how much your system is being taxed by the game you play.  

If you're maxing out CPU cycles and your video card is already groaning under the strain then don't even bother trying to stream from the same machine you're playing on.  Both the stream and the gameplay will suffer.

You'll have to either build a separate machine with a capture card set up for the purpose or get an external capture appliance like those offered by ElGato.

These days, however, most people have CPU cores to spare and copious amounts of graphics power.  So let's assume you've got at least 4 cores and an enthusiast grade GPU at your disposal.

So you set up OBS, figure out how to get your game to show up in it and you're off to the races.  That is, once you figure out how to set up your connection to your favorite game streaming site. 

Excited, you start your first streaming session and when you check the results ( on another PC or your phone ) it's a pure horror show.

Frame rates in the low teens, more dropped frames than a picture hanger with greased hands and constant buffering.

Unwatchable, Thumbs down, Internet Stardom denied!

Why?

Because unless you've got Gigabit speeds from your ISP you have to consider a few factors before you premiere your first stream.

Factors like how much CPU your game uses, what encoder you'll use for the stream, the resolution you'll stream at and of course what bitrate you can get away with.

In the videos below you'll see some benchmark testing sessions I streamed to YouTube Gaming with the the racing game, Grid Autosport.  I chose this game because it can be very graphically and CPU intensive and pushes enough data across the Internet connection to provide a good baseline test.

I started with a 720P (1280 x 720) resolution with the game set to Ultra detail because my Internet connection can't adequately support a higher resolution without dropping frames even though the PC can more than handle it.  I played around with different settings in OBS until I found a nice compromise between picture quality and performance 

One thing to note, No matter what the resolution your most critical factor is bit rate.  If your bit rate is set too high for the Internet connection you'll get a lot of dropped frames.  Too low and your stream will be like looking through a dirty window.


Another factor that can have a big influence is the kind of game you play.  If there's a lot of action and movement in your game (such as an FPS)  it will require more bandwidth to stream smoothly to your viewers.  If you're playing a multiplayer game like Battlefield 1 you'll have to balance the upstream bandwidth between your game and your stream.  In my case I have to cut my bandwidth in half with OBS or else I get ridiculously high latency in the game itself.  So high in fact that the game becomes unplayable with rubber-banding and server timeouts.

Unless you've got bandwidth to spare, you're going to have to learn to compromise if you want to have a decent looking stream. It's a process but you'll learn all about the intricacies of resource balancing when all is said and done.

The first video shows a bit rate too high for the Internet connection.

The second a middle ground between speed and visual quality.

The last is the best option with visual quality and performance using the NVENC encoder yielding virtually no frame drops (stuttering video) and a good picture.











No comments: