Audio glitches and losses

Coincident

New Member
Multiple times per stream I get an audio glitch that happens both on the microphone capture and on the desktop audio capture:
Randomly, every couple of minutes, OBS loses about 20ms of audio, resulting in a noticeable click:
obs-sound-bug-waveform.png

The same problem with a spectrogram viewer:
obs-sound-bug-spectogram.png

To simplify testing, I reset the OBS settings and removed all sources:
Problem still happens when recording an empty scene with no sources and blank video. I'm running OBS on an idle high-end computer that is only playing a continuous noise from my hard-drive, and capturing a single source of sound from Desktop Audio without any filters. I record for 7 mins, and the audio glitch appears in the recording, even though the sound playback never interrupted or glitched at all: I was listening during the whole recording.
If I do the same test with another software (Audacity, for example) and record audio from the same source, the problem never occurs. This only happens with OBS.
I started recording at 15:24, the audio glitch occurred at 15:27, I stopped recording at 15:31. There's nothing in the logs between 15:24 - 15:31.
Logs: https://obsproject.com/logs/wk8ti8yAX3QYU6rh

Attachments that may help:

obs-sound-bug.wav - the 5-second segment of the recording where you can hear the glitch happenning
obs-sound-bug-full-recording.mkv - the full 7 min recording in video format

More technical info:
- I have the latest version of OBS. This problem has been happening for years, even with older versions of OBS.
- I have the latest windows 10 updates. This problem has happened with older updates of windows 10.
- I have the latest audio drivers for my sound card: Creative SB X-Fi Titanium.
- Sound playback on my computer has no issues, glitches, nor interruptions.
- I can record audio fine with other audio editing / mixing / recording tools that I use. The problem does not happen there. Only with OBS.
- I am running OBS as an administrator.
- I am recording to .mkv format (AAC audio) at a 48kHz sample rate (Stereo) and with a bitrate of 320.
- My sound device in Windows has a default format of: "24 bit, 48000 Hz (Studio Quality)"
- Here are my audio settings in OBS:
1659384524796.png


Is there a community-known solution to this problem?
Should I report this as a bug to the development part of the forums?

Cheers.
 

Coincident

New Member
Further testing:
I've disabled "Exclusive Mode" on all my devices.
1659456906005.png

But this did not fix anything. The problem still occurs.

I also tried recording sound with OBS and Audacity at the same time, from the same device, in a 7-minute recording. Blank screen like before.
OBS' audio recording glitched 3 minutes in. Audacity's recording was perfect for the entire duration.
So at the moment that OBS' recording fails, other recording software is able to record without problems.

Any inputs or ideas on how to fix this?
 

rockbottom

Active Member
Had the same issue with my old PC. Fix is easy or can be painful, you have (2) options:

Take the soundcard out of the mix & use the on-board Realtek audio. (You may need to update your Realtek driver)

or

Wait for the fix, that will probably never happen.

 

Coincident

New Member
Thank you for the reply @rockbottom ! You were absolutely right: I switch over to my on-board Realtek audio and the problem disappears.

Obviously though, this is no solution. I bought a dedicated sound card for a reason; and it has several audio features that are very useful and work well despite the card's age, and all the other 10+ audio-related apps that I use work fine with it. Only OBS does not.

So in the end this is an OBS bug - it integrates very poorly to my hardware, and apparently to other people's hardware as well.

Edit - let's hope that this yields some results https://github.com/obsproject/obs-studio/issues/4600
But as you said hopes are low tbh.
 
Last edited:

rockbottom

Active Member
Yep, that's why I had a Asus Zonar Essence STX in my old PC.

Personally, I believe it is a hardware issue & what you are hearing/seeing is OBS re-syncing the audio & video.

With my new Z690, I decided not to use a soundcard & bought a mobo with kickass on-board audio.
 

rockbottom

Active Member
Cranked up the Z170, made some audio configuration changes, ran a 15 minute test with Audacity/OBS. It worked, no dropouts, recordings stay perfectly in sync!!

Previously I was sending Digital Audio out from the soundcard to my SSP via S/PDIF (TOSLINK) & capturing the audio directly from the soundcard with OBS.

Now, I routed the audio from the soundcard through the GTX-1660 Super sending the Digital Audio to the SSP via HDMI. Doing this allows Loopbacks from the HDMI out to Audacity & OBS.....
 

Lawrence_SoCal

Active Member
So in the end this is an OBS bug - it integrates very poorly to my hardware, and apparently to other people's hardware as well.
Uh... no
Mind you I'm not a developer, and this may well be an OBS bug... but I doubt it

The fact that other systems work may mean BIOS and/or other's worked around the cards bug. And OBS isn't.
That does NOT equal an OBS bug... just an incompatibility.
All I mean to point out is that your logic is flawed, and conclusion, therefore, is likely in error.

Have you considered a current, supported audio card? And like rockbottom suggests, purchasing from a vendor with a generous return policy
 

Coincident

New Member
Uh... no
Mind you I'm not a developer, and this may well be an OBS bug... but I doubt it

