Communitygithub.com

BolajiOlajide/dotfiles

在 Remotion 中处理字幕。

dotfiles 是什么?

该技能专为在 Remotion 视频框架中处理字幕而设计。它要求所有字幕数据必须以 JSON 格式处理,并遵循 `Caption` 类型定义,包含文本、开始时间、结束时间、时间戳和置信度字段。技能提供了三个核心功能:通过 `transcribe-captions.md` 生成字幕(语音转文字)、通过 `display-captions.md` 在视频中显示字幕、以及通过 `import-srt-captions.md` 从 .srt 文件导入字幕。它主要适用于 Remotion 用户,帮助开发者高效地集成和管理视频字幕工作流。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/BolajiOlajide/dotfiles/tree/HEAD/ai/skills/remotion-captions

在你喜欢的 AI 中提问

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

文档

所有字幕必须以 JSON 格式处理。字幕必须使用 Caption 类型,定义如下:

import type { Caption } from "@remotion/captions";

这是类型定义:

type Caption = {
  text: string;
  startMs: number;
  endMs: number;
  timestampMs: number | null;
  confidence: number | null;
};

生成字幕

要将视频和音频文件转录以生成字幕,请加载 transcribe-captions.md 文件获取更多说明。

显示字幕

要在视频中显示字幕,请加载 display-captions.md 文件获取更多说明。

导入字幕

要从 .srt 文件导入字幕,请加载 import-srt-captions.md 文件获取更多说明。

Individual skills in this repo

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

相关技能