Question / Help Audio Microstuttering

FerretBomb

Active Member
This has been an ongoing issue for a while, and I thought I'd figured it out; unfortunately it appears that it was just a random 'good day'.

Problem is that the audio (and some viewers claim the video) will simply skip for a few milliseconds at a time. Most commonly this presents as a frame or two's worth of audio just disappearing. Other times it presents with a soft pop, or click. Easiest to hear when I'm speaking, but it also occurs with the game audio (synchronized).
It's very subtle and only seems to happen erratically every 10-30 seconds or so, but it seems to add up over time, potentially leading to a growing-delay issue where my viewers will fall further and further behind until the video player will just 'give up' and stop playing the stream.

I suspect it may be related to the duplicated frame count (over 2% duplicated) listed in the log. This is not a high CPU or GPU issue, as the former normally stays between 60-80% usage with no cores peaking, and the GPU normally hovers at 60-70%.

Logfile: https://gist.github.com/0ccbbbd4d4b771e50c8c (I have run this through the Analyzer, none of the three possible-problems apply in this case; likewise threads=10 is an i7 optimization and the issue occurs with or without it)
VOD of the issue in-action: http://www.twitch.tv/ferretbomb/v/4809783?t=1h13m0s (all three versions, mute/pop/click are audible within ~1 minute)
Highlight demonstrating the issue with game audio: http://www.twitch.tv/ferretbomb/v/4766568

Can confirm that the issue is present in local recordings too, so it doesn't appear to be a Twitch-side problem, even if it may be having a Twitch-side effect.
 
Last edited:
Constant Frame Rate is off. That could be it right there.

Duplicate Frames are almost a CPU/GPU problem by definition. But there first thing I'd do for troubleshooting this is to get rid of all those scenes and other crap and just stream the game with nothing else. If it still occurs, you've eliminated all of them as a possible reason. Also check to see when you do that if your duplicated frames percentage drops.

When things go wrong I like to simplify as much as possible, see if the problem now occurs or doesn't occur, and then assuming the problem went away, add back the complexity step by step. If the problem still occurs after you've simplified things as much as possible, you have a very specific place to look for the problem.
 
does your sound card output run at Audio Format: 44100 Hz natively? I would try and set this to 48KHz if your sound card uses that (most do).I've heard that this can cause issues if not set the same on all audio devices.
https://twitter.com/R1CH_TL/status/578978456601534464 Even though you have a good PC, it only helps to set this correctly.

I'm still not fond of the idea of you syncing audio to video. when your audio gets ahead or behind audio when it syncs back up, it will tend to skip for a moment while resyncing right?

EDIT: Also, you do have a few messages about global sources, which can also cause desync issues, I usually set all my pictures, gifs and other non-game contant to global as well
 
Last edited:
Constant Frame Rate is off. That could be it right there.

Duplicate Frames are almost a CPU/GPU problem by definition. But there first thing I'd do for troubleshooting this is to get rid of all those scenes and other crap and just stream the game with nothing else. If it still occurs, you've eliminated all of them as a possible reason. Also check to see when you do that if your duplicated frames percentage drops.

When things go wrong I like to simplify as much as possible, see if the problem now occurs or doesn't occur, and then assuming the problem went away, add back the complexity step by step. If the problem still occurs after you've simplified things as much as possible, you have a very specific place to look for the problem.
Far as it was explained to me, CFR is only useful when you're going to be editing a video afterward with a suite like Sony Vegas which can't deal with variable framerate. CFR is likely to result in more duplicated frames in a slow-capture situation. Likewise with empty-scening it, it's worth a shot. Most of the assets are just standard PNGs though, and really shouldn't cause an issue.

Any ideas on what actually causes the duplicate frames to occur, in the absence of a high-load CPU or GPU state?

does your sound card output run at Audio Format: 44100 Hz natively? I would try and set this to 48KHz if your sound card uses that (most do).I've heard that this can cause issues if not set the same on all audio devices.
https://twitter.com/R1CH_TL/status/578978456601534464 Even though you have a good PC, it only helps to set this correctly.

