Communitygithub.com

字幕生成(基于转录稿)

根据视频生成准确、时序正确的字幕文件(SRT 或 WebVTT)。

字幕生成(基于转录稿) 是什么?

该技能用于从视频或解说脚本生成高质量字幕文件,支持 SRT 和 WebVTT 格式。其核心价值在于将原始的、可能含有错误的语音识别(ASR)输出校正为准确的、带正确时间轴的字幕。技能强调以脚本为基准提高准确率,如果没有脚本,则对 ASR 输出进行人工校正,尤其关注技术术语和 UI 标签。字幕的时序必须精确对齐语音,并遵循阅读速度(约 17 字符/秒)、每行字符数(32-42)和行数(1-2 行)的规则。输出文件可用于嵌入视频或直接作为 HTML5 <track> 元素使用,不包含任何样式或动画。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SkillMedev/tutorial-video-studio/tree/main/skills/captions-from-transcript

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

字幕生成(基于转录稿) 是做什么的?

字幕不是锦上添花——它们是可访问性的保障,能让静音观看的用户跟上内容,对教程而言更能强化确切的 UI 术语。该技能生成一份干净、时序准确的字幕文件。样式和烧录由后续步骤处理。

首先获取最准确的文本

准确性取决于起点:

  • 如有旁白脚本,将其作为基准。 其在技术术语和 UI 标签上已是正确的。将脚本与音频对齐,而非从头重新转录。
  • 否则,转录音频(使用 Whisper、平台的自动字幕或任何 ASR 服务),然后对照视频进行校正。ASR 通常会在产品名称、代码和缩略词上出错——务必逐条修正,使其与屏幕显示完全一致。

绝不要直接使用未经处理的原始 ASR 输出。错误总是集中在最高价值的词汇上。

将字幕与语音对齐

  • 每条字幕在其台词被说出时出现,并在结束时消失——对齐语音,而非固定的时间间隔。
  • 最短显示时间约为 1 秒(即使字幕很短),最长约 7 秒。超过的应拆分为多条。
  • 句子中间不要有空隙;句子之间短暂的空白是可接受的,有助于提高可读性。

行数与阅读规则

  • 每条字幕 1-2 行,绝不能有 3 行。
  • 每行约 32-42 个字符。超过会挤占画面,超出安全区域。
  • 阅读速度 ≤ 约 17 字符/秒(约 160-180 词/分钟)。如果一条字幕超出此速度,文字会一闪而过——请拆分字幕或延长其显示时间。
  • 断行应在从句边界处,绝不能在短语中间打断。保持“转到 设置 页面”的整体性;不要将“转到”单独放在一行。

选择格式

  • SRT - 通用格式,序号 + HH:MM:SS,mmm --> HH:MM:SS,mmm + 文本。适合上传到多数平台和编辑器使用。
  • WebVTT (.vtt) - WEBVTT 头部,HH:MM:SS.mmm 时间戳,支持字幕定位/样式设定。适合用于 HTML5 <track> 和网页播放器。

生成有效、可解析的输出——正确的时间戳标点符号(SRT 在毫秒前使用逗号,VTT 使用句点),字幕之间用空行分隔,无尾部空格。

干净版 vs 逐字版

对于教程,字幕采用干净版:去掉填充词(“嗯”、“啊”、重新开始的句子),保留原意。技术术语、代码和 UI 标签必须精确保留。仅在用户明确要求(法律、研究、精确引用场景)时使用逐字版。

同步质量检查

在视频的开始、中间和结束处抽查同步情况——漂移是会累积的。确认字幕在正确的台词时出现并在下一条字幕开始前消失。修正任何停留在错误画面上的字幕。

交接

完成的 .srt / .vtt 文件供 social-video-formatter 进行烧录和平台样式设定,或供网页播放器的 <track> 元素直接使用。将颜色、字体、位置和动画留给后续步骤——此技能只生成准确、时序恰当的文字,仅此而已。

不要做的事

  • 不要为字幕添加样式、颜色、位置或将字幕烧录到画面中——这些是 social-video-formatter 的职责。
  • 不要逐字制作动画效果——这些是 kinetic-typography 的职责。
  • 不要使用未校正的 ASR 结果;错误恰恰集中在最重要的术语上。
  • 不要为了避免拆分字幕而使用 3 行或超出阅读速度预算——请务必拆分。

Individual skills in this repo

This repo contains 11 individual skills — each has its own dedicated page.

Kinetic Typography

Put text in motion the right way - title cards, animated captions, lower-thirds, callouts, and word-by-word reveals - with a reading-time-per-word budget so copy holds long enough to read, plus enter/exit timing, weight and size transitions, and type hierarchy in motion. Use when someone asks to

Motion Design Principles

The craft layer for motion: pick the right easing (ease-in / ease-out / ease-in-out / spring), get timing and spacing right, build the anticipation→action→follow-through arc, and apply Disney

Narration Script

Write the spoken voiceover for a tutorial or demo - the actual words, phrased for the ear and synced one-instruction-per-action to what is on screen, with a pacing budget and a confident, jargon-checked tone. Use when someone says

Product Demo Director

Direct the craft of putting a real software UI on screen - cursor choreography, zoom/pan/callout language, screen-recording vs recreated-UI, and making state changes legible with highlights, focus pulls, and slow-downs. Use when filming or recreating an app for a product demo, feature walkthrough, onboarding clip, or release reel and asking

Remotion Compose

Turns a natural-language video brief into a complete, ready-to-preview Remotion composition - extracts duration, scenes, brand colors, aspect ratio, and real copy; plans the frame budget; and writes data-driven React/TypeScript using useCurrentFrame, interpolate, spring, AbsoluteFill, and Sequence, registered in Root.tsx. Use when someone says

Remotion Render

Renders a Remotion composition to MP4 and runs the edit-and-re-render loop - CLI render commands, 1080p/4K/9:16 presets, concurrency tuning, codec selection, batch variants from a JSON data file, and Lambda for cloud rendering. Use when someone says

Remotion Setup

Scaffolds a new Remotion video project wired for Claude Code Agent Skills - Node check, create-video scaffold, skills install, folder conventions, Google Fonts, and a smoke-test render. Use whenever someone wants to start making videos with Remotion and Claude, even just

Screencast Capture

Capture clean raw screen and camera footage for a tutorial or product demo - choosing the recorder (macOS Screenshot toolbar, QuickTime, OBS, Windows Game Bar), setting resolution / frame-rate / cursor / microphone, prepping a distraction-free stage, and recording in retakeable segments. Use when someone says

SkillMedev/tutorial-video-studio

Plan a product demo, feature announcement, or launch video as a beat sheet and shot list BEFORE animating - hook in the first 3s, problem, reveal, proof, CTA - with target duration and pacing per scene type, output as a JSON scene plan that remotion-compose consumes directly. Use when someone says

Social Video Formatter

Reframe and export a finished video for social platforms - 9:16 ↔ 16:9 cropping, burned-in captions, a platform-native first frame, loop design, and per-platform specs (aspect, length, safe areas) for TikTok, Reels, Shorts, X, and LinkedIn. Use when someone says

Sound and Music Sync

Score a video like an editor: beat-match cuts to the music, land SFX on transitions, pace the voiceover so it breathes, source royalty-free tracks safely, and duck the music so the VO sits clearly on top. Use when adding music, sound effects, or voiceover to a video, when asked to

相关技能