Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record only mono audio (with ability for stereo downmix, left only, or right only) [feature-request] #323

Open
ceefour opened this issue Mar 27, 2015 · 15 comments

Comments

@ceefour
Copy link

ceefour commented Mar 27, 2015

Thank you for SimpleScreenRecorder, awesome software! :)

My notebook's internal sound card has "Stereo Input", however when connecting a mic, only the left channel has sound. This generates a video with audio panned to the left.

Please make an option to choose audio/sound recording mode:

  1. Stereo (default)
  2. Mono: downmix from stereo
  3. Mono: Left only
  4. Mono: Right only

A bit related to #310.

@MaartenBaert
Copy link
Owner

AFAIK there is no option for 'left only mono' in ALSA - mono just means mono. What I can do is record in stereo and throw away one of the channels. Or I can record in mono and let ALSA do the downmixing automatically (but then I can't pick a channel).

This sounds like a strange setup, are you sure that your microphone is working properly? I know there are mono microphones that use one of the channels to provide a supply voltage and send a signal on the other channel, but if your laptop isn't providing a supply voltage then this wouldn't work anyway. And if your laptop is providing the supply, then it must somehow realize that the microphone is mono and shouldn't be recording both channels in the first place ...

This sounds like a very niche problem, I don't want to clutter the GUI with options that 99% of all users won't need. But I could add some kind of custom option for this once the new GUI is ready.

Anyway, here's a temporary workaround. Create a file named '.asoundrc' in your home folder with this content:

pcm.monomic {
    type plug
    slave {
        pcm "sysdefault:0"
        channels 1
    }
    hint {
        description "Mono microphone"
    }
}

Now restart SSR and select 'Mono microphone'. ALSA will downmix (i.e. average left and right) which is not what you want, but it's probably better than stereo.

@ubuntuaddicted
Copy link

or you could follow the arch pulseaudio wiki for getting pulseaudio to correctly map audio to both left and right or what have you. a lot of higher end mics do the same to people in skype in linux so there's a workaround to get pulseaudio or alsa (i forget) so that it maps the audio to both left and right. good luck

@ceefour
Copy link
Author

ceefour commented Mar 28, 2015

Thank you.. this is an awesome workaround ^_^

I dont know the external mic works this way.
Internal mic is fine. Line input is also fine... it's stereo.

But when I connect my mic it's just the left signal. same when in Audacity. But in Audacity I can just set input to mono and leave it at that (it's probably downmixing, but it's okay for me)

@gwald
Copy link

gwald commented Feb 23, 2016

I have a mono external mic and have the same results.
I would suggest the GUI option is required for mic users.
The work around works fine.
Thanks for this app! :)

@romikforest
Copy link

That is normal behavior for mono mic. The pulse audio and jack do the same for mono mics: all sound is on the left channel, the right channel is empty. Therefore the program option to record mono mic is very needed. Many programs even do autodetection for mono mics.

@quantverse
Copy link

+1...really needed

@quantverse
Copy link

quantverse commented Dec 20, 2016

OK, I've found a workaround to record left channel only as mono just using PulseAudio. It took me about two hours just to find this information and apply it correctly. So let's hope it will save you some time guys.
First, find out your input source name using:

pacmd list-sources

My source name is alsa_input.usb-M-Audio_FastTrack_Pro-00-Pro.analog-stereo-a-input
Then edit file /etc/pulse/default.pa, and add these lines (replace the PUT_YOUR_SOURCE_NAME_HERE with your real source name!!!):

### Remap microphone to mono
load-module module-remap-source master=PUT_YOUR_SOURCE_NAME_HERE master_channel_map=front-left channel_map=mono

Restart the daemon:

pulseaudio -k

It will create a new virtual source called in my case Remapped M-Audio Fast Track Pro Analog Stereo Channel A, use this one for recording...

@gwald
Copy link

gwald commented Jan 6, 2017

