Sudden encoding overload

Pigmess

New Member
Hello all,

After reading through a variety of posts on related issues, I've decided it best to start a new one.

Having used OBS on unchanging settings for may months, I am suddenly seeing that when streaming, OBS works fine for an indeterminate amount of time (maybe 5 minutes, maybe an hour) before it starts maxing GPU and dropping frames due to encoding lag. It reports encoder overload at this time; game performance and stream frames tank in accordance.

Example log file.

If I continue streaming, this begins to occur more and more frequently. It also seems to occur more quickly if I stream again without rebooting.

I have walked through and tested after every step listed at General Performance And Encoding Issues and GPU Overload Issues, with no impact. Note, in my example log you will see I do not have Game Mode enabled, and am not running as an admin. I have included these in thorough troubleshooting attempts and have ruled them out as related.

I only encounter the issue when streaming - not when OBS is idle, nor when it is only recording. Recording while streaming, or opting not to, doesn't have a noticeable impact.

As noted above, I had not changed my original settings, which were working for upwards of a year. (I believe the example log may in fact use settings that I found recommended by NVIDIA while going through this process; I've been testing both the original and new profiles with identical results.)

This was not occurring during my Saturday morning stream, but was present during my stream yesterday evening (Tuesday). The following major events occurred between those two times:

- I blindly installed a new "game ready" driver (465.89) as prompted by GeForce Experience. Yes, this was probably a mistake.
- I switched to a faster Internet plan, which increased my upload from 3-5 Mbps, to 10-12 Mbps.

I have since tried reverting to, and reinstalling, older versions of the driver - including attempts using the latest version of DDU to ensure a full cleanup is being performed. I am currently on driver version 461.72, which I believe (due to details of an available system restore point) was the previously installed version.

I have performed a system restore to Monday, which did not address the issue, though it did give my game capture an annoying flicker on stream. I was able to address the flicker by reinstalling the driver after the restore.

At one point there was an older restore point available - 3/22 - but I appear to have clobbered this with restore points created by DDU. Oops.

I also ruled out the (remote) possibility that this was due to mismatched frequencies among audio sources leading to drift and resulting in extra CPU usage, by changing all audio source frequencies to 48k in Windows device settings.

In some of the logs I've noticed a message pertaining to a memory leak, but this seems unlikely to be responsible as the example log has no such mention and the session suffered from the issue.

At this point I have been debugging the issue with no progress for over 24 hours. Any suggestions or insight whatsoever that any of you can provide would be very much appreciated.

Thanks for reading.
 

Pigmess

New Member
An update:

I have since tested with the same settings in SLOBS and am not experiencing the issue there.

This prompted me to backup my OBS settings/scenes, and uninstall/reinstall OBS.

I am still having the issue in OBS, using settings that don't cause it in SLOBS. OBS is up to date.

My scenes/collections are pretty minimal, as a side note.
 
D

Deleted member 121471

1) Run OBS as administrator;

2) Turn on Windows 10 "Game Mode";

3) In OBS settings-->Output, change your NVENC preset to "Quality", disable "Lookahead" and "Psycho Visual Tuning", change B-frames to the default value of 2.

Test and come back if you still have issues.
 
D

Deleted member 121471

My suggestions were the only logged items that were incorrectly set, aside from some major connection errors with discord's streamkit and maybe excessive amount of filters.

If none worked, I'm out of ideas for most common scenarios and am unable to help, someone more experienced can take over this question.
 

Pigmess

New Member
I don't mean to sound ungrateful, I appreciate your time and effort of course. I'm just deep into the woods on this.

I'll run another test with those changes for posterity, but can you elaborate what makes you think the settings are incorrect?
 
D

Deleted member 121471

I didn't mean my reply to imply that, it's all good.

1) Admistrator mode is not strictly necessary but it may help with certain issues like being unable to capture certain apps properly;

2) Recent major Window 10 updates have fixed a longstanding issue with "Game Mode" not prioritizing OBS correctly;

3) "Max Quality" preset, "Lookahead" and "Psycho Visual Tuning" leverage CUDA cores to improve the image quality marginally while nullifying all the performance benefits the NVENC encoder introduced. B-frames set too high will reduce the overall image quality on high motion scenes.

Other than that, too many filters can be a performance hog or certain broken plugins can lead to confusing and unexpected issues.

If the system still has issues after all these steps, capping the frame rate is another common step, usually to a multiple of your capture FPS, as OBS still needs a bit of GPU power to composite all scenes.
 
Last edited by a moderator:

