Question / Help OBS dropping frames

My PC specs are: i7 7700K 4.7GHz overclocked, GTX 1660 Ti 6gb overclocked, and 16gb 3200MHz overclocked.
I reset my PC a few weeks ago because why not. OBS started to drop frames, probably the same issue before I reset as well, when I'm streaming it's much worse.
I did test the settings etc.

Log:
 

Attachments

  • 2020-01-13 10-40-43.txt
    5.5 KB · Views: 31

carlmmii

Active Member
You need to provide a log file that includes a recording or stream attempt -- nothing is included in your posted one. If you haven't yet closed OBS from a recording/stream, you can upload the current log file. Otherwise, open OBS afterward and choose to upload the last log file.
 
You need to provide a log file that includes a recording or stream attempt -- nothing is included in your posted one. If you haven't yet closed OBS from a recording/stream, you can upload the current log file. Otherwise, open OBS afterward and choose to upload the last log file.
I... do not get what you mean.
 

Narcogen

Active Member
  1. Open OBS.
  2. Start streaming.
  3. Wait until your problem appears.
  4. Stop streaming.
  5. Upload the Current logfile without quitting OBS.

If you upload the Last log, or quit OBS before uploading the log, or upload the log before streaming is stopped, the logfile will not contain the information about streaming necessary to diagnose your problem.
 

carlmmii

Active Member
There is a little bit of rendering lag, but the majority of your problem stems actually from encoding lag.

You're using key features that require extra CUDA processing to perform the encoding. Turn these features down/off:

- Max Quality (change to Quality or lower)
- Look-ahead (turn off)
- Psycho Visual Tuning (turn off)

That should ensure that the encoding is being taken care of strictly by your NVenc encoder, which should have no problem handling it. However, you may still be affected by the remaining rendering lag that is present.

I will mention... 6000kbps for a 1440p60 stream is not good. 6000kbps is barely enough to make a 1080p60 stream decent, and probably still needs more depending on the game being played.

Since you're streaming to youtube, you actually have a lot more freedom on the bitrate side, as long as you have the upload bandwidth. But, if you can't go above 6000kbps, I would seriously consider either reducing your Output (Scaled) Resolution down to 1920x1080 or 1280x720. If you need to keep your recording resolution at 2560x1440, then instead of using the NVenc (new) encoder, you can instead use the non-new encoder and rescale the output to the desired streaming resolution.
 
I will mention... 6000kbps for a 1440p60 stream is not good. 6000kbps is barely enough to make a 1080p60 stream decent, and probably still needs more depending on the game being played.

I know, I was using NVIDIA NVENC H.264 (new) which didn't have the Rescale Output option. I usually use it to reduce stream to 720p sometimes 1080p.

and will do.
 
There is a little bit of rendering lag, but the majority of your problem stems actually from encoding lag.

You're using key features that require extra CUDA processing to perform the encoding. Turn these features down/off:

- Max Quality (change to Quality or lower)
- Look-ahead (turn off)
- Psycho Visual Tuning (turn off)

That should ensure that the encoding is being taken care of strictly by your NVenc encoder, which should have no problem handling it. However, you may still be affected by the remaining rendering lag that is present.

I will mention... 6000kbps for a 1440p60 stream is not good. 6000kbps is barely enough to make a 1080p60 stream decent, and probably still needs more depending on the game being played.

Since you're streaming to youtube, you actually have a lot more freedom on the bitrate side, as long as you have the upload bandwidth. But, if you can't go above 6000kbps, I would seriously consider either reducing your Output (Scaled) Resolution down to 1920x1080 or 1280x720. If you need to keep your recording resolution at 2560x1440, then instead of using the NVenc (new) encoder, you can instead use the non-new encoder and rescale the output to the desired streaming resolution.


So I turned off whatever you told me to, change max quality to quality, look-ahead to off, psycho visual tuning to off,
when replay buffering it's still dropping some frames and when streaming with replaybuffer at the same time it's dropping more.

https://obsproject.com/logs/-2ScG62cpEjuNPlm

may i ask what does look-ahead and psycho visual tuning do?
 

Narcogen

Active Member
I think you're pushing the envelope on all fronts, and doing 1440p60 while simultaneously streaming, recording, AND replay buffer may just be too much.

11:37:16.492: Output 'Replay Buffer': stopping
11:37:16.492: Output 'Replay Buffer': Total frames output: 72646
11:37:16.492: Output 'Replay Buffer': Total drawn frames: 72262 (72819 attempted)
11:37:16.492: Output 'Replay Buffer': Number of lagged frames due to rendering lag/stalls: 557 (0.8%)


With recording and the replay buffer on, you're getting some rendering lag, which means your GPU is maxed out, at least a bit of the time. This is consistent, too, you get about the same % of frames dropped each time you turn the buffer or the recorder on and off.

