Communitygithub.com

影片編輯 — 配字幕的展示影片流程

將任何影片編輯成附帶字幕的展示影片:轉錄(支援任何語言,預設 large-v3)、產生 transcript_review.txt 讓使用者在最終渲染前修正誤聽,然後建立 HyperFrames 合成,包含液態玻璃字幕膠囊、液態模糊背景、液態變形轉場、可選的背景去除主體後方文字,最後渲染出最終影片。支援英文、希伯來文及所有 Whisper 支援的語言。從同一個 16:9 來源同時渲染 16:9(YouTube/橫向)與 9:16(TikTok/Instagram Reels/YouTube Shorts)版本。

影片編輯 — 配字幕的展示影片流程 是什麼?

這是一個端到端的影片字幕編輯技能,專為需要為影片加入高品質字幕、製作展示影片或教學影片的使用者設計。其核心流程為:轉錄 → 使用者審查 → 渲染,並且**一定會在使用者明確批准轉錄稿後才進行耗時的渲染步驟**,確保字幕準確性。此技能支援希伯來文與英文,並可自動偵測或指定任何 Whisper 支援的語言。它使用 HyperFrames 合成框架來建立具視覺吸引力的液態玻璃風格字幕膠囊、動態液態模糊背景及變形轉場效果。特別的是,它能從同一份 16:9 橫向來源影片,分別產出 16:9(YouTube)與 9:16(TikTok/Reels/Shorts)兩種比例的輸出,其中 9:16 版本會自動使用模糊背景搭配置中橫向影片條與縱向調整的字幕膠囊,無需重新拍攝。此技能屬於 YUV.AI 技能體系的中層,與 `yuv-viral-video` 為同級兄弟技能,後者專注於特定風格的病毒式短片,而此技能則提供更通用的字幕編輯功能。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/hoodini/ai-agents-skills/tree/HEAD/skills/video-edit

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

影片編輯 — 配字幕的展示影片流程 是做什麼的?

基於 HyperFrames 的端到端字幕影片編輯器。使用者提供影片,你負責協調「轉錄 → 審查 → 渲染」,並始終在進行長時間渲染前暫停等待轉錄稿批准。

此技能在 YUV.AI 金字塔中的位置

video-edit 屬於 YUV.AI 技能金字塔的中層,與 yuv-design-system、yuv-decks、yuv-viral-video、parallax-landing-page 和 video-to-landing-page 同級。頂層協調器 yuv-pilot 會在使用者想要配字幕的展示影片、教學影片或含字幕的談話頭剪輯時,將任務路由至此。

這是 yuv-viral-video 的更通用化影片兄弟技能。其分工如下:

  • yuv-viral-video — 特定風格的 YUV.AI 病毒式短片流程(MrBeast 節奏、標誌性編輯風格)
  • video-edit — 通用配字幕編輯器,具備「審查轉錄稿後再渲染」功能(支援希伯來文 + 英文 + 任何 Whisper 語言)

若需製作 YUV.AI 品牌的配字幕影片,請將此技能與 yuv-design-system(Neon 模式用於字體/調色決策)搭配使用。對於一般/第三方品牌的配字幕影片,此技能可獨立運作。

何時呼叫

  • 影片檔案路徑(mp4/mov/mkv)+ 要求「編輯」、「加字幕」、「加入字幕」、「製作 Reels/宣傳片」、「做一樣的」
  • 「修正字幕 / 希伯來文拼寫錯誤」— 在現有專案上從審查步驟重新進入
  • 任何配字幕的教學 / 談話頭 / 宣傳片建置

儲存位置

預設: ~/Documents/yuv-projects/videos/<slug>/ — 始終將配字幕的影片專案儲存在此處,以便渲染結果可被找到。 <slug> 是簡短的名稱,從主題或來源檔案名稱衍生而來。

mkdir -p ~/Documents/yuv-projects/videos
cd ~/Documents/yuv-projects/videos
# 在此初始化專案。

