Communitygithub.com

字幕生成与烧录

自动生成视频字幕并进行烧录,支持火山引擎转录、词典纠错、人工审核与烧录。触发词:加字幕、生成字幕、字幕。

O que é 字幕生成与烧录?

该技能专为视频剪辑后的字幕处理设计,支持火山引擎语音转录、基于词典的热词纠错、Agent 自动校对、人工审核与最终烧录。流程包括音频提取与上传、转录、Agent 逐条校对(手动,非自动匹配)、启动本地审核服务器(含视频播放与字幕编辑界面)以及使用 FFmpeg 以指定样式(如金黄粗体、黑色描边)烧录字幕。适用于需要高质量字幕的视频创作者,尤其适合中文发音易混淆的场合(如同音字、误识别)。平台支持 macOS 和 Linux 环境,依赖 ffmpeg、curl、Node.js 等工具。整个流程耗时约 8-15 分钟,其中人工审核部分由用户控制。

Funciona com✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/Ceeon/videocut-skills/%E5%AD%97%E5%B9%95

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

字幕

转录 → Agent校对 → 人工审核 → 烧录

核心流程(总计约 8-15 分钟,含人工审核)

1. 提取音频 + 上传          ⏱ ~1min
    ↓
2. 火山引擎转录(带热词)    ⏱ ~2min
    ↓
3. Agent 自动校对            ⏱ ~3-5min
    ↓
4. 人工审核确认              ⏱ 取决于用户
    ↓
5. 烧录字幕                  ⏱ ~1-2min

Step 1: 提取音频并上传

# 提取音频
ffmpeg -i "video.mp4" -vn -acodec libmp3lame -y audio.mp3

# 上传到 uguu.se(临时文件托管)
curl -s -F "files[][email protected]" https://uguu.se/upload
# 返回 URL 如: https://o.uguu.se/xxxxx.mp3

Step 2: 火山引擎转录(带热词)

转录脚本会自动读取词典作为热词,提高识别准确率:

# 词典位置: /Users/chengfeng/Desktop/AIos/剪辑Agent/.claude/skills/字幕/词典.txt
# 脚本会自动加载

bash ../剪口播/scripts/volcengine_transcribe.sh "https://o.uguu.se/xxxxx.mp3"

词典格式(每行一个词):

skills
Claude
Agent
成峰
剪辑skills
claude code

Step 3: Agent 自动校对

3.1 生成带时间戳的字幕

const result = JSON.parse(fs.readFileSync('volcengine_result.json'));
const subtitles = result.utterances.map((u, i) => ({
  id: i + 1,
  text: u.text,
  start: u.start_time / 1000,
  end: u.end_time / 1000
}));
fs.writeFileSync('subtitles_with_time.json', JSON.stringify(subtitles, null, 2));

3.2 Agent 手动校对(不用脚本)

转录后,Agent 必须逐条阅读全部字幕,手动校对以下问题:

常见误识别规则表

误识别正确类型
成风成峰同音字
正特/整特Agent误识别
IT就Agent就发音相似
edge的叉100Agentx100误识别
cloud codeClaude Code发音相似
Schill/skillskills发音相似
剪口拨/剪口波剪口播同音字
自净化/资金化自进化同音字
减口播剪口播同音字
录剪漏剪同音字
作为这个做这个同音字
斜杠V1/斜杠v/v口语描述
斜杠v点口拨/v.口播口语+同音
a p i t/APIKAPI Key误识别
excuseskills误识别
移完了剪完了同音字

常见漏字问题

原文修正说明
步呢是配置第二步呢是配置漏"第二"
4步就是第4步就是漏"第"
别省时间特别省时间漏"特"
这个我们的这个是我们的漏"是"
在里面看到可以在里面看到漏"可以"
跟大家处理完跟大家讲完用词不当
剪辑了逻辑剪辑的逻辑语法错误

3.3 对照原稿校对(如有原稿)

如果有原稿/脚本,可以辅助校对,但不要用脚本自动匹配(文字差异会导致时间戳累积错误)。

Agent 应:

  1. 读取原稿作为参考
  2. 手动逐条对比,发现差异时修正
  3. 不确定的地方标记,留给人工审核

Step 4: 启动审核服务器

cd 字幕目录/
node /path/to/skills/字幕/scripts/subtitle_server.js 8898 "video.mp4"

访问 http://localhost:8898

功能:

  • 左侧视频播放,右侧字幕列表
  • 播放时自动高亮当前字幕
  • 双击字幕文字编辑(时间戳不变)
  • 倍速播放(1x/1.5x/2x/3x)
  • 保存字幕 / 导出 SRT / 烧录字幕
  • 底部显示词典快捷插入

Step 5: 烧录字幕

默认样式:22号金黄粗体、黑色描边2px、底部居中

ffmpeg -i "video.mp4" \
  -vf "subtitles='video.srt':force_style='FontSize=22,FontName=PingFang SC,Bold=1,PrimaryColour=&H0000deff,OutlineColour=&H00000000,Outline=2,Alignment=2,MarginV=30'" \
  -c:a copy \
  -y "video_字幕.mp4"
参数值说明
FontSize22字体大小
FontNamePingFang SC苹方字体
Bold1粗体
PrimaryColour&H0000deff金黄色 #ffde00
OutlineColour&H00000000黑色描边
Outline2描边宽度
Alignment2底部居中
MarginV30底部边距

目录结构

output/YYYY-MM-DD_视频名/字幕/
├── 1_转录/
│   ├── audio.mp3
│   └── volcengine_result.json
├── subtitles_with_time.json    # 核心文件
└── 3_输出/
    ├── video.srt
    └── video_字幕.mp4

字幕规范

规则说明
一屏一行不换行,不堆叠
句尾无标点你好 不是 你好。
句中保留标点先点这里,再点那里

反馈记录

2026-01-31

  • 火山引擎支持热词,已集成到转录脚本
  • Agent 转录后需要自动校对,不能直接交给用户
  • 字幕样式:金黄粗体 #ffde00,描边 2px
  • IT 常被误识别为 Agent,需加入纠错规则
  • 重要:Agent 校对必须手动逐条阅读,不能用脚本自动匹配
  • 新增 17 条常见误识别规则(详见 3.2 节)
  • 漏字问题比误识别更难发现,需要特别注意

Individual skills in this repo

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

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

Habilidades Relacionadas