<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>I have RTSP ServerMediaSession with one audio subsession and one video subsession. </div><div>The sources for audio and video are live and coming as RTP streams whose timestamps are derived from same source. </div>
<div>( I subclassed OnDemandServerMediaSubsession to take live RTP input)</div><div><br></div><div>The RTSP client is able to receive both audio and video data , but there is no AV-Sync.</div><div>When i checked, the RTP source timestamps and timestamps of packets sent to client are different. </div></blockquote><div><br></div>You should not concern yourself with RTP timestamps at all. They are used only internally, by the RTP/RTCP implementation.</div><div><br></div><div>Instead, the only values that you need to concern yourself with are "presentation times" (which are computed automatically to/from RTP timestamps by our code).</div><div><br></div><div>In summary, to get proper audio/video synchronization, all of the following must be true:</div><div>1/ Each media source (audio and video) needs to have proper presentation times for each frame, and these presentation times need to be aligned with 'wall clock' time (i.e., the time that you would get by calling "gettimeofday()").</div><div>2/ Each "RTPSource" (subclass) object needs to have an associated "RTCPInstance" object. (Because you are using a subclass of "OnDemandServerMediaSubsession", then this happens automatically for you.)</div><div>3/ RTCP "SR" packets from the server need to be received by the client, and the client needs to properly use these to compute the presentation times (and thereby do a/v sync). If you are using our RTSP/RTP client code (including VLC or MPlayer, which uses our client code), then this should happen automatically.</div><div><br></div><div>Therefore, I would focus on point 1/.</div><br><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>