ComfyUI Node

video2image

Turn a video into a numbered pile of PNG frames (yes, it's just ffmpeg)

By dafeng012·Created 2 years ago·Updated 2 years ago· 17
video2image
    • project_path
    video_path
    project_path
    device

    video2image (class Video2Frames, but the node is registered as video2image) is the boring first step of the EBSynth pipeline: it rips every frame out of a video as lossless PNGs. That's it. You could do the same thing in a terminal with one ffmpeg command, and the node essentially does - it shells out to ffmpeg for you. But when you're chaining the whole comfyui-imgmake workflow, having this as a node keeps the graph self-contained instead of making you juggle a separate command line.

    How it works

    You give it a video_path and a project_path. It creates project_path/video_frame/ and dumps every frame there as %05d.png - five-digit zero-padded numbers, which matters later because every downstream node sorts by those digits. The extraction is lossless (-qscale 0 -c:v png), so you're not degrading frames before you restyle them.

    It returns one STRING, project_path - the same project dir you put in - which you can wire straight into image2mask, VideoKeyFramesExtractor, or ebsynth_main. The whole pipeline is designed around this folder layout.

    The inputs that matter

    • video_path - absolute path to the source video. Any format ffmpeg can read, which is nearly everything.
    • project_path - where the project lives; the frames go in project_path/video_frame.
    • device - cuda:0 or cpu. Here's the honest gotcha: this field does nothing. Frame extraction is a pure ffmpeg CPU job and the parameter is vestigial in the code. Set it to anything; it won't change the outcome.

    Installing it

    Pack install as usual - ComfyUI Manager (search comfyui-imgmake) or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dafeng012/comfyui-imgmake
    

    The real requirement isn't a Python package, it's ffmpeg on your PATH. The README makes this its very first install step for a reason: every node in this pack that touches video calls the ffmpeg binary directly. If the node errors with something like "ffmpeg is not recognized", that's your problem, not the node's.

    Troubleshooting

    • "ffmpeg is not recognized as an internal or external command" - ffmpeg isn't on PATH. On Windows, install it and add the bin folder to your system PATH, then restart ComfyUI so the environment picks it up.
    • No PNGs appear - check the path is a real video file and you have write permission in project_path. The node doesn't validate before running.
    • Weird frame counts - you're extracting every single frame, so a 30 fps clip of a minute is 1,800 PNGs. That's normal. Your disk fills fast; plan the clip length before you hit the button.

    Thin utility, yes - but it's the foundation the whole workflow stands on. And honestly, having the boring step inside the graph means the "I forgot to run ffmpeg" failure mode just stops existing.

    CategoryIMAGEmake

    Inputs (3)

    NameTypeDefaultDescription
    video_pathSTRING
    project_pathSTRING
    deviceCOMBO2 options: cuda:0, cpu

    Outputs (1)

    NameTypeDescription
    project_pathSTRING