LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Capture sound from soundcard - tutorials are close but not quite (https://www.linuxquestions.org/questions/linux-software-2/capture-sound-from-soundcard-tutorials-are-close-but-not-quite-747393/)

tensigh 08-13-2009 05:48 PM

Capture sound from soundcard - tutorials are close but not quite
 
Hello,

I'm running Ubuntu Intrepid Ibid running kernel 2.6.27-14-generic on a Toshiba laptop. I'm trying to capture sound from a radio broadcast from NHK here in Japan and I can't quite get it. The broadcast is initiated from a Flash object so I can't use streamripper.

I can open PulseAudio volume controls in Gnome and I switched my input source in PulseAudio Device Controller to 'Monitor Source of ALSA PCM on front:0 (CONEXANT Analog) via DMA' and I can see the sound output in Gnome. When I try to record from arecord I'm still getting a blank file with no sound.

How do I tell arecord how to use the monitor driver?

Thanks

mushroomboy 08-13-2009 06:31 PM

http://www.avsforum.com/avs-vb/showthread.php?t=1059866

One person mentions a simple solution... Route autio out to autio in, physical route. Simple yet...Well yet ugly.

jlinkels 08-13-2009 09:44 PM

If I understand well, you have sound on Line In, and you want to capture that to a file, correct?

If you are using arecord, issue these commands first:

Code:

/usr/bin/amixer -c 0 sset 'Line',0 100%,100% mute  capt
/usr/bin/amixer -c 0 sset 'PCM',0 100%,100% unmute  nocap

-c 0 is your first audio card, -c 1 the second one, etc.

After you issued these commands, do:

Code:

arecord -r 8 -D plughw:0,0
(You might want to do arecord -L to list your audio devices, I always forget how to address them, but plughw is generic)

If you see mainly '{' and '|' characters on your screen, you are NOT capturing any sound. But that is unlikely.

If you see the screen full of garbage, you are capturing.

So choose a sample rate, resolution and pipe the output in your file:
Code:

arecord -f CD -D plughw:0,0 > myaudiofile.wav
Not that these files are uncompressed and grow large quickly.

jlinkels


All times are GMT -5. The time now is 09:02 PM.