Pigmess

New Member
Ok, we are on the same page - however I am past all of these steps.

I have tried with all of the following enabled / in place:

Framerate capped at 60 in NVIDIA control panel (monitor is 240hz, I stream at 60)
Game mode enabled, OBS run as admin
"Quality" preset selected, and lookahead and psycho visual tuning disabled (with b-frames lowered to 2) for both streaming and recording
scene complexity reduced to minimal (scene without any filters, containing a game capture with no filters)

What is confusing, but also leads me to believe it has nothing to do with filters etc., is these did not change whatsoever between the last stream where this issue didn't occur, and the first instance. Still, I have created a duplicate scene collection and have stripped it to the very basics to run more tests.

Note, I am now (with Game mode on, running as admin) seeing sporadic rendering lag while OBS is open but idle (no stream, no record).
 
D

Deleted member 121471

Have you tried setting your Windows 10 Power Plan to Max performance and doing the same in your NVIDIA control panel settings (think it's Power management: Prefer Max Performance)? It's a longshot but I've handled a couple of cases where this was part of the issue.

Also, try capping at 120FPS for troubleshooting purposes and disabling all overlays that may be active, such as GeForce Experience.
 

Pigmess

New Member
I no longer have GeForce experience installed, just the driver.

I have tried before setting NVIDIA's "prefer max performance", with no effect.

I can try the other one you mentioned in tandem, but I feel compelled to point out that it seems like all these graphics settings tweaks are unrelated to the issue, seeing as I never had to touch them previously.
 

Pigmess

New Member
Latest log file, after doing a system restore and with a fresh install of OBS.

My encoding/streaming settings are more conservative than they ever were back when everything worked without issue. Yet somehow, I am seeing this huge amount of encoding lag suddenly kick in some time after stream start.

I'm at a loss.
 
D

Deleted member 121471

Weird, your first log didn't show you had an antivirus replacing windows defender installed. Did you try disabling/uninstalling it too?
 

rasteek

New Member
I must say, that the same thing is happening to me. 1060 3Gb, ryzen 5 3600 ... Cant even record anymore because of encoding lag.
I build that machine 2 weeks ago, and for 1 week it was working without a problem, 2 days ago, all of a sudden, 5-10 % encoding lag while recording,
But the stream is without problem.
Also i have dual pc. so gaming does not affect streaming pc.

I did observe in hwinfo, that first core of my CPU is almost all the time 98 utilization... while the rest are about at 50 which i dont understand why when im using NVENC for both recording and streaming ... temps are about 50 degrees

1920x1080@60
Streaming settings:
Rate Control: CBR
Bitrate: 6000
keyframe: 2
preset: quality
profile: high
B-frames: 2

Recording settings:
mp4
rate control : CQP
CQ Leve: 20
keyframe: 0
preset: quality
profile: high
b-frames: 2

tried with LookAhead and Psycho tried on/off on both....

did the OP resolve anything?
 

Pigmess

New Member
I think I've stumbled onto a solution, in my case. I realized looking at Task Manager that while OBS browser captures were using GPU 1, the program itself was using GPU 0.

Turns out, it's important that OBS is set to use the same GPU as its captures - I am inclined to think a recent Windows update altered this setting on my laptop.

You'll find this in "graphics settings", as described at the link.

I haven't 100% confirmed this resolved the issue, but I was able to stream at 720p 60fps 5kbps for 2h+ last night without the issue cropping up. If this was the cause, it makes sense that the issue would worsen as the GPU heats up. I am optimistic.

I'll update if the issue returns, but hopefully this is the last I have to say on the matter.
 

DwGun

New Member
We had the same dropped frames encoding issue after 45 minutes during some streams that kicked us off. I assumed after this not happening every time we streamed it was a Windows update. Didn't know what to check, Thanks for the "answer" 18:46:22.705: [AMF] <Id: 6> Unable to set converter transfer characteristic, error AMF_NOT_FOUND (code 11)
19:24:23.544: DShow: Failed to find crossbar (0x80004005): Unspecified error
19:31:10.832: [AMF] <Id: 6> No output Packet, encoder is overloaded!
 

DwGun

New Member
You said "GPU 1, the program itself was using GPU 0" that caught my eye, as well as ryzen 5 3600. I changed the graphics settings. Worked better than ever.
Thanks
 

rasteek

New Member
I still have not resolve this issue.
I do believe that problem is in RAM as Ihave only one stick of 8Gb (not that 8 GB is not enough) and running single channel.

Any experience single vs dual channel ram?
 
Top