Skip to content

C203 Lesson 1: Clocks, Offset and Drift

Every downstream step in a capture pipeline assumes it knows when each sample was taken. Stereo depth matches a left frame with a right frame, visual-inertial tracking integrates the IMU between frames, and hand triangulation combines views of a hand that is moving. This lesson sets out the vocabulary and the arithmetic of time sync, so that later lessons can say how good each method is. The full treatment is on Why Synchronisation Matters.

All of these are also in the glossary’s synchronisation section.

Term Meaning
Clock A counter driven by an oscillator, usually a quartz crystal. Every camera, IMU and computer has its own
Clock offset The difference between two clocks’ readings at the same instant
Clock drift (skew) The difference between two clocks’ rates; with drift, the offset changes over time
ppm Parts per million. A rate error of 50 ppm means a clock gains or loses 50 µs every second
Timestamp The time a system attaches to a sample; which instant it marks varies by device
Exposure midpoint The middle of the interval during which the sensor collects light; the usual best single instant to represent a frame
Readout time For a rolling-shutter sensor, the time taken to read every row of one frame
Latency A delay between when something happened and when it was timestamped; a constant latency is an offset
Jitter Random variation in that delay from sample to sample

People say the cameras are in sync and mean one of two different things (Two meanings of “in sync”):

  • Synchronised exposure: the cameras capture at the same instant. This needs a shared trigger or frame-timing signal.
  • Synchronised timestamps: every sample carries a time from the same clock, or from clocks whose relationship is known. The frames may be taken at different moments, but you know exactly when.

The two are independent, and the second does not give you the first. Meta’s documentation for multi-device Aria Gen 2 recordings puts every pair of glasses on a common time base and then notes that “the host and client devices’ RGB cameras are NOT trigger aligned by nature” (Aria Gen 2 time alignment tutorial). The RocSync authors give the consequence for clock-based methods: “residual misalignment of up to half a frame can remain even when pairing the closest timecodes between two video streams” (Meyer et al., 2025).

Why a single event only syncs to the nearest frame Two cameras both recording at 30 frames per second, with their frames starting at different moments. A hand hits the table at 72 ms. Camera A's first frame showing it starts at 66.7 ms and camera B's at 81.7 ms, so the two cameras disagree by 15 ms about an event that happened once. The error can be up to one frame, 33 ms at 30 fps. 050100150200 ms Each box is one frame's exposure, 30 frames per second Hand hits the table: 72 ms Camera A Camera B A first shows it: 66.7 ms B first shows it: 81.7 ms
Two cameras at 30 frames per second whose frames start at different moments. A hand hits the table at 72 ms; camera A first shows it in the frame starting at 66.7 ms and camera B in the frame starting at 81.7 ms. Matching each event to the nearest frame leaves an error of up to one frame, 33 ms at 30 fps, unless the exposures themselves are synchronised.

How much timing error a rig can tolerate depends on how fast things move in the image. Distance is speed times time, so the arithmetic is simple. The field guide’s worked examples use a hand at 1 m/s and a head turning at 100 °/s, both stated as example values, not measured typical ones:

Timing error Hand at 1 m/s moves Head at 100 °/s, 1280 px wide, 90° view: image shift near the centre
1 ms 1 mm about 1.1 px
10 ms 10 mm about 11 px
16.7 ms (half a frame at 30 fps) 16.7 mm about 19 px
33.3 ms (one frame at 30 fps) 33.3 mm about 37 px

Redo the table with your own task’s speeds and your own lens. Published results show what errors of this size do downstream. Testing on the EuRoC benchmark with artificial offsets, Ling et al. (2018) report that “OKVIS fails to track in sequence 2 ∼ 5 when the time offset is set to be 60 ms.” For multi-view hands, RocSync found that interpolating to a common instant “reduced the mean Euclidean distance between poses from 26.07 mm without interpolation to 7.52 mm with interpolation” (Meyer et al., 2025).

Every device keeps time with its own oscillator, and no two run at exactly the same rate. Over a recording, the relationship between two clocks is, to a good approximation, a straight line (Clock offset and clock drift):

time on clock B = (1 + drift) × time on clock A + offset

Measuring the offset once removes the offset but not the drift. The drift is usually given in ppm, and it adds up quickly:

Rate difference Drift per hour Frames at 30 fps
1 ppm 3.6 ms 0.11
20 ppm 72 ms 2.2
50 ppm 180 ms 5.4
100 ppm 360 ms 10.8

The two clocks’ errors add. Fora Soft’s guide notes: “Consumer-grade crystals are typically rated at ±20 to ±50 ppm, so two ordinary devices can differ from each other by as much as 100 ppm in the worst case” (Fora Soft). At 50 ppm, two 30 fps cameras drift half a frame apart in about 5.6 minutes. Sensors inside a device can be much worse than its main clock: GoPro’s documentation says “Camera internal sensors or data via a connected Bluetooth device, will have timing errors in the range ±1%” (gpmf-parser). Measured drift on real devices, from phones to eye trackers to headsets, is tabled on Measured drift on real devices.

A single sync at the start of a session decays. GoPro’s own precision time page says: “As the camera’s internal clock will drift slowly over time, use this QR Code just before your multi-camera shoot for the best synchronization.” The fix is two sync points, one at the start and one at the end, and a straight line between them. With two points you get both the offset and the drift.

