Communitygithub.com

BolajiOlajide/dotfiles

處理 Remotion 中的字幕功能

dotfiles 是什麼?

此技能專門用於在 Remotion 影片框架中處理字幕。它要求所有字幕必須以 JSON 格式處理,並使用統一的 `Caption` 類型。該類型包含文字內容、開始與結束時間(以毫秒為單位)、可選的時間戳記以及信心指數等欄位。透過這項技能,開發者可以從音訊或影片檔案中生成字幕、將字幕顯示在影片畫面上,以及從標準的 .srt 檔案匯入既有字幕。每個操作都會導向對應的 `.md` 文件取得詳細指令,從而在 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.

相關技能