Communitygithub.com

SrigadaAkshayKumar/ai-video-editor

生成并样式化与单词同步的字幕(泰卢固语、印地语、英语、混合编码),以HyperFrames字幕方式在每个格式的Remotion画面上展示;修正字幕文本、将屏幕文字下的字幕变黑,并在每个剪辑连接处检查字幕内容。在创建、重新样式化、修正或重新定位任何编辑中的字幕时使用。

ai-video-editor 是什么?

该技能专为视频编辑中的字幕处理设计,支持泰卢固语、印地语、英语及混合编码的语言。它能自动生成与单词同步的字幕,并提供了三种视觉风格(pop、clean、karaoke),分别适用于短视频/短片、教育/访谈以及故事/音乐主导的内容。默认配置为16:9格式(每行5个单词,64px)和9:16格式(每行3个单词,76px),并确保字幕与图形区域不冲突(通过CAPTION_SAFE_Y常量)。字幕文本在`work/cleancut.words.json`源文件中定义,如需修正单词(如品牌名、人名、数字等),应在`work/edl.json`中添加`textFixes`,然后重新运行`npm run cut`和`npm run scaffold`。此外,当屏幕上已有文字(如全屏引用)时,可通过`work/visual-plan.json`中的`caption_blackouts`数组指定时间段来隐藏重叠字幕。该技能与Remotion渲染管线深度集成,字体通过woff2嵌入(Noto Sans Telugu、Noto Sans Devanagari、Poppins)。支持平台包括Claude Code、Cursor、Codex等AI代理环境,只需在终端中运行特定的npm脚本即可操作。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SrigadaAkshayKumar/ai-video-editor/tree/HEAD/.claude/skills/captions

在你喜欢的 AI 中提问

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

文档

captions

npm run captions -- <p> [--format 9:16] [--style pop|clean|karaoke] [--max-words N] [--position bottom|middle] [--accent "#hex"] [--uppercase]

为每个格式(或只对 --format 指定的格式)写入 edit-<fmt>/compositions/captions.html,数据来自 work/cleancut.words.json(已在干净剪切时间线上)。style、accent 和 uppercase 对所有格式共享(统一品牌外观);max-words 和 position 按格式单独设置——需通过 --format 传递它们。所有设置记住在 project.json → captions 中,所以不带标志重新运行会保持原样。脚手架已挂载字幕(<div id="captions" … data-track-index="4">)。

默认:两种格式均为底部区域——16:9 5 个单词,64px · 9:16 3 个单词,76px,y≈1348,位于 Instagram 的安全区内。Remotion 图形文件会避开此区域(remotion/src/doc/theme.ts 中的 CAPTION_SAFE_Y),因此字幕和图形永远不会冲突。

npm run scaffold -- <p> 在 work/visuals-<fmt>.mp4 上构建字幕通道并生成字幕;单独重新运行 npm run captions 可重新样式化。

选择样式

内容样式每组的单词数
短视频/Reels,充满活力,钩子pop(白色,粗轮廓,活跃词强调,单词弹跳)2–3
教育/访谈/长视频clean(深色圆角方块,活跃词强调)4–6
故事/平静/音乐主导karaoke(单词朗读时从暗色变为白色填充)3–5

强调色 = 摘要中的品牌颜色,否则为 #FFD400。仅纯英语视频使用 --uppercase(对印度语系脚本无效)。

文本修正

切勿手动编辑生成的 HTML。在源文件中修正单词:

  • 将 "textFixes": { "<原始单词ID>": "Correct" } 添加到 work/edl.json,然后重新运行 npm run cut 和 npm run scaffold(刷新)——原始 ID 是 work/cleancut.words.json 中的 src 字段。
  • 常见修正:品牌/人名、ASR 以泰卢固语/天城文书写但用户希望用拉丁字母的英文单词(或反之)、剪辑后句子开头的首字母大小写、数字(当 ఇరవై → 20 阅读效果更好时)。

脚本和字体

泰卢固语(Noto Sans Telugu)、天城文(Noto Sans Devanagari)和拉丁语(Poppins)字体作为 woff2 文件随每个 edit-<fmt>/assets/fonts/ 提供,并在 index.html 和字幕模板中声明——渲染器没有系统字体。如果添加了新字体,它需要有本地 woff2 的 @font-face,否则 lint 会失败并提示 font_family_without_font_face。

印度语系单词较长:在 9:16 中保持 --max-words ≤ 3;生成器也会限制每组的字符数。

黑屏区

