What is the purpose of gst audioconvert plugin

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

What is the purpose of gst audioconvert plugin

NinjaGod
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of gst audioconvert plugin

Sean McNamara-4
Hi,

On Mon, Dec 27, 2010 at 5:52 AM, Anirudh <[hidden email]> wrote:

>
> So I was going thru the gst manual and I found that in an example for playing
> an ogg file they were using an audio converter after decoding the ogg format
> into raw format.
>
> the pipeline they were using is as follows:
>
> file-source | ogg-demuxer | vorbis-decoder | converter | alsa-output
>
> so my question is what is the purpose of audioconverter when I have already
> decoded it.
> I mean!!! to which format am I converting it.

The audioconvert element's purpose is to act both as a negotiator and
a sort of policeman. The negotiator part is this: the audioconvert
element is extremely flexible as to the audio formats it will accept
on either "end" of the element (the source pad and the sink pad). So
it helps two plugins potentially expecting an incompatible format to
"talk" to one another seamlessly. The policeman part is this: the
audioconvert element *makes sure* that the audio flowing from its sink
pad to its source pad is going to be converted to the format that the
source pad's client expects. It has fairly good error checking if it
is unable to do that for some reason, and it is fairly good at
performing most conversions without any loss of data (except where
data loss is inevitable, such as stereo to mono).

Unfortunately, the audioconvert element does not (that I am aware)
perform sample rate conversions. For that, you need the
`audioresample' element. Its goals and function are vaguely similar to
audioconvert, except that, rather than converting sample format
parameters such as encoding, bit depth, and number of channels,
instead it converts between sample rates. You can think of the element
chain `audioconvert ! audioresample' as being a single unit that
performs full-scope sample format negotiation and conversion for all
of the standard parameters of a PCM sample.

The reason why audioconvert is necessary in that case is that the
alsasink element (as well as many other elements) are not able to
unconditionally accept all sample formats. Here's a simple example.

Let's say you have a PCI sound card that accepts sample formats that
are 8 or 16-bits wide, signed little endian, stereo or up to 5.1
channels, and sample rates from 8000 Hz to 48000 Hz.

If your alsasink element does not specify an ALSA device string that
goes through the ALSA `plug' PCM plugin, then ALSA is incapable of
supporting sample formats that your soundcard does not natively
support in the hardware. So if you pass a 192 KHz sample of 32-bit
floats in 8.1 channel to the above stated soundcard, you will get an
error in the alsasink element.

Not to overgeneralize, but the basic point is that not all
"uncompressed" or "decoded" audio is created equal, and you can not
take for granted that any two GStreamer elements supporting
uncompressed PCM audio will necessarily be able to natively support
all possible sample formats. The solution is to use extra CPU power to
do the needed conversions with the audioconvert and audioresample
elements.

HTH,

Sean

> So if I have decoded it into raw format, I think I can directly play it.
>
> please enlighten me!!! THanks in advance
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/What-is-the-purpose-of-gst-audioconvert-plugin-tp3164871p3164871.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of gst audioconvert plugin

NinjaGod
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Can we use gst-launch to do video capture using camerabin?

Chen, Weian
Hi there,

Can we use command line (gst-launch) to do video capture using camerabin? I know we can do view-finder very easily.

Thanks,
Weian

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can we use gst-launch to do video capture using camerabin?

Thiago Sousa Santos-2


On Mon, Dec 27, 2010 at 9:15 AM, Chen, Weian <[hidden email]> wrote:
Hi there,

Can we use command line (gst-launch) to do video capture using camerabin? I know we can do view-finder very easily.

You need to use capture-start signal to do video capture with camerabin, so you can't do that from gst-launch. There is, however, an example application on -bad/tests/examples/camerabin that allows you to use it and do video/image capture from command line.
 
 
Thanks,
Weian

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



--
Thiago Sousa Santos

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Can we use gst-launch to do video capture using camerabin?

Chen, Weian

 

Thanks for the information.

 

Weian

 

From: Thg. [mailto:[hidden email]]
Sent: Monday, December 27, 2010 8:22 PM
To: Discussion of the development of GStreamer
Subject: Re: [gst-devel] Can we use gst-launch to do video capture using camerabin?

 

 

On Mon, Dec 27, 2010 at 9:15 AM, Chen, Weian <[hidden email]> wrote:

Hi there,

Can we use command line (gst-launch) to do video capture using camerabin? I know we can do view-finder very easily.


You need to use capture-start signal to do video capture with camerabin, so you can't do that from gst-launch. There is, however, an example application on -bad/tests/examples/camerabin that allows you to use it and do video/image capture from command line.
 

 

Thanks,
Weian

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Thiago Sousa Santos


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of gst audioconvert plugin

Wes Miller
Administrator
In reply to this post by Sean McNamara-4
Sean,

This is a wonderful explanation; one that need to be moved to some featured place on the wiki or, better, a new doc on the website where all of the elements can get equal treatment.  

So, Sean, Wim, et. al, what is the method to undertake such a task.  Though I know better than to ever volunteer, I volunteer to collect the explanations and turn them into some sort of document (good excuse to learn LaTEX?).  

I'll begin here with a request to all published element authors to write a similar explanation and perhaps add any extra bits you think useful.  One I would consider helpful is an explanation of why your element is -bad or -ugly -- especially if it's a licensing issue.  

Details about the properties would be helpful too.  I still have no clue what half the encoding/compression  parms do with mpeg.

Another idea, in cases where the element is otherwise LGPL but it uses, say, some licensed video encoding, whether someone licensed to use that technology can use your element as if it were LGPL.  I hear a lot of "ask your lawyer" responses coming.

Happy New Year,

Wes

Reply | Threaded
Open this post in threaded view
|

Re: What is the purpose of gst audioconvert plugin

Stefan Sauer
Am 29.12.2010 15:44, schrieb Wes Miller:
>
> Sean,
>
> This is a wonderful explanation; one that need to be moved to some featured
> place on the wiki or, better, a new doc on the website where all of the
> elements can get equal treatment.  

Elements are docuemnted as part of the code. Each element (should) have a
doc-blob at the start of the source file. The comment starts like this:

/**
 * SECTION:element-audioconvert
 *
 * ...
 */

The documentation there is extracted and can be read on the gstreamer webpage or
e.g. locally in devhelp. We happily accept patches to improve such documentation.

Stefan

>
> So, Sean, Wim, et. al, what is the method to undertake such a task.  Though
> I know better than to ever volunteer, I volunteer to collect the
> explanations and turn them into some sort of document (good excuse to learn
> LaTEX?).  
>
> I'll begin here with a request to all published element authors to write a
> similar explanation and perhaps add any extra bits you think useful.  One I
> would consider helpful is an explanation of why your element is -bad or
> -ugly -- especially if it's a licensing issue.  
>
> Details about the properties would be helpful too.  I still have no clue
> what half the encoding/compression  parms do with mpeg.
>
> Another idea, in cases where the element is otherwise LGPL but it uses, say,
> some licensed video encoding, whether someone licensed to use that
> technology can use your element as if it were LGPL.  I hear a lot of "ask
> your lawyer" responses coming.
>
> Happy New Year,
>
> Wes
>
>


------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel