obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
58.67k stars 7.81k forks source link

[Application Audio Capture (beta)] Sound becomes noisy after a long time #8064

Open AlexPresso opened 1 year ago

AlexPresso commented 1 year ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

29.0.0

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/oF4ofzG6VIEKsq24 and https://obsproject.com/logs/Rfepmf1mNnWVYiE9

OBS Studio Crash Log URL

No response

Expected Behavior

Application audio capture should not send noisy audio

Current Behavior

When using application audio capture (beta) to record the Discord audio and send it through NDI, the audio capture works fine with a clean and perfect audio quality, but after a certain amount of time (like around 30 minutes) the audio is getting noisy.

Here is a clip where you can hear my friend's voice being noisy: https://clips.twitch.tv/ProudImpartialHyenaOpieOP-G7_zZ-l1EyINMDSD

Editing the application audio capture settings, like chosing another application to capture and then chosing back Discord fixes the issue until it starts to be noisy again (~30 min later)

Steps to Reproduce

  1. Create two "Application audio capture (beta)", one for Discord and one for the game
  2. Stream for around 30 min or more
  3. The Discord audio will start to get noisy

Anything else we should know?

I'm currently using two Application Audio Capture (beta):

I don't thing it could be an NDI issue, all the other audio sources are working perfecly. Also didn't had the issue in OBS 28

RytoEX commented 1 year ago

To diagnose this, we would likely need someone affected to follow these steps: https://github.com/obsproject/obs-studio/pull/5218#issuecomment-1071522440

pandages commented 1 year ago

I'm having the Noisy after 30-ish minutes issue with this audio capture method. Are you still looking for logs? I can capture you some if so.

ernespa commented 1 year ago

I'm experiencing this exact same issue, also with Discord. Applying the suggested solution (change the audio source to other application and then back to Discord) only fixes it for a few minutes, I had to do it multiple times in my last streaming.

Is this issue being investigated?

liketop commented 1 year ago

I have the same problem. Only with me it is also partially with the game audio (Tarkov), Spotify and Discord.

I use OBS 29.

Is there anything I can do to help solve the problem?

botanegg commented 1 year ago

The same bug, but only at the beginning of the stream.
Sound becomes normal after a while.
Windows 10, OBS 29.0.2

S64 commented 1 year ago

Same issue here. Sorry for the lack of information, but I would like to share the situations when I tested it.

My environment is Windows 11 Pro 22H2 22621.1555.

RytoEX commented 1 year ago

For those able to reliably reproduce this, please provide a regular OBS log and a link to a video that exhibits this issue. If you are able to do so, please also follow these additional troubleshooting steps:

  1. Download obs.wprp.zip and extract obs.wprp. Do not use the obs.wprp/obs.wprp.zip file linked in #5218 as it is now outdated.
  2. From an admin command prompt at the location of obs.wprp, enter: wpr -start obs.wprp
  3. Start the scenario (start OBS and start streaming/recording). Keep capturing until the problem occurs.
  4. After the problem has occurred, in the admin command prompt, enter: wpr -stop repro.etl
  5. Provide repro.etl to us privately since it may contain personal information. You can find us in Discord: https://discord.com/invite/obsproject
  6. Optional: Provide extracted audio from the recording.

@S64 That you were unable to reproduce this on OBS Studio 28.1.2 is probably just by chance. This issue has been reported since before the #5218 was merged (see this comment), and the third-party win-capture-audio plugin also exhibits this issue.

xPolar commented 1 year ago

Is there a known fix to this, or anything to combat it?

SuslikV commented 1 year ago

4. After the problem has occurred, in the admin command prompt, enter: wpr -stop repro.etl

Is this step should be done in the middle of the "crackling"? Because crackling may gone by itself.

RytoEX commented 1 year ago

Is there a known fix to this, or anything to combat it?

Not at this time.

  1. After the problem has occurred, in the admin command prompt, enter: wpr -stop repro.etl

