Skip to content
,

How to Save Video in ComfyUI: MP4, WebM and GIF (Save Video vs Video Combine)

7–11 minutes
Woman in a home lab with a PC tower holding a tablet with a SAVE VIDEO card, hook save video MP4 WebM GIF

You’ve generated frames with Wan, LTX or AnimateDiff, and now ComfyUI shows a row of images instead of a video. Or Save Video is red and asks for a VIDEO input you don’t have.

Saving video in ComfyUI is easy once you know which nodes to use. There are built-in nodes for MP4, WebM and animated WebP/PNG, plus VideoHelperSuite’s Video Combine, which most video workflows still use.

This guide shows how to save video in ComfyUI as MP4, WebM, GIF or ProRes, with the exact node chains, frame rate and quality settings, where the files go, how to add audio, and how to fix the common errors.

TL;DR

  • Built in: frames → Create Video (set fps) → Save Video (mp4 / h264). Files land in ComfyUI/output/video/.
  • VideoHelperSuite: frames → Video Combine with format video/h264-mp4, crf 19 by default.
  • GIF: only Video Combine makes real GIFs. Built-in alternatives are Save Animated WEBP and Save Animated PNG.
  • Frame rate: match the model (Wan 2.x is usually 16 fps, LTX about 24), or the video plays too fast or slow.
  • Quality: lower crf = better quality and bigger file.

New to ComfyUI? Start with my ComfyUI guide, which covers install, nodes and workflows in one place.

Which Node to Use

Video models output a batch of images (frames). To get a file, you either pack those frames into a VIDEO object and save it, or hand them straight to a video encoder node.

Node Pack Input Formats Best for
Create Video + Save Video Built in IMAGE frames → VIDEO MP4, MKV, WebM, MOV (h264, AV1, ProRes) No-install setups, official templates
Save WEBM Built in IMAGE frames WebM (VP9 or AV1) Small web clips
Save Animated WEBP / PNG Built in IMAGE frames Animated WebP, APNG Short loops, previews
Video Combine VideoHelperSuite IMAGE frames or LATENT + VAE GIF, WebP, h264/h265 MP4, WebM, AV1, ProRes, NVENC, PNG sequences GIFs, community workflows, long videos

Both routes are fine. Recent official templates from Comfy use Create Video and Save Video. Most community workflows (AnimateDiff, many Wan workflows) use Video Combine, so it’s worth having VideoHelperSuite installed anyway.

Method 1: Create Video + Save Video

Node chain

KSampler → VAE Decode → Create Video (fps 16) → Save Video (format mp4, codec h264)

Step by step

  1. After your sampler, add VAE Decode (or VAE Decode (Tiled) for long or large videos) to get the frames as IMAGE.
  2. Double-click the canvas, search Create Video (“images to video” also finds it), and connect the frames to images.
  3. Set fps. It defaults to 30, which is too fast for most video models. See the frame rate table.
  4. Optional: connect an audio input, and leave bit_depth, color_space and chroma_subsampling on their defaults (auto, sRGB, auto) unless you need HDR or 10-bit.
  5. Add Save Video and connect Create Video’s VIDEO output.
  6. Set format to mp4 and codec to h264 for a file that plays everywhere.
  7. Queue. The video previews in the node and saves to output/video/.

Save Video formats and codecs

format codecs offered Use it for
auto auto, h264, av1, prores Picks MOV for ProRes, WebM for AV1, MP4 otherwise
mp4 auto, h264, av1 Sharing, social media, editors
mkv auto, h264, av1, prores Archiving
webm auto, av1 Websites
mov prores Editing in Resolve or Premiere with almost no quality loss

For h264 and AV1, Save Video has an encoding mode option. On auto it keeps a compatible stream as it is. Switch it to re-encode to get a crf slider (h264 defaults to 18, AV1 to 24).

Save Video also has a VIDEO output that passes the video through unchanged, so you can chain more video nodes after it. The built-in pack also includes Load Video, Get Video Components (split a video into frames, audio and fps), Trim Video, Crop Video and Concatenate Video.

Method 2: VideoHelperSuite Video Combine

Install ComfyUI-VideoHelperSuite from ComfyUI Manager’s Custom Nodes Manager, then restart ComfyUI. See how to install ComfyUI Manager if you don’t have it.

Node chain

KSampler → VAE Decode → Video Combine (frame_rate 16, format video/h264-mp4)

Video Combine can also take the LATENT straight from the sampler if you connect a VAE to its optional vae input. It then decodes the frames itself.

Video Combine inputs

Input Default What it does
frame_rate 8 Frames per second of the output
loop_count 0 For GIF/WebP: 0 loops forever
filename_prefix AnimateDiff File name start; add a folder like wan/clip
format image/gif GIF, WebP, or an ffmpeg format such as video/h264-mp4
pingpong false Plays forward then backward for a seamless loop
save_output true false keeps it as a temporary preview only
audio (optional) – Muxes an audio track into the video

When you pick video/h264-mp4, extra widgets appear: pix_fmt (yuv420p or yuv420p10le), crf (default 19), save_metadata and trim_to_audio.

Formats available include h264-mp4, h265-mp4, webm, av1-webm, ProRes, nvenc_h264-mp4 (NVIDIA hardware encoding) and 16bit-png (a PNG sequence for editing). The ffmpeg-based formats need ffmpeg, which VHS finds on your system or through the imageio-ffmpeg package.

