Dead by Daylight

Dead by Daylight

View Stats:
This topic has been locked
ch1pset Jul 26, 2016 @ 1:40am
Stream Optimizations and Performance
Everyone has their preferences and standards of what's acceptable or not, but I personally have a strong drive to get everything as optimized as possible. So I thought I'd discuss some of this in these forums considering how popular this game is on Twitch. For this thread, I will be discussing OBS(open broadcasting software) Classic. Everything said here should also hold true in OBS Studio.

Encoding

First thing's first, there are a few options for how you will convert what is displayed into a stream of data you can send to the Twitch servers.

x264 - The most used by far, and biggest performance hog. x264 encoding uses the CPU to compress the screen data into a format that can be streamed easily across the interwebs. It has, by far, the highest compression ratio of all the different encoders available on OBS. If you are going for low bitrate, this encoder will be necessary.

Quick Sync - Intel's proprietary solution to video encoding. This encoder uses the Integrated GPU on applicable CPUs for the encoding process. It is a popular choice for those looking for better performance and can even enable lower range setups to stream at 1080p @60fps. For most games, this option is almost necessary to stream at that resolution.

Shadowplay - NVIDIA's proprietary solution to video encoding. In OBS it will be the "NVENC" option. This is by far the best performing encoder as it uses your GPU for the encoding process. Anyone even hoping to stream at 4k is more than likely using this option. Unfortunately, due to it's high performance, it has the lowest compression ratio of all the codecs. Most of the time, this will lead to a need for higher bitrate to compensate for the quality loss.

Bitrate

So this is going to be the size of the data packets of the encoded video. The lower the bitrate, in general, the lower the quality. This is where optimizations come in to play. For most of us, we are non-partnered Twitch streamers. As a result, we are at the mercy of how much the Twitch servers are being used. We are lower priority than partnered streamers, for good reason. There's only a limited amount of bandwidth available to send and recieve all this compressed data. That is why any non-partnered streamers should aim for lower than 3500kbps on the bitrate.

Quality

Quality settings for each encoder are under the "Advanced" tab in the Settings menu. They differ depending on the encoder you are using.

x264 goes from UltraFast to Slower with 6 options in between. The faster the encoding process, the lower the compression ratio and the higher the bitrate needs to be to make up for quality loss.

Quick Sync goes 1-7, 1 being the best quality, 7 being the worst. Again, the higher this number, the higher the bitrate needs to be for loss of quality.

NVENC has a very convoluted set of options that I don't fully understand myself, but there are 3 that you should really only care about, High Quality, High Performance, and Lossless. Lossless will record with the highest quality possible without losing any data in compression and does not care about your set bitrate. Only use Lossless for local recording.

Optimizations

Here's the one that I'm still working on. It's one thing to set your settings to the "recommended" values. It's another to change them so they work best for your machine. Everyone needs to be interested in Quality vs Bitrate. Essentially, the higher the quality, the lower your bitrate needs to be. As stated before, x264 will give you the highest Quality to Bitrate ratio, but it is also the worst performer. In many cases, increasing your quality options will cause too much stress on your system and cause stuttering, frame drops, freezes or even crashes if it's severe enough.

It's important to understand that the lower the bitrate, the faster the encoding process is. So it is possible to get the same quality video you would get with recommended settings at 3000kbps at 1000kbps instead. The difference, again is going to be the quality of the encoding process.

For the best performance, you are going to want the quality set as low as you can stand, and the bitrate as high as possible. This is bad for those of us who don't have quality options on our streams. You will want to have the lowest bitrate possible so that more people can enjoy the stream without any problems.



Example:

Jonny wants to stream DbD on Twitch so his 2 friends can see the gameplay. Unfortunately, Jonny has a midranged PC, so he plays DbD on Medium settings normally and only has an upload of 1.5mbps(1500kbps). So his limit on bitrate is 1500kbps. That is a hard limit, and he cannot exceed this no matter what. The encoding process varies on bitrate. Simply setting the "max bitrate" to 1500 will not guarantee he will stream at or below 1500kbps at all times, in fact it may even jump as high as 3000kbps at certain times of the stream. So he needs to set his max bitrate to at or below 1000kbps and his Buffer Size at or below 500kbps. While this won't guarantee that he will stay below 1500kbps, it will keep it pretty damn close. But wait, what about the data the game needs to send? Good point, let's lower that down to 800kbps bitrate and 200kbps buffer. As you might imagine, in any encoder, this will look terrible. There is a way to make it better though. In this circumstance, we are going to stream at 540p @30fps so it doesn't take as much pwer to encode. Next, let's increase the x264 quality from Very Fast(recommended) to Faster. Now test it out and montior OBS to make sure everything works smoothly. Now we increase to Fast, and so on and so forth until we start having problems with performance. Let's say he ended at Medium with no problems, but Slow just wasn't working for him. Now his stream won't look so terrible at such a low bitrate and he can play with no problems.

Recommended Settings
Encoder - x264
Resolution - 1280x720
Bitrate - 1000 kbps
Buffer - 1000 kbps
Quality - Very Fast
Audio - 96/128 kbps

Optimized Settings
Encoder - x264
Resolution - 960x540
Bitrate - 800 kbps
Buffer - 200 kbps
Quality - Medium
Audio 96/128 kbps
Last edited by ch1pset; Jul 26, 2016 @ 1:40am
< >
Showing 1-2 of 2 comments
Kemsyt Apr 24, 2018 @ 7:36am 
Nice guide bro, i hope it can help me... im trying to stream this game but i have just 2 Mbps upstream and dont works fine on my tests.
ch1pset Apr 24, 2018 @ 6:25pm 
@Kemyst I totally forgot I ever wrote this guide, it's been so long, but most of the information is still valid. Just test different settings and find what works best with your machine. I tried to explain each setting, so that you would know what should be adjusted, but there are some things left out.

One setting not mentioned is the encoding profile. There are 2 options, main and high. Modern PCs can handle the high profile, so this is a non-issue, and you should always opt for the high profile as it improves on the compression algorithm.

You may also choose a custom value for framerate, perhaps a few frames less than 30, if you are still having performance issues. Typically, 30fps is going to have the best performance-to-quality ratio.

Everything else, you'll have to figure out yourself. As I said in the guide, performance will be dependent on your machine. Good luck.
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Jul 26, 2016 @ 1:40am
Posts: 2