[gst-devel] Problem with recording audio

Markus Westergren markus.westergren at orexis.se
Tue Jan 28 07:54:02 CET 2003


Hi

I have problem with both ALSA and OSS audio input. 

With ALSA I can't understand how I'm supposed to name the devices so that I 
can use device name other than "default" (which works). Have tried "hw:0,0" 
for the first card and "hw:1,0" for the second. The result I get when trying 
to open any of these devices is:

   ** (process:3930): WARNING **: error setting rate (44100): Invalid argument

and the process is consuming all available CPU without producing any output. 
The command line looks like this:

   gst-launch alsasrc device=hw:0,0 ! wavenc ! filesink location =/tmp/tst.wav

If i enter some bogus device name i get:

   error opening pcm device hw:2,0: No such file or directory

So it seems like hw:0,0 and hw:1,0 is the right devices and that they are 
opened correctly but there are some problem setting the sample rate.

How can I choose which card I wan't to use with the gstalsa plugin?


If I try using OSS instead I can play audio but when I try to record audio 
the tst.wav file is empty and the process eats all available CPU.

   gst-launch osssrc device=/dev/dsp ! wavenc ! filesink location 
=/tmp/tst.wav

Is there anything I have missed? This worked with version 0.4.2 of GStreamer 
and I noticed that there have been some changed to the valid parameters to 
the OSS plugin. 

This have been tested on Debian Unstable with kernel 2.4.19
ALSA: 0.9.0rc6
GStreamer: 0.5.2 and CVS 0.7.0.1

/Markus




More information about the gstreamer-devel mailing list