문제

I am using libav/ffmpeg for connecting to IP cameras. I do need to extract the absolute timestamp from the frames, not pts/dts. How can I have this value?

Using Wireshark I can see the following response from the camera (Axis P1355):

RTP-Info: url=rtsp://xxx.dyndns.org:4378/axis-media/media.amp/trackID=1?fps=4&resolution=1280x720&compression=60;seq=32446;rtptime=3287715479\r\n

도움이 되었습니까?

해결책 2

Finally I solved the problem.

I had to catch the RTSPState from the context, in order to get the RTSPStream array and get the video one, and after that get the RTPDemuxContext which contains the timestamp.

다른 팁

The RTP packets only contain relative timestamps. The absolute timestamps are included in the sender report (SR) being part of RTCP.

Some incomplete implemented IP cameras don't send SR packets - then you are out of luck. I would give live555's testRTSPClient (http://www.live555.com/liveMedia/#testProgs) a try that gives you access to the absolute timestamp - if transmitted.

The "afterGettingFrame" function hands you an absolute timestamp and with RTPSource::hasBeenSynchronizedUsingRTCP you can verify it.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top