Save Video 4K
NVENC, ProRes, and an MP4 that hands your workflow back
- images
- audio
- vae
- path
What it is
You just spent twenty minutes on a Wan or LTXV run, and the last thing between you and the clip is an encoder choice. Save Video 4K is the output half of the ComfyUI 4K Video Save Load pack (same author, Matt Hallett), and it's the least annoying video saver I've used: pick NVENC, CPU or ProRes, set a quality number, get a file that plays on the node. Then - and this is the bit that makes you keep it installed - the workflow is written into the video, so you can drag the clip back into ComfyUI and rebuild the graph that made it.
How it works
Frames go to ffmpeg as raw rgb24 piped over stdin, one frame at a time, from a generator that prefetches so the encoder isn't stuttering on Python. Six encoders are supported, and the choice changes the quality semantics under the hood:
h264 (nvenc),hevc (nvenc),av1 (nvenc)- quality is a cq value, encoded VBR with-b:v 0h264 (cpu),hevc (cpu)- quality is a crf value, x264/x265 at presetmediumprores- ProRes 422 (profile 3,yuv422p10le,.mov), and the quality widget is ignored entirely
Odd dimensions get replicate-padded by a pixel rather than refused, which saves you the "why won't it encode 1919 wide" argument. The output counter is found by scanning the folder for clip_NNNNN files, because ComfyUI's save-path helper only counts PNGs. Audio is added in a second pass with -c:v copy plus AAC at 192k, so the video isn't re-encoded a second time.
Inputs that matter
- images - accepts an IMAGE of course, but also a LATENT. Wire a latent plus the optional vae and the node decodes it in batches, sized so a long 4K clip never has to fit in VRAM in one go. That's the difference between "save my 200-frame 4K run" and an OOM.
- fps - default 24, and it is not cosmetic. Wire your loader's
fpsoutput here. Wan runs at 16 fps; save a 16 fps generation at 24 and it plays 1.5× fast, which people then blame on the model. - encoder and quality - quality is a cq/crf number, lower being better and bigger. The default 19 is a sane middle. ProRes ignores it.
- filename_prefix - defaults to
video4k/clip, i.e.ComfyUI/output/video4k/clip_00001.mp4. save_output off sends it totempinstead, where ComfyUI will clean it up. - save_metadata (on by default) and the optional audio input.
The result comes out of a single path output as a STRING. Small thing worth knowing: if audio was muxed, that path points at the -audio file, because the audio pass writes a new file rather than remuxing in place.
Metadata: the workflow rides along
save_metadata writes the graph into the video as an ffmetadata comment - via a temp sidecar file, so a long workflow doesn't hit the command line length limit. The node's own tooltip makes the promise: the result can be dragged back into ComfyUI to rebuild the graph.
Two consequences. First, any host or tool that re-encodes or strips metadata throws that away - same rule as with PNGs; the container decides. Second, the privacy side nobody mentions: the file now carries your prompt, your node graph, and possibly paths with your username in them. If you're posting clips publicly and you don't want that, turn the toggle off. Sharing your workflow is a choice, not a default you agreed to.
Install
ComfyUI Manager: search "4K Video Save Load", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/HallettVisual/ComfyUI-4K-Video-Save-Load
# restart ComfyUI
No models, no pip requirements. It needs ffmpeg on PATH or imageio-ffmpeg in the ComfyUI venv:
ffmpeg -version # if that fails:
pip install imageio-ffmpeg
Where people get burned
- "ffmpeg was not found." Same fix as above. It's also the first thing that breaks if you moved a portable ffmpeg and forgot to update PATH.
- Picking an encoder your GPU can't do. NVENC needs an NVIDIA card and a current driver; without CUDA the CPU encoders still work, just slower. And
av1 (nvenc)needs an Ada card (RTX 40-series or newer) - on anything older, ffmpeg has noav1_nvencand the encode dies. The node surfaces ffmpeg's stderr in the error, so read it rather than guessing. - ProRes because "quality". It's 422 HQ in a
.mov, it's enormous, andqualitydoes nothing. Great as an intermediate you'll grade; terrible as the thing you upload. - 4K on
h264 (cpu). libx264 at preset medium on 4K is genuinely slow. If the encode is the bottleneck and you have an NVIDIA card, you picked the wrong row. - Losing the tail of your audio. The mux uses
-shortest, so audio longer than the video is cut, not extended. - Two files when you add audio. The mux pass writes a new file next to the silent one, so if you connected audio expect both
clip_00001.mp4andclip_00001-audio.mp4sitting in the folder.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| fps | FLOAT | 24.000.01–240 | — |
| filename_prefix | STRING | video4k/clip | — |
| encoder | COMBO | h264 (nvenc) | 6 options: h264 (nvenc), hevc (nvenc), av1 (nvenc), h264 (cpu), hevc (cpu), prores |
| quality | INT | 191–51 | Lower is better quality and a bigger file. Ignored by prores. |
| save_metadata | BOOLEAN | true | Store the workflow in the video file so it can be dragged back into ComfyUI. |
| save_output | BOOLEAN | true | — |
| audioopt | AUDIO | — | |
| vaeopt | VAE | Only needed when a LATENT is connected to images. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| path | STRING | — |