VideoPartial Capture

SaveVideo (Save Video)

class_type: SaveVideo

Source repoVerified against ComfyUI v0.36.0 · 2026-09-18

ComfyUI's built-in video-output node. Saves a VIDEO input to MP4, MKV, or WebM using H.264 or AV1, and embeds the prompt and workflow as container metadata — no custom node pack or FFmpeg binary required.

What It Does

SaveVideo is ComfyUI core's answer to VHS_VideoCombine: it writes a video file to the output directory and returns the same video on its output socket so the graph can keep going. Unlike frame-based save nodes it does not take IMAGE frames directly — it takes a single VIDEO object. Build one from frames with Create Video (images plus fps, default 30, and optional audio), or pass the output of Load Video or a model/API node that already produces VIDEO.

The format dropdown picks the container — auto, mp4, mkv, or webm — and reveals a codec choice (auto, h264, av1; WebM is AV1-only). Each codec has an encoding mode: auto, or re-encode with a crf slider (H.264 default 23, AV1 default 30; AV1 crf 0 is lossless). Auto resolves to MP4/H.264, or WebM when AV1 is chosen. Audio carried by the VIDEO is muxed as AAC in MP4/MKV and Opus in WebM, and bit depth (8/10-bit) and HDR (HLG or PQ) are set upstream on Create Video.

Encoding runs in-process through PyAV, so there is no separate FFmpeg binary to install. When the input is an already-encoded file with a compatible container and codec and encoding is left on auto, SaveVideo remuxes the streams instead of re-encoding them.

Unless ComfyUI is launched with --disable-metadata, SaveVideo writes the prompt and the UI workflow into the container as JSON metadata tags (in MP4, as QuickTime mdta keys). That makes one self-describing file — but container tags are routinely stripped by editors, transcodes, and platform uploads, which is why Numonic records the video-to-workflow link independently of the file.

Inputs

videoVIDEO

The video to save. Wiring IMAGE frames here fails validation — convert frames with Create Video first, or pass a Load Video / model node output straight through.

filename_prefixSTRING

Output prefix (default "video/ComfyUI", i.e. a video subfolder). Supports tokens such as %date:yyyy-MM-dd% or %Empty Latent Image.width%.

formatDYNAMIC COMBO

Container: auto, mp4, mkv, or webm. Auto uses MP4 for auto/H.264 and WebM for AV1. Selecting a format reveals its codec widget.

codecDYNAMIC COMBO

Revealed under format: auto, h264, or av1 (WebM offers auto/av1 only). Each codec exposes an encoding mode — auto preserves a compatible source stream, re-encode reveals crf (H.264 0–51, default 23; AV1 0–63, default 30).

Outputs

videoVIDEO

The input video, unchanged — lets you chain further video nodes after saving.

Format Options

FormatOutputDynamic controlsBest for
mp4 · h264.mp4 — H.264 + AAC audioencoding mode; crf (default 23) on re-encodeThe compatibility default (what auto picks)
mp4 · av1.mp4 — SVT-AV1 + AAC audioencoding mode; crf (default 30, 0 = lossless)Smaller files where AV1 playback is supported
mkv · h264 / av1.mkv — Matroska + AAC audioSame codec controls as MP4Editing and archival pipelines that prefer Matroska
webm · av1.webm — SVT-AV1 + Opus audio (48 kHz)encoding mode; crf (default 30)Web delivery; WebM rejects H.264

What Numonic Captures

  • Workflow and prompt JSON from SaveVideo MP4 files (QuickTime mdta metadata keys)
  • Model, sampler, seed, and prompt parameters decomposed from the embedded graph
  • Video technical metadata such as resolution and duration

Known Gaps

  • MKV and WebM outputs store prompt and workflow as Matroska tags, which Numonic's in-file extractor does not read yet — save MP4 for in-file provenance
  • Runs launched with --disable-metadata carry no graph, and API-queued runs carry only the prompt
  • Container tags are fragile — editors, transcodes, and platform uploads routinely strip them
  • Individual frame provenance and the audio source are not tracked

Troubleshooting

Validation fails when wiring images into SaveVideo

SaveVideo takes a VIDEO, not an IMAGE batch. Insert a Create Video node between your decoded frames and SaveVideo, set fps there (default 30), and optionally wire audio into it.

Full fix guide: Prompt outputs failed validation

ValueError: "WebM output requires the AV1 codec"

WebM only accepts AV1 in SaveVideo. Pick av1 (or auto) under the webm format, or switch the container to mp4 or mkv to keep H.264. Old workflows and API payloads that pin codec h264 with webm hit this.

The saved video has no workflow embedded

Check whether ComfyUI was launched with --disable-metadata, which turns off all metadata writing. Runs queued through the API without a UI workflow only embed the prompt. And any re-encode, editor export, or platform upload after saving can strip the tags.

Compare

Related Nodes

Frequently Asked Questions

Quick answers about the Save Video node.

Keep the workflow behind every video

SaveVideo embeds the workflow — until a transcode or upload strips it. Numonic links every render to its source workflow, models, seeds, and prompts, independently of what survives inside the file.