当卡片已经显示单词(例如 sample_answer、一个正在被朗读的全屏引用)时,将 "caption_blackouts": [{ "start", "end" }] 添加到 work/visual-plan.json 并重新运行 npm run captions。该区域内的单词会被删除,任何空缺都会结束一个字幕组,因此没有一行会跨越卡片(避免了模板中“空缺前的单词 + 空缺后的单词”这样的垃圾行)。

检查连接点

npm run verify -- <p> 在每个剪辑后立即抓取一帧。阅读表格:每个字幕必须是某个句子的真实片段。一行中拼接两个不同镜头的内容是任何 linter 都看不到的错误。一次只显示一个字幕组;字幕组在短暂停顿期间保持,从不重叠。

npm run captions 标记此阶段完成。

Individual skills in this repo

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

SrigadaAkshayKumar/ai-video-editor

Turn a finished AI-edits video (projects/<p>, or several parts of one long video) into YouTube Shorts. Reuses the edit's word timestamps, reads the whole transcript, picks self-contained dialog moments, adds text hooks + comment prompts, renders 9:16 clips with Remotion. Use when the user asks to clip/make shorts from an edited project or a long video.

SrigadaAkshayKumar/ai-video-editor

Choose, fetch and place background music for an edit — Openverse search (commercial-use CC, or CC0-only), music_cues in work/audio-plan.json with fades, offsets and a deliberate silence gap; tools/mix.mjs conditions every bed, sets it to one measured house level under the voice and sidechain-ducks it. Use when adding, swapping or re-levelling music.

SrigadaAkshayKumar/ai-video-editor

Editorial rules for turning a raw talking video or voiceover into a clean cut — removing retakes, repetitions, false starts, stutters, fillers, mispronounced words, contradictions/inconsistencies, off-script chatter and dead air — by writing work/edl.json for tools/cut.mjs. Telugu, Hindi, English and code-mixed speech. Use for stage 2 of edit-video or whenever the user asks to tighten/re-cut a video.

SrigadaAkshayKumar/ai-video-editor

Turns a bare voiceover (no presenter on camera) into a finished faceless documentary/explainer for YouTube 16:9 and Instagram 9:16 — clean-cuts the narration, DIRECTS it (story spine, tension curve, hooks, involvement beats), researches the claims and screenshots the real sources, plans a scene track (stock b-roll, stills, news screenshots, pure-graphic beats) with motion graphics, designs music + SFX, renders, captions and credits it. Use when the user gives a voiceover/narration file (or says "faceless video", "make a video from this VO", "documentary").

SrigadaAkshayKumar/ai-video-editor

End-to-end editor for TALKING-HEAD videos (a person on camera) in this repo. Use when the user hands over a raw video with a speaker and wants a finished edit, or asks to continue/resume/redo any stage of an existing talking-head project — clean cut, motion graphics, b-roll, SFX, music, captions, final render, thumbnail. Delivers YouTube 16:9 and Instagram 9:16. Telugu, Hindi, English and code-mixed speech. For a voiceover with no presenter use edit-video-faceless.

SrigadaAkshayKumar/ai-video-editor

Plan the picture of an edit in work/visual-plan.json — motion graphics (28 component types across six stage layouts that dock/shrink/dim the video), b-roll cutaways from Pexels/Pixabay, camera moves, a-roll framing for 9:16 — validate it, QA it with stills in both formats, and render it with Remotion. Use for any titles, charts, stats, lower thirds, diagrams, b-roll or zooms in a talking-head or faceless edit.

SrigadaAkshayKumar/ai-video-editor

Design the sound effects of an edit in work/audio-plan.json sfx_events — which effect, where, how often — using the measured SFX library (repo assets/sfx, HyperFrames' bundled set, CC0 fetches from Openverse) and the spectral rule that sub-band cues carry structure while vocal-band cues are rationed. Mixed and levelled by tools/mix.mjs. Use when adding or adjusting SFX in any edit.

SrigadaAkshayKumar/ai-video-editor

Write the upload package for a video this repo edited — YouTube title options, description with chapters, tags, pinned comment, thumbnail text, and the Instagram Reels caption + hashtags for the 9:16 cut — optimised for whichever channel/client the user says it is for (config/brands/ profiles, only when named). Use when the user asks what to title a video, for a description, tags, chapters, "the YouTube metadata", an Instagram caption, or SEO/CTR advice on a finished render.

SrigadaAkshayKumar/ai-video-editor

Design and build a high-CTR thumbnail for a video this repo edited — hook selection, the real face frame pulled from the footage, background cut-out, type set with real fonts (Telugu/Devanagari included), the YouTube 1280x720 thumbnail and the Instagram 1080x1920 cover, an optional image-generation prompt for the background layer, and a feed-size legibility check. Use when the user asks for a thumbnail, thumbnail ideas, a cover image, or how to make the thumbnail more clickable.

相关技能