Bug Report Input Lag

Status
Not open for further replies.

Lange

Member
I'd like to preface this thread by saying I am incredibly impressed by OBS. It already does everything I want and the quality and performance are both superior to XSplit.

However, there does seem to be some kind of input lag for me when using OBS. It could either be straight-up input lag, or maybe network lag of some kind being caused by OBS. Regardless, when I play games while streaming with OBS, there is a slight but definite delay between my inputs and the actions on screen. I am a high-level FPS player, and this delay makes games almost unplayable for me. When I use XSplit, the input lag disappears and everything feels as it should.

I tried to measure the input lag by recording my mouse and my monitor with a video camera, but unfortunately I do not have a camera with a high enough framerate to accurately measure this. Sadly, this means I have no real measurement of how much lag there is, and you'll just have to trust me.

I then thought that maybe it is just a network problem, so I reduced my bitrate in OBS from 2000 to 1700. (My max upload is ~3000). This did not alleviate the problem. My settings in XSplit are identical or higher, and do not result in any input lag.

Some information on my streaming setup:
3Mbit upload
Intel i7-920 @ 3.6 GHz
30 fps stream/2000 bitrate (also tried 1700 and lower)
960x600 stream resolution
DXtory capture

I vastly prefer OBS to XSplit, and would like to keep using it and be able to recommend it to all my friends. If there is anything you need from me to aid in investigating this problem, I will gladly help.
 

R1CH

Forum Admin
Developer
Make sure your pre-rendering is set to 1 frame if you use an nvidia card and that vsync is off. With DXtory capture, OBS shouldn't be using any GDI functions so it's unlikely that it could cause input lag just by running. There may be resource contention with the GPU, but this shouldn't' be noticeable. What video card are you using? Also try using only file recording to eliminate any suspicion on the network.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
You mean stream audio/video sync? If so, this will be fixed in the next version, there's a slight sync delay that I didn't account for due to the fact that audio takes a bit longer to start up than I expected.

If you mean my app is have affect on -your- input, that feels very strange. Try messing with the v-sync (on or off) and see if it changes anything in your game. Otherwise, hm. That would be very strange. Nggh, dxtory/fullscreen games. I really need to make my own fullscreen capture alternative to dxtory.
 

Lange

Member
The audio/video sync is fine, it has an actual affect on my inputs.

My pre-rendering was set to "Application-Controlled", so I forced it to "1". That may help a bit. I already play with VSync off in all games. My video card is an NVidia GTX 680, and my monitor is a 120Hz Samsung 2233Rz (confirmed running at 120Hz).

I should also note that I don't play in fullscreen for the game I'm mostly concerned about, Team Fortress 2. I play in a borderless window at my native resolution, but I still use DXtory for performance and privacy reasons.

I've gotten my hands on a camera capable of recording at 60 fps, so I'll try to do some objective measurements of input lag within the next few days.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
You don't have to record it, I believe you.

I wouldn't be surprised if this was caused by DXtory. If you're playing with the borderless window, could you try without DXtory? Using my built in software capture? If by privacy you mean viewers being able to see your other windows, "window capture" in my software capture allows you to capture -only- the TF2 window as long as aero is enabled. I would highly recommend trying it out instead of DXtory, and seeing how it works.

You see, the reason DXtory could be causing the problem is because it has to copy the image off the GPU to the CPU, send it to my app inter-process through DirectShow, then my app has to put it back on the GPU to further process it with any overlays and such, and then it has to copy it off the CPU again when complete. This is why I'm going to be writing a DXtory alternative at some point. With DXtory, you go GPU->CPU->GPU->CPU -- it causes some rather bad problems for the bus, especially at high framerates, so I don't doubt this may be causing you problems.
 

Lange

Member
Okay, I'll try it with the built-in OBS capture method.

Again though, the weird part is that I have no input lag when using XSplit and DXtory, its only with OBS.

And the recording is more for my own measurements than anything. It's an incredibly slight delay, and I'd like to be able to remove my own perception and expectations from my testing.
 

Lange

Member
Switching to Window Capture w/ Aero on and lowering the Send Buffer Size to 4096 appears to have greatly reduced my input lag issues. :]
 

cKy

New Member
Just want to say that this is a great little forum post, I will try this later as I seem to have the same issue when playing FPS games.
 

Vattonito

New Member
So I am having a similar issue on my Mac. When I use the display capture source I don't get any input lag from my device I am playing my game from. When I use the window capture source, I get a delay in the input and output of my movements, which causes choppy framerate in stream. But with the display capture there is no input lag.
 
Status
Not open for further replies.
Top