[Live-devel] negative presentation time in "afterGettingFrame" sink callback
Markus Schumann
markuss at sonicfoundry.com
Sun Jan 13 11:49:07 PST 2013
Thanks for the response!
I am using live555 as RTSP/RTP client with a custom H.264 and audio sink connecting to a commercial of the shelve IP camera.
My earlier statement was wrong the timestamps are increasing. The absolute value of the negative timestamp is going down (see below).
Life is good - sorry for the confusion.
I just got puzzled by seeing the output of the following lines of code that I copied and pasted:
sprintf(uSecsStr, "%06u", (unsigned)presentationTime.tv_usec);
envir() << ".\tPresentation time: " << (unsigned)presentationTime.tv_sec << "." << uSecsStr;
Thanks again.
Markus.
DEBUG output (with unsigned cast removed):
Stream "rtsp://10.0.70.22:554/video1+audio1"; video/H264: Received 476 bytes. Presentation time: -850904334.959992 NPT: 29677
Stream "rtsp://10.0.70.22:554/video1+audio1"; video/H264: Received 511 bytes. Presentation time: -850904333.026992 NPT: 29677
Stream "rtsp://10.0.70.22:554/video1+audio1"; audio/PCMU: Received 1024 bytes. Presentation time: -850904333.074820 NPT: 127507
Stream "rtsp://10.0.70.22:554/video1+audio1"; video/H264: Received 450 bytes. Presentation time: -850904333.093992 NPT: 29677.1
Stream "rtsp://10.0.70.22:554/video1+audio1"; video/H264: Received 461 bytes. Presentation time: -850904333.160992 NPT: 29677.2
Stream "rtsp://10.0.70.22:554/video1+audio1"; audio/PCMU: Received 1024 bytes. Presentation time: -850904333.204102 NPT: 127507
From: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Sunday, January 13, 2013 1:16 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] negative presentation time in "afterGettingFrame" sink callback
You haven't said specifically how you are using our software. Are you using it as a RTSP/RTP client? If so, then what is *transmitting* the RTP (& RTCP) packets? (Does the transmitter also use our software?)
The "tv_sec" value in a presentation time (a "struct timeval") is supposed to be treated as an integer, not as an unsigned. It *can* be negative, but usually won't be, because they will usually be (but are not required to be, unless the transmitter uses our server software) aligned with 'wall clock' time. In any case, they should not be "negative numbers, increasing in absolute value". If you are a RTP/RTCP receiver, and are seeing values like this, then your transmitter's RTP/RTCP implementation is probably broken.
Or are your presentation times coming from somewhere else (other than a "RTPSource")? If so, please explain.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list