Nodes/arkennemasis Nodes/arkennemasis Narration Length (fit the shot to the voice)
ComfyUI Node

arkennemasis Narration Length (fit the shot to the voice)

The shot length that exactly covers the voice-over

By Hishamahmer·Created 2 months ago·Updated 8 days ago· 9
arkennemasis Narration Length (fit the shot to the voice)
  • narration
  • length
  • seconds
  • report
  • seconds_int
tail_seconds0.75
max_seconds15.0
lock_seconds0.0

ArkNarrationLength is the "fit the shot to the voice" node of the arkennemasis video chain. It measures a rendered narration clip and returns the shot length that covers it, snapped to MiniMax H3's frame grid. You wire it between the TTS node and the scene node, and suddenly every shot outlasts its own voice-over instead of the dub hanging on a frozen frame over the tail of a line it never finished.

This is one of those problems you only notice after you've rendered a few narrated films: the narration is 4.7 seconds, the shot is 3 seconds, and the model can't extend it, so the last word plays over a frozen frame that reads as a mistake. This node computes the number in advance, from the actual audio, so the shot is designed to cover the line.

How it works

It measures the narration's waveform - narration["waveform"] over sample_rate gives the spoken duration - then adds your tail_seconds (default 0.75) of picture held after the last word. The tooltip's framing is the editing lesson: cutting on the syllable reads as a mistake; a beat reads as editing. Then it snaps the result to H3's frame grid (the 17k+5 grid the model samples on) and clamps to max_seconds (default 15, hard ceiling 15.1 - H3 cannot exceed about 15.1s in one shot, so a longer narration must be shortened in the brief or split across two scenes).

There's a genuinely honest edge case built in: if the narration can't fit, it says so in the report - "X seconds of speech cannot fit in one H3 shot - shorten this scene's voiceText or split the scene" - rather than silently returning a length that freezes over the difference.

The optional lock_seconds input is the even-pacing mode: set it above 0 and every shot runs that long regardless of what's said, still snapped to the frame grid (10s becomes 10.12s). It still measures the narration, because a line that overruns a locked shot is exactly the thing the operator needs told - the report warns you, and it even tells you roughly how many words the locked length can carry (about 2 words per second).

The outputs

Four of them, and the fourth is the detail that makes this node play nice with the ecosystem:

  • length - INT frames, for H3 (which wants FRAMES on its grid).
  • seconds - FLOAT seconds.
  • report - the human-readable math.
  • seconds_int - INT seconds.

Why both a FLOAT and an INT seconds output? Because different video models disagree about how a shot is measured - the source comment is explicit: MiniMax H3 wants frames on its 17k+5 grid, LTX-2.5 wants whole seconds, and a FLOAT will not connect to an INT socket. The node covers both worlds rather than making you reach for a round-to-int node.

Installing

It's part of comfyui-arkennemasis:

cd ComfyUI/custom_nodes
git clone https://github.com/Hishamahmer/comfyui-arkennemasis
pip install replicate httpx

restart, under arkennemasis/Video. No models, no API calls - it's waveform math plus frame-grid snapping, so it runs instantly.

The realistic advice: wire it and leave the defaults. tail_seconds at 0.75 and max_seconds at 15 are sane for H3; the only dial you'll actually touch is lock_seconds when you want even pacing, and the report will tell you if your script is too long for it. If you're building the narration first, this is the node that turns "write a 60-word brief" from a guess into a number you can design the scene around.

Categoryarkennemasis/Video

Inputs (4)

NameTypeDefaultDescription
narrationAUDIOThe rendered voice-over for THIS scene.
tail_secondsFLOAT0.750–5Picture held after the last word. Cutting on the syllable reads as a mistake; a beat reads as editing.
max_secondsoptFLOAT15.05.2–15.1Hard ceiling. MiniMax H3 cannot exceed about 15.1 s in one shot, so a longer narration has to be shortened in the brief or split across two scenes.
lock_secondsoptFLOAT0.00–15.10 = fit each shot to its own narration. Above 0, EVERY shot runs this long regardless of what is said — even pacing, at the cost of holding a frame under a short line. The value still snaps to H3's frame grid, so 10 s becomes 10.12 s. Keep the brief's word count under about 2 words per second of the locked length, or the voice will outrun the picture.

Outputs (4)

NameTypeDescription
lengthINT
secondsFLOAT
reportSTRING
seconds_intINT