Real timestamp of video frame from rtsp stream
Hi All,
I would like to ask how to get the real time stamp ( e.g 2018-08-16 11:06:32.394 ) of each video frame from rtsp stream.
For more detail, my code snippet as below
VideoCapture cap("rtsp://admin:[email protected]"); // from rtsp server if (!cap.isOpened()) // check if we succeeded return -1;
Mat frame; cap >> frame; // get a new frame from camera
cout << "timestamp (ms) ---> " << cap.get(CAP_PROP_POS_MSEC) ;
What is get is (for a stream of 20 fps) 50 100 150 ...
This is the relative timestamp calculate based on fps and frame index.
If I want the real timestamp at which the frame is taken at the IP camera, how can we do?
Please advise