Page 1 of 1

Exact timestamp moment

Posted: Fri Oct 10, 2025 3:45 am
by AMIF
SharpCap de facto became the most recommended program for precise asteroid occultation timing, so it is important clearly understand how SC makes timestamp, especially for rolling shutter cameras. Info on rolling shutter delay will improve timing.

Would you please kindly inform exact timestamp moment for SC version 4.0 and 4.1. Does it corresponds to
* start of the first row exposure
* or start of the middle row exposure
* or start of the last row exposure
* or something else
???

And similar question: how exact timestamp moment is founded for global shutter cameras?

Hope for your kind explanations and help!

Re: Exact timestamp moment

Posted: Fri Oct 10, 2025 4:04 pm
by admin
Hi,

unless you have a camera with built-in GPS functionality, then the answer is always 'something else'...

The first opportunity SharpCap has to attach a timestamp to a frame is when the frame data is delivered to SharpCap by the manufacturer's SDK. So, what happens is...

* Exposure starts (first line on rolling shutter)
* Exposure ends (first line on rolling shutter) - later by whatever the exposure length is
* [Rolling shutter only] Delay while exposure ends on last line (unknown time later)
* Preparation of frame data on camera for transfer over USB (takes an unknown amount of time)
* Transfer of frame over USB (again, unknown amount of time)
* Handling of frame data in the manufacturers driver/SDK (once again, takes an unknown amount of time)
* Delivery of frame to SharpCap - timestamp applied to data.

As you can see, there are a *lot* of unknowns here, although probably the most significant is going to be the time to perform the USB transfer of the data. Many people will use an independent time source (flashing LEDs from a GPS module or similar) to calibrate how long the delays are. The good news is that they tend to be fairly constant if you keep the camera settings the same.

The timestamps you get out of SharpCap ignore all of these unknown delays - the 'end' timestamp saved is the point in time when SharpCap received the frame from the camera SDK, the 'start' timestamp is calculated from that and the exposure time.

In recent versions of SharpCap there is an option (in the 'Cameras' settings page) where you can make a time offset control appear for each camera - this can be set based on some sort of direct calibration of the delay to adjust the timestamps back by the amount worked out in the calibration so that the saved files have corrected timestamps.

On the other hand, GPS enabled cameras (currently there are models from QHY and Moravian, with one coming soon from ToupTek) will attach GPS derived timestamps to the start/end of the frame to mark exactly when it is captured. With the QHY, you can perform an internal calibration which will get the accuracy down close to the microsecond level, but that's not really necessary for most cases as the default uncalibrated should be good at the millisecond level).

cheers,

Robin

Re: Exact timestamp moment

Posted: Sat Oct 11, 2025 9:34 am
by AMIF
Thank you, Robin, for the detailed explanations!
Indeed, built-in GPS is the best choice for occultists, but a lot of us use planetary cameras with rolling shutter. In any case SharpCap works excellent!

Re: Exact timestamp moment

Posted: Sat Oct 11, 2025 11:09 am
by Michele
Robin! Thanks for the reply. But I'd like to know exactly what formula SharpCap 4.1 uses to calculate the exposure start time for a frame after it receives it from the SDK. Apparently, the formula is:

t start = t sdk - T exp , where

t start - the time that SharpCap 4.1 determines as the exposure start time for a frame, and this time is assigned to the frame's timestamp.
t sdk - the point in time when SharpCap received the frame from the camera SDK.
T exp - the exposure time for a frame = the exposure time of any line in a rolling shooter camera.
If this formula is correct, then the exposure start time in SharpCap 4.1 coincides with the exposure start time of the last line in the frame. Is this correct?
If this formula is incorrect, then we need to know the real formula. Sorry for being so meticulous, but knowing what point in the frame the timestamp is attached to is very important for rolling shooter cameras, as it affects the accuracy of timing fast-moving astronomical events.

Best wishes
Michele

Re: Exact timestamp moment

Posted: Sun Oct 12, 2025 5:29 pm
by admin
Hi,

the equation is correct as shown, but that doesn't mean that the start time is the start of the last line of the frame, since that excludes other unknown time delays like

* USB transfer time to get data from camera to PC
* time taken transferring the data through the device driver or camera SDK on its way to SharpCap.

(those delays apply if you have a global shutter camera too). All we can really say is that the timepoints added by SharpCap are

a) the best that can be achieved based on the limited data available and
b) somewhat delayed relative to the real timings

To get better results, some sort of calibration with an external time source is required.

cheers,

Robin

Re: Exact timestamp moment

Posted: Mon Oct 13, 2025 5:46 am
by AMIF
admin wrote: Sun Oct 12, 2025 5:29 pm the equation is correct as shown, but that doesn't mean that the start time is the start of the last line of the frame, since that excludes other unknown time delays like
Of course, of course. As I understood, SYSTEM time of the last line start was meant, but not true one.

Re: Exact timestamp moment

Posted: Mon Oct 13, 2025 7:42 pm
by Michele
Thank you! It was important for me to understand the start of exposure of which line in the frame SharpCap 4.1 asociates the time stamp with. As for the delay in capturing a video frame, it is not difficult to determine.