Nodes/comfyui-timesaver/TS Video Info
ComfyUI Node

TS Video Info

Turn video_info into numbers you can actually route on

By AlexYez·Created 2 years ago·Updated about 22 hours ago· 12
TS Video Info
  • video_info
  • fps
  • frame_count
  • duration
  • width
  • height
  • source_fps
  • source_frame_count
  • source_duration
  • source_width
  • source_height
  • has_audio
  • has_alpha
  • summary

Video loaders tend to hand you one fat bundle of metadata instead of fifteen sockets nobody connects at once. The loader in this pack outputs a compact video_info object - and TS Video Info is the small companion that unpacks it into plain, wireable numbers. It's a pure utility node, the kind ComfyUI is built out of: nothing in, nothing transformed, just a bundle on one side and thirteen numbers on the other.

The distinction that matters

The outputs come in two families, and confusing them is the one real trap here. There's what was actually loaded - after trimming, resampling and resizing - and there's what the source file is. The node gives you both, and they're different on purpose:

  • fps, frame_count, duration, width, height - the clip as loaded. frame_count is how many frames you actually got, duration is the length of the selection in seconds, and width/height are the dimensions after resizing.
  • source_fps, source_frame_count, source_duration, source_width, source_height - the file as it exists on disk. source_frame_count is frames in the whole file, even the part you trimmed away.

Why both? Because routing logic wants the loaded numbers (how many frames am I really feeding this sampler?) and debugging wants the source numbers (did the loader actually pick up the 23.976 source, or did something resample it to 24?). Getting them mixed up produces exactly the kind of silent off-by-a-little bug that costs an afternoon.

The rest of the outputs are the useful booleans and the summary: has_audio (does the file carry an audio track), has_alpha (does it carry transparency), and summary - a one-line description of the clip, handy for note nodes and debugging without counting sockets.

Compatibility worth knowing

The single input, video_info, accepts the bundle from TS Video Loader and a VHS_VIDEOINFO bundle from the popular Video Helper Suite. So if you're migrating a workflow that already uses Video Helper Suite's loader, you can slot this node in to unpack its metadata without rewiring everything. Same shape, same outputs.

Wiring it

Each output is a plain typed value - FLOAT for fps/durations, INT for counts and sizes, BOOLEAN for the flags, STRING for the summary. Wire them anywhere numbers are consumed: a has_audio boolean into a switch to pick the audio branch, frame_count into a math node to compute batch passes, fps into a saver so the output matches the input. For a node with thirteen outputs, most of them are "only wire what you need."

Installing it

Part of comfyui-timesaver: ComfyUI Manager → search Timesaver, or

cd ComfyUI/custom_nodes
git clone https://github.com/AlexYez/comfyui-timesaver
cd comfyui-timesaver
python -m pip install -r requirements.txt

then restart ComfyUI.

Gotchas

The only real one is the loaded-vs-source confusion above - read the tooltips, they say it plainly. And a genuine nothing-burger that nevertheless surprises people: this node does no decoding of its own. It reads the bundle that was already built, so it's effectively free to run. If you need the frame numbers before you decide whether to run a heavy branch, this is the cheapest way to get them.

CategoryTS/Video

Inputs (1)

NameTypeDefaultDescription
video_infoTS_VIDEO_INFO,VHS_VIDEOINFOBundle from TS Video Loader. A VHS_VIDEOINFO bundle from Video Helper Suite works as well.

Outputs (13)

NameTypeDescription
fpsFLOATFrame rate of the loaded clip.
frame_countINTHow many frames were actually loaded.
durationFLOATLength of the loaded clip, in seconds.
widthINTWidth after resizing.
heightINTHeight after resizing.
source_fpsFLOATFrame rate as stored in the file.
source_frame_countINTFrames in the whole file.
source_durationFLOATLength of the whole file, in seconds.
source_widthINTWidth in the file.
source_heightINTHeight in the file.
has_audioBOOLEANWhether the file carries an audio track.
has_alphaBOOLEANWhether the file carries transparency.
summarySTRINGOne line describing the clip, for notes and debugging.