<div>Thanks for your fast reply, Ross.</div>  <div>&nbsp;</div>  <div>Yes, I created "RTCPInstance" for each of video and audio RTPSink(subclass).</div>  <div>However, the first timestamp for video and audio is a little different since each of framesources of&nbsp;video and audio&nbsp;use gettimeofday() to get the time for the first time. In my situation, the videoRTP sink start first, so the timestamp for the first video frame&nbsp;is a little earlier than the timestamp of first audio frame. <BR>Will this affect sync? </div>  <div><BR><B><I>Ross Finlayson &lt;finlayson@live555.com&gt;</I></B> wrote:</div>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">&gt;Hi Ross,<BR>&gt;<BR>&gt;Thank you for offering us this nice library to learn more about streaming.<BR>&gt;<BR>&gt;I am just writing a test application for H.264 and AAC multicast streaming<BR>&gt;with the help of FAQ and previous discussions. After some tests, I found
 some<BR>&gt;problem with a/v synchronization that I can not understand.<BR>&gt;I use the frame rate and sampling rate to put the right timestamps <BR>&gt;and time duration for every frame video and audio ( I can stream <BR>&gt;them seperately and receive them normally). However, when I stream <BR>&gt;them together(which include a rtsp server). I use rtsp protocol to <BR>&gt;get the a/v stream by VLC, I found the a/v is a bit of out of sync. <BR>&gt;The audio is always a little bit of behind video.<BR>&gt;I am not sure whether this is related to I put the different <BR>&gt;timestamps for the first frame of video and audio since I use the <BR>&gt;gettimeofday for the first time.<BR><BR>Yes, if you give accurate - wall-clock synchronized - presentation <BR>times to the data that you feed to your "RTPSink" (subclass), *and* <BR>if you have a "RTCPInstance" for each "RTPSink" (subclass), then <BR>these presentation times will be returned - at the client end - when <BR>it reads
 from the corresponding "RTPSource" (subclass).<BR><BR><BR>&gt;Another interesting thing I found is that if the VLC can receive the <BR>&gt;first frame audio and video, the sync effect become much better(I <BR>&gt;did this by open the client VLC first, then start stream server), so <BR>&gt;I am guessing if there is some place in rtsp protocol to help the <BR>&gt;client synchronize the audio and video. I checked the rtsp protocol, <BR>&gt;it said In PLAY method, the Range header may help synchronization <BR>&gt;the media from different source. I can not understand how this works.<BR><BR>No, A/V synchronization is ensured by using RTCP. Please read the FAQ.<BR>-- <BR><BR>Ross Finlayson<BR>Live Networks, Inc.<BR>http://www.live555.com/<BR>_______________________________________________<BR>live-devel mailing list<BR>live-devel@lists.live555.com<BR>http://lists.live555.com/mailman/listinfo/live-devel<BR></BLOCKQUOTE><BR><p>&#32;
      <hr size=1>Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the <a href="http://us.rd.yahoo.com/evt=40705/*http://mrd.mail.yahoo.com/try_beta?.intl=ca"><b>All-new Yahoo! Mail </b></a>