Save Video Passthrough
Save scene clips as scene_NNNN.mp4, keep the wire
- video
- video
SaveVideoPassthrough is the node that actually produces the clips StoryFinalCompile later stitches together. It takes a VIDEO object, writes it as an MP4 into ComfyUI's output folder, and passes the same VIDEO back out - which is more useful than it sounds, because this pack lives and dies by file naming.
With the default scene prefix and the counter on, every clip lands as scene_00001.mp4, scene_00002.mp4 and so on. That's precisely the <scene>_<counter>.mp4 convention the compiler uses to order scenes: it scans the folder, matches each numbered scene to its highest counter, sorts by scene number, and builds the final cut. So when MockSceneVideo (or your real video generator) is wired into this node per scene, the files that show up in output/ are the files that become the finished video.
How it works
It resolves the output directory (honoring output_folder and any subfolder embedded in the prefix), picks a counter that doesn't collide, and calls video.save_to(path) on the ComfyUI VIDEO object to encode the MP4. The passthrough returns the original VIDEO unchanged, so you can chain more nodes after the save without re-encoding.
The inputs that matter
- video - the VIDEO in. From MockSceneVideo, a generated clip, or anywhere else using ComfyUI's native VIDEO type.
- filename_prefix - default
scene. Keep it if these are scene clips the compiler should find. - output_folder - optional subfolder under
output/; mirror it in StoryFinalCompile'sscenes_folder. - add_counter - on by default; off writes
scene.mp4and overwrites each run.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/stepan-bogatorjov/comfy_scenes_json_node
Restart ComfyUI (or install via Manager under "Story JSON Nodes"). Requires a recent ComfyUI that ships the native VIDEO type.
Troubleshooting
Because it encodes via ComfyUI's VIDEO type, this node won't even load on older ComfyUI builds - update first. Keep the files in output/ (or point scenes_folder at whatever subfolder you chose) or the compiler will report no matching scene videos and stop. And watch the counter: with add_counter on, reruns accumulate numbered files, and the compiler always takes the newest clip per scene number - so a stale run can silently override the shot you're actually trying to compile.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| video | VIDEO | — | |
| filename_prefix | STRING | scene | — |
| output_folder | STRING | — | |
| add_counter | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | VIDEO | — |