Nodes/ComfyUI-FrameIO/List Video Files (Input Dir)
ComfyUI Node

List Video Files (Input Dir)

A boring node that saves you from typing video paths by hand

By room3dev·Created 8 months ago·Updated 7 months ago· 0
List Video Files (Input Dir)
    • paths
    • count
    subfolder
    filter*
    load_cap100
    deep_searchfalse

    Of the five nodes in ComfyUI-FrameIO, this is the least glamorous and the easiest to overlook: it scans your ComfyUI input folder for video files and hands you the paths as a list. No decoding, no loading, no pixels - just file discovery. But if you've ever typed a path into a text field, fat-fingered it, and burned ten minutes wondering why your video node found nothing, you'll appreciate having the list be generated instead of typed.

    How it works is a straightforward directory walk. It takes the ComfyUI input directory (via ComfyUI's own folder registry), optionally descends into a subfolder, filters by a hardcoded set of video extensions - mp4, mkv, mov, avi, webm, mpg, mpeg, m4v, flv, wmv, 3gp, ts, m2ts - and returns absolute paths plus a count.

    The inputs:

    • subfolder - a subdirectory inside input. Empty string means the input root itself.
    • filter - default *, meaning everything. This is where the README and the code disagree, so trust the code: it's a case-insensitive substring match, not a wildcard glob. filter = "clip" matches clip001.mp4 and myclip.mp4. A pattern like clip*.mp4 will not work - you'll get nothing, because no filename literally contains clip*.mp4.
    • load_cap - default 100, max 10000. Cap on how many paths to return; 0 means no limit.
    • deep_search - false (default) looks only in the top level; true walks subdirectories recursively.

    Outputs are paths (STRING_LIST) and count (INT), which is exactly what feeds the pack's Batch Load Image List if you're building a batch pipeline over videos already sitting in your input folder.

    Two behavior notes that will save you a debugging session. First, the sort is a plain lexicographic files.sort(), despite the code comment claiming "naturally." So clip2.mp4 sorts before clip10.mp4. If your videos are numbered and you need them in order, zero-pad the names. Second, if subfolder doesn't exist, the node returns an empty list and count 0 - no error, no warning. That's fine for a flow where "no videos yet" is a legitimate state, but if you expected 12 files and got 0, check the subfolder spelling first.

    It's worth being honest about scope: this is a tiny utility and there are fancier video-input nodes in other packs that decode video directly into batches. This one does exactly one job - enumerate files - and does it with no dependencies beyond what ComfyUI already has. Its natural home is a workflow that processes a folder of videos in a loop, or a "pick which source video" pattern where you want the list to stay in sync with what you've actually dropped into input.

    Install via ComfyUI Manager (search "ComfyUI-FrameIO") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/room3dev/ComfyUI-FrameIO
    

    Restart and it appears under FrameIO. Dependencies are just pillow and numpy; nothing to download. It's the node you add once, forget it's there, and notice whenever it quietly prevents a typo from ruining your day.

    CategoryFrameIO

    Inputs (4)

    NameTypeDefaultDescription
    subfolderSTRING
    filterSTRING*
    load_capINT1000–10000
    deep_searchCOMBOfalse2 options: false, true

    Outputs (2)

    NameTypeDescription
    pathsSTRING_LIST
    countINT