Skip to content

C203 Lab: Sync Your Head, Wrist and External Cameras

This lab puts the cameras of your set-up on one timeline: a head camera (or head rig), a wrist camera, and at least one external camera, such as a room camera on a tripod. It works on your rig as it is; it does not tell you how many cameras to use or where to point them. It uses only methods the field guide documents, and every command is copied from the tool’s own documentation or follows its documented form with your own names; the source is linked at each step. Square brackets mark values you fill in.

Work through Lessons 1 to 4 first, and keep the checklist next to you.

Step 1: List your devices and their clocks

Section titled “Step 1: List your devices and their clocks”

For each device, write down (Lesson 1, Lesson 2):

  • Its clock: its own crystal, a host computer’s clock, a network clock or a timecode source.
  • What its timestamps mark: start of exposure, mid-exposure, end of readout, or arrival at a computer.
  • What it supports: a trigger input or strobe output, Ethernet with hardware timestamping, a timecode input, GoPro Labs firmware, or none of these.
  • Its frame rate and shutter: global or rolling, fixed or automatic exposure.

Choose a method per device with the field guide’s rule of thumb (How to choose): sensors on one rig you can wire get hardware sync; separate devices you control get clock sync during the recording; cameras you cannot modify get event sync at the start and end. Every device gets the start-and-end events in Part B anyway, because they are also how you check the result.

Checkpoint: a table with one row per device and one chosen method. If your head and wrist cameras are wired to one board and share one trigger, treat them as one device.

If a rig triggers its cameras from one source, confirm what the trigger does before trusting it. The camera’s documentation should say the pulse “starts the exposure”, not that it selects the next free-running frame (A trigger is not always exposure sync). Fix the same manual exposure on every triggered camera, or record each frame’s exposure start and length so midpoints can be computed.

If it fails: a secondary camera recording at half the primary’s rate is FLIR’s listed symptom of a secondary camera that “isn’t using overlapping triggering” (TAN2016008; Hardware trigger).

Step 3 (if devices are on Ethernet): PTP with linuxptp

Section titled “Step 3 (if devices are on Ethernet): PTP with linuxptp”

Use this step for recording computers or Ethernet cameras around the capture space. Everything here follows the ptp4l, phc2sys and pmc manuals (checked against the linuxptp source, commit 227bbd4) and Red Hat’s PTP guide. Replace eth3 with your interface.

Check the network card. Red Hat’s form:

Terminal window
ethtool -T eth3

Hardware timestamping needs SOF_TIMESTAMPING_RAW_HARDWARE, SOF_TIMESTAMPING_TX_HARDWARE and SOF_TIMESTAMPING_RX_HARDWARE in the output (Step 1: check the network card).

Run ptp4l. Hardware timestamping is the default; -S selects software timestamping on a card without it:

Terminal window
ptp4l -i eth3 -m # hardware timestamping (the default), messages to stdout
ptp4l -i eth3 -m -S # a card without hardware timestamping

Add -s on a computer that must never become master; the manual: “Enable the clientOnly mode.” Stop chronyd, ntpd or systemd-timesyncd from steering the same clock: Red Hat says “Do not run more than one service to set the system clock’s time at the same time”.

Bridge the card’s clock and the system clock (hardware timestamping only). On a computer that follows the network, in the manual’s form with an interface name:

Terminal window
phc2sys -s eth3 -w -m

-s names the source clock, the default sink is the system clock, and -w means “Wait until ptp4l is in a synchronized state”. On a computer that is the grandmaster for the cameras, reverse it: phc2sys -c eth3 -s CLOCK_REALTIME -w -m. Or let phc2sys follow ptp4l’s port states with the manual’s first example, phc2sys -a -r.

Check the state. pmc queries the running ptp4l over its Unix domain socket (-u); -b sets the boundary hops, and GET with the management ID CURRENT_DATA_SET returns offsetFromMaster and meanPathDelay:

Terminal window
pmc -u -b 0 'GET CURRENT_DATA_SET'

The manual documents each part of this command (the -u and -b options, the GET action and the CURRENT_DATA_SET ID) but gives no example line; it is assembled from those parts.

