[Live-devel] H264 stream timestamps jumping backwards with proxy

Ross Finlayson finlayson at live555.com
Wed Apr 27 11:43:22 PDT 2022


You should never need to concern yourself with “RTP timestamps”.  Instead, you should consider only “presentation times”.  (Our software automatically converts presentation times to RTP timestamps (when sending), and RTP timestamps to presentation times (when receiving).  Our proxy server (and other application code that acts as RTSP clients and/or RTSP servers) works only with presentation times.  So, from now on, “presentation times” are the only things you should concern yourself with.

When streaming video codecs, frames (or, more precisely, “NAL units” for H.264 and its successors) are transmitted in "decoding order" (the order in which the received frames will be fed to the decoder), not “display order” (the order in which the received frames will be displayed on a screen).  Sometimes, video frame N can’t be decoded without information from video frame N+1; in such a case, therefore, frame N+1 will be transmitted before frame N.

Presentation times correspond to display order, not decoding order - which is why you sometimes see them decrease.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list