I've compiled the latest version and this trick doesn't work :(
Any advice?

@turbobuilt
Copy link

Hey everybody another workaround. Turn the video into mono video after the fact using ffmpeg

Run this command on the video to turn it into audio:

ffmpeg -i video.mp4 -map_channel 0.1.0 -c:v copy mono.mp4

More info here: https://superuser.com/a/1122114/446344

@roycechua
Copy link

OK, I've found a workaround to record left channel only as mono just using PulseAudio. It took me about two hours just to find this information and apply it correctly. So let's hope it will save you some time guys.
First, find out your input source name using:

pacmd list-sources

My source name is alsa_input.usb-M-Audio_FastTrack_Pro-00-Pro.analog-stereo-a-input
Then edit file /etc/pulse/default.pa, and add these lines (replace the PUT_YOUR_SOURCE_NAME_HERE with your real source name!!!):

### Remap microphone to mono
load-module module-remap-source master=PUT_YOUR_SOURCE_NAME_HERE master_channel_map=front-left channel_map=mono

Restart the daemon:

pulseaudio -k

It will create a new virtual source called in my case Remapped M-Audio Fast Track Pro Analog Stereo Channel A, use this one for recording...

This solution worked for me, thanks a lot

@MaartenBaert
Copy link
Owner

Another solution for ALSA users is to add this to your ~/.asoundrc file:

pcm.micleft {
	type plug
	slave.pcm "hw:1"
	slave.format "unchanged"
	slave.rate "unchanged"
	slave.channels 2
	ttable.0.0 1.0
	ttable.0.1 0.0
	ttable.1.0 1.0
	ttable.1.1 0.0
	hint.description "Microphone (left only)"
}

Then select [micleft] in SSR. Rather than downmixing to mono, this will duplicate the sound of the left channel to both channels. Change hw:1 to your sound card of choice. If you need to record with multiple applications simultaneously, use sysdefault:1 instead of hw:1.

If you want the same for the right channel, use this:

pcm.micright {
	type plug
	slave.pcm "hw:1"
	slave.format "unchanged"
	slave.rate "unchanged"
	slave.channels 2
	ttable.0.0 0.0
	ttable.0.1 1.0
	ttable.1.0 0.0
	ttable.1.1 1.0
	hint.description "Microphone (right only)"
}

@Veek
Copy link

Veek commented May 29, 2020

WRT, how can I record stereo on a MIC? I am getting a MONO channel/sound on my LEFT earphone and a very faint sound on the right.. I want STEREO. (asked everywhere no luck) I've plugged the MIC into the pink desktop socket - i can record mono just fine - I want stereo.
What should I do in pulseaudio - what module to clone my mic-source and then?
Active Port: analog-input-rear-mic
Volume: front-left: 65540 / 100% / 0.00 dB, front-right: 65540 / 100% / 0.00 dB balance 0.00
Base Volume: 6554 / 10% / -60.00 dB

module-remap-source
master=alsa_input.pci-0000_00_1f.3.analog-stereo

@MaartenBaert
Copy link
Owner

Most microphones are mono. If you want stereo you either need a special stereo microphone or you need two mono microphones that you manually set up on the left and right side.

@sonyarianto
Copy link

OK, I've found a workaround to record left channel only as mono just using PulseAudio. It took me about two hours just to find this information and apply it correctly. So let's hope it will save you some time guys.
First, find out your input source name using:

pacmd list-sources

My source name is alsa_input.usb-M-Audio_FastTrack_Pro-00-Pro.analog-stereo-a-input
Then edit file /etc/pulse/default.pa, and add these lines (replace the PUT_YOUR_SOURCE_NAME_HERE with your real source name!!!):

### Remap microphone to mono
load-module module-remap-source master=PUT_YOUR_SOURCE_NAME_HERE master_channel_map=front-left channel_map=mono

Restart the daemon:

pulseaudio -k

It will create a new virtual source called in my case Remapped M-Audio Fast Track Pro Analog Stereo Channel A, use this one for recording...

On mine first this didn't work, since on mine the sound only on my right speaker, then I change master_channel_map to front-right and it works. Complete line below.

load-module module-remap-source master=PUT_YOUR_SOURCE_NAME_HERE master_channel_map=front-right channel_map=mono

@HeritonBacelar
Copy link

Hey guys! When I try the solution I get the following message: load-module: command not found
How can I solve this? I am a begginer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests