[gst-devel] Two Audio Streams In One Pipeline

Stefan Kost ensonic at hora-obscura.de
Tue Nov 3 18:23:16 CET 2009


Marcelo de Sá Mendoza schrieb:
> Hi, Stefan!
>
> Thanks for you reply. So here is the pipe with two streams that dont
> work together:
>
> gst-launch -v udpsrc port=5000
> caps="application/x-rtp,media=audio,payload=3,clock-rate=8000,channels=1,encoding-name=GSM"
> ! .recv_rtp_sink_0 gstrtpbin ! rtpgsmdepay ! gsmdec ! audioconvert !
> pulsesink gstrtpbin name=rtpbin autoaudiosrc ! gsmenc ! rtpgsmpay !
> rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! identity ! udpsink
> port=5000 host=127.0.0.1
>
> I do not get any error when running that pipe! But I cant hear
> anything when running it. However, when I separate the streams, like
> below, and run then on different terminals, that works(but that is
> like two pipes and I dont want two pipes). The audio is captured and
> sent and I hear myself as I talk.
>
> receiver stream:
> gst-launch -v udpsrc port=5000
> caps="application/x-rtp,media=audio,payload=3,clock-rate=8000,channels=1,encoding-name=GSM"
> ! .recv_rtp_sink_0 gstrtpbin ! rtpgsmdepay ! gsmdec ! audioconvert !
> pulsesink
>
> sender stream:
> gst-launch -v gstrtpbin name=rtpbin autoaudiosrc ! gsmenc ! rtpgsmpay
> ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! identity ! udpsink
> port=5000 host=127.0.0.1
>
> As I said before, I do not get any error when running those streams in
> one pipeline, but I cant hear any audio sent through udp...
>
Try some debug logging to see if the pipeline is processing buffers
(e.g. insert identity and do GST_DEBUG="identity:4"). We should also
have rtp examples in the docs.

Stefan


>  
> 2009/10/30 Rajesh Marathe <rmarathe at i-rode.com
> <mailto:rmarathe at i-rode.com>>
>
>     Hi Stefan,
>
>     Sorry to diverge slightly from the topic, but, I do have a query
>     on two
>     streams. I tried doing this using gstreamer:
>     - Create two different pipelines for two streams. (Create different
>     elements for each pipeline but these elements refer to same
>     hardware units).
>     - Play stream1 while stream2 is in PAUSED state.
>     - After few seconds, PAUSE stream1 and move stream2 to PLAY state.
>     -
>     I notice that stream1 plays and pauses but stream2 does not play
>     actually.
>
>     Will the above scenario work and if yes, do you see anything that
>     needs
>     done apart from the above ?
>
>     thanks and regards,
>     Rajesh Marathe.
>
>     On 10/30/2009 12:58 AM, Stefan Kost wrote:
>     > Marcelo de Sá Mendoza schrieb:
>     >
>     >> Hi
>     >>
>     >> Is possible to have two streams( 1 sender 1 receiver ) or more,
>     of audio
>     >> in one pipeline only? I'm trying to do that and I getting
>     frustrated. I
>     >> made two pipelines for each stream and worked cool, I hear the
>     audio
>     >> received from the host and the host hear what I talk. The thing
>     is that
>     >> I need to do that in ONE pipeline, but I can't. I know that two
>     streams
>     >> are possible in one pipeline, cause when I do the test below,
>     it works:
>     >>
>     >> gst-launch -v filesrc location=notice.html ! identity ! udpsink
>     >> host=127.0.0.1 port=6000 udpsrc port=6000 ! identity ! filesink
>     >> location=notice2.html
>     >>
>     >> but when I change to pulsesrc/pulsesink that doesnt work. Works
>     only in
>     >> diferent pipelines. There's something else that I need to do?
>     >>
>     > You can have as many streams in a pipe as you want. The above
>     example is quite
>     > uncomplete though. You probably want to use rtp for sending
>     audio over the
>     > network. Also if something does not work, tell us what errors
>     you get. Otherwise
>     > we can't help.
>     >
>     > Stefan
>     >
>     >
>     >> Thanks for the atention.
>     >>
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------
>     >>
>     >>
>     ------------------------------------------------------------------------------
>     >> Come build with us! The BlackBerry(R) 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/devconference
>     >>
>     >>
>     >>
>     ------------------------------------------------------------------------
>     >>
>     >> _______________________________________________
>     >> 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
>     >>
>     >
>     >
>     ------------------------------------------------------------------------------
>     > Come build with us! The BlackBerry(R) 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/devconference
>     > _______________________________________________
>     > 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
>     >
>     >
>
>
>     ------------------------------------------------------------------------------
>     Come build with us! The BlackBerry(R) 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/devconference
>     _______________________________________________
>     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
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) 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/devconference
> ------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>   





More information about the gstreamer-devel mailing list