Please allow for mono recording of Microphones - I'll explain why...

DrWolfsherz

New Member
*sigh* This does not lead anywhere. Don't you think I have already done everything to resolve the issue in every possible way? I know exactly what your point is and where you want to go. The problem is: Setting the interface to stereo results in halved audio volume too, as this is also the way windows handles this. That is EXACTLY why DAW's and other software allow for mono recording.
 

Suslik V

Active Member
I just want to say that the rematrix plugin (https://obsproject.com/forum/resources/rematrix-filter-plugin.620/) should work fine for you, as long as you have one almost zero channel and second as signal. So, strange that this solution not works for you. The mentioned device setting from the Windows - is the task for the device driver (usually, it just outputs what it has on inputs in case of stereo mode), of course, the driver updates may change this behavior.
 

Andersama

Member
The rematrix plugin came out of the fact I could pick out asio channels and I thought it was silly that it wasn't a plugin, it's a bit redundant w/ asio b/c it has that as a core feature in order to work. If you need help w/ something audio related feel free to ping me on discord.

I'm assuming you're in advanced mode and outputting your mic to a separate track, not sure I understand the issue w/ the stereo vs mono and audio being "halved". When editing most software allows you to extract a channel as is. How many inputs do you have in OBS?

*As for the downmix to mono* turning to stereo in recording output, the current audio pipeline resamples sources to the settings like you guys mentioned in settings, then sources are mixed together to their respective tracks and output. Meaning if you're in stereo mode all tracks output are stereo. I'm not sure if certain file formats have that as a limitation, that would seem strange to me. With all the work pkv and I've already sunk into the audio system I'm sure individual tracks could have their own settings as opposed to a global one. I'll keep the idea in my back pocket.
 
Last edited:

Suslik V

Active Member
@Andersama He says that the OBS Studio mixer shows only one channel audio (mono) via single line of the audio meter, but it already has lower amplitude then it "actually should", as I understand. Then is not a question to the OBS Studio at all.

@DrWolfsherz Only known amplitude change when OBS Studio converts formats is:
https://sound.stackexchange.com/que...nversion-from-mono-to-stereo-lower-the-volume , just -3dB as default FFmpeg panning (const power law) applied. Easily detected with OBS Studio's audio meter, mono test file and stereo output. OBS Studio is simple tool it uses defaults of FFmpeg processing, there is no sample delay filter (sometimes needed for stereo), and many other advanced things still missing. Some VST plugins works, but this is all you have right now. If your audio source has significant drop in loudness - then look for the solution in some other place...

...also, you may wanna try WDM driver mode of your device to try to use the stereo with 1 muted channel and rematrix filter.
 

DrWolfsherz

New Member
@Suslik V You are right. Mic Source is represented as single line in OBS Studio's audio meter and has lower amplitude then e.g in Audacity where everything is where it should be. I counter this by adding gain (+6dB). Then it is at the same amplitude as in Audacity.

This points to OBS as the cause of this issue. Does it not?
 

Suslik V

Active Member
Is not an issue at all. Also, the value of the gain says that either you have a problem or you just discovered new bug in OBS Studio. For example, try to set OBS Studio to Mono output and add your device again - the level meter set to True Peak (I don't know what signal you will try to test in OBS Studio, so just in case) - now look at meter again, is there any level drop? If you see overload - move the fader (slider in OBS) a bit (-0.3dB or so), if overload is gone - all seems to be OK, your source is just maxed out.
 

Suslik V

Active Member
And if the Studio set to Mono output? Also, please, make new Scene Collection and New Profile for tests in OBS Studio. Of course, same base is needed to perform the full tests: sample rates of the devices, number of channels, driver mode, same instruments etc.

Just for info: log says that asio-plugin is not perfect too.

As for your suggestion/feature request - I think, there is similar one, it asks to record individual source/scene to standalone file (I think, that setup may has different audio/video settings). So, I have a question for you.
How you see this request (to save Mono tracks with OBS Studio while audio output set to any other number of channels):
  1. The source should be saved into standalone file with its original settings (no filters, no samplerate conversion, no faders, no mute).
  2. The source should be saved into standalone file with all selected filters applied, samplerate conversion, faders, mute if any.
  3. The source should be saved into the same file as new Track but in its original form (no filters, no samplerate conversion, no faders, no mute) if output format can't handle the input parameters - the error should rise and capture stopped.
  4. The source should be saved into the same file as new Track and filter processing should apply to the file including samplerate conversion, faders, mute but it can't be mixed with other sources (just Mono track). If output format not allows it - the error should rise and capture stopped.
  5. The source should be saved into the same file as new Track and filter processing should apply to the file including samplerate conversion, faders, mute and you'll be able to specify type of the mixing with other sources (in case of Mono to Stereo -> do panning, swap channels, place to channel #1, #2, to both etc.). The track is still multi-channel but you'll have full control over the mixing options (maybe per channel sample delay, gain, inversion etc., like a filter per channel).
Edit: I forgot about Audio Monitoring in this request... It is important to have it the same as the Mixing.
 

DrWolfsherz

New Member
So, this evening I did some more thorough testing of the different recording modes and settings.
I noticed the following, and it struck me, that it didn't occur tot me earlier:
The recording of the mono Microphone seems to end up exactly -3dB lower than that of Audacity or Dxtory in OBS. When adding exactly +3dB Gain to the Mic in OBS the volume was exactly the same than in those other two programs. There must be an explanation for this. Is this the reduction when OBS puts that mono Signal to a stereo track?

Before these tests I always had the feeling that the volume felt somewhat halved, but the exact amount of reduction I found out now is "only" -3dB. This is certainly a lot lower than the original source but not as drastic as my ears thought it would be.
 

Andersama

Member
A consideration to make (with your video) is that obs's meters have a setting for the decay rate, obviously as a decay rate it displays the highest peak and lowers at a constant rate until a new peak is higher. I forget where in the settings you can change it, but that'd be another reason why your meters don't quite match up, in addition to the true peak setting. As far as I can tell from your example you can see that the decay rate is far faster in audacity, so keep that in mind. I'm guessing though you're actually checking waveforms of recordings.

As for the almost exact 3db reduction @DrWolfsherz @Suslik V is right, OBS itself doesn't make any modifications to the audio stream, outside of resampling via ffmpeg and filters. If you don't have filters that would modify the gain, ffmpeg would be the issue. The way to counter that would be (as you've already done) add a 3db gain.
 

RytoEX

Forum Admin
Forum Moderator
Developer
@DrWolfsherz @Andersama
While I was digging through the Mantis bug reports, I found Mantis 960: Audio from mono input quieter than in other recording programs, which may be relevant here. The 3db difference is explicitly mentioned there, and it seems to be how FFmpeg works by design:
Okay, I have taken a look at the code. It seems to be a fundamental thing how ffmpeg works. The downmixing option is not involved, but the resampling that happens in obs-source.c (also in audio-io.c, but this is not relevant for the recording, I think, but maybe for other things). In both cases it uses the resampling implemented in audio-resampler-ffmpeg.c.

Bottom line is that swr_convert, which is used in audio_resampler_resample(), seems to be the culprit. Given a 1-channel input and 2-channel output, it generates two quieter stereo streams.

Not being deeply embedded in audio things myself, I'm not sure what the best way to address that would be, and the conversation there seems to have stalled on whether behind-the-scenes code magic or documentation and user education is the best path forward.
 

Suslik V

Active Member
Why it is stalled? The idea to give to user full control over the mixing is major change in OBS and the request that require many hard work. As obs overlay, that requested long time ago (while projectors exist where all sources always visible).
 

RytoEX

Forum Admin
Forum Moderator
Developer
Why it is stalled? The idea to give to user full control over the mixing is major change in OBS and the request that require many hard work. As obs overlay, that requested long time ago (while projectors exist where all sources always visible).
I'm referring specifically to this part:
Now the question is, is this what we would expect swr_convert to do? Is this what we expect OBS to do?

EDIT: To be clear, I think that the way ffmpeg works makes sense depending on what you expect. If a mono signal would actually be output by only one speaker, then distributing the signal over all channels to get the same total power output after the conversion makes sense. However, it might be a counterintuitive result in case of OBS (at least I think so). I'm used to the fact that a mono signal is usually output on all channels/speakers by common audio recording and editing tools. Of course, the user could increase the recording volume in OBS in this particular case of mono input and stereo output, but I'm not sure whether this could potentially decrease the audio quality by first narrowing and then widening the dynamic range again. Also, I'm not sure whether this should be something the user needs to be taught to do in the particular case of a mono input and a stereo output.

So is FFmpeg returning an expected result, or is its behavior a bug? If OBS were to adjust for that behavior, are there cases where that would be undesirable? Does this create a new obscure problem for someone else down the road? How and where do we provide documentation guidelines on expected behavior and how to adjust for the behavior you want?

Also, there seems to be no clear consensus after that point on what the best path forward is for all users, just personal preference. There has been no new discussion since July to solve the challenges I listed above. That is what I mean when I say the conversation has stalled.
 

fsimon

New Member
Slightly offtopic, but if this causes you a real problem, you can always solve it on a hardware level as well..
For example I have a boss-ve-20 vocal processor that can output stereo.. (not sure if it actually applies stereo effects when effects are applied or just doubles the output).. so basically my mic goes into the pedal via XLR and 2 XLR cables go from the pedal to each channel on my Focusrite 2i2..
I don't have to mess with any downmixing or plugins plus I can use the preamps on the interface to pan my mic left / right just by balancing the levels on the individual channels, which is kinda cool, so unless you need the second input for something else, it works perfectly.

Now, I'm not saying that this shouldn't be worked on, but if you do have a real problem with it and your mic for some reason sounds horrible because of it, then it is a solution.. and that pedal is overkill for something like this, I just had it laying around, but you can get an XLR splitter for like $30 or less and that should work just as well. I mean if you have a $400 mic, then you can just consider that an accessory..

Cheers!
 
Top