I'm still not fond of the idea of you syncing audio to video. when your audio gets ahead or behind audio when it syncs back up, it will tend to skip for a moment while resyncing right?

EDIT: Also, you do have a few messages about global sources, which can also cause desync issues, I usually set all my pictures, gifs and other non-game contant to global as well
44.1KHz is the standard rate, up to Win7. 48KHz support was only added to OBS in a version some months ago to deal with some niche hardware that didn't support the 44.1 standard.

Without syncing audio to video, desktop audio will drift on my setup for whatever reason. Game audio and gameplay will grow desynchronized over time. Even if you don't like it, it's necessary to keep it enabled.

I may give setting things up as Global a shot, but it's not really a great idea as far as memory usage goes; the assets are only loaded the first time they're used anyway even when set global, so the one-time scene delay error that comes up will not be solved by this. While they could be frontloaded behind the splash screen, loading in a few fairly small PNGs shouldn't cause this sort of logjam. More expect that it's caused by OBS reading the scene config and taking extra time to parse due to the large number of (de-activated) game sources in my Main scene.
 
Capture method and encoding complexity, sometimes a nasty web cam, generally result in duplicated frames, that I recall seeing in threads on this forum. Encoding complexity being CPU and GPU and the kind of video its capturing (FPS harder than RTS). Also just because task manager says its only loaded to 60% doesn't mean there isn't spikes to 100% in there that are too short for task manager to show on its CPU usage graph, but enough to mess things up for the encode.

Man you got a lot of life out of that 920, definitely an underrated CPU, but isn't it time to update your rig? :P
 
Far as it was explained to me, CFR is only useful when you're going to be editing a video afterward with a suite like Sony Vegas which can't deal with variable framerate. CFR is likely to result in more duplicated frames in a slow-capture situation. Likewise with empty-scening it, it's worth a shot. Most of the assets are just standard PNGs though, and really shouldn't cause an issue.

Any ideas on what actually causes the duplicate frames to occur, in the absence of a high-load CPU or GPU state?


44.1KHz is the standard rate, up to Win7. 48KHz support was only added to OBS in a version some months ago to deal with some niche hardware that didn't support the 44.1 standard.

Without syncing audio to video, desktop audio will drift on my setup for whatever reason. Game audio and gameplay will grow desynchronized over time. Even if you don't like it, it's necessary to keep it enabled.

I may give setting things up as Global a shot, but it's not really a great idea as far as memory usage goes; the assets are only loaded the first time they're used anyway even when set global, so the one-time scene delay error that comes up will not be solved by this. While they could be frontloaded behind the splash screen, loading in a few fairly small PNGs shouldn't cause this sort of logjam. More expect that it's caused by OBS reading the scene config and taking extra time to parse due to the large number of (de-activated) game sources in my Main scene.
That odd, both my sound cards, mics etc, default to 48Khz. Something to try at least. duplicate frames could occur during scene changes so I would bet thats what it was. I understand your reasoning I do AV sync. You've explained it well before, but the AV sync along with the 1080p webcam yet streaming I 720; there are things do try that really, in the end will only help you have a better looking stream yet I cant understand why you dont.

I've watched your stream, the 1080p webcam doesn't look 1080 so this would be another thing to lower. I see what you mean about the audio though, it doesn't seem to match up. even with that setting, drifting can usually be fixed by a greater scene buffering but I've also heard that there is a small webcam buffer that you can add, like 10ms that might help this.
either way, I'll check back with your stream in a few days hopefully you can get these things resolved

Capture method and encoding complexity, sometimes a nasty web cam, generally result in duplicated frames, that I recall seeing in threads on this forum. Encoding complexity being CPU and GPU and the kind of video its capturing (FPS harder than RTS). Also just because task manager says its only loaded to 60% doesn't mean there isn't spikes to 100% in there that are too short for task manager to show on its CPU usage graph, but enough to mess things up for the encode.

Man you got a lot of life out of that 920, definitely an underrated CPU, but isn't it time to update your rig? :P
I got one of those 920s laying around somewhere, It was a decent chip
 
