I've tried :

avconv -f alsa -i pulse recod.wav

..but it doesn't capture anything. Have any idea?

1 Answer 1


The syntax to invoke avconv is nicely explained in the manpage for avconv. From audio recordings the following options are available:

-f: Force input or output file format.
-i: input file name

To record from ALSA we need the format to be alsa, and the input depends on the device we record (usually this will be the defualt device). Then your command should be as follows:

avconv -f alsa -i default record.wav

To simply record from an ALSA device we may consider using the more basic command line tool arecord. This gives the following example command for a 10 second (-d) recording in cd quality (-f) in wav codec (-t):

arecord -d 10 -f cd -t wav -D copy record.wav

To be able to record from an output sink, we may have to choose a duplex audio profile in "Sound Settings --> Hardware":

enter image description here

Unfortunately In >= 13.04 the hardware configuration was removed from the sound settings. To have access to advanced device configurations we need to install and run pavucontrol Install pavucontrol. The duplex profile can then be selected in the Configuration tab:

enter image description here

  • Thanks for the answer, but avconv -f pulse -i default record.wav doesn't work for me..Terminal output hilights this: [pulse @ 0x1dfad60] Estimating duration from bitrate, this may be inaccurate and I end up with a 34KB small wav file..
    – Naveen
    May 9, 2013 at 10:16
  • With ALSA, I'm having 3.8MB file, but there is nothing in it.. just an empty clip. :(
    – Naveen
    May 9, 2013 at 10:29
  • Ohmy god! I don't have a hardware tab like yours!... I do have an option to change profile in output tab...but there's no Duplex. I've only got Analog stereo output.... I'm on Raring Ringtail..
    – Naveen
    May 10, 2013 at 16:40
  • Duplex is important if you want to listen to what you record otherwise other settings would work as well for pure recording. I wrote a huge how-to on meshfields.de/audio-stream-recording-linux-avconv
    – user103154
    May 12, 2014 at 23:19
  • Launch arecord and, while recording, go in Volume Control Recoding tab. Here, you can change the default recording source, that will be used by further arecord invocations. Also, to avoid system volume change impact, open Pulse Audio Preferences app, go in Simultaneous output tab and enable the virtual device.
    – KrisWebDev
    Jan 3, 2016 at 18:43

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.