GalahUser guide · Black Squeak Systems v2.2.2 blacksqueak.com
Using Galah

Lip-sync

Line up the embedded audio with the picture by hand, or let Galah measure the offset with a phone and correct it for you.

Why lip-sync needs adjusting#

A camera's picture usually reaches Galah later than the sound of the same moment travelling over Livewire: the camera has to capture, encode and send each frame, while a Livewire microphone arrives within milliseconds. Galah lets you delay the audio to match (or, rarely, hold the video instead). The adjustment is per embedder, applies instantly, and is kept with the embedder's settings.

Adjusting by hand#

05 Lip-sync.1234567
05 Lip-sync.
  1. Delay in force, and what it does: audio delayed (positive) or video held (negative).
  2. Slider for large moves.
  3. Number box: type an exact value in milliseconds and press Enter.
  4. Nudge buttons: −1 s, −100, −10, −1, −0.1, +0.1, +1, +10, +100 ms, +1 s.
  5. −1 fr / +1 fr: one frame of the input's frame rate (40 ms at 25 fps).
  6. 0: back to no delay.
  7. applied instantly: every change takes effect at once, with a 10 ms crossfade so there is no click.

The same delay is shown on the Rack, in the editor header and on the multiview, and can be set through the HTTP API (documented in your Black Squeak account for organisations with an API licence).

A good first guess is the camera's latency: one to three frames (40–120 ms at 25 fps). Then fine-tune by eye on a monitor fed from the embedder's output, or measure it as below.

Automatic lip-sync#

Licence. Measuring with the test video, and listening for it automatically, need the Automatic lip-sync key (or the 30-day evaluation); see Licence. Adjusting by hand, the test tone and the delay itself are part of Galah and always available.

Section 06 Automatic lip-sync measures the offset on the embedder's own output and corrects it. All it needs is a phone (or tablet) in front of the camera, close to a microphone that reaches this embedder over Livewire.

The phone page at http://<galah>:8080/sync.
The phone page at http://<galah>:8080/sync.

The phone plays a test video: a white full-screen flash and a 2 kHz beep that start on the same frame, at irregular intervals (0.67 to 1.58 seconds apart). Galah decodes its own output, finds the area of the picture that flashes, hears the beep on the mic channel, and pairs them up. Because the intervals are irregular, an offset of up to ±3 seconds cannot be mistaken for a neighbouring flash.

The result is accurate to a few milliseconds at 25–60 fps.

06 Automatic lip-sync, ready to measure.
06 Automatic lip-sync, ready to measure.

Measuring#

  1. Open the test page on a phone

    Scan the QR code in the card with the phone's camera, or browse to the address under it (/sync on Galah's web address). Open page opens it on this computer; Download video gives the test video as an MP4 (34 s) to play from another device.

  2. Set the phone up

    Turn the phone's volume and brightness up and use its own speaker, not Bluetooth (Bluetooth adds its own delay). Press Start and hold the screen towards the camera, with the speaker close to the microphone.

  3. Choose the mic channel

    Mic channel is the output channel that carries that microphone. Automatic uses the first Livewire channel in the channel map.

  4. Choose how long to measure

    Measure for 8, 12, 20 or 30 seconds. 12 seconds is enough in most rooms; use longer in noisy places.

  5. Measure

    Measure and correct measures, sets the delay (new delay = current delay − measured offset), waits for it to settle, then measures again to check. If the remaining error is more than a quarter of a frame (at least 8 ms) it corrects again, up to three times. A result within 2 ms counts as already in sync and changes nothing.

    Measure only reports the offset and the suggested delay without changing anything; click Apply beside the result to use it.

While it measures, the area of the picture where the flash was found is shown as a yellow box on the output preview, and the card shows progress; Cancel stops it. Each step is written to the log and shown on the multiview tile.

Hands-free: listen for the test#

Turn on Listen for the test video and correct automatically. Galah then listens to the mic channel all the time (a light 2 kHz detector; no video is decoded). When three intervals between beeps match the test pattern, it measures, corrects and verifies by itself — nobody needs to touch the control panel. It then waits until the beeps have stopped for six seconds before it can start again.

This is handy at the start of the day: walk past each camera with the phone playing the test, and every embedder lines itself up.

Getting a good measurement#