Nodes/ComfyUI-ZhiHui/ℹ️ 智绘_视频信息提取
ComfyUI Node

ℹ️ 智绘_视频信息提取

Unpacking VIDEO_INFO into numbers you can actually use

By zhuyungen·Created 8 months ago·Updated 3 months ago· 0
ℹ️ 智绘_视频信息提取
  • video_info
  • 初始FPS
  • 初始帧数
  • 初始宽度
  • 初始高度
  • 时长(秒)
  • 当前FPS
  • 当前帧数

ZH_VideoInfoExtractor (ℹ️ 智绘_视频信息提取) does exactly one thing, and it's the kind of boring job that makes a workflow feel sane: it takes ComfyUI's opaque VIDEO_INFO blob and unpacks it into seven typed numbers you can read and wire into other nodes. That's it. No models, no magic, no output of its own.

You reach for it as a companion to the pack's ZH_BatchVideoLoader (🎬 智绘_批量视频加载器). That loader spits out a VIDEO_INFO dictionary as one of its outputs, and ComfyUI can't show you a dict or plug it into a math node. The extractor exists to fix that - pipe video_info in, and you get real FLOAT and INT ports out the other side.

The "初始" vs "当前" split is the whole game

The seven outputs look redundant at first, but they're really two columns. 初始 (initial) values describe the source file: 初始FPS (FLOAT), 初始帧数 (INT), 初始宽度 (INT), 初始高度 (INT), and 时长(秒) (FLOAT). The 当前 (current) values describe what the loader actually gave you after its frame-sampling settings did their work: 当前FPS (FLOAT) and 当前帧数 (INT).

That distinction is where the node earns its keep. The loader has knobs like frame_interval (take every Nth frame), skip_first_frames, frame_load_cap, and force_rate. So "current frame count" can be a third of "initial frame count" if you're skipping frames, and "current FPS" only differs from "initial FPS" when you forced a rate. Watch those two ports and you instantly know whether your sampling did what you thought it did - no guessing, no opening the file in a player.

Where do the numbers go? Wire 当前帧数 into a text/math node to label output, drive a loop count, or feed a downstream node that needs to know how many frames it's working with. Wire 当前FPS into your video saver's fps so the output plays at the same rate you loaded. The extractor is plumbing, but it's the plumbing that turns "trust me" into "check the numbers."

Installing it

Same story as the whole pack. In ComfyUI Manager, search "ComfyUI-ZhiHui" (the README suggests "智绘灵箱", the pack's Chinese name), or:

cd ComfyUI/custom_nodes
git clone https://github.com/zhuyungen/ComfyUI-ZhiHui.git

Restart ComfyUI. The nodes live under 智绘灵箱/视频 in the menu (search "智绘" or the English class name). No model files, no extra downloads - this node is pure Python.

The honest gotchas

  • It's useless without a VIDEO_INFO source. In this pack the only producer is ZH_BatchVideoLoader. Wire it to anything else and the port type won't match.
  • Missing keys silently become 0. The unpack uses .get(key, 0), so if a loader hands it an incomplete dict, you get zeros - which is one more reason to check the numbers against what you expect.
  • It's not an output node. It doesn't save anything and won't force execution by itself; it just sits in the graph being helpful.

Also worth knowing: this pack is a small Chinese utility collection (智绘灵箱, "ZhiHui toolbox") with display names in Chinese throughout. The README's feature list doesn't even mention the video section yet - it's newer, documented in the repo's DATONG_GUIDE.md. Community footprint is basically nil, which is fine for a utility node: the code is simple and readable if you want to verify what it does.

Category智绘灵箱/视频

Inputs (1)

NameTypeDefaultDescription
video_infoVIDEO_INFO

Outputs (7)

NameTypeDescription
初始FPSFLOAT
初始帧数INT
初始宽度INT
初始高度INT
时长(秒)FLOAT
当前FPSFLOAT
当前帧数INT