Batch
A batch cuts one long frame list into several stacks and runs them one after another with the same settings, saving each as it finishes. It is Zerene's batch and Helicon's split.
The stacks run in turn, so memory stays that of one stack however many there are.
Splitting rules
batch: split into stacks in the Run ▾ menu; --split RULE on the command line.
| Rule | Command line | What it does |
|---|---|---|
| Every N frames | count:N | A new stack every N frames |
| At every pause | gap:SECONDS | A new stack wherever the capture time jumps by more than that |
| One per folder | dir | Each folder becomes a stack |
gap is the useful one for a rail. A rail shoots every second or two, and the pause while
you change subjects is tens of seconds — so the capture times themselves say where one stack
ends and the next begins.
The capture time comes from EXIF DateTimeOriginal, falling back to DateTimeDigitized, then DateTime, then the XMP packet's CreateDate (raw converters write TIFFs with XMP and no EXIF). A frame with none of those uses its file's modification time, and says so.
dir pairs with Add folder… in the browser, or --split dir shoot/*/ on the command
line, so a folder of folders stacks in one command.
In the browser
Add folder… takes a whole folder including its subfolders; a dropped folder works the same. Files sort by their path, so a folder's frames stay together.
The filmstrip shows the split immediately, as a header over each stack — its frames, its capture times, and the pause before it in the tooltip. The menu tells you what the rule makes:
3 stacks of 25–31 frames · frames 1.0 s apart, the longest pause 48 sso a gap threshold can be tuned by eye before anything runs. The Run button reads
Run LAP ×3.
Capture times are read through a chunked reader, so a 274 MB TIFF whose IFD trails the pixels costs a few 64 KB reads rather than a full file read.
What a batch run does
Each stack becomes the frame list in hand and goes through the ordinary run. As each finishes, the files ticked in the Save step are saved with that step's names and settings — so set up the Save step first, then start the batch.
The stack number token (s01) goes into the names automatically unless another per-stack
token is already on (the EXIF date, a date in the name, or the first frame's name).
Files go to a folder chosen with save to folder… (the same choice as the Save step's folder…, Chrome and Edge) or as downloads.
A stack that fails is logged and the batch goes on. The banner over the filmstrip counts saved and failed stacks. The last stack stays on screen with its result, and all frames brings every frame back with each stack's status in its header.
A batch keeps no results, since its stacks are saved as they finish. The result that was on screen when the batch started is kept.
A stack in hand as part of a batch cannot be edited — choose all frames first.
On the command line
A directory among the inputs stands for the image files in it, in natural order (f2 before
f10).
# every 30 frames
lapstack --split count:30 -o out.tif shoot/
# a new stack at every pause longer than 10 s
lapstack --split gap:10 -o '{first}_stacked.tif' shoot/
# one stack per folder
lapstack --split dir -o '{dir}/stacked.tif' shoot/*/Output templates
With more than one stack, the output paths — -o, --slab-dir, --save-aligned and
--depth-raw — become templates:
| Field | Becomes |
|---|---|
{n} | The stack's number |
{first} | Its first frame's file name, without extension |
{dir} | Its folder's name |
A path with no field gets _NN inserted before its extension, so -o out.tif writes
out_01.tif, out_02.tif and so on. A folder a template names is created. Every other output
— depth, slabs, stereo, rocking, model — follows the stem as always.
Dry runs
--dry-run prints the stacks it would make — their frames, their output names, and for a
gap split the capture times and the pause before each — and then stops.
lapstack --split gap:10 --dry-run shoot/Run it before hours of stacking. It is the only way to see whether the split is what you meant, and it costs almost nothing: only the head of each file is read, or for a TIFF whose IFD follows the pixels, a window around that IFD. A hundred frames of 274 MB each take 0.2 s.
Exit status
A stack that fails — frames of two sizes, say — is reported and the batch continues. At the end there is a summary, and the exit status is 1 if anything failed.