[FFmpeg-devel] [EXTERNAL] Re: [PATCH] Extracting NTP timestamp from RTCP
Fred Rothganger
frothga at sandia.gov
Sat Nov 9 18:58:25 CET 2013
On 11/09/2013 03:50 AM, Michael Niedermayer wrote:
> also, how do i test this ? it seems the field is just 0 when reading
> a random rtsp stream
> also if 0 means "Not set" then this should be documented
>
>
0 does not mean "not set". It means January 1, 1970 at midnight
(documented). It just happens to conveniently be the value that the
field gets set to on initialization of AVFormatContext, and thus a good
indicator (99.999%) that it is worth the effort to compute the value.
I test this by opening a connection to an Axis IP camera. Within 2-3
seconds after it starts streaming, it sends out a packet that has the
NTP timestamp. I compare start_time_realtime+PTS against my local clock.
Typically there is about 130ms of difference, which I ascribe to 4 frame
periods of delay in the decoder. Could be wrong on that, though. (Ping
reports 1-2ms roundtrip time.)
The attached patch moves the code below the other and adds a comment to
separate it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp.patch
Type: text/x-patch
Size: 2404 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131109/08ed7b59/attachment.bin>
More information about the ffmpeg-devel
mailing list