Sporadic Stuttering while Streaming + Recording

Staticasaurus

New Member
Log file attached.

While streaming, I kept getting micro stutters while streaming and recording. These stutters showed up in the recording. Sometimes saw a FPS drop, but not every time, and never saw the bitrate indicator turn red or orange or even yellow. After stream I restarted OBS.

GeForce GTX 1080 Ti SC2
32 GB Ram
I7-7700k

Game mode is OFF in windows.
GPU is processing/rendering, never saw it or my CPU go very high.
Nvidia Overlay/Shadowcast whatever is turned off.
Twitch is set to 720p30FPS
PC is fine, nothing is dying on it.

While I was streaming, I upped my Bit rate by 200, but didn't restart stream. The last time I had micro stuttering, I saw my bit rate indicator kept dropping to red, so I figured I wasn't giving enough bitrate, and I was right. This doesn't seem to be the case, or I needed to restart stream/obs for it to take effect. I also changed twitch to Normal Latency mode (dunno why it wasn't). After stream, I played for a while without streaming or recording, nothing. Did recording only, nothing. Did broadcast test, nothing. Broadcast test and recording, nothing. So maybe

I looked at my log file, I didn't see anything out of the ordinary, but I also don't look at log files often.
Browsed the forums and google first to see if I could figure it out on my own. I could not.
 

Attachments

  • 2020-12-26 07-03-25.txt
    32.8 KB · Views: 129

rockbottom

Active Member
You have many settings that can/will cause problems. First off, limit your in-game frame rate & your monitors to 120fps or 60fps.
07:03:26.447: output 0: pos={0, 0}, size={1920, 1080}, attached=true, refresh=144, name=VG248
07:03:26.447: output 1: pos={-1920, 0}, size={1920, 1080}, attached=true, refresh=144, name=VG248

If you're primarily recording games, enable Game Mode.
07:03:25.867: Game Mode: Off

I use Malwarebytes too, but I never have it running when I'm using OBS. Windows Defender only.
07:03:25.876: Sec. Software Status:
07:03:25.876: Malwarebytes: enabled (AV)
07:03:25.877: Windows Defender Antivirus: disabled (AV)

It looks like you have the rescale output box checked in the Output/Recording tab, uncheck that bad boy. Set CQ Level to something sane, like 15-18. Use the Quality Preset, Profile High & Uncheck Psycho Visual Tuning. FWIW, your GPU doesn't support B frames.
07:05:45.089: [jim-nvenc: 'recording_h264'] settings:
07:05:45.089: rate_control: CQP
07:05:45.089: bitrate: 0
07:05:45.089: cqp: 10
07:05:45.089: keyint: 60
07:05:45.089: preset: mq
07:05:45.089: profile: main

07:05:45.089: width: 1920
07:05:45.089: height: 1080
07:05:45.089: 2-pass: true
07:05:45.089: b-frames: 4
07:05:45.089: lookahead: false
07:05:45.089: psycho_aq: true
07:05:45.089:
07:05:45.102: ---------------------------------
07:05:45.103: [FFmpeg aac encoder: 'Track1'] bitrate: 320, channels: 2, channel_layout: 3
07:05:45.103:
07:05:45.126: ==== Recording Start ===============================================
07:05:45.126: [ffmpeg muxer: 'adv_file_output'] Writing file 'T:/Twitch Streaming Videos/2020-12-26 07-05-45.mkv'...
07:05:45.679: [jim-nvenc: 'streaming_h264'] scaling enabled, falling back to ffmpeg
11:22:10.084: Output 'adv_stream': stopping
11:22:10.084: Output 'adv_stream': Total frames output: 461472
11:22:10.084: Output 'adv_stream': Total drawn frames: 461092 (461525 attempted)
11:22:10.084: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 433 (0.1%)
11:22:10.084: [rtmp stream: 'adv_stream'] Freeing 4 remaining packets
11:22:10.127: ==== Streaming Stop ================================================
11:22:10.134: warning: 2 frames left in the queue on closing
11:22:10.343: [ffmpeg muxer: 'adv_file_output'] Output of file 'T:/Twitch Streaming Videos/2020-12-26 07-05-45.mkv' stopped
11:22:10.343: Output 'adv_file_output': stopping
11:22:10.343: Output 'adv_file_output': Total frames output: 461532
11:22:10.343: Output 'adv_file_output': Total drawn frames: 461124 (461557 attempted)
11:22:10.343: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 433 (0.1%)
11:22:10.345: Video stopped, number of skipped frames due to encoding lag: 549/923052 (0.1%)

