Question / Help OBS causing framerate drop in game

CharType

New Member
I have a game that I'm developing, and whenever I try to record it with OBS, the framerate drops drastically. The game is a Flash game that is programmed in Haxe. I researched this problem and I saw that someone suggested setting an fps cap for OBS, but I can't figure out how to do that. Can anyone tell me how I might fix this? Thanks.
 

Narcogen

Active Member
OBS' FPS settings are in Settings > Video.

OBS needs GPU resources to run. Usually people are capturing a game, and the answer to having a game run well and a recording that is stuttering is to cap the in game framerate.

I'm assuming that's not an option in a development suite, but I am merely speculating.

A logfile might be helpful, specifically one that contains a complete (started and stopped with your problem in between) recording or streaming session.

Please post a log with your issue! Here's how...
 

CharType

New Member
Thanks. I know I'm a little late getting back to this. I hope the delayed post is ok. If the mods want me to create a new thread I will.

The game isn't supposed to go higher than 60 frames per second, that's the framerate. Other than that, I'm not sure how I would set a cap. I'm attaching a logfile.
 

Attachments

  • 2019-08-25 02-51-39.txt
    10.4 KB · Views: 11

Narcogen

Active Member
02:52:56.031: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 84 (10.1%)

GPU overload.

https://obsproject.com/wiki/GPU-overload-issues

02:51:40.144: base resolution: 2560x1600
02:51:40.144: output resolution: 2560x1600
02:51:40.144: downscale filter: Bilinear
02:51:40.144: fps: 20/1


I'm guessing the primary problem here is the large canvas resolution.

02:57:00.456: adding 23 milliseconds of audio buffering, total audio buffering is now 92 milliseconds
02:57:37.327: adding 23 milliseconds of audio buffering, total audio buffering is now 116 milliseconds

[...]

02:57:37.996: adding 23 milliseconds of audio buffering, total audio buffering is now 766 milliseconds
02:57:37.996: adding 23 milliseconds of audio buffering, total audio buffering is now 789 milliseconds


All this happens *after* you stop recording, but spiraling audio buffering like this is usually symptomatic of overload, either of CPU or a USB controller.

This is also quite an old build of OBS (19.x). Current is 23, but you may not be able to run the latest on this OS (10.12 Sierra).

If you're using Syphon Inject for capture, don't upgrade past High Sierra. I use 23.x on High Sierra (10.13) very successfully.
 

CharType

New Member
I updated to the latest version of OBS and lowered my resolution, but I'm still having the same problem. First I tried lowering my resolution to 1280x720, which was the lowest resolution in the drop-down menu. Then I set the resolution to 640x400. I'm attaching another log file.
 

Attachments

  • 2019-08-25 12-48-30.txt
    9.6 KB · Views: 7

Narcogen

Active Member
12:52:31.651: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 27 (2.1%)
12:55:46.312: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 26 (3.2%)


The GPU is still overloaded. The only other thing I can suggest is to try and reduce the number of capture sources in your scene collection, and make sure nothing else is using GPU resources. You have a number of window captures and these are the least performant kind of capture in OBS under MacOS.
 

CharType

New Member
I have one single window capture, right? There's only one in the scene I'm running. Or are the captures in other scenes using GPU resources even if I'm not currently using them? Because that seems really unintuitive to me.
 

Narcogen

Active Member
Do you use those other scenes during a single session? Because yes, they use resources. Since you could at any moment switch to one of those, they have to be rendered.

You can test this by setting a media source to loop and not reload, and then hide and unhide it.

Basically a scene collection should contain all, but only, the scenes you're going to use during a given session, not all the scenes and capture sources you might ever use. It isn't recommended, for instance, for a scene or scene collection to include multiple different game or display captures, because of potential performance and reliability issues, especially with full-screen sources.
 
Top