最終渲染成品存放在 ~/Documents/yuv-projects/videos/<slug>/renders/<name>_FINAL.mp4。渲染結束時告知使用者影片位置。


工作流程(12 個步驟)

  1. 探查來源 — 使用 ffprobe 取得尺寸、fps、時長、音訊。

  2. 建立專案骨架 — cd ~/Documents/yuv-projects/videos && npx hyperframes init <slug> --video <path> --non-interactive。將複製的影片重新命名為 source.mp4。

  3. 提取音訊 — ffmpeg -i source.mp4 -vn -ac 1 -ar 16000 audio.wav。

  4. 轉錄 — 將 references/transcribe.py 複製到專案中。預設模型為 large-v3(希伯來文最佳)。CUDA 在 Windows 上通常會失敗(缺少 cuDNN);腳本會回退到 CPU int8。希伯來文強制設定 language="he",英文設定 language="en";否則自動偵測。

  5. 套用已知修正 — 將 references/corrections-hebrew.md 的內容複製到專案根目錄的 corrections.json(鍵 = 錯誤 token,值 = 正確 token)。

  6. 🛑 停止 — 啟動審查伺服器,讓使用者在 Web 應用程式中批准。 首先套用已知修正:將 references/make_review.py 複製到專案中並執行 python make_review.py。它會將 corrections.json 套用到 transcript.json。

    然後以背景任務方式啟動審查伺服器(它會阻塞,直到使用者在瀏覽器中點擊 「批准並渲染」):

    python "$HOME/.claude/skills/video-edit/references/serve_review.py" .
    # 在 Windows 上:python "C:\Users\<你>\.claude\skills\video-edit\references\serve_review.py" .
    

    伺服器會輸出一行類似 REVIEW_URL=http://localhost:PORT/ 的內容。從 背景任務的輸出(或讀取 stdout)取得該 URL,並發送給使用者:

    👉 在此處審查你的轉錄稿:http://localhost:PORT/ 當你點擊批准並渲染,我會自動繼續。

    代理不需要「繼續」訊息 — 當使用者點擊按鈕時,伺服器會將 transcript_review.txt 寫入專案目錄,並以代碼 0 退出。代理的 背景任務通知會觸發,流程會從步驟 8 繼續。

    若無瀏覽器/無伺服器時的備案:以靜態檔案方式開啟編輯器 (在 Windows 上為 start "" "$HOME/.claude/skills/video-edit/transcript-editor/index.html",在 macOS 上為 open,在 Linux 上為 xdg-open), 請使用者選擇專案資料夾,進行編輯,將 transcript_review.txt 儲存回 專案中,然後回覆「繼續」。編輯器支援兩種模式。

  7. (可選)背景去除 — 參見下方步驟 7;可與使用者的審查並行執行。

  8. 批准後,執行 python references/apply_review.py。它會重新標記化已編輯的行,並 將詞語時間重新分配回 transcript.json,使字幕同步仍然有效。

  9. (可選)背景去除 — 若有任何談話頭片段需要在主體後方顯示文字,將該片段提取為 outro.mp4(或 intro.mp4),並執行 npx hyperframes remove-background <clip>.mp4 -o <name>_subject.webm --quality best。在大多數設定下僅使用 CPU(一個約 15 秒的 1440p 片段約需 3–8 分鐘)。

  10. 以密集關鍵影格重新編碼來源 — 多工作渲染在關鍵影格稀疏時會卡住。務必執行:

    ffmpeg -y -i source.mp4 -c:v libx264 -preset medium -crf 18 -r 30 -g 30 -keyint_min 30 -sc_threshold 0 -pix_fmt yuv420p -movflags +faststart -c:a copy footage.mp4
    
  11. 重新載入(已編輯的)轉錄稿,並透過 references/gen_body.py 產生主體子合成。該產生器會輸出完整的 compositions/components/caption-body.html,其中包含以液態玻璃膠囊交替呈現的 editorial + matrix 風格,錨點位於偏左下方(避開右下角的網路攝影機子母畫面)。

  12. 從 references/host-template.html 接線主機 index.html。圖層順序(z-index,非軌道索引):

    • z0:影片 .cam-bg
    • z1:液態模糊背景(compositions/liquid-blobs.html,mix-blend-mode: screen,全時長)
    • z2:視差背景後字幕(intro 和/或 outro,當使用背景去除時)
    • z3:主體去背 .cam-out / .cam-sub(帶有對應的 data-media-start)
    • z6:主體字幕
    • z46:進度條 + 閃光 + 液態變形轉場
  13. 檢查 — npx hyperframes lint。必須為 0 錯誤。常見修正:轉場元素上的 GSAP/CSS transform 衝突(使用 xPercent/yPercent 或移除 CSS transform);相同屬性上的重疊 tween(加入 overwrite: "auto")。

  14. 渲染 — npx hyperframes render --quality standard --fps 30 --output renders/<name>_FINAL.mp4。Standard 是正確的交付目標 — high 大約會使渲染時間加倍。在報告完成前,從時間軸各處抽查 6–8 個影格來驗證。

