π₯ Compose Burn Subtitle
Subtitles inside the Compose chain, so one encode pays for everything
- overlays
- overlays
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#RRGGBBcolors, 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.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| srt_path | STRING | input/sample.srt | β |
| font | COMBO | (ζ .ttf / .otf / .ttc δΈι² plugin/font/ εΎιζ°ζ΄η) | 1 options: (ζ .ttf / .otf / .ttc δΈι² plugin/font/ εΎιζ°ζ΄η) |
| font_size | INT | 248β150 | β |
| font_color_hex | STRING | #FFFFFF | β |
| bold | BOOLEAN | true | β |
| italic | BOOLEAN | false | β |
| letter_spacing | FLOAT | 0.00β20 | β |
| outline_color_hex | STRING | #000000 | β |
| outline_width | INT | 20β10 | β |
| shadow_depth | INT | 10β10 | β |
| border_style | INT | 11β3 | β |
| back_color_hex | STRING | #000000 | β |
| alignment | COMBO | bottom_center (2) | 9 options: bottom_left (1), bottom_center (2), bottom_right (3), middle_left (4), middle_center (5), middle_right (6), +3 |
| margin_v | INT | 200β500 | β |
| margin_l | INT | 500β1000 | β |
| margin_r | INT | 500β1000 | β |
| overlaysopt | MF_COMPOSE_OPS | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| overlays | MF_COMPOSE_OPS | β |