Skip to content
Back to search

dance-video-to-prompt

本地短视频反推 AI 视频生成提示词:抽帧、清晰度、节奏卡点、Agent Skill

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/cattlez--dance-video-to-prompt/badge.svg)](/listings/cattlez--dance-video-to-prompt)

HTML

<a href="/listings/cattlez--dance-video-to-prompt"><img src="/api/listings/cattlez--dance-video-to-prompt/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 197 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # dance-video-to-prompt
  2. 把 **本地短视频**(跳舞 / 姿态 / 变装 / 旅行打卡 / 穿搭行走等,优先 ≤10s)反推成可直接用于 AI 视频生成的结构化 Prompt。
  3. 仓库:https://github.com/CattleZ/dance-video-to-prompt
  4. 能力包含:密帧抽帧、**关键帧清晰度检测与邻帧救援**、**音轨节奏/BPM 分析**、画面事实观察、节奏卡点融合、7 段生成提示词。
  5. 看图须分析 **人物身材特征**、**穿搭颜色与样式**、**拍摄场景**、**拍摄方法 / 运镜 / 关注重点** 与面部表情。
  6. 动作清单强制含:**左右肢、角度/幅度、手型、视线、面部表情(含变化)**。
  7. ## 快速开始
  8. ```bash
  9. # 1. 环境
  10. bash scripts/setup.sh
  11. # 2. 抽帧 + 清晰度 + 节奏(Agent 模式工作包)
  12. bash skills/dance-video-to-prompt/scripts/run_extract.sh /path/to/video.mp4
  13. # 3. 安装 Skill 到本机 Grok / Claude 目录(可选)
  14. bash skills/dance-video-to-prompt/scripts/install.sh
  15. ```
  16. 输出目录默认在 `output/<视频名>_<时间戳>/`(该目录不入库)。
  17. ## 输出模板(固定 7 段)
  18. | 模块 | 作用 |
  19. |------|------|
  20. | 视觉风格 | 画质、构图、光影、色调 |
  21. | 场景叙述 | 人物(含身材体型特征)、穿搭(颜色与样式)、气质 |
  22. | 拍摄场景 | 场所、空间关系、背景、地面、陈设、时空与环境光 |
  23. | 摄影技术 | 拍摄方法、运镜、关注重点、机位、焦段、灯光、情绪 |
  24. | 动作清单 | 带时间;**强制**含左右肢、角度/幅度、手型、视线 |
  25. | 对话/文字 | 对白与字幕 |
  26. | 背景声音 | BGM 风格、BPM 与卡点关系 |
  27. ---
  28. ## 两个版本
  29. | | **A. Skill / Agent 版(推荐默认)** | **B. CLI / API 版** |
  30. |--|-------------------------------------|---------------------|
  31. | 谁做「看懂画面」 | **当前 CLI Agent 的多模态看图** | 外部视觉模型 HTTP API |
  32. | 是否调 Vision API | **否** | 是 |
  33. | 适用 | 交互式、准确可控、免配 API | 批量、无人值守、CI |
  34. | 入口 | Skill `dance-video-to-prompt` 或 `extract_frames.sh` | `analyze_api.sh` |
  35. | 模型依赖 | 会话里的 Grok/Claude 等(能 read 图片) | `VISION_MODEL` + 网关 Token |
  36. 两种版本 **共用**:
  37. - 抽帧逻辑(密帧)
  38. - 三阶段流程(事实 → 模板 Prompt → 校验)
  39. - 同一套 7 段输出契约
  40. ```text
  41. 本地视频
  42. │
  43. ▼
  44. scripts/extract_frames.sh ← 共用,无 API
  45. │
  46. ├──────────── Agent/Skill 版 ────────────┐
  47. │ Agent read_file 看帧 │
  48. │ → analysis.json → prompt.md │
  49. │ │
  50. └──────────── API 版 ─────────────────────┤
  51. analyze_api.sh → Vision API 三阶段 ────┘
  52. ```
  53. ---
  54. ## A. Skill / Agent 版(不调 API)
  55. ### 方式 1:在 Grok/CLI 里用 Skill
  56. 触发示例:
  57. - `/dance-video-to-prompt`
  58. - 「把这个跳舞视频反推成生成提示词:/path/to/a.mp4」
  59. Agent 会:
  60. 1. 运行抽帧脚本
  61. 2. 自己看关键帧图片
  62. 3. 写出 `analysis.json` + `prompt.md`
  63. **Skill 主副本(随仓库复用):**
  64. ```text
  65. skills/dance-video-to-prompt/
  66. ```
  67. 同步到本机各 Agent(修改 skill 后请再执行):
  68. ```bash
  69. bash skills/dance-video-to-prompt/scripts/install.sh
  70. ```
  71. 会安装到:
  72. - `.grok/skills/dance-video-to-prompt/`(项目 Grok 发现)
  73. - `~/.grok/skills/dance-video-to-prompt/`
  74. - `~/.agents/skills/dance-video-to-prompt/`
  75. - `~/.claude/skills/dance-video-to-prompt/`(若存在)
  76. ### 方式 2:手动只抽帧,再让 Agent 继续
  77. ```bash
  78. bash scripts/setup.sh # 首次
  79. bash scripts/extract_frames.sh /path/to/dance.mp4
  80. # 或
  81. bash scripts/analyze.sh /path/to/dance.mp4 --mode agent
  82. ```
  83. 输出目录内会有:
  84. - `frames/` — 关键帧
  85. - `frames_meta.json`
  86. - `AGENT_INSTRUCTIONS.md` — 给 Agent 的完整步骤
  87. 然后在对话里让 Agent「按 AGENT_INSTRUCTIONS 完成分析」。
  88. ---
  89. ## B. CLI / API 版(调视觉 API)
  90. ```bash
  91. # 1. 配置
  92. cp config/settings.example.env config/settings.env
  93. # 填写 ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN / VISION_MODEL
  94. # VISION_MODEL 必须支持看图
  95. # 2. 一键分析
  96. bash scripts/analyze_api.sh /path/to/dance.mp4
  97. # 更高精度抽帧
  98. bash scripts/analyze_api.sh /path/to/dance.mp4 --interval 0.25
  99. # 跳过校验轮(更快)
  100. bash scripts/analyze_api.sh /path/to/dance.mp4 --no-verify
  101. ```
  102. ---
  103. ## 输出目录
  104. ```text
  105. output/<视频名>_<时间戳>/
  106. frames/
  107. frames_meta.json
  108. AGENT_INSTRUCTIONS.md # 仅 agent 模式
  109. analysis.json # 分析完成后
  110. prompt.md # 最终可复制 Prompt
  111. run_meta.json # 仅 api 模式
  112. ```
  113. `output/` 为运行产物,默认不提交到 Git。
  114. ---
  115. ## 流水线(准确率)
  116. 1. **高密度抽帧**(默认 0.33s,可 0.25s)
  117. 2. **清晰度检测 + 邻帧救援**
  118. 3. **节奏分析**(BPM / 拍点)
  119. 4. **阶段一**:事实观察 → JSON(含身材、穿搭、拍摄场景、运镜、表情)
  120. 5. **阶段二**:改写 7 段生成 Prompt
  121. 6. **阶段三**:对照事实校验
  122. 不做关节坐标级动作重建;动作以可生成的时间轴文字为准。
  123. ---
  124. ## 依赖
  125. - Python 3.10+
  126. - `opencv` + `Pillow`(抽帧,两种模式都要)
  127. - `httpx`(仅 API 模式)
  128. ```bash
  129. bash scripts/setup.sh
  130. ```
  131. ---
  132. ## 脚本一览
  133. | 脚本 | 作用 |
  134. |------|------|
  135. | `scripts/setup.sh` | 安装依赖 |
  136. | `scripts/extract_frames.sh` | 只抽帧 + Agent 工作包 |
  137. | `scripts/check_frame_quality.sh` | 关键帧清晰度检测与邻帧救援 |
  138. | `scripts/analyze_rhythm.sh` | 音轨节奏 / BPM 分析 |
  139. | `scripts/analyze.sh` | 通用入口(`--mode agent\|api`) |
  140. | `scripts/analyze_api.sh` | API 全自动 |
  141. | `skills/dance-video-to-prompt/scripts/run_extract.sh` | Skill 入口:抽帧 + 清晰度 + 节奏 |
  142. | `skills/dance-video-to-prompt/scripts/install.sh` | 同步 Skill 到本机 Agent 目录 |

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.