GPU Overload Issues

11:44:02.693: Video stopped, number of skipped frames due to encoding lag: 7974/97179 (8.2%)

The primary drivers of encoding load are resolution, framerate, and whats' going on inside the frame (complexity, motion, etc). If turning off the optional features hasn't helped then the time may have come to evaluate changing one of those.

12:21:41.357: Output 'adv_stream': Number of dropped frames due to insufficient bandwidth/connection stalls: 408 (2.4%)

This isn't a lot of dropped frames due to network issues, but it occurred at a rate of only 5000, which isn't that high. That means it may be worth it to you to use the old encoder and scale, and use this bitrate or lower-- so, say, record in 1440p and stream in 720p.


13:29:23.316: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 523 (9.5%)
13:29:23.316: ==== Streaming Stop ================================================
13:29:23.361: warning: 2 frames left in the queue on closing
13:30:00.527: Output 'Replay Buffer': stopping
13:30:00.527: Output 'Replay Buffer': Total frames output: 22490
13:30:00.527: Output 'Replay Buffer': Total drawn frames: 21983 (22512 attempted)
13:30:00.527: Output 'Replay Buffer': Number of lagged frames due to rendering lag/stalls: 529 (2.3%)
13:30:00.527: ==== Replay Buffer Stop ============================================
13:30:00.791: Video stopped, number of skipped frames due to encoding lag: 774/28015 (2.8%)


Each of these percentages is low, but taken together suggest that you may need to adjust your expectations. Usually when someone has a problem that is only in one area and not in the others, there's a tradeoff that can be executed to bring that one problematic area into line, but this log shows some frames dropped for every possible cause-- rendering, encoding and network.
 

carlmmii

Active Member
Look-ahead is a way for the encoder to basically buffer a number of frames, then determine which frames will need more compression based on the complexity it will need to bring down to the target bitrate.

Psycho Visual Tuning is a way to prioritize quality on portions of the video that is more apparent to us humans, by giving less data to sections that our brains have an easier time as being "good enough" at lower quality.

Code:
13:29:23.316: [rtmp stream: 'adv_stream'] User stopped the stream
13:29:23.316: Output 'adv_stream': stopping
13:29:23.316: Output 'adv_stream': Total frames output: 5484
13:29:23.316: Output 'adv_stream': Total drawn frames: 5001 (5524 attempted)
13:29:23.316: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 523 (9.5%)
13:29:23.316: ==== Streaming Stop ================================================
13:29:23.361: warning: 2 frames left in the queue on closing
13:30:00.527: Output 'Replay Buffer': stopping
13:30:00.527: Output 'Replay Buffer': Total frames output: 22490
13:30:00.527: Output 'Replay Buffer': Total drawn frames: 21983 (22512 attempted)
13:30:00.527: Output 'Replay Buffer': Number of lagged frames due to rendering lag/stalls: 529 (2.3%)
13:30:00.527: ==== Replay Buffer Stop ============================================
13:30:00.791: Video stopped, number of skipped frames due to encoding lag: 774/28015 (2.8%)

Ok. Step 1 is fixed -- encoding lag is gone. The 2.8% shown for the recording section is actually a side-effect of the (new) NVenc encoder, where rendering lag is included in that count for whatever reason.

Now what's left is rendering lag. This is caused by OBS not being given enough GPU resources to perform the necessary scene composition within the timing window (for 60fps video, this needs to happen within 16.6ms). You can see this in real-time by opening the stats window -- it will show you the rendering lag numbers, as well as any frames that have been missed due to the timing. This is a problem usually when your game is using >80% of your GPU, and is ultimately a result of windows not giving OBS #1 priority regardless of anything else going on (if anything, it's usually given a lower priority than your game).

In OBS 24.0.3, there's a new "beta" workaround -- this may or may not work, but it's the best solution when it does. With Game Mode On (which you already have), run OBS in administrator mode (right-click on the obs64.exe or the shortcut to it, and select "Run as administrator"). This will put OBS on windows' GPU prioritization, allowing it to hopefully get the necessary GPU resources it needs alongside your game, meaning you can run your game at your normal settings and everything just works.

If that doesn't work, then you'll need to reduce your game settings to drop your GPU usage. Usually this can be achieved by limiting your framerate (either by setting a max framerate, or by using Vsync), and lowering your in-game graphics settings to the point where OBS has enough room to breathe.
 
I think you're pushing the envelope on all fronts, and doing 1440p60 while simultaneously streaming, recording, AND replay buffer may just be too much.


As I said in my previous replies, I was using the (new) NVENC encoder that didn't have the Rescale Output option, usually I just rescale it to 720p or 1080p.

Every time I have csgo open, I always have OBS open and replay buffer on. Even when I'm streaming too, sometimes.
 
Top