Boyo Video Length Calculator
How Many Frames Is 30 Seconds of Chunked Video? This Node Knows
- total_frames
- loops_needed
- trim_positions
- info
Here's the math problem that drives chunked video people quietly insane: if each loop pass generates ~94 frames and 13 of those are overlap frames you'll trim later, how many frames does a 30-second video need - and where exactly are the seams? BoyoVideoLengthCalculator is the node that answers it from a hardcoded lookup table. One input, target_seconds (5 to 60, in 5-second steps), and four outputs: total_frames, loops_needed, trim_positions, and an info summary string.
Why it's a lookup table instead of a formula
The table is tuned to a specific generation profile: 94 frames per loop chunk, of which 13 are overlap frames that get cut at each junction - leaving ~81 clean frames per 5-second segment. If that sounds like the Wan 81-frame chunk at 16 fps, you've got it exactly. Because the author validated these numbers against real renders, the table encodes the measured reality (which junctions need 13 frames cut, how the frame count compounds) rather than a clean formula that drifts from reality. You get values like:
5s→ 94 total frames, no trims10s→ 188 frames, 1 junction trim (94,95,...,106)30s→ 564 frames, 5 junction trims
The trim_positions output is a pipe-separated string of comma-separated indices - designed to plug straight into BoyoVideoCutter, which strips those exact frames.
The outputs
total_frames- frames to generate across all loops.loops_needed-target_seconds // 5(each loop is a 5-second chunk).trim_positions- the junction frames to remove; feed to BoyoVideoCutter.info- a one-line human summary, handy for logging.
Where it fits
It's the planning node of the pack's looped-video stack. Typical wiring: this node's total_frames sets your total generation target, loops_needed configures your loop count, trim_positions feeds BoyoVideoCutter, and BoyoOverlapSwitch handles the overlap value at each pass. All the numbers stay in sync because they come from the same table.
Installing it
Ships with Boyonodes (DragonDiffusionbyBoyo):
cd ComfyUI/custom_nodes
git clone https://github.com/DragonDiffusionbyBoyo/Boyonodes
Restart ComfyUI or install "Boyonodes" via ComfyUI Manager. No extra dependencies.
Gotchas
- It's tuned to one profile. If you change fps, chunk size, or overlap, the table's numbers stop being right. The author's defaults (16 fps, 94-frame chunks, 13-frame overlap) are baked into every row.
- Inputs outside 5–60 in 5-second steps return an error string rather than clamping - a
target_secondsof 33 gives you zeros and an error message. - It answers "for this hardcoded pipeline, how many frames" - not a general video-math calculator.
Narrow, but it's the narrowness that makes it trustworthy: one profile, validated numbers, no surprises. If you're running the pack's chunked-video stack, this is the node that keeps every other number honest.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| target_seconds | INT | 55–60 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| total_frames | INT | — |
| loops_needed | INT | — |
| trim_positions | STRING | — |
| info | STRING | — |