Hello, Legion!
I'm Gerald Undone and today I'm going to talk about streaming.
Now, this is going to be a pretty technical video,
so to the rest of the my subscribers that maybe
are looking for a little bit more of an upbeat or fun video,
this is not going to be it, this is going to be pretty technical.
Uh, so if you aren't interested in that, feel free to skip
this one and check back tomorrow.
Uh, but for everybody else who is interested in streaming
using OBS and wants to see some comparison stuff
and understand some differences between, you know, NVENC Codecs
and H.264 Codecs and whether to use your CPU
or your GPU, that's what this video is going to be about.
It's going to be all about streaming, so let's get Undone!
[offbeat music]
♪ Gerald Undone ♪
♪ He’s crazy ♪
So yesterday, I decided to try and stream for the first time
using this channel and, uh, I encountered some difficulties.
I was using OBS because I use it for local recordings
and so I figured, it'd be pretty easy transitioning it
to streaming, but there's a whole lot of hurdles that
I encountered regarding the streaming that I had to,
sort of, overcome, and when I looked online,
although there’s quite a bit of resources for OBS
and for streaming, a lot of them seemed out of date.
A lot of the tutorials that I looked at featured software
that has things and locations that doesn't even match mine,
because I'm using OBS Studio and a lot of people
still have the tutorials for OBS Classic.
So this will hopefully serve as an information session
for people interested in streaming or people who already
are streaming and want to, uh, improve a little bit
and some things that I found.
I’ve got quite a few comparisons and benchmarks to share
with you. Okay, so let’s start with just a little bit of
an introduction on OBS because that’s what I’ve been using
to stream and that’s what this tutorial is going to be about.
So this is OBS Studio.
It's a little bit different than the OBS Classic
that a lot of the guides and tutorials that are
available now are featuring.
So, over here you've got your settings on the right.
You've got a mixer right here and you've got your sources,
so, if you’ve never used OBS before,
I’ll give you a quick little run down.
You add sources here by hitting the plus, and that's where you
add in, say, like, I have GTA V in case you want to capture
a video game, if you want to do a webcam, if you want to
capture your screen, that kind of thing.
Over here, you add audio sources and you can bring up
the mixer and you can change the levels that you want
the different volumes to be at.
Or, if one of them is out of sync, you can delay it that way
as well. Then, over here, you’ve got Start Streaming,
Start Recording or Stop Recording, because I’m recording
this video right now through OBS and then you've got
your settings Now, if we take a look at the settings, a lot of
these are just preference, but we’ll skip most of them.
Here's where you set your Streaming services.
If you're streaming YouTube or streaming Twitch, you're going
to put it in here and put in the key. Most of the guides
online for that stuff is all pretty consistent. Uh, audio,
I mean you can put your inputs and outputs in the sample rate.
I wouldn’t worry too much about that right now,
and hotkeys and then Advanced.
So really what we needed to worry about is output.
Now, I'm going to talk about streaming.
I have my recording outputs but we're not going to talk
about local recording right now because I don't really find
many issues with local recording, 'cause with local
recording you can just jack the bitrate way up and you'll
have a good recording because bitrate isn’t as important
because you’re not streaming so it doesn’t really matter.
What I'm going to talk about is streaming right now.
So with streaming, this is greyed out because
I'm recording currently so I'm not able to change it,
but here you would have your encoder,
and I have three different encoders to choose from.
One is the one you see here right now, which is NVENC H.264.
This is using my NVIDIA Graphics Card.
So, there's a lot of talk online about how this is
the most efficient but the worst quality.
The other two options are QuickSync, which is Intel's
chip using the Intel Graphics Card that allows you to encode
video so you're offloading, so you're not using
the video card that you're using for gaming and you're not
using the cores of the CPU that are used
for processing the encoding.
You're using an extra chunk of the CPU in the iGPU, and then
the other option is X264, which is purely software CPU-based.
Now, this one will have a big hit on your system and,
uh, it's because it uses the processor to encode
and compress on the fly.
Now, if you are playing something, if you're using
something that's CPU-intensive, then using X264
might be tricky for you.
Now, it's important when talking about these three
different Codecs to keep in mind this is primarily
for people who are streaming from the PC that they're also
doing the content on, whether that's playing a game
or, you know, video, whatever it is.
If you're capturing from another source, if you're capturing
from, say, you’ve got a console, Playstation 4,
Xbox, whatever, hooked up, and you’re capturing from that,
well, the console is handling all the load
of playing the game, so all the computer needs to do
in that case is rendering code compress.
So, in that case, you could probably use the CPU one
because there are some advantages to that, and you can
use, you know, 90% of your CPU on encoding
because you're not using it to play the game.
I try to do it all at once.
I try to stream the game or whatever I'm doing from
the computer that I'm doing it on, so I need to save as much
CPU as possible.
So, I was trying to look in to see what the best quality
I could get using either NVIDIA or QuickSync in order to stream,
because when I was using X264, it was a bit hard on my system,
and I'll show you a couple of benchmarks in a second.
But, secondly, I’m just going to go into these real quick,
so the Rate Control, yeah, it’s CBR, VBR, CQP
and Lossless, so CBR and VBR you’ll see them everywhere,
CBR is Constant Bit Rate and VBR is Variable Bit Rate.
So, Constant Bit Rate means just what it sounds like.
You put a bitrate in here, say I've got 8000 written,
that means it's going to try to maintain 8000,
uh, for your bitrate all the time, and this is measured
in kilobits per second, the bitrate. So, we’ve got
8000 kilobits per second or eight megabits per second.
It'll try to keep that consistent.
We put it to Variable Bit Rate, then, the bitrate works
more like a target, you know, it's going to try to
float around the 8000 kilobits per second, but in scenes
that's really intense, it might have to up it and in ones where
there’s not, it’s a static image, it can lower the bitrate.
So Variable Bit Rate generally creates, sort of, better
quality and file size, but for streaming, a lot of people
recommend Constant Bit Rate, because, at least, then
you're going to have a steady flow of data through the stream,
which is better for buffering
and for receiving something consistent on the other end.
Keyframe Interval, you're going to want to set it to 2,
then the Preset here for-- this is the Preset for NVENC.
I find Default to be the best and Profile, I read a bunch
about this. A lot of people say main, uh, and I think that’s
because of compatibility in the past, but I've done a few
comparisons on a bunch of different devices and I've also
read a bunch about it, and most tech experts agree
that these days, anything that
can handle Main can handle High and vice versa.
There's not a lot of devices that will only be able to take
Main and that High will, will be incompatible.
So that's basic settings.
For each setting type, there’s going to be,
uh, different settings for here.
Different presets and that kind of thing, uh, with X264,
so I’m going to jump over to my recording tab,
just to show you, ’cause I have the other options here.
If you set the Encoder to X264,
you're going to have different things
like CPU Usage Preset, which has Ultrafast,
Superfast, Veryfast, all the way down.
Now, the higher that you set this, so if you set it
to Ultrafast, it's going to use less of your CPU,
it says it right here, Higher = Less CPU.
What this means is that, uh, the load that we were
talking about that it's going to put on it, will be easier
if you set it on Ultrafast, and if you set it down to
Veryslow, the load on your CPU is going to be immense.
Now, the reason why you would adjust this, though, is that
each one of these steps, as you get down towards
the slower settings, will conduct a cleaner, better
compression, but it requires more CPU power.
Think of it this way, you'll get more bang for your bitrate
the lower you set this.
So, if you set it to very slow, and you set the bitrate
to, say, 3500, which is the Twitch standard, then your 3500
will be much better on Veryslow than your 3500 on Ultrafast.
So those are the settings you need to worry about is the CPU
Usage Preset if you're going to be using x264,
and if you're using NVENC, the preset over here,
which is like, Default high quality Blu-ray.
I personally found Default to be the best.
Let’s talk a little bit about what actually happens
and show you some comparisons.
Now, for this example, I did 4500 for everything,
for all three Codecs.
I know with Twitch it's 3500, I stream to YouTube
so 4500 is fine, the lower the bitrate,
the better X264 is over NVENC.
I found 4500 to be, sort of, the crossover point
where, if you run average settings on X264,
they look about the same as NVENC on 4500.
So, let's look at a couple of examples here.
So this is all playing Grand Theft Auto V.
The reason why I chose Grand Theft Auto V is because it has
a lot of motion and it's also very CPU-intensive.
So, that's important because we're talking about
how to be able to play and load things with your CPU
being capped out. So, in the top corners here, I have MSI
Afterburner, RivaTuner telling me the statistics,
so basically, it shows me my frame rate while I'm playing
because that's important to see how much of a frame rate drop
you're going to get.
The CPU usage in percentage and then I also have my GPU usage
and I have my core, and clocks, and fan speed.
So this will let me know how much of the CPU is being used,
how much of the GPU is being used
and what kind of frame rate I'm getting.
So, on the left hand side here, we've got X264,
which is software, and on the right hand side,
we've got NVENC, which uses the graphics card.
So, I'll tell you my observations. To me...
The X264 looks a little bit more contrasty, a little bit
more, uh, saturated in the colour.
The NVENC looks a tiny bit washed out.
I would say it's pretty minimal, but I do notice it.
Uh, as far as the pixelatedness, which comes
with the bitrate, as I was trying to point out, I think
you'll find that they're very similar.
In some respects, I actually think that
the NVENC looks better despite, you know, forums
and everything saying that X264 always looks better.
So this is why we're saying at about 4500 bitrate, you'll find
that NVENC is about equal or maybe even slightly pulls ahead.
Now, the preset for X264 during this was Veryfast.
That's when I was showing you the settings in here,
just as a quick little reminder, between the CPU of Ultrafast,
Veryfast, Fast, Medium, Slow, so I put on Veryfast
which used a decent amount of the CPU
but gave me a little better quality than Ultrafast.
I find that at 4500 bitrate, X264 doesn't look better
than NVENC until after Fast or slower than that.
Once you start setting it to Medium, Slow, Slower,
even at Veryfast, I'll show you the benchmarks again.
So, if we look here, the CPU usage over here for NVENC
is only 41%, where the CPU usage over here, for X264, is 77%.
That's 30% more of the CPU in order to, uh, render it with
the CPU, and if we look at some frame rates while travelling
over here, it's silky smooth at 60fps all the time,
and the playability, from personal experience,
I found it to feel so smooth, and so the GPU gets up
to 70% usage and the CPU is 55%.
Over here, the frame rates are dropping, 50-51-54-53.
So, I'm losing 7-10 frames because of the CPU usage
and the CPU is at 82% and the GPU at 75.
That's interesting.
If we are using the GPU to encode over here,
why would the GPU be lower in its usage over here?
An interesting little thing that happened for me,
I don't know if it'll happen for everybody, but it's worth
pointing out is that because I'm using the GPU,
it actually bumped up the overclock,
so I'm using the GTX 970,
and I have it overclocked up to, like, 1500 MHz
but the overclock doesn’t kick in unless the power is required.
So, on the left hand side, because this is a pretty
CPU intensive game, it was comfortable using 75% of the CPU
at only 1100 MHz, core clock, but over here,
once I started using the NVIDIA Encoder, it required
more from the graphics card, so it upped the, uh,
core clock to 1518, which then meant that the game only
needed 68% of that 1518, because it's a higher core clock.
So the GPU usage was actually lower
because the core clock was higher.
So, I found that to be quite interesting
and because the core clock was also higher,
it made for a much more fluid experience.
So, because the visuals are so close in my opinion
at 4500 bitrate, I don't really see the advantage
of blowing 30% CPU usage and having a lower frame rate.
The next thing that I want to compare is QuickSync,
which I was expecting QuickSync to be a great option.
So, I've loaded QuickSync in on the right here,
so now, already, I can tell that the one on the right,
the QuickSync, looks way worse.
And this is at its top quality setting and at 4500 bitrate,
the same as the other two.
So, QuickSync at 4500 bitrate
is just not up to snuff in my opinion at all.
Uh, performance wise, it's better than X264 on the CPU,
obviously, compared to the NVIDIA one.
Let's have a quick peek, so, it's a little bit,
just a little bit worse as far as the smoothness
and that's because QuickSync
doesn't bump up the core clock either.
The CPU usage is lower though, it's about 80% over here
and it's only about 50-60 over here, so that's good.
The frame rate does stay pretty consistently around 60 frames,
where over here we still drop, again, between 7 and 10,
but the GPU usage is up at 80%,
which is higher than the GPU over here,
well, it's about the same, actually
because neither one of them
is overclocking the GPU all the way,
but if your options are using NVIDIA or using QuickSync,
I would go with the NVIDIA option
because it's just way better than QuickSync.
I mean, just look how pixelated it is on the right
for the same bitrate and same file size.
[soft car horns]
That's just not satisfactory.
Now these numbers, these CPU numbers that I'm giving you
are based on my processing and it'll scale differently
depending on what processor you use.
Some of these things won't even be available to you if you have
a weaker processor because, you know, my 77%
might be well over a 100% of your processor.
I use an Intel i7, it's a quad-core with hyperthreading
so eight threads, I have it overclocked to 4.5GHz.
So, it's a pretty powerful CPU.
Um, and I cannot effectively play Grand Theft Auto V
with the settings all, like, maxed out for 1080
with OBS streaming and a third thing running.
So, let's say I add in a camera into OBS, like,
for FaceCam, this is a bit CPU intensive, even if it takes,
say, 10% CPU or I'm running something else in the background
that takes 5-10% of the CPU,
any spikes that happen in Grand Theft Auto V,
and it’s going to go down to Stutter City.
That's a pretty big problem, so that's why,
for me, this just wasn't an option
and I have a pretty great CPU,
so unless you have an even better CPU than me,
and you want to be able to run X264, or if you have the same,
or worse, CPU than me, I would highly recommend running NVENC.
Personally, I still think the NVENC looks great
and, for the fact that it's running 40% less CPU,
it's a no-brainer for me, and I went through
all the different pre-sets for NVENC.
Let's see if I can show you the other ones.What've we got?
So, you've got Default, High Quality, High Performance,
Blu-ray, Low Latency, Low Latency High Quality,
and High Performance.
I have heard some things about the Low Latency ones can cause
a bit of compatibility problems.
I thought some of them looked okay but I was a little bit
wary of that, especially since I didn't actually think
they look as good as default.
Blu-ray looks pretty darn good.
I don’t know, sometimes I have trouble telling the difference
between Default and Blu-ray. At certain times,
I thought Default looked a little bit better,
and Default's file size is slightly smaller than Blu-ray,
which means you'll get a little bit more bang
out of your bitrate when you're streaming.
High Quality would make you think
that it'd be the best one,
I actually personally found the high quality
had some frame dropping and didn't look quite as good
as Default, so if it was me, I would put Default
and I already explained the other settings earlier.
So, for me, my current streaming settings,
which I'm pretty happy with is I run the NVENC H.264 Codec.
I rescale it down to 1280x720, I run a Constant Bit Rate
of about 4500, it’ll have to be 3500
if you’re on Twitch, obviously. And again,
I've already said this before, but at 3500,
the x264 Codec does pull ahead
a little bit more than the NVENC.
It's still not as bad as it was in the old days, when people
were writing those posts in 2011, 12, 13,
where they were, like, "NVENC sucks!
It's so horrible looking!" It's not that bad, but at 4500
bitrate is where I find it's a little bit more difficult to
tell the difference, and in some cases, I would say NVENC
might actually be a little bit better, but less than that
and you're going to have a more efficient Codec with the X264,
but your CPU usage is going to go way up.
I put the key frames at two, the Preset at Default,
I put the Profile to High, I don't mess with the levels
or the other details like that, and I have been pretty happy
with the streaming settings.
Okay guys, thanks for watching, I hope you enjoyed this video.
I think that's about all that I wanted to cover.
That's most of what I've learned over the last 24-48 hours
trying to figure out how to stream.
I know I didn't cover everything I could possibly cover,
but I hope that I covered enough to answer some questions
if you guys were having similar questions to what I had,
but if there’s anything else, like I said,
let me know in the comments below.
If you like this video, please don't forget to give it
the old thumbs up, and subscribe to my channel
if you want to see more content from me.
I don't do stuff like this all the time, normally I do a lot
more fun, goofy kind of stuff, but check out some of
my other videos if you're here for a different reason,
and hopefully we'll see you around.
I'm going to be doing some streaming hopefully now,
so subscribe and you'll be notified when the stream
goes up and then if you have further questions
about streaming, you can ask me in there, and I can,
hopefully, answer them for you on the fly and help with
your streaming as well.
Alright... I'm done.
[upbeat music]
♪