Select Filename π₯π ₯π π ’
Get the output file path out of a Video Combine
- filenames
- Filename
When Video Combine renders a video, it hands downstream nodes a VHS_FILENAMES object - a bundle of all the file paths it produced. That's not a string you can hand to another node that wants a plain path. Select Filename bridges that gap: it pulls one filename out of the bundle and returns it as a string. Use it when something later in your graph needs the actual path to the rendered file - an upload node, a custom "send to Discord" node, a post-processing step, a webhook. It's from Kosinkadink's VideoHelperSuite.
It's a small glue node, and that's fine - VideoHelperSuite is full of these little adapters that make the video nodes compose with everything else. Without it, the file path stays trapped inside a VHS-specific object.
How it works
Video Combine often writes more than one file - the final output, plus intermediates like a no-audio version or a first-frame PNG - and the VHS_FILENAMES bundle lists them all in the order they were created. Select Filename indexes into that list and returns the path you point at as a string.
The inputs and outputs that matter
filenames- theVHS_FILENAMESconnection from a Video Combine node.index(default -1) - which file to pick. The default -1 grabs the most complete output, which is almost always what you want (the final, with-audio video). Positive indexes count from the start of the list.
The single output is Filename, a string path to the chosen file.
How to install it
ComfyUI Manager: search ComfyUI-VideoHelperSuite, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite
then restart. No model downloads.
Common issues & troubleshooting
The path points to a file that doesn't exist. This is the real gotcha, and it's documented: if you also use a Prune Outputs node in the same graph, execution order between the two is undefined - and in practice Prune tends to run first and delete files. Since the VHS_FILENAMES list is immutable, Select Filename can hand you a path Prune already removed. If you need both, be aware the selected file may be gone; select the final output (index -1) that Prune keeps, not an intermediate it deletes.
I wanted the video, I got a PNG. You picked the wrong index. Leave it at -1 for the most complete output; only use positive indexes when you specifically want an intermediate.
Downstream node rejects the input. Confirm the node actually wants a STRING path. Select Filename outputs a plain string - if the consumer expects a different type, that's a mismatch to resolve on the other end.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| filenames | VHS_FILENAMES | β | |
| index | INT | -1 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Filename | STRING | β |