Nodes/ComfyUI-PainterNodes/VideoInfoLoaded
ComfyUI Node

VideoInfoLoaded

The node that finally turns VHS's video_info into numbers you can wire

By princepainter·Created 7 months ago·Updated 4 days ago· 191
VideoInfoLoaded
  • video
  • fps🟢
  • Frame_count🟢
  • width🟢
  • height🟢

Stop staring at a wire you can't use

If you've loaded a video in ComfyUI with Video Helper Suite (VHS), you've seen it: the video_info output from Load Video, hanging there with a type called VHS_VIDEOINFO. Great, a dictionary. Now try plugging that into any node that wants a plain INT or FLOAT. You can't. The dict is opaque to the graph, and you're stuck guessing how many frames you actually have.

VideoInfoLoaded is the two-minute fix. It's one half of the tiny princepainter/ComfyUI-PainterVideoInfo pack, and all it does is unpack the loaded half of that VHS dict into real typed outputs. Nothing else. No models, no API, no settings.

How it works

VHS's Load Video node returns a dictionary with two families of keys. The loaded_* ones describe the video after VHS has done its thing - after any target_fps you forced and after frame_load_cap chopped it down. VideoInfoLoaded reads exactly those four keys out of the dict:

keys = ["fps", "frame_count", "width", "height"]
loaded_info.append(video[f"loaded_{key}"])

That's the whole mechanism. It's a metadata extractor, not a video processor. The emoji in the output names (🟢 for loaded, 🟡 for the sibling node's source data) are just the author's color coding to keep the two nodes visually distinct on a crowded canvas.

The inputs and outputs that matter

There's exactly one input, and it's required:

  • video - a VHS_VIDEOINFO, straight from Video Helper Suite's Load Video video_info output. Nothing else will connect to this socket.

And four outputs, all read from the loaded values:

  • fps🟢 (FLOAT) - the frame rate VHS is actually working with
  • Frame_count🟢 (INT) - how many frames made it into memory
  • width🟢 / height🟢 (INT) - the resolution of the loaded frames

That last pair is worth a second look. If you set frame_load_cap on Load Video, your Frame_count won't match the file's real length - and that's not a bug, it's the point of having a separate "loaded" node. Same with target_fps: force a different rate on load and fps🟢 reflects it, while the sibling VideoInfoSource still shows the file's true numbers.

Wire these into anything that needs a concrete number: a frame count for a video-diffusion context, a resolution check before you upscale, or an FPS value you want to feed downstream. It's also a great debugging aid - when your generated clip comes out the wrong length, looking at Frame_count🟢 tells you what VHS actually handed you.

Installing it

Video Helper Suite itself needs to be present first, since that's where the input type comes from. Then, in ComfyUI Manager, search ComfyUI-PainterVideoInfo and install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/princepainter/ComfyUI-PainterVideoInfo.git

Restart ComfyUI and it's live. There's no requirements.txt, no model download, no config - the entire pack is a single Python file, which is exactly why there's so little to go wrong.

Where people get burned

The one real gotcha is the socket itself: video only accepts VHS_VIDEOINFO. If you can't make the connection, you either don't have Video Helper Suite installed (install it first) or you're grabbing the wrong output off Load Video. And if you update the pack and ComfyUI complains on startup, a plain restart - or reinstall via Manager - clears it; with zero dependencies, there isn't much else to break. Brand-new pack, so don't expect a big community behind it yet - but for 40 lines of code, you don't need one.

CategoryVideoInfo

Inputs (1)

NameTypeDefaultDescription
videoVHS_VIDEOINFO

Outputs (4)

NameTypeDescription
fps🟢FLOAT
Frame_count🟢INT
width🟢INT
height🟢INT