obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

Preview Stutter that appears in Streams/Recordings

Open Zakkaruu opened this issue 4 years ago • 184 comments

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

Zakkaruu avatar Feb 04 '21 22:02 Zakkaruu

Potential duplicate of #4117? I am unable to replicate either situation, I suspect this is a system/environment issue more than an OBS issue. However, I am just one test case, if there are others who can test and attempt to replicate that would be helpful to narrowing down what might be going on.

Fenrirthviti avatar Feb 04 '21 22:02 Fenrirthviti

I forgot to post timestamps for the first recording. It first occurs right at the beginning, and then again around 2:20.

Zakkaruu avatar Feb 04 '21 22:02 Zakkaruu

I confirm and 3 of my friends with different hardware and all have almost the same stuttering. As in my post on the video. I changed everything in my PC and the result is the same. I'm sure 98% this is OBS and 2% my monitor, did not change.

Adega-Studio avatar Feb 05 '21 13:02 Adega-Studio

A few of our support team were able to replicate, but I can't make any promises in to how long it will be until we can devote time to digging in to what the cause of this might be, as it doesn't seem to affect everyone.

Fenrirthviti avatar Feb 05 '21 17:02 Fenrirthviti

This is for everyone, but not everyone writes about the problem.

Adega-Studio avatar Feb 05 '21 18:02 Adega-Studio

I understand, thank you all for looking into this.

Zakkaruu avatar Feb 05 '21 18:02 Zakkaruu

I'm also having this problem on 2 separate computers. Also willing to contribute whatever is needed

fatmatrow avatar Feb 06 '21 18:02 fatmatrow

A few of our support team were able to replicate, but I can't make any promises in to how long it will be until we can devote time to digging in to what the cause of this might be, as it doesn't seem to affect everyone.

I have two computers with the issue, I'm willing to run whatever tests etc are needed, I have the free time.

fatmatrow avatar Feb 06 '21 20:02 fatmatrow

If you're able to reproduce this issue, please include a session log. While it won't provide any details about the actual source having issues, it'll help us determine what combinations of hardware are more likely to have the issue.

WizardCM avatar Feb 06 '21 23:02 WizardCM

alrighty, I'll do one either later tonight or tomorrow. For a heads up, I'm on a 3700x with a 3060ti and a 1700x with a 1070

On Sat, Feb 6, 2021, 6:09 PM Matt Gajownik [email protected] wrote:

If you're able to reproduce this issue, please include a session log. While it won't provide any details about the actual source having issues, it'll help us determine what combinations of hardware are more likely to have the 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-774557345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXRKHJEQFZICGS3XCB5E23S5XD4LANCNFSM4XDUZ63Q .

fatmatrow avatar Feb 06 '21 23:02 fatmatrow

If you're able to reproduce this issue, please include a session log. While it won't provide any details about the actual source having issues, it'll help us determine what combinations of hardware are more likely to have the issue.

https://obsproject.com/logs/5ReRr6FDButiGDIV

fatmatrow avatar Feb 07 '21 00:02 fatmatrow

A few of our support team were able to replicate, but I can't make any promises in to how long it will be until we can devote time to digging in to what the cause of this might be, as it doesn't seem to affect everyone. Hi. If you could create a problem, tell me how? Maybe there is a chance to temporarily fix it before the global update.

Adega-Studio avatar Feb 08 '21 17:02 Adega-Studio

there's no way to force the problem to happen, other than having obs open for 20-50 minutes. It seems to happen somewhere in the pipeline between obs receiving the frames and the preview and output flips, and it affects them independent of each other at first, always in the preview first, then after a few minutes it'll hit the output flip.

On Mon, Feb 8, 2021, 12:35 PM Adega-Studio [email protected] wrote:

A few of our support team were able to replicate, but I can't make any promises in to how long it will be until we can devote time to digging in to what the cause of this might be, as it doesn't seem to affect everyone. Hi. If you could create a problem, tell me how? Maybe there is a chance to temporarily fix it before the global update.

— 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-775316623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXRKHK462VI2X3J5FWTLFLS6AOHTANCNFSM4XDUZ63Q .

fatmatrow avatar Feb 08 '21 20:02 fatmatrow

