Question / Help OBS recording Stuttering :( Please Help.

BullDozings

New Member
Hi, I'm a new user for OBS and I really like it. I'm new to recording and making videos, so I'm a kinda a noob when it comes to video settings. Anyway, I want to record gaming, COD Warzone, Fortnite, and Minecraft, and decided to start out with minecraft since its probably the best game to see if my PC can record it and have steady frames.
Heres the video : https://www.youtube.com/watch?v=3encuO81EW8
As you can see, I'm getting 200-700FPS in minecraft, and my game was completely smooth. All minecraft YT'rs record in 120fps because it gives a motionblur effect. However, when viewing the recording, the game is stuttering and freezing. This is really annoying. I'm not sure what the problem is. Please help :(
Log: https://obsproject.com/logs/-hNagyGG6Ly0Qolw
Specs: 15-6500
GTX 1050TI
8GB Ram
240+120G of Storage
 

RomaM65

New Member
Hi, did you increase the priority of Obs? Have you tried limiting the game frame rate to free up performance for OBS?
 

carlmmii

Active Member
Code:
01:40:44.155: Output 'simple_file_output': Total frames output: 20374
01:40:44.155: Output 'simple_file_output': Total drawn frames: 20412 (20418 attempted)
01:40:44.155: Output 'simple_file_output': Number of lagged frames due to rendering lag/stalls: 6 (0.0%)
01:40:44.155: ==== Recording Stop ================================================
01:40:44.155: Video stopped, number of skipped frames due to encoding lag: 4956/20416 (24.3%)

Code:
01:36:21.612: Running as administrator: false
Run OBS as administrator. This will add OBS to the GPU priority list.

Code:
01:37:53.980:     psycho_aq:    true
Turn off psychovisual tuning. This uses CUDA, and should be disabled if you're encountering encoding lag (which you are).

Also, do NOT record directly to .mp4. This container format requires finalization data to be written at file close, so if there's anything that ends up terminating the recording prematurely (such as a program crash or otherwise), then the entire video file will be corrupted. Instead record to .mkv, and remux to .mp4 if needed elsewhere (either automatically by setting the option in advanced settings, or manually through the file menu). Btw, youtube accepts .mkv files directly.


Now, for the 120fps argument.

I don't know how this concept of "it adds motion blur" started. It's incorrect. All recording in 120fps does is add extra frames between the ones you would have in 60fps, along with strain your system more because there's more image data having to be sent from game to OBS, rendered in scene, and encoded.

The only way you're going to have a motion blur effect is if there is post production done, and even then that doesn't need a framerate higher than your intended output framerate. Any video player which plays the file back will either play back the exact frames at 120fps, or it will play it back at 60fps (discarding every other frame).

The only actual use case for recording at more-than-60fps is if you are actually editing together slow motion clips. That is it.
 

BullDozings

New Member
Hi, did you increase the priority of Obs? Have you tried limiting the game frame rate to free up performance for OBS?
Hi Roma, I turn on VSYNC for Minecraft and that caps my FPS at 60. I will turn it to high priorty as soon as I get my PC going.
 

BullDozings

New Member
Code:
01:40:44.155: Output 'simple_file_output': Total frames output: 20374
01:40:44.155: Output 'simple_file_output': Total drawn frames: 20412 (20418 attempted)
01:40:44.155: Output 'simple_file_output': Number of lagged frames due to rendering lag/stalls: 6 (0.0%)
01:40:44.155: ==== Recording Stop ================================================
01:40:44.155: Video stopped, number of skipped frames due to encoding lag: 4956/20416 (24.3%)

Code:
01:36:21.612: Running as administrator: false
Run OBS as administrator. This will add OBS to the GPU priority list.

Code:
01:37:53.980:     psycho_aq:    true
Turn off psychovisual tuning. This uses CUDA, and should be disabled if you're encountering encoding lag (which you are).

Also, do NOT record directly to .mp4. This container format requires finalization data to be written at file close, so if there's anything that ends up terminating the recording prematurely (such as a program crash or otherwise), then the entire video file will be corrupted. Instead record to .mkv, and remux to .mp4 if needed elsewhere (either automatically by setting the option in advanced settings, or manually through the file menu). Btw, youtube accepts .mkv files directly.


Now, for the 120fps argument.

I don't know how this concept of "it adds motion blur" started. It's incorrect. All recording in 120fps does is add extra frames between the ones you would have in 60fps, along with strain your system more because there's more image data having to be sent from game to OBS, rendered in scene, and encoded.

The only way you're going to have a motion blur effect is if there is post production done, and even then that doesn't need a framerate higher than your intended output framerate. Any video player which plays the file back will either play back the exact frames at 120fps, or it will play it back at 60fps (discarding every other frame).

The only actual use case for recording at more-than-60fps is if you are actually editing together slow motion clips. That is it.
Hey Carl,
I will do that as soon as as I can get back on my PC at noon. To talk about the 120 fps issue: Basically almost every youtuber ive watched has said to put it on 120fps for obs, and then during the vegas rendering stage, it gives a motion blur effect.
Hops (A fort YTer who is known for recording in amazing quality and motion blur says it at 4:37 as he reviews his OBS settings): https://www.youtube.com/watch?v=wIrz4Vaaf8E
Sawmpie: (MC yter who records incredibly high quality content aswell says at 1:12 as he showcases his OBS settings): https://www.youtube.com/watch?v=-88PmBR3_sI
So im confused at this point. But my question is how would reccording in 120fps cause freezes? Wouldn't that cause an FPS drop in the game, which I dont have?
 

carlmmii

Active Member
Ok, so there's the post processing. If you're willing to attempt to hit 120fps and actually do that editing chain, then that's your own choice.

The reason you're encountering freezes/stutters in your recording is because of what's called "encoding lag". OBS is a realtime encoder. This means that all of the actions for each frame of processing need to take place within the time limits of the framerate that is being output.

For 60fps, this gives a 16ms window. For 120fps, this goes down to an 8ms window.

There's several steps in this chain. You can see the overall report of this process at the tail end of the logs:
Code:
01:40:45.587: obs_graphics_thread(8.33333 ms): min=0.084 ms, median=0.442 ms, max=666.15 ms, 99th percentile=2.29 ms, 99.7533% below 8.333 ms
01:40:45.587:  ┣tick_sources: min=0.001 ms, median=0.019 ms, max=666.026 ms, 99th percentile=0.093 ms
01:40:45.587:  ┣output_frame: min=0.066 ms, median=0.258 ms, max=144.565 ms, 99th percentile=1.509 ms
01:40:45.587:  ┃ ┗gs_context(video->graphics): min=0.066 ms, median=0.257 ms, max=144.565 ms, 99th percentile=1.508 ms
01:40:45.587:  ┃   ┣render_video: min=0.003 ms, median=0.219 ms, max=36.306 ms, 99th percentile=0.416 ms
01:40:45.587:  ┃   ┃ ┣render_main_texture: min=0.002 ms, median=0.03 ms, max=6.624 ms, 99th percentile=0.101 ms
01:40:45.588:  ┃   ┃ ┣render_convert_texture: min=0.01 ms, median=0.014 ms, max=0.189 ms, 99th percentile=0.028 ms, 0.654032 calls per parent call
01:40:45.588:  ┃   ┃ ┗output_gpu_encoders: min=0 ms, median=0.033 ms, max=0.415 ms, 99th percentile=0.101 ms, 0.654032 calls per parent call
01:40:45.588:  ┃   ┗gs_flush: min=0.015 ms, median=0.03 ms, max=144.541 ms, 99th percentile=1.415 ms
01:40:45.588:  ┗render_displays: min=0 ms, median=0.15 ms, max=42.848 ms, 99th percentile=0.699 ms
Specifically, we're looking at the "render_video" subsection.

There's a rendering process where it grabs the frame from each source and composites them all together. There's a small conversion process after this to send to the encoder.

The encoder then takes this composited image and runs it through the nvenc encoding algorithm.

If the encoder doesn't get the next frame within the frame timing window since the last frame it received, then that frame is not encoded and results in a "frame lost due to rendering lag".

If the encoder takes longer than the timing window to complete its compression of the frame it's working on when it receives the frame from the rendering chain, then that frame is also not encoded, but results in a "frame lost due to encoding lag".

In your specific case, your encoder is not able to keep up with the rate at which it is expected to encode frames. This doesn't result in any kind of extra performance hit to your GPU -- your encoder is separate silicon to the rest of your GPU (this is why NVenc encoding is such a non-issue for the overall performance hit). Even if it were, it would not be working any harder if the rate that it's being asked to work exceeds its max output -- it has a limit, and cannot perform past that point.

One thing that you are asking your encoder to do is use "Psychovisual tuning". This is an extra feature outside of the possibilities of the core NVenc silicon, and it requires CUDA to run extra processing. This requires extra communication between the NVenc encoder and your cuda cores (which may or may not be used by your game), and adds extra processing time to the encoding pipeline, making it harder to hit the frame timing.


tl;dr Basically, it's a matter of being able to hit a strict time target. If the chain can't complete from start to finish within that time, you lose a frame. If it's bad enough, then you will lose several, resulting in stuttering or even worse, large chunks of video that don't exist because the frames can't get from start to finish fast enough for the recording framerate.
 

carlmmii

Active Member
Something else that I will mention.

If all you're looking to get is raw gameplay capture, then a much better option would be to use Nvidia Shadowplay. This gets around the need to perform any type of extra rendering or transfer across the PCIe bus, and instead can send frames directly to the encoder directly within the GPU. This is the absolute fastest chain possible currently, and if you don't need any type of compositing or audio, this would be a much better option for high framerate recording.
 

MrAwesome

New Member
Something else that I will mention.

If all you're looking to get is raw gameplay capture, then a much better option would be to use Nvidia Shadowplay. This gets around the need to perform any type of extra rendering or transfer across the PCIe bus, and instead can send frames directly to the encoder directly within the GPU. This is the absolute fastest chain possible currently, and if you don't need any type of compositing or audio, this would be a much better option for high framerate recording.
I'm using Nvidia ShadowPlay but the stuttering is worst than OBS
do you have any clue to what happen?

sorry bad english
 
So here is what I discovered. I found that the stuttering is because of incorrect Vertical values in the monitor. I use a Dell S2716DG monitor (G-Sync) and the Vertical range is set at 30-144hz. AMD got this right with FreeSync as their lowest values start with 48, for their FreeSync monitors may not produce this behavior on NVIDIA GPU's.

I changed the vertical range to 48-144hz using the Custom Resolution Utility in the Detailed Resolutions box. If you can't find it, select the checkbox "Include if slot available" at the bottom. Do not change the Horizontal khz settings. A restart is required after using their restart utility.

Your monitor values may differ from mine, but on G-Sync monitors, the low timing of 30hz is producing all kinds of stutter on OBS, SLOBS, etc. I would recommend taking a look at your Vertical monitor timings with the Custom Resolution Utility.

After I set mine to 48-144hz, I had no more stuttering on the preview and recordings. Nobody is making the manufacturers test for these things unfortunately.
 

HerrMoki

New Member
So here is what I discovered. I found that the stuttering is because of incorrect Vertical values in the monitor. I use a Dell S2716DG monitor (G-Sync) and the Vertical range is set at 30-144hz. AMD got this right with FreeSync as their lowest values start with 48, for their FreeSync monitors may not produce this behavior on NVIDIA GPU's.

I changed the vertical range to 48-144hz using the Custom Resolution Utility in the Detailed Resolutions box. If you can't find it, select the checkbox "Include if slot available" at the bottom. Do not change the Horizontal khz settings. A restart is required after using their restart utility.

Your monitor values may differ from mine, but on G-Sync monitors, the low timing of 30hz is producing all kinds of stutter on OBS, SLOBS, etc. I would recommend taking a look at your Vertical monitor timings with the Custom Resolution Utility.

After I set mine to 48-144hz, I had no more stuttering on the preview and recordings. Nobody is making the manufacturers test for these things unfortunately.
Hey there, I have the same problem with G-sync. Could you explain me what and where you set it ? Can't rlly find it. Would be rlly happy c :
 
Make sure that you Export your current EDID for your active monitor first.
Then at the top, click Edit. At the bottom, you will see your horizontal (kHz) and vertical (Hz) range limits.
Only set the vertical to 48 Hz and select the check box below it. Export the new settings and use a different name.


1619438643325.png
 
Top