[Live-devel] Audio and Video Synchronization Streaming
Ross Finlayson
finlayson at live555.com
Thu Jan 10 11:51:52 PST 2008
>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.
>
>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.
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()").
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.
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20080110/12f0c94b/attachment.html
More information about the live-devel
mailing list