Nodes/ComfyUI LC Audio_Video Nodes/LC Save Video πŸ’Ύ
ComfyUI Node

LC Save Video πŸ’Ύ

Encode frames to mp4/webm with audio, metadata, and a Civitai-ready still

By lonecatone23Β·Created 2 days agoΒ·Updated 2 days agoΒ· 1
LC Save Video πŸ’Ύ
  • images
  • audio
  • av_pipe
  • metadata
  • saved_as
β—„frame_rate24.00β–Ί
β—„loop_count0β–Ί
β—„filename_prefixLC_AVβ–Ί
β—„formatvideo/h264-mp4β–Ί
β—„pix_fmtyuv420pβ–Ί
β—„crf22β–Ί
β—„save_metadatatrueβ–Ί
β—„civitai_stilltrueβ–Ί
β—„pingpongfalseβ–Ί
β—„save_outputtrueβ–Ί
β—„prune_outputstrueβ–Ί

This is the end of the line for every video in the pack - the node that actually writes a file. LC Save Video takes your frame batch (or an LC_AV_PIPE full of frames), optionally muxes in an audio track, and runs ffmpeg to produce an mp4 or webm. If you've used VHS's Video Combine, the layout will feel like coming home: frame rate, loop, format, crf, pix_fmt, pingpong - the same family of controls, plus audio and a metadata story.

The encoding options matter less than the metadata, honestly, because that's where this node is genuinely clever. Video files don't get the PNG text chunks that make ComfyUI images carry their own workflows (the image-io-metadata KB doc explains that whole convention - and why Civitai reads PNG chunks, not mp4 comments). So this node does three things when save_metadata is on: writes a sidecar .json next to the video, stuffs a comment into the mp4 container where the encoder allows it, and - the useful bit - writes a first-frame PNG with A1111-style parameters and civitai resources embedded, so uploading that still to Civitai carries your generation data the way the platform actually reads it. Keep civitai_still on and upload the PNG with your video; Civitai won't see the mp4 comment.

How it works

Frames come from the images socket (wire a VAE decode or an LC Create Video's images here), or from an av_pipe that already holds video. Then the pipeline is: optionally apply pingpong (append reversed frames, skipping endpoints, for a clean loop), optionally repeat with loop_count (extra full plays after the first), pick fps (your value, or the pipe's, or 24 if frame_rate is 0), and hand everything to ffmpeg.

The ffmpeg call is worth knowing because it's the #1 dependency gotcha: ffmpeg must be on PATH or the node errors out. Formats are the video-only set - h264/h265/hevc/av1 in mp4, vp9/av1 in webm, no gif or webp. pix_fmt defaults to yuv420p (max compatibility); yuv420p10le is the one VHS uses with h265 if you want the 10-bit path. crf defaults to 22 - same meaning as Video Combine's crf, lower is better quality and bigger files.

The settings that matter

  • filename_prefix - output stem (subfolders allowed), default LC_AV.
  • frame_rate - 0 means "use the pipe's fps, else 24."
  • format / pix_fmt / crf - the codec trio; h264-mp4 at yuv420p crf 22 is the safe default that plays everywhere.
  • save_metadata / civitai_still - keep both on unless you specifically don't want the sidecar/Png for Civitai.
  • prune_outputs - on by default and worth leaving on: it keeps intermediate frame PNGs off disk so only the video (and sidecar) survive.
  • pingpong / loop_count - for looping clips.
  • save_output - true writes to Comfy's output/, false to temp/.

Inputs: images, audio (overrides pipe audio), av_pipe, and metadata (an LC_SAVE_META from LC Save Video Metadata or the image pack's Save Metadata). The one output, saved_as, is the relative path of the file, and you get an on-node preview after encode.

How to install it

Ships in lonecatone23/ComfyUI_LC_AV_nodes (LC Audio_Video, MIT, by lonecatone23 - sibling to ComfyUI_LC123_nodes):

  • ComfyUI Manager: search "LC Audio_Video" or ComfyUI_LC_AV_nodes.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/lonecatone23/ComfyUI_LC_AV_nodes, restart ComfyUI ([LC AV] total 16 nodes).

Then make sure ffmpeg is installed and on PATH - that's the real prerequisite here, and it isn't bundled.

Where it bites

The classic errors: "ffmpeg not on PATH" (install it system-wide or add it to PATH and restart ComfyUI), "no frames" (you wired metadata or a pipe without video but no IMAGE batch - the tooltip's exact warning; wire the frames), and files that appear but won't play anywhere because you chose yuv444p or a 10-bit pix_fmt that some players reject. And if you're on a hosted/cloud ComfyUI, check that the platform even ships ffmpeg and lets you install custom packs - both are assumptions that fail on some managed runners.

CategoryLC AV/io

Inputs (15)

NameTypeDefaultDescription
frame_rateFLOAT24.000–240Playback fps. 0 = use AV pipe fps or 24. Not an AnimateDiff default.
loop_countINT00–100Extra full plays after the first (0 = play once).
filename_prefixSTRINGLC_AVStem under Comfy output. Subfolder/name is allowed.
formatCOMBOvideo/h264-mp4VHS-style video/* only. No gif/webp, no VAE/latent.
pix_fmtCOMBOyuv420pVHS uses yuv420p10le with h265. yuv420p is the compatible default.
crfINT220–51Same meaning as VHS Video Combine crf.
save_metadataBOOLEANtrueSidecar JSON + mp4 comment/description + Civitai still PNG (parameters + civitaiResources).
civitai_stillBOOLEANtrueWrite first-frame PNG with A1111 parameters / civitaiResources. Civitai does not read mp4 comment.
pingpongBOOLEANfalseAppend reversed frames (skip endpoints) for a clean loop.
save_outputBOOLEANtrueTrue = Comfy output folder. False = temp folder.
prune_outputsBOOLEANtrueNever write intermediate/utility frame PNGs or preview GIFs. Only the video file (and optional sidecar json) is saved. Raw encode files stay in a temp dir that is deleted after ffmpeg.
imagesoptIMAGEFrame batch. Used if av_pipe has no video.
audiooptAUDIOOptional soundtrack. Overrides av_pipe audio.
av_pipeoptLC_AV_PIPELC_AV_PIPE with video/audio/fps.
metadataoptLC_SAVE_METALC123 Save Metadata or LC Save Video Metadata (LC_SAVE_META).

Outputs (1)

NameTypeDescription
saved_asSTRINGβ€”