obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
57.87k stars 7.75k forks source link

Preview Stutter that appears in Streams/Recordings #4191

Open Zakkaruu opened 3 years ago

Zakkaruu commented 3 years ago

Platform

Operating system and version: Windows 10 20H2 OBS Studio version: 26.1.1

Expected Behavior

Display a non-stuttering image if the source is not stuttering and resources are not constrained.

Current Behavior

After an indeterminate amount of time, the preview window will begin stuttering, irrespective of capture method (Window, Display, Game). This stuttering will make its way into the stream and/or recording.

Steps to Reproduce

  1. Open OBS
  2. Create Game/Window/Display capture, depending on source
  3. Watch the preview for stutter (usually about 5-10 minutes before it shows up in my case)
  4. Stutter appears

Recording of Behavior This recording was made with a second instance of OBS. I thought there was some correlation by running two instances that the stutter went away, but this instance also experienced stutter, albeit, far later on.\ Log from Stuttering OBS Instance shown Timestamps: At the beginning and again at 2:20.

Recording of Stutter Behavior Log from Recording

Another Recording from a completely different machine at another location. 2021-02-04 19-56-16.txt

Laptop Recording with the same exact issue. 2021-02-04 21-13-15.txt

Additional information

In my video, I am using the following link: TestUFO. I have also made an imitation of this pattern as an MP4 for use in a video player supporting D3D11 (Potplayer).

The stuttering will eventually cease and reappear after different periods of time. However, if you change the profile in-use during the stuttering, it goes away...and eventually reappears. The behavior shows up significantly faster when using I444 color format; NV12 still does it, but it takes MUCH longer to appear..I waited probably about 15-20 minutes on NV12 vs about 5-10 with I444. This happens in games and really anything being captured, I chose the test pattern because it makes it easy to see.

I have used nSight Graphics/Systems and GPUView, but there does not seem to be a correlation with anything else going on. This has been tested on two different systems thoroughly. On one of the test systems, I did a fresh install of Windows, installed only necessary drivers/chipset drivers, OBS, Steam, and one game.

I believe this issue is related to the following forum topics: https://obsproject.com/forum/threads/persistent-stutter-issue-tried-everything.137045/ https://obsproject.com/forum/threads/stutter-in-stream-preview-no-rendering-encoding-lag.114986/ https://obsproject.com/forum/threads/random-stuttering-in-preview-which-goes-into-recorded-videos.77744/ https://obsproject.com/forum/threads/obs-preview-stutters-while-not-recording.106424/

I am willing to be a test dummy for this, just let me know what you need from me.

Additional Examples

Vermintide II Gameplay Example

Fenrirthviti commented 3 years ago

