Question / Help OBS Input Lag/Duplicate Frames While Open

interspool

New Member
Hello all! First I've scoured the internet for answers on this. It's the last issue I need to iron out before I consider my OBS/Stream settings "Perfect".

System Specs:
Ryzen 1700X @ 3.8ghz
3200mhz CL16 Memory
GTX 1080
Dell 144hz 1440p Monitor

The Problem: It's very subtle, but there is a noticeable amount of input lag and frame duplication on my screen in game any time I have OBS open. The effect manifests as something similar to screen tearing (even on Gsync monitor) and a slightly mushy mouse feel. I want to be clear, this happens even while NOT streaming and NOT recording. OBS can be idle, with Preview OFF and it's still happening. CPU overhead and GPU usage are nowhere near maxed out, and I could be well over 200fps and the issue is still there.

Things I have tried:
Putting OBS in Taskbar and on Main Monitor
Literally ALL NVENC and x264 Presets
Enabling/Disabling Preview
Game Capture vs. Display Capture Modes

My Conclusions:
It seems the people who say OBS Studio forcing a constant frame rate (CFR) ( this guy made a video: https://www.youtube.com/watch?v=pAFIPj2f9YM ) are onto something. Also it's well known that Shadowplay can record/stream without this issue as well using the same NVENC encoding option that OBS utilizes. I have used NVENC and really enjoy that option because of the very low CPU usage in-game. When you have a 144hz monitor you want all the frames you can get in a fast paced shooter. But, throwing more frames at it only puts a band aid on the issue. If I manage to drop below 100fps in-game it becomes almost unplayable. I think there is some syncing issue with OBS and the constant frame rate.

Is there any way to utilize Shadowplay's "secret sauce" through OBS so that it does not cause this issue? I'd be happy to stream using NVENC as I think it looks decent in 720p60 @ 6000kbps. I just want the input lag to go away. x264 would be even better. Thanks!
 

Boildown

Active Member
Cap your framerate at something reasonable, sounds like you're overloading the GPU. OBS needs GPU time to speed up encoding and when you allow your games to run at unlimited framerates, problems happen. So turn vsync on or use a frame limiter or some sort.

Also, G-Sync can be a problem for OBS, as video encoding with random intervals between frames is problematic.
 

interspool

New Member
Thank you Boildown and I 100% agree with all you've said. Unlimited frames was definitely messing with my consistency. I don't know if OBS/GPU encoding time has anything to do with it but AT LEAST it's given me a consistent mouse feel to play on and my confidence in-game is coming back. I wish someone could reverse engineer Shadowplay's ability to directly access the frame buffer and create a plugin for OBS. I don't know how much it's actually affecting the game to have OBS open but I'd estimate somewhere in the ballpark of 3-5ms additional input lag along with some interesting frame duplications as it polls your screen 60 times a second to capture the image.

The Fix: Anyway, I streamed all day at 120fps cap and 160fps cap and they were both a pleasure to use. If I cap in-game at 144fps it's right at the line of my monitor and actually creates its own tearing effect right in the center of my screen which I consider unplayable, so I choose to go a little above or a little below it.

Also something worth noting, while capping at 120fps and streaming in 60fps it gives a very very consistent frame time and the camera panning and movement in the stream is fluid unlike I've seen before. It's VERY pleasing to the eye to watch.
Example 120fps cap: https://clips.twitch.tv/AstuteSpikyHerringAliens

Example 160fps cap: https://clips.twitch.tv/DiligentCallousTurnipFrankerZ

Current OBS settings:
Base - 2560x1440, Output 1280x720 @ 60fps, BiCubic
settings.jpg


Conclusion:
I'm becoming very happy with this setup both in terms of stream quality with VERY low impact to my machine (thanks NVENC + 6000kbps upload) and in terms of playability. Everyone wants to see 300fps on their monitor and the accompanying LOW input lag, but they don't realize when the game decides to dip down to 120fps for a fraction of a second it's throwing all of their shots off especially when you add OBS into the mix. To completely eliminate input lag one must use a capture card it's really that simple. OBS in its current state cannot completely eliminate the input lag (nor with NDI plugin it looks like) and Shadowplay is not a real option. Frame capping is a realistic way for an all-in-one streaming PC to get by and have very good results IMO.
 
Top