Nodes/ComfyUI_CineStyle/CS Save Video
ComfyUI Node

CS Save Video

Save Video, but with a bitrate knob and metadata you actually control

By chflame163·Created 26 days ago·Updated 3 days ago· 72
CS Save Video
  • video
  • image
  • mask
  • audio
  • video
fps30.00
filename_prefixvideo/ComfyUI
formatauto
codec
save_metadatafalse

ComfyUI's built-in Save Video is fine until it isn't. You want a specific H.264 bitrate because your render looks like a crushed YouTube thumbnail, or you want the workflow embedded in the file like every PNG already does. CS Save Video is a fork of the official node that adds exactly those two things: a target-bitrate control for H.264 and an opt-in metadata flag. Nothing else, nothing scary - it's the export node the official one should have shipped with.

It sits at the end of any CineStyle video workflow - take the VIDEO output from CS Load Video (or any official video node) and drop it in.

How it works

This is a thin, honest wrapper. By default it writes H.264 video (with AAC audio if the source has a track) using PyAV, and it sets the stream's target bitrate from the node's bitrate value. When save_metadata is on, it stuffs the workflow prompt and source metadata into the file's metadata tags - the same "the file carries the recipe" convention that's been standard for PNGs forever in this ecosystem. The output is written with faststart, so the MP4 is web-friendly immediately.

The inputs that matter

  • video - the standard ComfyUI VIDEO to save.
  • filename_prefix - default video/ComfyUI. Supports the official date and node-widget formatting syntax, so video/MyRender_%date% style prefixes work.
  • format - container, default auto.
  • codec - the interesting one. It's a dynamic dropdown: H.264 is default and exposes the bitrate slider; auto is the alternative. Pick H.264 to control quality.
  • H.264 bitrate (Mbps) - appears when H.264 is selected. Range 1.0–160.0 Mbps, default 8.0. The author's guidance is sensible: 1080p starts around 8.0, high-frame-rate 1080p likes ~12.0. If your output looks blocky in motion, this is the knob.
  • save_metadata - off by default. Flip it on to write workflow + source metadata into the file.

Outputs

Just one: a video pass-through, so you can chain save-then-preview or feed the result onward. It's also marked as an output node, so ComfyUI treats it as a terminal.

Installing it

Same as the rest of the pack - ComfyUI Manager → search ComfyUI_CineStyle, or:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_CineStyle.git

Then restart. Find it under 😺dzNodes/CineStyle. Because it uses PyAV for encoding, the pack's requirements.txt installs av - if your environment already has the official Save Video working, this will too.

Where people get burned

  • Odd dimensions refuse to encode. H.264 requires even width and height; the node raises a clear error rather than silently producing garbage. If you sized frames manually, snap them to even numbers (or use CS Load Video's multiple rounding).
  • Metadata costs you portability. The official Save Video node has the same flag; here it's just exposed by name. If you're shipping renders to clients, know that the embedded workflow is the whole graph including any prompts - leave the flag off if you don't want to hand that out.
  • Bitrate is a target, not a promise. Constant-quality compressors will drop below it on static scenes and spike on motion. For predictable files, 8 Mbps at 1080p30 is a solid start; don't chase artifacts with 160 Mbps unless you're actually exporting 8K.
Category😺dzNodes/CineStyle

Inputs (9)

NameTypeDefaultDescription
fpsFLOAT30.001–240Frame rate used when saving IMAGE or MASK input. VIDEO input keeps its embedded frame rate.
filename_prefixSTRINGvideo/ComfyUIOutput filename prefix; date and node widget formatting are supported.
formatCOMBOautoThe container format used for the output video.
codecCOMBOThe video codec. H.264 is the default and exposes a target bitrate control.
save_metadataBOOLEANfalseWhen enabled, write workflow and source metadata like the official Save Video node.
videooptVIDEOPrimary video source. When connected, image, mask, audio, and FPS are ignored.
imageoptIMAGEOptional IMAGE batch used when video is not connected.
maskoptMASKOptional MASK batch converted to grayscale video when video and image are not connected.
audiooptAUDIOOptional audio used with image or mask input when video is not connected.

Outputs (1)

NameTypeDescription
videoVIDEO