Capture method and encoding complexity, sometimes a nasty web cam, generally result in duplicated frames, that I recall seeing in threads on this forum. Encoding complexity being CPU and GPU and the kind of video its capturing (FPS harder than RTS). Also just because task manager says its only loaded to 60% doesn't mean there isn't spikes to 100% in there that are too short for task manager to show on its CPU usage graph, but enough to mess things up for the encode.

Man you got a lot of life out of that 920, definitely an underrated CPU, but isn't it time to update your rig? :P
Not just a flat load-monitor number, I have the per-core graphs and they aren't peaking or even close. Likewise, monitoring GPU load via GPU-Z which runs a graph-over-time. Admittedly could be getting millisecond peaks from somewhere, but normally that would also have other indicators like in-game performance problems.

Upgrade my rig? But it's not even overclocked yet! 920s are pretty well known for being boostable to the 3.5 range reliably.
Seriously though, I've fallen prey to the leapfrog mentality, not wanting to jump in just to have the hardware be instantly obsolete. Keep telling myself I'll do a new build when the R9 300-series comes out. Or when the octocores come down in price. Or when... yeah. In the meantime, I just crank the A/C in the house and let it run a little hot.

That odd, both my sound cards, mics etc, default to 48Khz. Something to try at least. duplicate frames could occur during scene changes so I would bet thats what it was. I understand your reasoning I do AV sync. You've explained it well before, but the AV sync along with the 1080p webcam yet streaming I 720; there are things do try that really, in the end will only help you have a better looking stream yet I cant understand why you dont.

I've watched your stream, the 1080p webcam doesn't look 1080 so this would be another thing to lower. I see what you mean about the audio though, it doesn't seem to match up. even with that setting, drifting can usually be fixed by a greater scene buffering but I've also heard that there is a small webcam buffer that you can add, like 10ms that might help this.
either way, I'll check back with your stream in a few days hopefully you can get these things resolved

I got one of those 920s laying around somewhere, It was a decent chip
Worth a try, indeed. No idea what that'd do, but could just be secret sauce or something. Nope, 44.1 has been the standard for a long while.
And as I explained on the camera last time, running the c920 at 1080 on my system results in a solid, reliable 300ms delay. I do occasionally cast in 1080p, so it does take full advantage of that when I do so. Comes down to that I'd rather not screw with it any time I flip between the two, as I'd said last time. I'll just keep headdesking over here.

My scene buffer was set to 300ms for the longest time, as that was the old default. I only bumped it to 700 recently 'in case it will fix it', and it did nothing either way. Tempted to drop it back down, but then I'd have to explain that too.
 
Not just a flat load-monitor number, I have the per-core graphs and they aren't peaking or even close. Likewise, monitoring GPU load via GPU-Z which runs a graph-over-time. Admittedly could be getting millisecond peaks from somewhere, but normally that would also have other indicators like in-game performance problems.

Upgrade my rig? But it's not even overclocked yet! 920s are pretty well known for being boostable to the 3.5 range reliably.
Seriously though, I've fallen prey to the leapfrog mentality, not wanting to jump in just to have the hardware be instantly obsolete. Keep telling myself I'll do a new build when the R9 300-series comes out. Or when the octocores come down in price. Or when... yeah. In the meantime, I just crank the A/C in the house and let it run a little hot.


Worth a try, indeed. No idea what that'd do, but could just be secret sauce or something. Nope, 44.1 has been the standard for a long while.
And as I explained on the camera last time, running the c920 at 1080 on my system results in a solid, reliable 300ms delay. I do occasionally cast in 1080p, so it does take full advantage of that when I do so. Comes down to that I'd rather not screw with it any time I flip between the two, as I'd said last time. I'll just keep headdesking over here.

My scene buffer was set to 300ms for the longest time, as that was the old default. I only bumped it to 700 recently 'in case it will fix it', and it did nothing either way. Tempted to drop it back down, but then I'd have to explain that too.
haha! true.
 
Well if you're like me you don't update your rig so much as get a new rig and make the old one your dedicated stream PC. :P At this point I'd wait until I see whatever Intel has up its sleeve next though.
 
Back
Top