8

What is a good piece of software for recording calls? I am not just talking about Skype but Facebook calls, Google Hangouts, Meet, everything.

I have been using Simple Screen Recorder but that only records their side of the conversation. Kazaam does the same, it only records their side. I can never get Audacity to do it either, there are too many channel combination settings [upwards of 60 on my machine].

Is there a simple software package which records both sides of the conversation?

3
  • 1
    This sounds like a job for Jack, which you can use to redirect audio. – user1091774 Feb 15 at 11:29
  • 1
    Probably the easiest is to load module-loopback run pactl load-module module-loopback in the terminal once after that your microphone will be routed to your speakers and you if you record your speakers, while reviving calls, your voice and the caller's voice will be both recorded. to unload it run pactl unload-module module-loopback ` – Raffa Feb 17 at 14:59
  • 1
    With that, you can run pavucontrol and then start recording with audacity for example and choose monitor... in the recording tab in pavucontrol – Raffa Feb 17 at 15:13
9
+100

Record directly

From command-line with ffmpeg

  • You can record and merge both desktop and microphone audio with ffmpeg like so:

    ffmpeg -f pulse -i alsa_output.pci-0000_00_1f.3.analog-stereo.monitor -i <(arecord -f CD) -filter_complex amix -acodec libmp3lame "$(date +%d_%m_%y__%H_%M_%S)".mp3
    

    Change alsa_output.pci-0000_00_1f.3.analog-stereo.monitor to your .monitor device as it appears after running this command:

    pacmd list-sources | grep ".monitor"
    

    Which will output something like this:

    name: <alsa_output.pci-0000_00_1f.3.analog-stereo.monitor>
    monitor_of: 0
        device.class = "monitor"
    

    Your device is the one after name: without < and >.

    Alternatively, you can have your .monitor device automatically detected like so:

    ffmpeg -f pulse -i "$(awk '$2~/.monitor$/ {print $2; exit;}' <(pactl list short sources))" -i <(arecord -f CD) -filter_complex amix -acodec libmp3lame "$(date +%d_%m_%y__%H_%M_%S)".mp3
    

    Your recording will be saved in the same directory you run the command from and will look like 20_02_21__21_27_21.mp3 with start date and time in the file name like Day_Month_Year__Hour_Minute_Second.mp3.

From GUI with OBS Studio

OBS Studio is a free and open source software that allows for capturing multiple streams at once and provides:

High performance real time video/audio capturing and mixing. Create scenes made up of multiple sources including window captures, images, text, browser windows, webcams, capture cards and more.

OBS Studio supports installation on Ubuntu and has extensive help and documentation. Guides and tutorials are also abundantly available on YouTube.

OBS Studio is also available for install from snap like so:

sudo snap install obs-studio

From GUI with vokoscreenNG

vokoscreenNG is an easy to use screencast creator to record educational videos, live recordings of browser, installation, videoconferences, etc.

vokoscreenNG is available for install from snap like so:

sudo snap install vokoscreen-ng

Route and mix

With simplicity

  1. Play your microphone through your speakers like so:

    aplay <(arecord -f cd)
    
  2. Record your speakers or desktop audio with your favorite audio or screen recorder or with command-line from a second terminal like so:

    parec -d alsa_output.pci-0000_00_1f.3.analog-stereo.monitor --file-format=wav "$(date +%d_%m_%y__%H_%M_%S)".wav
    

    Or to reduce file size, use it with an encoder that is installed on your system ... lame for example, like so:

    lame -r -V0 <(parec -d alsa_output.pci-0000_00_1f.3.analog-stereo.monitor) "$(date +%d_%m_%y__%H_%M_%S)".mp3
    

    Change alsa_output.pci-0000_00_1f.3.analog-stereo.monitor to your .monitor device as it appears after running this command:

    pacmd list-sources | grep ".monitor"
    

    Which will output something like this:

    name: <alsa_output.pci-0000_00_1f.3.analog-stereo.monitor>
    monitor_of: 0
        device.class = "monitor"
    

    Your device is the one after name: without < and >.

    Alternatively, you can have your .monitor device automatically detected like so:

    parec -d "$(awk '$2~/.monitor$/ {print $2; exit;}' <(pactl list short sources))" --file-format=wav "$(date +%d_%m_%y__%H_%M_%S)".wav
    

    and so:

    lame -r -V0 <(parec -d "$(awk '$2~/.monitor$/ {print $2; exit;}' <(pactl list short sources))") "$(date +%d_%m_%y__%H_%M_%S)".mp3
    

    Your recording will be saved in the same directory you run the command from and will look like 20_02_21__21_27_21.wav with start date and time in the file name like Day_Month_Year__Hour_Minute_Second.wav.

