Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Crackle when browser source is set to "Control audio via OBS" / New: Same for Media Sources with instant sounds #406

Open
TheRealDadbeard opened this issue Jun 11, 2022 · 47 comments
Assignees

Comments

@TheRealDadbeard
Copy link

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

27.2.4

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/yGAxWFqdh0G7zqMf

OBS Studio Crash Log URL

No response

Expected Behavior

No audio crackle

Current Behavior

Audio in browser source that have the option "Control audio via OBS" enabled have distorted/crackling sound when monitoring is enabled. Monitored sound will crackle but not the audio in the output.

Steps to Reproduce

  1. Add a browser source where you can play audio (SoundAlerts for example)
  2. Enable "Control audio via OBS" and "Output and Monitoring"
  3. Play a sound and hear it crackle (shorter ones seem to trigger it more)

Anything else we should know?

I have this issue everytime, doesn't matter if only OBS is running or not. Maybe the new CEF version behaves differently on W11.

@MattyFresh68
Copy link

I'm on win11 and do not get audio distortion/crackle from browser sources. This has been reported, but I think it was specific to things by triggerfyre iirc

@skeletonbow
Copy link

Sounds most likely like it could be mismatched sample rate configuration in Windows, OBS or other parts of the audio stack. This is the usual symptom of that.

@TheRealDadbeard
Copy link
Author

I'm on win11 and do not get audio distortion/crackle from browser sources. This has been reported, but I think it was specific to things by triggerfyre iirc

With "Control audio via OBS" and "Output and Monitoring"?

Sounds most likely like it could be mismatched sample rate configuration in Windows, OBS or other parts of the audio stack. This is the usual symptom of that.

Nope. Everything is on 48khz

@prgmitchell
Copy link

I have reached out in the support channels to troubleshoot when available.

@pkviet
Copy link
Member

pkviet commented Jun 11, 2022

Could you retry the repro steps and upload the log with a clean install without third party plugins ? You can use a portable install of obs to that purpose (download a zip, unzip wherever convenient and launch in portable mode).

@TheRealDadbeard
Copy link
Author

Could you retry the repro steps and upload the log with a clean install without third party plugins ? You can use a portable install of obs to that purpose (download a zip, unzip wherever convenient and launch in portable mode).

Yes I can do that later

@pkviet pkviet self-assigned this Jun 11, 2022
@TheRealDadbeard
Copy link
Author

Okay just did with a clean obs and the same happens.

@NarryG
Copy link

NarryG commented Jun 12, 2022

This is an issue that has been tracked in the past and while it's improved, it's never been fully resolved.

There was a fairly long conversation in one of the beta channels in December where I was showing off these issues, but that channel has been archived/deleted from the Discord. If it's in an archive state a Discord mod should be able to find extensive test-cases alongside audio clips that will cause consistent crackling. If it's been deleted, then it's just another victim of unarchived Discord channels destroying knowledge that could come in handy in the future and I can go digging for test cases again.

This commit obsproject/obs-studio#5648 helped substantially as it removed the crackling from the output, but monitoring will still crackle on occasion.

I'm still facing the same issues. There's large inconsistencies in how much it crackles and when it crackles.

@TheRealDadbeard
Copy link
Author

This is an issue that has been tracked in the past and while it's improved, it's never been fully resolved.

There was a fairly long conversation in one of the beta channels in December where I was showing off these issues, but that channel has been archived/deleted from the Discord. If it's in an archive state a Discord mod should be able to find extensive test-cases alongside audio clips that will cause consistent crackling. If it's been deleted, then it's just another victim of unarchived Discord channels destroying knowledge that could come in handy in the future and I can go digging for test cases again.

This commit obsproject/obs-studio#5648 helped substantially as it removed the crackling from the output, but monitoring will still crackle on occasion.

I'm still facing the same issues. There's large inconsistencies in how much it crackles and when it crackles.

Yeah I have had this issue for years, never to be completely fixed for me but it's very consistent for me with fast sounds. Thats why it is so noticeable for me when someone triggers a soundalert.

@NarryG
Copy link

NarryG commented Jun 12, 2022

This is an issue that has been tracked in the past and while it's improved, it's never been fully resolved.
There was a fairly long conversation in one of the beta channels in December where I was showing off these issues, but that channel has been archived/deleted from the Discord. If it's in an archive state a Discord mod should be able to find extensive test-cases alongside audio clips that will cause consistent crackling. If it's been deleted, then it's just another victim of unarchived Discord channels destroying knowledge that could come in handy in the future and I can go digging for test cases again.
This commit obsproject/obs-studio#5648 helped substantially as it removed the crackling from the output, but monitoring will still crackle on occasion.
I'm still facing the same issues. There's large inconsistencies in how much it crackles and when it crackles.

