FFmpeg timestamps

882 Views Asked by At

I want to capture RTSP streams from different cameras (dahua, hikvision, etc.); I am using the FFmpeg library, for each stream I need some real-time value. The start_time_realtime member of AVFormatContext is exactly what I need. This usually works and I can get the correct start time, but in some cases, start_time_realtime is AV_NOPTS_VALUE. Do I need to set some correct settings for the camera in the web interface? How can I solve this problem?

1

There are 1 best solutions below

0
On

FFmpeg sets start_time_realtime based on the NTP timestamp seen in the RTCP Sender report packet. If not received, start_time_realtime will remain uninitialized.