Nodes/ComfyUI_CineStyle/CS Video Subtitle
ComfyUI Node

CS Video Subtitle

Burn real SRT subtitles onto video, with a timeline editor to match

By chflame163·Created 11 days ago·Updated a day ago· 49
CS Video Subtitle
  • video
  • video
  • SRT
preview_in0
preview_out-1
font
font_size36
primary_color#FFFFFF
secondary_color#FF0000
gradientfalse
text_aligncenter
italicfalse
letter_spacing0
position_x0.50
position_y0.88
outline_size2
outline_color#000000
shadow_size3
shadow_color#000000
srt
edited_srt

CS Video Subtitle is the delivery step your video workflow is missing. ComfyUI is great at generating frames and terrible at the last-mile stuff - and subtitles are squarely in that bucket. This node takes a standard ComfyUI VIDEO, burns an SRT subtitle track onto it, and hands back a new VIDEO with the same frame rate, audio, and time range intact. It also ships a full interactive timeline editor, which is a lot more than you'd expect from a subtitle node in a node graph. Pair it with CS MOSS Audio Transcribe and you get a two-node pipeline from raw audio to subtitled video, entirely offline.

How it works

You feed it a VIDEO and an SRT string. Fonts come from ComfyUI/models/fonts (drop a .ttf or .otf in there and it appears in the font dropdown). Each frame gets the active subtitle cues rendered onto it - the rendering is Pillow/FreeType under the hood, batched across frames on the GPU so a long clip doesn't take forever. Because it operates on the standard VIDEO value rather than re-encoding from scratch, it preserves the input's fps, audio, and duration. You get two outputs: the burned video, and the srt the node actually used, so you can feed the final text elsewhere.

The subtitles themselves are fully stylable - this isn't the burned-in white text of a budget encoder. Font, size (8–200), primary color plus an optional vertical gradient secondary color, alignment, italics, letter spacing, outline with color, shadow with color, and normalized X/Y position (0–1 coordinates, so 0.5/0.88 is the classic bottom-center). preview_in and preview_out just define the frame range the timeline editor shows.

The Edit Timeline window

Click Edit Timeline and you get a proper little editor: a video preview, a subtitle track alongside an audio waveform track, and the ability to drag subtitle segments to retime them, double-click to edit text, and add/remove cues. You can drag the subtitle text directly on the preview frame to reposition it, and a style panel handles font, colors, stroke, and shadow. Apply writes everything back to the node. It's the kind of UI you'd expect to have to leave ComfyUI for, and here it is attached to a node.

The gotchas that will bite you

Install is the shared pack drill: ComfyUI Manager, search "ComfyUI_CineStyle", or cd ComfyUI/custom_nodes && git clone https://github.com/chflame163/ComfyUI_CineStyle, restart, then look under 😺dzNodes/CineStyle/Video. It's a V3-schema pack, so update ComfyUI if the node doesn't show up. But the real traps are behavioral:

  • The srt input silently wins. The README says it straight: if srt is connected, it takes priority over anything you edited in the timeline. If you've carefully timed subtitles in the editor and the node still renders the old text, it's because a stale srt is still connected. To force your edits, disconnect the srt input - the node then falls back to edited_srt, the version saved from the timeline.
  • No fonts, no preview. If ComfyUI/models/fonts is empty, the renderer falls back to Pillow's default bitmap font, which looks like it belongs on a VHS rip. Drop a real font in there - and note the dropdown is scanned at load, so new fonts need a refresh or restart to appear.
  • Runtime-generated video needs a warm-up run. If your video comes from a generation node rather than a loader, run the workflow once before opening the timeline, so the preview cache exists. Same pattern as the rest of this pack.

It's a brand-new pack, so there's no community lore to lean on yet - but the node is one of the few places in ComfyUI where the "AI video isn't finished" problem has a direct, in-graph answer. If you ship videos, this is worth a look.

Category😺dzNodes/CineStyle/Video

Inputs (19)

NameTypeDefaultDescription
videoVIDEOConnect any compatible VIDEO output.
preview_inINT00–10000000
preview_outINT-1-1–10000000
fontCOMBO1 options:
font_sizeINT368–200
primary_colorSTRING#FFFFFF
secondary_colorSTRING#FF0000
gradientBOOLEANfalse
text_alignCOMBOcenter3 options: left, center, right
italicBOOLEANfalse
letter_spacingINT0-10–50
position_xFLOAT0.500–1
position_yFLOAT0.880–1
outline_sizeINT20–20
outline_colorSTRING#000000
shadow_sizeINT30–20
shadow_colorSTRING#000000
srtoptSTRINGOptional STRING input containing valid SRT cues. When connected, this input takes priority over edited_srt.
edited_srtoptSTRINGPersisted SRT text edited in Edit Timeline. Used when the optional srt input is not connected.

Outputs (2)

NameTypeDescription
videoVIDEO
SRTSTRING