Yeah I have had this issue for years, never to be completely fixed for me but it's very consistent for me with fast sounds. Thats why it is so noticeable for me when someone triggers a soundalert.

The browser source also doesn't pass the the first (I believe) 3 packets to OBS. This was an issue discovered and once again is buried in the archived beta channel on Discord as it was never turned into an issue. It appeared to be Chromium. Nobody could comment if it was related to that for sure, but we were unable to build a reliable test case beyond short audio clips for alerts were the worst.

If any of the devs can comment if that channel still exists and is archived (was the beta channel around December of 2021) , I can turn the information we debugged then into proper issues if it can be made available.

@pkviet
Copy link
Member

pkviet commented Jun 12, 2022 via email

@TheRealDadbeard
Copy link
Author

Would be great to see this finally fixed

@TheRealDadbeard
Copy link
Author

Some new information from me:

I moved some of my audio alerts over to simple media sources that get triggered by events. I noticed the same crackle appers on them too. Any source that seem to play a sound immediately it becomes active will crackle. There is no difference in what plugins are installed or the newest beta.

It crackles every single time but as always only for monitoring. Output is clean like 99%, very seldom a crackle there.

@TheRealDadbeard TheRealDadbeard changed the title Audio Crackle when browser source is set to "Control audio via OBS" Audio Crackle when browser source is set to "Control audio via OBS" / New: Same for Media Sources with instant sounds Aug 4, 2022
@Nikoheartttv
Copy link

Happens to me as well. Trying to pass through Text-to-speech through the Control Audio via OBS and it always initially crackles. Goes for any sound to be honest

@Nikoheartttv
Copy link

Just wanted to bump this, this is still happening in OBS 28.0.2

@maelstromALPHA
Copy link

maelstromALPHA commented Sep 30, 2022

I have had this issue for years now and I'm still getting audio popping/crackling whenever a sound initially plays from a browser source, as of the most recent version. Hope to see a fix soon!

@prenetic
Copy link

prenetic commented Oct 14, 2022

Same thing here with 28.0.3, have been pulling my hair out trying to determine the cause but this is exactly the scenario where it's occurring. Browser sources that are set to "Control audio via OBS" since I don't have the option to adjust levels at the source itself and need to reduce the gain.

Running 21H2 (22000.1098) Windows 11 build as of this post as well.

@gnkidwell
Copy link

Having this exact same issue with OBS 28.0.3… Any browser source with Control Audio via OBS is creating choppy audio… with that unchecked no issues with any of the browser sources…

@Fenrirthviti
Copy link
Member

Moving this original report here so it's easier to find.

@leonardcoutinho
Copy link

I have this same behavior, but I think its with windows 11 problem, same Pc with w10 don't have this. Tested in 4 PCs, i5 10400 with rtx 3060(w11, audio crack), r5 5600g +rx6600(audio ok, w10)(with w11 audio crack too, but i have to reinstal os then I put w10), r5 2500u(w10, audio ok), i5 10gen+gtx1650m(w10, audio ok too).

@kiznal
Copy link

kiznal commented May 28, 2023

I had no issue with this for a very long time, but just a week or two ago it has reappeared for me. Currently running Win 10. I uninstalled SE.live extension to ensure that issue was in vanilla OBS and it does indeed still persist.

I'm also struggling to get Browser Source audio to output when I have the "Control Audio via OBS" setting unchecked (monitoring seems okay), but perhaps this is a separate issue.

@Aeon1704
Copy link

Aeon1704 commented Jul 31, 2023

Have same on OBS 29.1.3. All the web-source alerts and even the local files will crackle on play. Only solution to fix it is to disable OBS Volume Control. Win10.

@MM102
Copy link

MM102 commented Aug 4, 2023

I'm also experiencing this with browser sources in OBS 29.1.3. I'd love for this to get fixed if possible.

@Nucktrooper
Copy link

I have the same issue. I developped a playlist I import in OBS as browser source and it always crakle after a long time.

@pkviet
Copy link
Member

pkviet commented Oct 24, 2023

Some new information from me:

I moved some of my audio alerts over to simple media sources that get triggered by events. I noticed the same crackle appers on them too. Any source that seem to play a sound immediately it becomes active will crackle. There is no difference in what plugins are installed or the newest beta.

It crackles every single time but as always only for monitoring. Output is clean like 99%, very seldom a crackle there.

Oh , seems I had overlooked that important comment.
So it seems it's a monitoring issue and NOT a browser source issue per se.
If the output is clean, it's a game changer imo.
Can others having the crackle confirm that their outputs is clean ?

