Nodes/ComfyUI-Batch-Process/Video Batch Saver
ComfyUI Node

Video Batch Saver

Batch-save videos with a sidecar caption file each

By Zar4X·Created about a year ago·Updated 10 days ago· 16
Video Batch Saver
  • videos
    contents
    output_path
    filename_prefixVID
    filename_delimiter_
    filename_suffix
    formatmp4
    codech264
    filename_number_padding4
    filename_numberend
    embeded_workflowtrue

    Video Batch Saver is the "save" end of the batch pipeline: it takes one or more videos, writes them into your ComfyUI output folder, and drops a matching .txt file beside each one so the video and its caption stay glued together. If you're generating a folder full of clips and want each one tagged or captioned without doing it by hand afterward, this is the node that closes the loop.

    It's an output node with no outputs, and every input is optional - you can feed it just videos, or videos plus a contents text string. That contents input is marked forceInput, meaning it expects a wire from a text node (its own pack's TXT Batch Loader or Text Modify Tool work great). Each video gets basename.txt written next to it with that text, stripped and UTF-8 encoded. Training-set style image-text pairs, but for video.

    What you actually set

    • output_path - leave empty to drop files in ComfyUI's default output dir, or give a subfolder. Relative paths resolve under the output folder; an absolute path works too.
    • filename_prefix (default VID) - the base name. The node's naming logic also handles the case where you feed it a filename, since it strips a trailing extension.
    • filename_number + filename_number_padding - put a zero-padded counter at the start or end of the name (or off), with padding up to 9 digits. This is how repeated runs don't clobber each other.
    • format and codec - auto or mp4 / auto or h264 respectively. auto lets ComfyUI decide, which is the safe default.
    • embeded_workflow (default on) - tucks the workflow into the video's metadata the same way PNG savers embed it into images. Keep it on; that's the "workflow included" community norm and it'll save you later.

    The node preserves the source FPS when it can (defaulting to 24 if the video object won't say), so your batch doesn't come out sped-up or slowed-down.

    Installing it

    Same install as the rest of the pack - ComfyUI Manager, search ComfyUI-Batch-Process, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Zar4X/ComfyUI-Batch-Process
    

    then restart. No model downloads.

    The gotcha that actually matters

    This node speaks the native VIDEO type, which only exists in recent ComfyUI builds. On an older install the node won't appear or the videos input won't exist, and no amount of fiddling with the pack will fix it - update ComfyUI first. Worth knowing: the pack's requirements.txt is just Pillow and torch, but the video saver's fallback code paths reach for imageio (and then OpenCV) if ComfyUI's own save path stumbles - typically over audio extraction. If you see an error mentioning imageio or cv2 in the console, install it into ComfyUI's environment (pip install imageio imageio-ffmpeg). Most of the time on a current ComfyUI you'll never hit that path. One quirk to expect: the node re-executes on every queue run (it always reports "changed"), so it will happily rewrite a file with a fresh counter number rather than silently skipping - that's a feature once you realize it.

    CategoryBatch Process

    Inputs (11)

    NameTypeDefaultDescription
    videosoptVIDEO
    contentsoptSTRING
    output_pathoptSTRING
    filename_prefixoptSTRINGVID
    filename_delimiteroptSTRING_
    filename_suffixoptSTRING
    formatoptCOMBOmp42 options: auto, mp4
    codecoptCOMBOh2642 options: auto, h264
    filename_number_paddingoptINT41–9
    filename_numberoptCOMBOend3 options: off, start, end
    embeded_workflowoptBOOLEANtrue

    Outputs (0)

    No outputs