You should see ptp4l reach the SLAVE port state on the followers, and offsets in the logs that settle. By default phc2sys prints each sample; with -u and a number of updates it prints summary lines with rms and max offsets in nanoseconds (the manual: “If zero, the individual samples are printed instead of the statistics.”). Keep the logs of every session: a rising maximum or a change of port state marks a take whose timestamps need checking (Reading the logs).

If PTP hardware is missing, use chrony with one recording computer serving time, as the field guide’s chrony section shows, and check it with chronyc tracking and chronyc sources.

Clock sync aligns computers’ clocks, not exposures, and not the USB delay of a camera stamped on arrival. Part B still applies.

Step 4 (if you use GoPro cameras): set their clocks by QR

Section titled “Step 4 (if you use GoPro cameras): set their clocks by QR”

On cameras with GoPro Labs firmware, open GoPro’s precision date and time page on a phone or laptop and point each camera at the animated QR code. The page’s own instruction: “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.” Its listed compatibility is “Labs enabled HERO5 Session, HERO7-13, MAX and BONES”.

Outdoors, models with GPS can also update their clocks from satellite time with GoPro Labs’ GPS time sync setting; GoPro says “sync is typically within a frame or two”.

After recording, a file’s timecode tag can be read with ffprobe (ffprobe documentation, -show_entries):

Terminal window
ffprobe -v error -show_entries stream_tags=timecode -of default=noprint_wrappers=1 [clip.mp4]

You should see a line such as TAG:timecode=10:00:00:00 for each stream that carries one (checked on FFmpeg 6.1.1).

A QR-set clock is coarse and drifts: RocSync quotes GoPro’s figure as “<50 ms”, and that GoPro cameras “develop a noticeable time offset as a result of drift 60–90 minutes after synchronization” (Meyer et al., 2025; The camera reads the code). Treat it as a starting point that Part B refines.

Step 5: Record a sync event at the start and the end

Section titled “Step 5: Record a sync event at the start and the end”

Start every device recording. Then, before the task begins, give every camera a sync event it can see; repeat it at the end, before anything stops recording. Choose one or more of the methods the field guide documents:

  • A QR or millisecond timer on a screen. Show a phone or laptop screen with the current time, as a QR code or as text, to each camera in turn. EgoKit’s authors used “a millisecond-level timer displayed on a webpage” (Yu et al., 2026; You decode the code from the footage).
  • An LED clock. Show it to each camera in turn for a few seconds, as RocSync does; the cameras never need to see it at the same time (The decoding pipeline).
  • A light switched on and off, in view of every camera at once. Pupil Labs switches it “on and off four times” (Pupil Labs; Light flashes).
  • Brisk, varied motion of the head for a few seconds, for cameras and IMUs on one rigid mount. Motion sync needs motion: a still head gives nothing to correlate (Motion-based sync).
  • A sharp physical event, such as a hand striking a surface, in view of every camera, as a fallback. Ego-Exo4D recovered about 30% of its captures by hand from events like these (How Ego-Exo4D synced).

Use short exposures where you can, so a fast-changing display does not smear across many steps (Film a fast light or a millisecond clock). For a long session, add an event in the middle too: readings in between let you look for steps.

You should see, on each camera’s footage, the event clearly at both ends. If one end is missing for a device, drift cannot be measured for it.

Print one presentation timestamp per decoded frame, in seconds, with the field guide’s tested command (Reading frame timestamps with ffprobe):

Terminal window
ffprobe -v error -select_streams v:0 \
-show_entries frame=best_effort_timestamp_time \
-of default=noprint_wrappers=1:nokey=1 [recording.mp4]

Run the gap script on that page on each file. At 30 fps one missing frame shows as a 66.7 ms gap. For devices whose recorder stamps frames at a constant rate, read the device’s counters instead, such as GoPro’s MSKP and TSMP (Device counters).

Checkpoint: a list of drops and duplicates per stream, or a note that there are none. Do not fit a clock model across an unexplained gap.

A light flash. FFmpeg’s signalstats filter reports each frame’s average brightness, YAVG (FFmpeg filters: signalstats). The filter documentation’s example prints YMAX and YMIN per frame; this is the same form with YAVG and each frame’s time, checked on FFmpeg 6.1.1:

Terminal window
ffprobe -v error -f lavfi movie=[clip.mp4],signalstats \
-show_entries frame=pts_time:frame_tags=lavfi.signalstats.YAVG \
-of csv=p=0