@leonardcoutinho
Copy link

Some new information from me:
I moved some of my audio alerts over to simple media sources that get triggered by events. I noticed the same crackle appers on them too. Any source that seem to play a sound immediately it becomes active will crackle. There is no difference in what plugins are installed or the newest beta.
It crackles every single time but as always only for monitoring. Output is clean like 99%, very seldom a crackle there.

Oh , seems I had overlooked that important comment. So it seems it's a monitoring issue and NOT a browser source issue per se. If the output is clean, it's a game changer imo. Can others having the crackle confirm that their outputs is clean ?

I will test again but my issue is in output, monitoring was okay last time I have this problem

@prgmitchell
Copy link

Some new information from me:
I moved some of my audio alerts over to simple media sources that get triggered by events. I noticed the same crackle appers on them too. Any source that seem to play a sound immediately it becomes active will crackle. There is no difference in what plugins are installed or the newest beta.
It crackles every single time but as always only for monitoring. Output is clean like 99%, very seldom a crackle there.

Oh , seems I had overlooked that important comment. So it seems it's a monitoring issue and NOT a browser source issue per se. If the output is clean, it's a game changer imo. Can others having the crackle confirm that their outputs is clean ?

I have tested again and confirmed it is both monitoring and output, here you can hear when I minimize OBS that it starts to crackle.
https://obsproject.com/logs/RkOlSXAWMwjecDSf

2023-10-26.10-56-36.mp4

@pkviet
Copy link
Member

pkviet commented Oct 26, 2023

Some new information from me:
I moved some of my audio alerts over to simple media sources that get triggered by events. I noticed the same crackle appers on them too. Any source that seem to play a sound immediately it becomes active will crackle. There is no difference in what plugins are installed or the newest beta.
It crackles every single time but as always only for monitoring. Output is clean like 99%, very seldom a crackle there.

Oh , seems I had overlooked that important comment. So it seems it's a monitoring issue and NOT a browser source issue per se. If the output is clean, it's a game changer imo. Can others having the crackle confirm that their outputs is clean ?

I have tested again and confirmed it is both monitoring and output, here you can hear when I minimize OBS that it starts to crackle.
https://obsproject.com/logs/RkOlSXAWMwjecDSf

2023-10-26.10-56-36.mp4

@prgmitchell
That's additional info you're giving. You minimize obs.
Does the bug occur if you don't minimize obs ?
If it doesn't, it'll be a strong hint it's qt related.

@TheRealDadbeard
Copy link
Author

Some new information from me:
I moved some of my audio alerts over to simple media sources that get triggered by events. I noticed the same crackle appers on them too. Any source that seem to play a sound immediately it becomes active will crackle. There is no difference in what plugins are installed or the newest beta.
It crackles every single time but as always only for monitoring. Output is clean like 99%, very seldom a crackle there.

Oh , seems I had overlooked that important comment. So it seems it's a monitoring issue and NOT a browser source issue per se. If the output is clean, it's a game changer imo. Can others having the crackle confirm that their outputs is clean ?

Yeah this whole issue was based around this from the beginning. I would trigger sounds that would crackle in the monitoring but output was fine moste of the time. It could seep in the output but it was VERY rare for me on my system.

I just tried it right now on one of my media files and monitoring would crackle while output is clean. I have a GoXLR and use the "Game" device to monitor in OBS. I moved all of my trigger sounds to a external app for quite some time now because of this issue.

@leonardcoutinho
Copy link

I use an google meet webconference in browser source, to remove background with custom css, but If I check option to control audio it crackle in output after some seconds or minutes. This occured most on W11.

@prgmitchell
Copy link

Some new information from me:
I moved some of my audio alerts over to simple media sources that get triggered by events. I noticed the same crackle appers on them too. Any source that seem to play a sound immediately it becomes active will crackle. There is no difference in what plugins are installed or the newest beta.
It crackles every single time but as always only for monitoring. Output is clean like 99%, very seldom a crackle there.

Oh , seems I had overlooked that important comment. So it seems it's a monitoring issue and NOT a browser source issue per se. If the output is clean, it's a game changer imo. Can others having the crackle confirm that their outputs is clean ?

I have tested again and confirmed it is both monitoring and output, here you can hear when I minimize OBS that it starts to crackle.
https://obsproject.com/logs/RkOlSXAWMwjecDSf

2023-10-26.10-56-36.mp4

@prgmitchell That's additional info you're giving. You minimize obs. Does the bug occur if you don't minimize obs ? If it doesn't, it'll be a strong hint it's qt related.

