Question / Help Stutter in stream/preview. No rendering/encoding lag.

cl4pm0w

New Member
Good evening everyone. I did quite a lot of tests aaand it still stutters.
Here are my spec details so you can compare them for your convenience.

Streaming Rig (no overclock or antyhing, just the XMP profile enabled in BIOS):
Asus ROG STRIX X570-F Gaming
AMD Ryzen 9 3900X
32GB (2x16GB) @ 3200MHz (Corsair)
EVGA 1080Ti 11GBytes
Samsung SSD 970 Evo 1TB (used for testing the recordings, wanted to avoid any bottleneck)

Video Tab: Base and Output Resolution: 1920x1080p
Output Tab - Recording: Rescale Output to 1536x864


Gaming Rig (same as above, no overclocking, XMP profile and that's it)
MSI Z370 SLI Plus (MS-7B46)
Intel Core i7 8700k
32GB (4x8GB) @3200MHz (Corsair)
Asus ROG Strix RTX2080Ti 11GB

Video Tab: ( afaik nothing else needs to be set for NDI, correct? )
Base Resolution: 2560x1440p
Output Resolution: 1920x1080p


Test cases*:

  1. WoW - DirectX11 - CBR - 6000kbps - CPU slow (or medium) - profile high - key frames 2
  2. WoW - DirectX12 - CBR - 6000kbps - CPU slow (or medium) - profile high - key frames 2
  3. Doom Eternal - DX12 - CBR - 6000kbps - CPU slow (or medium) - profile high - key frames 2 - uncapped
  4. Doom Eternal - DX12 - CBR - 6000kbps - CPU slow (or medium) - profile high - key frames 2 - capped 100fps (better, still stutters though)
  5. Stardew Valley - DX10 - CBR - 6000kbps - CPU slow (or medium) - profile high - key frames 2 - uncapped
  6. Anno1800 - DX11 - CBR - 6000kbps - CPU slow (or medium) - profile high - key frames 2 - capped 100fps

* CPU Usage for the streaming RIG is at max 50% - NO dropped frames, NO encoding lag
NO dropped frames, NO encoding lag for the gaming rig as well (probably 2 dropped frames due to encoding whilst playing Doom/Anno, but GPU usage was really high and this was expected imho)

Final Test NVENC with NO impact even though GPU usage is around 60-99% at the gaming rig.
7. Anno1800 - DX11 - CQP - 16 - key frames 2 - quality - profile high - b-frames 2 - no look ahead - psycho enabled - capped 100fps
8. Doom Eternal - DX12 - CQP - 16 - key frames 2 - quality - profile high - b-frames 2 - no look ahead - psycho enabled - capped 100fps

I can upload all Testvideos to youtube if needed.
Additionally I will attach all logfiles for those tests from BOTH machines.

Haven't taken any look into them yet, was busy collecting all the data ...doing some WoW stuff with friends in between haha.
Will do that tomorrow!

Still it baffles me that the x264 isn't really working anymore...It's not a real enthusiastic test, but I wanted to test mutliple games with nearly the same settings to see if anything changes on the streaming rig, maybe the gaming rig could've been the issue, which it clearly isn't.

Would be interesting when/if this get's fixed sooner or later.
In the meanwhile, my solution is to use NVENC for now, kinda curious though if streaming with NVENC to Twitch will work, but I'm pretty sure it will.

Uploaded files do have SR (streaming rig) and GR (gaming rig) in their name to distinguish them.

Have a good night and regards,
cl4p
 

Attachments

  • 2021-03-29_Test1_DX11_WoW_GR.txt
    13.5 KB · Views: 19
  • 2021-03-29_Test1_DX11_WoW_SR.txt
    28.7 KB · Views: 20
  • 2021-03-29_Test1_DX12_WoW_GR.txt
    7.7 KB · Views: 18
  • 2021-03-29_Test5_SW_GR.txt
    13.4 KB · Views: 17
  • 2021-03-29_Test4_DX12_DE_SR_100fps_30perc_cpu.txt
    26.7 KB · Views: 17
  • 2021-03-29_Test4_DX12_DE_GR_100fps_30perc_cpu.txt
    13.5 KB · Views: 19
  • 2021-03-29_Test3_DX12_DE_SR_too_many_frames.txt
    26.3 KB · Views: 17
  • 2021-03-29_Test3_DX12_DE_GR_too_many_frames.txt
    13.5 KB · Views: 17
  • 2021-03-29_Test2_DX12_WoW_SR.txt
    20.3 KB · Views: 17
  • 2021-03-29_Test5_SW_SR.txt
    27 KB · Views: 14

cl4pm0w

New Member
and here the rest of the files..
 

Attachments

  • 2021-03-29_Test7_DX11_GR_A18_100fps_NVENC.txt
    13.5 KB · Views: 24
  • 2021-03-29_Test6_DX11_A18_SR_100fps.txt
    26.3 KB · Views: 17
  • 2021-03-29_Test6_DX11_A18_GR_100fps.txt
    7.5 KB · Views: 16
  • 2021-03-29_Test7_DX11_SR_A18_100fps_NVENC.txt
    26.7 KB · Views: 24
  • 2021-03-29_Test8_DX12_GR_DE_100fps_NVENC.txt
    13.5 KB · Views: 16
  • 2021-03-29_Test8_DX12_SR_DE_100fps_NVENC.txt
    26.4 KB · Views: 23

JohnCiber

New Member
No. There most likely won't be one for at least a month or more

Beautiful, this means that finally, we are close to a fix?

Like others, I'm having this issue for years and came back to the forums from time to time to look if finally there is a solution for this
 

fatmatrow

Member
Beautiful, this means that finally, we are close to a fix?

Like others, I'm having this issue for years and came back to the forums from time to time to look if finally there is a solution for this
That doesn't mean we're close to getting a fix that means they'll start investigating it in earnest. After working with people who know more than me for months and running countless tests and logging programs, I still haven't figured out what is causing the issue. Thats part of the problem. Hard to fix something when theres seemingly no outward cause
 

cl4pm0w

New Member
Thats what happened to me. I stopped streaming in 2019 because I moved in with my parents for a few months after surgery then the pandemic hit and all my stuff was still at my house. I come back in october and near the end of the month i noticed it, tried everything i could think of to fix it, got a lot of advice, and finally built a completely different second computer and it does the exact same thing! I spent all Dec, Jan, and most of feb trying to find the issue to no avail. It may be related to intermittent usb issues, as it is also intermittent and depends on the lanes coming off the chipset etc etc but if not they'll be looking into it soon after OBS 27 is finished
Hm, just out of curiosity, but why should it be related to intermittent usb issues? why would a lot of people have this issue all of a sudden?

For me it points clearly into the direction of Windows Updates bugging out the x264 encoder or whatever.
Kinda curious how to debug something like that hm...need to google a little, there must be some way.
 

fatmatrow

Member
Hm, just out of curiosity, but why should it be related to intermittent usb issues? why would a lot of people have this issue all of a sudden?

For me it points clearly into the direction of Windows Updates bugging out the x264 encoder or whatever.
Kinda curious how to debug something like that hm...need to google a little, there must be some way.
Its not just the x264 encoder thats messed up tho, nvenc doesn't work either. I've tried older versions of windows and OBS from when I know it worked fine, still messed up.
 

cl4pm0w

New Member
Hm...sad to hear that. For me using NVENC solved the issue for now, but still not the goal I'd like to achieve (x264 slow encoding).
I've now tried to run some additional logging with OBS on the stream rig and also gaming rig... (--verbose --unfiltered_log --log_unfiltered) and I don't see anything fishy in there as well (except for some dll's which weren't able to load properly even though they are there ... -> both rigs).

I also created a dumpfile via windows as described here:
How to create a .DMP file for debugging

Clicked through it a little, found some wait messages for win32u.dll which pointed me to ANY kind of issues, but as far as I could find out, win32u.dll!_NtUserMsgWaitForMultipleObjectsEx can be related to ANYTHING and you would need to debug it live while the process is running which is beyond my Windows Knowledge tbh.

Oddly enough I found one thread which pointed me to AHCI/SATA driver and also USB driver errors or whatever...had to think of you immediately @fatmatrow ^^
Nevertheless, I updated my Chipset drivers and also my NVM.e drivers -> still the same result...

Well, I'm really looking forward to any new on this topic or maybe even someone who could help debug this stuff.
As I'm able to reproduce the issue by just switching to x264 and "resolve" the issue by using NVENC I could nicely show both variants including videos, logfiles and so on and so forth.

EDIT: I also tried to find some NDI debugging info, but this is even more in depth and far beyond my understanding and I'm not entirely sure if NDI is the issue.
 

Reikoji

New Member
Hello all. New here and was trying many things to get this working right as well.

For me, Up until yesterday everything was hunky dory, and I was able to record my games using OBS. Then on June 25, the Preview became choppy as is happening with everyone else and the framerate was almost constantly below 20fps without even recording.

After doing many things today, I have found that, for me at least, going into the properties of the preview and enabling 'Multi-adapter Compatibility' the stuttering went away completely. This may or may not have more relevance for me, since I use two monitors. I am still unsure why I suddenly need this option checked now when I didn't before. Perhaps it was actually checked before, but somehow it became disabled when the day changed? I never really paid attention to it until now.
 

Reikoji

New Member
Another note about that is is appears that it causes the GPU to reserve usage, so the game/app you are running will not be at 100% usage all the time, and thus have reduced framerate. But, it keeps OBS stable in the process. Seems at some point, it became a situation where as long as the GPU is giving its all to another process, it gives nothing but scraps to OBS which leads to stutter. I didnt have any updates to anything between the 24th and 25th so i cant tell what changed that made this a thing.
 
Last edited:

fatmatrow

Member
Hello all. New here and was trying many things to get this working right as well.

For me, Up until yesterday everything was hunky dory, and I was able to record my games using OBS. Then on June 25, the Preview became choppy as is happening with everyone else and the framerate was almost constantly below 20fps without even recording.

After doing many things today, I have found that, for me at least, going into the properties of the preview and enabling 'Multi-adapter Compatibility' the stuttering went away completely. This may or may not have more relevance for me, since I use two monitors. I am still unsure why I suddenly need this option checked now when I didn't before. Perhaps it was actually checked before, but somehow it became disabled when the day changed? I never really paid attention to it until now.
Thats weird because that option is for dual card setups with sli/crossfire
 

SVDA

New Member
Hello. I had a problem until today. The preview started to slow down after 10+ minutes of recording or streaming. The lags last for about a minute. Then everything is restored. This happens in a cyclical manner. It doesn't matter what you write down. You can just work the desktop and move the mouse cursor. I solved the problem by setting the frequency lock to 60 FPS in the OBS. I use the rivatuner statistics server program. When recording OBS in the statistics, the average frame render time will be 16.6 + - and will glow yellow. There may be short-term frame drops. But the main problem has disappeared. I recorded a video 2 hours long and there was no problem. In general, there were no problems other than skipping one frame somewhere at the beginning. Hope this helps. Sorry for my English. I'm from Russia :)

