Nodes/MediaKit Toolkit/OCR · 视频识别字幕
ComfyUI Node

OCR · 视频识别字幕

Read the subtitles that are burned into the pixels

By fudanll-sys·Created about a month ago·Updated 26 days ago· 1
OCR · 视频识别字幕
  • video
  • subtitle
  • raw_json
modeSubtitle
poll_interval_seconds10
max_poll_attempts720

Think of OCR as the other ear. The ASR node reads your video's audio; this one reads its pixels. If someone hard-burned subtitles into the frames, ASR can't help you - there's no audio track to transcribe. OCR can, because it recognizes the text that's literally on screen. It's the sibling that rescues you when the only subtitles in existence are already part of the image.

What you set

  • mode - Subtitle or Detailed. Subtitle extracts the subtitle text, which is what you want 95% of the time: a clean transcript of what's on screen. Detailed asks the cloud for more granular information per detected text region - timestamps per line, positions, and so on. More data, and presumably more of whatever the capability bills for; start with Subtitle.
  • video, plus the pack's standard poll_interval_seconds (default 10) and max_poll_attempts (default 720).

Two STRING outputs: subtitle - the recognized text - and raw_json, the complete redacted result for when you need the per-region detail that Detailed mode promises.

How it works

Same pipeline as every MediaKit node: the video materializes to a local temp file, mediakit-cli submits an async OCR task to your MediaKit account, the node polls until it finishes, then downloads the recognized-text file and decodes it (UTF-8 with a GB18030 fallback, because the tooling clearly leans into Chinese subtitle workflows). Because OCR reads rendered pixels rather than audio, it pairs beautifully with the ASR node: OCR gets the burned-in subs, ASR gets the speech, and between them you have a full transcript of a video with no text track at all.

Install and the cloud setup

Via ComfyUI Manager, search "MediaKit Toolkit" / mediakit-toolkit, restart ComfyUI fully - or:

cd ComfyUI/custom_nodes
git clone https://github.com/fudanll-sys/comfyui-mediakit-toolkit.git

No Python dependencies, no model downloads - this is a cloud wrapper, not a model loader. Before first use you need a Volcengine account with AI MediaKit activated, an API key, and the CLI authed in the environment that launches ComfyUI:

npx @volcengine/mediakit-cli install -y
mediakit-cli init --mode cloud-first --api-key "YOUR_MEDIAKIT_API_KEY" --credential-store config --yes

Every run submits a paid cloud task and uploads your clip to Volcengine.

The honest take

For casual "what does this screen say" needs, local OCR is free and instant, so don't reach for the cloud reflexively. Where this node earns its place is in automated pipelines - you're already in a MediaKit workflow, or you're indexing a batch of videos with burned-in subs and want a uniform transcript output. Watch the Subtitle vs Detailed decision more than anything else: Subtitle is cheap and sufficient for transcripts, and Detailed only pays off when you genuinely need per-region geometry.

CategoryMediaKit/Video AI

Inputs (4)

NameTypeDefaultDescription
videoVIDEO
modeCOMBOSubtitleSubtitle 识别字幕文本;Detailed 识别更详细信息。
poll_interval_secondsINT102–60
max_poll_attemptsINT7201–5000

Outputs (2)

NameTypeDescription
subtitleSTRING
raw_jsonSTRING