Ask Your Question

Revision history [back]

RTP timestamp for OPENCV

Hi All,

I currently experiment to compare the timestamp of RTP packet and video frame from RTSP server.

I am using OPENCV to grab the frame, and use VideoCapture API get(CAP_PROP_POS_MSEC) to retrieve the stamp time. Below is the output

frame 1, 50

frame 2, 100

...

This timestamp is calculated based on FPS (20 in this case);

However, when I extract the timestamp from the RTP packet, this is what i get:

RTP packet 1 [timestamp: 42956]

RTP packet 2 [timestamp: 50156]

RTP packet 3 [timestamp: 53756]

The question is How do we know the RTP timestamp for each OPENCV frame. Is there any API to help achieve it?

Please advise.