изображение_2021-07-12_184413.png
 

stubFX

New Member
For me is the same as for cl4pm0w up here, NVENC seems to be resolving the issue, (at least in my case) but still a problem imo.
I have a dual pc setup and because of the chip shortage i just tried my best to overcome the problem with a workaround.

When i was streaming on a single pc, except for some rendering lag (sometimes) i didn't notice any issue at all with stuttering, but i was using NVENC to encode.
Now that i have a dual pc setup (has been a month) i've been fighting with this issue until i found this post.

To explain my tmp workaround just take a look at the specs:
(just the one you need to know, not gonna bother u with all of them)

Gaming pc:
i7-6700k
gtx 1080

Streaming pc:
r7 3700x
gt730 (i know is not enough for obs, but it's just an old card that works in my case, at least for the moment)
elgato 4k60

Im using my gaming pc to create and render the scene in obs while playing (the 1080 works flawlessly if i cap the framerate around 90fps as an average for most of the games) then i'm rendering the preview on the "second monitor" (on the elgato card on the streaming pc) to send the rendered video.
Of course im unable to use the NVENC on the gt730 so im using the r7 3700x on fast preset (still tweaking some settings)
Doing this, im able to have only a single video input on the obs running on the streaming pc.

The point is: even if i manage to drop the cpu of the streaming pc (r7 3700x) to 30/50% of it's usage it doesn't matter, still having the same problem, less frenquently, but still there and the cpu is doing only that job (except for windows of course)

Im gonna try xsplit just because im curious, i'll see how it does.
 

xDOCTAx

New Member
Having the same issue as of today. No encoding or rendering frames dropped ( well very minimal ) Desktop and normal applications seem fine, just when I boot up a game with larger refresh rates it kicks in and lags the preview and output.

* NVENC or x264 doesn't matter.
* Display or Game Capture doesn't matter

Anyone have any solved issues on this?
 
I found that these issues are Windows 10/11 Power Management issues. I use an application called Quick CPU (open source) to enforce the High Performance power plan as it should. Sometimes, Windows will change OBS's power management as it may see recording software as idle since nothing is actively using it, even though it is in use. Do not use a process tuner application.

The second issue is if you use G-Sync; keep it on Full Screen mode only. If you use Windowed and Full screen mode, G-Sync will engage for the active window and it's for an application that is not fully compatible with G-Sync. VLC media player is an example; the developers decided to just turn it off because they cannot implement it correctly or they want to keep developing for Windows 7. That mode works best under a Windows 7 system or an application that was specifically designed for it.

The third issue is Windows Updates. Check your Delivery Optimization settings and change it from Absolute Bandwidth to Percentage of Measured Bandwidth (against the source). Absolute Bandwidth will starve the CPU even when there are no updates and in some cases steal CPU cycles from other applications.
 

fatmatrow

Member
I found that these issues are Windows 10/11 Power Management issues. I use an application called Quick CPU (open source) to enforce the High Performance power plan as it should. Sometimes, Windows will change OBS's power management as it may see recording software as idle since nothing is actively using it, even though it is in use. Do not use a process tuner application.

The second issue is if you use G-Sync; keep it on Full Screen mode only. If you use Windowed and Full screen mode, G-Sync will engage for the active window and it's for an application that is not fully compatible with G-Sync. VLC media player is an example; the developers decided to just turn it off because they cannot implement it correctly or they want to keep developing for Windows 7. That mode works best under a Windows 7 system or an application that was specifically designed for it.

The third issue is Windows Updates. Check your Delivery Optimization settings and change it from Absolute Bandwidth to Percentage of Measured Bandwidth (against the source). Absolute Bandwidth will starve the CPU even when there are no updates and in some cases steal CPU cycles from other applications.
I tried everything suggested and had no improvement
 
I tried everything suggested and had no improvement

You are absolutely right, because I thought it was the power management (though I wanted to make adjustments to it). I have been actively troubleshooting this problem for months until I stumbled upon a possible root cause....Microsoft Defender. I tried to disable Microsoft Defender by the settings and it's still turned on. I tried to disable it by Powershell ISE and it's still on. I tried to disable it by Group Policy (I'm using Windows 11 Pro for Workstations), and it is still enabled. So...I could only think of one thing left to do without torturing my new operating system.

I installed another antivirus, AVG (free edition). Doing so will completely disable Microsoft Defender and it's intrusive heuristic behavior. It has a new behavior for full screen applications or games that run in full screen mode. I checked the OBS log and Microsoft Defender is disabled. I made a recording and my stuttering issues were gone.

I have suspected that Microsoft Defender was causing these issues for I had a work related issue; Defender constantly crashed an application and I had to make an exclusion. I would see notices where it scans the operating system three times, so it has a very intrusive behavior on applications in Windows. I have submitted feedback to Microsoft about tuning the antivirus as it has become way too intrusive. I don't know if we are heard, but I am sticking with using AVG as a solution because they added new a new behavior where AVG is not intrusive during full screen applications or when a game is running.
 

hildegain

New Member
It's understandable that you'd assume it has something to do with Windows Defender but that would only make sense if it were influencing your recordings by actually causing dropped frames due to hardware resource limitations. Most people with this problem show no dropped nor skipped frames.

In fact. I found this issue exists across every version of Windows that I tested it in and even across into Linux. I've tested using Xorg and Wayland and always the same issue. In fact, in my case the recorded video never actually shows the same stutter that the preview does (Edit: I will make a correction. It did so once and it looked awful but no idea why it happened nor why it didn't happen any other time). And resource usage can be as low as a few percent when it happens.

I had a little luck setting OBS to output 60.004fps and my source PC to 119.88hz.... A little. It only made it less severe.
 

fatmatrow

Member
It's understandable that you'd assume it has something to do with Windows Defender but that would only make sense if it were influencing your recordings by actually causing dropped frames due to hardware resource limitations. Most people with this problem show no dropped nor skipped frames.

In fact. I found this issue exists across every version of Windows that I tested it in and even across into Linux. I've tested using Xorg and Wayland and always the same issue. In fact, in my case the recorded video never actually shows the same stutter that the preview does (Edit: I will make a correction. It did so once and it looked awful but no idea why it happened nor why it didn't happen any other time). And resource usage can be as low as a few percent when it happens.

I had a little luck setting OBS to output 60.004fps and my source PC to 119.88hz.... A little. It only made it less severe.
The only viable fix is the dxgi frame buffer that is currently being tested and will hopefully be implemented fully into obs. I've been using it lately with great results
 
Top