Nodes/ComfyUI S4Motion/đź’€Video Info
ComfyUI Node

đź’€Video Info

A tape measure for your video before you start messing with it

By S4MUEL-404·Created about a year ago·Updated 11 months ago· 4
đź’€Video Info
  • video
  • image
  • width
  • height
  • frame_count
  • duration
  • fps
  • info

Half of ComfyUI video pain is not knowing what's actually in the file you loaded. đź’€Video Info is the S4Motion node that answers that in one shot: dimensions, frame count, duration, and FPS, all as real outputs you can wire into other nodes instead of reading off the screen.

Feed it a video (VIDEO object from a loader) or an image (IMAGE sequence) and it reports six outputs:

  • width (INT) and height (INT) - resolution.
  • frame_count (INT) - total frames.
  • duration (FLOAT) - length in seconds.
  • fps (FLOAT) - frame rate.
  • info (STRING) - a human-readable summary, handy if you're debugging or logging.

The useful pattern is wiring these into your graph: feed width/height into a đź’€Video Resize target, frame_count into a đź’€Video Frames range, or fps into a save node that needs the frame rate. It's the "measure twice, cut once" node - one small utility that stops you guessing at a 512x512 crop when the source is actually 1440x1080.

Under the hood it decodes the video with OpenCV and reads the standard container properties (CAP_PROP_FRAME_WIDTH, CAP_PROP_FRAME_COUNT, CAP_PROP_FPS), then verifies by actually reading through the frames. It's honest, which is more than some loader nodes are - if the container's stored frame count disagrees with reality, it reports what it actually counted. That real count is the number to trust when you're slicing ranges in đź’€Video Frames.

Install

ComfyUI Manager → search "S4Motion" → install → restart, or:

cd ComfyUI/custom_nodes/
git clone https://github.com/S4MUEL-404/ComfyUI-S4Motion.git
pip install -r ComfyUI-S4Motion/requirements.txt

Gotchas

  • OpenCV required for VIDEO input. The recurring theme of this pack: no opencv-python installed, and connecting a video object raises "OpenCV is required for video processing but not available." IMAGE sequences are fine without it.
  • Reported fps can be 0 or odd on some containers - the node reads it from the file, it doesn't invent it. If you get a weird value, trust frame_count / duration instead, which you can compute from the other two outputs.
  • The info string is the whole summary as text - it's the fast way to check a clip without wiring up three number displays.

The pack has essentially no community presence (a reddit search for S4Motion comes back empty), so there's no folklore here - just a quiet, reliable little inspection node. Wire it up once at the head of your video graph and you'll stop guessing.

Categoryđź’€S4Motion

Inputs (2)

NameTypeDefaultDescription
videooptVIDEO—
imageoptIMAGE—

Outputs (6)

NameTypeDescription
widthINT—
heightINT—
frame_countINT—
durationFLOAT—
fpsFLOAT—
infoSTRING—