<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [vlc-devel] demux/live555.cpp Elementary Stream
Synchr</title></head><body>
<blockquote type="cite" cite><font face="Arial" size="-1">I'm trying
to play with VLC Media Player 2 elementary streams that are sent in 2
RTP subsession with the live555 library in a testing application.
One subsession is an Mpeg2 Video Elementary Stream and the other
subsession is a 2 channels audio PCM sampled at 48000 KHz. Both
elementary stream are in sync and genlocked at the source. I have much
trouble getting VLC Media player plays the 2 streams
synchronized.</font></blockquote>
<div><br></div>
<div>First, to get a/v synchronization at the client, you *must* be
using RTCP, as well as RTP.</div>
<div><br></div>
<div>Second, your presentation times - at the sender - must be aligned
with 'wall clock' time - i.e., the times you would get if you were to
call "gettimeofday()".</div>
<div><br></div>
<div>If your audio and video streams have correct presentation times
which are aligned with 'wall clock' time, and you are using RTCP, then
- at the receiver (VLC) end - these same presentation times *will* be
delivered to the decoding software, and the decoding software *will*
do a/v synchronization correctly.</div>
<div><br></div>
<blockquote type="cite" cite><font face="Arial" size="-1">I have
looked at the code of live555.cpp in the VLC Media Player project. It
seems to me that the code is designed such that it is not
possible to receive 2 streams that doesn't have the same sample rate.
In this case 90 KHz for the video and 48KHz for the
audio.</font></blockquote>
<div><br></div>
<div>No, that's not correct.  (BTW, instead of "sample
rate", you mean "RTP timestamp frequency".)  The
code handles different RTP timestamp frequencies (for different
streams) just fine.</div>
<x-sigsep><pre>-- 
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>