Question / Help No Reason For Lag, But It's There

Montiago

Member
My log: https://gist.github.com/657de0973ee1507f5802087f1511ea2b

My build:

i7 6700k (haven't overclocked yet)
Corsair H100i v2
16GB DDR4 3000mHz
Evga GTX 1070 FTW (haven't overclocked yet)
Speedtest: http://www.speedtest.net/result/6072809156.png
Primary monitor: 24inch 1080p 144hz
Secondary monitor: 24inch 1080p 60hz

I've tried both x264 and NVENC settings.

In game, I achieve over 60fps. Even though I have OBS set to record at 60fps, I can see the fps on my OBS window go from anywhere between 50-58. Results in a stuttery mp4 in the end. Last game I tried recording was AC Syndicate. Can play it on Ultra with no issues. Decided to bring the graphics quality down, still maintained above 60 fps in game, but OBS was laggy.

Please help :/
 
You are having some minor CPU load issues:
20:42:33.681: Output 'adv_file_output': Number of skipped frames due to encoding lag: 44 (0.0%)
And some GPU load issues:
20:42:33.681: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 12003 (9.3%)

Try capping your in-game fps to 60fps (If using V-Sync, will introduce Input Lag, potentially) or 61-63 (If using MSI AfterBurner/EVGA Precision, etc) This should help free up some CPU & GPU resources.

No idea what the below error is as I haven't come across it before, seems to resolve itself and manage to hook into ACS:
20:01:04.584: [game-capture: 'The Game'] attempting to hook process: ACS.exe
20:01:04.587: [game-capture: 'The Game'] init_pipe: failed to start pipe

Context of that error is from:
static inline bool init_pipe(struct game_capture *gc)
{
char name[64];
sprintf(name, "%s%lu", PIPE_NAME, gc->process_id);
if (!ipc_pipe_server_start(&gc->pipe, name, pipe_log, gc)) {
warn("init_pipe: failed to start pipe");
return false;
}
Taken from github resource:
https://github.com/jp9000/obs-studio/blob/master/plugins/win-capture/game-capture.c
One for the devs to enlighten as it is way over my head!

Side note: Very nice PC setup you have, why no overclocking though?
 
Strange to have cpu overload given the cpu isnt doing the encoding as this is set to nvenc. Can you post a log when using x264 software also.

try using one monitor also

Primary monitor: 24inch 1080p 144hz
Secondary monitor: 24inch 1080p 60hz

see if that removes the lag and help pin point something to begin looking at as the cause. I presume obs is in the 60mhz montior as a preview?

If the pc is a new build also check all the drivers are up to date etc.
 

Osiris

Active Member
Well, skipped frames are only CPU overload if you are using a encoder that encodes using the CPU.
 

Montiago

Member
You are having some minor CPU load issues:
20:42:33.681: Output 'adv_file_output': Number of skipped frames due to encoding lag: 44 (0.0%)
And some GPU load issues:
20:42:33.681: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 12003 (9.3%)

Try capping your in-game fps to 60fps (If using V-Sync, will introduce Input Lag, potentially) or 61-63 (If using MSI AfterBurner/EVGA Precision, etc) This should help free up some CPU & GPU resources.

No idea what the below error is as I haven't come across it before, seems to resolve itself and manage to hook into ACS:
20:01:04.584: [game-capture: 'The Game'] attempting to hook process: ACS.exe
20:01:04.587: [game-capture: 'The Game'] init_pipe: failed to start pipe

Context of that error is from:
static inline bool init_pipe(struct game_capture *gc)
{
char name[64];
sprintf(name, "%s%lu", PIPE_NAME, gc->process_id);
if (!ipc_pipe_server_start(&gc->pipe, name, pipe_log, gc)) {
warn("init_pipe: failed to start pipe");
return false;
}
Taken from github resource:
https://github.com/jp9000/obs-studio/blob/master/plugins/win-capture/game-capture.c
One for the devs to enlighten as it is way over my head!

Side note: Very nice PC setup you have, why no overclocking though?


Hmm, weird that I'm having CPU load. I haven't done anything CPU intensive on the build yet (it's just a couple of weeks old). I'll check the background applications and see if anything is taking away from it. Or maybe, I could set the Process Priority to Above Normal or High?

Side note: Mostly because I haven't done it before on an Intel CPU yet. I'll definitely be getting into it. 1st priority was configuring OBS properly.
 

Montiago

Member
Strange to have cpu overload given the cpu isnt doing the encoding as this is set to nvenc. Can you post a log when using x264 software also.

try using one monitor also

Primary monitor: 24inch 1080p 144hz
Secondary monitor: 24inch 1080p 60hz

see if that removes the lag and help pin point something to begin looking at as the cause. I presume obs is in the 60mhz montior as a preview?

If the pc is a new build also check all the drivers are up to date etc.

Sure, I can do that once I get home. At work at the moment :)

Yeah, my secondary monitor houses OBS, Teamspeak, Chrome, etc.

Drivers are up to date :)
 
I get CPU encoding load lag on near to full multiplayer servers whilst playing BF4 whilst using AMD AMF encoder plugin made available by @Xaymar. It is inherent when OBS becomes starved for resources whilst gaming.

08:33:53.139: Output 'adv_file_output': Total encoded frames: 44709
08:33:53.140: Output 'adv_file_output': Total drawn frames: 44713
08:33:53.140: Output 'adv_file_output': Number of skipped frames due to encoding lag: 19 (0.0%)

Above lines in logfile outputs are individual to recording/streaming sessions.

That being said, you have a great PC setup which is far more capable than my i5 2500 non-k coupled with an r9 290x so only thing I could put it down to is your resolution, in-game settings or fps being too high.

Being you have a 1070 with 3000 MHz RAM you shouldn't have any sort of GPU bottleneck (Higher speed RAM allows for smoother data transfer between CPU & GPU, particularly for latest graphic card models) though some things to consider:
Capping your FPS in-game, better to do so with MSI AfterBurner or EVGA Precision (Capping to 61-63 helps with minimizing potential screen tear for 60Hz monitors without introducing Input Lag as you get from V-Sync)
Things to look at is Anti-Aliasing, Shadows, Lighting, Particle effects, Post-Processing effects (Some such as bloom could be placed higher in list) Player/Non-Player Character textures, Environment textures, generally in that order for lessening GPU load.

To note: Frame-time is more important to smooth game play just the same as it is for smooth recording:
10:10:11.416: obs_video_thread(16.6667 ms): min=0.204 ms, median=1.167 ms, max=439.13 ms, 99th percentile=2.116 ms, 99.9952% below 16.667 ms
General overview of frame time for entire video/stream output via OBS, number in brackets is relative to ms response time needed for correct display at particular refresh rate - Link below for more info.
10:10:11.416: ┣tick_sources: min=0 ms, median=0.007 ms, max=437.813 ms, 99th percentile=0.049 ms
This is an overview of your encoder highlighting the frames for encoding then transmitting the data within those frames for rendering.
10:10:11.416: ┣render_displays: min=0.001 ms, median=0.089 ms, max=17.105 ms, 99th percentile=0.463 ms
This is an overview of the time taken for your encoder to rendering the frames it has grabbed using OBS Studio encoder specific settings.
10:10:11.416: ┗output_frame: min=0.201 ms, median=1.055 ms, max=11.492 ms, 99th percentile=1.741 ms
This is an overview of the time taken to process video file output.
10:10:11.416: ┣gs_context(video->graphics): min=0.088 ms, median=0.247 ms, max=10.082 ms, 99th percentile=0.46 ms
General overview of workload done by OBS Studio encoder for rendering the file and output of file.
10:10:11.416: ┃ ┣render_video: min=0.03 ms, median=0.057 ms, max=5.394 ms, 99th percentile=0.2 ms
General overview of workload to render video file within OBS Studio.
10:10:11.416: ┃ ┃ ┣render_main_texture: min=0.003 ms, median=0.004 ms, max=1.64 ms, 99th percentile=0.015 ms
OBS Studio rendering frames from base resolution setting (?)
10:10:11.416: ┃ ┃ ┣render_output_texture: min=0.002 ms, median=0.014 ms, max=3.255 ms, 99th percentile=0.055 ms
OBS Studio converting frames to output resolution scale settings (?)
10:10:11.416: ┃ ┃ ┣render_convert_texture: min=0.001 ms, median=0.009 ms, max=1.662 ms, 99th percentile=0.03 ms
OBS Studio converting frames via Colour Space settings (?)
10:10:11.416: ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.024 ms, max=5.364 ms, 99th percentile=0.116 ms
OBS Studio compressing frames using encoder specific settings (?)
10:10:11.416: ┃ ┣download_frame: min=0 ms, median=0.011 ms, max=4.837 ms, 99th percentile=0.116 ms
OBS Studio output frames to container (?) <--- If max frame time is above your relative ms for fps ratio here, you get lag /stuttering/fps issues in recordings/streams.
10:10:11.416: ┃ ┗gs_flush: min=0.011 ms, median=0.175 ms, max=9.586 ms, 99th percentile=0.333 ms
OBS Studio flushing buffer for next frame.
10:10:11.416: ┗output_video_data: min=0.624 ms, median=0.807 ms, max=8.503 ms, 99th percentile=1.349 ms
OBS Studio video output to container (?)

http://www.neogaf.com/forum/showthread.php?t=512976 <--- Interesting read for frame time info.

To note: I was already in-game & moving when I started recording, max frame time of 439.13ms was the resulting encoder catching up at the very beginning of the recording.

If any explanation from my understanding is incorrect, please be constructive and let me know... It only helps my knowledge if you pass yours on!
Long-winded spoiler above, with a link for frame time info.

To get a display in your logfile of your profile frame time data, you need to exit OBS Studio, restart it then upload last logfile.

Hope this helps for better understanding!
 
Top