With PulseAudio

  1. Load pulseaudio's module-loopback like so:

    pactl load-module module-loopback
    
  2. Run pavucontrol like so:

    pavucontrol
    
  3. Start recording with your favorite application like audacity for example.

  4. In pavucontrol's UI and under recording tab select Capture from [ Monitor ... ] next to your recording application like so:

    screenshot

With JACK Audio Connection Kit

  1. Install JACK and required additions like so:

    sudo apt install qjackctl pulseaudio-module-jack
    
  2. Choose NO when you see this:

    enter image description here

  3. Run JACK UI qjackctl from applications or from terminal like so:

    qjackctl
    
  4. Start JACK by clicking on the start button like so:

    enter image description here

  5. Reload pulseaudio like so:

    pulseaudio -k
    
  6. In JACK UI, click the Connect button and have your devices connected like so:

    enter image description here

  7. Run Audacity and select Edit -> Preferences -> Devices and configure it like this:

    enter image description here

  8. Start recording with Audacity.


Notice

  • You can install ffmpeg like so:

    sudo apt install ffmpeg
    
  • You can install lame MP3 encoding library like so:

    sudo apt install lame
    
  • You can unload module-loopback like so:

    pactl unload-module module-loopback
    
  • You can install pavucontrol like so:

    sudo apt install pavucontrol
    
  • After starting or stopping JACK reload pulseaudio like so:

    pulseaudio -k
    
  • For usability ease, you can save a command that works for you, for example this:

    ffmpeg -f pulse -i "$(awk '$2~/.monitor$/ {print $2; exit;}' <(pactl list short sources))" -i <(arecord -f CD) -filter_complex amix -acodec libmp3lame "$(date +%d_%m_%y__%H_%M_%S)".mp3
    

    in a file in your home directory, name the file record.sh and make it executable like so:

    chmod +x ~/record.sh
    

    then, you can add an alias like this:

    alias record='bash ~/record.sh'
    

    to your ~/.bashrc file so you can afterwords run the short command: `

    record
    

    from any directory and get the same result. You first need to close and reopen the terminal again to pick up changes to ~/.bashrc for this to work.

  • Here is extra information about arecord and aplay, parec, pacmd, lame, ffmpeg, module-loopback, pavucontrol, pactl and What is JACK.

4
  • Thank you for this - I tried the OBS Studio approach but it created a BIG save files, even if I turn the video recording res right down. e.g. for a 15 sec conversation it created a 4MB file. For an entire conversation the file size would be huge. I tried the loopback module approach with Audacity, but the large amount of inputs to choose from was a hindrance to getting both sides to record easily. I am slowly coming to the realisation that there is no good way to do this in Linux without creating a large save file, so for a one hour interview I'd be looking at something like a 1GB file size... – C26 Feb 18 at 10:10
  • ... however, this can then be imported to Audacity and exported as an mp3 and reduced to about 50MB. It's not a great procedure but it'll probably have to do. – C26 Feb 18 at 10:13
  • @C26 That is too big a size if what you need is only audio. You can do with 0.1 that size or even less for the same duration if you tweak the OBS Settings – Raffa Feb 18 at 15:00
  • @C26 Audacity has an option called Software playthrough which routs the mic to the speakers similar to PulseAudio's module-loopback. I am not sure about the quality of this one though. Worth noting nonetheless. – Raffa Feb 19 at 15:37
2

It is quiet easy and quick with one command using a multimedia pipeline like GStream or FFmpeg/LibAV. Also it minimizes layers of complexity compared to other solutions.

Here is an example using FFmpeg.

  1. Check first for available Pulse sources

    $ pactl list short sources
    0    alsa_output.pci-0000_00_05.0.analog-stereo.monitor  module-alsa-card.c  s16le 2ch 48000Hz   SUSPENDED
    1    alsa_input.pci-0000_00_05.0.analog-stereo   module-alsa-card.c  s16le 2ch 44100Hz   SUSPENDED
    
  2. Use both as input for FFmpeg and pass them through a mix filter

    ffmpeg \
    -f pulse -i alsa_output.pci-0000_00_05.0.analog-stereo.monitor \
    -f pulse -i alsa_input.pci-0000_00_05.0.analog-stereo \
    -filter_complex amix=inputs=2 recordedfile.mp3
    

    I used shell line break \ for a clear code. otherwise it is a one-liner command. You may control volumes from Pulse control GUI.

Here reference with diagrams about FFmpeg mixer if you are not using stereo mic, flip to mono to minimize the file size.

Jack and Pulse pipelines are best when it comes to Live mixer, Not just recording as in Raffa's answer or my answer for another use-case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.