GZDoom Framerate problem with OBS Studio

Wed Apr 12, 2017 9:48 pm

I just recently got Ultimate Doom, Doom 2, & Final Doom on Steam, and downloaded GZDoom to play them with. I'd like to stream my next playthroughs on Twitch, and OBS Studio picks GZDoom's game capture up just fine, but when OBS is running, my framerate in GZDoom drops from 60 fps to around 30 fps. Does anyone have any idea what I could do to fix this? I'm using GZDoom g2.4.0, OBS Studio 18.0.1 (64-bit), and my system specs are as follows:

CPU: Intel Core i7-4790K @ 4.00 GHz

Motherboard: ASUS Z-97A

Graphics: 8GB PNY GeForce GTX 1080

Memory: 16 GB DDR3

OS: Windows 10 Pro 64-bit

Re: GZDoom Framerate problem with OBS Studio

Wed Apr 12, 2017 10:11 pm

What settings do you have set for OBS? Your specs are more than enough to handle streaming at 60 fps. Bitrate and resolution are going to have a pretty significant impact.

Re: GZDoom Framerate problem with OBS Studio

Thu Apr 13, 2017 12:02 am

I hope you don't mind me hijacking this thread, since what I'm about to post it technically a tech-related question and is also related to OBS. :)

How do I record GZDoom fullscreen with OBS? I added Game Capture and Display Capture as the sources, but when I switch between desktop view and fullscreen GZDoom, the GZDoom recording is nothing but a black screen.

I want to do some live stream videos of me editing and running a mod, so I need to record both my desktop view and fullscreen GZDoom view.

Re: GZDoom Framerate problem with OBS Studio

Thu Apr 13, 2017 9:38 am

Nash wrote:I hope you don't mind me hijacking this thread, since what I'm about to post it technically a tech-related question and is also related to OBS. :)

How do I record GZDoom fullscreen with OBS? I added Game Capture and Display Capture as the sources, but when I switch between desktop view and fullscreen GZDoom, the GZDoom recording is nothing but a black screen.

I want to do some live stream videos of me editing and running a mod, so I need to record both my desktop view and fullscreen GZDoom view.


You should only need a source for Game Capture...I'm not the most knowledgeable about OBS Studio (I assume that's what you're using), but if you have Display Capture set up along with a Game Capture for GZDoom, that may be causing a problem.

Re: GZDoom Framerate problem with OBS Studio

Thu Apr 13, 2017 9:44 am

jpalomo wrote:What settings do you have set for OBS? Your specs are more than enough to handle streaming at 60 fps. Bitrate and resolution are going to have a pretty significant impact.


I'm actually referring to the framerate of the GZDoom gameplay itself, not the framerate of the stream (which I've always set OBS to adjust to 30 fps to ensure a smooth stream). I've always had smooth 60 fps gameplay with any other game I've streamed, while the framerate of the stream is adjusted to 30 fps, but for some reason, OBS Studio seems to be affecting the actual gameplay framerate of GZDoom.

For the sake of discussion, however, my settings for OBS Studio are as follows:

Encoder - x264
Rate Control - CBR
Bitrate - 2500
Keyframe Interval - 2
CPU Usage Preset - veryfast
Profile - main
Tune - None
Base (Canvas) Resolution - 1920 x 1080
Output (Scaled) Resolution - 1280 x 720
Downscale Filter - Bilinear
Stream Output FPS - 30

Re: GZDoom Framerate problem with OBS Studio

Fri Apr 14, 2017 1:12 pm

I just tested it again, and OBS Studio only seems to slow down my GZDoom gameplay when the scene for it is active in OBS Studio. If I have something else up - a "Be Right Back" image, for example - there's no slowdown, but once I switch to the GZDoom scene, the framerate slows down & stays that way, even if I close OBS Studio (I have to exit the game and restart it to get the framerate back up to 60 fps).

Re: GZDoom Framerate problem with OBS Studio

