Nodes/comfyui-huyl2-nodes/Extract Video Path from VHS_FILENAMES
ComfyUI Node

Extract Video Path from VHS_FILENAMES

Bridging Video Helper Suite into a plain string

By huyl3-cpu·Created 9 months ago·Updated 4 months ago· 1
Extract Video Path from VHS_FILENAMES
  • filenames
  • video_path
  • all_paths
file_typemp4

Most of this pack's other file and video nodes want a plain string path. But VHS_VideoCombine, from the widely-used ComfyUI-VideoHelperSuite pack, doesn't output a string - it outputs a custom VHS_FILENAMES type. This node is the adapter that bridges the two, unwrapping that VHS-specific type into a plain path you can actually feed into everything else.

Why this exists

VHS_FILENAMES isn't a single path, it's a bundle - depending on how VHS_VideoCombine was configured, it can carry the combined video file, extracted frame PNGs, and an audio track all at once. If you want to hand that video off to this pack's other nodes - move_file, video_mute_from_url, Clear-Folder-By-Pattern - none of them understand VHS_FILENAMES. They want a string. This node reaches into the bundle and pulls out the one path you actually want.

Inputs and outputs

  • filenames (VHS_FILENAMES, required) - must come directly from a Video Helper Suite node's output; nothing else produces this type.
  • file_type (enum, default mp4; choices: mp4, png, audio_mp4, all) - which entry to pull out of the bundle.
  • Outputs: video_path (STRING, the single path for the requested file_type) and all_paths (STRING, everything the bundle contained).

Installing it - and the dependency the README doesn't mention

This is the one node in the pack with a real, undeclared dependency. filenames only accepts VHS_FILENAMES, a type that only exists if ComfyUI-VideoHelperSuite (by Kosinkadink) is also installed - and the comfyui-sortlist README says nothing about this; it doesn't mention this node at all, in fact. If you install just this pack on its own, this specific node will sit there unable to connect to anything, because nothing in your graph produces its required input type.

cd ComfyUI/custom_nodes
git clone https://github.com/huyl3-cpu/comfyui-sortlist.git

Then get Video Helper Suite too, either through ComfyUI Manager (search "VideoHelperSuite" or "VHS") or the same manual clone pattern against its own repo. Restart ComfyUI once both are in place.

Common issues and troubleshooting

If this node can't connect to anything, VHS is the first thing to check. A missing type in ComfyUI usually shows up as an unresolvable input or a red-bordered node - and for this specific node, that near-always means Video Helper Suite isn't installed, not that comfyui-sortlist itself is broken. This is exactly the kind of cross-pack dependency the wider ComfyUI ecosystem is notorious for: nodes silently assume other nodes are present, and there's no built-in mechanism that surfaces the requirement until you hit it.

Match file_type to what VHS_VideoCombine actually saved. Asking for png when your VHS node was only configured to output an mp4 (or vice versa) comes back empty even though this node itself ran without error - the mismatch is in what you requested, not a bug.

all_paths is your fallback for debugging. If video_path isn't giving you what you expect, check all_paths to see everything the bundle actually contained before assuming something upstream failed.

CategorySortList/Video

Inputs (2)

NameTypeDefaultDescription
filenamesVHS_FILENAMES
file_typeoptCOMBOmp44 options: mp4, png, audio_mp4, all

Outputs (2)

NameTypeDescription
video_pathSTRING
all_pathsSTRING