The fact that other systems work may mean BIOS and/or other's worked around the cards bug. And OBS isn't.
That does NOT equal an OBS bug... just an incompatibility.
All I mean to point out is that your logic is flawed, and conclusion, therefore, is likely in error.

Have you considered a current, supported audio card? And like rockbottom suggests, purchasing from a vendor with a generous return policy
Well it looks like someone is tilted for reading "OBS" and "bug" in the same sentence :)
Too bad you have nothing constructive to add, except for copying someone else's suggestion from 2 posts above.

As I mentioned previously, I use tens of other audio applications and all of them work correctly except for OBS, which has the same bug when capturing from the HDMI outputs of my gfx; so no sound card involved there.
But no! My logic is flawed. OBS can't be bugged. The problem must be elsewhere right? :D

So your plan is: tell people to spend their money to buy new hardware. Easy enough to do. It's not your money, right?
BUT make sure that the company has a generous return policy!
Oh, what's that? Are you already expecting that it might not work? :'D
Perhaps it's the fact that dozens of other people have had the same problem with different hardware for over 2 years?

I can already imagine the conversation between me and the sales rep:
Me: "Hello, I want to return my audio card."
Sales rep: "What seems to be the problem?"
Me: "Well, OBS does not work with it."
Sales rep: "Oh, do you have any other applications that work with it?"
Me: "Yes. Everything works. Just not OBS."
Sales rep: "We understand that a piece of software we have nothing to do with is bugged beyond belief and their community has a hard time acknowledging it. But don't worry! We have a GENEROUS RETURN POLICY so we'll transfer your money right back! Please accept some complimentary flowers!"


What a brilliant logic you have there. Loved it. Made my day. xD
Some posts help. Others make you laugh. Both are a plus on my book!
Please keep 'em coming! :'D
 

Coincident

New Member
Cranked up the Z170, made some audio configuration changes, ran a 15 minute test with Audacity/OBS. It worked, no dropouts, recordings stay perfectly in sync!!

Previously I was sending Digital Audio out from the soundcard to my SSP via S/PDIF (TOSLINK) & capturing the audio directly from the soundcard with OBS.

Now, I routed the audio from the soundcard through the GTX-1660 Super sending the Digital Audio to the SSP via HDMI. Doing this allows Loopbacks from the HDMI out to Audacity & OBS.....
Thanks for the input. I've tried recording on the HDMI outputs, as well as the on-board card's SPDIF, and I ran into the same problem; although the SPDIF seems to cause smaller audio interruptions (2ms instead of 20), which happen a lot more regularly (every 15 seconds, instead of 5min). I think someone also mentioned this problem in the github issue where they're trying to solve the bug (might be 2 in 1). I'm still doing some tests to see if I can work around the problem with routing.

How did you route your own audio from one device to another? Are you using Virtual Audio Cable or another kind of software?
 

Tomasz Góral

Active Member
OBS has very long problems with audio (more like 5 years).
Some times is bad driver, other is routing inside OBS.
Please check new beta 28.
 

Coincident

New Member
OBS has very long problems with audio (more like 5 years).
Some times is bad driver, other is routing inside OBS.
Please check new beta 28.
That was worth a shot. Unfortunately it didn't work. The problem still occurs on the beta 28.

I think that until there's more progress on these 2 pull requests, we won't see a fix, not even on the beta. But judging from the latest posts on that discussion, those 2 branches are still in development/testing (and that's news from 5months ago...)

Until then, I'm trying my luck to find a work-around with audio-routing software. Still didn't find something that works so far.
 

Coincident

New Member
Ok, I've found a workaround to this bug:
1) Set OBS to capture audio one of your on-board playback devices. It should be called "Speakers", but "Digital Audio (S/PDIF)" works too.
2) Use an application to route the audio from your primary sound device to that device.
a) On your recording devices, if you have a "Stereo Mix" or "What You Hear" device, you can right click -> properties, and then activate the option to "Listen to this device" and choose your on-board playback device on the drop-down box.
b) You may download Virtual Audio Cable (scroll down to the "Lite" download if you want a free version), and after you install it, use the application called "Audio Repeater (MME)" to send the audio signal to your on-board device.
c) Do you know of other (better) applications that can do this job? Please share your experience.​
Obviously this is just a nasty workaround which introduces extra complexity and software to dodge OBS' bugs; hopefully those will be fixed in the future and this "hack" won't be needed anymore.

Now, I still get tiny (< 1ms) audio clicks when using solutions "2) a)" and "2) b)", but they're almost not noticeable at all. These are not the fault of OBS because if I capture the same audio with Audacity I also hear those clicks in the recorded audio. I assume these artifacts come from the audio-repeater software. I wonder if there are other, better alternatives than the 2 I posted above.
 

Bama01

New Member
I only have 2 options for Audio. Audio Input Capture, which shows a microphone, and Audio Output Capture, which shows a speaker. I have tried all sub settings on these two options, but no help. The first time I set OBS up for my Firestick and played a movie I had sound. Ever since then, no sound. I am not a very tecky guy, but have watched all the youtubes for help and tried every setting I can find, including uninstalling and reinstalling OBS. Is there another program available for playing Firestick movies? That is all I want to do on the computer with OBS. Thanks.
 
Top