So everybody seeing this has both a Zen CPU and a Nvidia GPU? Does anybody with an Intel CPU and/or a AMD/Intel GPU see this issue?

energizerfellow avatar Feb 08 '21 23:02 energizerfellow

So everybody seeing this has both a Zen CPU and a Nvidia GPU? Does anybody with an Intel CPU and/or a AMD/Intel GPU see this issue?

The third and fourth log in my OP are two instances of Intel with nVidia GPU. https://github.com/obsproject/obs-studio/files/5930046/2021-02-04.19-56-16.txt https://github.com/obsproject/obs-studio/files/5930276/2021-02-04.21-13-15.txt

Sorry for all the edits.

Zakkaruu avatar Feb 09 '21 00:02 Zakkaruu

Feels like a 30 fps drop when capturing while recording or streaming at 60 fps. I have exactly 6 minutes smoothly in time, then 10 seconds with jerks and again 6 minutes smoothly and so on in a circle.

Adega-Studio avatar Feb 09 '21 05:02 Adega-Studio

Feels like a 30 fps drop when capturing while recording or streaming at 60 fps. I have exactly 6 minutes smoothly in time, then 10 seconds with jerks and again 6 minutes smoothly and so on in a circle.

Similar to what I get, the timing is different and random for me--doesn't seem to be on a cycle.

I had tried to lower the fps to 30 in the video settings, but even 30fps feels like it shudders occasionally..it looks different than "normal" 30 fps.

Edit: I went back and timed (on one system) how long it takes for the stutter to occur. In the first run, it took 7m 36s--but in the second run it took 1m 28s.

One thing I noticed is that the use of the Start Menu makes the stutter disappear if the preview is already stuttering. This behavior is not unique to Display Capture, but can be done with Game/Window capture as well.

If the preview is perfectly smooth, sometimes using the Start Menu can cause a fraction of a second stutter, sometimes it causes the regular heavy stuttering.

In this testing, I tried killing the StartMenuExperience.exe process and renaming the C:\Windows\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy folder to prevent it from starting. The stutter still appeared, but I could no longer use the start menu to affect it.

Zakkaruu avatar Feb 09 '21 05:02 Zakkaruu

I also tried 30 Fps and different resolution but does not cure the problem. I've tried everything. Other programs record smooth video, which means that the problem is even in the OBS.

Adega-Studio avatar Feb 10 '21 03:02 Adega-Studio

I've been having what appears to be very similar stuttering issues ever since I started out trying to use OBS with a single PC setup. Under normal circumstances it will blip occasionally (producing a duplicate frame in the recording when examined frame-by-frame), sometimes it will be more severe as if it drops to 30 fps capturing for minutes at a time. This is with game, window and display captures. I haven't had responses on Discord yet.

Example log: https://obsproject.com/tools/analyzer?log_url=https%3A%2F%2Fobsproject.com%2Flogs%2FyiVckWVqAnIeaRlI

The logs above will show that the two monitors in use are both at 60 hz but, in addition, I've also used CRU to fine-tune both monitors to as close to 60 hz as I can get as reported by displayhz.com.

For me at least, to try and rule out rendering or encoding issues, I put a basic text overlay with a scroll filter over the capture. I rarely (if ever) see the text scroll stutter, only the capture source. So in my case I'm almost certain it's isolated to something capture-related.

I've found for me that switching between scenes of capture sources temporarily alleviates the issue: for example, if game capture starts to stutter severely, I can swap to a scene featuring display capture which is unaffected (swapping back immediately confirms that game capture remains affected so the scene-swap itself does nothing), and vice-versa swapping back to game capture once display capture exhibits symptoms as well. Though sometimes both will be simultaneously affected.

gwilym avatar Feb 11 '21 22:02 gwilym

У меня такая же проблема! Спустя 10-15 минут происходят заикания. И так продолжается весь стрим время от времени.

evgen70rus avatar Feb 12 '21 22:02 evgen70rus

Потверждаю о проблеме и заикания на видео.

Karamaz561 avatar Feb 15 '21 13:02 Karamaz561

