Question / Help Resolving Rendering Lag

FrostyCoolSlug

New Member
Firstly, large logfile.

I seem to be having an issue with Rendering Lag / Stalls resulting in about 30% of frames being dropped, while the encoder doesn't appear to have any (visible) problems, the only solution I've come up with so far is to drop the framerate down to 30fps (which I'd rather not do):

Code:
09:00:15.090: Output 'adv_file_output': Total encoded frames: 2955
09:00:15.090: Output 'adv_file_output': Total drawn frames: 2955
09:00:15.090: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 857 (29.0%)


This seems to occur with almost any settings I set where I'm capturing at 60fps (regardless of resolution, downscaling, quality etc), and I've tried changing the Renderer (in the advanced tab) from Direct3D 11 to OpenGL, with OpenGL getting a much higher percentage of dropped frames.

Is there anything I can do to improve the situation or resolve outside of lowering the capture framerate?

Many thanks.
 

Harold

Active Member
What pci-e mode is your video card running in?

09:28:42.639: ┃ ┣download_frame: min=0 ms, median=18.145 ms, max=44.682 ms, 99th percentile=26.13 ms
 

FrostyCoolSlug

New Member
Hi Harold,

Graphics card is running in PCI Express 2.0 x16 mode

As an additional note, there doesn't seem to be any sort of performance hit in-game when I'm encoding, solid 60fps with no visible delays or problems. Only happens with encoding.

Thanks.
 

Harold

Active Member
Whatever's going on, the problem is with the video card.
nvenc is showing slightly worse performance than x264.
Have you tried color formats other than RGB?
 

FrostyCoolSlug

New Member
Yea, I've tried switching between the various options, and didn't get any performance improvements (NV12 test in the log file gives 22% loss), I also tried limiting the framerate in game (I have a 144hz monitor, but limited to 60fps) to see if it was a bandwidth issue, but to no avail.

I'm assuming the problem here is the time taken to fetch the current frame from the graphics card?

[Minor Edit] Thanks for the help here by the way, it's appreciated :)
 

Harold

Active Member
The entire process of generating, downloading, encoding and writing the frame needs to happen in under about 16ms. It's taking on average over 26ms JUST to download the frame from the video card.
 

FrostyCoolSlug

New Member
Ok, thanks Harold for the help, at least I can rule out OBS as the possible cause of the problems, I'll slap a bios update through, and double check the settings there to see if anything could be limiting it.

Cheers.
 

FrostyCoolSlug

New Member
Just to bump this slightly, in case anyone else runs into a similar problem.

In the case of Overwatch, I had to set the 'Render Scale' option to 100% (The 'Auto' option set it up to 200%), which seems to have cleared up the issue. I'm not entirely sure where in the pipeline the rendered image gets resized in relation to the display, or where along said pipeline OBS actually pulls the frame, but I'm assuming that if it were attempting to pull 4k images at 60fps it would choke out the card.

I'm now seeing less than 1% rendering stalls :)

Thanks again!
 
Last edited:
Top