Looking at the original issue, I think the two might be different actually? This happens for me when OBS is minimized or covered up. I know there was some discussion off-thread that indicated this might be an issue with Windows de-prioritizing audio from the browser window as a power saving type feature but I don't remember where that discussion landed.

@pkviet
Copy link
Member

pkviet commented Oct 26, 2023

Looking at the original issue, I think the two might be different actually? This happens for me when OBS is minimized or covered up. I know there was some discussion off-thread that indicated this might be an issue with Windows de-prioritizing audio from the browser window as a power saving type feature but I don't remember where that discussion landed.

oh that's right. It's been a while so I had forgotten. Agreed, it could well be related to windows doing some power saving.
A way to check that theory would be to tweak the power saving settings in windows and see whether the bug can be repro'd when all optimizations are off.

@vishnuvardhan33
Copy link

I was looking for a solution since 6 months and just couldn't find a thread that has the same problem as mine. I found it now but there's no solution in it. still facing same issue in obs 30.0.2 running on win 11. add a browser source and enable control audio via obs. switching windows from obs or minimizong obs makes the audio to crackle/change pitch. this can be solved if i disable control audio via obs and depend on desktop audio but the reason i use browser source is because i don't want unnecessary destop sounds like notifications or alerts to get into the recording. all these days i used an app to keep obs on top all the time, it has an option to make obs transparent and also 'click-through' which technically means i'm not switching from obs so it doesn't crackle. but this is a very hectic process if i have to access other apps, i'll have to click 'enable transparency', 'enable click-trough' and then to use obs again i'll have to disable both again. the app is : https://github.com/WindowTop/WindowTop-App/releases it'll show a critical security risk while installing but enabling it didn't affect me and it works well. I'm still searching for the solution to this issue did anyone find one?

@DmitriyFrogo
Copy link

DmitriyFrogo commented Jan 26, 2024

I have 2.5 workarounds in my head, both need testing

