Nodes/MediaForge/🔥 Compose Burn Subtitle
ComfyUI Node

🔥 Compose Burn Subtitle

Subtitles inside the Compose chain, so one encode pays for everything

By leon80148·Created 6 months ago·Updated about 17 hours ago· 0
🔥 Compose Burn Subtitle
  • overlays
  • overlays
◄srt_pathinput/sample.srt►
◄font(把 .ttf / .otf / .ttc 丟進 plugin/font/ 後重新整理)►
◄font_size24►
◄font_color_hex#FFFFFF►
◄boldtrue►
◄italicfalse►
◄letter_spacing0.0►
◄outline_color_hex#000000►
◄outline_width2►
◄shadow_depth1►
◄border_style1►
◄back_color_hex#000000►
◄alignmentbottom_center (2)►
◄margin_v20►
◄margin_l50►
◄margin_r50►

MF_ComposeBurnSubtitle is MF_BurnSubtitle's in-chain sibling: instead of burning subtitles in its own one-shot encode, it appends a subtitle op to the Compose overlay chain so MF_ComposeVideo can burn subtitles and your watermark and your intro text in a single pass. Stack them all and you still pay exactly one decode and one encode.

That's the whole pitch, and it's worth understanding before you use it: the standalone MF_BurnSubtitle re-encodes your video by itself, so if you then run the output through Compose for a watermark, that's a second encode. Chained correctly, this node makes the "watermark + subtitle + BGM" workflow a single generation instead of three. If subtitles are your only effect, the standalone node is simpler - this one exists for when subtitle isn't the whole job.

How it works

It builds an ASS-styled subtitles filter op and appends it to the MF_COMPOSE_OPS chain (the same wire type as MF_ComposeOverlayText and MF_ComposeWatermark). The overlay list order is z-order, so a subtitle node chained after a watermark sits on top of it. MF_ComposeVideo compiles the whole chain into one filter_complex graph and encodes once. Like its sibling, it reads fonts from the plugin's font/ directory and uses fontTools to resolve family names.

The widget set is the same ASS styling as MF_BurnSubtitle - font_size, font_color_hex, bold/italic, outline_width/outline_color_hex, shadow_depth, border_style (1 = outline+shadow, 3 = opaque box), alignment (9 numpad positions), and the margin_v/margin_l/margin_r layout controls. The one thing that's deliberately not here is the encoder controls - codec, crf, preset - because those live on MF_ComposeVideo, where the one encode happens.

The inputs that matter

  • srt_path - your UTF-8 SRT.
  • font_size, font_color_hex, outline_width - the styling trio you'll actually tune. Hex #RRGGBB colors, black outline at width 2 as the baseline.
  • alignment / margin_v - placement. bottom_center (2) with a 20px vertical margin is the default and it's a good one.

Optional overlays input chains the previous overlay node in; leave it unwired to start a fresh chain. Output is overlays (MF_COMPOSE_OPS) → wire into the next overlay or into MF_ComposeVideo.

Install

Part of the MediaForge pack:

cd ComfyUI/custom_nodes
git clone https://github.com/leon80148/comfyui_MediaForge.git
# restart ComfyUI

Or ComfyUI Manager → "MediaForge". No extra deps beyond what the pack's requirements.txt installs (fontTools, ffmpeg fallbacks).

Common issues

The same font gotcha as MF_BurnSubtitle: empty font dropdown = no fonts in <plugin>/font/. And remember this node emits no video itself - if you wire its output nowhere, nothing renders. It has to reach MF_ComposeVideo (through however many intermediate overlay nodes) to matter. Paths with filter-special characters (: [ ] ' , ;) are auto-escaped by the pack, but if you hit a filter syntax error and you have such characters in the SRT path, that's the prime suspect.

CategoryMediaForge/Compose

Inputs (17)

NameTypeDefaultDescription
srt_pathSTRINGinput/sample.srt—
fontCOMBO(把 .ttf / .otf / .ttc 丟進 plugin/font/ 後重新整理)1 options: (把 .ttf / .otf / .ttc 丟進 plugin/font/ 後重新整理)
font_sizeINT248–150—
font_color_hexSTRING#FFFFFF—
boldBOOLEANtrue—
italicBOOLEANfalse—
letter_spacingFLOAT0.00–20—
outline_color_hexSTRING#000000—
outline_widthINT20–10—
shadow_depthINT10–10—
border_styleINT11–3—
back_color_hexSTRING#000000—
alignmentCOMBObottom_center (2)9 options: bottom_left (1), bottom_center (2), bottom_right (3), middle_left (4), middle_center (5), middle_right (6), +3
margin_vINT200–500—
margin_lINT500–1000—
margin_rINT500–1000—
overlaysoptMF_COMPOSE_OPS—

Outputs (1)

NameTypeDescription
overlaysMF_COMPOSE_OPS—