A lot of time has passed, but a solution to the problem has not been found (. And in general, there have been no updates for a long time ( Does the developer see the post at all?

Several developers, including the main developer himself, have commented on this thread explaining how difficult of a thing this is to diagnose and address, and might not even been something inside OBS causing it in the first place. We're aware of it, and are monitoring the situation, but this doesn't affect everyone and most of our community contributors haven't been able to replicate or pin down exactly what's going on. Passive aggressive posts like this only serve to take time away from working on other things because we then have to sit here and write a reply explaining everything that has already been discussed in the thread.

hemarton commented 3 years ago

Just a note, in case it's useful, NO NEED TO ANSWER: I have been experiencing this random stuttering for months, which looks like frame rate dropping to about half the set number, and then going back to normal without any doing on my part after awhile. Either with multiple cameras or just a single one attached via Elgato Camlink 4K or another mixer as well. It's an i7 PC laptop with an Nvidia card, system doesn't seem overloaded. Both the preview and stream and/or recording is affected. Thank you whenever you can get to fixing the issue. I'm very grateful that we can have this powerful software for free btw!

mackmcd commented 3 years ago

Just adding another data point to this. Exact same issue. Have driven myself crazy trying to solve it. Happen on my pc with 1700x and GTX 1070, still happening on current system with 3800x and RTX 3080 FE. No combination of settings, capture options, clean source lists... nothing I can do will remove the stuttering. Although mine don't need 6 - 10 minutes of running to see the stuttering. It can happen after as little as 60 seconds.

To be honest, I feel like this issue is far more prevalent than this thread suggests. Watch almost any stream on Twitch, and you'll almost certainly see it. I think the people in this thread are just more sensitive to noticing it than others. Or rather, they just chalk it up to "just twitch things" and ignore it/accept it.

I will say that recording with something like indistinguishable preset seems to result in a much smoother output than anything I can do limited to 6000kbps. Not sure how useful that information is, but there it is.

jmenard035103 commented 3 years ago

I'm having this exact issue, 5950X 6800XT. Doesn't matter what resolution or frame-rate, the preview stutters very frequently. I never used to have this problem, but noticed my stream was not performing well recently, after hours and hours of testing the previous settings and getting it nearly perfect, now it's unbearable.

jmenard035103 commented 3 years ago

Moments after leaving my last comment, I tried changed the in-game mode to Fullscreen (was previously on fullscreen-windowed) and it actually seemed to fix the problem.

More tests to come.

hemarton commented 3 years ago

What fixed it for me the last time I streamed was enabling buffering for the camera input: no stuttering occured during like 2 hours of streaming. And there was no weird latency which I feared when enabling the buffer. Hope it stays like that. Does this fix the issue for anyone else here as well? (I used a Windows laptop for the streaming, haven't tried the fix on my mac yet)

jmenard035103 @.***> ezt írta (időpont: 2021. máj. 5., Sze, 19:53):

Moments after leaving my last comment, I tried changed the in-game mode to Fullscreen (was previously on fullscreen-windowed) and it actually seemed to fix the problem.

More tests to come.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-832890109, or unsubscribe https://github.com/notifications/unsubscribe-auth/APHTZZC3AJJT46Q7SAB6NKDTMGA2TANCNFSM4XDUZ63Q .

Zakkaruu commented 3 years ago

@hemarton I simplified my scenes to only include a game or display capture, so I don't think it affects my issue.

hemarton commented 3 years ago

Does either one of those enter the computer via an external capture card? In that case there still could be a buffering on/off option, I imagine. Just wondering.

Zach @.***> ezt írta (időpont: 2021. máj. 6., Cs, 15:51):

@hemarton https://github.com/hemarton I simplified my scenes to only include a game or display capture, so I don't think it affects my issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-833540503, or unsubscribe https://github.com/notifications/unsubscribe-auth/APHTZZAXA2HULOUNEWYZIB3TMKNHRANCNFSM4XDUZ63Q .

Kaibenson commented 3 years ago

Hi first of all sorry for my poor english but anyway. I do have the same problem with "floating stuttering" of all video sources i'll connect to obs with the capture input on different platforms ( mac, windows) and gpu/processor combinations. Now after cross checking the different obs versions and other live capture software like quicktime player (no stuttering at all because QT is slave), i found out that the problem seems the missing "video input source sync" because the "fixed fps" (internal) setting in the capture input module of OBS. That means for me the capture input gives a frame rate setting option not syncing exactly to the always "fixed" (not syncable) source framerate. The result is a "floating" but nearly exact synchronisation of the source and the obs input depending. This causes for me the "not digital" issue of stuttering sometimes in preview. (I´m not sure but it feels like that OBS reacts as a clock master-- right?) In NDI input sources its possible to set the sync to the Input Signal or Network but Internal. The Input signal sync setting always works fine. Especially between two OBS machines (stream master, stream server) So for me the main problem is missing a synchronize option like sync to video input frame rate in the capture module. Just add a option like NDI does, this solves just this problem for 1 source. Another problem generally is combining serveral video sources in obs. All the sources are not locked (e.g. slave mode), that means if you switch- or fade in obs studio between these lets say two, and one of the sources is out of the exact same framerate this causes stuttering just during the fade or framefreeze on switching to the scene vice-versa. The other option in the video input module missing is the disable in background option too --important--. I´m not sure but it seems that many people not recognizing the stuttering or its not that important. Globally the main problem Is the missing Masterclock for all sources--The good old video sync generator .):). This is not solvable for consumer products for the future i´m sure. From my position OBS is a great tool for post production and live streaming but this issue is really disturbing me since years too. Thank You and regards to the OBS coding team Kai Martinkovic Westreammuc UG Munich westreammuc.com

kai@kaikai.de

hemarton commented 3 years ago

I'm not sure I understand the technicality of everything you said but your observation seems genius! I wonder if the fix I found and wrote about above, of enabling the buffering function for the video source, has something to do with the problem you layed out. My imagination is, if there is a buffer, then OBS can "insert" the frames in the correct "time slots" for the output and there might only be a delay of like half a frame for the stuttering to cease. Or something like that.

Kaibenson @.***> ezt írta (időpont: 2021. máj. 9., V, 17:12):

Hi first of all sorry for my poor english but anyway. I do have the same problem with "floating stuttering" of all video sources i'll connect to obs with the capture input on different platforms ( mac, windows) and gpu/processor combinations. Now after cross checking the different obs versions and other live capture software like quicktime player (no stuttering at all because QT is slave), i found out that the problem seems the missing "video input source sync" because the "fixed fps" (internal) setting in the capture input module of OBS. That means for me the capture input gives a frame rate setting option not syncing exactly to the always "fixed" (not syncable) source framerate. The result is a "floating" but nearly exact synchronisation of the source and the obs input depending. This causes for me the "not digital" issue of stuttering sometimes in preview. (I´m not sure but it feels like that OBS reacts as a clock master-- right?) In NDI input sources its possible to set the sync to the Input Signal or Network but Internal. The Input signal sync setting always works fine. Especially between two OBS machines (stream master, stream server) So for me the main problem is missing a synchronize option like sync to video input frame rate in the capture module. Just add a option like NDI does, this solves just this problem for 1 source. Another problem generally is combining serveral video sources in obs. All the sources are not locked (e.g. slave mode), that means if you switch- or fade in obs studio between these lets say two, and one of the sources is out of the exact same framerate this causes stuttering just during the fade or framefreeze on switching to the scene vice-versa. The other option in the video input module missing is the disable in background option too --important--. I´m not sure but it seems that many people not recognizing the stuttering or its not that important. Globally the main problem Is the missing Masterclock for all sources--The good old video sync generator .):). This is not solvable for consumer products for the future i´m sure. From my position OBS is a great tool for post production and live streaming but this issue is really disturbing me since years too. Thank You and regards to the OBS coding team Kai Martinkovic Westreammuc UG Munich westreammuc.com

@.***

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-835825646, or unsubscribe https://github.com/notifications/unsubscribe-auth/APHTZZEVVFBFW2S5QGA2HJDTM2Q5LANCNFSM4XDUZ63Q .

Kaibenson commented 3 years ago

Hi hemarton The buffering option itself is not reliable because missing configuration settings. The other problem is that the buffer size seems dynamical. Therefore the latency varies dramatically. Nothing for live situations. Hopefully the OBS team witch are genious start to think about a video sync engine that controls the viewable video output frame rate for optimizing the field order duty quality to make sure the frame rate input correspondents exactly to that what selected. (slave mode) Lets see, we´re not alone with this Regards kai

hemarton commented 3 years ago

I see what you mean. Hopefully they'll pull it off sometime soon. Until then I really hope my buffer doesn't go out of hand while streaming live music :/ :D

On Sun, May 9, 2021, 18:19 Kaibenson @.***> wrote:

Hi hemarton The buffering option itself is not reliable because missing configuration settings. The other problem is that the buffer size seems dynamical. Therefore the latency varies dramatically. Nothing for live situations. Hopefully the OBS team witch are genious start to think about a video sync engine that controls the viewable video output for optimizing the field order duty quality (resampling, frame blending) to make sure the frame rate input correspondents exactly to that what selected. Lets see, we´re not alone with this Regards kai

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-835837503, or unsubscribe https://github.com/notifications/unsubscribe-auth/APHTZZF6BMDUUQQDNAIRNHDTM2YXTANCNFSM4XDUZ63Q .

ActuallyKephrii commented 3 years ago

In the off chance one of you poor souls ends up in this thread looking for a solution. My dedicated streaming PC specs are as follows: 3950x , 2080TI, 3800MHz (1:1 1.5v 14CL) & I was experiencing this same issue. I tried adjusting every x264 setting preset (issue persisted on Ultrafast all the way down to Slow) as well as all custom commands and found no peace. Upon noticing that the 'lag' or 'stutter' occured when locally recording using NVENC.. it made it clear it was not an x264 issue. I couldn't think of what the issue would actually be so I just Hail Mary'd that bitch & unchecked "Enable Browser Source Hardware Acceleration" or whatever in the Advanced settings tab. No idea why.. but it solved the problem. Twitch chat made me turn it back on to verify it was in fact the culprit.. and it in fact brought back the lag/stutter problem. I hope this helps someone. Good luck.

Edit: I also had tried adjusting the threads= command but that also proved to do nothing, same with disabling SMT. Though I think disabling SMT worked out better since OBS has issues with higher thread counts. Forcing OBS to run with only 16 threads has kind of worked out rather nicely.

mackmcd commented 3 years ago

In the off chance one of you poor souls ends up in this thread looking for a solution. My dedicated streaming PC specs are as follows: 3950x , 2080TI, 3800MHz (1:1 1.5v 14CL) & I was experiencing this same issue. I tried adjusting every x264 setting preset (issue persisted on Ultrafast all the way down to Slow) as well as all custom commands and found no peace. Upon noticing that the 'lag' or 'stutter' occured when locally recording using NVENC.. it made it clear it was not an x264 issue. I couldn't think of what the issue would actually be so I just Hail Mary'd that bitch & unchecked "Enable Browser Source Hardware Acceleration" or whatever in the Advanced settings tab. No idea why.. but it solved the problem. Twitch chat made me turn it back on to verify it was in fact the culprit.. and it in fact brought back the lag/stutter problem. I hope this helps someone. Good luck.

Edit: I also had tried adjusting the threads= command but that also proved to do nothing, same with disabling SMT. Though I think disabling SMT worked out better since OBS has issues with higher thread counts. Forcing OBS to run with only 16 threads has kind of worked out rather nicely.

Damn. I got excited. Something I hadn't tried before. But alas, unchecking that option and restarting OBS solved nothing. Still stuttering every 5 - 10 seconds as though the framerate is dropping to an unmatched 30ish FPS. Appreciate the suggestion, though!

mackmcd commented 3 years ago

Update to that; I had set my monitor to 60hz, despite it going up to 144hz, because I thought if I forced the same FPS on the game, monitor and capture, with and without V-Sync, OBS would have a better time keeping things in sync.

For shits and giggles, I upped my monitor back to 120fps, and let my game go as high as that too. (testing with Death Stranding) At 1440p, I can hold between 95 and 120fps in that game. Boom, stutter all but completely removed. Definitely seems to be a frame timing thing. My guess is, at a higher FPS, even if the timing is off, OBS has a better chance of grabbing a frame that's close enough to make it appear smooth, than at 60 fps where there's simply no frame there at all, causing it to skip it. Certainly at FPS around 90 or so, you might see the tiniest hitch here or there, but it's WAY better than the fps tanking straight to 30 for upwards of 1 to 2 full seconds with the capture goes out of sync that I was dealing with. In areas where I'm holding 120fps steady, zero stutter. Zero.

Maybe not helpful to those of you already playing at higher FPS, but although not perfect, upping the FPS of my game has made captures at least good enough for me to resume streaming. Trying to lock 60fps in game, 60hz on the monitor, and 60fps capture in OBS resulted in stutter so bad I literally haven't bothered streaming in months.

Hope that helps!

ActuallyKephrii commented 3 years ago

In the off chance one of you poor souls ends up in this thread looking for a solution. My dedicated streaming PC specs are as follows: 3950x , 2080TI, 3800MHz (1:1 1.5v 14CL) & I was experiencing this same issue. I tried adjusting every x264 setting preset (issue persisted on Ultrafast all the way down to Slow) as well as all custom commands and found no peace. Upon noticing that the 'lag' or 'stutter' occured when locally recording using NVENC.. it made it clear it was not an x264 issue. I couldn't think of what the issue would actually be so I just Hail Mary'd that bitch & unchecked "Enable Browser Source Hardware Acceleration" or whatever in the Advanced settings tab. No idea why.. but it solved the problem. Twitch chat made me turn it back on to verify it was in fact the culprit.. and it in fact brought back the lag/stutter problem. I hope this helps someone. Good luck. Edit: I also had tried adjusting the threads= command but that also proved to do nothing, same with disabling SMT. Though I think disabling SMT worked out better since OBS has issues with higher thread counts. Forcing OBS to run with only 16 threads has kind of worked out rather nicely.

Damn. I got excited. Something I hadn't tried before. But alas, unchecking that option and restarting OBS solved nothing. Still stuttering every 5 - 10 seconds as though the framerate is dropping to an unmatched 30ish FPS. Appreciate the suggestion, though!

Hey, another thing that I changed that may help is disabling "Hardware-accelerated GPU scheduling" in Windows. Start Menu -> "Graphics Settings" should lead you to this option.

Sorry if you have already done this & I am just getting your hopes up again haha.

Kaibenson commented 3 years ago

Hi Guys, i´ve checked the issue described above with wirecast too--- No way at all, i don´t believe how people could work with videowise at all. So please give us a chance to be surprised making obs more professional in. Additionally i would be very surprised if the coding team will integrate a solution to control the t-fader per remote. I know i can control the fader with the mousewheel on mouseover (oooh lord), but perfect would be a midi control function (usb) for connecting a fader controller or something like this (automation then possible and surely helpful). Regards Kai

fatmatrow commented 3 years ago

Please stop posting things that have nothing to do with this situation, you have muddied it up already. This place is for things DIRECTLY RELATED TO THE PROBLEM MENTIONED

On Sat, May 22, 2021, 7:45 AM Kaibenson @.***> wrote:

Hi Guys, i´ve checked the issue described above with wirecast too--- No way at all, i don´t believe how people could work with videowise at all. So please give us a chance to be surprised making obs more professional in. Additionally i would be very surprised if the coding team will integrate a solution to control the t-fader per remote. I know i can control the fader with the mousewheel on mouseover (oooh lord), but perfect would be a midi control function (usb) for connecting a fader controller or something like this (automation then possible and surely helpful). Regards Kai

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-846396460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXRKHMU7KHCN5ILCN4TURDTO6KNVANCNFSM4XDUZ63Q .

mackmcd commented 3 years ago

Gentlemen, I found a fix for mine. I used this site to confirm my ACTUAL refresh rate of my monitor. https://www.testufo.com/refreshrate Comes to 59.94xxx, rather than 60. Come in here, change this value from 60 to 59.94. Set game to 60 fps and vertical sync. Boom. Problem solved. No stuttering, no FPS drops after watching several minutes of footage. Even at 6000kbps in a Twitch VOD. Butter smooth.

Can't promise it'll work for all of you, but this is a night and day difference for me. Let me know if it works!! image

EDIT: To be clear, I have my main monitor set to a 60hz refresh rate in Nvidia control panel, so I'm not playing games at the up to 144hz I could be, but I'm fine with that, if my recordings/streams are smooth for my viewers.

Zakkaruu commented 3 years ago

I have done this in the past with no change unfortunately. I've also used CRU to force my monitor's refresh rate along with this setting with no change.

Adega-Studio commented 3 years ago

The update came, but the problem remained. I am disappointed(((.

fatmatrow commented 3 years ago

This update wasn't meant to fix the issue

On Thu, Jun 3, 2021, 10:52 AM Adega-Studio @.***> wrote:

The update came, but the problem remained. I am disappointed(((.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-853931081, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXRKHKMEIURW26VTADEPJLTQ6JKZANCNFSM4XDUZ63Q .

Adega-Studio commented 3 years ago

I hope the jerks will be removed soon, otherwise the races are completely unpleasant to stream (

hemarton commented 3 years ago

In my recent stream with cameras (through a Feelworld mixer) I set the mixer's output to 25 fps (I'm in Europe) and the video capture source also to 25 fps manually and no stutter appeared ever since. But for you gamers it's probably not too satisfying going that low.

On Wed, Jul 7, 2021, 10:26 Adega-Studio @.***> wrote:

I hope the jerks will be removed soon, otherwise the races are completely unpleasant to stream (

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-875401425, or unsubscribe https://github.com/notifications/unsubscribe-auth/APHTZZFEIVBJXEG5BR3YMNTTWQFURANCNFSM4XDUZ63Q .

Adega-Studio commented 3 years ago

I bought a new video card rtx 3070, and the problem is at the same level. There are no changes at all (. Already replaced all the hardware (The window capture also stutters stably, and the game capture stutters randomly (. Ready for any test from the developers. Monitor in range 60.004-60.002 fps (60.002850-60.002827 Hz)

Adega-Studio commented 2 years ago

hello, a long time has passed, and there is still no solution to the problem (. The authors of the program or other people show the recorded video 15 min by capturing the window through OBS Studio from this site https://www.testufo.com/stutter#demo=smooth&foreground=ffffff&background=000000&pps=720 . If indeed the problem is in my PC, then I will try a new mannequin board. iron has already changed everything for the new 2021.

fatmatrow commented 2 years ago

I wanted to provide an update: I upgraded my 3700x to a 5800x to eliminate the potential for ccx latency to be the culprit, and I'm still getting the stutter. I would really appreciate any info on possibilities for cause or work being done on this issue.

ENunn commented 2 years ago

I've been having this same issue since 2017 on two different machines with multiple capture cards. There has yet to be a fix. It doesn't matter what kind of PC you use or how powerful it is, it doesn't matter what capture card you use, it doesn't matter what settings you use, it doesn't matter if your OBS and capture card framerates are matched up, nothing matters. Looks like OBS has an inherent stuttering/duplicate frame issue with capture cards and it really needs to be fixed. It's very unfortunate that no one can pin point what's causing it the issue. I'd love to use OBS for recording stuff through my capture cards, however this issue prevents me from doing so.

For the PC gaming side of things with game/display capture, I've also noticed stutter on games that run at a 60fps cap. If the game has an unlocked framerate, I hardly notice any stutter.

fatmatrow commented 2 years ago

I've been having this same issue since 2017 on two different machines with multiple capture cards. There has yet to be a fix. It doesn't matter what kind of PC you use or how powerful it is, it doesn't matter what capture card you use, it doesn't matter what settings you use, it doesn't matter if your OBS and capture card framerates are matched up, nothing matters. Looks like OBS has an inherent stuttering/duplicate frame issue with capture cards and it really needs to be fixed. It's very unfortunate that no one can pin point what's causing it the issue. I'd love to use OBS for recording stuff through my capture cards, however this issue prevents me from doing so.

For the PC gaming side of things with game/display capture, I've also noticed stutter on games that run at a 60fps cap. If the game has an unlocked framerate, I hardly notice any stutter.

And its not just capture cards, even on single PC streaming with plenty of overhead and capturing a very basic thing, it just stutters after a bit. Im 2 computers and 3 processors deep with no solution to the problem

sleepshot commented 2 years ago

I just upgraded to Windows 10 from Windows 7. And obs ran smooth as ever. Just like everyone eles I'm having the same prob.and it only started when I upgraded to Windows 10. I can't find a fix. The closes thing to kinda working for my stream is making my 144hz moniter to 60hz and that kinda helps with the twitch vod. But very stuttery in the obs preview. People have been having this prob for years I really hope it's still getting looked into and fix

Fenrirthviti commented 2 years ago

Just to give a status update since there's been a lot of activity on this thread.

If there was a known issue that we could identify, we would have already fixed it. This issue only affects a very small number of people, but for the people it does affect it's very annoying. We don't have solid replication steps, and the data is varied and all over the place, which makes it hard for us to narrow in on anything specific and take action or do further investigation. Frankly, the likely culprit is some third party application or specific kind of hardware driver that is causing issues with OBS more than an issue with OBS itself, which makes this kind of troubleshooting even more difficult.

Things that would be helpful for tracking: Log files from a session where the preview stuttering occurred.

As far as I know, nobody in our immediate developer community has been able to replicate this issue with any regularity, which makes it even harder to debug.

It also doesn't help that people are reporting multiple unrelated issues to the original report. This report is about a very specific stuttering condition that is visible in the OBS preview itself. This has nothing to do with stuttering or lag that might show up in a resulting recording or stream, those are entirely support issues and should not be posted about here. Capture cards are also not related.

I do want to make one thing very clear though, this is a very rare occurrence. It is not common, and even in this thread most of the activity is from a handful of users who might not even be having the same issue and are attributing general performance issues and poor settings selection to this issue.

fatmatrow commented 2 years ago

Yeah the preview ALSO stutters. In fact, the preview stutter starts minutes before the output stutter starts. I've confirmed and mentioned this multiple times

On Thu, Sep 9, 2021, 11:04 AM Joel Bethke @.***> wrote:

If there's stuttering in the output, but the preview in OBS doesn't show it, then it's not related to this issue and should be reported to our forums or Discord for further investigation.

Not related to this specific issue. I am not saying there isn't another potential issue, I'm saying it's NOT RELATED TO THIS ISSUE.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-916183772, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXRKHMWYN7AGMDFYK2AXTTUBDEIHANCNFSM4XDUZ63Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Fenrirthviti commented 2 years ago

Cleaned up this thread of the off topic discussion.

If the preview in OBS is not showing the stuttering, it is not related to this issue and should be reported to our Discord or Forums.

If the preview is showing the stuttering, then please provide a log file of a session that the issue occurred. Any other off-topic discussions will be removed to keep this thread focused. This is not a forum, this is not a live chat, this is a GitHub Issue Report for a bug, keep the discussion on-topic.

mackmcd commented 2 years ago

Fair enough. My stuttering is in the preview and the recording. Everything I've said was on topic. And I will provide log files that show no problem yet again.

fatmatrow commented 2 years ago

I've been on topic the whole time. The stutter is in the preview as well, and I've provided multiple log files. The answer isn't in the logs. I've been using OBS since 2014. I know how to use the program and this dismissive attitude is concerning because there are no other viable options with feature parity.

On Thu, Sep 9, 2021, 11:07 AM Joel Bethke @.***> wrote:

Cleaned up this thread of the off topic discussion.

If the preview in OBS is not showing the stuttering, it is not related to this issue and should be reported to our Discord or Forums.

If the preview is showing the stuttering, then please provide a log file of a session that the issue occurred. Any other off-topic discussions will be removed to keep this thread focused. This is not a forum, this is not a live chat, this is a GitHub Issue Report for a bug, keep the discussion on-topic.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/obsproject/obs-studio/issues/4191#issuecomment-916186687, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXRKHMM5MQTNRX3NDNLPK3UBDEUBANCNFSM4XDUZ63Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Fenrirthviti commented 2 years ago

I've been on topic the whole time. The stutter is in the preview as well, and I've provided multiple log files. The answer isn't in the logs. I've been using OBS since 2014. I know how to use the program and this dismissive attitude is concerning because there are no other viable options with feature parity. On Thu, Sep 9, 2021, 11:07 AM Joel Bethke @.**> wrote: Cleaned up this thread of the off topic discussion. If the preview in OBS is not showing the stuttering, it is not related to this issue and should be reported to our Discord or Forums. If the preview is* showing the stuttering, then please provide a log file of a session that the issue occurred. Any other off-topic discussions will be removed to keep this thread focused. This is not a forum, this is not a live chat, this is a GitHub Issue Report for a bug, keep the discussion on-topic. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#4191 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXRKHMM5MQTNRX3NDNLPK3UBDEUBANCNFSM4XDUZ63Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I'm not dismissing anyone's comments, and the entirety of that discussion wasn't directed at you.

mackmcd commented 2 years ago

With all due respect, (and delete this too, if you must. There's no DM option that I can see) you straight up claimed this had nothing to do with stuttering appearing in recordings or streams. It 100% does. We pointed that out, you deleted our comments. You insist we just don't know what we're talking about, and are off-topic because our rigs aren't powerful enough, or our settings are wrong.

It was literally dismissive. Is there anything more dismissive than simply deleting our comments? You assume we haven't shared logs. You assume we haven't gone through the proper channels first. It was great to finally hear from a dev, but instead, you stream rolled over us with incorrect claims (has nothing to do with recordings) and assumptions. (that we didn't have stuttering in preview as well)

You plainly, demonstrably, and clearly were dismissive here. I don't blame you for being frustrated with many OTHERS above being offtopic, but @fatmatrow and myself are not those people. We've done our due diligence. We would just like to be heard, at least. Instead of brushed off as "off topic" and "incorrect".

Thanks.

EDIT: (to avoid more posts than necessary. Fenrirthviti is correct. I did make some impossible to prove claims. And that PR looks promising. Will be happy to test and report back with logs. Thanks for listening, sir/madam. And I apologize for my combative attitude as well.

Fenrirthviti commented 2 years ago

Sorry if I came off that way, it wasn't my intent. This goes both ways, as you were unnecessarily combative and kept pushing the wrong approach instead of just providing a log and straight confirming that the preview was also stuttering up front for you, and instead were focusing on the output and how "every streamer has this issue" which is impossible to determine if they have the preview stutter by watching the stream, so you did include a lot of off-topic and irrelevant discussion in your points. Either way, I'm issuing an apology for it, I hope you understand my standpoint as well. You were making a mountain out of a molehill here, and spreading misinformation about the issue and jumping to conclusions that you don't have nearly enough information to make a conclusion on. None of the discussion on either side helped push this issue forward, so it's been removed.

In any event, there was a PR that came out from the last time we tested this internally:

https://github.com/obsproject/obs-studio/pull/5029

Though this isn't ready and if this is indeed a solution it's not really going to be easy as there's potential drawbacks. Feel free to build locally and test with these changes and provide feedback, but theses are still a WIP.

EDIT: Also to clarify, that "fix" will only affect display capture sources, it won't help with anything else, so make sure testing is done in a reduced test case scenario (clean scene collection with a single display capture source pre-fix to replicate the issue, and then post-fix to verify it doesn't happen anymore).

Adega-Studio commented 2 years ago

Sorry if I came off that way, it wasn't my intent. This goes both ways, as you were unnecessarily combative and kept pushing the wrong approach instead of just providing a log and straight confirming that the preview was also stuttering up front for you, and instead were focusing on the output and how "every streamer has this issue" which is impossible to determine if they have the preview stutter by watching the stream, so you did include a lot of off-topic and irrelevant discussion in your points. Either way, I'm issuing an apology for it, I hope you understand my standpoint as well. You were making a mountain out of a molehill here, and spreading misinformation about the issue and jumping to conclusions that you don't have nearly enough information to make a conclusion on. None of the discussion on either side helped push this issue forward, so it's been removed.

In any event, there was a PR that came out from the last time we tested this internally:

5029

Though this isn't ready and if this is indeed a solution it's not really going to be easy as there's potential drawbacks. Feel free to build locally and test with these changes and provide feedback, but theses are still a WIP.

EDIT: Also to clarify, that "fix" will only affect display capture sources, it won't help with anything else, so make sure testing is done in a reduced test case scenario (clean scene collection with a single display capture source pre-fix to replicate the issue, and then post-fix to verify it doesn't happen anymore).

Hi. What is the test? And where can I get the files for the test? I want to help and permanently solve the problem with stuttering.

flaeri commented 2 years ago

@Adega-Studio

The reduced testing scenario Fenrir is talking about would be one where its light on resource usage (plenty of headroom for CPU, GPU and RAM). For instance: Blank/new scene collection. One capture method added that you believe has the problem. Do a test recording/stream, and make sure you can observe the stutter in the preview and in the output (stream or recording).

You need to ensure that the source you are capturing is in fact the same framerate (or higher) than your canvas framerate. That means if display capture, it needs to be 60hz or higher, capturing something on screen that runs at 60fps or higher. You should never be able to see any stuttering or issues on your monitor, and they should only appear in the preview + output.

It may present at different timings, so you may need to record/stream a couple of extra minutes after you observe the sutter in the preview before you will observe it in the output.

In my testing I've found that I experience the issue on the following sources:

Make sure you get a log after you've hit stop recording/streaming.

Gamer60446 commented 2 years ago

Hello. I've been trying to find the cause of this issue for the past 3 months without success.

My goal is to use a capture card to play console games on my computer. No matter what settings I use, the preview screen in OBS becomes choppy after a while and then goes back to normal. It's like a frame drop with some stutters that lasts around 30 seconds. It also doesn't matter if I'm recording or not. The same pattern repeats itself at random intervals which is between 1 and 5 minutes in my case. The choppiness is also present in the recording. I can also confirm that I'm getting the same result if I choose Window Capture while previewing a website like TestUFO so it's not specific to capture cards.

I've tried using Elgato 4k Capture Utility, Bandicam, and Streamlabs OBS. They all have the same choppiness from the preview. The only software which had minimal impact is AVerMedia RECentral. While the stutters were present, I had no frame drops at all. So, what's the difference between these applications? I could be wrong, but from my understanding RECentral is using DirectX 12 as the renderer while DirectX 9 and 11 is used in 4k Capture Utility and OBS respectively. I've tried to use OpenGL in OBS, but sadly nothing has improved.

While this list might be incomplete, this is what I remember doing to try to fix this issue.

Nothing from that list helped at all. Everything was tested with a Intel 9900k CPU, NVIDIA 2070 GPU, and 16GB DDR4 RAM with a ASUS ROG Maximus X Hero motherboard. I've found a way to change the behavior of this issue without fixing it, though. I've changed my refresh rate from 60 to 59.940 Hz directly from the Windows 10 settings. While the choppiness window lasts longer, it takes more time until I see one. Changing the refresh rate in OBS instead had no effect for me. For the people who own a UVC capture card, here is a workaround. There is a UWP application from the Windows Store called Capture View 4K. The preview was butter smooth with a 59.940 Hz refresh rate. I'm not an expert, but this most likely eliminates a hardware issue or my hardware is not playing well with a specific software.

I hope we can work together in trying to find the cause of the choppiness in OBS and I'm ready to do whatever is needed to achieve that. It really baffles me to read that not everyone is encountering this issue.

Thank you for reading.

flaeri commented 2 years ago

@Gamer60446 From my experience, just enabling the buffer (buffer: enabled) in the "video device capture" seems to solve issues like that.

I'm not saying this to invalidate your experience, just wanted to provide you with a solution for the dshow capture (video device capture). Not sure we should address dshow issues in this thread, seeing as we already have a buffering option for it.

Gamer60446 commented 2 years ago

I tried this already and it doesn't make the situation better or worse. Thank you for the suggestion, though.

flaeri commented 2 years ago

@Gamer60446 Are you certain? You see stuttering in the preview and in the output? I havent see a log posted from you yet from one of the sessions where this has happened. It would be very nice if you could post one from when this has happened. Make sure you tripple check that this is from a session where you got stuttering in preview+output.

I dont want this thread to turn into a support thread, as stuff like that should happen on the discord or the forums.

Gamer60446 commented 2 years ago

This is the log file. I forgot to upload one. Sorry about that. Buffering is on and the preview is stuttering with frame drops.

https://obsproject.com/logs/kXl5r2oXnZCM2Az7

flaeri commented 2 years ago

@Gamer60446 I can still think of quite a few items that would be nice to rule out. Would you be willing to pop into the discord server and run thru a couple of those items with me? Feel free to ping when you've got some time (Flaeri on discord as well). https://obsproject.com/discord We want to keep this thread as compact and short as possible for readability, and being able to more easily track it, logs, hardware etc. Thank you, and I hope you understand :)

Edit: We did und up running thru a couple of items, and after taking care of a few things, and testing again. Dshow did stutter in the preview, but not in the output. (logs confirmed no render nor encoding lag)

Gamer60446 commented 2 years ago

I was told to also post the logs from the UFO Test Window Capture.

https://obsproject.com/logs/8jdBsXnsR0L3U4sI

As a bonus, here is a video of it in action where it becomes choppy for a few seconds in both the preview and recording.

https://cdn.discordapp.com/attachments/374636015396192257/885946634993795092/2021-09-10_13-38-46.mkv

Adega-Studio commented 2 years ago

Window Capture regularly stutters every 6 minutes for 20 seconds. Why is this happening? Game capture is supported even more often. Here is a test video recorded in obs through window capturing • Timecode of start and end of stuttering: from 3:05 to 3:25 and so regularly (. https://www.youtube.com/watch?v=1i7cR6pfiww&feature=emb_logo File log https://obsproject.com/logs/BOnmFdIpwNUHFYr-

sleepshot commented 2 years ago

(possiable fix? worked for me so far. i believe lol)So after alot of looking around and testing things. i found that putting my 144hz moniter in 60hz made the stutterin OBS preveiw not happen anywhere as much but still had mad FPS dorp ingame. yesterday i tryed a few other things and one was adding OBS to the fire wall and finding the game im playing in the steam folder and going to compatbilty tab and checking disable full screen optimization box. has fixed the obs video preveiw i believe 100%.im on day 2 of testing. and the games FPS mad drops have seem to be fixed as well. i still get frame drops but im on an gtx970 with an i5 streaming scum. so thats going to happe. i hope this works for yall. let me know

Adega-Studio commented 2 years ago

New test. New motherboard B 550, new video card rtx 3070, clean windows 10, clean installation of obs, replacement of memory, replacement of the processor, replacement of the power supply. Monitor 60Hz, obs 60Hz. The preview twitches regularly, and the recording is very visible starting from 6.27 in time. Log https://obsproject.com/logs/lCcxLX7f01RESS7w video https://youtu.be/84v3py8eouY