Live streams

Camera sync

Show a camera in a worksheet and line its picture up with your data.

Add a Camera panel

  1. In a worksheet, click Add chart and add a Camera panel.
  2. In the panel’s settings, choose the camera.
  3. The sync stream defaults to the camera’s own stream (“Its stream (default)”). Choose another data stream only to sync with that one.
  4. Set the offset (see below) and Fit or Fill. Fit shows the whole frame; Fill crops it to cover the panel.

Live and synced

In live mode the panel shows the newest frame. When no video arrives for 3 seconds (or four of the camera’s usual frame gaps, for a slow camera) it shows No signal and how long it has been, never a still picture that could pass for live. The video comes back by itself when frames arrive again.

It shows the frame at one instant in two cases: you hover a multi-band chart (the shared cursor), or you fix the X range. The shared cursor belongs to the worksheet. From code you set it with setCursorX, see Engine.

Syncing needs a time X axis.

Exact and Approx.

The panel shows a sync badge.

BadgeMeaning
ExactThe data stream’s times are Unix seconds, for example Python’s time.time(). They are matched to frame times directly.
Approx.Any other time base. The alignment is estimated from when samples arrived, so it is off by about the network delay.

The panel also applies the camera’s own sync (see below). Use the offset for what is left: it goes ±10 seconds in 10 ms steps, with − and + or a typed number of milliseconds. Move it until an event in the chart and in the picture line up, then Save for this camera to keep it for every panel and recording of that camera.

Automatic sync

A camera shows each moment some milliseconds after your data records it: the time to capture, encode and, in a game, draw the frame. That delay changes from one computer to another. The game plugins (Assetto Corsa, Le Mans Ultimate), the Python library and the collector measure it while the camera sends, with nothing to set:

  1. Send the camera and your data in the same stream, as usual.
  2. About a minute later the camera’s sync is measured, then checked again every minute. The sender’s log says sync measured +42 ms.
  3. The panel’s settings show it as Sync +42 ms · automatic. Panels watching live pick it up within 30 seconds, and the recording being made keeps it.

It works when something in the picture follows one of the stream’s channels: the road and the steering in a game, a machine that moves with a sensor’s reading, a lamp that follows a signal. When nothing in the picture does, the log says why and the camera keeps the sync it has. It is not measured for a camera whose own video has B-frames (sent with copy), nor for a camera and data sent from different computers. For those, use one of these:

In the panel’s settingsWhat it does
Detect syncOn a recording: compares its picture with its data in your browser; Apply keeps the result as the camera’s automatic sync.
Calibrate with a flashLive: flashes the screen the camera films and measures the delay once.
Save for this cameraKeeps the sync plus the panel’s offset as the camera’s own.

A saved sync always wins over a calibrated one, and both win over an automatic one: a measure never replaces what you set.

Recordings and walls

When the worksheet shows a cloud recording, the panel plays that camera’s recording instead of live video. It shows the frame at the cursor, or at the end of the X range, or at the start of the recording. The overlay says “Recording” and the Exact or Approx. badge works as above. See Cameras.

A panel that shows several cameras (a wall) uses the same cursor, range or recording position for every tile, so all tiles show the same instant. The panel’s offset applies to every tile.

The buffer

Frames are kept in memory in the viewer’s browser: 128 MB, about 4 minutes at 4 Mbit/s. A cursor or X range older than that shows “Not buffered”.