Nodes/comfyui-ea-nodes/EA Video Save (Idempotent)
ComfyUI Node

EA Video Save (Idempotent)

Save a video to the same path every run, so pipelines can find it

By ExoticArts·Created about a year ago·Updated 10 months ago· 0
EA Video Save (Idempotent)
  • images
  • output_path
  • filename
  • stem
input_stem
fps16.0
output_dirpretrain
suffix
formatvideo/h264-mp4
crf16

Most video savers timestamp or index every file, which is great for keeping history and terrible for pipelines that need to find the latest output at a known path. EA Video Save (Idempotent) is the opposite: same input stem in, same filename out, and the existing file gets overwritten. It's built for iteration - tweak a parameter, re-run, and the output lands exactly where the last one was. Your downstream tools never have to guess.

The name sounds like a math term but the idea is simple: a save that's deterministic given the same input. For training-data prep and automated loops, that's exactly what you want.

What you set

  • images - the frames to encode.
  • input_stem - the base name (extension optional; it's stripped). Defaults to video if empty. Wire it from EA Video Load's stem and your saved files inherit their source clip's name.
  • fps (default 16) - playback rate; match your source so the output doesn't play at the wrong speed.
  • output_dir (default pretrain) - a subfolder under ComfyUI's output directory. The default hints at the training-data use case.
  • suffix - appended to the stem, e.g. _trim.
  • format - video/h264-mp4 (default, broad compatibility), video/h265-mp4, or video/vp9-webm.
  • crf (default 16) - quality/size tradeoff. Lower = better quality, bigger file. 16 is solid; drop toward 12 for archival, raise to ~20 for quick previews.

The outputs

output_path (absolute), filename, and stem - so you can log or wire onward exactly where the file went. The node writes under folder_paths.get_output_directory(), so it lands in the same place your other ComfyUI outputs do.

How it encodes

It uses OpenCV (cv2) under the hood - RGB→BGR conversion, mp4v/hvc1/VP90 codecs per format - so it needs opencv-python in your environment. ComfyUI ships it, so this usually just works; if you've trimmed your install and hit an import error, pip install opencv-python fixes it.

Gotchas

Because it overwrites, there's no versioning - run it twice on different inputs with the same stem and the second run clobbers the first. That's the feature, but it bites if you forget and expect both. And "idempotent" only holds for the same stem + suffix; change either and you get a new file alongside the old one. Keep the naming inputs deterministic and the behavior follows.

Install

Part of comfyui-ea-nodes: ComfyUI Manager → search comfyui-ea-nodes, or git clone https://github.com/ExoticArts/comfyui-ea-nodes into custom_nodes/, restart, hard-refresh. No pack-level Python dependencies beyond ComfyUI's own stack.

CategoryEA / Video

Inputs (7)

NameTypeDefaultDescription
imagesIMAGE
input_stemSTRING
fpsoptFLOAT16.01–120
output_diroptSTRINGpretrain
suffixoptSTRING
formatoptCOMBOvideo/h264-mp43 options: video/h264-mp4, video/h265-mp4, video/vp9-webm
crfoptINT160–51

Outputs (3)

NameTypeDescription
output_pathSTRING
filenameSTRING
stemSTRING