One microphone, recording mono fails

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

One microphone, recording mono fails

Jan Martinek-2
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/GstAlsaSrc:alsasrc0:
Could not negotiate format
Additional debug info:
gstbasesrc.c(2584): gst_base_src_start ():
/GstPipeline:pipeline0/GstGConfAudioSrc:gconfaudiosrc0/GstBin:bin0/GstAlsaSrc: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® 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-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: One microphone, recording mono fails

Viraj Karandikar
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 <[hidden email]> 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/GstAlsaSrc:alsasrc0:
Could not negotiate format
Additional debug info:
gstbasesrc.c(2584): gst_base_src_start ():
/GstPipeline:pipeline0/GstGConfAudioSrc:gconfaudiosrc0/GstBin:bin0/GstAlsaSrc: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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: One microphone, recording mono fails

Jan Martinek-2
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 <[hidden email]
> <mailto:[hidden email]>> 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/GstAlsaSrc:alsasrc0:
>     Could not negotiate format
>     Additional debug info:
>     gstbasesrc.c(2584): gst_base_src_start ():
>     /GstPipeline:pipeline0/GstGConfAudioSrc:gconfaudiosrc0/GstBin:bin0/GstAlsaSrc: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
>     [hidden email]
>     <mailto:[hidden email]>
>     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
> [hidden email]
> 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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: One microphone, recording mono fails

Viraj Karandikar
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 <[hidden email]> 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 <[hidden email]
> <mailto:[hidden email]>> 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/GstAlsaSrc:alsasrc0:
>     Could not negotiate format
>     Additional debug info:
>     gstbasesrc.c(2584): gst_base_src_start ():
>     /GstPipeline:pipeline0/GstGConfAudioSrc:gconfaudiosrc0/GstBin:bin0/GstAlsaSrc: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
>     [hidden email]
>     <mailto:[hidden email]>
>     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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: One microphone, recording mono fails

Tim-Philipp Müller-2
On Tue, 2009-09-29 at 18:43 +0530, Viraj Karandikar wrote:

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

not-negotiated means there was a format incompatibility somewhere. In
this case that could be a capsfilter with a format/filter that upstream
can't output (e.g. if the source doesn't support recording in mono), or
some other element receiving a stream in a format it can't handle.
wavenc is particularly picky - you should definitly have an audioconvert
in front of wavenc, whatever you do.

Something like this should work:

 gst-launch-0.10 alsasrc !
'audio/x-raw-int,channels=1;audio/x-raw-int' ! audioconvert !
audio/x-raw-int,channels=1,depth=16 ! wavenc ! filesink location=foo.wav

Cheers
 -Tim





------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
00a
Reply | Threaded
Open this post in threaded view
|

Re: One microphone, recording mono fails

00a
In reply to this post by Viraj Karandikar

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:[hidden email]]
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 <[hidden email]> 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 <[hidden email]

> <mailto:[hidden email]>> 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/GstAlsaSrc:alsasrc0:
>     Could not negotiate format
>     Additional debug info:
>     gstbasesrc.c(2584): gst_base_src_start ():
>     /GstPipeline:pipeline0/GstGConfAudioSrc:gconfaudiosrc0/GstBin:bin0/GstAlsaSrc: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
>     [hidden email]

>     <mailto:[hidden email]>

>     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
> [hidden email]
> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel