Nodes/S42 CutFlow/💬 S42 CutFlow Subtitle Burn
ComfyUI Node

💬 S42 CutFlow Subtitle Burn

Burn real SRT subtitles onto your video, styled and on time

By GeekyGhost·Created 6 months ago·Updated 4 months ago· 3
💬 S42 CutFlow Subtitle Burn
  • clip
  • clip
  • frame_count
  • info
srt_text1 00:00:00,000 --> 00:00:02,000 Hello World 2 00:00:02,500 --> 00:00:05,000 Subtitle Example
fps24.0
font_size36
styledefault
position_y0.90

If your video is headed to social media, subtitles are non-negotiable - and they have to be burned in, because most platforms strip subtitle tracks or auto-close-caption over your visuals. S42CF_SubtitleBurn takes actual SRT-format text, converts each cue's timestamps to frame indices at your fps, and renders each subtitle onto the right frames with a choice of styles. It's the "hard subtitles" node of GeekyGhost's S42 CutFlow suite, and it handles the timing correctly, which is the part that usually goes wrong when people roll their own.

The inputs that matter

  • clip - your footage.
  • srt_text (multiline string) - standard SRT format, pasted right in. The default shows the shape: an index line, a start --> end timestamp line with millisecond precision, the text, a blank line, repeat:
    1
    00:00:00,000 --> 00:00:02,000
    Hello World
    
    2
    00:00:02,500 --> 00:00:05,000
    Subtitle Example
    
  • fps (float, default 24) - how SRT timestamps become frame indices. Match this to your actual clip's frame rate or every subtitle lands slightly off.
  • font_size (int, 12–200, default 36) - subtitle size.
  • style - four presets that cover the spectrum: default (white text, black outline - the universally readable look), cinematic (white text with a soft dark shadow, larger - film/TV), youtube (white on a semi-transparent black box - the platform standard), and outline_only (thick black outline with no fill - the bold graphic look).
  • position_y (float, 0–1, default 0.9) - vertical position. 0.9 puts the text near the bottom, clear of platform UI (like TikTok's caption area, which is a real consideration); 0.1 puts it near the top.

How it works

Each frame, it computes the current time (frame_index / fps) and finds the active subtitle cue; if one is active, it renders that text onto an RGBA overlay with the style's fill/stroke/shadow/background settings and composites it. Empty frames pass through untouched, so unsubtitled segments cost almost nothing. Outputs: clip (the burned IMAGE batch), frame_count, and info (which reports how many cues it parsed - a useful sanity check that your SRT didn't silently fail to parse).

Installing it

Same one-time pack install:

cd ComfyUI/custom_nodes/
git clone https://github.com/GeekyGhost/S42-CutFlow.git
pip install -r S42-CutFlow/requirements.txt   # Windows portable: python_embeded\python.exe -m pip

Or ComfyUI Manager, search S42 CutFlow, install, restart. It's under S42 CutFlow/Text.

Gotchas

The traps are all about timing and format. First, fps mismatch is the #1 failure - if your clip is 30fps and you leave fps at 24, every subtitle drifts later as the video plays. Set it to your actual rate. Second, malformed SRT: a missing blank line between cues or a comma where there should be a period (the 00:00:02,500 uses a comma for milliseconds - that's correct SRT, don't "fix" it to a dot) and the parser may skip cues; the info cue count is how you'd notice. Third, burning is permanent - there's no "unburn." Keep the original clip around, or branch: one output with subtitles for social, one without for archival. And a genuinely useful pattern: wire this after your color grade and text overlays but before the final resize, so subtitles render at the deliverable's actual resolution and stay crisp.

CategoryS42 CutFlow/Text

Inputs (6)

NameTypeDefaultDescription
clipIMAGEVideo clip to burn subtitles onto.
srt_textSTRING1 00:00:00,000 --> 00:00:02,000 Hello World 2 00:00:02,500 --> 00:00:05,000 Subtitle ExampleSRT format subtitle text. Standard format: 1 00:00:00,000 --> 00:00:02,000 Text here
fpsFLOAT24.01–120Frame rate to convert SRT timestamps to frame indices.
font_sizeINT3612–200Subtitle font size.
styleCOMBOdefault'default' = white text, black outline. 'cinematic' = white text, dark shadow, larger. 'youtube' = white on semi-transparent black box. 'outline_only' = thick black outline, no fill background.
position_yFLOAT0.900–1Vertical position. 0.9 = near bottom (standard). 0.1 = near top.

Outputs (3)

NameTypeDescription
clipIMAGE
frame_countINT
infoSTRING