Pages

Sunday, October 19, 2014

Recording Stereo Mix using avconv

Based on instructions here:
http://askubuntu.com/questions/233060/recording-speaker-audio-using-avconv

Identify your device first:

$ pactl list sources | grep output



Get the string under "Name:", it will be something like: alsa_output.pci-[some number].analog-stereo.monitor

Record audio and Video:
avconv -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -f x11grab -r 30 -s 1920*1080 -i :0.0 -vcodec libx264 -preset ultrafast -ab 320k -t 10 -threads 8 screen.mkv

Record only audio:
 avconv -f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor -t 1620 -threads 8 screen.mp3

2 comments:

Anish Sane said...

I was suggested to use ffmpeg instead of avconv...
Check here...

Also the 'some number' in the above output should also be obtainable from lspci... pciutils is more common to be installed than pulseaudio :D

Abhijit Kshirsagar said...

Not entirely sure of the differences between avconv and ffmpeg, I'm not going to choose or recommend sides here.

And yes lspci --- should also work.