Skip to content

Software and Visual Synchronisation

Wires are not always possible. A head camera, a wrist camera, a phone and a room camera may be separate devices, worn by different people or bought from different makers. The methods on this page sync them anyway: by sending time over a network or radio, by stamping everything on one computer, or by filming or recording a shared event and lining it up afterwards.

They fall into three groups:

  • Clock sync puts every device’s clock on a common time base before or during recording (NTP, PTP, LSL, TICSync, GPS).
  • Event sync films or records something every device can observe, and aligns the recordings after the fact (QR codes, LEDs, audio, motion).
  • Phase alignment goes one step further and nudges free-running cameras until their frames start together (Raspberry Pi software sync, smartphone sync).

Clock and event sync give synchronised timestamps, not synchronised exposures. That difference is explained on why synchronisation matters.

The Network Time Protocol (NTP) and the Precision Time Protocol (PTP, IEEE 1588) both synchronise computer clocks over a network by exchanging timestamped packets and estimating the delay. The difference is where the timestamps are taken.

  • Software timestamping: the operating system stamps packets as it handles them, which adds the variable delay of the network stack.
  • Hardware timestamping: the network card stamps packets as they cross the wire. Red Hat: “Hardware PTP support provides better accuracy since the NIC can time stamp the PTP packets at the exact moment they are sent and received while software PTP support requires additional processing of the PTP packets by the operating system” (RHEL 7: Configuring PTP using ptp4l).

On Linux, PTP is run with ptp4l from the linuxptp project. Its manual lists “-H Select the hardware time stamping” as “the default time stamping” and “-S Select the software time stamping” (ptp4l(8)). Check whether a network card supports hardware stamping with ethtool -T. Red Hat also warns that ordinary switches degrade it: non-PTP hardware “will often cause an increase in jitter or introduce an asymmetry in the delay”.

NTP can do better than its reputation on a local network. The chrony FAQ says that with “local hardware timestamping, good network switches, and even shorter polling intervals, a sub-microsecond accuracy and stability of a few tens of nanoseconds might be possible.” Its explanation of the gap between the protocols: “PTP was designed to be easily supported in hardware (e.g. network switches and routers) in order to make more stable and accurate measurements.” Without such support, accuracy depends on the network. In chrony’s own simulated comparison, a chrony client’s clock error was 35 ± 8 µs with 10 µs of network jitter and 1603 ± 447 µs with 10 ms of jitter.

Two cautions. Clock sync makes the clocks agree; it does not make cameras expose together. And it only helps if the frames are stamped with that clock close to the sensor. Raspberry Pi puts it bluntly for its multi-device camera sync: “Any discrepancy between system clocks will feed directly into extra error in frame start times – even though the advertised timestamps on the frames will not tell you” (Raspberry Pi: software camera synchronisation).

The simplest software sync is one computer timestamping every stream with its own clock. It is only as good as the delay between each sensor and the computer, which is the latency and jitter problem described on why synchronisation matters.

Prefer device timestamps when a device has them. Project Aria’s tools mark their per-device clock, DEVICE_TIME, as recommended and describe it as “Capture time in device’s time domain. Accurate and reliable. All sensors on the same Aria device share the same device time domain”, while the host time, when data was saved, “Should not be needed for any purpose” (Aria Gen 2 time alignment tutorial).

If a sensor stamps samples on its own clock and the computer stamps their arrival, the two sets of times can be combined. Olson (2010) gives a passive method that uses the fact that transport delay is never negative, so the lowest-latency packets bound the clock offset. He proves two properties: “Our method never over-estimates the clock offset” and “Our method will never produce a result worse than the naive synchronization algorithm”.

The Lab Streaming Layer (LSL) is an open-source system, widely used in neuroscience, for recording many streams on a local network with per-sample timestamps. Each computer measures its clock offset to the others repeatedly: LSL “employs the clock filter algorithm of the Network Time Protocol (NTP)” and keeps the exchange with the lowest round-trip time, by default every 5 seconds (Kothe et al., 2025).