垂直(9:16)輸出,適用於 TikTok / Reels / Shorts

當使用者要求從 16:9 來源輸出垂直 / 直向 / TikTok / Reels / 9:16 格式時:

  1. 將專案複製到同層資料夾:cp -r project/ project-vertical/。
  2. 將其 index.html 替換為 references/host-template-vertical.html(1080×1920 畫布,帶有液態模糊的模糊背景,16:9 影片作為置中橫向條,字幕在下方)。
  3. 將其 gen_body.py 替換為 references/gen_body_vertical.py(置中膠囊、較大字型、較窄最大寬度),然後重新執行以產生 compositions/components/caption-body.html。
  4. 移除主體去背剪輯 + 視差子合成(去背剪輯是針對 16:9 對齊的;v1 版本不值得重新對齊)。垂直合成改用模糊來源背景 + 液態模糊來營造氛圍。
  5. 將 data-duration 更新為實際影片時長。更新 index.html 中的品牌晶片文字(預設為 YUV.AI)。
  6. 檢查 + 渲染 — 指令相同。輸出為 1080×1920。可直接上傳至 TikTok / IG Reels / YT Shorts。

若要一次交付 16:9 和 9:16 兩種版本,可在並行專案中執行兩個渲染指令。transcript_review.txt 的批准適用於兩者 — 相同的字幕,兩種合成。

關鍵規則

  • 絕不能在沒有明確轉錄稿批准的情況下渲染最終版本。 審查步驟是整個流程的意義所在。
  • 希伯來文:large-v3 + language="he" + direction: rtl + Rubik(700 + 900 用於 editorial 雙重粗細強調)。
  • 字幕膠囊始終需要不透明的深色背景 — 純淺色文字在白色應用程式 UI 上會消失。
  • 水平置中字幕膠囊,但當影片有右下角網路攝影機子母畫面時,將中心 x 座標向左偏移(例如 left: 720px)。
  • 主體去背剪輯片段必須攜帶與其 data-start(或從來源提取片段時的偏移量)匹配的 data-media-start,否則去背剪輯會從影格 0 開始播放並造成不同步。
  • remove-background 的 webm 會保留原始 RGB 並僅寫入 alpha 遮罩 — ffprobe 會顯示為 yuv420p,看起來像是「沒有 alpha」。透過 TAG:ALPHA_MODE=1 或在固色背景上合成來確認。
  • 結尾卡/結束卡帶有燒錄文字 — 請勿在其上添加字幕;它們會重疊。

檔案參考

