multicast udpsink fails

JPM jpmelian at gmail.com
Wed Feb 12 11:03:34 PST 2014


Hi,

These pipelines work fine with unicast IP addresses :

Server : gst-launch-1.0 -v audiotestsrc ! audioconvert ! audioresample !
audio/x-raw,format=S16LE,channels=1,rate=44100 ! udpsink host=192.168.1.140
port=5002

Client :   gst-launch-1.0 -v udpsrc port=5002 !
audio/x-raw,format=S16LE,channels=1,rate=44100 ! volume volume=2 !
autoaudiosink sync=false

I don't know which is the protocol used over udp but it works.

Now I would like to know how the server can send the audio stream to a
multicast group and how
the clients can join  this group.

What do you mean with ip4 ?, IP version 4 ?

Thanks and cheers.


2014-02-12 19:33 GMT+01:00 <gstreamer-devel-request at lists.freedesktop.org>:

> Send gstreamer-devel mailing list submissions to
>         gstreamer-devel at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> or, via email, send a message with subject or body 'help' to
>         gstreamer-devel-request at lists.freedesktop.org
>
> You can reach the person managing the list at
>         gstreamer-devel-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gstreamer-devel digest..."
>
>
> Today's Topics:
>
>    1. Re: multicast udpsink fails (Mariusz Buras)
>    2. How to detect the elements in use (Yogesh Tyagi)
>    3. Re: Suggestions for audio source wanted (Stefan Sauer)
>    4. Re: streaming delay (Stefan Sauer)
>    5. Re: How to detect the elements in use (Stefan Sauer)
>    6. Re: How to detect the elements in use (Tim M?ller)
>    7. Re: streaming delay (Tim M?ller)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 12 Feb 2014 18:02:40 +0000
> From: Mariusz Buras <mariusz.buras at gmail.com>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Subject: Re: multicast udpsink fails
> Message-ID:
>         <CACnfBtrdm8E=
> EGFDEvNXd_hrC5hhRo7oJ2LLc196ae9PnOrZWw at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> You need to force at least ip4 on udpsink. Also you probably want to
> payload your data before udpsink.
>
> --
> Cheers,
> Mariusz Buras.
> ---
> http://sqward.net
> http://www.linkedin.com/in/mariuszburas
>
>
> On 12 February 2014 17:58, JPM <jpmelian at gmail.com> wrote:
>
> > Hi,
> >
> > I am trying to send one audio stream to several clients using multicast
> > with this pipeline :
> >
> > gst-launch-1.0 -v audiotestsrc ! audioconvert ! audioresample !
> > audio/x-raw,format=S16LE,channels=1,rate=44100 ! udpsink host=224.1.1.1
> > auto-multicast=true port=3000
> >
> > But appear the following error :
> >
> > Setting pipeline to PAUSED ...
> > ERROR: Pipeline doesn't want to pause.
> > ERROR: from element /GstPipeline:pipeline0/GstUDPSink:udpsink0: Could not
> > get/set settings from/on resource.
> > Additional debug info:
> > gstmultiudpsink.c(844): gst_multiudpsink_configure_client ():
> > /GstPipeline:pipeline0/GstUDPSink:udpsink0:
> > Could not join multicast group: Error joining multicast group: No such
> > device
> > Setting pipeline to NULL ...
> > Freeing pipeline ...
> >
> > Any help ?
> >
> > Thanks and regards.
> >
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140212/30c2dc4f/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Wed, 12 Feb 2014 23:34:50 +0530
> From: Yogesh Tyagi <yogesh.bit2006 at gmail.com>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Subject: How to detect the elements in use
> Message-ID:
>         <
> CADL-HDhtzsaM5u0rXaUMKurNbQpQabe_ZjdoEuLydOKOtv1ctg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> How can I detect if a particular element is being used in the pipeline?
>
> Thanks,
> Yogesh
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140212/8a65c0db/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Wed, 12 Feb 2014 19:05:45 +0100
> From: Stefan Sauer <ensonic at hora-obscura.de>
> To: Discussion of the development of and with GStreamer
>         <gstreamer-devel at lists.freedesktop.org>
> Subject: Re: Suggestions for audio source wanted
> Message-ID: <52FBB7F9.3030000 at hora-obscura.de>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 02/11/2014 03:34 PM, Carlos Rafael Giani wrote:
> > Hello,
> >
> > I have a library which produces audio data. I wish to wrap it in a
> > source element.
> > There are some problems though:
> >
> > * The source is not live like alsasrc for example - it can be made to
> > wait until more samples can be consumed.
> > * The library for this source delivers samples by means of a callback.
> > This callback must not block for long. If at time of calling no
> > samples can be consumed, the callback can return 0, which will cause
> > the pause mentioned above. The library simply invokes the callback
> > again, about 100ms later. This is akin to the polling strategy.
> > * The callback receives not only samples, but also format information
> > (sample rate, sample format, number of channels, etc.). Which means
> > these could change at any point in time.
> >
> > I wonder what base class to use here.
>
> Is the library calculating the audio? I am using GstBaseSrc for my audio
> synths in buzztrax. I have a  GstAudioSynth baseclass there:
>
> https://github.com/Buzztrax/gst-buzztrax/blob/master/libgstbuzztrax/audiosynth.c
>
> Stefan
> >
> > GstAudioSrc does not work well, since it expects the subclass to be
> > able to work in a pull-based manner (GstAudioSrc call the read()
> > vfunc, and the subclass has to deliver the samples then). Here, it is
> > the other way round. I could create some kind of FIFO between the
> > callback and my read() function, but that does not solve the format
> > change problem - I cannot call set_caps() inside read().
> >
> > GstAudioBaseSrc is perhaps better suited, since it allows for a custom
> > ringbuffer. But I cannot simply use commit(), since it may block.
> > prepare_read() gives me information about how many samples I can write
> > and where to write them to, but it must be this exact number of
> > samples. What if for example prepare_read() informs me that it expects
> > 5000 samples, the library's callback provides me with 4000 samples,
> > which I copy over, then in the next callback it informs me about a new
> > format? Just call advance() (even though not all samples have been
> > written; perhaps fill the rest with nullsamples) and then call
> > set_caps()?
> >
> > On top of that, GstAudioBaseSrc is derived from GstPushSrc, which,
> > according to the documentation, is suited for sources which cannot
> > seek or seek only very slowly. But the library can seek easily and
> > quickly. Any recommendations? Simply overriding do_seek should suffice?
> >
> > cheers
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 12 Feb 2014 19:08:12 +0100
> From: Stefan Sauer <ensonic at hora-obscura.de>
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: streaming delay
> Message-ID: <52FBB88C.50902 at hora-obscura.de>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On 02/12/2014 04:33 PM, Lee Matthews wrote:
> > Hi
> >
> > I wish to stream audio over the network using the flac codec. I use the
> following command :
> Is flac a must? If both sides are part of your app, consider opus, which
> can support low latency.
>
> Stefan
>
> >
> > gst-launch -v autoaudiosrc !  flacenc ! tcpserversink port=9001
> >
> > to receive I use the command :
> >
> > gst-launch -v tcpclientsrc port=9001 ! flacdec ! audioconvert !
> autoaudiosink
> >
> > I get about 1 second delay between sending and receiving the audio.
> >
> > If instead I transmit using :
> >
> > gst-launch -v autoaudiosrc !
> audio/x-raw-int,channels=1,depth=16,width=16,rate=44000 !  flacenc !
> tcpserversink port=9001
> >
> > the delay seems to go up to about 2 seconds.
> >
> >
> > I wish to sample my audio at 16KHz instead of 44KHz, so if I transmit
> using :
> >
> > gst-launch -v autoaudiosrc !
> audio/x-raw-int,channels=1,depth=16,width=16,rate=16000 !  flacenc !
> tcpserversink port=9001
> >
> > I get an approx 4 second delay. Why is this ?
> >
> > I'm guessing it's because flacenc needs a certain number of samples
> before it can compress a block, it therefore has to wait longer with a
> lower sample rate ?
> >
> > Is there any way that I can reduce the sample rate whilst keeping a low
> delay ?
> >
> > Thanks
> > Lee
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
> ------------------------------
>
> Message: 5
> Date: Wed, 12 Feb 2014 19:10:51 +0100
> From: Stefan Sauer <ensonic at hora-obscura.de>
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: How to detect the elements in use
> Message-ID: <52FBB92B.5030606 at hora-obscura.de>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On 02/12/2014 07:04 PM, Yogesh Tyagi wrote:
> > Hi,
> >
> > How can I detect if a particular element is being used in the pipeline?
>
> You can programmatically iterate over the whole pipeline and check each
> element. If you just need this to debug something you can use
> GST_DEBUG_BIN_TO_DOT_FILE.
>
> Stefan
>
> >
> > Thanks,
> > Yogesh
> >
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140212/5b26ec83/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 6
> Date: Wed, 12 Feb 2014 18:29:11 +0000
> From: Tim M?ller <tim at centricular.com>
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: How to detect the elements in use
> Message-ID: <1392229751.1997.58.camel at xps>
> Content-Type: text/plain; charset="UTF-8"
>
> On Wed, 2014-02-12 at 19:10 +0100, Stefan Sauer wrote:
>
> Hi,
>
> > > How can I detect if a particular element is being used in the
> > > pipeline?
> > >
> >
> > You can programmatically iterate over the whole pipeline and check
> > each element. If you just need this to debug something you can use
> > GST_DEBUG_BIN_TO_DOT_FILE.
>
> Or - if you don't need to know right immediately, just check what
> elements you get messages posted from on the bus, e.g. state change
> messages. You can check the 'source' of the message, perhaps the
> G_OBJECT_TYPE_NAME or you can get the element factory from it via the
> element API and then check that name.
>
> Cheers
>  -Tim
>
> --
> Tim M?ller, Centricular Ltd - http://www.centricular.com
>
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 12 Feb 2014 18:33:20 +0000
> From: Tim M?ller <tim at centricular.com>
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: streaming delay
> Message-ID: <1392230000.1997.62.camel at xps>
> Content-Type: text/plain; charset="UTF-8"
>
> On Wed, 2014-02-12 at 16:33 +0100, Lee Matthews wrote:
>
> > I'm guessing it's because flacenc needs a certain number of samples
> > before it can compress a block, it therefore has to wait longer with a
> > lower sample rate ?
> >
> > Is there any way that I can reduce the sample rate whilst keeping a low
> delay ?
>
> You can play with flacenc's "blocksize" property, see gst-inspect-1.0
> flacenc.
>
> Have you measured the latency without any encoder at all? That is just
> plain audio/x-raw over TCP ? You can parse it on the other end with
> audioparse, see gst-inspect-1.0 audioparse.
>
> For low-latency streaming maybe also consider UDP/RTP (there's no flac
> payloader but there's a generic gst payloader which should work in that
> case, and if it doesn't have to be lossless, maybe consider Opus, as
> pointed out already by someone).
>
> Cheers
>  -Tim
>
> --
> Tim M?ller, Centricular Ltd - http://www.centricular.com
>
>
>
> ------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> End of gstreamer-devel Digest, Vol 37, Issue 39
> ***********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140212/b295254e/attachment-0001.html>


More information about the gstreamer-devel mailing list