Skip to main content

Recording Multiple Subjects

If you're capturing several subjects in a row without moving the cameras, you don't need to repeat camera calibration for each one. Creating a new session from a previous, calibrated session carries over its camera calibration — only the new subject needs to be calibrated before you can start recording.

Full working example

See examples/scripts — the activity_recording script for each language loops through subjects this way, offering to start a new session with the same camera setup after each subject's activities are recorded.

When to Use This

  • Cameras must stay in the same physical position as the source session. If you need to reposition any camera, recalibrate instead and start from a fresh session.
  • The source session must have already completed camera calibration — that's what gets carried over.

Creating a New Session

let newSession = try await client.newSession(from: previousSession)

This returns a brand new, independent Session — the previous session is untouched and remains usable.

What Carries Over

Carried over?
Camera calibrationYes
Session configuration (framerate, OpenSim model, etc.)Yes
Camera connection — no QR scan neededYes
Subject calibrationNo — calibrate the new subject before recording

Since cameras are already paired and calibrated, skip straight to Subject Calibration for the new subject — there's no need to reconnect cameras or repeat checkerboard calibration.

Looping Over Subjects

repeat {
let subject = pickOrCreateSubject()
try await client.calibrateSubject(subject, in: session, statusUpdate: callback)

// record one or more activities for this subject...

guard confirm("Record another subject with the same camera setup?") else {
break
}
session = try await client.newSession(from: session)
} while true

Troubleshooting

Request fails or session not found:

  • Confirm the source session has completed camera calibration — sessions that haven't been calibrated yet can't be used as the source for this call
  • Check network connectivity, as with any other session operation

Next Steps

With the new session created, proceed to Subject Calibration for the next subject.