What the LSL authors measured, and warned about:

  • Between an EEG stream and an EMG stream recorded on one laptop, the corrected latency “showed a tight distribution centered around zero with standard deviation of approximately 0.5 ms”.
  • LSL cannot see delays inside devices: it “does not have access to any incoming data until the moment it is received by the microprocessor (CPU) or microcontroller unit (MCU)”. Each device’s fixed delay has to be measured separately.
  • Its default jitter smoothing assumes regular sampling, which webcams violate: “for consumer-grade hardware such as a webcam, disabling jitter handling sometimes improved synchronization.”
  • For video, keep the frames local and send only their timestamps: “each frame of the stream may be timestamped and stored in the local machine (outlet) while the timestamp information and the metadata would be sent over LSL”.

Pupil Labs shows the pattern with two pairs of eye-tracking glasses: each device’s clock is mapped into LSL time by a linear regression with an intercept and a slope, and the alignment was checked by switching a light “on and off four times” in view of both (Pupil Labs LSL relay guide).

Raspberry Pi software camera synchronisation

Section titled “Raspberry Pi software camera synchronisation”

Raspberry Pi’s camera stack goes beyond clock sync to phase alignment. One camera is the server and broadcasts timing messages; clients “can lengthen or shorten frame times slightly so as to pull them into sync with the server.” On the same Raspberry Pi with the same camera model, the documentation expects “the frame start times of the camera images to match within “several tens of microseconds”” (Raspberry Pi: software camera synchronisation).

It is used with rpicam-vid --sync server and --sync client, at the same nominal frame rate on both. Two limits are documented: the frame rate must be below the camera’s maximum, because the algorithm “might need to shorten camera frames”, and with different camera models the match “could be significantly larger”.

Project Aria: TICSync and Gen 2 time alignment

Section titled “Project Aria: TICSync and Gen 2 time alignment”

Meta’s Project Aria glasses document two generations of multi-device sync.

Generation Method What the documentation says
Aria Gen 1 TICSync over Wi-Fi One pair of glasses acts as a Wi-Fi hotspot and time server. Accuracy “has been tested to be better than 1ms on average after approximately 45 seconds warm-up” (About TICSync).
Aria Gen 1 pilot dataset SMPTE timecode Devices “operating in proximity to each other (<100m) can leverage SMPTE timecode to receive a synchronized time clock with sub-millisecond accuracy” (Aria pilot data timestamps).
Aria Gen 2 SubGHz radio broadcast “one pair of glasses acts as the host device, that actively broadcasts SubGHz signals to a specified channel”; clients record a mapping from host device time to their own (Aria Gen 2 time alignment tutorial).

TICSync, an algorithm by Harrison and Newman (2011), estimates both offset and drift: “It works by estimating clock offset and skew between itself (the host) and a device”. The practical steps in Meta’s TICSync sample include waiting for stabilisation before unplugging the glasses: “It may take ~40 seconds for the ticsync algorithm to reach stabilization between all devices.”

All three align timestamps. As the Gen 2 tutorial notes, the cameras on different glasses are “NOT trigger aligned by nature”.

Cameras with GPS can set their clocks from satellite time. GoPro Labs firmware has a GPS time sync option for multi-camera shoots: “If there is a good GPS signal, the camera’s internal clock will be precisely updated”. The timecode track is written at the end, so a fix that arrives mid-recording still counts: “This feature updates the MP4s timecode track at the end of capture”. GoPro’s stated accuracy: “In limited testing, sync is typically within a frame or two, but your precision my vary” (GoPro Labs: GPS time synchronization). Not every model has GPS; GoPro’s telemetry documentation notes “No GPS receiver in HERO12” (gpmf-parser).

SMPTE timecode, standardised as SMPTE ST 12, labels every frame with hours, minutes, seconds and frames: “Each frame shall be identified by a unique and complete address consisting of an hour, minute, second, and frame number” (SMPTE ST 12-1:2014). Small timecode generators can be attached to each camera so that every device runs from a shared source. Tentacle Sync recommends this over a one-off QR sync for long days: “So for long running shoots it’s always better to attach a SYNC E directly to the GoPro” (Tentacle Sync).

Three properties matter for capture rigs:

  • Frame-level resolution. Timecode says which frame, not where within the frame. It cannot give sub-frame timing.
  • Drop-frame counting. At 29.97 fps, counting as if it were 30 fps drifts by about 3.6 seconds per hour (the standard: “approximately +108 frames (+3.6 s) in one hour of elapsed time”), so the standard’s drop-frame mode skips frame numbers: “the first two frame numbers (00 and 01) shall be omitted from the count at the start of each minute except minutes 00, 10, 20, 30, 40, and 50.”
  • A start stamp is not a clock. A file that stores timecode once, at the start, drifts with the recorder’s own clock. Writing about Broadcast Wave audio files, Schneider (2009) notes that “the time code is represented accurately only once, when the record button is pressed.”

