[Elphel-support] Problems to detect timestamps

Jennifer Valle jvs1192 at gmail.com
Mon Nov 23 09:20:55 PST 2015


Hello,

I think there has been a confusion, when I referred to the "original" code
live555, I was referring to the latest version without changing code. The
problem is that when I connect to the camera with the instruction openrtsp
-m, I get files with the timestamp (PresentationTime) in the filename and
these values are incorrect.

video-JPEG-1-1448298848.836308
> video-JPEG-1-3534277304.245330
> video-JPEG-1-3534277304.281407
> video-JPEG-1-3534277304.317484
> video-JPEG-1-3534277304.353561
> video-JPEG-1-3534277304.389627


The first file has a correct timestamp, but in the following files have
incorrect "times" (year 2081).

Kind regards,

Jennifer

2015-11-21 20:15 GMT+01:00 support-list <support-list at support.elphel.com>:

> Hello Jennifer,
>
> The original Live555 implementation is rather old - I did not know it
> still works, there are some newer RTSP streamers. That first streamer
> (written by Ross himself) was made before the FPGA was providing the exact
> time stamp of each image. The FPGA is providing JPEG-compressed data in the
> circular buffer, aligning each new frame to 32 bytes and leaving additional
> gaps between frames, and the extra data after each frame includes 2 of the
> 32-bit words - seconds and microseconds of the time when the frame
> acquisition was started. You may find the code that extracts the timestamp
> here:
>
> http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/apps/astreamer/video.cpp?view=markup
> (line 254)
>
> What is the overall software version in the camera that you are using?
>
> Andrey
>
>
> ---- On Sat, 21 Nov 2015 10:17:04 -0800 *Jennifer Valle
> <jvs1192 at gmail.com <jvs1192 at gmail.com>>* wrote ----
>
> Hello,
>
> My name is Jennifer Valle and I am doing the final degree project in UPC
> with some of its cameras, in particular,  NC353L Elphel cameras with the
> original code of Live555 about the RTSP protocol. I want to syncronized
> different cameras and I need its timestamps.
>  In this code, there are a  testProgs_rtsp function with a struct timeval
> called PresentationTime  and I think that it's the same that timestamp of
> the server (cameras) when the RTCP is synchronized.
>  I have a problem because when I execute the program, and RTCP is
> syncronized, I obtain negatives times and i don't understand why this
> occurs.
>
> The part of the code that I want to modify is in
> DummySink::afterGettingFrame function.
>
> void DummySink::afterGettingFrame(unsigned frameSize, unsigned
> numTruncatedBytes,struct timeval presentationTime, unsigned
> /*durationInMicroseconds*/) {
>   // We've just received a frame of data.  (Optionally) print out
> information about it:
> #ifdef DEBUG_PRINT_EACH_RECEIVED_FRAME
>   if (fStreamId != NULL) envir() << "Stream \"" << fStreamId << "\"; ";
>   envir() << fSubsession.mediumName() << "/" << fSubsession.codecName() <<
> ":\tReceived " << frameSize << " bytes";
>   if (numTruncatedBytes > 0) envir() << " (with " << numTruncatedBytes <<
> " bytes truncated)";
>   char uSecsStr[6+1]; // used to output the 'microseconds' part of the
> presentation time
>   sprintf(uSecsStr, "%06u", (unsigned)presentationTime.tv_usec);
>   envir() << ".\tPresentation time: " << (int)presentationTime.tv_sec <<
> "." << uSecsStr;
>   if (fSubsession.rtpSource() != NULL &&
> !fSubsession.rtpSource()->hasBeenSynchronizedUsingRTCP()) {
>     envir() << "(not RTCP-synchronized!)"; // mark the debugging output to
> indicate that this presentation time is not RTCP-synchronized
>   }
> #ifdef DEBUG_PRINT_NPT
>   envir() << "\tNPT: " << fSubsession.getNormalPlayTime(presentationTime);
> #endif
>   envir() << "\n";
>
> #endif
>
>
> And I obtain "incorrects" PresentationTimes:
>
> Stream "rtsp://pa1"; video/JPEG: Received 97775 bytes. Presentation time:
> 1448129165.229872(not RTCP-synchronized!) NPT: 0.000000
> Stream "rtsp://pa1"; video/JPEG: Received 98174 bytes. Presentation time:
> 1448129165.265949(not RTCP-synchronized!) NPT: 0.000000
> Stream "rtsp://pa1"; video/JPEG: Received 98264 bytes. Presentation time:
> -760859674.598727 NPT: 0.000000
> Stream "rtsp://pa1"; video/JPEG: Received 98233 bytes. Presentation time:
> -760859674.634804 NPT: 0.000000
> Stream "rtsp://pa1"; video/JPEG: Received 98228 bytes. Presentation time:
> -760859674.670881 NPT: 0.000000
> Stream "rtsp://pa1"; video/JPEG: Received 98644 bytes. Presentation time:
> -760859674.706947 NPT: 0.000000
> Stream "rtsp://pa1"; video/JPEG: Received 98337 bytes. Presentation time:
> -760859674.743024 NPT: 0.000000
> Stream "rtsp://pa1"; video/JPEG: Received 98147 bytes. Presentation time:
> -760859674.779101 NPT: 0.000000
> Stream "rtsp://pa1"; video/JPEG: Received 97848 bytes. Presentation time:
> -760859674.815178 NPT: 0.000000
>
>
> How could you get the correct timestamp the server gives each frame? Is it
> the PresentationTime after RTCP is syncronized or is an another variable?
> If I have to use the PresentationTime, why do I get incorrect values?
>
>
> Kind regards.
>
>
> Jennifer Valle
> _______________________________________________
> Support-list mailing list
> Support-list at support.elphel.com
> http://support.elphel.com/mailman/listinfo/support-list_support.elphel.com
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20151123/3969835b/attachment-0002.html>


More information about the Support-list mailing list