video-storyboard-expert

Video-Storyboard Bidirectional Expert: when a user uploads a storyboard (text/document/image), it enters “script→video” mode to generate shot-by-shot assets via VideoGen and assemble an MP4 with ffmpeg; when a user uploads a video file, it enters “video→script” mode using ffmpeg scene-change detection and frame extraction to decompose the video into a structured storyboard. Suited for video creation, derivative works, instructional breakdowns, and platform publishing scenarios.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "video-storyboard-expert" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4e70812181193acc243c1a53b8cc4c28e2e353050231c2f9d6a168784c18bb29. Verify the upstream source and version against https://skillhub.cn/skills/org-7u5sc1qh/video-storyboard-expert before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Video-Storyboard Bidirectional Expert: when a user uploads a storyboard (text/document/image), it enters “script→video” mode to generate shot-by-shot assets via VideoGen and assemble an MP4 with ffmpeg; when a user uploads a video file, it enters “video→script” mode using ffmpeg scene-change detection and frame extraction to decompose the video into a structured storyboard. Suited for video creation, derivative works, instructional breakdowns, and platform publishing scenarios.

0 Downloads

Introduction source: third_party · org-7u5sc1qh · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
Translation pending; see source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: video-storyboard-expert
description: 视频分镜双向专家。当用户上传分镜头脚本(文字/文档/图片)时进入「脚本→视频」模式,逐镜头调用 VideoGen 生成素材并用 ffmpeg 剪辑合成 MP4;当用户上传视频文件时进入「视频→脚本」模式,用 ffmpeg 场景切换检测 + 抽帧理解,反向拆解出结构化分镜头脚本。适用于视频创作、二创、教学拆解、平台发布等场景。
agent_created: true

视频分镜双向专家

Overview

一个支持两种互补工作流的分镜专家:

  • 模式一:脚本 → 视频。接收分镜头脚本,逐镜头生成视频素材,再用 ffmpeg 串联、加转场、混音、叠字幕,输出成片。
  • 模式二:视频 → 脚本。接收视频文件,检测场景切换边界,抽帧理解内容,反向输出结构化分镜头脚本(与模式一输入同构,可回灌形成闭环)。

两种模式共用同一套 ffmpeg 剪辑与交付能力。

模式判断(第一步,务必先做)

接收输入后,先判定走哪个模式:

  • 上传内容是分镜头脚本(纯文本、文档、图片形式的脚本)→ 模式一。
  • 上传内容是视频文件(mp4/mov/webm 等)→ 模式二。
  • 输入模糊(例如一句话描述但无明确文件)→ 先向用户确认,再继续。

本 Skill 按次收费 0.50 元/次(微信 Agent Pay,X402 协议)。首次调用会先走支付闸门,完整流程见「付费能力」一节。

模式一:脚本 → 视频

1. 接收并解析分镜头

读取脚本,结构化提取每个镜头的字段:序号、画面描述、时长、景别、运镜、转场、配音/配乐、字幕。

  • 缺失字段:给合理默认值并明确告知用户(如默认 1080p 横屏、默认硬切、默认无 BGM 需补充)。
  • 严重歧义:先澄清,不臆测。

2. 逐镜头生成视频素材

对每个镜头调用 VideoGen(文生视频),设置合理时长与分辨率。

  • 用户提供参考图时,改用图生视频(image-to-video)以保证人物/场景一致性。
  • 算力额度提示:每次生成前必须告知用户将消耗算力额度;逐镜头、逐条消息生成,避免同一条消息并行调用多个 VideoGen(时间戳相同会导致文件名碰撞覆盖)。

3. 素材准备

收集参考图、配音、背景音乐。无 BGM 时提示用户补充,或明确使用无版权音乐。尊重版权:所有素材须无版权或已授权。

4. 剪辑合成(ffmpeg)

统一各片段分辨率/帧率/像素格式,然后:

  • 用 xfade 加转场(硬切可省略)。多段串联的偏移公式见下。
  • 混入 BGM / 配音并做淡入淡出。
  • 叠加字幕与片头片尾。

详细命令与多段 xfade 偏移公式见 references/ffmpeg_workflows.md。可直接调用 scripts/concat_xfade.py 自动计算偏移并串联。

5. 质检与交付

检查:总时长、音画同步、转场平滑度、比例(横屏 16:9 / 竖屏 9:16)。输出 final.mp4 + 一句话制作说明(镜头数、总时长、转场/配乐)。

模式二:视频 → 脚本

