Images to Base64 Video
Turn your frame stack into an actual video file, as one base64 string
- images
- base64_video
The frames are done, the composition looks right, and now you need an actual video file - but you want it as text, ready to hand off to a script, a web API, or a frontend that can't read ComfyUI's output folder. Images to Base64 Video takes an IMAGE batch, encodes it into a real video with ffmpeg, and returns the whole thing as one base64 string. You decode that string on the other end and you've got your .mp4.
It's part of ComfyUI Image to Video Inserter by Yeq6X, the pack built around inserting stills into video timelines. Its decoder counterpart, Base64 Video to Images, goes the other direction. Put together, the pack can take a finished frame stack from Multi Image Inserter and push it out of the graph as a portable video blob - useful when your output needs to travel as text, or when you want the encode step inside the workflow rather than in a separate shell command.
How it works
The node writes each frame as a temp PNG, hands the sequence to ffmpeg, and base64-encodes the resulting file. Crucially, ffmpeg must be on your PATH - the node explicitly looks for it with shutil.which("ffmpeg") and raises a clear error if it's missing, rather than silently failing. Quality settings map to real ffmpeg flags: high is CRF 18 at the slow preset, medium CRF 23, low CRF 28.
The format matters for what you get out:
- mp4 - H.264 (
libx264) with faststart, the safe default for anything browser- or web-based. - webm - VP9 (
libvpx-vp9), smaller at the same quality but slower to encode and not universally supported in video players. - avi - MPEG-4 (
mpeg4), big and old-school; you'd pick this only for legacy tooling.
Inputs that matter
images- yourIMAGEbatch. Both plain batches and the list form from this pack's assembler are normalized automatically.fps- playback speed, default 30, range 1–120. If your frames were generated at a different rate, set this to match or your video will play too fast/slow.output_format-mp4,webm, oravi.video_quality-high,medium, orlow, defaultmedium. Lower CRF = higher quality and bigger file.
The output is base64_video (STRING). Expect bloat: base64 inflates the encoded file by ~33%, and even a short clip is megabytes of text, so this is a transport for real payloads, not something you want to stare at.
Installing it
One pack, one install:
cd ComfyUI/custom_nodes
git clone https://github.com/Yeq6X/ComfyUI-image-to-video-inserter
then restart ComfyUI (or use ComfyUI Manager, search "Image to Video Inserter"). No model weights. The one real external requirement is ffmpeg on your PATH - on Windows install it via winget/choco or ship a build next to ComfyUI and add it to PATH; on Linux/macOS it's usually a package manager call away. If the node errors out with "ffmpeg executable was not found in PATH", that's your fix, not a bug in the node.
When to reach for it
Reach for this when your finished video needs to leave ComfyUI as a string - an API response, a download endpoint, a pipeline that stores blobs in a database, or a remote service that will decode it on the other side. And if you're surprised there's no save-to-file variant here, that's correct: this pack assumes you'll either combine frames with a Video Helper Suite node or handle the file side yourself. For the text-transport use case, though, it's the missing link between "frames in a graph" and "video as data".
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| fps | INT | 301–120 | — |
| output_format | COMBO | mp4 | 3 options: mp4, webm, avi |
| video_quality | COMBO | medium | 3 options: high, medium, low |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| base64_video | STRING | — |