Bug Report High Encoding all of a sudden (same hardware/settings)

Ernst_Blofield

New Member
This is a very odd problem. I'd consider myself an expert in streaming setups and I'm perplexed as to what is happening. Let me explain. Looking for help.

First - I run a DUAL PC stream setup - This is important because in no way does the game I'm playing interfere with the resources that OBS has.

Recently (back in April) my stream PC was an i7-5820k (6core/12 thread at 3.5ghz). With this I was able to stream at 1080p60fps on "VERY FAST," Normal processing priority, main profile, with some custom encoding settings such as: ref=2 rc-lookahead=20 opencl=true (GTX 950 card). This would essentially put max OBS usage (full motion mouse circles) at about 65-70% with my other program overhead at roughly a total of 80-85% CPU usage. This would lead to zero encoding lag issues, and be perfectly smooth.

I upgrade my PC to Ryzen 1800X and immediately saw an improvement. What was 65% dropped down to 50% max usage so I upped my Encoding from Very Fast to "Faster" (from an X264 perspective literally only changing subme=2 to subme=4) and was able to get rid of custom encoding options except for opencl=true. This worked great and bumped my total CPU usage to 65% again and max CPU usage to 85%, again, no problems. I was able to upgrade my quality a little bit with this and felt great.

I recently then started streaming another game, Rocket League. In order to achieve the same pixel quality (its a very high motion, colorful game) I decided to drop the resolution down to 1600x900x60fps instead of 1080p60fps - leaving my encoding on faster just scaling the output from 1080p down to 1600x900 (lanczos filter) keeping my bitrate high to make better pixel for motion ratio. This worked great for weeks.

Now all of a sudden I am getting encoding lag/high encoding issues on 1600x900x60fps on faster (CPU usage easily hitting 95-100%), I went back to 1080p60fps faster to see what that went to, again, replicating about 20% OBS higher CPU encoding than normal. I decided to drop both 1080p60fps to very fast, and 1600x900 60fps to very fast and see the issue: I'm getting the SAME encoding usage as I used to on Faster. Then within days when people would donate or my bit notification would go off and even on 1600x900x60fps very fast my encoding would go to high encoding instantly. I'm at a loss as to why OBS is now using 15-20% MORE CPU than it ever did before, and still causing high encoding on worse settings, while being exasperated by bit donations.

Since then I've now OC'd my CPU to 3.8ghz from 3.3 (Ryzen 1800X 8/16), switched processor priority to HIGH for OBS - I've lowered all browser sources to 30fps from 60fps...and its still happening. This is very frustrating to have to constantly lower my encoding quality to things LOWER than I had before, with a better CPU, all because there is an increase in CPU usage randomly from OBS. At this point I'm at a loss as to how to troubleshoot this issue. I wanted to report it and see if there has been any other reports like this - specifically people literally having to drop quality without changing anything in their settings just randomly.

I am going to drop back to OBS studio 18 and see if this goes away, and 17 as well.
 

Scotch

Member
I have experienced something similar, albeit I wasn't keeping as close track as you were because it didn't have as large an effect on my stream. One of the main reasons I switched from Xsplit back to OBS was that Xsplit was using more CPU on the same encoding settings as OBS, so I figured I would just make the switch back. Not sure when it occured but I have noticed that now OBS is nearly the same CPU usage as Xsplit was before, while on the same settings.

I don't have a whole lot more info on this but I can at least confirm that OBS has been showing more usage lately though.

Edit: Maybe we can track it to something running in the background, so here is a list of programs I have running while streaming and my stream PC info:
MOBO: MSI X79A-GD65
CPU: i7-3960X @ 4.0
Mem: 32 gb CORSAIR XMS3
GPU: Zotac 1050
Windows 10

Programs running:
TwitchAlerts Stream Labels (chrome extension)
Nightbot (separate app running)
Chatty
Teamspeak
Discord
Chrome

Background processes:
Razer synapse
Nvidia settings
Stinky
Gyazo
Voicemeter banana
Logitech webcam software
 
Last edited:

dodgepong

Administrator
Community Helper
If it happened "all of a sudden" without updating OBS, it sounds like it's more likely a Windows update or something similar.

Either way, please post a log.

Also, fun fact: OpenCL is experimental in x264, and tends to cause so many problems that OBS actually ignores the opencl=true parameter unless you use a special bypass. It's not recommended to use at all.
 

Ernst_Blofield

New Member
Thanks, I'll try removing opencl=true and see if that helps as well. Well, what is odd is my last real windows update was the creators update and a patch.

Why I tend to think its not "Windows" in this instance is because my "overhead" that I'm referring to hasn't really changed.

The key cef-bootstrappers and Windows Audio Device graph programs are the big users of CPU during stream at about 5-7% total, Chrome uses about 3-5% and then some other apps contributing. What I've noticed though is that this "overhead" has pretty much always stayed between 10-17% which is why I try to target about 65-75% total OBS usage to ensure I don't get CPU overload.
 

