ComfyUI Node

Video Saver

Save your video with the whole generation recipe baked into the file

By kinorax·Created 4 months ago·Updated 25 days ago· 2
Video Saver
  • images
  • audio
  • image_info
  • video_info
  • image
  • audio
  • source_image_info
  • video_info
  • file_path
filename_suffixvideo
output_dir
output_subdirnone
frame_rate16
pingpongfalse
codecav1
color_encodingBT.709
color_rangelimited
chroma_subsampling4:2:0
av1_crf23
h264_crf19
vp9_crf20
file_stem

ComfyUI's workflow-in-the-PNG magic doesn't extend to video by default - a .mp4 from a standard saver is just frames, and the settings that made it are gone. IPT-VideoSaverV2 fixes that for this pack: it's a PyAV-based video encoder that writes the generation metadata - image_info (source image settings) and video_info (video-specific settings) - as A1111/Civitai-compatible infotext into the file itself. Its paired Video Reader (same pack) reads that metadata back out, so a saved video becomes a reusable workflow the same way a PNG is. That's the headline. It's also just a genuinely capable saver: AV1/H.264/VP9, per-codec CRF, ping-pong, audio muxing, and proper color metadata.

How it works

You feed it an images batch (or list) and it encodes the frames with FFmpeg through PyAV - libsvtav1 for AV1 (MP4), libx264 for H.264 (MP4), libvpx-vp9 for VP9 (WebM), with lossless FFV1 RGB MKV options in the codec list for archival-quality saves. Before encoding, it takes the optional image_info and video_info and converts them to infotext; MP4s carry it in a private metadata box, WebM/MKV use Matroska tags, and any encrypted fields ride along in the encrypted payload area. On the video side, the video_saver metadata records codec, frame rate, ping-pong state, frame count, encoder, and color encoding - so a loaded video tells you exactly how it was encoded.

The settings that matter

  • codec - AV1 (MP4), H.264 (MP4), VP9 (WebM), or lossless FFV1 MKV. AV1 is the default and the best quality-per-byte; use H.264 if you need maximum player compatibility.
  • av1_crf / h264_crf / vp9_crf - lower CRF = higher quality and bigger files. Defaults (23/19/20) are reasonable; the one you'd actually reach for to shrink files is AV1 with a CRF in the upper 20s.
  • frame_rate - default 16, and it accepts up to three decimal places, so you can hit odd frame rates like 23.976 exactly.
  • pingpong - plays forward then backward for a looping clip, without duplicating the endpoints.
  • output_dir / output_subdir / filename_suffix - where it lands under ComfyUI's output folder (optionally organized by date), with auto-incrementing names; connect file_stem to force an exact filename.
  • audio (optional) - an audio input to mux in.

Five outputs: the frames back out as image, the audio through, the source_image_info and video_info metadata, and file_path - the path you'll want if you're wiring the result into something that needs to know where the file went.

Installing it - read this part

The pack does not install PyAV for you. Its requirements.txt deliberately omits av, because nothing else in the pack needs it. Video Saver checks for it at runtime and will stop with a "PyAV required" message if it's missing. One command fixes it:

pip install av

After installing the pack itself:

cd ComfyUI/custom_nodes
git clone https://github.com/kinorax/comfyui-info-prompt-toolkit.git
cd comfyui-info-prompt-toolkit
pip install -r requirements.txt

Restart ComfyUI (or use ComfyUI Manager, "ComfyUI-Info-Prompt-Toolkit"). No model files needed for this node.

Where people get burned

The missing-av error is the #1 hit, and it's a one-liner to fix - but note the codecs you actually get depend on your PyAV/FFmpeg build, so if a codec option errors at encode time, that's your build, not the node. On the quality side, remember color encoding matters: BT.709 defaults to 8-bit, while BT.709 (10-bit) and BT.2020 are 10-bit - if your frames were generated in 16-bit float and you save 8-bit, you've thrown that range away. And file_stem, when connected, overwrites an existing file with the same name without asking - handy, but it will clobber a previous save if you're not careful.

CategoryInfo-Prompt-Toolkit/ImageInfo

Inputs (17)

NameTypeDefaultDescription
imagesIMAGEImage or image batch to save as video
filename_suffixSTRINGvideoSuffix part of output filename
output_dirSTRINGBase output directory under ComfyUI output
output_subdirCOMBOnoneOutput sub directory format
frame_rateFLOAT160.001–1000Output frame rate (supports up to 3 decimal places)
pingpongBOOLEANfalsePlay forward then backward (excluding first and last duplicated endpoints)
codecCOMBOav1Output video codec and container
color_encodingCOMBOBT.709SDR color encoding and bit depth; BT.709 uses 8-bit, BT.709 (10-bit) and BT.2020 use 10-bit
color_rangeCOMBOlimitedYUV signal range; limited is the compatibility-oriented default
chroma_subsamplingCOMBO4:2:0Chroma subsampling; unsupported encoder combinations use a compatible fallback
av1_crfINT230–63AV1 CRF (0..63, lower is higher quality)
h264_crfINT190–51H.264 CRF (0..51, lower is higher quality)
vp9_crfINT200–63VP9 CRF (0..63, lower is higher quality)
audiooptAUDIOOptional audio to mux into output video
image_infooptIPT-IMAGEINFOSource image info
video_infooptIPT-IMAGEINFOVideo generation info
file_stemoptSTRINGOptional output filename stem; when connected, save with the extension selected by codec

Outputs (5)

NameTypeDescription
imageIMAGE
audioAUDIO
source_image_infoIPT-IMAGEINFO
video_infoIPT-IMAGEINFO
file_pathSTRING