Skill: viral-video-replicator
Overview
Reverse-engineer reference videos (e.g., competitor viral content) into replicable Seedance 2.0 prompts. The pipeline: FFmpeg frame extraction -> contact sheet grids -> audio extraction + ASR transcription -> Vision LLM structured analysis -> Seedance prompt assembly with optional material replacement (face/body/clothing). Supports single and batch modes.
When to Activate
User query contains any of:
- - "视频复刻", "视频逆向", "反编译视频", "复刻爆款"
- "分析这个视频", "replicate this video", "video analysis"
- "批量分析", "批量复刻"
- "这个视频怎么拍的", "帮我分析一下这个爆款", "我想拍一个类似的视频"
- "reverse engineer this video", "analyze this fashion video"
Do NOT activate for:
- - Creating fashion videos from scratch (no reference video) -> use INLINECODE0
- "帮我做个穿搭视频", "生成模特图" -> use INLINECODE1
- Pure video editing / trimming -> not applicable
- Non-fashion video analysis -> not applicable
Prerequisites
Local tools (REQUIRED):
CODEBLOCK0
Cloud APIs (collected via clarification):
CODEBLOCK1
Clarification Flow
Phase 1: API Key Acquisition
Ask IN ORDER. Use plain language — explain WHY each service is needed.
Q1: Vision Analysis (REQUIRED)
"分析视频内容需要一个能'看懂图片'的 AI 模型。
它会看视频的截图,识别出人物长相、服装细节、场景布局、动作时间轴。
你有火山方舟的账号和 API Key 吗?还需要视觉模型的ID。"
If no API key -> STOP. Guide user to 火山方舟. Do NOT proceed.
Q2: Speech Transcription (CONDITIONAL)
"参考视频里的人有说话吗?
如果有对话,需要用语音转文字来提取台词 — 这样复刻出的视频才能有完整的对白内容。
没有对话的纯画面视频可以跳过这步。"
If yes -> ask for ASRACCESSTOKEN.
Q3: Audio Storage (CONDITIONAL — only if Q2 = yes)
"语音转文字需要通过云存储传输音频文件。
需要火山引擎对象存储(TOS)的 4 个信息:Access Key, Secret Key, Bucket, Region。"
If user has ASR but no TOS -> warn: "没有 TOS 则 ASR 无法工作,等同于没有语音转录。"
Phase 2: Mandatory Recommendations
MUST show. Each item has WHY explanation:
CODEBLOCK2
Phase 3: Mode Selection
"你要分析几个视频?单个还是批量?"
Q5: Replicate Mode (per video if batch)
"你想怎么复刻?
- - 精确复刻: 逐帧分析每个细节,尽可能1:1还原
- 提取改写: 提取爆款节奏和逻辑,用新方式重新演绎"
Q6: Material Replacement (per video if batch)
"要替换视频中的哪些元素?
- - 不换(纯复刻)
- 换人脸/身材(上传模特参考图)
- 换衣服(上传商品图)
- 都换(上传模特图 + 商品图)"
Batch-Specific Recommendations
CODEBLOCK3
Four Replacement Modes
| Mode | What User Uploads | @image Tags in Prompt | What Gets Replaced |
|---|
| clone | Nothing | None (pure text) | Nothing — exact replication |
| face_swap |
Face/body reference | @image1 = face ref | Person replaced, clothing preserved |
| outfit_swap | Garment product image | @image1 = garment | Clothing replaced, person preserved |
| full_swap | Garment + face reference | @image1 = garment, @image2 = face ref | Both replaced |
Mode auto-determination:
CODEBLOCK4
Core Workflow
Step 0: Environment Check (mandatory, never skip)
CODEBLOCK5
- - Returns version -> proceed to Step 1
- INLINECODE2 -> guide install (brew/apt/choco). Still fails after install ->
Soft fallback: Ask user: "FFmpeg 不可用,你能手动提供视频截图和音频文件吗?"
If user provides frames manually -> skip FFmpeg steps, proceed from Step 4 (Vision analysis) with user-provided images.
Quality warning (MUST show to user): "手动截图模式下分析质量会显著降低:无精确时间戳标注、无均匀3fps采样、帧数可能不足导致动作时间轴不准确。建议安装 FFmpeg 以获得最佳效果。"
If user cannot provide frames ->
STOP. FFmpeg is required for automated extraction.
Step 0b: Verify API Key (before reaching Step 4)
Validate ARKAPIKEY early to avoid wasting FFmpeg processing time on an invalid key:
If bash/Python available:
resp = httpx.get(f"{ARK_API_BASE}/api/v3/models",
headers={"Authorization": f"Bearer {ARK_API_KEY}"}, timeout=10)
- - 200 -> proceed
- 401/403 -> STOP. Key invalid. Fix before continuing.
If no code execution: Trust user-provided key, validate on first Vision API call.
Single Mode
CODEBLOCK7
Batch Mode
CODEBLOCK8
Output Validation (mandatory, never skip)
Before delivering results, verify ALL:
- - [ ] Analysis JSON is valid and contains all required fields?
- [ ] Prompt correctly uses @image tags matching the replacement mode?
- [ ] If clone mode: prompt has NO @image references (pure text)?
- [ ] If outfitswap/fullswap: prompt includes "Do not alter clothing pattern, color, texture or style"?
- [ ] If has_speech: dialogue content is present in prompt (not empty)?
- [ ] SOP upload instructions match the number of images for this mode?
- [ ] Replacement summary correctly lists what was preserved vs replaced?
Any NO -> fix before delivering. Do NOT send unvalidated output.
Error Handling
| Failure | Detection | Action |
|---|
| FFmpeg not installed | INLINECODE3 | STOP. Provide install command. Do NOT proceed. |
| No API key |
ARK
APIKEY empty |
STOP. Guide user to 火山方舟. Do NOT proceed. |
| Vision model error | 4xx/5xx from API | Report error with model ID used. Suggest checking model availability. |
| Vision returns invalid JSON | JSON parse fails | Retry once with same grids. Still fails -> report raw response for debugging. |
| Frame extraction fails | FFmpeg non-zero exit | Check video format. Try re-encoding. Report if still fails. |
| No audio track | extract_audio returns None | Skip ASR. Proceed with visual-only analysis. Note in output: "No audio detected." |
| TOS upload fails | Upload exception after 2 retries | Skip ASR. Proceed visual-only. Warn: "Audio transcription unavailable — dialogue will be missing." |
| ASR timeout | No result after 120s | Skip transcript. Proceed visual-only. Warn: "Speech transcription timed out." |
| ASR silent audio | Status 20000003 | Normal — video has no speech. Proceed with visual-only. |
| Video too large | >200MB | Reject immediately. Ask user to compress or trim. |
| Batch video fails | Exception during pipeline | Mark failed with error. Continue remaining. Report partial results. |
Degraded Modes (graceful degradation chain)
| Failure Point | Degraded Mode | What User Still Gets | Quality Impact |
|---|
| ASR fails (TOS/timeout) | Visual-only analysis | Prompt with visual descriptions, no dialogue | ~50% fidelity — all spoken content lost |
| Vision exact mode fails |
Auto-retry with rewrite mode | Flat analysis (less precise) | ~70% fidelity — loses nested structure (clothing/scene subfields) |
| Vision rewrite also fails | Return raw materials | Frame grids + transcript for manual analysis | ~20% — no automated analysis, user must write prompt manually |
| Seedance prompt assembly fails | Return analysis only | Analysis JSON + transcript | ~30% — user has data but no ready-to-use prompt |
| FFmpeg unavailable (user provides screenshots) | Manual frame mode | Analysis from user-provided images | ~40% — no timestamps, uneven sampling, incomplete frame coverage |
Always prefer delivering partial results over delivering nothing. Every degraded output MUST clearly state: (1) what is missing, (2) why, and (3) the estimated quality impact.
See references/fallbacks.md for detailed recovery procedures per failure case.
Usage Example
Input: "帮我复刻这个爆款视频,换成我的衣服" + uploaded video (15s, 720p) + uploaded garment image
Resolved: mode=exact, replacement=outfitswap (garmentref provided, no face_ref)
Output 1 — Structured Analysis:
CODEBLOCK9
Output 2 — Seedance Prompt (outfit_swap):
CODEBLOCK10
Output 3 — Transcript: "姐妹们你们快看...这个面料是醋酸缎面的..."
Output 4 — SOP: outfit_swap mode, 1 image upload (@图片1=garment)
Output 5 — Replacement Summary: garmentreplaced=true, originalpreserved=[face, body, scene, actions, dialogue, camera]
Domain Knowledge Role Declaration
The reference files contain FFmpeg specs, ASR protocols, Vision prompts, and prompt assembly templates.
Their role is to assist pipeline execution — providing exact API formats, analysis schemas, and assembly rules.
They do NOT replace the execution workflow. Never output reference content directly as the final answer.
Always execute: extract frames -> transcribe -> analyze -> assemble -> validate -> deliver.
References
TOS upload protocol, Seed-ASR-2.0 submit/poll API | Step 3: transcribing audio |
|
references/vision-analysis.md | Vision LLM prompts for exact and rewrite modes, output schemas | Step 4: analyzing video |
|
references/reverse-prompt.md | 4-mode prompt assembly, clothing generalization map, SOP templates | Step 6-7: building prompt and SOP |
|
references/fallbacks.md | 8 failure cases with recovery procedures and degradation chain | On any error during Steps 2-8 |
技能:爆款视频复刻器
概述
将参考视频(例如竞品爆款内容)逆向工程为可复现的 Seedance 2.0 提示词。流程:FFmpeg 帧提取 -> 联系表网格 -> 音频提取 + ASR 转录 -> 视觉大模型结构化分析 -> Seedance 提示词组装,可选素材替换(人脸/身体/服装)。支持单视频和批量模式。
何时激活
用户查询包含以下任一内容:
- - 视频复刻, 视频逆向, 反编译视频, 复刻爆款
- 分析这个视频, replicate this video, video analysis
- 批量分析, 批量复刻
- 这个视频怎么拍的, 帮我分析一下这个爆款, 我想拍一个类似的视频
- reverse engineer this video, analyze this fashion video
以下情况不激活:
- - 从零创建时尚视频(无参考视频)-> 使用 fashion-video-creator
- 帮我做个穿搭视频, 生成模特图 -> 使用 fashion-video-creator
- 纯视频剪辑/修剪 -> 不适用
- 非时尚视频分析 -> 不适用
前置条件
本地工具(必需):
bash
macOS
brew install ffmpeg
Linux
apt install ffmpeg
验证
ffmpeg -version && ffprobe -version
云 API(通过澄清收集):
必需:ARKAPIKEY + ARKVISIONMODEL(用于帧分析的视觉大模型)
条件性:ASRACCESSTOKEN(如果视频有对话)
条件性:TOS 凭证(如果需要 ASR — 音频通过 TOS 传输)
澄清流程
第一阶段:API 密钥获取
按顺序询问。使用通俗语言 — 解释每个服务的必要性。
问题1:视觉分析(必需)
分析视频内容需要一个能看懂图片的 AI 模型。
它会看视频的截图,识别出人物长相、服装细节、场景布局、动作时间轴。
你有火山方舟的账号和 API Key 吗?还需要视觉模型的ID。
如果没有 API 密钥 -> 停止。 引导用户前往火山方舟。不要继续。
问题2:语音转录(条件性)
参考视频里的人有说话吗?
如果有对话,需要用语音转文字来提取台词 — 这样复刻出的视频才能有完整的对白内容。
没有对话的纯画面视频可以跳过这步。
如果是 -> 询问 ASRACCESSTOKEN。
问题3:音频存储(条件性 — 仅当问题2 = 是)
语音转文字需要通过云存储传输音频文件。
需要火山引擎对象存储(TOS)的 4 个信息:Access Key, Secret Key, Bucket, Region。
如果用户有 ASR 但没有 TOS -> 警告:没有 TOS 则 ASR 无法工作,等同于没有语音转录。
第二阶段:强制性建议
必须展示。每项都有原因说明:
============================================================
API 配置 — 强制性建议
============================================================
[必需] 视觉模型:doubao-seed-1-6-vision-250815 或更新版本
原因:旧模型无法区分服装面料纹理(醋酸 vs 雪纺)、缝线细节(包边 vs 毛边)、
或版型细微差别(修身 vs A字)。分析质量下降约60%。
[必需] 如果视频有对话:配置 BOTH ASR + TOS
原因:没有 ASR,所有口语内容都会丢失。生成的提示词仅包含视觉描述。
视频保真度从约90%下降到约50%,因为对话驱动了40%以上的观众参与度。
TOS 是音频传输管道 — 没有 TOS 意味着没有 ASR。
[必需] 视频分辨率:720p 或更高
原因:帧以 360x640 缩略图提取。低于 480p 的源意味着缩略图是放大后的垃圾 —
服装图案和纹理变成无法识别的色块。
[推荐] 精确模式用于同类别替换
原因:exact 进行嵌套结构化分析(10个字段,带类型化子对象)—
当用一件连衣裙替换另一件时,精度至关重要。
rewrite 进行扁平分析(10个字符串字段)— 更适合跨不同产品类别提取爆款逻辑。
============================================================
第三阶段:模式选择
你要分析几个视频?单个还是批量?
问题5:复刻模式(批量模式下每个视频)
你想怎么复刻?
- - 精确复刻: 逐帧分析每个细节,尽可能1:1还原
- 提取改写: 提取爆款节奏和逻辑,用新方式重新演绎
问题6:素材替换(批量模式下每个视频)
要替换视频中的哪些元素?
- - 不换(纯复刻)
- 换人脸/身材(上传模特参考图)
- 换衣服(上传商品图)
- 都换(上传模特图 + 商品图)
批量模式特定建议
============================================================
批量模式 — 额外建议
============================================================
[必需] 所有视频应为 720p+
原因:一个低分辨率视频不仅自身失败 — 还会浪费调用视觉大模型的 API 成本,
而返回的分析结果不可用。
[推荐] 按复刻模式预分类
原因:精确模式每个视频需要 2-3 分钟(嵌套分析),改写模式需要 1-2 分钟
(扁平分析)。分组可避免上下文切换。
[警告] 每个视频独立运行完整流程。
N 个视频 ≈ N * 2-3 分钟。请相应规划。
============================================================
四种替换模式
| 模式 | 用户上传内容 | 提示词中的 @图片 标签 | 被替换的内容 |
|---|
| 克隆 | 无 | 无(纯文本) | 无 — 精确复制 |
| 换脸 |
人脸/身材参考图 | @图片1 = 人脸参考 | 人物被替换,服装保留 |
| 换装 | 服装商品图 | @图片1 = 服装 | 服装被替换,人物保留 |
| 全换 | 服装 + 人脸参考图 | @图片1 = 服装,@图片2 = 人脸参考 | 两者都被替换 |
模式自动判定:
有人物参考 AND 有服装参考 -> 全换
仅有服装参考 -> 换装
仅有人物参考 -> 换脸
两者皆无 -> 克隆
核心工作流
步骤 0:环境检查(必需,从不跳过)
bash
ffmpeg -version && ffprobe -version
- - 返回版本 -> 进入步骤 1
- command not found -> 引导安装(brew/apt/choco)。安装后仍然失败 ->
软降级: 询问用户:FFmpeg 不可用,你能手动提供视频截图和音频文件吗?
如果用户手动提供帧 -> 跳过 FFmpeg 步骤,从步骤 4(视觉分析)开始,使用用户提供的图片。
质量警告(必须向用户展示): 手动截图模式下分析质量会显著降低:无精确时间戳标注、无均匀3fps采样、帧数可能不足导致动作时间轴不准确。建议安装 FFmpeg 以获得最佳效果。
如果用户无法提供帧 ->
停止。 FFmpeg 是自动提取所必需的。
步骤 0b:验证 API 密钥(在到达步骤 4 之前)
尽早验证 ARKAPIKEY,避免因无效密钥浪费 FFmpeg 处理时间:
如果 bash/Python 可用:
python
resp = httpx.get(f{ARKAPIBASE}/api/v3/models,
headers={Authorization: fBearer {ARKAPIKEY}}, timeout=10)
- - 200 -> 继续
- 401/403 -> 停止。 密钥无效。修复后再继续。
如果无法执行代码: 信任用户提供的密钥,在首次视觉 API 调用时验证。
单视频模式
步骤 1:收集 API 密钥 + 模式 + 替换素材
步骤 2:提取帧网格(3fps)+ 提取音频 — 通过 asyncio.gather() 并行执行
(两者都是通过 Python 并发启动的 FFmpeg 子进程,不是大模型级别的并行)
阅读 references/frame-extraction.md 了解 FFmpeg 规范
步骤 3:上传音频到 TOS -> ASR 转录
阅读 references/asr-pipeline.md 了解协议
步骤 4:视觉大模型分析(网格 + 转录 -> 结构化 JSON)
阅读 references/vision-analysis.md 了解精确与改写模式的架构
步骤 5:根据上传的素材确定替换模式
步骤 6:组装 Seedance 2.0 提示词
阅读 references/reverse-prompt.md 了解 4 种模式的组装