Question / Help Problem streaming PC games in OBS Studio

Kris M

New Member
Here is the problem, whenever I try to stream (or even just capture) PC games the preview or the stream itself runs super choppy and drops frames in OBS Studio and OBS Classic as well as the stream/recording, but the game itself runs fine while playing.

I have tried capturing the game using game capture, window capture, and monitor/display capture all with the same result. I have also tried routing the output of the monitor thru my Elgato and capturing the Elgato using video capture device and it still runs like crap in both OBS. This makes no sense to me as capturing and streaming my PS4/Xb1 with the Elgato has no issues.

I have been streaming PC/Console games for over a year and half with no issues and this started within the last 6 months. I have been scouring the net for months and all of the “solutions” I find just don’t solve the problem.

I have tried all the settings for the “best” possible output and capture but nothing seems to fix this. I don't it’s my internet because I’m working with 100mb down/ 35mb up also it happens in the preview before even streaming or while doing a local record.

I’ve also tried switching encoders from x264 to NVENC H.264 (those are the only ones available to me) and that doesn’t fix it. So, either there are specific settings that are just wrong or I am completely missing something

I thought it was maybe making the change to Win 10 and it not playing nice with OBS but other streamers are using both with no issues. So I just don’t know.

Here are my PC specs:

MoBo: Asus AMD 990FX Atx 4 Dimm DDR3 Tuf Sabertooth
Proc: AMD FX-8320 EIGHT-CORE 3.5GHZ 16MB 125W AM3+
Cooling: Cooler Master Hyper 212 EVO Cooling System
Ram: Kingston 16GB 1600MHz DDR3 HyperX Red
Graphics: MSI GeForce GTX 970 4GB
Display: Asus 24" LED Monitor / Samsung 23" LED Monitor
OS: Windows 10 Home Premium 64-bit
Elgato Game Capture

Can anyone offer any insight to this problem?
Is there any other info you need from me?

Thanks

Log file is attached
 

Attachments

  • 2016-12-21 16-33-25.txt
    24.3 KB · Views: 30

C-Dude

Member
16:33:48.070: fps: 0.00 (interval: 0)

4:38:38 PM.708: Elgato: ResolutionValid failed
4:38:38 PM.708: Elgato: Video configuration failed

4:40:29 PM.335: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 2367 (32.9%)

4:40:42 PM.189: Number of memory leaks: 17


This is what I found. Try turning on VSync in game, I think your PC is using all its power on running the game and not encoding the video. VSync should fix this.
 

C-Dude

Member
Most games either have an option to cap your frames or VSync. If it doesn't usually there is a way to enable it in the settings file. If not there are some programs that you can use to cap your framerate or I'm pretty sure there is a way to do it in NVidia drivers.
 

Kris M

New Member
Well i tried VSync in a couple of games and that didn't seem to fix it. I then change the VSync setting in the Nvidia Control Panel to Adaptive and that had no effect. Is there any other way to give the encoding more power?
Thanks again.
 

C-Dude

Member
You can try setting the process priority class to above normal or high but thats probably not going to help a lot. What you should do is use more optimized settings. For recording try using rate control CRF, CPU preset Ultrafast, and CRF of around 16-20.

Also set your base resolution to 1920x1080 (your monitors resolution)
Leave your output resolution at 1280x720
And use downscale filter of Lanczos.
This will give you better performance and better looking scaling.

You can also use the NVENC encoder which give much better performance. CQP of around 16-20 on NVENC will give great quality. Of course if you want a smaller file size you can use CBR or VBR of around 30000 (for 720p)

As of streaming you may have to use preset superfast if you are getting lag on veryfast. Also make sure to use a keyframe interval of 2 while streaming.
 

Billy Cao

New Member
From ur com spec, I think tat ur com is definitely powerful enough to record and encode 1080p video. If your are using x264 encoder, you may try to set cpu preset to ultrafast and crf=20. If it still dont work, try to reduce frame rate of the video to 30, and check if your bitrate is too high for 1080p video(normally it should be around 4000 to 5000 Kbps. if it's higher than tat, try reducing it.
If all above wont work, check the cpu and RAM usage of OBS when recording via task manager, see if its too high, or if the game is using a lot of RAM and CPU.
For GPU encoding, i do not have a lot experience so i better not advice anything, in case i am wrong.
 

Kris M

New Member
So I tweaked the NVENC settings and that seems to have worked.
You can try setting the process priority class to above normal or high but thats probably not going to help a lot. What you should do is use more optimized settings. For recording try using rate control CRF, CPU preset Ultrafast, and CRF of around 16-20.

Also set your base resolution to 1920x1080 (your monitors resolution)
Leave your output resolution at 1280x720
And use downscale filter of Lanczos.
This will give you better performance and better looking scaling.

You can also use the NVENC encoder which give much better performance. CQP of around 16-20 on NVENC will give great quality. Of course if you want a smaller file size you can use CBR or VBR of around 30000 (for 720p)

As of streaming you may have to use preset superfast if you are getting lag on veryfast. Also make sure to use a keyframe interval of 2 while streaming.

I tweaked the NVENC encoded settings and that seemed to do the trick. The couple of pc games I want stream right now previewed perfectly in obs. Thanks a lot for all the help!
 

Kris M

New Member
From ur com spec, I think tat ur com is definitely powerful enough to record and encode 1080p video. If your are using x264 encoder, you may try to set cpu preset to ultrafast and crf=20. If it still dont work, try to reduce frame rate of the video to 30, and check if your bitrate is too high for 1080p video(normally it should be around 4000 to 5000 Kbps. if it's higher than tat, try reducing it.
If all above wont work, check the cpu and RAM usage of OBS when recording via task manager, see if its too high, or if the game is using a lot of RAM and CPU.
For GPU encoding, i do not have a lot experience so i better not advice anything, in case i am wrong.

Thanks for the response. I usually stream at 720p at 30fps and around 2000-2500 kbps. I have a bunch of overseas viewers with slower Internet so I like to keep the buffering down. I switched over to gpu encoding and that seemed to do the trick. I will mess with settings you suggested for x264. I also overclocked my cpu to 4ghz from 3.5 to give it a lil boots lol
 

Kris M

New Member
Thought this issue was solved but after testing a bunch and tweaking the NVENC settings, changing the drive i rec on, using elgato to stream thru to obs I still cant get a lag free preview or record or stream of pc games thru obs. I have updated to the most recent version of obs (17.0.0) I have tried using the 64bit and 32bit versions (im running win10 64bit) and even the classic obs. I've got a 4bg gfx card and still cant understand why this is still so laggy when trying to preview and stream using obs. Cpu usage using NVENC is low, and VSync is turned on where it can be. Any other suggestions guys?
Thanks
 
Top