# C203 Lesson 4: Events, Drift Correction and Verification

> The fourth lesson of the C203 time sync course: aligning recordings after the fact with QR timecodes, light flashes, an LED clock, audio and motion; counting dropped frames first; fitting offset and drift through start and end events; correcting by timestamp remapping and interpolation; and proving the result with published tests.

Page: https://egocam.ai/university/c203/lesson-4-events-drift-and-verification/

When devices share no wire and no protocol, every camera can film the same event and the recordings can be aligned afterwards. Even with a trigger or a network clock, a visual event at both ends of a session is how you check the result. This lesson covers the event methods, the order of work after a recording, and the tests that turn "looks in sync" into a number. The full treatment is on [QR, LED and Flash Sync](https://egocam.ai/sync/qr-and-visual-sync/) and [Measuring Sync Quality and Correcting Drift](https://egocam.ai/sync/drift-correction-and-verification/).

## Terms used in this lesson

See also the [glossary's synchronisation section](https://egocam.ai/reference/glossary/#synchronisation-and-timing).

| Term | Meaning |
|---|---|
| Event sync | Filming or recording something every device can observe, and aligning the recordings afterwards |
| PTS | Presentation timestamp: the time a container stores for when a frame is shown |
| Dropped or duplicated frame | An exposure that never reaches the file, or one written twice |
| LED clock | A board whose lit LEDs encode time in each frame, such as RocSync's ring of LEDs stepping every millisecond |
| Timestamp remapping | Storing a corrected time for every frame and sample, and leaving the media untouched |
| Sub-frame interpolation | Interpolating detections or images to a common instant between two frames |

## Event sync methods

The idea is the same in every case: show every camera something whose time is known, find the frames where each camera saw it, and you have each camera's offset. Do it twice and you also have its drift ([QR, LED and Flash Sync](https://egocam.ai/sync/qr-and-visual-sync/)).

| Method | Published result | Needs all cameras to see it at once? |
|---|---|---|
| QR code read by the camera (GoPro Labs) | GoPro's own figure, "&lt;50 ms", as cited by RocSync; UMI states ±1/60 s | No |
| QR code or timer decoded from footage | Depends; see the [accuracy limits](https://egocam.ai/sync/software-and-visual-sync/#accuracy-limits) | No |
| Light switched on and off | 3.09 px stereo error at 30 fps in RocSync's single-lamp test | Yes |
| LED clock (RocSync) | "1.34 ms RMSE" against hardware sync | No |
| Audio clap | Sound takes "roughly 30 milliseconds" to cross a 10 m room | Hears it, at distance-dependent delays |
| Motion correlation on a rigid mount | Kalibr's camera–IMU estimate stayed "within a domain of ±0.2 ms" of expectation on an FPGA-timestamped rig | Only devices rigidly attached |

Sources: [Visual sync methods at a glance](https://egocam.ai/sync/qr-and-visual-sync/#visual-sync-methods-at-a-glance), [Audio sync](https://egocam.ai/sync/software-and-visual-sync/#audio-sync) and [Motion-based sync](https://egocam.ai/sync/software-and-visual-sync/#motion-based-sync). The pixel errors come from one RocSync experiment and only compare methods within it.

Four points decide which to use:

- **A QR clock set once is coarse and then drifts.** In RocSync's two-GoPro test the QR timecode result was large, 54.60 px against 1.02 px for the interpolated LED clock, because the clocks were set once by QR and then each camera ran on its own ([RocSync's GoPro test](https://egocam.ai/sync/qr-and-visual-sync/#rocsyncs-gopro-test-qr-light-audio-and-led-compared)).
- **A QR code decoded from footage works with any camera.** Film a screen showing the time at the start and end, decode every readable frame, and fit a line. Display latency is the same for every camera that films the same screen, so it cancels between cameras ([You decode the code from the footage](https://egocam.ai/sync/qr-and-visual-sync/#you-decode-the-code-from-the-footage)).
- **A light flash reaches every camera at once**, but RocSync stresses its test was "an ideal scenario for light-based synchronization"; real room lights often switch on slowly or not all together.
- **Sound is slow.** "even a 5-meter difference introduces a 15 ms discrepancy in time of arrival" ([Meyer et al., 2025](https://arxiv.org/abs/2511.14948)).

## The LED clock: time and exposure in one frame

RocSync's clock is a ring of 100 LEDs, one lit at a time, advancing every millisecond, plus a binary counter of full turns. "Because camera shutters are not instantaneous, light is integrated over the exposure period (typically a few milliseconds), causing several adjacent LEDs to appear illuminated in a single frame. The first and last LED in this arc correspond to the start and end of the exposure window, respectively" ([Meyer et al., 2025](https://arxiv.org/abs/2511.14948)).

As the field guide's [worked example](https://egocam.ai/sync/qr-and-visual-sync/#reading-the-exposure-window) shows (an illustration, not a figure from the paper): if the counter reads 12 and the lit arc runs from LED 40 to LED 57, the exposure started at 12 × 100 + 40 = 1240 ms on the clock and ended at about 1257 ms.

> **Diagram:** How an LED clock of the RocSync kind records an exposure window. One LED of a 100-LED ring is lit at a time, advancing every millisecond, and a binary counter counts full turns; during an exposure several neighbouring LEDs light up, so the first and last lit LEDs give its start and end. The numbers are this page's worked example (counter 12, LEDs 40 to 57). Drawing not to scale.

The operator shows the clock to each camera in turn at the start and end of a recording, so the cameras never need to see it at the same moment. That suits head, wrist and room cameras pointing in different directions.

## The order of work after a recording

The field guide's [order of work](https://egocam.ai/sync/drift-correction-and-verification/#the-order-of-work):

1. **Count frames first.** Find dropped and duplicated frames in every stream. A clock model fitted to a stream with silent drops is wrong.
2. **Measure offset and drift** for each device against one reference clock.
3. **Prove the result** with a test whose error you can measure.
4. **Correct the streams**, preferably by rewriting timestamps rather than pixels or samples.

### Count frames

The container stores a time for every frame. `ffprobe` prints one per decoded frame, and gaps of whole frame periods are drops: at 30 fps, one missing frame shows as a 66.7 ms gap ([Reading frame timestamps with ffprobe](https://egocam.ai/sync/drift-correction-and-verification/#reading-frame-timestamps-with-ffprobe)). This only works if the recorder writes real capture times; a recorder that stamps frames at a constant rate shows perfect intervals over a drop. For those, use device counters such as GoPro's `MSKP`, "Number frames skips or duplicated from sensor image captured to encoded frame. Normally 0." ([gpmf-parser](https://github.com/gopro/gpmf-parser)).

### Fit offset and drift

Once drops are accounted for, each device's clock relates to the reference by a straight line, T = α · t + β, where β is the offset and α − 1 the drift ([Measuring offset and drift](https://egocam.ai/sync/drift-correction-and-verification/#measuring-offset-and-drift)). You need sync events near both ends; one event gives the offset but not the drift. RocSync fits the line with "robust RANSAC regression", which ignores misread frames.

> **Diagram:** 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.

If you have readings in between, look for steps. A dropped or duplicated frame in a stream whose times are computed from frame counts shows up as a sudden jump in offset of one frame interval, not as a steady slope ([Measure drift directly](https://egocam.ai/sync/sync-methods-compared/#measure-drift-directly)).

## Proving the streams are in sync

A clap seen in two videos is a sanity check, not a measurement. Tests that give numbers ([Proving the streams are in sync](https://egocam.ai/sync/drift-correction-and-verification/#proving-the-streams-are-in-sync)):

- **Against a hardware cable.** If two of your cameras can be wired together, run your sync method on them anyway and compare. RocSync measured 1.34 ms mean RMSE this way.
- **A moving checkerboard.** Calibrate a camera pair on frames of a fast-moving board; the reprojection error "is minimized when the video streams are perfectly synchronized" ([Use a moving target](https://egocam.ai/sync/sync-methods-compared/#use-a-moving-target)).
- **Task footage.** Triangulate hands from two independent camera pairs and compare; the disagreement grows with timing error.
- **Motion on a rigid mount.** Every camera on one rigid mount sees the same head rotation, so a turn of the head lines them up.
- **A sharp event checked by eye at both ends.** Ego-Exo4D "manually verified that each GoPro camera was within 1 frame (+-16.66ms) of the Aria RGB camera by visually comparing them at single-frame moments (e.g., contact frames)" ([Grauman et al., 2024](https://arxiv.org/html/2311.18259v4)). About 30% of its captures needed recovery by hand from such events, so plan a fallback ([How Ego-Exo4D synced](https://egocam.ai/sync/syncing-multiple-devices/#how-ego-exo4d-synced-aria-glasses-and-room-gopros)).

## Correcting the streams

| Method | What it changes | Best for |
|---|---|---|
| Timestamp remapping | Only the timestamps | Every dataset; the default |
| Feature interpolation | Derived signals (keypoints, poses), not images | Triangulation and calibration from unsynchronised cameras |
| Frame synthesis | Creates new images | Dense 3D reconstruction from unsynchronised cameras |
| Resampling, or dropping and repeating frames | The samples or frames themselves | Playback and fixed-rate files |

The table is from [Correcting the streams](https://egocam.ai/sync/drift-correction-and-verification/#correcting-the-streams). Store T = α · t + β next to each frame and leave the media untouched: nothing is lost, and a better fit can replace it later. Remapping does not move exposures, so for sub-frame work interpolate what you extract. In RocSync's hand test, interpolating 2D keypoints to a common instant halved the triangulation error, from 8.8 px to 4.4 px ([Reaching sub-frame accuracy](https://egocam.ai/sync/qr-and-visual-sync/#reaching-sub-frame-accuracy-by-interpolation)).

> **Diagram:** Two free-running 30 fps cameras are up to half a frame apart. Rather than pairing each frame with the other camera's nearest frame, interpolate the other camera's detections to the same instant before triangulating; this needs a sub-frame timestamp for every frame. The 12 ms offset is assumed for the example. The bars are RocSync's measured results with four GoPro Hero 12 cameras at 30 fps (Meyer et al., 2025).

Dropping or repeating frames suits a viewer and harms a dataset: a repeated or dropped frame is a 33 ms step at 30 fps against the IMU. For capture data, keep every video frame paired with its own timestamp.

## Self-check

1. You show a phone QR timer to the head camera, the wrist camera and a room camera at the start of a session only. What can you recover, and what not?
2. A light flash and an audio clap are recorded by a wearer's camera and a room camera 10 m away. Which event gives the better offset, and why?
3. Before fitting a line through your QR readings, what must you do to each stream?
4. Your fitted offset jumps by exactly one frame interval halfway through a take. Drift or a dropped frame?
5. Why store corrected timestamps rather than re-encoding the video at a fixed rate?

### Answers

1. Each camera's offset at the start. Not the drift: that needs a second event at the end.
2. The light flash. Light crosses a room in nanoseconds; sound takes roughly 30 ms over 10 m, about a frame at 30 fps.
3. Count frames: find dropped and duplicated frames, from container timestamps or device counters.
4. A dropped or duplicated frame: drift is a steady slope, not a sudden jump.
5. Remapping leaves the media untouched, loses nothing and can be refitted later; dropping or repeating frames puts whole-frame steps into the data.

## Sources

- Field guide: [QR, LED and Flash Sync](https://egocam.ai/sync/qr-and-visual-sync/), [Measuring Sync Quality and Correcting Drift](https://egocam.ai/sync/drift-correction-and-verification/), [Software and Visual Synchronisation](https://egocam.ai/sync/software-and-visual-sync/), [Sync Methods Compared](https://egocam.ai/sync/sync-methods-compared/), [Syncing Several Devices](https://egocam.ai/sync/syncing-multiple-devices/), [glossary](https://egocam.ai/reference/glossary/#synchronisation-and-timing).
- Meyer, J. et al. (2025). [RocSync: Millisecond-accurate temporal synchronization for heterogeneous camera systems](https://arxiv.org/abs/2511.14948). arXiv.
- GoPro. [gpmf-parser](https://github.com/gopro/gpmf-parser).
- Grauman, K. et al. (2024). [Ego-Exo4D: Understanding skilled human activity from first- and third-person perspectives](https://arxiv.org/html/2311.18259v4). *CVPR*.