Idea 1
Install win-capture-audio plugin and add obs-browser-page.exe
(We could use built-in App Capture (BETA), but it can't find OBS related windows ¯_(ツ)_/¯)
https://github.com/bozbez/win-capture-audio

Idea 2
My motherboard have onboard Realtek sound chip
It have feature called "2nd Output" to reroute sound to front panel
Enable this feature, add "2nd output" source to OBS, enable "monitoring and output", and reroute obs-browser-page.exe to this output

Idea 2.5
Same as 2, but using Virtual Audio Cable and reroute "obs-browser-page.exe" to it

I quick test both ideas (without 2.5) - no issues (I expected audio doubling which didn't happen)
But keep in mind that "Idea 1" tricks covers whole obs-browser sounds, and win-capture-audio plugin was noticed (very rarely) cracking over time (you can fix it by readding obs-browser-page.exe)
Ideas 2 and 2.5 covers all sounds from dedicated sound outputs, so you need to monitor that obs-browser-page.exe rerouting to it
Also we can expect delays in audio monitoring - sound that you hear can have audio/video desync if you watch OBS window, but not for stream viewers or recordings (you don't need to fix this by adding delay)

I prefer first idea and start deep testing from now, until we can't find global fix

upd.: Forgot to say
It only works if you don't using Desktop Audio
You need to disable or mute it and start to separate all sound sources

@verdammtigor
Copy link

I have the same problem. But it disappears completely if you run obs as administrator

@polyh3dron
Copy link

I'm dealing with this too.

@Aeon1704
Copy link

Aeon1704 commented Feb 21, 2024

I'm dealing with this too.

Workaround with https://github.com/bozbez/win-capture-audio actually works. You need to disable OBS sound control in browser sources. Add win-capture-audio source in your scene, open settings for plugin, then send a test alert or something to make obs-browser-page.exe play some sound. Select and add that process in win-capture-audio source, set it to output only, and you good. I don't have crackles any more with this workaround, and it's actually more comfortable. One filter setting for all alerts from different services.

It works for browser sources atleast, and you can add game process into that plugin too. But it seems that native Beta Game Audio source doesn't suffer from crackles.

@vishnuvardhan33
Copy link

I'm fine with running obs as administrator. Fixed the crackling for me. It's been a month and no issues at all.

@Aeon1704
Copy link

I'm fine with running obs as administrator. Fixed the crackling for me. It's been a month and no issues at all.

That didn't help to me. But win-capture-audio did. Maybe giving administrator to obs-browser-page.exe will, but plugin more comfortable anyway.

@polyh3dron
Copy link

I'm dealing with this too.

Workaround with https://github.com/bozbez/win-capture-audio actually works. You need to disable OBS sound control in browser sources. Add win-capture-audio source in your scene, open settings for plugin, then send a test alert or something to make obs-browser-page.exe play some sound. Select and add that process in win-capture-audio source, set it to output only, and you good. I don't have crackles any more with this workaround, and it's actually more comfortable. One filter setting for all alerts from different services.

It works for browser sources atleast, and you can add game process into that plugin too. But it seems that native Beta Game Audio source doesn't suffer from crackles.

It appears that your workaround plugin introduces major audio issues after 30 minutes of use.

@verdammtigor
Copy link

I'm dealing with this too.

Workaround with https://github.com/bozbez/win-capture-audio actually works. You need to disable OBS sound control in browser sources. Add win-capture-audio source in your scene, open settings for plugin, then send a test alert or something to make obs-browser-page.exe play some sound. Select and add that process in win-capture-audio source, set it to output only, and you good. I don't have crackles any more with this workaround, and it's actually more comfortable. One filter setting for all alerts from different services.

It works for browser sources atleast, and you can add game process into that plugin too. But it seems that native Beta Game Audio source doesn't suffer from crackles.

can you tell me more about how to enable it.
after I added win-capture-audio source in scene.
where exactly are the "settings" for the plugin?
and how to send a test alert to make obs-browser-page.exe play some sound.

@Aeon1704
Copy link

Aeon1704 commented Feb 21, 2024

It appears that your workaround plugin introduces major audio issues after 30 minutes of use.

Never had any of it. But plugin handles only Browser-related notification from streamelements and triggerfyre. Otherwise i use Game Audio Beta for game and Non-Global Microphone. And no Global Sound settings enabled.

can you tell me more about how to enable it.
after I added win-capture-audio source in scene.
where exactly are the "settings" for the plugin?
and how to send a test alert to make obs-browser-page.exe play some sound.

Install plugin into your obs as any other plugin. Start obs, open your scene and add win audio capture for process in your scene. Right click on it and go properties Any services like streamelements allow you to send test notification so plugin can detect obs-browser-page.exe as process with sound. Add it into the list and thats it.

Sadly, native Game Audio doesn't allow you to choose process which doesn't have active window.

@polyh3dron
Copy link

I'm dealing with this too.

Workaround with https://github.com/bozbez/win-capture-audio actually works. You need to disable OBS sound control in browser sources. Add win-capture-audio source in your scene, open settings for plugin, then send a test alert or something to make obs-browser-page.exe play some sound. Select and add that process in win-capture-audio source, set it to output only, and you good. I don't have crackles any more with this workaround, and it's actually more comfortable. One filter setting for all alerts from different services.
It works for browser sources atleast, and you can add game process into that plugin too. But it seems that native Beta Game Audio source doesn't suffer from crackles.

can you tell me more about how to enable it. after I added win-capture-audio source in scene. where exactly are the "settings" for the plugin? and how to send a test alert to make obs-browser-page.exe play some sound.

if your browser source is using StreamElements or Streamlabs, both those sites have a function where it can emulate the conditions to trigger the alerts.

@Aeon1704
Copy link

Idea 1 Install win-capture-audio plugin and add obs-browser-page.exe (We could use built-in App Capture (BETA), but it can't find OBS related windows ¯_(ツ)_/¯) https://github.com/bozbez/win-capture-audio

So i am using this workaround. Latest Win10. Without OBS Sound control, browser alerts will not go into stream since i don't have desktop\global sounds. Browser alerts will go into stream if OBS Sound Control Enabled, but it will crackle. Plugin mentioned above actually helps me remove crackle while OBS Sound Control for Browser sources disabled. But i use it only for obs-browser-page.exe.

@polyh3dron
Copy link

Idea 1 Install win-capture-audio plugin and add obs-browser-page.exe (We could use built-in App Capture (BETA), but it can't find OBS related windows ¯_(ツ)_/¯) https://github.com/bozbez/win-capture-audio

So i am using this workaround. Latest Win10. Without OBS Sound control, browser alerts will not go into stream since i don't have desktop\global sounds. Browser alerts will go into stream if OBS Sound Control Enabled, but it will crackle. Plugin mentioned above actually helps me remove crackle while OBS Sound Control for Browser sources disabled. But i use it only for obs-browser-page.exe.

I completely forgot that I can enable Desktop Audio for this. That's going to be my workaround. Thanks!

@kukalikuk
Copy link

For those who got audio glitch with OBS browser sound control enabled and then minimized OBS, I confirmed that starting OBS as admin will eliminate this glitch. In my use case, no more audio glitch with OBS minimized.

@Nepann
Copy link

Nepann commented Apr 18, 2024

The same thing, I just need a browser with sound control via the obs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests