Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been following these instructions for recording the output of a program I wrote (that uses rtaudio to synthesize music) http://jordilin.wordpress.com/2006/07/28/howto-recording-audio-from-the-command-line/

However, when I try to use arecord I just record the microphone, not the output of my program.

Using arecord -l to list capture devices I see :

**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC269VB Analog [ALC269VB Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Does this look like it's giving me the option to record the output of another program? And if so, how do I do that?

share|improve this question
add comment

2 Answers

I get just about same output from arecord -l. I've used audacity to record a song from a website (yes, I tried to buy the song from the site, but...). Need to get the right adjustment of muting the microphone (if possible) and then cleaning up any static/background noise. So for you, I would start audacity, start your program, set to record to a new project and then perform the functionality the you want to record.

share|improve this answer
I tried Audacity too. But same problem. I'm not recording any of the output of my program at all. I'm just getting the microphone. –  interstar Dec 29 '11 at 2:34
Try this: from the mixer, go to capture and ensure that microphone's volume is down and the others are up. –  Arcege Dec 29 '11 at 3:25
Nothing I'm afraid. I just don't think that ALSA (or PulseAudio not quite sure which is running the show) knows about the program as a potential input source. Alsamixer doesn't have a "mix" as an input option. Pavucontrol shows me a "Monitor of Internal Audio Analogue Stereo" and I've set that to 100% but it has no effect. –  interstar Dec 29 '11 at 3:37
add comment

If you don't mind capturing the input from all the various programs, I believe you can capture the input by changing your pavucontrol configuration. When I go to the Configuration tab, I see a Built-in Audio section and a drop-down list next to Profile:. For me, it's normally set to Analog Stereo Duplex, but you can change it to Analog Stereo Input and Audacity or other recording software will be able to capture the output. Of course, you can't listen to it while it's recording, so don't forget to change it back when you're done.

I encountered a few problems that I attribute to PulseAudio; I just restarted it like so:

$ pulseaudio --kill && sleep 1 && pulseaudio --start

Here are the steps that worked for me:

  1. Close whatever application you are trying to record.
  2. Open pavucontrol and change the profile to input.
  3. Open the application you are trying to record.
  4. Play sound. Make sure that it is registering in pavucontrol by checking the playback tab. If it isn't, restart pulseaudio.
  5. Open the sound recorder, such as Audacity.
  6. Record.
  7. Switch back to pavucontrol and change the profile back to duplex.
  8. Clean up and export the recorded audio.
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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