You need to go through all your Scenes, some have multiple Game/Monitor captures. There should only be 1 of them per Scene. Here is an example.
07:03:31.418: - scene 'PC Games':
07:03:31.418: - source: 'Portal 2' (game_capture)
07:03:31.418: - source: 'We Were Here Too' (game_capture)
07:03:31.418: - source: 'LoL' (monitor_capture)
07:03:31.418: - source: 'Magicka' (game_capture)
07:03:31.418: - source: 'Transistor' (game_capture)
07:03:31.418: - source: 'Orcs Must Die 2' (game_capture)
07:03:31.418: - source: 'Left4Dead2' (game_capture)
07:03:31.418: - source: 'Webcam_Me' (dshow_input)
07:03:31.418: - source: '---------------Media Sources---------------' (text_gdiplus_v2)
07:03:31.418: - source: 'Sub Follow Template' (scene)
07:03:31.418: - source: '---------------Overlay Items---------------' (text_gdiplus_v2)
07:03:31.418: - source: 'Follower Goal' (browser_source)
07:03:31.418: - source: '----------Stream Elements Items----------' (text_gdiplus_v2)

You have some audio sample rate mismatches & your capture device settings should be looked at & updated where needed.
07:03:26.419: OBS 26.1.0 (64-bit, windows)
07:03:26.419: ---------------------------------
07:03:26.420: ---------------------------------
07:03:26.420: audio settings reset:
07:03:26.420: samples per sec: 48000
07:03:26.420: speakers: 2
07:03:26.443: ---------------------------------
07:03:29.027: WASAPI: Device 'Speakers (Realtek High Definition Audio)' [48000 Hz] initialized
07:03:29.068: [Loaded global audio device]: 'Desktop Audio'
07:03:29.068: - filter: 'Background noise reduction' (vst_filter)
07:03:29.068: - monitoring: monitor and output
07:03:29.116: WASAPI: Device 'Microphone (USB Audio CODEC )' [44100 Hz] initialized

Might be a good idea to get CoreAudio installed on your system while you're at it.
7:03:27.420: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded

If you're still dropping some frames after making the corrections, try saving your recordings to a different hard drive, preferably an SSD.

 
Last edited:

Staticasaurus

New Member
I wasn't asking for an entire overhaul to my settings; I wanted to know what was causing my specific issue. It makes zero sense to change a bunch of things, and hope something sticks. These settings have caused no issues until todays stream. To be specific:

You have many settings that can/will cause problems. First off, limit your in-game frame rate & your monitors to 120fps or 60fps.

My in-game frame rate isn't changeable on the switch. This isn't the issue.
I changed my monitor frame rate, for shits and giggles.

If you're primarily recording games, enable Game Mode.
07:03:25.867: Game Mode: Off

What game mode? Game mode in windows? In every single other forum post on this forum that I looked at about this issue, people were told to turn it off. I will not be turning it on. On my monitors? I'm using a custom profile stored in my monitors; if its not in game mode already, then I'm not changing that.

I use Malwarebytes too, but I never have it running when I'm using OBS. Windows Defender only.

Malwarebytes wasn't running. It was just in the background, not doing anything. Ill go ahead and disable it from the start menu for shits and giggles.

It looks like you have the rescale output box checked in the Output/Recording tab, uncheck that bad boy. Set CQ Level to something sane, like 15-18. Use the Quality Preset, Profile High & Uncheck Psycho Visual Tuning. FWIW, your GPU doesn't support B frames.

I have the output box checked in the streaming tab because I am recording AND streaming. I want the video that I record to be 1080p60FPS for youtube upload, and the stream to be 720p30FPS. I won't be unticking it, there was a whole overhaul on my system that happened 6 months ago, and the best place to rescale my stream output is apparently right where I have it ticked. I am rescaling it because I do not want my stream quality to be a barrier for someone watching me stream on their phone. It wasnt causing issues before, and I highly doubt it was causing them today.

I changed the CQ level, though I am not sure why that would all of a sudden be an issue since last Thursday.

I disabled Psycho Visual tuning on both the streaming and recording tabs; if my GPU doesn't support it, it doesn't support it.

I changed the profile to "high" on the recording tab.

Why am I lowering from max quality? I am trying to record video that is crisp and not blurry as hell, which was a problem before. Unless you can certify that the video I will be recording will be crystal clear when I record it, then I'm not lowering the quality of any setting.

You need to go through all your Scenes, some have multiple Game/Monitor captures. There should only be 1 of them per Scene. Here is an example.

This is fair, I'll do this.

You have some audio sample rate mismatches & your capture device settings should be looked at & updated where needed.

Why am I changing audio settings? Audio issues aren't causing my stream to stutter. And I wasn't having audio issues. In addition, I spent 3 hours trying to figure out sound settings so that my PS4 audio would stop cracking 4 months ago, and finally got it to stop with what it's set to. What specifically is mismatched, and why do I need to change it?

Might be a good idea to get CoreAudio installed on your system while your at it.

