[solved] Recording sound from two microphones?

is there a simple way to record sound from two different usb microphones at the same time, using audacity, ocenaudio or another audio recording tool?

it's simple to achieve this using obs, but obs can not export sound-only formats.

in pavucontrol i can only select one microphone at a time. it's not possible, as far as i can see, to select mic 1 as left channel and mic 2 as right channel, or simply select multi-channel inputs.

on windows, it's possible to use a tool called voicemeeter for mixing several microphones.

I have the same question!... :laughing:
I am trying Ardour, but I've stuck on RTFM.
If you make it, please give your feedback.

But you might use another program to extract audio from video (obs exported) :wink:

i will report back if i figure out how to do this in a nifty way.

yes, audio can be extracted using ffmpeg:
ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac

i would prefer recording the two mics as two separate tracks in an audio program though, as that would give me better editing possibilities.

[f]

2 Likes

ok, i've done some testing using obs and ocenaudio and it's quite simple using these programs for multi-channel recording and editing.

how-to

in obs under settings > output select advanced output mode and select two (or more) audio tracks:

k001

under settings > audio have your mics selected:

image

right click in the audio mixer window and select advanced audio properties:

k003

then, select what tracks to use for what mics:

k004

start recording. when done simply drag and drop the .mkv file into ocenaudio. the different tracks will open as individual files:

k005

edit the files individually and when done you can select both files, right click and select join to combine the two tracks into one.

reference

3 Likes

it is possible to do this in pulseaudio with added modules
2 remap modules to change channel map for the 2 microphones to single channel
then combine 2 streams for recording
and can also pipe it direct to recording file

but it is much easier to do all this audio routing in JACK
do not need any extra packages
jack_mixer can be configured similar to Voicemeeter if just need a simple solution with level controls and meters
and there are mixers with lots more features, like Non-Mixer or Ardour

Audacity or Ocenaudio can record from JACK no problem

2 Likes

Well, it's not that hard. Can you record with just 1 mic? If you can, then just make 2 tracks, mark them for recording then in Window->Audio connections link each mic in sources to each tracks in destination, respectively. Press the record button and enjoy recording from both mics on separate tracks.

2 Likes

thanks. i will try this and report back.

installed ardour and tried recording from two microphones there but didn't figure out how. i was only able to use one input source at a time. which might be the limit? never used a daw before so ardour was a tad overwhelming.

tried jack_mixer. installed the tool but haven't manage getting it working either.

i can start jack_mixer as root, but i assume that is all wrong. or? however, starting it as my own user doesn't work.

[klevstul@silentGamerMjr ~]$ jack_mixer

(jack_mixer:7187): Gtk-WARNING **: 21:51:55.583: Unable to locate theme engine in module_path: "adwaita",
Cannot load Python bindings for GConf, your preferences will not be preserved across jack_mixer invocations
Connected to session bus, unique name is ":1.198"
Successfully connected to LASH server at localhost
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
jackd 0.125.0
Copyright 2001-2009 Paul Davis, Stephane Letz, Jack O'Quinn, Torben Hohn and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details


JACK is running in realtime mode, but you are not allowed to use realtime scheduling.
Please check your /etc/security/limits.conf for the following line
and correct/add it if necessary:

  @audio          -       rtprio          99

After applying these changes, please re-login in order for them to take effect.

You don't appear to have a sane system configuration. It is very likely that you
encounter xruns. Please apply all the above mentioned changes and start jack again!
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Cannot create JACK client.
Please make sure JACK daemon is running.

i'm lacking some basic knowledge here, so i believe i'm missing a few things.

ok, i managed to do this in a simple way. i used remap modules as suggested by @nikgnomic above. however, since i did struggle, below is a detailed explanation.

how to

created one sound sink for the mix of my two microphones:
$ pactl load-module module-null-sink sink_name=inputs

then, for each of my two microphones i created loopback sinks (hence, ran this command twice):
$ pactl load-module module-loopback sink=inputs

then, i did set up my two mics to record to the input sink (both mics are named "AT2020 USB"), and i did set up oceanaudio to record from the mixed sink. did this in pavucontrol (note: i had to select "show: all streams" in the recording window in pavucontrol).

fbk_20200103232230_948x575

terminal

[klevstul@silentGamerMjr ~]$ pactl load-module module-null-sink sink_name=inputs
32
[klevstul@silentGamerMjr ~]$ pactl load-module module-loopback sink=inputs
34
[klevstul@silentGamerMjr ~]$ pactl load-module module-loopback sink=inputs
35

reference

1 Like

That's for the ALSA backend. As written there, if you use jack, the limitation is practically gone. However, using jack indeed requires learning curve, which is kinda steep. Good if you've found a pulseaudio level solution.

the 3 modules commands are most of a Pulseaudio solution done
so no necessity to go into unfamiliar JACK or ALSA options

add another command to set default recording connection for ocenaudio (or any other recorder)
pactl set-default-source inputs.monitor

then put the 4 commands in a script

#!/bin/bash
# ~/record2mics.sh
# reconfigure Pulseaudio for dual microphone recording

pactl load-module module-null-sink sink_name=inputs
pactl load-module module-loopback sink=inputs
pactl load-module module-loopback sink=inputs
pactl set-default-source inputs.monitor

make it executable
chmod +x record2mics.sh

and then create a launcher to run
sh ~/record2mics.sh

not as polished as the PCLinuxOS mixer on/off button
but will get the same result with 1 click to start recording

modules can be unloaded when no longer needed by restarting Pulseaudio
systemctl --user restart pulseaudio

2 Likes

thanks a lot, @nikgnomic, that is a great solution!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by