Communitygithub.com

視頻製作工具

使用單一配置文件,通過 Claude Code 控制 Remotion 模板,生成行銷影片。

視頻製作工具 是什麼?

此技能讓用戶能利用單一配置文件(如 `video-config.json`)來定義場景、腳本與媒體資源,透過 Claude Code 控制 Remotion 模板產生行銷影片。它簡化了影片製作流程,無需手動操作複雜的編輯軟體,適合開發者與行銷人員快速建立影片內容。主要支援 Claude Code 平台,利用 Remotion 的程式化影片生成能力,結合 AI 引導的配置管理。技能運作方式:用戶提供場景描述、腳本文字與媒體路徑,Claude Code 解析後調用 Remotion 渲染輸出 MP4 格式影片,可自訂解析度、長度與過場效果。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add elrufaiforexfx22-creator/claudecode-video-maker

在你喜歡的 AI 中提問

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

說明文件

視頻製作工具 是做什麼的?

使用單一配置文件,通過 Claude Code 控制 Remotion 模板,生成行銷影片。

概述

此技能讓使用者能透過單一的配置文件(例如 video-config.json)定義場景、腳本及媒體資源,再由 Claude Code 解讀並控制 Remotion 渲染引擎,自動產生高品質的行銷影片。

如何運作

  1. 建立一個 JSON 配置文件,定義影片的場景順序、每個場景的視覺元素(背景、文字、圖像或影片片段)、腳本文字及時間軸。
  2. 將此檔案提供給 Claude Code,它會依據配置使用 Remotion 模板產生影片。
  3. Remotion 會根據給定的結構渲染出 MP4 格式的輸出。

先決條件

  • Node.js(版本 18 或更高)
  • Remotion 已安裝於專案中
  • Claude Code CLI 工具

使用方式

1. 準備配置文件

在你的專案根目錄中,建立一個 video-config.json 檔案,結構如下:

{
  "projectName": "行銷影片",
  "outputFileName": "output.mp4",
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "durationInFrames": 300,
  "scenes": [
    {
      "type": "intro",
      "durationInFrames": 90,
      "background": "#1a1a2e",
      "text": "歡迎觀看",
      "fontSize": 80,
      "fontColor": "#ffffff"
    },
    {
      "type": "content",
      "durationInFrames": 120,
      "background": "#16213e",
      "media": "path/to/video.mp4",
      "text": "這是我們的新產品"
    },
    {
      "type": "cta",
      "durationInFrames": 90,
      "background": "#0f3460",
      "text": "立即訂閱!",
      "buttonColor": "#e94560"
    }
  ]
}

2. 配置 Remotion 模板

確保你有現成的 Remotion 專案。如果沒有,可以從 Remotion 範本開始:

npx create-video

3. 引入配置文件

在你的 Remotion 元件中,從 JSON 檔案讀取配置:

import config from './video-config.json';

const MyComposition = () => {
  return (
    <Sequence from={0} durationInFrames={config.durationInFrames}>
      {config.scenes.map((scene, index) => (
        <Scene key={index} {...scene} />
      ))}
    </Sequence>
  );
};

4. 透過 Claude Code 執行

開啟 Claude Code 並導航到你的專案目錄。然後執行:

使用 video-config.json 生成我的影片

Claude Code 將解析配置並調用 Remotion 渲染你的影片。

支援的功能

  • 背景顏色或漸層
  • 文字疊加與多種字型
  • 影片與圖片媒體軌道
  • 時間軸控管(持續時間、場景順序)
  • 可自訂的過場效果
  • 多語言腳本支援
  • 浮水印與圖示

範例

基本影片

{
  "scenes": [
    { "type": "intro", "text": "你好,世界" },
    { "type": "content", "media": "demo.mp4" },
    { "type": "outro", "text": "感謝觀看" }
  ]
}

疑難排解

  • 確保 Remotion 已安裝:若遇到渲染錯誤,請執行 npx remotion version 確認。
  • 檢查檔案路徑:配置中的 media 路徑應相對於專案根目錄。
  • 格式限制:目前僅支援 MP4 輸出。對於其他格式,請修改 Remotion 渲染設定。
  • 無效的 JSON:使用 jq . video-config.json 驗證你的配置文件。

授權條款

MIT

相關技能