Fri Apr 14, 2017 1:28 pm

You've got a GeForce 1080 - do you know that the drivers come with the ability to capture screenshots, save videos and stream? Go to the GeForce experience application, click on the settings cog and in the general tab you should find a section called "Share". Make sure it's enabled and then look at the options in there. I used it to capture a quick bit of gameplay in EDuke earlier today and it worked pretty well.

Spoiler:

Re: GZDoom Framerate problem with OBS Studio

Fri Apr 14, 2017 1:44 pm

Enjay wrote:You've got a GeForce 1080 - do you know that the drivers come with the ability to capture screenshots, save videos and stream? Go to the GeForce experience application, click on the settings cog and in the general tab you should find a section called "Share". Make sure it's enabled and then look at the options in there. I used it to capture a quick bit of gameplay in EDuke earlier today and it worked pretty well.

Spoiler:


I'm aware that GeForce Experience has a streaming function, but I never bothered using it since OBS & OBS Studio have worked really well for me, apart from this issue with GZDoom. I'll give it a shot, thanks!

Re: GZDoom Framerate problem with OBS Studio

Sat Apr 15, 2017 7:19 pm

Update: I've figured out a solution to keep OBS Studio from slowing down my GZDoom gameplay!

I stumbled across it after trying to install the older version of ZDoom to see if I'd have better luck, and ZDoom ran fine at a full 60fps with OBS Studio running. I remembered seeing that there was an option to choose between Hardware (OpenGL) & Software rendering in the GZDoom startup window, and I decided to try launching GZDoom in Software rendering mode to see if it would work that way. Sure enough, GZDoom runs great at 60fps with OBS Studio running, so long as I choose Software rendering instead of Hardware rendering.

Not sure why Hardware rendering in GZDoom is conflicting with having OBS Studio running (especially with the CPU & GPU I have), but I don't mind setting it to Software for the purpose of streaming too much. That said, if anyone knows of a way I could get GZDoom running at a full 60fps in Hardware rendering mode with OBS Studio running (so the game can look a little more polished when I stream it), I'd appreciate the help! Also, does anyone know of any mods or WADs that require GZDoom to be set for Hardware rendering in order to run properly?

Re: GZDoom Framerate problem with OBS Studio

Sun Apr 16, 2017 3:27 am

Any mod that uses models won't display them in software mode.

Re: GZDoom Framerate problem with OBS Studio

Sun Apr 16, 2017 10:13 am

Enjay wrote:Any mod that uses models won't display them in software mode.


Understood, thanks...Any ideas for how I could get Hardware mode & OBS Studio to play nice together?

Re: GZDoom Framerate problem with OBS Studio

Sun Apr 16, 2017 12:50 pm

I'm guessing it's down to a quirk of how OpenGL and video capture work together, endemic to this sort of thing since Fraps got popular. Because of the way it has to grab frames from GL applications, it effectively vsyncs you down to 30 Hz. The way to fix it: increase OBS's capture framerate.

That said, I have no idea why it does this for OpenGL and not anything else.

Re: GZDoom Framerate problem with OBS Studio

Wed Apr 19, 2017 4:45 pm

wildweasel wrote:I'm guessing it's down to a quirk of how OpenGL and video capture work together, endemic to this sort of thing since Fraps got popular. Because of the way it has to grab frames from GL applications, it effectively vsyncs you down to 30 Hz. The way to fix it: increase OBS's capture framerate.

That said, I have no idea why it does this for OpenGL and not anything else.


I tried that, but unfortunately, it didn't help. I'm not super worried about it...I'd like the game's textures to look a bit smoother when I stream, but I'd much rather have a better framerate when I play, so I'm willing to compromise by sticking with Software mode (and there's something to be said for the classic look of the game, anyway).

That said, if anyone reading this happens to know of a solution so that I could get full 60 fps gameplay while streaming GZDoom in Hardware mode, I'd appreciate the help! :)