1. 接收视频并确认目标

确认拆分粒度(默认按自然场景切换,单镜头 3–10s;过短并入相邻、过长再细分)。若有特定用途(二次创作 / 教学 / 平台发布)先确认。

版权提示:拆解的视频须为用户自有或已授权内容。

2. 镜头边界检测

用 ffmpeg 场景切换检测找候选切点:

ffmpeg -i <视频> -filter:v "select='gt(scene,0.3)',showinfo" -f null - 2>&1

解析输出中的 pts_time 得到切点时间戳;结合总时长得到各镜头区间。阈值 0.3 可按画面跳跃程度调整(动作片调低,慢直播调高)。

也可直接调用 scripts/scene_detect.py <视频> [--threshold 0.3] 输出镜头区间列表。

3. 区间整理

  • 合并 <2s 的过短片段到相邻镜头。
  • 对 >15s 的长镜头做二次细检测或按内容再分。
  • 得到最终镜头列表(序号、起止时间、时长)。

4. 内容理解

对每段抽取代表帧(取区间中点):

ffmpeg -ss <中点> -i <视频> -frames:v 1 frame_xx.jpg

用 Read 工具查看图片,生成画面描述、景别、运镜、主体与动作。描述必须准确反映抽帧所见,不臆造画面细节。

5. 输出分镜头脚本

采用与模式一输入同构的格式,便于回灌模式一形成闭环,例如:

镜头 1|8 秒|入小院,落座
画面:夏日农家小院青瓦屋檐、竹椅木桌;中年女性走入画面坐下闭目。
景别:全景→中景 运镜:缓慢推拉 转场:淡入淡出
音效/配乐:蝉鸣、微风 字幕:(可选)

并附每段起止时间戳便于回查。

6. 质检与交付

核对:镜头数、总时长与源视频一致、无遗漏区间、描述准确。交付文本分镜头脚本 + 带时间戳的切点清单。

运行环境要点(实测经验,务必遵守)

  • VideoGen 落点:output_dir 在部分环境下会被解析到带额外层级的路径(如多一层目录)。生成后用 Glob / 文件管理器确认实际文件位置,再交给 ffmpeg。
  • ffmpeg 获取:环境缺 ffmpeg 时,用 pip install imageio-ffmpeg 获取内置二进制。该 ffmpeg 为原生 Windows 程序,传入的路径必须写成 G:/... 形式,不能写 /g/...。
  • 并行生成陷阱:同一条消息并行调用多个 VideoGen 会因时间戳相同导致文件名碰撞覆盖,务必逐条(每条独立消息)生成。
  • 多段 xfade 串联:设 N 段时长 d0..d_{N-1}、转场时长 T,第 i 个(i 从 1 起)xfade 的 offset = sum(d0..d_{i-1}) - i*T;总时长 = sum(d) - (N-1)*T。要求所有片段同分辨率/帧率/像素格式。

输出规范

  • 成品格式:MP4(H.264 视频 + AAC 音频),默认 1080p;竖屏按 9:16。
  • 模式一交付:成片文件 + 一句话制作说明(镜头数、总时长、转场/配乐)。
  • 模式二交付:文本分镜头脚本 + 带时间戳切点清单。
  • 进度通报:每完成一个阶段向用户简要反馈。

注意事项

  • 优先确认信息完整;缺失字段给默认并说明,不默默假设。
  • 尊重版权:背景音乐/素材须无版权或已授权;模式二拆解的视频须为用户自有或已授权内容。
  • VideoGen 生成消耗额度,生成前必须提示;逐镜头生成,避免一次性超限。
  • 成片比例对齐目标平台(抖音/视频号竖屏、B站/YouTube 横屏)。
  • 模式二的描述应准确反映抽帧所见,不臆造画面细节。

付费能力(按次收费:0.50 元/次)

本 Skill 通过微信 Agent Pay(X402 协议,SkillHub 平台)实现按次收费,每次成功调用收费 0.50 元(CNY)。改造包含两部分:本节的 Skill Prompt 流程 + 商户后端服务(见 references/agent_pay_backend.md 与 scripts/pay_server.py)。

付费前置检查

调用本 Skill 前,检查当前 Agent 是否已安装微信支付能力(weixinpay-pay 等):

  • 已安装:可继续提供付费服务。
  • 未安装:提示"当前 Agent 暂不支持微信支付付费能力",终止流程。

工作流程

