VRGDG_TrimImageBatch_SRTOnly
Slice frames to match your subtitles, so the lipsync actually lines up
- images
- images
VRGDG_TrimImageBatch_SRTOnly is the version of the scene trimmer that cares about when things happen, not just how many frames you're slicing. If your workflow syncs scenes to subtitles or lyrics - and a music video absolutely does - fixed frames_per_scene math falls apart the moment a line runs long or a chorus hits early. This node slices your frame batch using SRT timing instead.
"SRTOnly" tells you exactly where it fits: it's the sibling of VRGDG_TrimImageBatch, meant for the path where the song's transcript (the SRT sidecar) defines the scenes. The pack's whole music video premise is "upload audio with lyric syncing, everything else runs automatically" - this node is part of that automation, turning lyric timings into frame ranges the video model can actually chew on.
How it works
Five inputs, one output:
images- the full frame batch.frames_per_scene- the base chunk length, used as the fallback/default when timing data doesn't apply cleanly.pre_frames- leading frames kept before the chunk, so each scene starts with a little context instead of cold. Same idea aspreroll_frameson the sibling node, named differently.chunk_index- which scene you're extracting.fps(default 25) - the crucial addition. This node converts SRT timestamps (which live in seconds) into frame indices using the frame rate, so "00:00:04,200" becomes a specific frame. Set this to your actual output frame rate.images(output) - the trimmed batch for the selected scene, ready for sampling.
The fps input is the tell. A plain frame-count trimmer doesn't need it; a node that respects subtitle timing does, because timestamps only mean something once you know how many frames per second you're working with.
Installing it
Part of the VRGameDevGirl Video Enhancement Nodes pack. ComfyUI Manager → search vrgamedev → install, then restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
No extra models. Pure frame-slicing logic.
Common issues
Scenes drift out of sync with the lyrics. First suspect is fps. If your video is 24 fps and this node is at the default 25, every second of SRT time maps to the wrong number of frames, and the drift compounds scene after scene. Set it to match your render pipeline exactly.
pre_frames vs the sibling's preroll_frames. They're the same concept, differently named. If you're porting a workflow between the two nodes, don't go hunting for a third field - the SRT variant just calls it pre_frames.
Chunks come out empty. Same out-of-range trap as its sibling: if chunk_index points past the data, you get nothing. Check the total against your SRT's scene count.
For a lyrics-synced video, this is the node that makes the difference between a music video and a slideshow with a soundtrack. Get fps right and the whole timeline stays honest.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| frames_per_scene | INT | — | |
| pre_frames | INT | — | |
| chunk_index | INT | — | |
| fps | INT | 25 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |