[Live-devel] Correct Timestamps in RTP-Packets

Eric Peters eric.peters at imail.de
Fri Jun 4 15:02:50 PDT 2004


> The RTP timestamps are computed based on the 'presentation time'
values 
> that are fed to the "*RTPSink" object.

As I understand the RFCs for RTP and Payload Formats there could be
different values for RTP timestamps and presentation timestamps. The
values for presentation time are, for example, the timestamps for each
frame in a mpeg2-File. Cause there are different kind of frames which
contains data which refer to earlier and latter frames, the timestamp
values are not well ordered in a mpeg2-file.
The RTP timestamps however should be well ordered. I think you should
give each RTP packet the timestamp of the moment it was created.
So, RTP timestamp and presentation timestamp could differ. Or am I on a
wrong way??

> Have you written your own 'source' object (to encapsulate your input
> data)? If so, then you should make sure that you're setting
> "fPresentationTime" correctly when you deliver data to the next
object(s)
> in the chain.

We created an object called BufferedSource which is derived from
FramedSource. There we set the presentation timestamp to that timestamp
we received from the mpeg2-file. So, in our example we have two
BufferedSource, one for audio and one for video.

Are you computing the correct RTP timestamps out of the presentation
timestamps? Or are you using every time a getTimeOfDay-value?

Greetings
	Eric



More information about the live-devel mailing list