Nodes/MKRShift_Nodes/Assemble Frames To Video
ComfyUI Node

Assemble Frames To Video

Turn a frame batch into a shareable GIF or MP4 without ceremony

By criskb·Created 7 months ago·Updated 5 months ago· 0
Assemble Frames To Video
  • image
  • video
  • output_path
  • summary
fps24.0
output_formatgif
filename_prefixMKR_frames_video
subfolder
overwritefalse
filename_label

Every video workflow ends the same way: you've got a batch of frames sitting on a tensor, and you need an actual file. ComfyUI's core Video Combine gets you an MP4, but its VHS_VideoCombine cousin defaults to raw .ckpt-style files nobody can open, and neither gives you a GIF you can paste into a Discord message. MKRAssembleFramesToVideo is the version of that job that doesn't make you think about codecs. Feed it an IMAGE, pick a format, and it writes a file to your output folder and hands you a path back.

It's part of the MKRShift_Nodes media/IO family - a big production-oriented pack from criskb that also ships pre-save, muxing, and trim nodes. Where core Video Combine is built for one container, this one treats GIF, WebP, MP4, MOV, and WebM as equals and defaults to GIF because that's what previews and quick shares usually want.

How it works

The node takes your IMAGE tensor (a batch of frames in generation order), converts it to PIL frames, and writes them out. GIF and WebP are handled purely in Python through PIL's animation support. MP4, MOV, and WebM go through ffmpeg: it dumps the frames to a temp PNG sequence and feeds them to the encoder - libx264 for MP4/MOV, libvpx-vp9 for WebM.

Here's the gotcha baked into the design: if ffmpeg isn't on your PATH, mp4/mov/webm silently fall back to GIF. No error, no red node - you just get an animated GIF where you asked for an MP4, and a note in the summary output explains why. If you want H.264, install ffmpeg (more below). For everything else the node is dependency-free.

The inputs that matter

  • image - the only required input. Any IMAGE batch: decoded video frames, an image-batch output from a sampler, frames you split out of a longer clip.
  • fps - playback speed, default 24. This is the one beginners forget; a 24fps generation at 8fps looks juddery, and 60fps GIFs get enormous.
  • output_format - gif (default), webp, mp4, mov, webm. MP4/MOV/WebM need ffmpeg, remember.
  • filename_prefix / subfolder / overwrite - where the file lands under ComfyUI/output. Turn on overwrite if you're iterating and don't want _00001_ suffixes piling up.
  • filename_label (optional) - a custom name; if set, it wins over the prefix.

Three outputs come back: video (an MKR_VIDEO payload - this pack's internal handle, holding the file path), output_path (the plain string path, handy for a Show Text node or downstream string work), and summary (JSON with frame count, fps, and any warnings). The MKR_VIDEO output is what wires into the pack's own MKRPresaveVideo, MKRMuxVideoAudio, or MKRAutoReframeSubject nodes. Note that MKR_VIDEO is a pack-specific type, so other packs' video nodes usually won't accept it directly - stay inside the family, or grab output_path and feed that to anything that takes a file path string.

Install and the ffmpeg bit

Grab it through ComfyUI Manager (search "MKRShift Nodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Then restart ComfyUI. No model downloads, no heavy deps - the whole pack is numpy/PIL plus optional ffmpeg. To get real MP4/MOV/WebM out, make sure ffmpeg is on your PATH (on Windows: winget install ffmpeg, or drop it in the folder and add it to your system PATH; on macOS, brew install ffmpeg).

Common issues

The "I asked for mp4 and got a gif" surprise is the one you'll actually hit - check that ffmpeg is callable from a terminal. Second: if you feed a batch with mixed frame sizes, the output will be sized to the first frame; normalize resolutions upstream. And if overwrite is off, repeated runs stack up _00001_, _00002_ files - either flip it on or embrace the archive.

CategoryMKRShift Nodes/Media/IO

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
fpsFLOAT24.01–240
output_formatCOMBOgif5 options: gif, webp, mp4, mov, webm
filename_prefixSTRINGMKR_frames_video
subfolderSTRING
overwriteBOOLEANfalse
filename_labeloptSTRING

Outputs (3)

NameTypeDescription
videoMKR_VIDEO
output_pathSTRING
summarySTRING