Nodes/ComfyUI-Get-Random-File/Save Video to Folder ⚡
ComfyUI Node

Save Video to Folder ⚡

Save a video to literally any folder, not just ComfyUI's output directory

By ChrisColeTech·Created 2 years ago·Updated about 16 hours ago· 3
Save Video to Folder ⚡
  • video
  • video
  • saved_path
folder_path
filename_prefixComfyUI
format
codec
crf-1

Stock Save Video is walled off. ComfyUI's folder_paths.get_save_image_path has an is_within_directory guard, so core save nodes refuse to write anywhere outside ComfyUI's own output tree. Fine for casual use. Maddening when you're rendering batches into a per-project folder, a watch folder for an editor or an upscaler, or a network share. Save Video to Folder (from the ChrisColeTech/ComfyUI-Get-Random-File pack) just drops that guard: give it any absolute folder on the machine, it creates the folder if it's missing, and writes the video there.

That's the whole pitch, and it's quietly the most useful node in this pack. The README leads with the random file picking - the pack is mostly known as "get a random file / image," which is the one thing people actually recommend it for. The save-anywhere pair is buried in the same category and is the part you'll actually reach for if you generate video at all.

How it works: it doesn't reimplement encoding. The node hands your VIDEO input to ComfyUI's own writer (video.save_to()), so everything downstream is stock behavior. Leave format and codec on auto and the stream is copied when it's compatible - near-instant, no re-encode. Only when the destination container, codec, or a CRF forces it does the writer actually re-encode. Everything lands as an .mp4, matching core Save Video.

The inputs that matter:

  • video - any LoadVideo-style VIDEO output. Wan, LTX, HunyuanVideo, MiniMax H3, whatever ends in a VIDEO socket.
  • folder_path - an absolute destination folder, e.g. D:\Renders\ProjectA. Created if missing. Surrounding quotes from copy-pasted paths get stripped, which is a nice touch.
  • filename_prefix - defaults to ComfyUI. Supports the stock %width% %height% %year% %month% %day% %hour% %minute% %second% tokens, and a _00001_ counter is appended so a file is never silently overwritten.

Optional: format (auto/mp4), codec (auto copies the stream when compatible; h264 forces a re-encode), and crf (-1 leaves quality to ComfyUI; any other value forces a re-encode - lower is better and bigger, same convention as the stock node).

Outputs: video passes your input through so the graph keeps flowing, and saved_path is the absolute path of the file actually written - handy to feed a note node or something that needs the location. Workflow metadata gets embedded just like a core save, so the file stays part of the "drag the output back in" culture.

Install is the standard for this pack: ComfyUI Manager → search ComfyUI-Get-Random-File → Install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/ChrisColeTech/ComfyUI-Get-Random-File

Restart ComfyUI and it's in the 🤖 CCTech/Files category. No model downloads, no heavy deps - requirements.txt only pulls imageio-ffmpeg (the ffmpeg bridge ComfyUI's video path uses) and requests.

Where people get burned:

  • Leaving folder_path empty raises a clear "no destination folder set" error. It doesn't quietly fall back to the output dir.
  • Forcing codec: h264 or a real crf means a full re-encode - slower and slightly lossier than the auto copy. If your source stream is already what you want, leave both alone.
  • It's easy to miss the node entirely because the pack title says "random file." Remember it shares that pack; don't go hunting in a save pack.

Honest caveat: this is a small, essentially one-person pack with no real community footprint - effectively zero search impressions at the time of writing, and a README that's long on emoji and short on details. The node itself is simple enough that it's low-risk (the whole save_anywhere.py is readable in a minute), but there's no support ecosystem behind it. If core Save Video's output-directory lockup has ever annoyed you, this is your audience of one. For everyone else - you know who you are: the person who's tired of digging through output folders for the file they just rendered.

Category🤖 CCTech/Files

Inputs (6)

NameTypeDefaultDescription
videoVIDEOThe video to save (any LoadVideo-style VIDEO output).
folder_pathSTRINGAbsolute destination folder - ANY folder on this computer, created if it does not exist.
filename_prefixSTRINGComfyUIThe prefix for the file to save. Supports %width% %height% %year% %month% %day% %hour% %minute% %second%. A _00001_ counter is appended so files are never overwritten.
formatoptCOMBOauto keeps the source container (saved as .mp4).
codecoptCOMBOh264 re-encodes; auto copies the stream when compatible.
crfoptINT-1-1–51Quality for re-encoding (lower = better/bigger). -1 leaves it to ComfyUI; setting it forces a re-encode, like the stock Save Video.

Outputs (2)

NameTypeDescription
videoVIDEO
saved_pathSTRING