π€ Batch Save Video
The save node that keeps a 60-clip batch alive
- video
BatchSaveVideo is where a video batch actually happens. It writes the processed clip with core SaveVideo semantics - and then, like every save node in this pack, re-submits the same prompt at the front of the queue until the folder's exhausted. The write is the easy part; the requeue is the engine. ComfyUI graphs can't loop, so the Save node cheats and feeds the prompt back to the queue while clips remain, ahead of anything you queued meanwhile so the batch keeps priority over itself.
It mirrors your source tree - output_root + relative_path - so clips/subdir/clip.mkv lands at output_root/subdir/clip.mkv. Already-handled files are skipped, which is also how resume works: the Load node counts what's already in the destination tree to decide what's next. Same existence check, both halves.
The inputs that matter
video- the processed clip from the end of your chain (theVIDEOfromCreateVideoor whatever your graph produces).slot,total,relative_path- wire fromBatchLoadVideo. It validates them and refuses to run if they're wrong, so treat the error as wiring feedback, not a bug.output_root- required, absolute path. Leave it empty and the batch stops. Keep it out of your input tree.format-auto(default) keeps the source container and extension;mp4forces MP4 and re-encodes when needed.codec-auto(default) orh264. Theautocodec is the good default because it stream-copies when possible: if the processed clip's codec already matches the container, it's copied through rather than re-encoded - faster, and no generation loss on top of whatever your upscaler did. Forceh264only when you know the output needs a consistent codec.filename_template- applied to the stem only. Default{filename}reproduces the source name;{date}givesYYYY-MM-DD; other tokens stay literal. The extension always comes last fromformat, never the template.
Crash recovery, the part you'll actually rely on
Video batches crash. That's not pessimism, it's the physics: multi-GB frame batches, VRAM, and the occasional malformed clip. The pack's design assumes it. If a node upstream of the save throws - OOM, corrupt input, the upscaler dying on a bad clip - the Save node never runs, so it can't log or requeue. That's what the JS watchdog is for: it catches ComfyUI's execution_error, the server appends a line to _simple_batch_log.txt inside output_root, writes a zero-byte .error marker beside where the output would have gone, and re-queues. The next run skips the bad clip and continues. One attempt per clip, then logged and skipped - no retry-forever loops, which is deliberate. To re-run a failed clip, delete its .error marker.
The other thing worth knowing: a zero-byte destination from a killed write is treated as not-handled and gets retried; a truncated-but-non-empty file counts as handled. And Cancel stops the batch outright - the watchdog treats execution_interrupted differently from a crash, so hitting cancel just stops, no requeue.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/lordekeen/comfyui-simple-batch
Restart ComfyUI, or search ComfyUI Simple Batch in Manager. No pip install, no model downloads - PyAV (used for stream-copying and encoding) ships with ComfyUI. Needs a recent build with the V3 API. This node used to go by the name SaveFile in earlier versions of the pack; old saved workflows still get recognized for crash recovery, but you'll want to re-create them with the new names before running fresh.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| video | VIDEO | The processed clip from the end of the workflow. | |
| slot | INT | 0 | 0-based index of the current clip (wire from Batch Load Video). |
| total | INT | 0 | Total matching file count (wire from Batch Load Video). |
| relative_path | STRING | Current file's path relative to the input folder (wire from Batch Load Video). | |
| output_root | STRING | Root of the destination tree (absolute path). Required. | |
| format | COMBO | auto | Output container. 'auto' keeps the source container and extension; 'mp4' forces MP4 (re-encodes when needed). |
| codec | COMBO | auto | Output codec. 'auto' preserves the source codec (stream copy) when possible. |
| filename_template | STRING | {filename} | Output filename template, applied to the file stem. {filename} = original stem, {date} = YYYY-MM-DD; other {tokens} stay literal. The extension is always appended last from 'format'. |
Outputs (0)
No outputs