Feels like a 30 fps drop when capturing while recording or streaming at 60 fps. I have exactly 6 minutes smoothly in time, then 10 seconds with jerks and again 6 minutes smoothly and so on in a circle.

Similar to what I get, the timing is different and random for me--doesn't seem to be on a cycle.

I had tried to lower the fps to 30 in the video settings, but even 30fps feels like it shudders occasionally..it looks different than "normal" 30 fps.

Edit: I went back and timed (on one system) how long it takes for the stutter to occur. In the first run, it took 7m 36s--but in the second run it took 1m 28s.

One thing I noticed is that the use of the Start Menu makes the stutter disappear if the preview is already stuttering. This behavior is not unique to Display Capture, but can be done with Game/Window capture as well.

If the preview is perfectly smooth, sometimes using the Start Menu can cause a fraction of a second stutter, sometimes it causes the regular heavy stuttering.

In this testing, I tried killing the StartMenuExperience.exe process and renaming the C:\Windows\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy folder to prevent it from starting. The stutter still appeared, but I could no longer use the start menu to affect it.

I can recreate this issue and I have a video of it

fatmatrow avatar Feb 18 '21 03:02 fatmatrow

themanmaran has contributed $75.00 to this issue on Rysolv.

The total bounty is now $75.00. Solve this issue on Rysolv to earn this bounty.

rysolv-bot avatar Feb 19 '21 20:02 rysolv-bot

achmetha has contributed $75.00 to this issue on Rysolv.

The total bounty is now $150.00. Solve this issue on Rysolv to earn this bounty.

rysolv-bot avatar Feb 19 '21 20:02 rysolv-bot

FYI: I have blocked rysolv-bot from the repo for the time being, as Rysolv not a service we endorse at this time (the bot posting here was the first our team has heard of the service). If and when we decide to implement a bounty system, we will make a public announcement.

You're within your rights to give your money to whoever you want for whatever reason, but just know that, as of this posting, the OBS Project developers have absolutely no control over anything on Rysolv's website or bounty fund, including the listed OBS Project organization. We are currently working to rectify this.

dodgepong avatar Feb 19 '21 21:02 dodgepong

Curious to know if a solution has been found

Adega-Studio avatar Feb 28 '21 19:02 Adega-Studio

Curious to know if a solution has been found

I don't even think the cause has been found let alone a solution

fatmatrow avatar Feb 28 '21 20:02 fatmatrow

When the preview itself stutters and that stutter makes it onto the recording, it's almost always render lag. This is often caused by OBS and say, a game, fighting over rendering priority with OBS losing most of the time. On Windows at least, we have a solution for that, but it requires running the program as administrator. If you could try again while running the program as administrator and see if you reproduce the same effect there, that'd probably be useful to note.

jp9000 avatar Mar 01 '21 15:03 jp9000

When the preview itself stutters and that stutter makes it onto the recording, it's almost always render lag. This is often caused by OBS and say, a game, fighting over rendering priority with OBS losing most of the time. On Windows at least, we have a solution for that, but it requires running the program as administrator. If you could try again while running the program as administrator and see if you reproduce the same effect there, that'd probably be useful to note.

Have tried. Nothing helps.

Adega-Studio avatar Mar 01 '21 17:03 Adega-Studio

In my tests, I made sure to run as administrator, but unfortunately the behavior stills persists. It's bizarre, because the behavior appears whether I am in a resource intensive game, or sitting on the desktop with only Firefox and OBS running (as in the recordings).

I did some more testing and this behavior seems to show when using Direct3D 11 as the renderer in OBS. Using the --allow-opengl launch parameter, I changed to the OpenGL, and could not get the stutter/shudder to appear to the extremes as in the provided videos. I'm going to continue to test to see if the behavior appears, but so far it does not. Unfortunately, OpenGL on Windows does not have feature parity resulting in Game Capture artifacts and reduced performance overall, so it wouldn't be a suitable workaround.

One difference, is that the OBS fps counter in the bottom right, actually acknowledged that the FPS was dropping when I used the Start Menu to try and force some stutter. Previously, OBS would have the counter remain at 60fps solid no matter if there was stutter or not.

Zakkaruu avatar Mar 01 '21 17:03 Zakkaruu