How To: Enable “Stereo Mix” in PulseAudio and Record Absolutely Any Playing Audio

I found these instructions on the PulseAudio Wiki a long while back, but they still work (circa Ubuntu 10.10) and are super useful to record streams/record the audio from videos (i.e. YouTube), so I thought I’d put this out here under a different heading to help people find the info…

  1. Install PulseAudio Volume Control by running the following in the Terminal:

  2. Fire up Audacity and:
    – Go to Preferences by pressing Ctrl+P (or select “Edit” -> “Preferences…” from the drop-down menu).
    – Click the “Devices” .
    – Change the Playback device to “pulse”.
    – Change the Recording device to “pulse”.

  3. Open PulseAudio Volume Control (“Applications” -> “Sound & Video” -> “PulseAudio Volume Control”) and leave it open.
    The first time you use a recording program you need to to edit the recording settings of PulseAudio Volume Control. It should remember your settings after rebooting.

  4. Open Audacity and hit the “Record” button.

  5. While Audacity is recording, open PulseAudio Volume Control and select the “Recording” tab. It will show “Alsa plug-in Audacity. Alsa capture from” and a combo-box. Choose the “Monitor of internal audio…” if you use an internal sound card.
  6. Note: You need to select another monitor if you use any playback device other than an internal sound card. For example, when I play sound with Microsoft LifeChat headphones connected to my computer via USB, I select the “Monitor of Microsoft LifeChat Analogue Stereo” to capture from it with Alsa.

  7. Check Audacity, it should be recording now.

Sling a note in the comments if you’re having any difficulty enabling recording of the “stereo-mix” output – not that you should come up against any problems, but I’m happy to work on clarifying the wording if it’s necessary…

Cheers!

18 thoughts on “How To: Enable “Stereo Mix” in PulseAudio and Record Absolutely Any Playing Audio”

  1. I’ve had this working for months, when I rebooted back into ubuntu from the windows partition of my box it suddenly didn’t work. When I enable recording from internal audio it records my microphone. When I select recording from monitor of internal audio the recording cursor just stops. Any ideas?

    1. Maybe your gstreamer-properties audio sinks are corrupt? Try it from the bash and maybe reset your audio input sink if it’s pointing at something quirky…

      There’s a whole heap of sound-debugging related tom-foolery over at this previous article – maybe something in there will help you get to the root of the problem.

  2. Hi and thanks for the Tut – Here is my problem your tut works great and I can record audio from an outside source like youtube but I cant record from the microphone at the same time which seems odd – for example – if I play a Keroke song on youtube and want to sing along and record the whole thing in audacity only the audio from Youtube will record not the person sing through the Mic – Any help you can give I would be thankful for

    1. Hi there,

      I’m not sure if you can set multiple audio sinks to record at the same time – I have a feeling it’s going to be either from the stereo mix or from the microphone (at least in my experience).

      You can easily do what you want in a two step process, though:
      – Record the stereo mix in Audacity as per normal, then
      – Listen to it on a headset and sing-along and record to microphone, then finally,
      – Mix the two together in audacity.

      Okay, maybe that was three steps, and it means you can’t do the entire thing “live” – but you can definitely play multiple recordings at once in audacity, or play one while recording another (so play the stereo-mix-recording while actually recording from mic – but this wouldn’t be any better than just cranking up the audio and singing over the top of it so both audio and voice come in through the mic input).

      Also, sound in Linux is a horrible, dreadful mess – you’ll be tearing your hair out in no time. I can’t even get my own tutorial to work in Ubuntu 11.04 because the “pulse” selection for recording input has gone, and instead there’s a thousand pulse:Input Mix 0, pulse:Input Mix 1’s and rubbish. None of which do a damned thing as far as I can tell – and I’ve tried them all:


      This list would not even fit on the screen to capture, there are near a dozen entries below this. And this is for a laptop with a single internal sound card… That. Is. Wrong.

      And of course, this is when the pavucontrol applet itself isn’t segfaulting when choosing “stereo monitor of internal audio”:

      I hate sound in Linux, and would strongly recommend you record using something which isn’t Ubuntu, or even Linux. Mint or Debian might in some way be sane for recording audio, and you could always try it out with a live CD, but audio in Ubuntu itself is just a time-vampire.

      Cheers!

      1. Hi r3dux,
        Did you ever find a solution to your post of July 19, 2011 at 4:07 pm
        I am having the exact same problem in Linux Mint ie no generic pulse input to do a monitor recording from just the physical inputs denoted as
        pulse: Line:0 etc.. At first I thought it was due to my particular hardware but I get the same result on other hardware that works on other operating systems.
        I have tried Linux mint 12 through 15 and Ubuntu 12.10 through 13.10 with the same results. I am just trying jack which has even more routing options in the hope I find something there!
        You are so right when you say “audio in Ubuntu itself is just a time-vampire.”

        1. I didn’t find a solution in Ubuntu/Mint – but I changed distros to Arch and pulseaudio recording from monitors works perfectly just using pavucontrol to specify monitors – sorry for the delay in getting back to you!

  3. Hey brother thanks for the Help – Sound seems to be all over the map when it comes to Linux – I was thinking of doing some podcasting using Linux but its not as easy as I thought it would be at least compared to the Other OS’s – The only thing I can think of is to maybe using 2 computers one to talk with and do interviews and maybe pump that audio to a second computer through its Mic input and have
    Audacity set up there to record. Then I should have it all at least I think – Hmm 2 computers seems a bit Much – I cant believe there is not a program that runs on Linux that can make it record all audio but any ways I look forward to reading more on your Blog thanks Again and God Bless

  4. You Know One other thing I was thinking Maybe a virtual computer could Help
    My system is Kind of Beefy so I should have plenty of resources to spear

    I don’t know just a thought – I think I will try – It cant hurt lets see what happens

    1. There’s a podcast called Linux Outlaws which did a special episode on the software and hardware they use to produce their podcast which I listened to a while back – that might help point you in the right direction… I can’t seem to find the particular episode in their archives, but I’ve only had a brief look as I’m going to be rushing about like mad today. Have a look to see if you can find, and if not let me know and I’ll dig through my downloaded episodes, and I’ll post it up somewhere for you.

      Oh, and a virtual machine might be a way you could get this done, maybe! I’ll have a think about it and see what I can knock together (might be do-able, might not work at all – would have to try to find out!)

      Cheers!

  5. Just want to say a huge thank you for this. I’ve been trying for so long to record from sound card without ext mic and your tutorial solved it in a minute.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">