FrameToVideo-badger
Stitch a folder of frames back into an mp4 with one node
- STRING
Video in ComfyUI is a frame game: you chop a video into PNGs, run your diffusion pass over each frame, and then you need those frames to become a video again. FrameToVideo-badger is the third leg of that stool. Give it a folder of frames, an output path, and a frame rate, and it runs ffmpeg to produce an mp4. Nothing fancy, nothing to tune - the honest workhorse half of this pack's video pipeline.
It's designed to sit opposite the pack's own VideoToFrame-badger (which converts a video to a frame folder) and VideoCutFromDir-badger (which slices a frame folder into scene segments). The intended loop is: video → frames → process → frames → video. This node closes the loop. It also works standalone on any folder of numbered images you generated - upscale every frame with a tile upscaler, then stitch the result.
How it works
The node sorts the files in the folder, writes an ffmpeg concat list with each frame's duration (one divided by your frame rate), and encodes with libx264, yuv420p, and a CRF of 23. The yuv420p pixel format is the good part - it's the compatibility format every video player and editor accepts, so your output won't be one of those "my player won't open this" files.
Three inputs, all required:
- frame_dir - the folder of frames. Frames are sorted by filename, so
frame_00001.png-style naming (whatVideoToFrame-badgerproduces) works perfectly. - save_path - where the mp4 goes, e.g.
result.mp4. It's resolved to an absolute path relative to ComfyUI's working directory. - frame_rate - frames per second, default 24.
One output: a STRING containing the absolute path of the finished video. Wire it to a file-path display or a PreviewText-style node to confirm where it landed.
Installing it
From ComfyUI_BadgerTools: ComfyUI Manager → search "BadgerTools" → install, or
cd ComfyUI/custom_nodes
git clone https://github.com/AbyssYuan0/ComfyUI_BadgerTools
Restart after install. No model downloads for this node. The heavy requirements (moviepy, open_clip_torch, sentence_transformers, scikit-image) install and import on startup - they're overkill for frame stitching but they're part of the pack's video module, so they come along.
The gotcha that will actually bite you
ffmpeg must be on your system PATH. The node shells out to the ffmpeg binary directly. ComfyUI bundles its own ffmpeg for some features, but this code calls the bare command, so if ffmpeg isn't installed on your OS, you'll get a "command not found"-style error. On Linux/macOS: sudo apt install ffmpeg or brew install ffmpeg. On Windows, put the ffmpeg bin folder on PATH. It's a one-time fix, but it's the fix for this node.
Also worth knowing: the pack's frame-splitting side requires the CLIP/SBERT model downloads (open_clip's ViT-B-16 model fetches from Hugging Face on first run). That's the VideoToFrame side, not this node, but if you installed the pack expecting pure-local, the first run of the video chain can hit the network once.
No community threads exist about this node - the pack is a personal utility drawer with a two-line README. But the pattern is universal: if you're doing frame-by-frame video work in ComfyUI, you need a reliable way back to video, and this is a genuinely solid one.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| frame_dir | STRING | — | |
| save_path | STRING | result.mp4 | — |
| frame_rate | INT | 241–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |