[gst-devel] One microphone, recording mono fails

Andy Maginnis jam at smru.co.uk
Tue Sep 29 15:38:52 CEST 2009


I think this is just defaulting to your HW capabilities. Use -v to see
whats happening.

 

examples on my machine, 

gst-launch -v alsasrc device=hw:1 ! audioconvert ! alsasink device=hw:1

gst-launch -v alsasrc device=hw:0 ! audioconvert ! alsasink device=hw:0

 

produce differing numbers of source channels. I suspect your older
computer only has one channel.

 

>LAUNCH 1

/pipeline0/alsasrc0.src: caps = audio/x-raw-int, endianness=(int)1234,
signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000,
channels=(int)1

.......          

/pipeline0/audioconvert0.src: caps = audio/x-raw-int,
endianness=(int)1234, signed=(boolean)true, width=(int)16,
depth=(int)16, rate=(int)48000, channels=(int)2

/pipeline0/audioconvert0.sink: caps = audio/x-raw-int,
endianness=(int)1234, signed=(boolean)true, width=(int)16,
depth=(int)16, rate=(int)48000, channels=(int)1

/pipeline0/alsasink0.sink: caps = audio/x-raw-int, endianness=(int)1234,
signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)48000,
channels=(int)2

 

>LAUNCH 2

pipeline0/alsasrc0.src: caps = audio/x-raw-int, endianness=(int)1234,
signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100,
channels=(int)2

....

/pipeline0/audioconvert0.src: caps = audio/x-raw-int,
endianness=(int)1234, signed=(boolean)true, width=(int)32,
depth=(int)32, rate=(int)44100, channels=(int)2

/pipeline0/audioconvert0.sink: caps = audio/x-raw-int,
endianness=(int)1234, signed=(boolean)true, width=(int)32,
depth=(int)32, rate=(int)44100, channels=(int)2

New clock: GstAudioSrcClock

/pipeline0/alsasink0.sink: caps = audio/x-raw-int, endianness=(int)1234,
signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100,
channels=(int)2/

 

I can do 

gst-launch -v alsasrc device=hw:0 ! alsasink device=hw:0

 

but not

gst-launch -v alsasrc device=hw:1 ! alsasink device=hw:1

as I need to modify the number of channels, I need the audioconvert for
this one!

 

 

From: Viraj Karandikar [mailto:virajk at gmail.com] 
Sent: 29 September 2009 14:13
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] One microphone, recording mono fails

 

Hi,

I dont see any issue in using audioconvert.

Did you see the log by setting debug level to 5?

When exactly "Could not negotiate format" error is coming? it might give
some clue on whats happening.

 

-Viraj

On Tue, Sep 29, 2009 at 5:55 PM, Jan Martinek <honza at dp.fce.vutbr.cz>
wrote:

Hi,

this is interesting, thank you. But is it a recommended, clean solution
or just workaround?

I have tried mono recording on a different (older) computer and it works
fine there. Relevant line from "lspci" is this:

00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

On the other hand, one channel recording fails on my computer with
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

Does it depend on hardware? Do capabilities differ? I would be
surprised, because this seems to me as very basic functionality.

Thank you,
Jan Martinek


On 09/29/2009 01:57 PM, Viraj Karandikar wrote:
> Hi,
> You can capture 2 channels and then use audioconvert to convert it to
> mono channel.
> gst-launch gconfaudiosrc ! capsfilter \
> caps=audio/x-raw-int,rate=44100,channels=2,depth=16 ! \
> audioconvert !
>
audio/x-raw-int,rate=8000,depth=16,channels=1,width=16,signed=\(boolean\
)TRUE,endianness=\(int\)1234
> ! wavenc ! filesink location=test.wav
> regards,
> Viraj
>
> On Tue, Sep 29, 2009 at 4:53 PM, Jan Martinek <honza at dp.fce.vutbr.cz

> <mailto:honza at dp.fce.vutbr.cz>> wrote:
>
>     Hello,
>
>     I am unable to record only one channel (mono). I have only one
>     microphone attached to sound card. But if I run this
>
>     gst-launch gconfaudiosrc ! capsfilter \
>     caps=audio/x-raw-int,rate=44100,channels=1,depth=16 ! \
>     wavenc ! filesink location=test.wav
>
>     then I get this error message:
>
>     Setting pipeline to PAUSED ...
>     ERROR: Pipeline doesn't want to pause.
>     ERROR: from element
>
/GstPipeline:pipeline0/GstGConfAudioSrc:gconfaudiosrc0/GstBin:bin0/GstAl
saSrc:alsasrc0:
>     Could not negotiate format
>     Additional debug info:
>     gstbasesrc.c(2584): gst_base_src_start ():
>
/GstPipeline:pipeline0/GstGConfAudioSrc:gconfaudiosrc0/GstBin:bin0/GstAl
saSrc:alsasrc0:
>     Check your filtered caps, if any
>     Setting pipeline to NULL ...
>     Freeing pipeline ...
>
>
>     It can be solved if I use two channels for recording, so this
>
>     gst-launch gconfaudiosrc ! capsfilter \
>     caps=audio/x-raw-int,rate=44100,channels=2,depth=16 ! \
>     wavenc ! filesink location=test.wav
>
>     works fine. But I would like to record one channel because further
data
>     processing is little easier.
>
>     Thank you
>     Jan Martinek
>
>
------------------------------------------------------------------------
------
>     Come build with us! The BlackBerry&reg; Developer Conference in
SF, CA
>     is the only developer event you need to attend this year.
Jumpstart your
>     developing skills, take BlackBerry mobile applications to market
and
>     stay
>     ahead of the curve. Join us from November 9&#45;12, 2009. Register
>     now&#33;
>     http://p.sf.net/sfu/devconf
>     _______________________________________________
>     gstreamer-devel mailing list
>     gstreamer-devel at lists.sourceforge.net

>     <mailto:gstreamer-devel at lists.sourceforge.net>

>     https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
>
>
> --
> - Viraj
> Reality is merely an illusion, albeit a very persistent one.
>
>

>
------------------------------------------------------------------------

>
>
------------------------------------------------------------------------
------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
your
> developing skills, take BlackBerry mobile applications to market and
stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register
now&#33;
> http://p.sf.net/sfu/devconf
>
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

------------------------------------------------------------------------
------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel






-- 
- Viraj
Reality is merely an illusion, albeit a very persistent one.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090929/e155ddb8/attachment.htm>


More information about the gstreamer-devel mailing list