You should see one line per frame, time then brightness. Each switch of the light shows as a step; the frame where it starts is that camera’s reading of the event.

A QR timer or an LED clock. Decode it with a script: the prompts page has prompts for both, adapted from the field guide’s. Read frame times from the container, not as frame index times nominal period: that product assumes no dropped frames and a clock running exactly at its rated rate, the two things this lab is checking.

Checkpoint: for each device, a list of pairs (device time, reference time) near the start and near the end.

Step 8: Fit each device’s offset and drift

Section titled “Step 8: Fit each device’s offset and drift”

For each device, fit T = α · t + β through its start and end readings, where t is the device’s own frame time and T is reference time (Measuring offset and drift). Use a robust fit, as RocSync does with RANSAC, so a misread frame does not pull the line. Report the offset β in milliseconds and the drift (α − 1) in ppm.

Check your arithmetic against the field guide’s worked example: 1240 ms ahead at the start and 1312 ms ahead 60 minutes later give 20 ppm, and 1276 ms at 30 minutes (Lesson 1).

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.

You should see drifts of the size crystals are rated for: consumer crystals are typically rated at ±20 to ±50 ppm, so two devices can differ by up to 100 ppm (Measure drift directly). Measured values on real devices are tabled on Measured drift on real devices.

If it fails:

Symptom What the sources point to
A sudden jump of one frame interval in the offset a dropped or duplicated frame, not drift; go back to step 6
A drift far larger than crystal ratings a stream whose rate was assumed, not measured; GoPro derives sensor rates from sample counts against the video clock (Sensor rates from sample counts)
Readings at only one end drift cannot be measured; RocSync then assumes none
A QR fit that keeps failing on one device the phone changed orientation or playback stalled, two of Ego-Exo4D’s observed causes; fall back to a sharp physical event

Use at least one test whose error you can read (Proving the streams are in sync):

  • A mid-session event, if you recorded one: predict its time on each device from the fitted lines and compare with where each camera actually saw it.
  • Contact frames at both ends, compared by eye across all cameras in a side-by-side view, as Ego-Exo4D did.
  • A moving checkerboard, filmed by two cameras and calibrated as a stereo pair (see C201); better sync gives lower reprojection error.
  • A hardware cable, if two of your cameras can be wired together: run your event method on them anyway and compare.

Write the corrected time T = α · t + β next to every frame of every device, in a table stored with the recording, and leave the media untouched (Timestamp remapping). Keep the raw device times too, so a better fit can replace this one.

If the pipeline needs sub-frame alignment, such as triangulating a hand seen by the head and external cameras, interpolate the extracted keypoints to common instants rather than pairing nearest frames (Interpolating features).

Interpolating keypoints to a common instant Top: two free-running 30 fps cameras, frames 33.3 ms apart. Camera A exposes at 0, 33.3, 66.7 and 100 ms; camera B, with an assumed offset of 12 ms, at 12, 45.3, 78.7 and 112 ms. To triangulate at camera A's frame at 66.7 ms, the nearest camera B frame is 12 ms late. Bottom left: instead, a keypoint detected in camera B's frames at 45.3 ms and 78.7 ms is interpolated to 66.7 ms, at fraction (66.7 - 45.3) / 33.3, about 0.64, of the way between the two detections. Bottom right: RocSync's results with four GoPro Hero 12 cameras at 30 fps (Meyer et al., 2025): mean triangulation error over six moments of fast hand motion fell from 8.8 px with the nearest frame to 4.4 px with interpolation, and the distance between two pairs' poses of one moment from 26.07 mm to 7.52 mm. camera A camera B 0 33.3 66.7 100 ms 12 45.3 78.7 112 t* = 66.7 nearest B frame: 12 ms late Both cameras 30 fps; camera B’s 12 ms offset is assumed for the example. Interpolate the detection to t* keypoint in B at 45.3 ms B at 78.7 ms p* at t*, 0.64 of the way RocSync, 4 GoPros at 30 fps mean triangulation error, fast hand motion 8.8 px nearest frame 4.4 px interpolated distance between two pairs’ poses 26.07 mm nearest frame 7.52 mm interpolated
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).

Then go through the sign-off section of the checklist.