Is this step should be done in the middle of the "crackling"? Because crackling may gone by itself.

The important part is that the issue must have occurred. As far as I know, it is not important if you execute wpr -stop repro.etl during or after the issue, just so long as the issue has started.

SuslikV commented 1 year ago

Recorded inside VirtualBox environment.

obs_Issue8064_rec_etl_log_7z_file_LZMA.zip

obs_Issue8064_rec_etl_log_7z_file_LZMA.zip, 7-zip archive, about 14.9 MB to download, MD5:AEEE3F36C5C89AB195C3CAEE826DF11F (file extension is .zip instead of .7z to be able to upload it here)

Inside: 1) OBS log "2023-05-28 00-23-14.txt";

2) Windows Performance Recorder "repro.etl";

3) Record "2023-05-28 00-23-29.mp4" (fragmented, software x264, two AAC tracks, both tracks configured to record same sound (that playbacks by the system), 1kHz tone);

OS: Default Format in shared mode 44.1kHz

OBS: Audio 48kHz

OBS setup (test files): https://obsproject.com/forum/threads/audio-crackling-at-ranom-interval-with-application-audio-capture.166472/post-613393

charlesphil commented 1 year ago

I sent my repro.etl and links to my log and VOD to Mitchell (Yolo#0420) on the Discord server (EDIT: on May 18th), but I figured I'd post my log and VOD here as well for visibility:

Log: https://obsproject.com/logs/STVOABsm4rIFhiLd

VOD: https://www.twitch.tv/videos/1823568935 (issue starts around 1:03:00)

5. Provide repro.etl to us privately since it may contain personal information.

If for some reason the other people in this thread haven't seen my repro.etl yet, please reach out to me at aelius on the OBS Discord server.

nunowonder commented 1 year ago

I exactly have the same problem, but because it's random, and because in my setup I have the source muted to my monition (I listen directly form the font) then I just have to rely on my viewers that will tell me if the sound is not good, but this is very annoying because I do have a lot of work to have the perfect sound... here's my example:

This is when the audio problem starts (it can start rendomly at any time, or simply not happen): https://www.twitch.tv/peeempeegee/clip/EncouragingAntediluvianGoldfishKappaWealth-qvsaQ0sxwwdMcNRb?filter=clips&range=7d&sort=time

And this is when someone from my viewers tells me, and i just select randomly another Scene Collection,, turn back, and voila: https://www.twitch.tv/peeempeegee/clip/SmoothAttractiveWoodpeckerResidentSleeper-mFrOH5m33-qkkpMw?filter=clips&range=7d&sort=time

SuslikV commented 1 year ago

Few additional tests and results. Recorded inside VirtualBox environment.

Results (total size is about 2 GB of uncompressed data - lossless .avi recording + .etl + OBS config folder): 16.7 MB, MD5:D08027B0CE4CB0C6356BF9082C95EF03 16.8 MB, MD5:8B1189C2DBECE0B09B376F1F8685B681 17.8 MB, MD5:3154A30E960529072E489ACA86F3B49A 17.1 MB, MD5:8FA125EA1E633DA3A1E3F9A36B54791B obs44100_win44100_file44100.zip obs44100_win44100_file48000.zip obs48000_win44100_file44100.zip obs48000_win44100_file48000.zip

Description of results

In each case "crackling" lasts for about 30 seconds.

OS: Audio - Default Format in shared mode 44100 Hz, 16-bit in all tests

Test files (1 kHz on left channel, 0.6 amplitude, sinus; 250 Hz on right channel, 0.6 amplitude, sinus, sound played back from OBS .lua script, via "ffi" module by loading "Winmm", PlaySound function): 93.8 KB, MD5:FB5DCDC55A1FC759EEB74FD61BB54493 Issue #8064 (test files 44100-48000).zip

(all archives has .zip file extension instead of .7z just to be able to upload it here)

Steps for the Test files:

  1. Download the Issue #8064 (test files 44100-48000).zip archive, ~93.8 KB, MD5:FB5DCDC55A1FC759EEB74FD61BB54493 (see above). Change file extension form ".zip" to ".7z" and unpack its contents to the "C:\Temp" folder (make the one if it doesn't exist). If all done OK you will find: C:\Temp\Issue #8064 (test files 44100-48000)\testApplicationAudioCaptureBeta48000.lua and other files)
  2. Reduce volume of the PC and run OBS (test script includes sound files at 1000Hz and 250Hz that are awful for ears)
  3. Import Profile from folder named "test_Application_Audio_Capture_BETA_NNNNN_8064" (here NNNNN is 48000 or 44100)
  4. Import Scene Collection file named "test_Application_Audio_Capture_BETA_NNNNN_8064.json" (here NNNNN is 48000 or 44100)
  5. Switch to Profile named test Application Audio Capture (BETA) NNNNN #8064 (here NNNNN is 48000 or 44100 from p.3)
  6. Switch to Scene Collection named test Application Audio Capture (BETA) NNNNN #8064 (here NNNNN is 48000 or 44100 from p.4)
  7. Click Start Recording button (default destination for files is "C:\Temp", you may change it in OBS Settings > Output, but don't touch other settings!). Your PC will start to play looped sound of 1000Hz L + 250Hz R.
  8. Open main menu Tools > Scripts and select the "testApplicationAudioCaptureBetaNNNNN.lua" script (here NNNNN is 48000 or 44100 from p.4)
  9. In the properties of the script click the "Start disturb timer" button
  10. In 5 sec the Preview of OBS will be disabled and enabled again in 200 ms, again and again. Then in 5 sec process will repeat (infinity loop)
  11. Wait until crackling appear in the recording (about 2-120 minutes)
  12. Click Stop Recording button
  13. Exit OBS
  14. Add recorded .mp4 file to your favorite audio editor (or playback the file) to check if 1000Hz recorded signal has any anomalies (first stereo track is Application Audio capture (BETA), second is reference Desktop Audio)

Notes:


My own thoughts VirtualBox is not ideal place for the tests, OS is not up to date, but at least it shows difference between Desktop Audio track2 (wasapi_output_capture) and Application Audio Capture (BETA) track1 (wasapi_process_output_capture, top on the screenshots). Users who experience the issue usually says that they can't detect the sound corruption until they play back the recording or stream, so theirs desktop audio is normal, same as in my results. I decided to make lossless recording to exclude AAC encoder's compression and to be able to see what is really going on with the samples.

Screenshots of the results ![obs_app_audio_capture_(beta)_vs_device_capture01](https://github.com/obsproject/obs-studio/assets/19683044/448e0351-3b55-43e7-9df2-0b3b195a109a) ![obs_app_audio_capture_(beta)_vs_device_capture02](https://github.com/obsproject/obs-studio/assets/19683044/9fffb94e-d59b-4f59-b418-acde5f9bf90c)

It's all I can do right now.

Fenrirthviti commented 1 year ago

Test results inside VMs are unusable, unfortunately. This needs to be replicated on a native Windows install, not a VM.

nunowonder commented 1 year ago

@Fenrirthviti Still, the problem is real on windows environment. Happens to me using the last obs version in windows 10 updated. @SuslikV we cannot detect in real time because we are capturing in OBS but playing sound from the application, so in OBS the audio monitor is muted (if not we would listen the source 2 times, and even with almost no latency, it would be a mess). That’s why normally I have someone on chat saying to me that the sound is weird… the only thing I know to stop the weird sound is if I change “scene collection” in obs and return to the same almost immediately, the problem is gone. But we really need this to be fixed… or at least understand what is going on so we have measures to fight against the problem until it’s not corrected. Feel free to ask me for help, I’ll do anything to have this corrected.

SuslikV commented 1 year ago

@nunowonder @charlesphil I looked at your twitch media files and I see increased amplitude of samples and multiplication to 0 of some of them - that sounds for me like "crackles". It is not like data was substituted by some random numbers. But of course, this can be my imagination. What happen if you playback test sounds on your PC for hour-two? Does OBS glitch them as well? Or this should be exclusively heavy task like game or browser? Just wonder.

nunowonder commented 1 year ago

@SuslikV it's random. For example, playing trackmania for 1 hour (it can be more, it can be less, you never know), and sound is perfect, the CPU Load is the same, everything is just perfect, and suddenly, crackling sound! Because I'm live streaming, and hearing from the game and not from the monition of OBS, I just know if the problem is happening if someone on my chat tells me. If not, the sound continues crackling... but for example, I play a lot GTAV RP, and that's much more intensive than trackmania, and I think it NEVER happened on GTAV capture... I don't know if there is something about the scene collection of GTAV have more audio sources... Somehow maybe the plugin don't crackle if the scene in OBS have more audio sources (?). It´s really something very strange because we don't know the cause... and it might not happen...

SuslikV commented 1 year ago

@Fenrirthviti if people will be able to reproduce the issue with my synthetic tests but in real PC - will it be fair or only real use case needed (audio grabbing from the game)?

nunowonder commented 1 year ago

@SuslikV and @Fenrirthviti I have it here: https://github.com/obsproject/obs-studio/issues/8064#issuecomment-1575497371

SuslikV commented 1 year ago

@nunowonder As far as I understand, due to special nature of the bug, developers want to gather more evidence to get some pattern. So, highly likely your result already taken into account. But seems it is not enough to resolve the issue. As far as I remember, on the forum there were thoughts that this can be bug from the Microsoft. Probably, you can help more by completing all these steps (in case you didn't do it yet ): https://github.com/obsproject/obs-studio/issues/8064#issuecomment-1519111627

And again, the developers were aware of the issue when feature was introduced in OBS: https://github.com/obsproject/obs-studio/pull/5218/commits/769a29bd1a561ae705091ad3c6fcb481850bc80c comment to this commit says that the Application Audio Capture source:

...Marked as "(BETA)" until we figure out the crackling at 60 minutes.

the issue was reported by user in: https://github.com/obsproject/obs-studio/pull/5218#issuecomment-927004947 and it was confirmed by developer in: https://github.com/obsproject/obs-studio/pull/5218#issuecomment-928904936 So, it is not like your system unique (where you can do something strange what developers can't reproduce on theirs end), but more high quality data about issue origin may help here.

Fenrirthviti commented 1 year ago

Per the contacts at Microsoft that we are working with, data collected from a virtual machine is not usable for them.

We are not denying there is a problem, we know full well that there is something going on here. This is likely a bug on Microsoft's side, but we are trying to collect data that they require to investigate.

Due to the complexity of the data collection, it has proven extremely difficult to get everything we need. Without all the pieces of data, they are individually not very useful. We need all the steps in https://github.com/obsproject/obs-studio/issues/8064#issuecomment-1519111627 completed, as well as the audio sample (which is no longer optional, and is required to move forward with troubleshooting).

RytoEX commented 1 year ago

@Fenrirthviti if people will be able to reproduce the issue with my synthetic tests but in real PC - will it be fair or only real use case needed (audio grabbing from the game)?

Results from a synthetic test on a normal (not in a virtual machine) Windows installation might be fine.

godfather99x commented 1 year ago

recently started doing pc games via obs (usually its console games) and started a game called tell me why (chapter 2 is here https://www.youtube.com/watch?v=4iTvD-NV7SI&t=771s ) now my viewer(s) have been saying its been static about every thirty minutes (seems to be happening more frequently the longer the stream, goes on), i am recording a game from xbox game pass on pc, dont know if thats a thing that could also play into the factor of application audio capture, dont know if the fact i have two different application audio captures for 2 different scenes plays a factor as well, but the static is happening and hopefully this stream can help (first chapter https://www.youtube.com/watch?v=fDCVNTqN8S0 ) i found the loud music and ambiance from the game in intense and loud scenes seems to playing into the static being caused when streaming

Gambloide commented 1 year ago

Can someone confirm the current steps for gathering and providing the relevant data in reproducible scenarios?

Just did a dry run to make sure the instructions from https://github.com/obsproject/obs-studio/issues/8064#issuecomment-1519111627 still work.

I have the issue occur pretty often and quickly recently, so I thought it would be a good time to gather the requested data.

I am on OBS 29.1.3, Win 10 Version 10.0.19045 Build 19045.

After running wpr -start obs.wprp from an admin prompt I opened OBS, started a recording, then tried to run wpr -stop repro.etl but got this error:

wpr -stop repro.etl

        Cannot change thread mode after it is set.

        Profile Id: RunningProfile

        Error code: 0x80010106

It also doesn't create any file in the folder.

Edit: moved question to top of comment.

Gambloide commented 1 year ago

It seems other software like e.g. the Elgato Wave Link experience similar issues. In their case, the software allows the adjustment of the buffer size. Increasing that is typically the suggested solution to solve crackling audio.

It also seems that windows reduced the audio buffer size severely with Windows 10, which might play into this: https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/low-latency-audio

I am unfamiliar with the obs-studio code and C++, but from a naive search through it, I couldn't find any code adjusting the buffer size or safety buffer size of the WASAPI devices at all. Only the code clearing the buffer.

Maybe this is an angle to approach the topic from? I am sorry if I missed something and this is just useless conjecture.

Fenrirthviti commented 1 year ago

We already dynamically increase buffers as necessary, and reset it by restarting the audio if it gets too large. This is unlikely to be related to something on our end, which is why we need the traces to send to Microsoft for investigation alongside the audio samples. Without everything together, they can't properly debug it.

As for the error, I'm unsure on that. The steps in the comment you referenced are still correct, and haven't changed. We'll check with MS and see what we can find, but if you are able to reboot your PC and try again from a clean start, that would be a good next step.

MattyFresh68 commented 1 year ago

If soneone could give me accurate steps on using the wprp I will next session. But After approx 45 minutes or so of obs running, i captured the application audio capture running behind the source. It's not a crazy amount behind, but earlier in session, it was identical. You can see in the waveform of resolve track 2(app audio capture) is delayed. image

https://obsproject.com/logs/0cojBetIG2LLzsOx In the video(if it actually uploads), I even cropped a capture of obs to see the audio mixer show it as well. audio delay-disc.webm

Update, this happened very shortly into session. The desync isnt as drastic as a longer session, but the waveform again clearly shows it falling behind image https://obsproject.com/logs/h8Oag4XlwQM8TWGo

RytoEX commented 1 year ago

If soneone could give me accurate steps on using the wprp I will next session.

The steps that I previously listed in April are still accurate.

Gambloide commented 1 year ago

We already dynamically increase buffers as necessary, and reset it by restarting the audio if it gets too large. This is unlikely to be related to something on our end, which is why we need the traces to send to Microsoft for investigation alongside the audio samples. Without everything together, they can't properly debug it.

As for the error, I'm unsure on that. The steps in the comment you referenced are still correct, and haven't changed. We'll check with MS and see what we can find, but if you are able to reboot your PC and try again from a clean start, that would be a good next step.

I don't wanna derail this discussion, but for anyone trying to gather the data and running into the same issue:

The only two search results Google spits out for "Cannot change thread mode after it is set." wprp point at using the latest wpr version for Windows11 from the Windows11 ADK to get around it.

I haven't gotten around to test this yet (also not sure if I can on Windows10), but I got the same error still and tried to figure out why it might occur. I am also still trying to reproduce the error in a way I can catch it myself, instead of relying on viewers to call it out live or accidentally finding it later in recordings.

SuslikV commented 1 year ago

@Gambloide maybe you already found it (wpr.exe and its few dlls), but anyway: https://learn.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-recorder#where-to-get-windows-performance-recorder

orange11orange commented 12 months ago

As I understand it, there are problems, but not for all users. Could this somehow depend on the type/model (PCIe/USB) of the sound card and drivers? Or even motherboard chipset (AMD/Intel)?

SuslikV commented 11 months ago

Few (possibly) related crashes, forum's thread: https://obsproject.com/forum/threads/obs-crash-new-unhandled-exception-problems.169602/

orange11orange commented 11 months ago

I set OBS to record audio from foobar2000 via Application Audio Capture. On a 1-hour recording in the second half of the recording, I can hear frequent crackling sounds that last for several tens of seconds and then goes away. It turns out I have problems with this too. I don't know if this makes any difference, but I have AMD (X670) and X-Fi Titanium HD (the drivers are not entirely original, because the card is quite old.). Windows 10 22H2. 48 kHz everywhere. Me unhappy :(

I'll add - foobar2000 played one track (lasting 3 minutes 9 seconds) on repeat for an hour. 22 minutes after the start of recording, clicks began and lasted 20 seconds. Listening to this I realized that this happened exactly at the moment when the track once again began to play again. The buffer size in foobar2000 is set to 1000 ms. The CPU load was minimal the entire time. Apparently, the way some applications (players, games, etc.) work with sound causes these problems. I do not rule out that the sound card drivers may also be to blame.


Having installed other drivers for my sound card, I repeated what I did in the second paragraph - there was a crackle in the recording after 22 minutes, which was visible on the graph in Audacity. The time and duration are the same. Well, isn't it surprising...


Similar results with Creative Sound BlasterX AE-5 Plus.

chemitaxis commented 11 months ago

same problem here :(

Fenwolf commented 11 months ago

I used the win-audio-capture plugin for ages with no issue, but started having this issue on moving from a ryzen 5900x setup to a 7950x3d setup. Using the built-in application audio capture had the same problem, which led me here. Makes me wonder what the actual failure point is, given it repros the exact same with both AAC and WAC.

chemitaxis commented 11 months ago

@Fenwolf I have a AMD Ryzen 7800X3D and the same problem, with a i9 9900K no problem...

RytoEX commented 11 months ago

@Fenwolf I have a AMD Ryzen 7800X3D and the same problem, with a i9 9900K no problem...

We have observed cases on both Intel and AMD processors.

alexciarlillo commented 11 months ago

We're experiencing the same issue in our application which also uses the Application Loopback Windows API to capture sound from a process. That makes at least 3 different implementations I know of all using this API and all experiencing this issue, so it seems to be an issue in the underlying IAudioClient or IAudioCaptureClient specific to AUDCLNT_STREAMFLAGS_LOOPBACK.

The approach I most recently tried was to call Stop, Reset and Start on the IAudioClient, but after performing these steps I no longer receive event callbacks when audio data is ready. Unfortunately fully tearing down the client and setting it back up again causes a noticeable blip in the audio.

My next approach may be to setup a second IAudioClient and capturer, and try to seamlessly swap over to this new one after ~2-5 mins. Then tear down the old one and repeat the process every 2-5 min. No guarantee this will work though depending on exactly where the bug lies on the Windows side.

Has your team attempted any more "outside the box" approaches like this? My concern is even if MS patches this issue, users who remain on unpatched Windows versions will still need a workaround.

ev3rest commented 11 months ago

@Fenwolf I have a AMD Ryzen 7800X3D and the same problem, with a i9 9900K no problem...

can confirm the same behavior on AMD Ryzen 5800X and Intel Core i9 9980HK

the-Fifteen commented 10 months ago

I've been having this issue pretty consistently too, I'll start creating wpr logs of my streams to help find the problem. I was looking around the OBS settings menu and I wondered if the audio bit rate, codec or quality might have something to do with it. As a sound tech, I fiddled with all I know about digital audio in both my OS and OBS, but it didn't seem to help much.

My current set up: OS: Windows 10 pro 19043.1706

Audio settings: For both OBS and OS, 44.1kHz bit rate at 24 bits depth with no enhancements, both input and output

Audio drivers: I currently use a Komplete Audio 2 sound inerface with ASIO compatible Native Instrument drivers, version 5.22.0. Drivers are updated and all audio coming in and out of my computer runs through this interface and drivers.

Big thank you to the devs of the OBS Project for keeping up the work on finding a solution. I hope the issue gets resolved soon

MattyFresh68 commented 10 months ago

I've been having this issue pretty consistently too, I'll start creating wpr logs of my streams to help find the problem. I was looking around the OBS settings menu and I wondered if the audio bit rate, codec or quality might have something to do with it. As a sound tech, I fiddled with all I know about digital audio in both my OS and OBS, but it didn't seem to help much.

My current set up: OS: Windows 10 pro 19043.1706

Audio settings: For both OBS and OS, 44.1kHz bit rate at 24 bits depth with no enhancements, both input and output

Audio drivers: I currently use a Komplete Audio 2 sound inerface with ASIO compatible Native Instrument drivers, version 5.22.0. Drivers are updated and all audio coming in and out of my computer runs through this interface and drivers.

Big thank you to the devs of the OBS Project for keeping up the work on finding a solution. I hope the issue gets resolved soon

It's been fixed it seems in the upcoming release. You can try the current RC and test. https://obsproject.com/forum/threads/obs-studio-30-rc.168984/

SaraJLeen commented 10 months ago

I'm still having the same problem in 30.0 RC1 unfortunately.

For me it happens after 3 hours of continual application audio capture, which is the same amount of time it took before too.

ev3rest commented 10 months ago

I'm still having the same problem in 30.0 RC1 unfortunately.

For me it happens after 3 hours of continual application audio capture, which is the same amount of time it took before too.

can confirm, the issue persists in 30.0 RC1 for me as well.

Caarl1 commented 10 months ago

Same problem on OBS 29.1.3 - Amd ryzen 7 7800x3d. Random intervals anywhere from 30min to 1.5hours before the audio fully starts crackling. I also have a problem with watching discord streams and eventually the stream having the same crackling. Not sure if its related. Edit: Obs 30 pre-release same issue. Edit2: OBS 28 works for me and there is no audio bug, I did reinstall windows 11 while keeping files. Could very well just be windows bug.

Fenrirthviti commented 10 months ago

Just for posterity and an official response, it seems the fix works for some people, but not others. We were hopeful from the initial testing, but still seems like we have more to uncover. We're still fairly confident this is a bug in Windows itself, but are doing what we can to find other potential fixes or workarounds.

AlexPresso commented 10 months ago

Yes, it's definitely a Windows bug, as my friends and I are experiencing the same issue when using Discord to record a specific app (game or Chrome).

pkviet commented 10 months ago

@alexciarlillo did you play with the AUDCLNT_STREAMFLAGS ? I've added AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY as an experiment but since I have difficulty reproducing the bug, it's difficult for me to know if it fixes the issue.

pkviet commented 10 months ago

I have test builds for people interested; on obs discord in the dev channel, ping either me (pkv) or @prgmitchell (aka Mitchell | Yolo )

alexciarlillo commented 10 months ago

@alexciarlillo did you play with the AUDCLNT_STREAMFLAGS ? I've added AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM | AUDCLNT_STREAMFLAGS_SRC_DEFAULT_QUALITY as an experiment but since I have difficulty reproducing the bug, it's difficult for me to know if it fixes the issue.

I have played around with those flags but nothing conclusive in my testing (no noticeable changes). I am also unable to repro this issue so testing has been difficult.