Pleasing taste, some monsterism.


Avoid Audio Clipping on Streams in OBS

Date: []
Categories: [streaming]
Tags: [OBS], [audio]

Chances are if you've done any searches about OBS audio, you've seen one or both of the following: What levels you should put the actual "physical" sliders in OBS to for different sources, or that you should apply a Compressor filter. While both of these work, technically, they tend to be presented as "set it and forget it" solutions that are only a partial solution, particularly with audio sources that can vary pretty wildly, like music sources and game audio.

For today, let's focus on one of the more common issues with streaming: Keeping audio sources from clipping!


835168d8-a54e-447f-9cbb-9f88337984d4

Audio Levels

Now, this might seem a little odd, but we want our highest audio levels to look something like this:

147b0ee1-39cb-40c5-94fb-3b1b1131e95a

There's a couple reasons for this. First, audio going into the red is not a bad thing. There's a common misconception that this is where audio starts to clip and distort, and that's not the case. If audio hits the top (or side, depending on layout) of the bar and the whole bar turns red in OBS, then you've got a clipping problem where your audio can crackle, distort, or in some cases not come through at all.

Second, ads are loud as hell. Keeping your audio consistent with that will keep people from turning up their headphones to hear your stream only to get blasted by Twitch or YouTube ad audio.

Third, it prevents audio from clipping on-stream. Unfortunately this won't save your own ears if a game starts as loud as possible, but your audience will be safe.

In short, we want to keep our audio close to the top, but not going over.

Before we apply any filters, though, we need to do some testing. Let's start with your microphone.

As with most things with your own personal setup, this is going to require some tinkering, but try speaking normally in OBS and try to get a feel for where the average is. Keep track of the little chunk of the bar that's lit up after you're done speaking - that's the highest point that your audio hit while you were talking. If you want to get a more accurate reading, you can go into Settings in OBS, then Audio > Meters and set Peak Meter Type to True Peak (Higher CPU Usage). (There's no particular reason to leave it there outside of testing, though.)

Exact numbers aren't necessary here, but get a feel for where it falls, and keep in mind that we're using negative numbers - 0db is as loud as things get, while -60db is effectively silence.

Now try laughing, yelling, other things that might make your voice louder than normal. Chances are the bar turned red and now the little chunk is all the way at the top. Congratulations! You've peaked! Let's fix that.

The Compressor Filter

0fbc2b59-126a-4520-b407-61cc0ecb4dc4

Pretty much any guide about OBS audio will have something about the Compressor filter, and this one is no exception. I'll skip the granular details, but this filter will automatically lower audio levels if they go above a certain threshold. The word threshold is key, because compression is only applied when that threshold is met. Set it too low (i.e. larger negative numbers), and it will kick in when you're speaking normally, which we don't want.

Remember that number you noted earlier that's roughly where your normal speaking voice is? Try setting that as the Threshold. Typically, you can leave the rest as-is. Now, try laughing, yelling, doing something that would make your voice louder than normal.

In most cases, this should eliminate peaking if it happened earlier, and even if it wasn't peaking, it should bring down those louder audio bits to a consistent level. In most cases, we don't need to touch the rest because...

OBS is going to use the Ratio value to compress your audio once it goes above the threshold. This is how strong the effect is. Setting it too high can, in extreme cases, have the reverse effect of compressing your audio so hard that it becomes inaudible! Meanwhile, Attack is how quickly this filter kicks in once it detects audio over the threshold, while Release is how quickly the filter stops applying. The attack and release are pretty aggressive and should be that way so that the compressor does what it needs to do quickly.

Now, if you're a quiet speaker or your mic is coming in a bit low, you might be tempted to boost the Output Gain or set it via another filter. I'd strongly recommend against that - we'll get to that in a bit. For now, let's talk about...

The Limiter Filter

Look, I know I wrote a bunch of paragraphs about The Compressor filter. I will not be apologizing for that. The Limiter filter is a lot more straightforward.

ea5538f8-bc44-4b9a-bbdd-a9dbfb5a6aee

For our needs, applying a Limiter effectively creates a brick wall that your audio will not go above. This can be applied to just about any audio sources to prevent them from peaking, including your mic, music, game audio, whatever else. In nearly every case, this can be left at a Threshold of -6 dB to create a hard cut-off where your audio won't peak.

Remember our friend from earlier, Little Chunk? They're gonna stay comfortably at -6 dB or below as long as a limiter is in place.

At this point, I should add that order is important. Unless you have a highly specific reason not to, a Limiter should be at the bottom of a chain. OBS applies filters in the order they're listed from top to bottom, so the limiter should be our final step to make sure our audio isn't peaking after all other filters have been applied.

Bonus Round: My Voice and / or Mic Is Quiet

Time to meet your new best friend, the Upward Compressor!

e3afa3af-f9b8-4861-b6ac-8698707a2ae9

The name might sound a bit confusing, but in essence an Upward Compressor takes the quiet parts of audio and lifts them up instead of bringing them down like a regular Compressor.

There's a lot of settings here that can be tweaked, but we're going to once again focus on the Threshold. As outlined earlier, make sure other filters are off, and speak normally and see where your voice lands on the slider.

If you see constant peaking, you may need to adjust the Threshold down; if you're staying in the green or the bottom of the yellow, you may want to adjust it up so that your voice carries through.

Again, I strongly recommend not touching the Output Gain. It may be tempting, but adding too much gain can cause distortion or make our vocals unintentionally loud. We want the Upward Compressor to lift up the quiet parts of our voice and make our volume consistent, not overpowering. As noted in the previous section, you can add a Limiter at the end of the chain to prevent the audio from peaking.

[Originally posted on Cohost (RIP) on January 7th, 2024.]