VRGDG_LyricSegmentDurationMerger
Glue SRT timings onto your lyric segments so scenes stay in sync
- merged_text
- merged_json
- segment_count
- duration_count
VRGDG_LyricSegmentDurationMerger is the sync layer in the music-video workflow: it takes lyric segments on one side and SRT timing on the other and merges them into one set of timed segments. If you've ever had a music video where the visuals drift out of sync with the singing, this is the node that's supposed to stop that from happening.
It exists because the pipeline produces two separate things that have to agree. The lyrics extractor (or the LLM scene writer) produces segments - "these lines belong to scene 3." The SRT file produces durations - "these lines are sung from 0:12 to 0:17." Before you can feed a scene to a video model, those need to be one structure. This node does the merge and, importantly, tells you when it didn't work.
The inputs that matter
- srt_text - the raw SRT content, pasted in as multiline text. Not a path - the text itself.
- segments_json - the lyric segments to merge, as JSON (default
{}). This is what the lyrics extractor or prompt batching produces. - strict_count_match - true by default. If the number of segments doesn't equal the number of durations, the node treats it as an error instead of silently guessing. That's a feature: a mismatch means your SRT and your segments disagree, and you want to know.
- use_srt_durations - true by default. Trust the SRT's own timings over any computed ones. Turn it off only if you have a reason to.
- decimal_places - how many decimal places on the output timestamps, 0–6, default 3. Frames and video timing care about precision here.
Outputs: merged_text (the combined, timed result as text), merged_json (the same as structured JSON - this is what you wire into the prompt/scene stages), plus segment_count and duration_count so you can see at a glance whether the two sides matched.
The mechanism, briefly
A merge node is a lookup-and-combine: each lyric segment gets matched to its SRT duration and stamped with start/end times, producing one coherent timeline. The interesting engineering is the honesty - strict_count_match means the node would rather fail loudly than produce a silently broken sync, which is the right call for a workflow where "close enough" timings make a whole video look amateur.
Setup and gotchas
Same shared pack:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
or Manager → search "vrgamedev", restart.
The failure mode to expect is the one the node itself is designed to catch: strict_count_match firing because your SRT has more cues than your segment list (or vice versa). Fix the source, don't flip the toggle - set it to false and you're back to guessing, which is exactly what this node exists to prevent. And remember srt_text wants the file contents, not a path; pasting C:\song.srt instead of the SRT body is the most common beginner stumble. Mind those two and the sync just works.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| srt_text | STRING | — | |
| segments_json | STRING | {} | — |
| strict_count_match | BOOLEAN | true | — |
| decimal_places | INT | 30–6 | — |
| use_srt_durations | BOOLEAN | true | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| merged_text | STRING | — |
| merged_json | JSON | — |
| segment_count | INT | — |
| duration_count | INT | — |