Ernst_Blofield

New Member
I will post a log when I'm able to - keep in mind you'll see some frame drops in the log from twitch servers being wonky lately, what I'm primarily concerned with is the line "Frames dropped due to encoding lag" that I see.
 

heyitsaaron

New Member
I'm having the same issue.. Its not even showing the encoder lag info. It just lags. Its not even taxing my Ryzen 1600 either.
 

dodgepong

Administrator
Community Helper
Thanks, I'll try removing opencl=true and see if that helps as well.

Well, I only mentioned it just because its presence or absence should have no effect whatsoever. Removing it shouldn't change anything.

Why I tend to think its not "Windows" in this instance is because my "overhead" that I'm referring to hasn't really changed.

Well, like I said, if OBS didn't update, and you didn't change your settings, then OBS probably isn't directly the problem, though it could be suffering due to a change elsewhere. OBS doesn't just decide to run poorly because it's Tuesday. Could be a driver issue, maybe hardware going bad, etc. I would expect v18 and v17 to exhibit largely the same issues, though I am interested to hear the results of your testing. If there is an easily-discernable difference, we can run a bisect to see if there is a specific bit of code causing the issue, but my hypothesis is that there will not be a difference.
 

Ernst_Blofield

New Member
Well, I only mentioned it just because its presence or absence should have no effect whatsoever. Removing it shouldn't change anything.



Well, like I said, if OBS didn't update, and you didn't change your settings, then OBS probably isn't directly the problem, though it could be suffering due to a change elsewhere. OBS doesn't just decide to run poorly because it's Tuesday. Could be a driver issue, maybe hardware going bad, etc. I would expect v18 and v17 to exhibit largely the same issues, though I am interested to hear the results of your testing. If there is an easily-discernable difference, we can run a bisect to see if there is a specific bit of code causing the issue, but my hypothesis is that there will not be a difference.

I'm aware it doesn't just go bad because its Tuesday, hence the reason I give a couple days/weeks for things to consistently show a pattern. Just like OBS doesn't go bad on a Tuesday, either does Windows, Chrome, Spotify or non-updated drivers that have been the same. Purely reporting this because I'm trying to figure out when/where/why this started happening and I still can't figure it out.

I will let you know about version 18, as I'm going to run it now.
 

dodgepong

Administrator
Community Helper
The OBS logs show that it is performing fine, though you are certainly using a TON of browser sources, which tend to be heavier on system resources than people realize. You said you were getting performance hitches when you got donations or bit notifications, which could indicate an issue where your notification service is doing something in the browser source causing these performance issues. You may need to contact the service you use for notifications. This could be the cause of the "stealth" performance changes, since the content of browser sources can be updated on the side of the service provider without you ever knowing.

You can test this by creating a new scene collection (not a new scene, but new scene collection), then re-creating your setup MINUS all the browser sources, and see if you have the same performance issues.
 

Ernst_Blofield

New Member
Does the number of scenes I have make a difference here? I know back in the old OBS making something a global versus scene source seemed to have some effect?
 

Ernst_Blofield

New Member
Interesting comment to add, I randomly just did a recording with OBS 18.0.1 instead of OBS 19.0.1 (previous version reported on) and it seems like the CPU usage and temp was less...I will continue to monitor and post to this thread if there is some sort of lower CPU usage associated with 18.0.1 - as of now I'm considering it placebo and not enough info.
 

dodgepong

Administrator
Community Helper
All sources in OBS Studio are always active, even when they are not being displayed on the current active scene (all sources are global sources). Number of scenes should not make a difference, but number of sources does. That said, you are re-using many of your browser sources (which is good) but you still have at least 8 of them, which is not an insignificant amount. Some of those notification services do some HTML5 animation that has a tendency to eat up more CPU that you might expect, especially if it's not behaving properly.
 

Ernst_Blofield

New Member
Just as an update to this issue. I went back to 18.0.1 last night, streamed for awhile on 1600x900x60fps, got high encoding again...Removed all OC from the CPU itself. Removed all HTML 5 sources from the scene I was using. Still high encoding. I will post this log when I get the opportunity. I started getting high encoding for no reason on 1600x900 in order to remove the high encoding I had to switch to 720p60fps, faster, and even then I was getting CPU usage into the 75%.

For reference I used to be able to stream i7-4770k processor, 720p60fps, on very fast encoding from single PC and not get high encoding.

So first I do conclude I don't think its an 18.0.1/19.0.1 issue as mentioned in your post @dodgepong

But I also conclude it has to be related to OBS still. I don't know how it can be something else?

The big problem that I see is there are not other programs in my Performance monitor that are taking up this usage. Its all in OBS. I still only have 10-17% program overhead in my CPU monitor outside of OBS. It keeps telling me its OBS.
I don't understand how it could be other things that are causing this high encoding issue if its not showing up in my performance/task manager monitors. Do you suggest there is another way I can view what programs may be really taking up this usage?
 
Top