Saving GIF, WebP and PNG Animations

  • GIF: use Video Combine with format image/gif. Set loop_count 0 for an endless loop. GIFs are limited to 256 colors, so expect banding on gradients.
  • Animated WebP (built in): Save Animated WEBP has fps (default 6), lossless (on), quality (80) and a compression method. Much better colors than GIF at a smaller size.
  • Animated PNG (built in): Save Animated PNG keeps full quality and transparency, but files are large.
  • WebM (built in): Save WEBM with VP9 or AV1, fps (default 24) and crf (default 32; higher means smaller and lower quality).

For a smooth loop, turn on pingpong in Video Combine. My ComfyUI frame interpolation guide shows how to double the frame count before saving for smoother motion.

Frame Rate by Model

The frame rate doesn’t change what was generated. It only changes how fast the frames play. Use the rate the model was trained for, then interpolate if you want it smoother.

Model Typical fps Notes
Wan 2.1 / Wan 2.2 14B 16 81 frames at 16 fps is about 5 seconds
Wan 2.2 5B (TI2V) 24 Check the template you started from
LTX Video / LTX-2 24-25 Matches the template default
HunyuanVideo 24 –
AnimateDiff (SD 1.5) 8-12 16-frame context; interpolate for smoothness

Always check the model card or the official template, because new versions change defaults. If you started from a template, keep its fps value. My ComfyUI image to video guide has full Wan and LTX workflows.

Quality and File Size

crf (constant rate factor) is the main quality knob for h264, h265, VP9 and AV1. Lower is better quality and a bigger file.

Goal h264 crf Notes
Near lossless, for editing 10-14 Or use ProRes
High quality, default 17-20 VHS default 19, Save Video re-encode default 18
Small file for sharing 23-28 Visible softness on fine detail

Use yuv420p for files that play on phones, browsers and social sites. yuv420p10le reduces banding but some players can’t open it. For the best quality on a later edit, save ProRes (MOV) or a 16-bit PNG sequence and encode the final export in your editor.

Adding Audio

Both routes accept an AUDIO input:

  • Built in: connect audio to Create Video‘s audio input. Get audio from Load Audio, from Get Video Components on an existing video, or from an audio model.
  • VideoHelperSuite: connect audio to Video Combine’s audio input. Turn on trim_to_audio if the audio is shorter than the video.

If the clip and the audio have different lengths, trim one to match so the ending doesn’t cut off or run silent. For music made locally, see my guide to the best local AI background music generators.

Where Files Are Saved and Naming

  • Save Video writes to ComfyUI/output/video/, because its default prefix is video/ComfyUI. Files are numbered, for example ComfyUI_00001_.mp4.
  • Video Combine writes to ComfyUI/output/ with the prefix you set. Add a folder to the prefix (wan/shot) to keep projects apart.
  • The prefix accepts tokens such as %date:yyyy-MM-dd% or a node value like %Empty Latent Image.width%.
  • Both save the workflow in the file’s metadata by default, so you can drag the video back into ComfyUI to load the workflow on recent versions. Video Combine also saves a PNG of the first frame with the workflow embedded.

To change ComfyUI’s output folder, launch it with --output-directory. My guide to saving and sharing workflows covers keeping workflows alongside the outputs.

Troubleshooting

Save Video won’t connect to VAE Decode

Save Video needs a VIDEO, not IMAGE frames. Put Create Video between them.

Only one image saved, or hundreds of PNGs

You used Save Image. It saves each frame separately. Swap it for Create Video + Save Video or Video Combine.

The video plays too fast or too slow

The fps doesn’t match the model. Set 16 for Wan 2.x 14B, about 24 for LTX, and check your template.

Video Combine shows only GIF and WebP formats

VHS can’t find ffmpeg. Install ffmpeg and add it to PATH, or install the imageio-ffmpeg package in ComfyUI’s Python, then restart. Check the console at startup for VHS’s ffmpeg message.

The MP4 won’t play on my phone or in the browser

Use h264 with yuv420p. h265, 10-bit, ProRes and AV1 aren’t supported everywhere.

Out of memory when saving a long video

The decode is usually the problem, not the save. Use VAE Decode (Tiled), or VHS’s batch manager (meta_batch) to process long videos in chunks. My CUDA out of memory fix has more options.

FAQ

Can ComfyUI save MP4 without custom nodes?

Yes. Use the built-in Create Video and Save Video nodes with format mp4 and codec h264.

Can ComfyUI save a GIF without custom nodes?

Not a true GIF. The built-in options are Save Animated WEBP, Save Animated PNG and Save WEBM. For GIFs, install VideoHelperSuite and use Video Combine.

Where does ComfyUI save videos?

In ComfyUI/output/. Save Video uses the video subfolder by default. Video Combine uses whatever folder you put in its prefix.

What crf should I use?

18-19 for high quality h264. Go to 23-28 for small files, or 10-14 if you’ll edit the video later.

Why is Video Combine’s default frame rate 8?

VideoHelperSuite grew up with AnimateDiff, which made short clips at low frame rates. Change it to your model’s rate.

Does the saved video include my workflow?

Yes, by default. Turn off save_metadata in Video Combine, or launch ComfyUI with --disable-metadata, if you don’t want to share it.

Can I save each frame as an image too?

Yes. Connect the same frames to a Save Image node as well, or use Video Combine’s 16bit-png format for a PNG sequence.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in a home lab with a PC tower holding a tablet with a SAVE VIDEO card, hook save video MP4 WebM GIF