<!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: [Live-devel] Audio and Video Synchronization
Streaming</title></head><body>
<blockquote type="cite" cite><font face="Arial" size="-1">I developed
a testing application using LiveMedia to multicast a live Audio and
Video feed. Video is compressed to an Mpeg elementary stream and Audio
is PCM 2 channels 16 bits sampled at 48000 Hz. I am using VLC and
SMPlayer as a client that receive the streams. When audio or video is
streamed alone over IP then VLC and SMPlayer both play fine the
stream. However when I stream both audio and video together I ran into
synchronization problem and both VLC and SMPlayer drop either the
video and or audio stream. And playback become
jerky.</font></blockquote>
<blockquote type="cite" cite><font face="Arial"
size="-1"> </font></blockquote>
<blockquote type="cite" cite><font face="Arial" size="-1">I suspect
that I might have missing something when initializing LiveMedia in a
context of playing a mixed bag of audio and video stream together. Any
hints where I should pay attention to keep both stream
synchronized.</font></blockquote>
<div><br></div>
<div>You need to make sure that your presentation timestamps (i.e.,
the value of the "fPresentationTime" field that you set in
each source object when implementing "doGetNextFrame()") is
accurate, and aligned with 'wallclock' time (i.e., the time that you
would get if you were to call "gettimeofday()").</div>
<div><br></div>
<div>If the "fPresentationTime" field - for both your audio
and video sources - is not set correctly (or not set at all), then you
will never get proper A/V synchronization.</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>