Plan 影片製作技能
適用範圍
前提:當前已開啟 Plan 協作(scenario(activate, plan) 已啟用),需要進行包含視覺/影片產出(生圖、短片、配音、字幕)的任務。
廠商選擇:生圖請參考 byted-ark-seedream-skill;生影片請參考 media-production 腳本(火山 Seedance)。其他廠商請見 agnes-media-generation / wan-media-generation / kling-media-generation。
憑證(環境變數)
在 設定 → 環境變數 新增技能要求的 KEY=VALUE(例如 VOLCENGINE_API_KEY / ARK_API_KEY)。也可在 設定 → 模型 → 創意媒體 填入其他廠商 Key。
| 能力 | 常用 KEY | 技能 |
|---|---|---|
| 生圖 | VOLCENGINE_API_KEY / ARK_API_KEY | byted-ark-seedream-skill |
| 生影片 | 同上 | media-production |
| Agnes | AGNES_API_KEY | agnes-media-generation |
核心變更:所有媒體工種(編劇、視覺策劃、美術、導演、後期)全部在 plan(goal, steps[]) 的 steps 中透過 assigned_agent 指定,plan 儲存後用戶確認即進入 executing 並依序執行,不再在 plan 之外單獨委派 subagent。
工作流程
用戶表達需求
↓
詢問並確認用戶需求(主題、時長、風格、畫幅等)
↓
直接用 plan(goal, steps[]) 規劃
step 1: media-screenwriter — 劇本/分鏡/口播
step 2: media-visual-planner — 生圖 prompt
step 3: media-artist — 生成關鍵影格
step 4: media-video-director — 出片 + 原生配音
step 5: media-post — 硬字幕
↓
用戶確認 → 執行(依序,每步驗收)
操作步驟
第一步:詢問用戶需求
主動向用戶收集以下資訊:
| 問題 | 範例 |
|---|---|
| 影片主題/產品/內容是什麼? | 新款智慧手錶宣傳 |
| 目標時長? | 15 秒 / 30 秒 |
| 視覺風格? | 科技感 / 溫暖 / 國風 |
| 畫幅比例? | 16:9 / 9:16 直式 |
| 口播文案方向? | 功能亮點 + 品牌 slogan |
| 是否有參考素材? | 參考圖 / 競品影片 |
第二步:確認後直接 plan
用戶確認需求後,直接用 plan 工具將所有步驟寫入結構化計畫:
plan(
goal="製作一支 15 秒產品宣傳短片,主題:xxx,風格:xxx",
steps=[
{
"step_id": 1,
"description": "編劇撰寫 production brief,包含 logline、分鏡、口播稿",
"assigned_agent": "media-screenwriter",
"expected_output": "outputs/production-brief.md",
"acceptance_criteria": "包含 User intent、logline、visual style、shot list、narration script"
},
{
"step_id": 2,
"description": "視覺策劃將分鏡轉為生圖 prompt",
"assigned_agent": "media-visual-planner",
"expected_output": "outputs/shot-prompts.json",
"depends_on": [1]
},
{
"step_id": 3,
"description": "美術生成首影格關鍵影格圖片",
"assigned_agent": "media-artist",
"expected_output": "outputs 內 PNG 關鍵影格",
"depends_on": [2]
},
{
"step_id": 4,
"description": "影片導演生成帶原生配音的 MP4",
"assigned_agent": "media-video-director",
"expected_output": "outputs/*.mp4",
"depends_on": [3]
},
{
"step_id": 5,
"description": "後期加硬字幕,交付最終 MP4",
"assigned_agent": "media-post",
"expected_output": "outputs/*-subtitled.mp4",
"depends_on": [4]
}
],
flowchart_mermaid="..."
)
第三步:用戶確認執行
plan 儲存後用戶確認「開始執行」,進入 executing 階段,各步驟按依賴順序依序執行,每步完成後主 Agent 驗收產物再進入下一步。
媒體子智能體清單
| assigned_agent | 職責 | 核心工具 |
|---|---|---|
media-screenwriter | 寫劇本、分鏡、口播稿 | read_file, write_to_file |
media-visual-planner | 寫生圖 prompt | read_file, write_to_file |
media-artist | Seedream 生圖(jimeng) | read_file, terminal → scripts/image_generate.py |
media-video-director | Seedance 圖生影片 + 原生配音 | read_file, terminal → scripts/video_generate.py, task_wait.py |
media-post | SRT 字幕 + ffmpeg 硬字幕 | read_file, terminal → scripts/subtitle_build.py, subtitle_burn.py |
注意:不要把 media-voice-director 放入步驟——Seedance 已原生帶聲(generate_audio=true 預設開啟)。
技術棧
腳本目錄:skills/public/media-production/scripts/(須先讀 media-production skill)
| 能力 | 腳本 | provider |
|---|---|---|
| 生圖 | image_generate.py | jimeng(火山方舟 Seedream) |
| 生影片 | video_generate.py + task_wait.py | jimeng(火山方舟 Seedance,預設帶聲) |
| 字幕 | subtitle_build.py + subtitle_burn.py | 本地 ffmpeg |
失敗處理:jimeng 失敗後禁止自動切換 wan/kling,提示用戶開啟 Ark 模型接入點。相同參數失敗最多重試 1 次。
常見錯誤
- 在 plan 模式下主會話直接執行
image_generate.py→ 應由 plan 步驟裡的media-artist等工種執行 - 在 plan 步驟外單獨委派 subagent → 所有工種應寫在 plan steps 的
assigned_agent中 - 跳過
task_wait.py→ 影片生成未完成就交付 - 預設管道仍委派
media-voice-director→ Seedance 已原生帶聲,多餘