<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09/15/2014 04:08 PM, Douglas Amorim
Ferreira wrote:<br>
</div>
<blockquote
cite="mid:CAGJZr=VbhmNTXVCcZg_ewUpSxA1t-EbkufrHyLoDYFsOtXZh0Q@mail.gmail.com"
type="cite">
<div dir="ltr">Hello,<br>
I need to mix two different live audio streams into one. Each of
these audio streams is from a rtsp-server. <br>
To listen just one of these audio streams, I used this pipeline:<br>
<br>
gst-launch-1.0 rtspsrc location=<a class="moz-txt-link-freetext" href="rtsp://ip_host:port0/audio0">rtsp://ip_host:port0/audio0</a>
latency=2000 ! application/x-rtp, "media=(string)audio,
clock-rate=(int)8000, encoding-name=(string)PCMA" ! rtppcmadepay
! alawdec ! autoaudiosink<br>
<br>
And this pipeline worked fine.<br>
Thus, I created a pipeline to mix differents audio streams:<br>
<br>
gst-launch-1.0 rtspsrc location=<a class="moz-txt-link-freetext" href="rtsp://ip_host:port0/audio0">rtsp://ip_host:port0/audio0</a>
latency=2000 ! application/x-rtp, "media=(string)audio,
clock-rate=(int)8000, encoding-name=(string)PCMA" ! rtppcmadepay
! alawdec ! audioresample ! liveadder name=m_pAdder ! interleave
name=m_pInterleave ! autoaudiosink rtspsrc
location=<a class="moz-txt-link-freetext" href="rtsp://ip_host:port1/audio1">rtsp://ip_host:port1/audio1</a> latency=2000 !
application/x-rtp, "media=(string)audio, clock-rate=(int)8000,
encoding-name=(string)PCMA" ! rtppcmadepay ! alawdec !
audioresample ! m_pAdder.<br>
<br>
And also was good..<br>
Now I wanna have freedom to play any of these audio in any
channel (left and right), with the possibility to reconfigure in
real time.<br>
Ok, I think the first step is convert a single mono audio stream
in a stereo one. And I do it:<br>
<br>
gst-launch-1.0 interleave name=m_pInterleave ! autoaudiosink
rtspsrc location=<a class="moz-txt-link-freetext" href="rtsp://ip_host:port0/audio0">rtsp://ip_host:port0/audio0</a> latency=2000 !
application/x-rtp, "media=(string)audio, clock-rate=(int)8000,
encoding-name=(string)PCMA" ! rtppcmadepay ! alawdec !
audioconvert ! "audio/x-raw, channels=2" ! deinterleave
name=m_pAudio0 m_pAudio0.src_0 ! queue ! m_pInterleave.sink_0
m_pAudio0.src_1 ! queue ! m_pInterleave.sink_1<br>
<br>
Works! Now, I just mix two stereo streams (mix left channel0
with left channel1 and right with right). The pipeline is:<br>
<br>
gst-launch-1.0 interleave name=m_pInterleave ! autoaudiosink
rtspsrc location=<a class="moz-txt-link-freetext" href="rtsp://ip_host:port0/audio0">rtsp://ip_host:port0/audio0</a> latency=2000 !
application/x-rtp, "media=(string)audio, clock-rate=(int)8000,
encoding-name=(string)PCMA" ! rtppcmadepay ! alawdec !
audioconvert ! "audio/x-raw,channels=2" ! deinterleave
name=m_pAudio0 m_pAudio0.src_0 ! queue ! liveadder
name=m_pAdderEsq ! m_pInterleave.sink_0 rtspsrc
location=<a class="moz-txt-link-freetext" href="rtsp://ip_host:port1/audio1">rtsp://ip_host:port1/audio1</a> latency=2000 !
application/x-rtp, "media=(string)audio, clock-rate=(int)8000,
encoding-name=(string)PCMA" ! rtppcmadepay ! alawdec !
audioconvert ! "audio/x-raw,channels=2" ! deinterleave
name=m_pAudio1 m_pAudio1.src_0 ! queue ! m_pAdderEsq.
m_pAudio0.src_1 ! queue ! liveadder name=m_pAdderDir !
m_pInterleave.sink_1 m_pAudio1.src_1 ! queue ! m_pAdderDir.<br>
<br>
And... I've got EOS !!!!<br>
Anybody know what is the problem?<br>
What is the mistake I made?<br>
</div>
</blockquote>
<br>
The pipeline looks fine. Does it fail if you replace the rtspsrc and
rtp depayloading + decoding with audiotestsrcs?<br>
It should be easy to track what is pushing EOS from a GST_DEBUG=6
log. Search for "creating new event 0x[0-9a-f]* eos" and look at the
lines around it to find the elements that are creating the EOS
event. It might be happening for both your rtsp sources.<br>
<br>
You could also try using audiomixer instead of liveadder.<br>
<br>
<blockquote
cite="mid:CAGJZr=VbhmNTXVCcZg_ewUpSxA1t-EbkufrHyLoDYFsOtXZh0Q@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
Thanks in advance!<br clear="all">
<br>
-- <br>
<div dir="ltr"><font style="color:rgb(102,102,102)"><i>Douglas
Amorim Ferreira</i></font></div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Thiago Sousa Santos
Senior Multimedia Engineer, Open Source Group
Samsung Research America - Silicon Valley</pre>
</body>
</html>