---
name: sync-my-cameras
description: Sync two or more camera angles and separate audio recordings of the same event by waveform or timecode, build a multicam sequence with every angle and mic on its own track, and deliver it as a validated Premiere Pro project plus a review MP4. Use when someone says "sync my cameras", "multicam", "line up the angles", "sync by timecode or waveform", "two cameras and a lav", or shares folders named A-cam, B-cam, audio.
argument-hint: "[path-to-angles-and-audio]"
---

# Sync My Cameras

Syncing camera angles and separate audio is preparation for a multi-camera edit. This skill groups the clips into takes, measures the offsets, builds a multicam sequence, and hands over a project ready to cut, with a review render so they can see the angles line up.

## Scope

Sync and multicam assembly. No angle selection, no cutting. External audio is placed and aligned but not mixed.

## Step 0: Resolve the input and set defaults

Accept a folder with subfolders per camera and audio recorder, a flat folder, or a Premiere project with the angles in bins. Read any hint about which clips belong together.

Defaults unless told otherwise:

- Sync by audio waveform. Fall back to embedded timecode only when a clip has no usable audio, and say so.
- Group clips into takes by overlapping capture time; if capture times are unreliable, by waveform match.
- Tolerance: within one frame at the sequence rate.
- Sequence settings from the A-camera (the angle with the longest total duration).
- Each camera on its own video track, each recorder on its own audio track, named by source folder or camera model.

Ask nothing yet.

## Step 1: Read everything

1. `caltools media-info-batch` on every file: fps, resolution, capture start time, duration, timecode if present, audio presence and sample rate.
2. Sort files into sources (camera or recorder) by folder, then by camera model from metadata if folders are flat.

If frame rates differ between cameras, note it; the multicam sequence takes the A-camera rate and the others are conformed (see `fix-my-sequence`).

Evaluation: every file has a source label, a start time or timecode, and an audio flag.

## Step 2: Group into takes

Build takes from overlapping time ranges across sources. A take needs at least two sources overlapping. Clips with no overlap partner are listed as singles, not silently dropped. When a camera rolled continuously and another stopped and started, one A-cam clip can pair with several B-cam clips; keep them in one take.

Evaluation: every clip is in exactly one take or on the singles list; each take has two or more sources.

## Step 3: Measure offsets

Per take:

1. `caltools media-audio-peaks` on every clip with audio.
2. `caltools media-sync-corr` between each clip and the take's reference (the external recorder if present, else the A-camera).
3. Record offset and confidence. Below the confidence threshold: try timecode; if still unresolved, flag the pair as unverified and place it by timecode with a marker saying so.

Evaluation: every clip in every take has a numeric offset and a confidence, or an explicit unverified flag.

## Step 4: Build the multicam sequence

1. `caltools sequence-create` at the A-camera settings; `sequence-media-set` to match.
2. `caltools sequence-clips-add` each clip on its source's track at its offset; `sequence-clips-update` for exact placement.
3. Via `caltools prproj edit`: `set_multicam` to make a multicam source from each take's aligned clips, and `add_sequence_clip` to lay the multicam clips into a working sequence in take order.
4. Place external audio on its own track aligned to the reference; leave camera scratch audio present but muted with `set_track_muted`.
5. Marker at the start of every take with its name and the offsets applied.

Evaluation: `sequence-render-frames` at the middle of three takes shows every angle present; a spot check of a clap or a hard consonant in two angles lands within one frame.

## Step 5: Export, validate, render

1. `caltools sequence-export-premiere` to `<workspace>/renders/<name>_multicam_v1.prproj`.
2. `caltools prproj validate`; fix and re-run on any error. `prproj inspect`: every supplied clip is placed, track count equals source count.
3. `caltools sequence-render-final` of the working sequence to an MP4 with the angles in a grid or the A-camera on top, so the user can watch sync at a glance. Confirm with `media-info-batch`.

## Step 6: Report

A table per take: sources, offsets, confidence, unverified flags. The singles list. Track layout. Paths for the project and the render. Then ask the one question: "Want me to make a first angle selection (a cut) from this, or leave it for you to switch in Premiere?" Name `rough-cut-to-premiere` and `stringout-for-review` as the paths.

## Done when

- Every supplied clip is placed, in exactly one take or on the singles list.
- Every offset is numeric with a confidence, and unverified pairs are marked in the sequence.
- Each camera and recorder sits on its own named track; scratch audio is muted, not deleted.
- The `.prproj` validates and a review MP4 shows the angles aligned.
