Difforum · Save Video (MP4)
Write your frame batch to an MP4, no external video nodes
- frames
- path
The last node in almost every Difforum pipeline: Save Video (MP4) takes an IMAGE batch and writes it to an h264 MP4 in ComfyUI's output folder, using imageio-ffmpeg. It closes the loop the pack's VJ template depends on - footage in, graded MP4 out, no checkpoint and no external video helper nodes anywhere in the graph.
The outputs are refreshingly boring: a path STRING pointing at the file it wrote. Filenames auto-increment (Difforum_vj_00000.mp4, then _00001, …), so you never overwrite a previous render by accident. That's the kind of small courtesy that saves real pain when you're iterating.
The inputs that matter
frames- the batch to write. Any IMAGE batch: feedback render frames, graded footage, a storyboard.filename_prefix- what the file is called (the incrementing counter is appended).fps- playback rate (default 24; up to 120).quality- 1 to 10, default 8. Lower is smaller, higher is cleaner; 8 is a fine default and most people never move it.fps_in(optional) - a wired-in frame rate, so you can match the source clip's fps (e.g. from Load Video'sfpsoutput) instead of hardcoding it. Wire it once and the round trip keeps its speed.pingpong(optional) - append the reversed half of the batch before writing. It's the Ping-Pong Loop node, built into the writer for people who'd rather do it at write time.
How it works under the hood
Each frame gets written through ffmpeg (via imageio-ffmpeg) into an h264 MP4. It's an output node, so it renders to the UI as well as returning the path - you get a text readout of exactly where the file landed. If your batch has only a few frames, you still get an MP4; there's no minimum-length gate.
Install and gotchas
Same one-pack install as everything else here:
cd ComfyUI/custom_nodes
git clone https://github.com/chillithebillis/Difforum.git difforum
Restart ComfyUI - console shows [Difforum] loaded N nodes (ComfyUI Manager: search "Difforum"). The video writer needs imageio-ffmpeg, which is almost always already installed in ComfyUI; if you get an import error, pip install imageio-ffmpeg into your ComfyUI environment fixes it.
Two honest caveats. First, this is a functional writer, not a compression workbench - it makes a clean h264 MP4 and stops there; for pro-level encoding you'll still transcode elsewhere. Second, the fps_in vs fps relationship confuses people: if both are set, fps_in wins. Leave fps at 24 and wire fps_in when you care about matching source speed, or just leave both alone and take the 24fps default.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| frames | IMAGE | — | |
| filename_prefix | STRING | Difforum_vj | — |
| fps | FLOAT | 241–120 | — |
| quality | INT | 81–10 | — |
| fps_inopt | FLOAT | — | |
| pingpongopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| path | STRING | — |