I'm trying to record the output of my speakers, but when I do this, it also records from the microphone. I'd like to only record the non-microphone devices.
Trying:
$ (AUDIODEV=hw:0,0; rec test.mp3)
$ rec -d hw:0,0 test.mp3
I've also tried ffmpeg:
$ ffmpeg -f alsa -i hw:CARD=PCH,DEV=0 test.mp3
$ ffmpeg -f alsa -i front:CARD=PCH,DEV=0 test.mp3
$ ffmpeg -f alsa -i surround40:CARD=PCH,DEV=0 test.mp3
I've seen elaborate things such as:
$ parec -v -d analog-output-speaker | sox -t raw -e signed-integer b 16 -r 44100 -c 2 test.mp3
Proposed online, but this still records the mic, and comes with obsolete sox options.
How can I record only non-mic input in ubuntu 14.04+ ?
This method shows how to record whatever audio is playing on your computer, similar to recording "stereo mix" in windows. This makes recording audio played by any application, including flash videos, possible.
I'm using the Sound Recorder application that comes in standard Ubuntu installations. To set this up using other programs (like Audacity) just substitute it in these instructions.
pavucontrol
(PulseAudio Volume Control) usingapt-get
or the Ubuntu Software Center.This appears to be persistent so that you will only have to do this once, but you will have to repeat these steps to record in another application.
All credit for this answer goes to this post.
Pulseaudio
Check for available sources
Specify the monitor device as input for recording command.
Using
avconv
/ffmpeg
Install it (only for
avconv
)Record using:
or
AFAIK, Ubuntu install only one tool the other just alias (after, libav was forked from ffmpeg)
Using
sox
Install the needed formats
or this to install all formats
Record using:
ALSA
Using ALSA directly, reference: https://trac.ffmpeg.org/wiki/Capture/ALSA
Check recording devices
Record (change the corresponding
<card>
and<device>
index)GUI tools
There are also some advanced GUI tools like: audacity.