Nodes/ComfyUI-xiaozhuguang/小珠光视频信息读取
ComfyUI Node

小珠光视频信息读取

Read a video's fps, frame count, and size as plain numbers

By xiaozhuguang·Created 2 months ago·Updated a day ago· 56
小珠光视频信息读取
  • video_info
  • 帧率
  • 帧数
  • 宽度
  • 高度
  • 名称
  • 跳过帧数

Video nodes in ComfyUI love to make you guess. You load a clip, and if you want its resolution or length as numbers you can actually wire somewhere - instead of eyeballing a preview - you need a metadata reader. XiaozhuguangVideoInfoReader (小珠光视频信息读取) is the pack's version: it takes the video info output from the pack's video loader and unpacks it into separate, typed outputs you can feed straight into resolution pickers, frame-count math, or naming logic.

Mechanically it's a pure unpacker. It reads the VHS_VIDEOINFO structure that the Xiaozhuguang video loader emits (same data type the VHS/video-helper packs use, so this slots into familiar territory), pulls the fps, frame count, width, and height, and hands each out on its own socket. The important subtlety: it reads the loaded values - the fps/frames/dimensions after the loader applied your frame cap and skip settings, not the raw source file. So if you loaded a 3000-frame video with a 1000-frame cap, this node tells you 1000. That's the number downstream math actually needs. (The README notes the raw source can differ; for the loaded frame count this node is authoritative.)

The sixth output is the pack's addition: skip_frames. When your loader skipped the first N frames, this reports N, so downstream nodes can align to "the first frame actually loaded" instead of frame 0 of the source. If an old loader didn't record it, it safely falls back to 0.

Inputs and outputs:

  • video_info - the one input: the video info from the Xiaozhuguang video loader (VHS_VIDEOINFO).
  • 帧率 (fps) - FLOAT.
  • 帧数 (frame count) - INT, the loaded frame count.
  • 宽度 (width) - INT.
  • 高度 (height) - INT.
  • 名称 (name) - STRING, the source filename.
  • 跳过帧数 (skip frames) - INT, how many leading frames were skipped.

The classic pattern this enables: wire 帧率 into your video combine node's frame-rate setting so the output plays at the same speed as the input, wire 宽度/高度 into an upscale or resolution node, and wire 帧数 into a frame-extraction count. It's the "one source, many consumers" pattern from the plumbing KB applied to video metadata - the loader says it once, and every downstream reads the same numbers instead of retyping them.

The honest note: this node is only useful with the pack's video loader - the input type is that loader's own info structure, so there's no point wiring it to a random video source. If you live in the Xiaozhuguang video ecosystem, it's the small node that keeps your video math honest. Install: ComfyUI Manager → ComfyUI-xiaozhuguang → restart, or git clone into custom_nodes. No models, no dependencies.

Categoryxiaozhuguang

Inputs (1)

NameTypeDefaultDescription
video_infoVHS_VIDEOINFO

Outputs (6)

NameTypeDescription
帧率FLOAT
帧数INT
宽度INT
高度INT
名称STRING
跳过帧数INT