Save Video
Save a VIDEO object without losing its container or metadata
- video
- file_path
In ComfyUI there are two very different things you can want to save: an IMAGE batch (raw frames) or a VIDEO object (an actual container with a codec, maybe an audio track). The pack's Save Video by Image handles the first. Save Video handles the second - and its job is more interesting than it sounds, because a VIDEO object already has a format, and the worst thing a save node can do is re-encode it into something else.
This node saves a VIDEO input to your output directory preserving its source extension, optionally remuxes your prompt/workflow metadata into it, detects alpha and builds a playable preview, and returns the absolute path. No unnecessary re-encode of your video-gen output.
How it works
- video - the VIDEO object, optional. Leave it unconnected and the node just passes through empty.
- filename - default
video/ComfyUI, a prefix that goes through ComfyUI's path generation (so%date:yyyy-MM-dd%placeholders work). - auto_increment - numbered files (
name_00001_.mp4) vs. overwrite. - save_output - output directory when on, temp directory when off.
- save_metadata - remuxes the workflow/prompt JSON into the container's
commentfield using ffmpeg, with streams copied rather than re-encoded. Your video carries its own "workflow included" data, same as your PNGs.
The extension logic is the quietly impressive part: the node checks the source file's extension and keeps it - an MP4 saved by a loader stays MP4, a WebM stays WebM. If the source carries an alpha channel (detected via ffprobe), it also generates a WebM preview in the temp directory so you can actually see the transparency in the UI without opening a heavyweight file.
Output is file_path - the absolute path of the saved file.
Install
Part of ComfyUI-1hewNodes:
cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
Restart ComfyUI. It shells out to ffmpeg/ffprobe, which ship with ComfyUI - no extra install.
Where it fits
End of any pipeline that ends in a VIDEO object: video generation models, Load Video + frame-processing + re-encode, URL-to-video downloads. If you want frames instead, that's Save Video by Image. The mental model is simple: IMAGE → Save Video by Image, VIDEO → Save Video. Mixing them up is the number one source of "why won't this connect" confusion.
Common issues
- The file "disappeared" - check
save_output; when off it writes to temp, which is where previews live. - It's re-encoding and you don't want it to - metadata remux copies streams; it shouldn't re-encode. If you're seeing a format change, the input itself was the changed format.
- Preview shows a flat image - alpha detection depends on the source probing correctly; if ffprobe can't tell there's alpha, you get the normal preview, not a transparency one. Cosmetic, not a data-loss issue.
For anyone who's lost a render to a "save" node that silently transcoded their carefully chosen format - this one respects the container, which is honestly the whole review.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| filename | STRING | video/ComfyUI | 保存文件名或路径前缀;支持格式占位符(如 %date:yyyy-MM-dd%)。 |
| auto_increment | BOOLEAN | true | 为 True 时自动编号;为 False 时固定文件名并覆盖。 |
| save_output | BOOLEAN | true | 是否保存到输出目录;若为 False 则保存到临时目录。 |
| save_metadata | BOOLEAN | true | 是否写入 prompt/workflow 元数据。 |
| videoopt | VIDEO | 要保存的视频;为空时节点直接通过。 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| file_path | STRING | — |