CPU Usage - Gaming/Streaming
13900k, 5.5 ghz all core
64gb 6000mhz RAM
RTX 4090 FE
Nvenc Encoder
5140x1400 Gaming
3840x720 Streaming
Windows 11 updated
OBS updated
Any CPU heavy game I need to cap my frame rate or I get massive encoder lag/FPS drop. CS2, Fortnite and MW2 require me to cap my in game fps to 120 hz to stop the encoding drops. CPU usage doesn't appear to balance between cores very well with several sitting with 0% CPU usage in task manager. Is there a way to limit different processes to different cores?
57 Replies
Can you post an OBS log where the lag ocurred
https://obsproject.com/tools/analyzer?log_url=https%3A%2F%2Fobsproject.com%2Flogs%2FEXYZyz29a4QNShKp
Analyzer | OBS
OBS (Open Broadcaster Software) is free and open source software for video recording and live streaming. Stream to Twitch, YouTube and many other providers or record your own videos with high quality H264 / AAC encoding.
that's one from earlier tonight. That's with FPS capped at 120 in MW2 and still dropping like crazy randomly. Stop the stream and reset and it is fine the rest of the night.
The log and the analyzer show that your lag is not from rendering or encoding lag - it's from dropped frames. Those are due to issues with your network connection to whatever services you're streaming to.
If stopping the stream and starting it again fixes the issue, then it sounds like your connection to the streaming service is initially unstable, and stopping & starting it up again seems to try to get you a better route to the stream service's servers
Next time this happens, try monitoring your CPU, GPU ,and network adapter in Task Manager, or preferably in a tool like HWInfo64 or HWMonitor
Otherwise as the log analyzer suggests, you probably want to move the game capture to it's own scene and nest it in your main scene, and do the same for the monitor capture
I'll uncap my frame rate tonight and upload a new log. Also can you explain why nesting the game capture/display capture changes anything. I'm fairly green when it comes to OBS.
GG @_mouf, you just advanced to level 4 !
I don't know the exact technical reasons but if OBE says that don't play well together then I'd trust them
https://obsproject.com/logs/PqIaasI1HMfDxNTL
unlimited FPS in MW2. tops out around 180
says encoder lag and wants a faster preset but it's all the way down to P4....
That log has no mention of render or encoder lag
do I need to stop the stream for it to update the log?
It should update the whole time but may as well try stopping the stream and grabbign the newest log
https://obsproject.com/logs/9SlPismYIM7aBcOk
ended stream and fired back up
Now it's updated
You only have 2.7% frames lost to render lag and another 2.7% due to encoding lag
This is a single PC setup correct?
yeah single PC. yeah it only drops if i unlock the ingame FPS. so I unlocked to get the drops and then relocked it down to 120
you are using nvenc for everything. and doing 4k stream? thats why theres very little cpu usage besides the game.
i would utilize your igpu for the stream. keep the nvenc for recordings, replay buffer etc
once you go towards 1440p or 4k gaming your gpu usage goes higher while cpu isnt used as much
isn't the nvenc chip seperate from the rasterization? I thought they were independent operations? Hence the AV1 and NVENC being different chips? So you are suggesting I use QuickSync and not Nvenc for streaming?
Nvidia utilizes part of the GPU that's used for gaming to assist in encoding. This comes up when you use psycho-visual tuning and presets P6 / P7
Even then, OBS also uses that part of the GPU for rendering the opreview. You can disable the preview to lower that usage, but obviously you can't see what you're streaming
Moving the encoding work the the QuickSync chip on your CPU will offload that work
Interesting..... Maybe I'm still missing something but why is the 40 series nvenc encoder always talked about as being improved if I should just use quicksync.
So is visual tuning off and P5 a better option than anything QuickSync?
The hardware H264 encoder on the Nvidia 40 series is the single best one out there
Thing is, Intel surprisingly is a close second in recent years
You can certainly try P5 with the psycho-visual tuning turned off, but as you've seen the biggest issue is that the 3090, as powerful as it is, can't handle things like MWII. I'm surprised you're getting issues in CS2 and Fortnite though
*4090 but yes the issues seems very bad for those frames
TYPO ON MY END
Was the caps lock on as well /s
Yes lol
I think a redistribution of the load is warranted here especially if you want to utilize the cpu more. However you decide that its up to you. Utilize your igpu since it has two video codec engines as well. So maybe for the stream and your vertical plugin? Idk
The focus is lessen the gpu load. As like you did with limiting the framerate to 120
Appreciate the insight everyone. The vertical plugin is only used to make clips no active streaming. I'll switch to quicksync for the main stream, uncap my FPS and give it a go.
Using p7 for the av1 recording is probably a total waste
I'd drop that to p1 or p2, and also use cqp vs cbr for it
And p1/2 is what I believe you'd need to use to take advantage of the dual nvenc properly anyways
I didn't even see that they were doing multiple encodes at once, and at AV1 with P7. That explains everything
Multiple encodes using settings that utilize the 3D engine of the GPU will cause the GPU to overload for sure
Read the log, not the analysis of said log 😉
ISLY
I skimmed it last night. Clearly i missed the AV1 parts
I'll have to take a peek at my settings again. What part did I screw up? Lol
You're using the Vertical plugin for OBS to have two other encode sessions using AV1 NVENC, both are at P7
For AV1 you can afford to drop them all the way down to P1
For h264 and h265 you can afford to drop to p1 as well(at least for recording)
Because us9ng cqp for recording will maintain the quality
Vertical is only for clips using the replay buffer. No live streaming with it. I was under the impression AV1 was higher quality with a smaller performance hit?
My main stream 3840x1080 I was using nvenc going to ReStream.
So I should be setting both to P1? Or should I switch the main stream to QuickSync and leave everything else?
First set both your encode sessions with the vertical plugin to P1 with psycho-visual tuning and lookahead both turned off, and use CQP instead of CBR (for AV1 CQP can be like 22)
If you're still getting some lag, try using quicksync
Appreciate it. So the settings for the main stream are ok?
Main stream is fine, it's just the Vertical encodes that are troublesome
https://obsproject.com/logs/rBboHGMFaaHY98T0
no go. with FPS uncapped drops frames in OBS
You're still using P5 with psycho-visual tuning and lookahead on for something, I think it's for restream
Also you don't want to use a CQP of 0 or 1, that's basically lossless - set it to 22
switched to 22 and it's substaintially worse.
https://obsproject.com/logs/xH4uCsxpHxCCAiJK
so on nvenc for the main stream what preset?
That log still shows you using CQP 1 and no changes to the restream settings
here is the vertical settings I used. look ahead and visual tuning are off.
I thought those were the only changes you were reffering too. what changes are recommended for the main stream?
The main stream is fine
You still have one more encode session happening somewhere that's going to restream. Do you have the plugin installed?
uhhh... I don't believe so
actually it looks like I do. there are restream docks...
Well you're still streaming to restream
wtf.....
Do you have an RTMP plugin set?
yeah I tried that before I went with restream. so it was only ever set to my stream services, never restream.
next dumb question... can you export your scenes and reimport? aka export them. do a fresh install of OBS and import the scenes?
GG @_mouf, you just advanced to level 5 !
You can do that
For scenes you do
Scenes -> Export
and save that JSON file somewhere
You're going to want to either copy your OBS plugins or write down their names and grab them online again and go from thereonce again. appreciate the help. thank you
@hunter_ap fresh install of OBS. imported scenes and modified the stream settings to match the previous settings. Also modified the vertical plugin settings to match the previous recording settings. It's too late for me to run any tests but can you see from the log if the settings are all correct please.
https://obsproject.com/logs/LoVCOUEXNhkHO1fU
The settings for the vertical plugin look good
May still want to turn off psycho-visual tuning for it though
And the restream stuff is gone so that's good
ahh yeah. missed that. thank you
I did not login with restream this time. manually added the stream key.
unforunately... no dice.
https://obsproject.com/logs/Dknhc7BGY9vfIAtw
Not seeing any frame drops or other issues in that log
Can you try fixing the issue I mentioned earlier where you have both a Game Capture source and Display Capture source in the same scene? You can move one of them to their own scene and then import that scene back?
OBS crashes every time I try and save a vertical clip after the clean install and scene import.
only scene with the game/display is CS. I just now removed it.
COD is when the frame drops and crashing occured
https://obsproject.com/logs/Y5NgTdmHAwfiIqFN
here is the log from just now after I ended the stream. I believe it crashed 4 times tonight when trying to save a vertical clip. I only tried to play with uncapped FPS at the beginning of the stream
I created a support ticket over on Atrium. Hopefully they have some insight on the crashing when clipping.