ComfyUI Node

VHS_Path_Selector

Pick the right file out of VHS's messy three-file output

By Meisoftcoltd·Created 7 months ago·Updated 18 days ago· 3
VHS_Path_Selector
  • vhs_filenames
  • file_path
  • vhs_filenames
  • log
select_file

If you've used VideoHelperSuite's VHS_LoadVideo (or any VHS video node), you know it doesn't hand you a clean path. It hands you a VHS_FILENAMES bundle that's really a little package of three things: the video with audio, the muted video, and a PNG thumbnail. When a workflow downstream needs an actual string path - like the keyframe saver or a file loader - you're stuck unpicking that bundle yourself.

VHS_Path_Selector is the tiny utility that does the unpicking for you. It's the kind of node that feels trivial until you've rebuilt it three times in your own workflows.

How it works

You feed it the VHS_FILENAMES object, tell it which of the three files you want via a dropdown, and it scans the file list to find the match: anything ending in -audio.mp4, a plain .mp4 (the muted video), or a .png. It then returns the chosen path as a plain STRING, and - the part that's easy to miss - a reordered vhs_filenames with your pick moved to index 0. So if the rest of your graph expects the "primary" file first, the second output keeps everything happy.

Inputs and outputs

  • vhs_filenames (VHS_FILENAMES, required) - wire straight from a VHS video node.
  • select_file - the dropdown: video_with_audio, video_muted, or png_thumbnail. The names tell you everything; the fallbacks are sensible (pick the audio version, fall back to muted, then to whatever's there).
  • file_path (STRING) - the resolved path to feed into anything that takes a path string.
  • vhs_filenames (VHS_FILENAMES) - the bundle, reordered so your choice is first.
  • log (STRING) - a one-line confirmation of what was selected.

That's the whole node. If the bundle comes in malformed or empty it returns an empty string instead of crashing, which is the polite failure mode you want from a path helper.

Where it fits

Inside this pack it's a plumbing piece for the "split workflow" pattern: the analyzer hands you paths and metadata, VHS_LoadVideo gives you actual frames, and somewhere between them something needs a clean path string - usually to save a keyframe or feed a loader. It also plays nicely outside the pack; any VHS-based workflow that needs a file path on a string port will take this without fuss.

Honest take: this is a convenience wrapper around ten lines of logic, and if you're comfortable writing a List node you could skip it. But it's free, it's already installed with the pack, and it handles the edge cases (missing files, wrong order) so you don't have to.

Install

ComfyUI Manager → search "comfyui-sequential-batcher", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Meisoftcoltd/comfyui-sequential-batcher

Restart ComfyUI. It needs VideoHelperSuite on the other end of the wire to be useful, but VHS isn't a dependency of the pack itself - install it separately via Manager if you don't have it. No models, no heavy deps for this one; the pack's FFmpeg requirement only matters for the analyzer nodes that extract audio.

Category🔁 Sequential Batcher/Tools

Inputs (2)

NameTypeDefaultDescription
vhs_filenamesVHS_FILENAMES
select_fileCOMBO3 options: video_with_audio, video_muted, png_thumbnail

Outputs (3)

NameTypeDescription
file_pathSTRING
vhs_filenamesVHS_FILENAMES
logSTRING