檔案用途
transcript-editor/index.html互動式瀏覽器編輯器 — 影片預覽、RTL 編輯、字典套用、可選的 WebLLM AI 建議、儲存 transcript_review.txt
references/setup.md先決條件 + Node / Python / FFmpeg / faster-whisper 的安裝指令
references/transcribe.py帶 CPU 回退 + 詞語時間戳記的 faster-whisper 轉錄
references/serve_review.py本地審查伺服器 — 自動載入編輯器,阻塞直到使用者點擊「批准並渲染」,然後寫入 transcript_review.txt 並退出(向代理發出訊號)
references/make_review.py套用修正 + 產生 transcript_review.txt(檔案模式備案)
references/apply_review.py解析已編輯的審查檔案,重新分配詞語時間,更新 transcript.json
references/gen_body.py字幕主體產生器(液態玻璃膠囊中的 editorial + matrix)
references/host-template.html16:9 主機合成,含液態效果 + 轉場擦除
references/host-template-vertical.html9:16 主機(1080×1920)— TikTok / Reels / Shorts 佈局:模糊背景、置中 16:9 影片條、下方字幕、右上角品牌晶片
references/gen_body_vertical.py針對垂直格式調整的字幕主體產生器(置中膠囊、較大字型、較窄最大寬度)
references/liquid-blobs.html全時長漂移模糊圖層
references/caption-parallax-outro.html主體後方字幕範本(英文;可為其他語言複製)
references/corrections-hebrew.md已知的希伯來文 Whisper 誤聽列表
references/transcript-review-workflow.md暫停/批准步驟的詳細說明

Individual skills in this repo

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

hoodini/ai-agents-skills

Edit any selfie or screen-share footage into a viral short-form video in YUV.AI's signature style — Apple-style liquid-glass cards (real CSS backdrop-filter), dark-mode polish, MrBeast-paced cuts, video-title karaoke captions, premium GSAP motion graphics, no fake content, never covering the speaker's face. Hebrew is rendered in Rubik Black, English in Anton uppercase. Always renders BOTH 9:16 and 16:9 and always saves with _V<N> suffix for backups. Trigger when the user drops a path to an .mp4/.mov/.mkv and says "edit this", "make it viral", "turn this into a short", or any Hebrew equivalent (ערוך סרטון, סרטון ויראלי, להפוך לוויראלי, ריל, שורט). The pipeline is the COMBINATION of two skills: video-use (transcription + word-snapped cuts + base extraction) and hyperframes (HTML/CSS/GSAP visual composition + render). Do NOT use for podcast-only audio edits.

hoodini/ai-agents-skills

Yuval Avidani's YUV.AI brand and design system. Apply ONLY when YUV.AI-branded output is requested — presentations, decks, keynotes, portfolio, brand site, profile, speaker bio, brand assets, or any prompt mentioning YUV.AI / "my brand" / "my deck" / "my site" / "for me". Do NOT auto-trigger on generic "build a game / web app / dashboard / landing page" without YUV.AI context — those use whatever palette fits. Three modes; NEON (hot pink #FF1464 + neon cyan #00E5FF + white, DEFAULT for YUV.AI web, apps, games, dashboards, social, general visual work); DECKS (Fly High purple/yellow/grey, presentations and slides ONLY); Warm Editorial (pink/yellow/bone for Hope, Marcus, bigcats.ai, practical.yuv.ai). Universal Fly High throughline across all modes; flight/progress motifs (HUD strips, dials, "Let's Fly High" tagline, phoenix mark). Anton + Inter (EN), Rubik + Assistant (HE), letter-spacing 0 default. Bundled brand assets, canonical socials, credentials. Project brand wins if specified.

hoodini/ai-agents-skills

