Here are the sinks and sources of the gstrtpbin, each session has its own id.<br>Also look at script file attached for example<br><br><br>GObject<br> +----GstObject<br>       +----GstElement<br>             +----GstBin<br>
                   +----GstRtpBin<br><br>Implemented Interfaces:<br>  GstChildProxy<br><br>Pad Templates:<br>  SINK template: &#39;recv_rtp_sink_%d&#39;<br>    Availability: On request<br>      Has request_new_pad() function: gst_rtp_bin_request_new_pad<br>
    Capabilities:<br>      application/x-rtp<br><br>  SINK template: &#39;recv_rtcp_sink_%d&#39;<br>    Availability: On request<br>      Has request_new_pad() function: gst_rtp_bin_request_new_pad<br>    Capabilities:<br>
      application/x-rtcp<br><br>  SINK template: &#39;send_rtp_sink_%d&#39;<br>    Availability: On request<br>      Has request_new_pad() function: gst_rtp_bin_request_new_pad<br>    Capabilities:<br>      application/x-rtp<br>
<br>  SRC template: &#39;recv_rtp_src_%d_%d_%d&#39;<br>    Availability: Sometimes<br>    Capabilities:<br>      application/x-rtp<br><br>  SRC template: &#39;send_rtcp_src_%d&#39;<br>    Availability: On request<br>      Has request_new_pad() function: gst_rtp_bin_request_new_pad<br>
    Capabilities:<br>      application/x-rtcp<br><br>  SRC template: &#39;send_rtp_src_%d&#39;<br>    Availability: Sometimes<br>    Capabilities:<br>      application/x-rtp<br><br><br><br><br><div class="gmail_quote">On Mon, Jun 22, 2009 at 2:11 PM, Zelalem Sintayehu <span dir="ltr">&lt;<a href="mailto:zelalems@hotmail.com">zelalems@hotmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>
Hi Thabelo, thank you for your response. BTW, my problem is not on the source side. It is on the receiver side. You know when i see the file that i saved in it is very unsynchronized. Eventually I want to use my program to save streams that are comming from the network. So, I am only intersting on the recieving side.  Anyway, I will try to use gstrtpbin if it solves the problem. BTW, how can i put the two differnet streams in teh bin?<br>
<br>Thank you again.<br><br>- Zelalem S. <br><br><hr>Date: Mon, 22 Jun 2009 12:14:41 +0200<br>From: <a href="mailto:thabelo@gmail.com" target="_blank">thabelo@gmail.com</a><br>To: <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
Subject: Re: [gst-devel] How to syncronize audio and video<div><div></div><div class="h5"><br><br>Try using the &quot;gstrtpbin&quot; it works, checkout the documentation on the gstreamer site. <br><br>eg  Your source can be something like<br>
<br>source -&gt; encode -&gt; payload -&gt; gstrtpbin -&gt; rtpsink(udp) <br>
<br><br><div>On Mon, Jun 22, 2009 at 9:45 AM, Zelalem Sintayehu <span dir="ltr">&lt;<a href="mailto:zelalems@hotmail.com" target="_blank">zelalems@hotmail.com</a>&gt;</span> wrote:<br><blockquote style="padding-left: 1ex;">





<div>
Hi all, I wanted to save a networked stream in an avi file and I got a very unsynchronized file.
The audio finishes almost 3 second ahead of the video. I even used the sync=true option for the filesink
element, but the result is the same. So, I want to ask an advice on how to get a synchronized video file. The following is the source and destination commands that I used:<br><br>Source commands:<br><br><u>for the audio channel</u><br>

gst-launch-0.10
-v alsasrc ! queue ! audio/x-raw-int,rate=8000,channels=1,depth=8 !
audioconvert ! alawenc !  rtppcmapay ! queue ! udpsink port=5002<br><u>for the video channel;</u><br>gst-launch
v4l2src ! video/x-raw-rgb,width=320,height=240 ! queue ! videorate !
video/x-raw-rgb,rate=15/1 ! ffmpegcolorspace! ffenc_h263p ! rtph263ppay
! udpsink port=5000<br><br>Output command:<br>gst-launch-0.10 -v avimux
name=mux ! filesink location=videoandaudio.avi sync=true {udpsrc
port=5000
caps=&quot;application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H263-1998&quot;
num-buffers=5000 ! queue ! rtph263pdepay !
&#39;video/x-h263,width=320,height=240,framerate=(fraction)25/1&#39; ! queue} !
mux.video_0 {udpsrc port=5002
caps=&quot;application/x-rtp,media=(string)audio,payload=(int)96,
rate=(int)8000, encoding-name=(string)PCMA&quot; ! queue ! rtppcmadepay !
&#39;audio/x-alaw, rate=(int)8000, channels=(int)1&#39; ! queue} ! mux.audio_0;<br><br>Do you think the result
will be different if I use a different file container (like mp4)
instead of avi? <br><br>Thank you.<br><br>- Zelalem S. <br><br><br><br><br><br><hr>See all the ways you can stay connected <a href="http://www.microsoft.com/windows/windowslive/default.aspx" target="_blank">to friends and family</a></div>


<br>------------------------------------------------------------------------------<br>
Are you an open source citizen? Join us for the Open Source Bridge conference!<br>
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.<br>
Need another reason to go? 24-hour hacker lounge. Register today!<br>
<a href="http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org" target="_blank">http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org</a><br>_______________________________________________<br>


gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br></div></div><hr>What can you do with the new Windows Live? <a href="http://www.microsoft.com/windows/windowslive/default.aspx" target="_blank">Find out</a></div>
<br>------------------------------------------------------------------------------<br>
Are you an open source citizen? Join us for the Open Source Bridge conference!<br>
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.<br>
Need another reason to go? 24-hour hacker lounge. Register today!<br>
<a href="http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org" target="_blank">http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org</a><br>_______________________________________________<br>

gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>