VRGDG Latest SRT Auto Loader
Grab the newest subtitle file without touching a file picker
- srt_full_path
- srt_file_name
If you've ever rerun a music-video workflow and watched it choke because it was still pointing at yesterday's lyrics file, this node is the fix. VRGDG_LatestSRTAutoLoader scans the pack's output area and returns the path to the most recently written .srt file - no file picker, no hardcoded path, no "wait, which of these 40 subtitle files is the new one" guessing game.
An SRT is just a subtitle file: timestamped lines that say when each piece of text appears. In this pack's pipeline, transcription writes SRTs as an intermediate - lyrics get timestamped, and downstream nodes like VRGDG_LoadAudioSplit_SRTOnly use those timestamps to decide where scenes start and end. The whole point of an auto-loader is that a rerun should always pick up the latest transcription, even when the filename changes every run.
What it does
The node is deliberately dumb. It has two inputs that both do the same job - nudge it to rescan:
- trigger (
INT, default 0) - bump this and the node re-scans for the newest SRT. - refresh (
INT, default 0) - same idea; a second knob you can wire to something else if you want an automatic kick.
And two outputs:
- srt_full_path (
STRING) - the absolute path to the newest SRT file. - srt_file_name (
STRING) - just the filename, for when you want the name without the directory.
You wire srt_full_path into any node that takes a file path - in this pack, that's the srt_file input on VRGDG_LoadAudioSplit_SRTOnly. The splitter then reads the timestamps and slices the audio to match.
Why it earns its keep
Music-video runs are iterative. You transcribe, you generate scenes, you look at the result, you tweak, you rerun. Every one of those reruns could be working against a stale SRT if you had to pick the file by hand - and a scene split on wrong timestamps produces subtly broken sync that's a pain to diagnose. "Always use the newest file" removes a whole class of "why did it split there" bugs. It's the kind of automation you don't appreciate until the tenth run.
Installing it
It ships inside the comfyui-vrgamedevgirl pack. In ComfyUI Manager, search "vrgamedev" and install, then restart. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
then install the README's requirements (kornia, librosa, imageio) into your ComfyUI Python environment:
pip install -r custom_nodes/comfyui-vrgamedevgirl/requirements.txt
If it's not working
Two things to check. First: there has to be an SRT somewhere for it to find - if transcription hasn't run yet, or wrote to a different folder, the loader has nothing to return. Second: it grabs the most recently modified file, not the most recently transcribed one. If some other tool touched an old SRT afterward, the loader will confidently hand you the wrong one. If your scene splits look like they're synced to phantom lyrics, check which file this node resolved to before you blame the splitter.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| trigger | INT | 0-2147483648–2147483647 | — |
| refresh | INT | 00–2147483647 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| srt_full_path | STRING | — |
| srt_file_name | STRING | — |