What is CoreAudio? What does it do and why do I need something else to update on my computer?

If you're still dropping some frames after making the corrections, try saving your recordings to a different hard drive, preferably an SSD.

My videos are being recorded to a 10 TB hard drive that I purchased specifically for that; I bought the fastest hard drive I could. Nothing else goes on that drive except the most recent youtube videos I have uploaded, and certainly nothing is going on them while I am recording. I'm not turning around and spending more money on an SSD. In addition, I am not dropping frames. I said my FPS dropped for the duration of the stutter, meaning, the FPS reading at the bottom right of OBS decreased for the duration of the stutter *sometimes* and then returned to 30.

If it sounds like I'm upset (and I am), its because I asked for help with a specific issue, and I was given a laundry list of things that are wrong with my system (that weren't causing problems 2 days ago) with no justification on why they are causing my issues. Just "you have a bunch of stuff I think is wrong that might cause problems later."
 

Staticasaurus

New Member
I clicked your link, and the codec makes sense. Ill install that too. But I want to be clear: I still don't understand why we are addressing audio issues when I have a stream stutter problem.
 

rockbottom

Active Member
Unfortunately, you need it.

The framerate mismatches & encoder settings are more than likely causing the stuttering. You should make 1 correction at a time, test & then move on to the next item until all the stuttering is gone. The information I gave you is to optimize your set up. What you do with it is up to you....
 

Staticasaurus

New Member
I want to reiterate: My settings were set the way they are (at least) 4 months ago. And my stream has had no issues until today. Don't you think its a little weird that settings that have caused no problems until now are all of a sudden the problem? What you say would make sense if I had changed all the settings today before stream, and then came here posting about why my system is not working right. But that isn't the case.

You can't tell someone that they need an overhaul when their system isn't having problems without explaining, not just telling them what they need to change. If what you say is true, then you should be able to explain why it's correct. To be fair, I did about half of what you told me. The rest I am going to need some explanation on.
 

Staticasaurus

New Member
Summary of changes:

I limited my monitor frame rates to 120 fps. I can't change console frame rates, but I cap game framerates on PC at 60 fps regardless.

I disabled Malwarebytes from starting when windows loads.

I set the CQ level to 15 on the recording tab.

I disabled Psycho Visual tuning on both the streaming and recording tabs.

I changed the profile to "high" on the recording tab.

I removed the extra game/monitor captures.

I changed the mic audio sample rate to "1 channel, 16 bit, 48000 Hz" in my windows settings.

I installed CoreAudio. The CoreAudio line in the log now says "17:15:07.674: [CoreAudio encoder]: Adding CoreAudio AAC encoder"

Explanations needed:
> I need an explanation on why Window's Game mode should be turned on; everywhere else says turn it off.
>I need to know that my recorded video won't be blurry before I lower the quality from Max Quality to Quality.
>I have the rescale output box check in the streaming tab because I am streaming at a lower resolution than I am recording. It is not checked in the recording tab. I need an explanation on how I should accomplish this if this method isn't correct.

>I looked in my capture device settings, I didn't see anything that needs changed based on what you said. I need an explanation of what other audio sampling mismatches there are, and settings in my capture settings I should be looking at specifically.

8 suggestions taken, 4 explanations required.
 

Attachments

  • 2020-12-26 17-32-18.txt
    25.9 KB · Views: 15

rockbottom

Active Member
Starting with Windows 1903, Game Mode should be on if recording games.

Max Quality enables 2 pass, really not needed for CQP. Throughput is almost doubled with the Quality Present, it should help to eliminate the encoding lag you're getting. You'll barely be able to tell the difference.

Having rescaled output checked on the streaming tab is OK. If you don't have it checked on the recording tab, you're good to go.

One of the devices, the framerate wasn't at 60 or 30. Both failed on your current log, not sure what you did there.

Like I said earlier, if you're still getting encoding lag after you update to the Quality Preset, you need to try writing to a different drive. Believe or not, if the drive can't keep up, it will cause encoding lag. Since it's letter is T, I'm assuming it's a USB drive. That alone could be a problem or it could just be a bad drive.
 

Staticasaurus

New Member
Starting with Windows 1903, Game Mode should be on if recording games.

Max Quality enables 2 pass, really not needed for CQP. Throughput is almost doubled with the Quality Present, it should help to eliminate the encoding lag you're getting. You'll barely be able to tell the difference.

Having rescaled output checked on the streaming tab is OK. If you don't have it checked on the recording tab, you're good to go.

One of the devices, the framerate wasn't at 60 or 30. Both failed on your current log, not sure what you did there.

Like I said earlier, if you're still getting encoding lag after you update to the Quality Preset, you need to try writing to a different drive. Believe or not, if the drive can't keep up, it will cause encoding lag. Since it's letter is T, I'm assuming it's a USB drive. That alone could be a problem or it could just be a bad drive.

Its a 10 TB spinning platter SATA HDD that I manually named T for twitch.

So if I am understanding correctly, Max quality is used for CBR or other bit controls?

This current log is with nothing turned on, simply pulled for the settings to show I changed them. I stream on a number of things: Retro consoles running through an upscaler (which is outputting a 1080p30FPS signal), XBox360, PS3, PS4, and Switch. All of those are connected to a single powered HDMI switch, which is outputting directly to the capture card. PC obviously would be captured with a game capture via OBS outside of the capture card. Console frame rate (with maybe the exception of of PS3 and PS4, neither of which were on for either of the logs) can't be changed, its game dependent. PC games are (should be) capped at 60 fps via my graphics card settings.

So I'm not sure what 2 devices youre refering to. Can you paste the line in question? Regardless, I didn't have anything turned on or streaming when I pulled the most recent log.
 

Staticasaurus

New Member
Also, it would have been helpful to say originally that windows released an update (as of middle of November) making game mode ok to use. But between your most recent comment and my googling, I got there. Ill turn it on.
 

rockbottom

Active Member
17:32:19.501: Video Capture Device: data.GetDevice failed
17:32:19.501: Video Capture Device: Video configuration failed
17:32:19.611: Video Capture Device 2: data.GetDevice failed
17:32:19.611: Video Capture Device 2: Video configuration failed

Right, 2 pass should be used for CBR but when you have encoding lag, you need to back off the encoder or live with dropped frames.

Some info you may not be aware of, your 10TB drive could possibly be SMR. If so, I definately recommend you write to a different drive & just use it for archiving.
 

Staticasaurus

New Member
17:32:19.501: Video Capture Device: data.GetDevice failed
17:32:19.501: Video Capture Device: Video configuration failed
17:32:19.611: Video Capture Device 2: data.GetDevice failed
17:32:19.611: Video Capture Device 2: Video configuration failed

Right, 2 pass should be used for CBR but when you have encoding lag, you need to back off the encoder or live with dropped frames.

Some info you may not be aware of, your 10TB drive could possibly be SMR. If so, I definately recommend you write to a different drive & just use it for archiving.

My bad, its 8TB. And it's CMR.

https://www.newegg.com/seagate-ironwolf-st8000vn0022-8tb/p/N82E16822179003?Description=8TB NAS hard drive&cm_re=8TB_NAS hard drive-_-22-179-003-_-Product&quicklink=true

I don't understand why you keep talking about dropped frames; if I had dropped frames, OBS would report that, right? It has a dropped frame output in the bottom right that updates in real time. It stayed at zero the entire stream this morning. I know this because I was watching it the entire time. If I am understanding correctly, then dropped frames are not a part of the issue.

I have no idea what those lines are, I have one capture device, not two. El Gato HD60 Pro.
 

rockbottom

Active Member
Really, so you're not dropping frames? The log says otherwise...

11:22:10.084: Output 'adv_stream': stopping
11:22:10.084: Output 'adv_stream': Total frames output: 461472
11:22:10.084: Output 'adv_stream': Total drawn frames: 461092 (461525 attempted)
11:22:10.084: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 433 (0.1%)
11:22:10.084: [rtmp stream: 'adv_stream'] Freeing 4 remaining packets
11:22:10.127: ==== Streaming Stop ================================================
11:22:10.134: warning: 2 frames left in the queue on closing
11:22:10.343: [ffmpeg muxer: 'adv_file_output'] Output of file 'T:/Twitch Streaming Videos/2020-12-26 07-05-45.mkv' stopped
11:22:10.343: Output 'adv_file_output': stopping
11:22:10.343: Output 'adv_file_output': Total frames output: 461532
11:22:10.343: Output 'adv_file_output': Total drawn frames: 461124 (461557 attempted)
11:22:10.343: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 433 (0.1%)
11:22:10.345: Video stopped, number of skipped frames due to encoding lag: 549/923052 (0.1%)
 

Staticasaurus

New Member
Ok. OBS was not reporting the frame correctly on its output then, because regardless of what the log says, that number in the bottom right never changed. It was the first thing I looked at the first time the stuttering happened. The next thing was the bit rate monitor.

That being said, for a 5 hour stream, and based on the length of the stutters, 549 seems right.

It might also not reported them because that log says lagged/skipped, not dropped. Does OBS differentiate between lagged and dropped? If it does, then what I said was accurate. That number never changed because OBS didn't register them as dropped.
 

Staticasaurus

New Member

I was right. I wasn't dropping frames. But that is also irrelevant, because that's a network issue.

It also speaks to needing to back off the encoder. Lagged is GPU overload, and skipped is encoder overload. Both of which might be because I had the encoder set too high. Ill go make those changes.
 
Top