Nodes/comfyui-magic-hour/Magic Hour: Auto Subtitle Generator
ComfyUI Node

Magic Hour: Auto Subtitle Generator

Magic Hour: Auto Subtitle Generator

By magichourhq·Created about 17 hours ago·Updated about 16 hours ago· 0
Magic Hour: Auto Subtitle Generator
  • video
  • video
  • video_path
  • credits_charged
◄templatehighlight►
◄start_seconds0.0►
◄end_seconds0.0►

Subtitle burning is the least glamorous step in any video pipeline and the one people most reliably do in a separate app. This node is the shortcut: VIDEO in, captioned VIDEO out, no ffmpeg command to remember and no subtitle file to name.

What it is

An API wrapper - as is everything in this pack - around Magic Hour's auto-subtitle tool. The video gets uploaded, transcribed and captioned on their servers, and the finished file comes back into ComfyUI/output/magic_hour/. No local Whisper, no ASR model, no timestamp juggling. It also means the audio track of your clip is going to a third party, which matters more here than in most of these nodes because captioning requires them to listen to it.

For anything you're going to publish, that's usually acceptable. For an unreleased client call recording, think twice.

How it works

The node writes your VIDEO input to a temp MP4 via save_to, uploads it, posts the caption job with your chosen template, and waits. Transcription, timing, word styling and the burn-in all happen remotely. What comes back is a re-encoded MP4 with the text already rendered into the frames - not an SRT you can edit. That's the important shape of it: this node does not give you a subtitle track you can tweak afterwards. If you need editable captions, this isn't the tool.

Inputs

video is the whole input surface, plus the window. Wire it from a Load Video, a Video Combine, or the video output of another Magic Hour node in the same graph - chaining Lip Sync into Auto Subtitles is the obvious one, and it works because both speak VIDEO.

template is the only real creative choice, and it's a four-way pick: cinematic, highlight, karaoke, minimalist. highlight is the default and the right first try - it's the style built around emphasising a few words per line rather than paragraphs, which is what every short-form platform trained viewers to expect. karaoke is word-by-word timing and only makes sense over music or a smooth read. minimalist is small type, no boxes, no emphasis - the one that doesn't fight a busy frame. cinematic is the letterboxed, subtitle-track look for long-form.

start_seconds and end_seconds carve out a window of the clip. Leave end_seconds at 0 and it captions to the end of the file, which is what you want nine times out of ten. Set it explicitly if you only need a section captioned - useful for keeping cost down on a long render, or when the captions are only needed for the part with dialogue in it.

Outputs

video is the captioned file as a proper VIDEO - wire it into Save Video and you're done. video_path gives you the same file as a STRING, which is what you'd feed a Text node that logs the path, or a workflow that hands files to some downstream tool. credits_charged is an INT reporting exactly what the run cost, and it's the field that tells you the truth about how subtitle pricing scales with clip length.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/magichourhq/comfyui-magic-hour
pip install -r comfyui-magic-hour/requirements.txt

Restart, and the nodes land under Magic Hour. The pack's dependency list is one line - magic-hour>=0.87.1 - so there's no model to place in models/ and nothing to configure beyond the key. ComfyUI Manager users can search "Magic Hour" instead.

The key lives outside the workflow on purpose:

export MAGIC_HOUR_API_KEY=your_key_here

before you launch ComfyUI, or put the bare key in comfyui-magic-hour/api_key.txt. Node widgets are serialised into the saved workflow, so a key typed into a field would ship with every graph you share.

Where it bites

  • Captions on the wrong words. The API transcribes what it hears; a music bed over quiet speech will produce nonsense. If you control the mix upstream, bring the dialogue up before you send it.
  • You wanted the SRT. You don't get one. This bakes text into pixels. Plan accordingly - if you need captions as a separate file for a platform upload, you're in the wrong node.
  • The whole queue stalls. Video jobs take tens of seconds to several minutes and the node waits synchronously, like every other node in this pack.
  • 402 on a long clip. Credits or plan limit. Captioning a five-minute file costs more than a fifteen-second one; short test first, then the real thing.

The pragmatic workflow: render your clip in the graph, run it through this node last, check credits_charged, and only then decide whether burning captions in a dedicated editor is worth the extra step for your particular project. For short-form, it usually isn't.

CategoryMagic Hour

Inputs (4)

NameTypeDefaultDescription
videoVIDEO—
templateCOMBOhighlight4 options: cinematic, highlight, karaoke, minimalist
start_secondsFLOAT0.00–3600—
end_secondsFLOAT0.00–36000 = to the end of the clip

Outputs (3)

NameTypeDescription
videoVIDEO—
video_pathSTRING—
credits_chargedINT—