LC Save Video πΎ
Encode frames to mp4/webm with audio, metadata, and a Civitai-ready still
- images
- audio
- av_pipe
- metadata
- saved_as
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), defaultLC_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'soutput/, false totemp/.
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.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| frame_rate | FLOAT | 24.000β240 | Playback fps. 0 = use AV pipe fps or 24. Not an AnimateDiff default. |
| loop_count | INT | 00β100 | Extra full plays after the first (0 = play once). |
| filename_prefix | STRING | LC_AV | Stem under Comfy output. Subfolder/name is allowed. |
| format | COMBO | video/h264-mp4 | VHS-style video/* only. No gif/webp, no VAE/latent. |
| pix_fmt | COMBO | yuv420p | VHS uses yuv420p10le with h265. yuv420p is the compatible default. |
| crf | INT | 220β51 | Same meaning as VHS Video Combine crf. |
| save_metadata | BOOLEAN | true | Sidecar JSON + mp4 comment/description + Civitai still PNG (parameters + civitaiResources). |
| civitai_still | BOOLEAN | true | Write first-frame PNG with A1111 parameters / civitaiResources. Civitai does not read mp4 comment. |
| pingpong | BOOLEAN | false | Append reversed frames (skip endpoints) for a clean loop. |
| save_output | BOOLEAN | true | True = Comfy output folder. False = temp folder. |
| prune_outputs | BOOLEAN | true | Never 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. |
| imagesopt | IMAGE | Frame batch. Used if av_pipe has no video. | |
| audioopt | AUDIO | Optional soundtrack. Overrides av_pipe audio. | |
| av_pipeopt | LC_AV_PIPE | LC_AV_PIPE with video/audio/fps. | |
| metadataopt | LC_SAVE_META | LC123 Save Metadata or LC Save Video Metadata (LC_SAVE_META). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| saved_as | STRING | β |