MaartenBaert / ssr

SimpleScreenRecorder, a screen recorder for Linux
http://www.maartenbaert.be/simplescreenrecorder/
GNU General Public License v3.0
2.54k stars 286 forks source link

Amplify/boost mic volume #392

Open Brottweiler opened 8 years ago

Brottweiler commented 8 years ago

Requesting a feature where you, in my case with JACK, would be able to amplify or boost the microphone volume. This seems to be an option in OBS, and would be useful for me that has a USB microphone (Blue Snowball) and is using it with JACK but has pretty low volume.

Haven't found a way to boost it with ALSA/JACK. :disappointed:

rauldipeas commented 8 years ago

I do this volume boost on post edit of video, with gate, compression and normalize audio effects, but it will be very welcome to be an option in SSR on the future releases.

+1

Brottweiler commented 8 years ago

@rauldipeas yeah, recording with audacity and amplify would be a good way, but I'm mostly thinking of livestreaming where you can't do that...

rauldipeas commented 8 years ago

On live streaming You can use a plugin rack to process audio in realtime, but, You will need lowlatency kernel, Jack audio server, Carla plugins rack from the KXStudio PPA, some ladspa/lv2 plugins and alot of patience to figure out how to do all of this things work together.

It's hard, but possible.

Brottweiler commented 8 years ago

Well I am using the linux-ck kernel so I think it is lowlatency, and I use JACK, but yeah, probably not worth the trouble for me.

trebmuh commented 8 years ago

IIRC you can have a boost plugin within .asoundrc (ALSA config file)

Brottweiler commented 8 years ago

@trebmuh It would be helpful to know how to do this.

trebmuh commented 8 years ago

@Brottweiler : if I remember correctly, it came from : http://alsa.opensrc.org/ Reading at the 3 pages about "ladspa" there, it's about including a ladspa plugin in the asoundrc configuration. Never did that myself, mentioning it here if you're feeling like a adventurer.

rauldipeas commented 8 years ago

There's "veromix" too, it's simplify this process.

iamgreaser commented 8 years ago

jack-rack + an amplifier LADSPA plugin should be fine. I run FreeBSD and have no issues with latency on JACK, and it doesn't even use realtime mode (I use a buffer size of 128 w/ 3 buffers @ 48kHz which is apparently 8ms of latency).

Suggested setup for JACK: launch from qjackctl, use 3 buffers, set a suitable buffer size (512 is a good starting point).

But you can basically ignore that point that suggests that "JACK needs a low latency kernel".

MaartenBaert commented 8 years ago

Before you try anything else, run 'alsamixer' in a terminal and check whether your sound card has some microphone gain/boost options that you haven't set to maximum yet. Most sound cards have a 'gain' setting (which is the usual volume slider) and also a 'mic boost' setting which is less accurate but useful if the normal gain isn't enough. USB microphones might be different though. In that case amplifying through JACK is a good idea (jack-rack + LADSPA plugin, as suggested).

Brottweiler commented 8 years ago

@MaartenBaert

Yeah, this is the problem with USB mics under linux.

I am using JACK and I would like to try the LADSPA thing, it's just confusing to me right now, not sure how to set it up.

Edit: Never heard of this jack-rack thing. I installed it, not sure what to do with it but I'll tinker with it I guess.

Brottweiler commented 8 years ago

I've looked into jack-rack and don't quite understand it, and I can't really find any good documentation on it.

I can add mono or sterio amplification in jack-rack, and that's straight forward. I can up the amplification from 1, and enable it. Then I assume I have to go into connections in JACK and connect the jack-rack to... whatever is capturing, right?

So if I started to record (or it seems like i can just open SSR), I should be able to go into Connections, then connect the jack-rack output to SSR, then up the amplification slider in jack-rack, and that'll do it? I doesn't seem to work that way though... Unless I am doing something wrong. Any ideas?

rauldipeas commented 8 years ago

Maybe, if You try Carla Rack from KXStudio repositories, will be more easy to work, Carla supports LADSPA, LV2, VST(native and Wine), DSSI and embedded Disthro plugins, and comes with Catia patchbay for make connections between audio signal flows.

rauldipeas commented 8 years ago

I think that it's what the SSR needs for this purpose, a integration with this kind of tools, a simple button to call them on the interface of the SSR will be very helpful.

iamgreaser commented 8 years ago

I think what SSR needs is the ability to record video well. Which is what it does already.

It seems you've understood jack-rack properly.

All you need to do now is pipe system input into jack_rack input, jack_rack output into SSR output, and then disconnect system input from SSR output.

So you've pretty much got it.

rauldipeas commented 8 years ago

@iamgreaser This issue is about "audio" possibilities on SSR, I think this video capability is very well at this time.

Brottweiler commented 8 years ago

@iamgreaser

system input into jack_rack input jack_rack output into SSR output

I am a little confused about this. The left panel is output, and the right one is input. You cannot pipe input into input. Did you write it correctly? Here's a screenshot

Brottweiler commented 8 years ago

I think what you meant was this

  1. system output into jack_rack input
  2. jack_rack output into SSR input
  3. disconnect system output from SSR input

I recorded and upped the amplification while saying "test", and it worked!

So the step by step I did was this:

  1. Install jack-rack
  2. Open jack-rack and add Sterio Amplifier
  3. Edit the gain from 1 to whatever you want. You probably don't need to ever go higher than 10, if even that.
  4. Press enable
  5. Open JACK Connections
    1. system output into jack_rack input
    2. jack_rack output into SSR input
    3. disconnect system output from SSR input
    4. It should look like this now https://i.imgur.com/0VIqYCX.png
  6. Start recording!
rauldipeas commented 8 years ago

@Brottweiler Catia Patchbay it's much more easy than this.