商户端点已配置为 https://bjqh.top/demo/skill/invoke(HTTPS 已上线,部署见 scripts/deploy.md),单次金额 amount = 0.50 CNY(注意:微信支付 Native 下单接口用「分」,即 50 分;402 响应体里用「元」字符串 "0.50")。

第一步:请求资源

POST https://bjqh.top/demo/skill/invoke
Content-Type: application/json

{"query": "用户的原始需求"}

第二步:处理 402 响应

若返回 HTTP 402,从响应中提取并保存两样东西:

  • Header WeixinPay-Required:支付码(payment_code)
  • Header X-Out-Trade-No:订单号(out_trade_no)

第三步:发起支付

将 WeixinPay-Required 的值作为 paymentCode,调用 weixinpay-pay 向用户申请支付授权;用户确认并完成支付。

第四步:支付成功后获取资源(⚠️ 必须执行,最易被遗漏)

再次 POST https://bjqh.top/demo/skill/invoke,Body 与第一步完全一致,仅在 Header 中携带第二步保存的值:

POST https://bjqh.top/demo/skill/invoke
WeixinPay-Required: <第二步保存的支付码>
X-Out-Trade-No: <第二步保存的订单号>
Content-Type: application/json

{"query": "用户的原始需求"}

收到 HTTP 200 即视为支付成功(paid_ok),随即开始本地执行分镜工作流(模式一/模式二)。不携带 X-Out-Trade-No 重试则永远拿不到授权。

说明:本 Skill 的核心产出(视频 / 分镜脚本)由本地生成,故商户端点仅承担"支付闸门 + 履约确认"职责;收到 200 后由本地继续完成生成,而非由端点直接回传大文件。幂等:同一 out_trade_no 只履约一次,重复请求返回缓存结果。

Resources

scripts/

  • scene_detect.py — ffmpeg 场景切换检测封装,输出镜头区间(序号、起止、时长)。
  • concat_xfade.py — 多段片段按 xfade 串联,自动计算偏移并合成,避免手工算错。
  • pay_server.py — 生产级微信 Agent Pay 商户端点:真实微信支付 V3 签名(Native 下单/查单)、SkillHub L1/L2 签名生成 WeixinPay-Required、/notify 回调验签解密、幂等;密钥全部走 .env,缺密钥自动降级 DEMO 模式。金额 0.50 元。
  • setup.sh — 腾讯云 CVM 一键部署脚本:自动装 Docker、构建、起服务、配 HTTPS(Nginx+Let's Encrypt)、开防火墙、健康检查并打印对外地址(见 deploy.md 主推路径)。
  • requirements.txt / Dockerfile / deploy.md / .env.example — 部署产物(Docker / 云函数 / 裸机)。

references/

  • ffmpeg_workflows.md — 场景检测、xfade 串联偏移公式、音画合成、字幕叠加等命令与坑点合集。
  • agent_pay_backend.md — 付费协议详解、后端契约、WeixinPay-Required 生成(SkillHub 开发者密钥签名)与 查单验证要点,金额 0.50 元。

Current listing version

1.0.0

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value92/100

Highlights

  • 提供脚本→视频和视频→脚本双向闭环工作流,显著提升视频创作与拆解效率
  • 适用于视频创作、二创、教学拆解、平台发布等多个高价值场景
Trigger Precision88/100

Highlights

  • 触发条件清晰区分上传分镜头脚本与视频文件两种模式
  • 边界定义明确,覆盖常见输入变体
Structure and Standards85/100

Areas to improve

  • 引用文件缺失 Reported severity: Minor

    SKILL.md 引用了 references/ffmpeg_workflows.md 和 scripts/concat_xfade.py,但未传入对应文件

    Recommendation: 请补充被引用的参考文件和脚本文件,确保用户可完整执行流程

Highlights

  • Phase 划分清晰,包含模式判断、详细执行步骤和出口条件
  • 提供端到端示例和运行环境要点,结构完整规范
Execution Reliability90/100

Areas to improve

  • 引用文件缺失 Reported severity: Minor

    scripts/concat_xfade.py 被直接调用但未传入,可能导致执行失败

    Recommendation: 请补充被引用的脚本文件,或明确说明其为可选辅助工具

Highlights

  • 工具来源明确(ffmpeg、VideoGen),参数设置合理
  • 覆盖主要异常场景(并行生成陷阱、路径格式、版权提示),具备支付闸门等确认机制
Evidence Verifiability (mean of the first four)89/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 118
  • Accounts, secrets or authorization

    Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.

    Mentioned in main document · lines 194, 200
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • bjqh.top

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.