How to record any internal sound in and out using Ubuntu and Audacity

To define the recording source for any recording application we may install pavucontrol.

As soon as we record any audio stream the name of the recording application and the source from where it records will be shown in the Recording tab. We then may be able to change the source to Monitor of <your soundcard> to record the output of our soundcard:

enter image description here

We may have to choose another audio profile in addition. This can be done from the "Configuration"-tab of pavucontrol, e.g. a "Duplex" sound profile for output of the microphone to our local audio sink:


Coming from Windows to Linux less than one month ago, I wanted to record a video that would capture game footage with audio from both my speakers (Nvidia HDMI output) and my headset microphone (Auzentech X-Fi Fore 7.1 PCI-E sound card) simultaneously.

I tried the above but could not get it to work. I tried Audacity, RecordMyDesktop, SimpleScreenRecorder. I realized that even if I managed to get one program to record the two audio sources together and a second program to capture the video, I would have to line them up in a video editor (OpenShot) which wouldn't be aligned to the millisecond.

Finally, I found a perfect solution with Open Broadcaster Software (OBS)

In Settings → Audio, I was able to select:

  • Desktop Audio Device - Monitor of GK106 HDMI Audio Controller Digital Stereo (HDMI 2)
  • Mic/Auxiliary Audio Device - EMU20k2 (X-Fi Titanium Series) Analog Stereo.

For Source, I selected Screen Capture (XSHM) to capture the entire desktop.

Works perfectly.


The only way I was able to do this on 12.04 was to load ALSA's module module-loopback as recommended by Charl Botha in this screen-cast.

The short story ( as explained there ):

  • Get PulseAudio Volume Control (pavucontrol)
  • On Input devices tab, see that you have "Monitor of Built-in Analog Stereo" -- this is a virtual recording device with which you can record whatever's coming out of your speakers.
  • UPDATED: Now we just need to route your microphone to your speakers too. Do this by typing pactl load-module module-loopback latency_msec=1 at the shell prompt.
  • If you now record with audacity, or recordmydesktop, from the "Monitor of Built-in Analogy Stereo" (see Recording tab of pavucontrol after you start recording), you'll get your microphone as well as whatever's coming out of the speakers. This means that you can now easily record Skype meetings or private Google+ Hangouts.
  • UPDATED: On the Recording tab, you can show all streams (combobox at the bottom) and then configure which microphone (if you have more than one) should loopback into the built-in analog stereo

I think this module load has the same effect as the "Duplex" config recommended by @Takkat, but did not work on my machine.