[Live-devel] H264 stream timestamps jumping backwards with proxy
Juho Ylikorpi
juho.ylikorpi at node.fi
Wed Apr 27 12:09:47 PDT 2022
Thanks for your reply.
It seems that there might be some issue with calculation of presentation times then because we see this happening only when there are multiple proxy processes running parallel. With just single proxy process running there is no such jumps and also capture straight from camera shows no such issues (in both cases rtp seq number and presentation time is incrementing constantly).
Any ideas where to look next?
/Juho
-----Original Message-----
From: live-devel <live-devel-bounces at us.live555.com> On Behalf Of Ross Finlayson
Sent: keskiviikko 27. huhtikuuta 2022 21.43
To: LIVE555 Streaming Media - development & use <live-devel at us.live555.com>
Subject: Re: [Live-devel] H264 stream timestamps jumping backwards with proxy
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