Question / Help Static on top of any audio when streaming/previewing

Status
Not open for further replies.

Senkwich

New Member
This is my first time attempting to stream content; so, I tried to follow Twitch's guide for OBS. After setting everything up for the first time, I tried streaming Teleglitch (a favorite of mine). I was met with a really jarring static sound that played on top of any audio coming from the game. For example, when I used my knife and heard the knife sound effect, I also heard very large static (similar to a radio) on top of that audio. My source was the Teleglitch application.

I then tried a different game that I was able to visually see by using a monitor as a source. The game in question was Risk of Rain (another rapid favorite). Like Teleglitch, the video was fine, but the audio had a loud static on top of the actual game's audio.

I then tested this on a youtube video. I began playing the video and as soon as I hit "preview stream," the person speaking in the video had a loud, jarring static on top of his voice as he spoke (matching a radio's static on a broadcaster or song).

Finally, I played the classic Windows error sound played in situations such as clicking outside of a window that has full control and must be closed before clicking elsewhere. After clicking "preview stream," the Windows sound effect had static on top of it.

I'm not sure if there is somewhere that I am supposed to disable audio feedback or something else interfering with my headphones, which are plugged into my MXL USB 009 microphone. This also happens when I start the stream normally instead of a preview.

The log is from my Windows audio issue. Note that closing the tab containing the Youtube video or game with the audio issue and stopping the stream will restore the audio for that application.
 

Attachments

  • 2014-01-13-0144-32.log
    8.7 KB · Views: 1,345

Lain

Forum Admin
Lain
Forum Moderator
Developer
I have heard on a few occasions that when streaming is active (particularly encoding, capturing audio, webcams/etc all at once), that this sort of static thing can occur. I don't know what the cause is, but it's often hardware or windows related and not actually OBS' fault directly (as OBS only reads the sound, it does not modify it)

Now bear with me for a bit but I want you to try a few things. I don't know if they will work or not, but I want to try to isolate what the problem is one thing at a time.

First, I want you to try "Use input device for desktop audio" in audio settings. Then, I want you to select "What you hear" or "stereo mix" if they are available. If not, then that option is a no-go, and we'll have to try something else, because you won't be able to capture your desktop sound otherwise.

If that fails or is not an option, try disabling the mic and see if it happens while mic is off.

If that fails, and the audio is actually coming out of your headset/speakers, then turn off OBS, and then go to advanced. In advanced, check the "Disable encoding while previewing", and then start up a preview. See if it happens while previewing after that with the encoder disabled.

Let me know if any one of these things changes the result, because I'm almost totally positive it's some sort of system interference and I want to try to isolate exactly what area of the system the interference is coming from.
 

Senkwich

New Member
I've tried the suggestions. The first fixes issues where previewing Youtube resulted in static. Furthermore, if I start a preview before opening Teleglitch (using game capture as source) or something new like Portal (using monitor capture as source), there is no static. If I stop the preview and restart it, the static appears on top of the audio.

Portal behaves exactly like the other games with static upon start when I do not have the "use input device for desktop audio" selected.

I did not see any option in any of the settings tabs for "what you hear" or "stereo mix."

Disabling the mic does not seem to affect the situation (nothing appears different).

Checking the "Disable encoding while previewing" did not seem to affect the situation, either.

Another note is that I have not tested the audio I am sending to the stream. I don't know if this static is on the stream and I don't know if the one change (starting the preview before the game is started) is also mirrored in the stream. I'll have to test that tomorrow when I get the chance.

Thanks for the help so far! I've attached a new log from these actions.
 

Attachments

  • 2014-01-13-0241-10.log
    53.4 KB · Views: 282

Senkwich

New Member
As both a bump - this is nearly on the third page of posts - and an update, I had never tried to listen to the audio without my headphones. When I unplug my USB microphone and use the speakers of my computer, the audio is not affected at all.

Also, I listened to some of the recordings saved by OBS with my headphones and didn't notice any distortion.

So, I'm not sure if something is being done that is triggering this issue with my headphones, my microphone, or something else. As I need to be able to not run the audio through my speakers to hear it and I would prefer to be able to listen through my microphone's headphone jack, I'm hoping there are other options I can try.

This is the microphone that I am using: http://www.mxlmics.com/microphones/usb/009/

Thanks!

[Edit]
Also, I was wrong about this entirely fixing other cases like recording the monitor playing a Youtube video. If I stop a preview and restart it, the static appears. This is when I have the "Use input device for desktop audio" option checked. Stopping the preview seems to remove the static for the Youtube video, but not for Teleglitch, which was using a game recording source instead of a monitor source.
 

Senkwich

New Member
Yeah. None of the options were checked, but I went ahead and also checked the "disable all enhancements" option to be safe. No change from what I can see.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Yea it seems to happen with headsets most commonly, especially USB. I don't quite know why though. I know that headsets in general usually work fine, but this definitely is not the first time I've heard this happening to someone. The only thing I can tell you is although it only happens while using OBS, it's really not OBS' fault -- it just reads your sound data, it doesn't modify it or change any settings or anything. Due to the fact that this uncommonly happens to seemingly random users, I definitely feel it's some sort of hardware or driver issue.
 

Senkwich

New Member
So, I took a brief look at the source available on the Github repository. Bear in mind that I haven't used C++ in a few years and am not particularly fond of working with anything trenched in Microsoft's APIs. I built the Win32 version of the program - the x64 version failed - and ran it using Visual Studio 2010's Express C++ tools with the debugger and a few breakpoints.

So, I was able to narrow down the issue to... the API call of EnableWindow.

The culprit is within the block when bTestStream is true:
Code:
    if(bTestStream)
    {
        EnableWindow(GetDlgItem(hwndMain, ID_STARTSTOP), FALSE);
        EnableWindow(GetDlgItem(hwndMain, ID_TOGGLERECORDING), FALSE);
        SetWindowText(GetDlgItem(hwndMain, ID_TESTSTREAM), Str("MainWindow.StopTest"));
    }
    else
    {
        EnableWindow(GetDlgItem(hwndMain, ID_TESTSTREAM), FALSE);
        SetWindowText(GetDlgItem(hwndMain, ID_STARTSTOP), Str("MainWindow.StopStream"));
    }

This is within OBS' Start function (starting at line 668 in OBSCapture.cpp), in case the code doesn't jump out to you.

I'm not sure what is causing this to happen. I added a few GetDlgItem calls by themselves to see if they triggered the problem, but it only seems to occur when either the first or second EnableWindow call is made within the bTestStream block (not the else block).

I'm not able to step into the EnableWindow functions and I'm not entirely sure if this isn't being affected by the debugger in some way since the issue is being triggered by a Microsoft API function.

[EDIT]
Also, since I just thought of trying out starting a real stream instead of a preview while debugging this, the problem can come about from either the EnableWindow or SetWindowText of the above else block or sometimes from one of the later EnableWindow calls.

Of course, there is nothing you can do about these kinds of issue, but thought to point out that it isn't just EnableWindow that seems to cause this and it also isn't the same call each time.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Are you stating that EnableWindow, the function that simply sets a specific window state to either enabled or disabled, is causing your static?

As commendable as your effort is, I find that extremely hard to believe. All that function even does is set an internal flag with the control and repaint it once to represent its new enabled/disabled state. I think you're mistaking it for activity in another thread occurring that coincides with that. There is no possible way that such insignificant and common windows API function could affect your system in such a way.
 

Senkwich

New Member
Maybe. I was just following the debugger through the start method and noticed that the static appears during those times with every run of the "Start Preview" or "Start Stream" execution. While I knew it didn't make sense, I figured I would point out what I had seen thus far. As to what threads would be executing at the same time, I couldn't guess and therefore thought I'd post it here in case there was something that might stand out to you.
 

Airborne Veteran

New Member
Honestly, i have been streaming for about a month now and ive had no problems, i have a overlay with a box for mywebcam to be cropped in along with now playing text and game capture. Within the past two days i have ran into a serious problem to where i can not stream without an echo, or heavy compression "Distortion" added ontop of everything.

If i am playing music with all my scenes unchecked or even a brand new profile and hit "preview stream or start stream" it happens through my headphones and speakers, and built in monitor speakers. I have tried all 3 and the distortion even makes it onto my actual stream so i know its not just on my end. I have been searching night and day. I clean installed of all my drivers, and still nothing.

I can have a million things going at once and the sound will be just fine....but the second i click preview stream or stream the music or audio slows down alot with some gurgle!! I could really use some help. Being a disabled vet streaming has been my passion as of late and i can no longer do it!!! :(

:Edit I am using a Logitech C920 webcam to and since this all started my webcam now is super delayed also. Its a very good webcam and works with everything else except with OBS...I just honestly feel that there has to be a big red flag. While i understand OBS just simply reads the music, doesnt change, add or do anything other then relay it through...I dont believe it pertains to my software because everything works A OK until i start to stream.....This really sucks
 
Last edited:

Ken Sands

New Member
I just started having the same issue, crackling distortion whenever OBS is in use playing monkey island, doens't happen if I'm not streaming, but it's not from the moment I start streaming, I'm playing monkey island 2, it's full screen game capture, I have a logitec webcam over the scene, and after a minute or sometimes many mins playing it goes into distort crazy mode, all audio sounds bad. It comes through on the stream. I made a twitch highlight http://www.twitch.tv/ken_sands/c/4647732 I don't know what changed as a few days ago we'd streamed a day of monkey island without issue. (windows update happen almost every day though, curse of pc gaming is to spend more time solving problems than playing games!)

Seems it may just be a setting on something, as the previous evening we streamed for hours without this happening. I do have a scene setup just for monkey island 2 so maybe it's a setting in there that is not the same for other games? what do I need to paste over to help more?
 

Ken Sands

New Member
Ok as a test I used a scene I had setup the other night, still included a game capture and the camera. started streaming went into MI2 hit f12 and played monkey island 2 for a couple of hours with no problem. So now I just need to work out what the difference is between those scenes that means it happens on one but not the other. where are the scenes setups saved to? is there a file per scene so I could diff?
 

Espionage724

New Member
I had some weird static issue with my mic. I thought it only occurred when OBS was in-use, but it ended up being the result of GPU load causing the interference. Confirmed it by having Windows playback what the mic hears (the "Listen to this device" option), and firing up MSI Kombustor (GPU stress-test program).

I use an ASUS Xonar DG card, and I was using the rear/card ports for both headphones and microphone. I attached a front panel header from an old case to my desktop, and put my mic on it, and now the interference is gone. The header also has a USB connector, but I found that attaching the USB as well brought back the interference.

So one idea to get rid of static is to try using the front panel audio ports (or if you already are, try the rear ports).
 

barelyevenhuman

New Member
BUMP! I actually just noticed this problem the other day. I am capturing game audio through my line-in. While OBS is not streaming or preview, there is no audio "distortion." However, as soon as I begin a preview, I notice slight "pops" during audio playback. Any solutions or ideas on the matter would be super helpful.

twitch.tv/kemony
 
Status
Not open for further replies.
Top