Yuval's all-in-one AI video pipeline. Turns an idea/script into a finished, on-brand MP4 by orchestrating HyperFrames (HTML→deterministic video render), Lottie (branded motion graphics), ManimCE (math / neural-network / concept animations), and a transcribe→approve caption flow — all wrapped in the YUV.AI Neon Phoenix brand via a frame.md. Use whenever Yuval wants to make, edit, or explain something as a video: promo, explainer, launch, social reel, "make a video about X", "explain X as a video", "neural network animation", "turn this into a video", captioned tutorial, 16:9 or 9:16. Triggers: video, explainer, promo, reel, manim, lottie, hyperframes, animation, "make a video", "explain ... as a video", מצגת וידאו, סרטון, הסבר וידאו. Routes each beat to the right engine, wraps in brand, self-verifies, and renders.

hoodini/ai-agents-skills

Build a premium cinematic landing page with mouse-scrub video hero and brand-driven narrative-arc sections. Use whenever the user provides a hero video plus a product / subject / brand and wants a landing page, promo site, product showcase, marketing page, or storytelling site. Works for any language (RTL or LTR — Hebrew, English, Arabic, Spanish, French, Japanese, etc.) and any subject (food, tech, animals, fashion, services, SaaS, wildlife campaigns, music releases, books, real estate). The signature effect is mouse-driven video scrubbing — the hero video lives across the entire page as a fixed backdrop, and moving the mouse left-right scrubs the video timeline so the subject responds to the cursor. Below the hero, 4-5 fully-opaque sections each carry their own brand identity (color, typography emphasis, layout pattern) and walk the viewer through a narrative arc (e.g. longing → joy → nostalgia → contemplation → action). Triggers on phrases like "build a landing page from this video", "cinematic landing ...

hoodini/ai-agents-skills

Build a scroll-driven cinematic landing page from a short video. The user provides a 5–15 second video (often AI-generated); this skill extracts every frame at HD JPEG quality, then produces a single-hero HTML page where the user's scroll gesture scrubs the frames in place (the page itself never scrolls) and 5 dramatic text overlays crossfade in/out — Google Anton headlines, Caveat handwritten accents, locked body, virtual scroll. Use this skill whenever the user wants to "turn this video into a landing page", "make a scroll-scrub landing page", "build a parallax hero from this clip", "add a new landing page to the parasites showcase", "do the same as github/lion/hope for this new video", or any variant that pairs a short clip with dramatic scroll-triggered storytelling. Trigger even if the user only says "use my video for a landing page" — that is this skill.

hoodini/ai-agents-skills

Turn any video into a cinematic scroll-driven landing page — Apple-style hero where scrolling progresses the visible frame through the video. Use when the user provides a video file and asks for "a landing page from this video", "scroll-frame website", "Apple-style scroll site", "hero that scrubs the video", "like the GitHub Copilot landing", or any equivalent. Extracts N evenly-spaced frames via ffmpeg, builds a self-contained HTML page with a sticky hero + JS scroll listener that swaps the visible frame as you scroll, plus headline, sections and CTA below. For YUV.AI projects, applies the yuv-design-system skill in Neon mode (pink/cyan/white, default for YUV.AI web) — Decks (purple/yellow) is reserved for slides only. For generic / non-YUV.AI projects, picks an appropriate palette per the source video. Output is one folder with `index.html` and a `frames/` directory — drop on any static host.

hoodini/github-trending

Fetch and display GitHub trending repositories and developers. Use when building dashboards showing trending repos, discovering popular projects, or tracking GitHub trends. Triggers on GitHub trending, trending repos, popular repositories, GitHub discover.

hoodini/mongodb

Work with MongoDB databases using best practices. Use when designing schemas, writing queries, building aggregation pipelines, or optimizing performance. Triggers on MongoDB, Mongoose, NoSQL, aggregation pipeline, document database, MongoDB Atlas.

hoodini/owasp-security

Implement secure coding practices following OWASP Top 10. Use when preventing security vulnerabilities, implementing authentication, securing APIs, or conducting security reviews. Triggers on OWASP, security, XSS, SQL injection, CSRF, authentication security, secure coding, vulnerability.

相關技能