<div>Thanks for your fast reply, Ross.</div> <div> </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 video and audio 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 is a little earlier than the timestamp of first audio frame. <BR>Will this affect sync? </div> <div><BR><B><I>Ross Finlayson <finlayson@live555.com></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">>Hi Ross,<BR>><BR>>Thank you for offering us this nice library to learn more about streaming.<BR>><BR>>I am just writing a test application for H.264 and AAC multicast streaming<BR>>with the help of FAQ and previous discussions. After some tests, I found
some<BR>>problem with a/v synchronization that I can not understand.<BR>>I use the frame rate and sampling rate to put the right timestamps <BR>>and time duration for every frame video and audio ( I can stream <BR>>them seperately and receive them normally). However, when I stream <BR>>them together(which include a rtsp server). I use rtsp protocol to <BR>>get the a/v stream by VLC, I found the a/v is a bit of out of sync. <BR>>The audio is always a little bit of behind video.<BR>>I am not sure whether this is related to I put the different <BR>>timestamps for the first frame of video and audio since I use the <BR>>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>>Another interesting thing I found is that if the VLC can receive the <BR>>first frame audio and video, the sync effect become much better(I <BR>>did this by open the client VLC first, then start stream server), so <BR>>I am guessing if there is some place in rtsp protocol to help the <BR>>client synchronize the audio and video. I checked the rtsp protocol, <BR>>it said In PLAY method, the Range header may help synchronization <BR>>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> 
<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>