Nodes/ComfyUI-PainterNodes/VideoInfoSource
ComfyUI Node

VideoInfoSource

The original file's fps, frame count and resolution, straight from VHS

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

The file's true identity, before VHS touches it

When Video Helper Suite loads a clip, it can do a lot of fiddling on the way in - forcing a target framerate, capping how many frames you get, resizing to keep VRAM sane. By the time you have a tensor in your graph, you may have a video that bears little resemblance to the file on disk. That's fine most of the time. But the moment you need to know what the original file actually was - its real fps, its true frame count, its native resolution - you've got a problem, because VHS only hands you an opaque VHS_VIDEOINFO dictionary.

VideoInfoSource, from the two-node princepainter/ComfyUI-PainterVideoInfo pack, reaches into that dict and pulls out the source_* keys: the metadata of the video as it exists on disk, untouched by anything you set on the loader.

How it works

The mechanism is almost insultingly simple. Video Helper Suite's Load Video returns a dictionary whose keys come in two flavors - source_* (what the file says) and loaded_* (what got decoded). VideoInfoSource reads the source side:

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

Four dictionary lookups, four outputs. That's the whole node. The 🟡 in the output names is the author's color coding so you can tell this one apart from its sibling VideoInfoLoaded at a glance - yellow for source, green for loaded.

The inputs and outputs that matter

One required input, nothing else:

  • video - a VHS_VIDEOINFO, wired from Video Helper Suite's Load Video video_info output. Only that type will connect.

Four outputs, all from the source metadata:

  • fps🟡 (FLOAT) - the framerate the file claims
  • Frame_count🟡 (INT) - the video's full length, uncapped
  • width🟡 / height🟡 (INT) - the native resolution

Those numbers matter when your decision depends on the file, not on what survived the loader. Say you're deciding whether a clip needs upscaling: the loaded width might already be resized down, but the source width tells you what you're starting from. Or you're building a frame-interpolation or video-model workflow that needs the real duration - Frame_count🟡 is the only place that value lives once VHS has capped the load. It's also the honest answer when you're comparing "what did I load" against "what was it really."

Installing it

Install Video Helper Suite first - the input type comes from there. Then grab the pack via ComfyUI Manager (search ComfyUI-PainterVideoInfo) or:

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

Restart ComfyUI. There's no requirements.txt, no model files, no configuration - the whole pack is one small Python file, so install is about as painless as custom nodes get. This is one of the rare packs where "it just works" isn't a stretch.

Where people get burned

The main trap is conceptual: if you wire this up expecting the numbers to match what your sampler is actually processing, you'll be confused, because they won't - source and loaded diverge the moment you set target_fps or frame_load_cap. That's not a bug; it's the entire reason the pack has two nodes. Beyond that, the usual custom-node friction applies: the video socket refuses anything that isn't VHS_VIDEOINFO, so if you can't connect, you're missing Video Helper Suite or grabbing the wrong output. It's a young, zero-impression pack with no community threads behind it yet, but at this size there's genuinely not much to trip over.

CategoryVideoInfo

Inputs (1)

NameTypeDefaultDescription
videoVHS_VIDEOINFO

Outputs (4)

NameTypeDescription
fps🟡FLOAT
Frame_count🟡INT
width🟡INT
height🟡INT