Timing and sync¶
At a glance¶
| Typical | |
|---|---|
| Motion data to video, within one camera | Sub-millisecond, hardware-timestamped |
| Frame timestamp precision (jitter) | About 10 µs |
| Camera to camera in a Wrist Kit | Under 1 ms (measured: typically about 50 µs — validation report) |
Within one camera¶
One shared clock. Motion samples are timestamped at the moment they are measured, and video frames at the middle of their exposure — the instant that best represents a frame, whatever the exposure time. Both use the same camera clock, so aligning motion to a frame is a direct timestamp comparison.
Why middle of exposure? A frame is exposed over a window that changes with lighting — from a fraction of a millisecond to tens of milliseconds. Stamping the start of the frame would introduce an offset that varies with brightness. Stamping the middle removes it, so alignment is stable indoors and outdoors. (Current cameras. On some earlier Mono versions the timestamp refers to the start of the frame; each timestamp file has a flag that says which — see File formats.)
Rolling vs global shutter. On rolling-shutter cameras (Mono, Stereo) rows are exposed one after another; the frame timestamp refers to the centre row, and each frame records the readout time so you can compute every row's time. On Trinet Stereo GS all rows are exposed together.
The calibration time offset. Even with one clock, the image path and the motion sensor have small,
fixed internal delays. Calibration measures the remaining constant offset between camera and IMU —
timeshift_cam_imu — and it is included with every camera's calibration. Apply it:
Using the timestamps¶
for each video frame f:
t = f.frame_timestamp + timeshift_cam_imu # mid-exposure, camera clock
samples = IMU samples with timestamps around t
use / interpolate samples at t
- Use the frame timestamps from the
.vtsfile (or the SDK), never the video container's playback timestamps or the computer's clock. - Apply the calibration time offset when you have it.
- Stay on the camera clock for motion–video work; convert to other clocks only at the end.
The Python toolkit can draw motion data over the video and check the alignment visually and numerically.
Motion data starts first. The motion sensor starts a moment before the cameras, so the first motion samples of a recording — typically about half a second — come before its first video frame. That is warm-up, not an offset: align by timestamp, and samples before the first frame can simply be ignored. Never line the streams up by their first sample.
Left and right on Trinet Stereo¶
Trinet Stereo captures both eyes together: its two image sensors are
triggered at the same instant, within microseconds, on every frame. Each eye is saved to its own video
(_L.mp4, _R.mp4) with its own frame-timestamp file (_L.vts, _R.vts), and the two videos do not
necessarily start on the same frame — one eye's video can begin, and end, one frame after the other.
The same applies to recordings from Trinet Stereo GS.
Pair the eyes by their .vts files, not by frame position in the videos:
- Row i of a
.vtsfile describes frame i of its video. - Every row carries the frame's timestamp and a frame number counted from the same starting point in both eyes. Rows with the same frame number — equivalently, the same timestamp — were captured together.
left = rows of take0001_L.vts # one row per frame of take0001_L.mp4
right = rows of take0001_R.vts # one row per frame of take0001_R.mp4
for each frame number n present in both:
pair left video frame (row index of n in left)
with right video frame (row index of n in right)
If a recording was cut short by a power loss, the end of a video and the end of its .vts file can
differ by up to a second; pair only the frames present in both videos and both .vts files.
Across cameras (Wrist Kit)¶
Cameras in a kit share a clock over a short-range radio link:
- Every frame's timestamp can be placed on the kit's shared timeline — the per-frame offset is recorded in the timestamp file — so frames from different cameras line up directly, not by frame index.
- While recording, cameras stay within 1 ms of each other.
- For the first one to two seconds after a take starts, a camera that is still locking on can be less accurate. Trim the first seconds when you need the tightest alignment.
- If the radio link drops, each camera keeps recording and carries its timing forward; it re-aligns when the link returns.
On UTC time¶
Cameras don't have a real-time clock. To put card recordings on UTC — to line them up with other sensors, video or logs — use the Trinet app's Wireless status export with the toolkit's wireless UTC tool.
Quoting accuracy¶
When describing Trinet timing to others, the accurate summary is: sub-millisecond, hardware-timestamped motion–video alignment, and under 1 ms between cameras in a kit.