[Live-devel] fPresentationTime calculation for ogg streaming?

Ross Finlayson finlayson at live.com
Thu Sep 30 22:52:09 PDT 2004


>I am trying to add ogg streaming support into
>livemedia library. I have written a simple multiplexer
>to seprate audio data and video data. My problem is
>when I send them  I don't know how to calculate the
>presentationTime for audio and video frames. (I use
>vorbis codec for audio and vp3 codec for video). To
>stream them successfuly, the synchronization is most
>important. Otherwise, either audio or video will be
>displayed incorrectly.
>
>Who can help me to give me a method? Assuming we have
>known frame size, sampling rate.  and what else? we
>can calculate the presentation time for this vorbis
>frame.

Unfortunately I'm not very familiar with the 'ogg' file format, so I can't 
help you much here.  But try to imagine how a media player is able to play 
an 'ogg' file.  It has to be able to know exactly when to play each audio 
and video frame in the file.  So, if you can figure this out, this will 
tell you what presentation times to give each frame.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list