Timeline scripts and Event scripts

Scripts

Build Timeline scripts for ordered camera, light, and GPIO actions, or Event scripts that respond to Camera Server events.

Timeline scripts FAQ

When should I use a Timeline script instead of an Event script?

Use a Timeline script for an ordered sequence with camera settings, captures, pauses, lights, or GPIO. Use an Event script to listen for an event and start that sequence when conditions match.

How do I keep captures in a single dataset?

Use one shot for captures scheduled on a shared clock. For repeated captures, use a repeat with combineAsIterations: true; each repeat iteration becomes an iteration in the same dataset. Use stepsByIteration when settings or burst lengths differ between iterations. See the forward/reverse and two-burst examples.

Does Simulation trigger cameras?

No. Turn on Simulation before selecting Run to preview timeline timing without sending device commands or creating captures and datasets. With Simulation on, Assistant uses camera numbers from the current calibration recipe, including disconnected cameras. Camera modes and settings are only known for connected cameras. Turn Simulation off before a live run.

How do I reverse direction without firing the last camera twice?

List the camera actions explicitly in a shot: for five cameras, use 1, 2, 3, 4, 5, 4, 3, 2, 1. Set successive atMs values 500 ms apart for a 500 ms command interval. Do not append a complete reversed list, which would repeat camera 5 at the turning point.

Is a step's duration the burst hold or an exact capture interval?

No. Step duration is a trailing pause after the step finishes. A trigger with burst.durationMs already waits for its hold before that pause. Use shot.actions[].atMs for shared-clock scheduling, and use burst.durationMs plus maxFrames for a burst hold and frame cap. Actual exposure timing remains hardware-dependent.

Why do setting changes need a warmup step?

Changing settings or camera mode does not warm up the cameras. Before capture, add a trigger with phase: "warmup" and a settling duration, normally 1000 ms. Repeat this after changing settings between captures. A pause after set-setting is not a replacement for warmup.

Does a four-frame burst always return four frames?

No. The camera must support burst capture and the requested frame cap. The hold can end before four frames are captured, and hardware support varies. Check the resulting files on a small target before using all cameras. A hold duration alone does not specify a frame count.

Can two Timeline scripts run at once?

Camera Server runs one Timeline script at a time. If an Event script attempts to start a Timeline script while one is running, that action is skipped. Avoid overlapping starts and use the Event script's Stop connection when interruption is required.

Does stopping a script restore camera settings?

Do not rely on automatic rollback. Settings already applied can remain, and later cleanup steps, such as resetting ISO, do not execute after cancellation. Check the camera state before the next capture.

What should I check when validation fails?

Check the syntax and step reference. Unknown fields are rejected. Use one target selector, nested burst parameters, and schemaVersion: 1 for authored content rather than a history revision.

Updated

Page links