问题
Is it possible to read an absolute timestamp from an H.264 stream sent trough RTSP from an Axis camera?
It will be necessary to know when the frame has been taken by the camera.
Thanks Andrea
回答1:
as Ralf already said - the RTP timestamps are relative to a random clock - they are only useful for computing the difference between two frames (or RTP-packets in general). For synchronizing these relative values to a wall clock you can use the RTCP sender - just have a look on the links Ralf provided.
For Axis-products using H.264 this works pretty good. In case you're also using MPEG4, the Axis firmware is buggy and the absolute timestamps in RTCP SR are not reliable - in this case you have to synchronize the relative RTP timestamps to your clients wall clock.
回答2:
Timestamps are contained in the RTP stream. RTSP is a protocol that can be used to start/control an RTP media session. I'm assuming that RTP used and you can look at the RTP header here.
来源:https://stackoverflow.com/questions/6149983/h-264-rtsp-absolute-timestamp