A QR timestamp is the cheapest event sync there is. A phone, tablet or laptop shows the current time as a QR code, updated continuously, and every camera films it. Each decoded code gives a pair: the time shown on the screen, and the frame (and its timestamp) in which it appeared. The difference is that camera’s offset from the screen’s clock.

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.

The camera reads the code and sets its own clock. GoPro Labs firmware does this with an animated QR code: “Simply point your Labs enabled camera at this animated QR Code, to set your date and time very accurately to local time” (GoPro Labs: precision date and time). Tentacle Sync’s Timebar app shows a QR code that GoPro cameras read so that the camera “synchronizes its internal timecode generator to the displayed time”; HERO 12 and 13 do this with stock firmware and older models need Labs firmware (Tentacle Sync: HERO 7–11, HERO 12/13). Tentacle notes a delay to compensate: “GoPros have a latency between “seeing” the QR-code and writing it to the internal clock.”

You decode the code from the footage afterwards. Any camera works, including ones that cannot read QR codes. Film the screen at the start and end of each recording, decode every frame in which the code is readable, and fit a line through the offsets. Two clusters of readings give offset and drift, as in the diagram above. The comparison page has a prompt for writing the decoder.

The QR method has several error sources, and it helps to know which ones average out. To the best of our knowledge, no published study measures them separately for QR sync; the table below is our analysis, from the arithmetic of screen refresh and frame timing.

Error source Size Averages out over many readings?
Screen refresh The code can change only once per refresh: every 16.7 ms on a 60 Hz screen, 8.3 ms at 120 Hz. Partly, if the camera and screen are not frame-locked, because each reading falls at a different phase.
Display and software latency The delay from the time being read to the code being lit on screen. No, but it is the same for every camera that films the same screen, so it cancels in camera-to-camera offsets.
Camera frame interval Each reading is quantised to the frame in which it appears. Partly, like screen refresh.
Exposure overlapping a change An exposure that spans a change can capture two codes blended, often unreadable. Unreadable frames are simply skipped.
Rolling shutter The code occupies a band of rows read at a slightly different time from the frame’s timestamp. No; correct for it with the readout time if it matters.
Clock drift Grows linearly with time since the sync. No; measure it with a second sync.

Published figures show what to expect. The RocSync authors write: “The official GoPro documentation states a synchronization accuracy of <50 ms when using their dynamic QR codes”, and in their two-GoPro test the QR timecode method gave a stereo reprojection error of 54.60 px at 30 fps, against 1.02 px for their LED method with interpolation. Shutters are still not aligned, so up to half a frame of residual error remains.

A light that changes in a known pattern is a visual event that every camera can see at once, if it is in view. Light travels the width of a room in nanoseconds, so unlike sound it adds no distance delay.

Method How it encodes time Reported result
Single flash One bright event, such as switching a light on. Gives an offset at one instant, to the nearest frame unless refined. Pupil Labs uses four flashes to check sync (Pupil Labs).
Random blinking (ROOLS) One LED blinks a random on/off sequence; recordings are matched by their sequences. “the temporal offset of the cameras is computed up to subframe interval precision” (Zhao and Chen, 2009).
Blink-coded markers Infrared LEDs blink a time code and an ID at the video frame rate. Synchronised and calibrated consumer camcorders offline (Yamazoe et al., 2004).
LED clock (RocSync) A ring of 100 LEDs, one lit at a time, advancing every millisecond, plus a binary counter. An exposure lights an arc whose ends mark its start and end. “a residual error of 1.34 ms RMSE across multiple recordings” against hardware sync; about US$20 to build (Meyer et al., 2025).
Rolling-shutter LED strips LED strips switched in sequence; the row where brightness changes gives sub-frame time. “a temporal precision of approximately 15 µs” for their setup (Nazarenus et al., 2025).

The LED clock is attractive for egocentric capture because it also records the exposure window: “The first and last LED in this arc correspond to the start and end of the exposure window, respectively”. Show it at the start and end of a session and you get offset, drift and exposure for every camera. RocSync was used in surgical recordings with many heterogeneous cameras, including head-mounted Aria glasses.