Clock drift between two cameras over an hour A plot of the time offset between camera B and camera A against recording time. A cluster of QR readings at the start gives an offset of about 1240 ms, and a cluster at the end, sixty minutes later, about 1312 ms. A straight line through both clusters gives the offset for every frame in between; the 72 ms of drift corresponds to the clocks disagreeing by 20 parts per million. 13201300128012601240 015304560 Recording time (minutes) Offset, B minus A (ms) QR at the start QR at the end Every frame in between reads its offset off this line 72 ms of drift
Clock drift between two cameras over an hour. Sync readings at the start give an offset of about 1240 ms and readings at the end, sixty minutes later, about 1312 ms. A straight line through both gives the offset for every frame in between; 72 ms of drift in an hour means the clocks run 20 parts per million apart.

Worked example (from the field guide). Camera B reads 1240 ms ahead of camera A at the start of a recording and 1312 ms ahead 60 minutes later. The drift is (1312 − 1240) ms ÷ 3,600,000 ms = 20 ppm. At 30 minutes the offset is 1240 + 72 × 0.5 = 1276 ms. Using only the starting offset would leave frames near the end 72 ms out, more than two frames at 30 fps.

The straight line assumes the rate stays steady. It does not, exactly: the chrony FAQ notes that a clock’s stability “mainly depends on the temperature sensitivity of the crystal oscillator and the maximum rate of the temperature change”. Rigs that warm up on someone’s head benefit from more than two sync points, or from continuous sync.

A frame is not captured in an instant: the sensor collects light for the exposure time, then the image is read out, processed and sent. A timestamp can mark any of these moments (Which instant a timestamp marks). The Linux video API names two of them: a buffer flag for “End Of Frame”, and one for “Start Of Exposure. The buffer timestamp has been taken when the exposure of the frame has begun” (V4L2 buffers).

For motion, the best single instant is the middle of the exposure. The Kalibr paper states that “The middle of the exposure time constitutes the ideal point to timestamp an image” (Furgale, Rehder and Siegwart, 2013). The reason: a pixel adds up light over the whole exposure, so a moving point leaves a streak whose centre, for steady motion, is where the point was halfway through (Exposure midpoint). Two cameras triggered at the same instant, one exposing for 1 ms and the other for 10 ms, have midpoints 4.5 ms apart even though the trigger was perfect.

Same trigger, different exposure midpoints Two panels on a time axis from minus 6 to plus 12 milliseconds. Top panel, same start: camera A exposes from 0 to 1 ms and camera B from 0 to 10 ms, both triggered at 0. Their midpoints, 0.5 ms and 5 ms, are 4.5 ms apart. Bottom panel, same midpoint: camera B starts 4.5 ms early, at minus 4.5 ms, so both exposures are centred on 0.5 ms. Same start Same midpoint Camera ACamera B Camera ACamera B 1 ms exposure midpoints 4.5 ms apart trigger B starts 4.5 ms early midpoints aligned −6−3036912 ms Dark bar marks each exposure's midpoint
Two cameras triggered at the same instant but exposing for 1 ms and 10 ms. Their exposure midpoints, the instants the frames best represent, are 4.5 ms apart (top). Starting the longer exposure half its length earlier, as exposure-compensated triggering does, puts both midpoints at the same instant (bottom).

On a rolling-shutter sensor each row also has its own time: the last row is captured one readout time after the first. A common approximation treats the frame as taken at its middle row (Rolling-shutter line timing).

Between the moment a sample is taken and the moment it is stamped lies a delay (Latency and jitter):

  • Latency, the constant part, looks exactly like a clock offset and is removed the same way, by measuring it once.
  • Jitter, the random part, cannot be calibrated away; it is reduced by timestamping closer to the sensor, or smoothed by fitting a model to many samples.
  • Drift is neither. Fora Soft’s test: “A slow, monotonic slide is always a clock mismatch, never network jitter.”

Jitter is worst when a computer stamps data on arrival. Faizullin et al. measured a sensor whose packets arrive every 1328 µs: stamped by ROS on arrival, the period varied with a standard deviation of 82.64 µs, against 1.35 µs when a microcontroller stamped them (Faizullin et al., 2021).

  1. Your head rig and an external camera are both on a network time server, and their clocks agree to well under a millisecond. Are their frames exposed together?
  2. Two 30 fps cameras run on consumer crystals that differ by 50 ppm. Roughly how long until they are half a frame apart?
  3. You sync two cameras with a QR code at the start of a one-hour session only. What can you not measure, and what do you add?
  4. A camera stamps frames at the start of exposure and runs auto-exposure. Why does this matter for pairing it with another camera?
  5. Your offsets between two devices jump around by a few milliseconds from frame to frame, but show no slope. Is that drift?
  1. Not necessarily. Clock sync gives synchronised timestamps, not synchronised exposures; free-running cameras can still be up to half a frame apart.
  2. About 5.6 minutes: half a frame at 30 fps is 16.7 ms, and 50 ppm is 50 µs per second.
  3. The drift. Add a second sync event at the end, and fit a straight line through both.
  4. The frame’s representative instant is the exposure midpoint, half an exposure after the stamp, and with auto-exposure that gap changes from frame to frame.
  5. No. That is jitter; drift is a slow, steady slide in one direction.