Monitor capture lags/jitters at regular intervals

Dlfade

New Member
I'm posting this here because I think it must be looked right into the code, I've tried everything and there's no logical explanation. So it's not a problem of settings or configuration, it's something at a deeper level.

I have a pretty decent hardware (i7 4770k, 16Gb ram, 1080 GTX) and simply trying to capture the monitor (monitor capture). The problem surfaces in OBS preview window, so even without actually recording anything.

I use this website that displays an image scrolling on screen, so that I can easily spot when OBS starts to skip frames (or I can quickly skip through a recorded video to find the moment where it starts): http://www.vsynctester.com/

I have set my monitor at 50Hz (I usually use two monitors, but for the sake of testing I disabled the other one), what happens is that every about 15 minutes OBS starts to drop frames, it starts stuttering here and there, then it becomes a very heavy stutter, until it pick up again and returns being smooth as before. This "cycle", from the first few stutters till it's smooth again, takes about 2 minutes.

This REGULARLY repeats every 15 minutes. OBS is silky smooth for about 15 minutes, begins stuttering for 2, and then smooth again for another 15m.

Of course if I record the video these stutters are shown in the recorded video too, but as I said the stuttering is shown even when OBS is idle and simply looking at its preview that is on by default.

And, of course, I monitored this while keeping the browser visible in the background, so I can confirm that when OBS stutters the actual source stays always smooth.

Nothing in OBS settings seems to change anything. The only thing that has an impact on this weird behavior is that if I set my monitor to 25Hz instead of 50, then the cycle is doubled. It's smooth for about half an hour, stutters for 4 minutes, and then gets smooth again.

Consider also that I've had this problem since forever and nothing has fixed or modified it. I've moved from OBS Classic to the latest without any change. I've changed drivers, I moved from a GTX 770 to a 1080. OBS has always shown this problem and I'm still here trying to figure out why I have this periodic stutter.

It also happens regardless of the browser tested (I've tried Edge, Chrome and Firefox).

I'd be really glad if someone could help me.

I don't think you need any log file, since as I said this problem is shown even when not encoding. It's OBS that has periodic desyncs with the monitor capture, for no apparent reason.
 

Dlfade

New Member
I have an update that might help narrow down the bug, or whatever it is.

I was testing the same website linked above using the "browser source" plugin instead of the "monitor capture".

I expected a similar behavior and in fact I started seeing the preview lagging. Only it was lagging in a different way since it seemed just to duplicate every odd frame (it's quite easy to see because that website has the word "vsync" flashing, and if it starts duplicating frames you then see a solid color instead of the grey flickering). It didn't have the progression toward heavy stuttering, it just started to duplicate every framerate and kept doing that for about two minutes, as above.

The REALLY weird thing is that when I checked the recorded video it was perfect. There was no stutter at all. This never happened with the "monitor capture", I had the stutter in the encoded video in the exact same way it could be seen in the preview.

So, for some reason the "browser source" produces a similar stutter in the OBS preview. But the encoded video is perfect.
 
Top