保存视频输出
Save a VIDEO tensor to disk, with format and codec control
- video
- video_path
The modern ComfyUI ecosystem keeps drifting toward a VIDEO tensor type, and when you have one you need a node to materialize it as an actual file. LamSaveVideo (listed on comfy.icu as "Save Video"; the author calls it 保存视频输出) is that node: take a VIDEO input, pick a container and a codec, and it writes the file into your output directory and hands back the path. It's the video sibling of the pack's audio save node, and it's one of the more polished pieces in the pack - built on ComfyUI's newer comfy_api schema with proper tooltips on every field.
Where does a VIDEO tensor come from in this pack? Its HeyGem lip-sync node returns a video_url/path, and the pack's video-merge and face-fusion tools can produce video results. This node's job is turning those into a file you can actually use, with the encoding under your control instead of whatever the upstream node decided.
Inputs
- video (required) - the VIDEO tensor to save.
- filename_prefix - default
video/ComfyUI. Supports the usual formatting tokens, so%date:yyyy-MM-dd%or width placeholders work. - format - the container. Default
auto; pick the format explicitly (mp4, webm, mov, …) when you know what you need. - codec - the encoder. Default
auto; override when you need h264 over something else, or a lossless codec for intermediates.
Outputs
- video - the saved file, returned as a VIDEO (and the node previews it). In the underlying schema the real meat is the on-disk path that gets written to your output folder.
Install
Part of the ComfyUI_Lam pack:
cd ComfyUI/custom_nodes
git clone https://github.com/yanlang0123/ComfyUI_Lam
or via ComfyUI Manager, then the README's install + 修改文件 steps. Encoding needs working ffmpeg, which the pack's deps bring in via imageio-ffmpeg - the auto codecs generally just work.
Gotchas
Because this node is built on the newer video-tensor API, it only helps you if the node feeding it actually emits a VIDEO type - older packs still hand out image batches plus fps, and those need a different save path (or the pack's LamLoadVideo-style frame handling). auto format/codec is the right call for most people; overriding without checking what your upstream node produced can trigger re-encodes that cost time for no benefit. And remember: this is an output node, so it ends a branch - put it where you actually want the final file.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| video | VIDEO | The video to save. | |
| filename_prefix | STRING | video/ComfyUI | The prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes. |
| format | COMBO | auto | The format to save the video as. |
| codec | COMBO | auto | The codec to use for the video. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video_path | STRING | — |