Light sync needs every camera to see the light, which is hard for cameras pointing in different directions. Show it to each camera in turn and rely on the clocks being steady in between, or use a second event later to measure drift.

A clap, a slate or a beep recorded by every device’s microphone can be aligned by cross-correlating the audio tracks. Adobe researchers showed that audio fingerprinting can group and align large collections of clips: “Landmark-based audio fingerprinting is used to match multiple recordings of the same event together and time-synchronize each file within the groups” (Bryan, Smaragdis and Mysore, 2012).

Two physical limits make audio weaker than it looks:

  • The speed of sound. “in a room measuring 10 meters across, the sound of a clap will take roughly 30 milliseconds to travel from one side to the other” (Meyer et al., 2025). That is a frame at 30 fps. At 5 m, about 15 ms.
  • Audio is not video. “since audio and video are recorded, processed, and encoded independently, there can be an inherent offset between the two.” Some pipelines even alter the video to match the audio: OpenCamera Sensors disables audio because “MediaRecorder adds extra frames to the video to match the sound” (OpenCamera Sensors).

In RocSync’s two-GoPro test, audio sync gave 11.34 px stereo reprojection error at 30 fps, between the QR timecode (54.60 px) and the LED clock (3.07 px nearest-frame, 1.02 px interpolated).

If two sensors move together, their motion signals can be aligned in time. This needs no extra hardware at all, and it is how camera–IMU time offsets are usually estimated.

Rotation is the key signal. A gyroscope measures angular velocity directly; the camera’s rotation can be measured from the images. Shift one signal in time until they match, and the shift is the offset. Ling et al. (2018) observed this inside their estimator: “time offsets are calibrated mainly by aligning relative rotations from visual constraints and from gyroscope integrations”.

The standard tools:

  • Kalibr estimates the offset with the camera–IMU extrinsics in one batch, and writes it to its results as timeshift_cam_imu: “timeshift between camera and IMU timestamps in seconds (t_imu = t_cam + shift)” (Kalibr YAML formats). On an FPGA-timestamped rig, its authors found the estimates stayed “within a domain of ±0.2 ms” of expectation (Furgale, Rehder and Siegwart, 2013).
  • Online estimation in trackers such as VINS-Mono and OpenVINS, following Li and Mourikis (2014) and Qin and Shen (2018), treats the offset as one more unknown, so it is refined in every recording.

The IMU calibration guide covers the calibration motion and its pitfalls.

The same idea works between any two devices that are rigidly attached or see the same motion. Two IMUs on one head see the same rotation; cross-correlating their gyroscope signals gives their offset. Two cameras on one head see the same image motion. RocSync tested a simple version as a baseline, “cross-correlating the gradient of average global illumination between the two cameras”, which matched their nearest-frame LED result in the two-GoPro test (3.09 px against 3.07 px).

Motion sync needs motion. A still head gives nothing to correlate, and repetitive motion can match at the wrong shift. Record a few seconds of brisk, varied movement at the start and end of each session.

Phones have no trigger pins, but good timing hardware. Three open projects show how far software can take them.

  • libsoftwaresync (Ansari et al., 2019), from Google Research, syncs phone clocks over Wi-Fi with an NTP-style exchange, then shifts each camera’s frame phase by injecting one frame with a longer exposure. On Pixel phones: “For two devices, we found the maximum error between them to be 121 µs”. Naive approaches were three orders of magnitude worse: a wired trigger had a mean absolute error of 103 ms, Bluetooth 69 ms and Wi-Fi 123 ms.
  • RecSync (Akhmetyanov et al., 2021) extends this to continuous video. With two Samsung Galaxy S20 phones, the “time difference between corresponding frames among all videos does not exceed 250 µs.”
  • OpenCamera Sensors (GitHub) records video with gyroscope and accelerometer data on the same clock, and includes RecSync. It requires the phone’s camera to use a real-time timestamp source: “Timestamp source” should be “realtime”.

The timestamp source is the thing to check on any Android device. Android’s camera documentation says that when the timestamp source is UNKNOWN, camera timestamps “can not be compared to timestamps from other subsystems (e.g. accelerometer, gyro etc.), or other instances of the same or different camera devices in the same system with accuracy” (AOSP camera timestamp documentation). Android’s compatibility tests check the unified case by asserting that motion-sensor timestamps fall between two image timestamps (CTS test_unified_timestamps.py).