video-to-shorts
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseVideo To Shorts
Video To Shorts
Dependencies
依赖项
/video-understandRequire / on PATH and Python with . Check them before processing media.
ffmpegffprobePillow/video-understand要求 / 位于 PATH 中,并要求 Python 环境中安装 。在处理媒体前检查这些条件。
ffmpegffprobePillowScope
范围
This skill has two project phases:
- Plan before render: map the understood transcript to program time, author and
approve candidates, and write . This phase writes no final video.
work/shorts/shorts-plan.json - Finalize after render: after every selected main-sequence edit is approved and
the shared main delivery is verified, rerun to bind the same approved ranges to that delivery, then extract horizontal and optional vertical outputs.
plan.py
It owns short candidate judgment, deterministic qualification, horizontal extraction,
short-relative transcripts, and optional deterministic vertical delivery. It does
not transcribe in project mode, change the main sequence, add captions/graphics,
grade, publish, or perform continuous subject tracking.
Delivered Shorts are derivatives of , but candidate planning
precedes that file. Record the operation in the project DAG, but never add it to
; the main delivery and its original-vs-final comparison
remain unchanged.
final/final-video.mp4sequences.main.operations此 skill 包含两个项目阶段:
- 渲染前规划: 将已理解的转录文本映射到 program time,编写并审批候选内容,然后写入 。此阶段不生成最终视频。
work/shorts/shorts-plan.json - 渲染后定稿: 在所有选定的主序列编辑均已审批且共享主交付已验证后,重新运行 ,将同一批已审批范围绑定到该交付,然后提取横版输出和可选的竖版输出。
plan.py
它负责短视频候选判断、确定性资格判定、横版提取、相对于短视频的转录文本,以及可选的确定性竖版交付。它不在项目模式下执行转录,不修改主序列,不添加字幕/图形,不进行调色,不发布,也不执行连续主体跟踪。
交付的 Shorts 是 的衍生内容,但候选规划先于该文件。在项目 DAG 中记录此操作,但绝不将其加入 ;主交付及其原始版与最终版对比保持不变。
final/final-video.mp4sequences.main.operationsProject Inputs
项目输入
work/project.json- the project source recorded by
project.source.path - in source time
work/understand/transcript.json work/timeline.json- active main-operation revisions at each phase
Planning does not require . Finalization and extraction require
that exact project render with .
final/final-video.mp4render.status: verifiedprepare_transcript.py --timelineprojectlib.map_transcript_to_timelinesource_rangeprogram_rangeclip_idProject transcript metadata binds the project source, source transcript, and timeline
by absolute path, size, modified time, and SHA-256. Candidate review frames map their
program timestamps back through to the source video. Candidate
validation refuses a changed binding.
timeline.jsonwork/project.json- 中
work/project.json记录的项目源project.source.path - 处于源时间的
work/understand/transcript.json work/timeline.json- 各阶段生效的主操作修订
规划不需要 。定稿和提取需要该项目的确切渲染结果,且其 。
final/final-video.mp4render.status: verifiedprepare_transcript.py --timelineprojectlib.map_transcript_to_timelinesource_rangeprogram_rangeclip_id项目转录元数据通过绝对路径、大小、修改时间和 SHA-256 绑定项目源、源转录文本与时间线。候选审核帧通过 将其 program 时间戳映射回源视频。候选验证会拒绝已变更的绑定。
timeline.jsonOutput Layout
输出布局
text
work/shorts/
|-- transcript.json
|-- transcript_metadata.json
|-- candidates.json
|-- shorts-plan.json
|-- review/
| |-- candidate_review.json
| `-- approved_candidates.json
`-- short-001/
|-- transcript.json
|-- extraction-report.json
`-- vertical-agent/
|-- agent_vertical_plan.json
|-- vertical_plan.json
`-- review/vertical_review.json
work/cache/shorts/ # disposable frames/sheets/intermediate media
review/06-shorts/
|-- candidates-<review-id>.html # immutable authoritative page
|-- candidates-<review-id>-question.md
|-- assets/candidates-<review-id>/ # immutable start/middle/end frames
|-- candidates.html # non-authoritative latest alias
|-- candidates-summary.md
|-- short-001-horizontal.jpg
|-- short-001-vertical-preview.mp4
|-- short-001-vertical-contact-sheet.jpg
|-- short-001-vertical-preview-summary.json
|-- short-001-vertical-preview-probe.json
|-- <short-id>-vertical-review-<review-id>.html # immutable authoritative page
|-- <short-id>-vertical-review-<review-id>-question.md
|-- <short-id>-vertical-review.html # non-authoritative latest alias
|-- <short-id>-vertical-review-assets/
| `-- <review-id>/ # immutable authoritative evidence
| |-- preview.mp4 # absent for REVIEW_REQUIRED
| |-- contact-sheet.jpg # absent for REVIEW_REQUIRED
| |-- preview-summary.json
| `-- media-probe.json
`-- shorts-summary.md
final/shorts/
|-- short-001-horizontal.mp4
`-- short-001-vertical.mp4 # only when selected and approvedtext
work/shorts/
|-- transcript.json
|-- transcript_metadata.json
|-- candidates.json
|-- shorts-plan.json
|-- review/
| |-- candidate_review.json
| `-- approved_candidates.json
`-- short-001/
|-- transcript.json
|-- extraction-report.json
`-- vertical-agent/
|-- agent_vertical_plan.json
|-- vertical_plan.json
`-- review/vertical_review.json
work/cache/shorts/ # disposable frames/sheets/intermediate media
review/06-shorts/
|-- candidates-<review-id>.html # immutable authoritative page
|-- candidates-<review-id>-question.md
|-- assets/candidates-<review-id>/ # immutable start/middle/end frames
|-- candidates.html # non-authoritative latest alias
|-- candidates-summary.md
|-- short-001-horizontal.jpg
|-- short-001-vertical-preview.mp4
|-- short-001-vertical-contact-sheet.jpg
|-- short-001-vertical-preview-summary.json
|-- short-001-vertical-preview-probe.json
|-- <short-id>-vertical-review-<review-id>.html # immutable authoritative page
|-- <short-id>-vertical-review-<review-id>-question.md
|-- <short-id>-vertical-review.html # non-authoritative latest alias
|-- <short-id>-vertical-review-assets/
| `-- <review-id>/ # immutable authoritative evidence
| |-- preview.mp4 # absent for REVIEW_REQUIRED
| |-- contact-sheet.jpg # absent for REVIEW_REQUIRED
| |-- preview-summary.json
| `-- media-probe.json
`-- shorts-summary.md
final/shorts/
|-- short-001-horizontal.mp4
`-- short-001-vertical.mp4 # only when selected and approvedProgram Transcript
项目转录文本
Run from the repository root:
powershell
$RepoRoot = (Resolve-Path ".").Path
$SkillRoot = Join-Path $RepoRoot "skills\video-to-shorts"
$ProjectRoot = (Resolve-Path "<project-root>").Path
$Work = Join-Path $ProjectRoot "work"
$ShortsWork = Join-Path $Work "shorts"
$ProjectSource = (Resolve-Path "<project-source-from-work/project.json>").Path
$FinalVideo = Join-Path $ProjectRoot "final\final-video.mp4"
$ShortsReview = Join-Path $ProjectRoot "review\06-shorts"
New-Item -ItemType Directory -Force $ShortsWork,$ShortsReview | Out-Null
python "$SkillRoot\scripts\prepare_transcript.py" $ProjectSource `
--transcript "$Work\understand\transcript.json" `
--timeline "$Work\timeline.json" `
--out $ShortsWorkProject timeline mode requires the canonical supplied transcript. Standalone mode
may omit ; it keeps input-relative time and may use the temporary
fallback. No transcript is auto-discovered.
--timelinevideo-understand/scripts/transcribe.py从仓库根目录运行:
powershell
$RepoRoot = (Resolve-Path ".").Path
$SkillRoot = Join-Path $RepoRoot "skills\video-to-shorts"
$ProjectRoot = (Resolve-Path "<project-root>").Path
$Work = Join-Path $ProjectRoot "work"
$ShortsWork = Join-Path $Work "shorts"
$ProjectSource = (Resolve-Path "<project-source-from-work/project.json>").Path
$FinalVideo = Join-Path $ProjectRoot "final\final-video.mp4"
$ShortsReview = Join-Path $ProjectRoot "review\06-shorts"
New-Item -ItemType Directory -Force $ShortsWork,$ShortsReview | Out-Null
python "$SkillRoot\scripts\prepare_transcript.py" $ProjectSource `
--transcript "$Work\understand\transcript.json" `
--timeline "$Work\timeline.json" `
--out $ShortsWork项目时间线模式要求使用标准提供的转录文本。独立模式可以省略 ;它保留相对于输入的时间,并可使用临时的 作为回退。系统不会自动发现转录文本。
--timelinevideo-understand/scripts/transcribe.pyCandidate Authoring
候选内容编写
Generate long-video visual context into cache, inspect every sheet needed for a
decision, and hand-author candidate JSON. Deterministic code validates editorial
judgment; it does not invent candidates or scores.
powershell
python "$SkillRoot\scripts\prepare_visual_context.py" $ProjectSource `
--timeline "$Work\timeline.json" `
--out "$Work\cache\shorts\candidate-visual" --interval 15Candidate input remains for compatibility. Set
and every candidate to .
Each candidate requires:
shorts-candidates.v2selection.evidence_modeevidence_modetext_visual- stable , title, and scene type;
candidate_id - complete /
start_timein program time;end_time - exactly equal to overlapping transcript words, not whole overlapping segments;
transcript_excerpt - all six score entries and non-empty reasons;
- non-empty ;
metadata.editorial_reason - optional reviewed and visual evidence fields.
filler_drop_spans
Do not supply total ; the validator adds the six dimensions:
score| Dimension | Maximum |
|---|---|
| 20 |
| 20 |
| 20 |
| 15 |
| 15 |
| 10 |
Prefer a complete, independently understandable thought over a shorter fragment.
Keep a dependent interviewer question, premise, claim support, reversal, or payoff
when it is necessary. Boundaries must land on whole words and thoughts.
Validate the authored file:
powershell
$CandidateDir = Join-Path $ShortsWork "preview\text_visual"
python "$SkillRoot\scripts\candidates.py" `
--out $CandidateDir `
--candidates "$CandidateDir\candidate-input.json" `
--transcript "$ShortsWork\transcript.json" `
--project-root $ProjectRootThis writes the compatibility preview files, durable ,
and .
work/shorts/candidates.jsonreview/06-shorts/candidates.{html,summary.md}将长视频的视觉上下文生成到缓存中,检查做出决策所需的每张图集,并手工编写候选 JSON。确定性代码用于验证编辑判断;它不会自行生成候选或评分。
powershell
python "$SkillRoot\scripts\prepare_visual_context.py" $ProjectSource `
--timeline "$Work\timeline.json" `
--out "$Work\cache\shorts\candidate-visual" --interval 15候选输入格式仍为 以保持兼容。将 和每个候选的 均设置为 。每个候选都需要:
shorts-candidates.v2selection.evidence_modeevidence_modetext_visual- 稳定的 、标题和场景类型;
candidate_id - 以 program time 表示的完整 /
start_time;end_time - 必须与重叠的转录词语完全相等,而不是整个重叠片段;
transcript_excerpt - 六个评分项及非空理由;
- 非空的 ;
metadata.editorial_reason - 可选的、经过审核的 和视觉证据字段。
filler_drop_spans
不要提供总计 ;验证器会加上六个维度的分数:
score| 维度 | 最高分 |
|---|---|
| 20 |
| 20 |
| 20 |
| 15 |
| 15 |
| 10 |
优先选择完整且可独立理解的想法,而不是更短的片段。必要时保留相互依赖的采访者问题、前提、主张支撑、反转或回报点。边界必须落在完整词语和完整思想的边界上。
验证手工编写的文件:
powershell
$CandidateDir = Join-Path $ShortsWork "preview\text_visual"
python "$SkillRoot\scripts\candidates.py" `
--out $CandidateDir `
--candidates "$CandidateDir\candidate-input.json" `
--transcript "$ShortsWork\transcript.json" `
--project-root $ProjectRoot这会写入兼容性预览文件、持久文件 ,以及 。
work/shorts/candidates.jsonreview/06-shorts/candidates.{html,summary.md}Review Modes
审核模式
Candidate selection and delivery mode are one hash-bound gate. Delivery is exactly
or .
horizontal_onlyhorizontal_and_verticalOpen the bound interactive page in human mode:
powershell
python "$SkillRoot\scripts\interaction.py" candidate-open --out $ShortsWork --review-out $ShortsReviewThe command prints an authoritative review-ID-scoped page. The receipt binds that page, its
candidate JSON, transcript, source media, fixed question, and every extracted frame
by SHA-256. is only a non-authoritative convenience alias to the
latest page. Open the printed authoritative path with the current OS native command:
candidates.htmltext
undefined候选选择和交付模式构成一个基于哈希绑定的统一关卡。交付模式必须恰好为 或 。
horizontal_onlyhorizontal_and_vertical在 human 模式下打开绑定的交互页面:
powershell
python "$SkillRoot\scripts\interaction.py" candidate-open --out $ShortsWork --review-out $ShortsReview该命令会打印按 review ID 划分的权威页面。回执通过 SHA-256 将该页面及其候选 JSON、转录文本、源媒体、固定问题和每个提取帧绑定在一起。 只是指向最新页面的非权威便捷别名。使用当前操作系统原生命令打开打印出的权威路径:
candidates.htmltext
undefinedWindows PowerShell
Windows PowerShell
Start-Process (Resolve-Path -LiteralPath "<printed-authoritative-page>")
Start-Process (Resolve-Path -LiteralPath "<printed-authoritative-page>")
macOS
macOS
open "<printed-authoritative-page>"
open "<printed-authoritative-page>"
Linux
Linux
xdg-open "<printed-authoritative-page>"
xdg-open "<printed-authoritative-page>"
Agent: Present the authoritative page and STOP.
Agent: Present the authoritative page and STOP.
If opening fails, retry the native command and report the failure if it still does
not open. Do not continue after presenting it. The page starts with all candidate
checkboxes and both delivery choices initially unselected. The user must select 1-5
candidates and one delivery mode. The bound page never silently selects candidates.
For approval, copy this exact page-generated structured summary unchanged into
`candidate-answer`:
```text
Shorts candidate review
Review: <review-id>
Candidates: text_visual/cand-001, text_visual/cand-002
Delivery: horizontal_and_verticalFor revision, copy this exact page-generated structured summary unchanged:
text
Shorts candidate review
Review: <review-id>
Decision: revise
Changes: <non-empty requested changes>Record the later response without rewriting it:
powershell
python "$SkillRoot\scripts\interaction.py" candidate-answer `
--out $ShortsWork --response-file "<verbatim-summary-file>"When the user explicitly delegates decisions:
powershell
python "$SkillRoot\scripts\interaction.py" candidate-open `
--out $ShortsWork --review-out $ShortsReview --decision-mode agent `
--delegation-note "User delegated shorts selection and vertical approval."
python "$SkillRoot\scripts\interaction.py" candidate-agent-approve `
--out $ShortsWork `
--candidates "text_visual/cand-001" `
--delivery horizontal_and_vertical `
--rationale "The selected range has a self-contained hook, explanation, and payoff."The Agent opens and inspects the same authoritative page, uses explicit candidate
references, an explicit delivery mode, and a non-empty rationale. It never writes a
fake human response or . Human and Agent modes are mutually exclusive;
human answer commands fail in Agent mode and Agent approval commands fail in human
mode. Receipt verification rechecks review, page and media hashes. Regenerated source,
candidate, transcript, page, question, frame, or approved-candidate artifacts
invalidate approval.
user_response
如果打开失败,使用原生命令重试;如果仍无法打开,则报告失败。呈现页面后不要继续。页面开始时所有候选复选框和两种交付选项均未选中。用户必须选择 1–5 个候选和一种交付模式。绑定页面绝不会静默选择候选。
对于审批,将页面生成的以下结构化摘要原样复制到 `candidate-answer`:
```text
Shorts candidate review
Review: <review-id>
Candidates: text_visual/cand-001, text_visual/cand-002
Delivery: horizontal_and_vertical对于修订,将页面生成的以下结构化摘要原样复制:
text
Shorts candidate review
Review: <review-id>
Decision: revise
Changes: <non-empty requested changes>记录后续响应时不得改写:
powershell
python "$SkillRoot\scripts\interaction.py" candidate-answer `
--out $ShortsWork --response-file "<verbatim-summary-file>"当用户明确委托决策时:
powershell
python "$SkillRoot\scripts\interaction.py" candidate-open `
--out $ShortsWork --review-out $ShortsReview --decision-mode agent `
--delegation-note "User delegated shorts selection and vertical approval."
python "$SkillRoot\scripts\interaction.py" candidate-agent-approve `
--out $ShortsWork `
--candidates "text_visual/cand-001" `
--delivery horizontal_and_vertical `
--rationale "The selected range has a self-contained hook, explanation, and payoff."Agent 打开并检查同一权威页面,使用明确的候选引用、明确的交付模式和非空理由。它绝不伪造人类响应或 。human 和 Agent 模式互斥;在 Agent 模式下,human answer 命令失败,在 human 模式下,Agent approval 命令失败。回执验证会重新检查审核、页面和媒体哈希。任何重新生成的源、候选、转录文本、页面、问题、帧或已审批候选工件都会使审批失效。
user_responseCanonical Plan
标准计划
powershell
python "$SkillRoot\scripts\plan.py" `
--out $ShortsWork --project-root $ProjectRootwork/shorts/shorts-plan.jsonschema_version: 1- ,
target: derived, andtimebase: program;timeline_id - during planning;
delivery_status: awaiting_main_render - the project source and timeline bindings used for candidate review;
- exact /
depends_onrevisions from the active main sequence;based_on - selection mode, rationale, delivery mode, and review ID;
- stable short IDs;
- explicit and mapped
program_range;source_ranges - scoring/editorial evidence, approved filler drops, and program-time keep spans;
- work transcript/report paths and delivery paths.
../final/shorts/*.mp4
The first run is the end of the planning phase. Stop here and continue requested
captions, content cards, graphic motion, and other remaining main-sequence operations
in canonical order. Do not run
and do not create from this skill.
extract_shorts.pyfinal.mp4After the shared renderer verifies , rerun the same
command. It revalidates the approved project source and timeline, refreshes the full
active-operation revisions, adds the verified main-render fingerprint, and sets
. A timeline change requires new candidates and approval;
pixel-only operations such as content cards and captions do not.
final/final-video.mp4plan.pydelivery_status: readyQualification remains deterministic: score at least 70, completeness at least 15,
estimated output duration 20-90 seconds, valid exact excerpt, no greater-than-50%
overlap with a higher-ranked short, and at most five outputs unless configured.
Only isolated, semantically empty hesitation words with safe word boundaries may be
approved as filler drops. Rejected/unsafe spans remain in the plan with reasons.
Total removal may not exceed 15% and no keep span may be shorter than 0.15 seconds.
powershell
python "$SkillRoot\scripts\plan.py" `
--out $ShortsWork --project-root $ProjectRootwork/shorts/shorts-plan.jsonschema_version: 1- 、
target: derived和timebase: program;timeline_id - 规划期间的 ;
delivery_status: awaiting_main_render - 候选审核所用的项目源和时间线绑定;
- 来自生效主序列的确切 /
depends_on修订;based_on - 选择模式、理由、交付模式和 review ID;
- 稳定的 short ID;
- 明确的 和映射后的
program_range;source_ranges - 评分/编辑证据、已审批的 filler drop,以及 program time 中的 keep span;
- work 转录文本/报告路径和 交付路径。
../final/shorts/*.mp4
第一次运行即规划阶段的结束点。到此停止,并按标准顺序继续执行所请求的字幕、内容卡片、图形动效及其他剩余主序列操作。不要运行 ,也不要通过此 skill 创建 。
extract_shorts.pyfinal.mp4共享渲染器验证 后,重新运行同一条 命令。它会重新验证已审批的项目源和时间线,刷新全部生效操作修订,添加已验证主渲染的指纹,并设置 。时间线变更需要新的候选和审批;内容卡片和字幕等仅影响像素的操作则不需要。
final/final-video.mp4plan.pydelivery_status: ready资格判定仍为确定性规则:总分至少 70,completeness 至少 15,预计输出时长为 20–90 秒,转录摘录精确有效,与排名更高的短视频重叠比例不得超过 50%,且除非另有配置,最多输出五个。
只有语义上孤立的空洞犹豫词且具有安全词语边界时,才可批准作为 filler drop。被拒绝或不安全的跨度会连同原因保留在计划中。移除总量不得超过 15%,且任何 keep span 都不得短于 0.15 秒。
Horizontal Extraction
横版提取
powershell
python "$SkillRoot\scripts\extract_shorts.py" `
--video $FinalVideo --out $ShortsWork `
--project-root $ProjectRootBefore extraction, the script rechecks the main-render fingerprint, project render
status, the complete current main-operation list and revisions, candidate receipt,
approved candidate hash, and source video. An plan is rejected.
Each keep range becomes its own seeked input; ffmpeg concatenates
those inputs and performs one H.264/AAC encode. It does not decode the complete main
video once per keep range.
awaiting_main_render-ss/-t/-iThe selected final transcript word and the media cut endpoint are separate boundaries.
Extraction preserves at least 0.25 seconds of release audio after selected content and
targets 0.30 seconds. disables semantic phrase snapping only;
it never disables the mandatory release handle. If the source ends before the required
handle can be preserved, extraction fails instead of marking the short verified.
--no-refine-boundariesThe short-relative transcript excludes dropped words, shifts later words onto a
continuous zero-based clock, and retains input program/source evidence. Horizontal
media goes directly to ; work contains only its transcript and report.
final/shortspowershell
python "$SkillRoot\scripts\extract_shorts.py" `
--video $FinalVideo --out $ShortsWork `
--project-root $ProjectRoot提取前,脚本会重新检查主渲染指纹、项目渲染状态、完整且当前的主操作列表和修订、候选回执、已审批候选哈希以及源视频。 计划会被拒绝。每个 keep range 都成为独立执行 seek 的 输入;ffmpeg 拼接这些输入并执行一次 H.264/AAC 编码。它不会针对每个 keep range 将完整主视频解码一次。
awaiting_main_render-ss/-t/-i最终转录文本中所选词语的边界与媒体剪切端点是两个独立边界。提取会在选定内容之后至少保留 0.25 秒的 release audio,目标为 0.30 秒。 仅禁用语义短语吸附;它绝不会禁用必需的 release handle。如果源在无法保留所需 handle 之前结束,提取将失败,而不是将该短视频标记为已验证。
--no-refine-boundaries相对于短视频的转录文本会排除已删除词语,将后续词语移至连续的零基时钟,并保留输入的 program/source 证据。横版媒体直接写入 ;work 中只保留其转录文本和报告。
final/shortsVertical Planning
竖版规划
Vertical delivery starts from the approved horizontal output. Generate dense visual
evidence at 1 second, or 0.5 seconds when motion requires it. Inspect every sheet and
author one of:
- : one stable fixed 9:16 crop.
STATIC_CROP - : scene-bounded fixed crops, with LETTERBOX only for scenes needing complete horizontal information.
SCENE_CROP - : complete sharp foreground over a blurred/darkened fill.
LETTERBOX - : evidence cannot support deterministic fixed crops; formal render is blocked.
REVIEW_REQUIRED
Presenter scenes should keep the head and torso stable and large. Slides, products,
groups, and diagrams must retain essential information. Do not claim continuous
tracking. Crop changes belong at scene boundaries.
Each plan segment fully covers the short timeline, has a strategy, content type,
non-empty rationale, and valid in-bounds crop when applicable. Required content types
are , , , , and .
PRESENTERWIDE_INFORMATIONPRODUCTMULTI_SUBJECTOTHERpowershell
$ShortId = "short-001"
$Horizontal = Join-Path $ProjectRoot "final\shorts\$ShortId-horizontal.mp4"
$VerticalWork = Join-Path $ShortsWork "$ShortId\vertical-agent"
$ExtractionReport = Join-Path $ShortsWork "$ShortId\extraction-report.json"
python "$SkillRoot\scripts\prepare_visual_context.py" $Horizontal `
--out "$Work\cache\shorts\$ShortId-vertical-visual" --interval 1
python "$SkillRoot\scripts\vertical_plan.py" `
--video $Horizontal `
--input "$VerticalWork\agent_vertical_plan.json" `
--out $VerticalWork `
--source-video $FinalVideo `
--extraction-report $ExtractionReportvertical_plan.json{num, den}keep_spansRender a smaller preview into the user-facing review directory:
powershell
python "$SkillRoot\scripts\render_vertical.py" `
--video $Horizontal --plan "$VerticalWork\vertical_plan.json" `
--out $VerticalWork --review-out $ShortsReview --mode previewThe command first writes flat latest convenience outputs named
, ,
, and
. It then prints the authoritative
page. The latest
alias is non-authoritative convenience only.
<short-id>-vertical-preview.mp4<short-id>-vertical-contact-sheet.jpg<short-id>-vertical-preview-summary.json<short-id>-vertical-preview-probe.json<short-id>-vertical-review-<review-id>.html<short-id>-vertical-review.htmlThe authoritative page and receipt bind immutable review-ID-scoped copies under
: ,
, , and . Later previews
may replace the flat convenience outputs without changing an earlier receipt.
stores only and in its
scoped directory because no preview video or contact sheet is rendered.
<short-id>-vertical-review-assets/<review-id>/preview.mp4contact-sheet.jpgpreview-summary.jsonmedia-probe.jsonREVIEW_REQUIREDpreview-summary.jsonmedia-probe.jsonOpen the printed authoritative path with the current OS native command:
text
undefined竖版交付从已审批的横版输出开始。每 1 秒生成密集视觉证据;当运动需要时则每 0.5 秒生成。检查每张图集,并手工编写以下一种策略:
- :一个稳定固定的 9:16 裁剪画面。
STATIC_CROP - :按场景划分的固定裁剪;仅对需要完整横向信息的场景使用 LETTERBOX。
SCENE_CROP - :在模糊/变暗的填充背景上呈现完整且清晰的前景。
LETTERBOX - :证据无法支持确定性固定裁剪;阻止正式渲染。
REVIEW_REQUIRED
主播场景应保持头部和躯干稳定且占据较大画面。幻灯片、产品、群体和图表必须保留关键信息。不得声称执行连续跟踪。裁剪变化必须发生在场景边界。
每个计划片段必须完整覆盖该短视频时间线,并包含策略、内容类型、非空理由,以及在适用时有效的边界内裁剪参数。必需内容类型为 、、、 和 。
PRESENTERWIDE_INFORMATIONPRODUCTMULTI_SUBJECTOTHERpowershell
$ShortId = "short-001"
$Horizontal = Join-Path $ProjectRoot "final\shorts\$ShortId-horizontal.mp4"
$VerticalWork = Join-Path $ShortsWork "$ShortId\vertical-agent"
$ExtractionReport = Join-Path $ShortsWork "$ShortId\extraction-report.json"
python "$SkillRoot\scripts\prepare_visual_context.py" $Horizontal `
--out "$Work\cache\shorts\$ShortId-vertical-visual" --interval 1
python "$SkillRoot\scripts\vertical_plan.py" `
--video $Horizontal `
--input "$VerticalWork\agent_vertical_plan.json" `
--out $VerticalWork `
--source-video $FinalVideo `
--extraction-report $ExtractionReportvertical_plan.json{num, den}keep_spans将较小的预览渲染到面向用户的审核目录:
powershell
python "$SkillRoot\scripts\render_vertical.py" `
--video $Horizontal --plan "$VerticalWork\vertical_plan.json" `
--out $VerticalWork --review-out $ShortsReview --mode preview该命令首先写入扁平的最新便捷输出:、、 和 。随后打印权威的 页面。最新 alias 仅作为非权威便捷输出。
<short-id>-vertical-preview.mp4<short-id>-vertical-contact-sheet.jpg<short-id>-vertical-preview-summary.json<short-id>-vertical-preview-probe.json<short-id>-vertical-review-<review-id>.html<short-id>-vertical-review.html权威页面和回执会绑定 下的不可变、按 review ID 划分的副本:、、 和 。后续预览可替换扁平的便捷输出,而不会改变早期回执。对于 ,范围目录中只存储 和 ,因为不会渲染预览视频或联系表。
<short-id>-vertical-review-assets/<review-id>/preview.mp4contact-sheet.jpgpreview-summary.jsonmedia-probe.jsonREVIEW_REQUIREDpreview-summary.jsonmedia-probe.json打开打印出的权威路径:
text
undefinedWindows PowerShell
Windows PowerShell
Start-Process (Resolve-Path -LiteralPath "<printed-authoritative-page>")
Start-Process (Resolve-Path -LiteralPath "<printed-authoritative-page>")
macOS
macOS
open "<printed-authoritative-page>"
open "<printed-authoritative-page>"
Linux
Linux
xdg-open "<printed-authoritative-page>"
xdg-open "<printed-authoritative-page>"
Agent: Present the authoritative page and STOP.
Agent: Present the authoritative page and STOP.
If opening fails, retry the native command and report the failure if it still does
not open. Do not continue after presenting it. Inspect the complete preview,
contact sheet, all segments and crop/fit decisions, media probe, and every warning. The receipt hashes
the page, plan, source, preview, contact sheet, preview summary, probe, and fixed
question.
For human review, copy the page's exact structured summary unchanged into
`vertical-answer`. The three possible summaries are:
```text
Shorts vertical review
Short: <short-id>
Review: <review-id>
Decision: approvetext
Shorts vertical review
Short: <short-id>
Review: <review-id>
Decision: revise
Changes: <non-empty requested changes>text
Shorts vertical review
Short: <short-id>
Review: <review-id>
Decision: skippowershell
python "$SkillRoot\scripts\interaction.py" vertical-answer `
--out $VerticalWork --response-file "<verbatim-summary-file>"Delegated mode uses the same page and records an honest Agent decision with a
non-empty rationale:
powershell
python "$SkillRoot\scripts\interaction.py" vertical-agent-approve `
--out $VerticalWork `
--rationale "All sampled scenes preserve the subject and essential information."REVIEW_REQUIREDreviseskipFormal render revalidates every approved artifact:
powershell
python "$SkillRoot\scripts\render_vertical.py" `
--video $Horizontal --plan "$VerticalWork\vertical_plan.json" `
--out $VerticalWork --review-out $ShortsReview --mode finalThe formal renderer uses rational , one H.264/yuv420p generation from the
verified main delivery, , and encoded continuous audio.
Preview rendering remains / CRF 20 for faster review. The renderer checks
dimensions, duration, FPS, audio presence, source/report hashes, and keep-span mapping.
num/denlibx264 -preset slow -crf 16medium
如果打开失败,使用原生命令重试;如果仍无法打开,则报告失败。呈现页面后不要继续。检查完整预览、联系表、所有片段及裁剪/适配决策、媒体探针和每一条警告。回执会对页面、计划、源、预览、联系表、预览摘要、探针和固定问题进行哈希处理。
对于 human 审核,将页面的以下结构化摘要原样复制到 `vertical-answer`。共有三种可能的摘要:
```text
Shorts vertical review
Short: <short-id>
Review: <review-id>
Decision: approvetext
Shorts vertical review
Short: <short-id>
Review: <review-id>
Decision: revise
Changes: <non-empty requested changes>text
Shorts vertical review
Short: <short-id>
Review: <review-id>
Decision: skippowershell
python "$SkillRoot\scripts\interaction.py" vertical-answer `
--out $VerticalWork --response-file "<verbatim-summary-file>"委托模式使用同一页面,并记录带有非空理由的如实 Agent 决策:
powershell
python "$SkillRoot\scripts\interaction.py" vertical-agent-approve `
--out $VerticalWork `
--rationale "All sampled scenes preserve the subject and essential information."REVIEW_REQUIREDreviseskip正式渲染会重新验证每个已审批工件:
powershell
python "$SkillRoot\scripts\render_vertical.py" `
--video $Horizontal --plan "$VerticalWork\vertical_plan.json" `
--out $VerticalWork --review-out $ShortsReview --mode final正式渲染器使用有理数 ,从已验证主交付执行一次 H.264/yuv420p 生成,采用 ,并编码连续音频。预览渲染仍使用 / CRF 20 以加快审核。渲染器会检查尺寸、时长、FPS、音频存在性、源/报告哈希和 keep span 映射。
num/denlibx264 -preset slow -crf 16mediumProject Operation
项目操作
Add one derived operation to , but not to the main sequence:
work/project.jsonjson
{
"id": "shorts",
"skill": "video-to-shorts",
"revision": 1,
"depends_on": ["understanding"],
"based_on": {"understanding": 1},
"status": "approved",
"plan": "shorts/shorts-plan.json",
"outputs": [],
"target": {"sequence": "main", "scope": "derivatives"},
"effects": {
"changes_timeline": true,
"changes_geometry": true,
"changes_video_pixels": true,
"changes_audio": true,
"adds_track": null
},
"check": {"status": "pending", "report": "../review/06-shorts/shorts-summary.md"}
}This is the pre-render state. Use the actual dependency list/revisions stored in the
plan. After the shared main render, rerun , update the operation from the
refreshed dependencies, extract and verify outputs, then set the operation/check to
/ and list the delivered files. Project validation checks the DAG and
files; shorts remain outside the main render plan.
plan.pyverifiedpass向 添加一个派生操作,但不要将其加入主序列:
work/project.jsonjson
{
"id": "shorts",
"skill": "video-to-shorts",
"revision": 1,
"depends_on": ["understanding"],
"based_on": {"understanding": 1},
"status": "approved",
"plan": "shorts/shorts-plan.json",
"outputs": [],
"target": {"sequence": "main", "scope": "derivatives"},
"effects": {
"changes_timeline": true,
"changes_geometry": true,
"changes_video_pixels": true,
"changes_audio": true,
"adds_track": null
},
"check": {"status": "pending", "report": "../review/06-shorts/shorts-summary.md"}
}这是渲染前状态。使用计划中存储的实际依赖列表/修订。共享主渲染后,重新运行 ,根据刷新后的依赖更新操作,提取并验证输出,然后将操作/check 设置为 / 并列出交付文件。项目验证会检查 DAG 和文件;Shorts 仍位于主渲染计划之外。
plan.pyverifiedpassCompatibility
兼容性
Without , candidates and keep their established
standalone paths and input-relative time. The extractor accepts both plan shapes.
Legacy vertical workflows and human review commands remain valid.
Only the legacy unbound text review may use the default top five candidates; the
bound interactive page always requires explicit selection.
Standalone fallback transcription uses the canonical transcriber
and a project-local model cache.
--project-rootshorts-plan.v2short_XX/source.mp4video-understand不使用 时,候选和 保留其既有独立路径和相对于输入的时间。提取器接受两种计划结构。旧版 竖版工作流和 human 审核命令仍然有效。只有旧版未绑定文本审核可使用默认前五个候选;绑定交互页面始终要求明确选择。独立模式回退转录使用标准 转录器和项目本地模型缓存。
--project-rootshorts-plan.v2short_XX/source.mp4video-understandSelf Check
自检
Run:
powershell
python "$SkillRoot\scripts\check_project_protocol.py"
python "$RepoRoot\skills\video-understand\scripts\validate.py" project `
"$Work\project.json" $ProjectRootFor every delivered short verify:
- candidate excerpt equals overlapping program words and the thought is complete;
- source/program ranges and dependency revisions resolve;
- horizontal duration approximately equals keep-span sum;
- short transcript starts at zero, ends within media, excludes removed words and words
heard only inside the release handle, and reports ;
tail_release_verified: true - horizontal output has expected FPS, H.264 video, synchronized audio, and review still;
- vertical output is 9:16, uses the exact rational FPS, keeps required content safe,
has synchronized audio, matches its approved preview/plan hashes, and records
with the verified main delivery as
direct_render: true;render_source - all user-facing media is under or
review/, and disposable material is underfinal/;work/cache/ - records outputs, decisions, warnings, and checks.
shorts-summary.md
Page generation or JSON validation alone is not success. Watch the horizontal and
vertical outputs and inspect their review images/contact sheets.
运行:
powershell
python "$SkillRoot\scripts\check_project_protocol.py"
python "$RepoRoot\skills\video-understand\scripts\validate.py" project `
"$Work\project.json" $ProjectRoot对每个已交付的短视频验证:
- 候选摘录等于重叠的 program 词语,且想法完整;
- 源/program 范围和依赖修订均可正确解析;
- 横版时长约等于 keep span 总和;
- 短视频转录文本从零开始,在媒体时长内结束,排除已移除词语以及仅在 release handle 内听到的词语,并报告 ;
tail_release_verified: true - 横版输出具有预期 FPS、H.264 视频、同步音频和审核静帧;
- 竖版输出为 9:16,使用精确的有理数 FPS,使必需内容保持在安全区域,具有同步音频,与已审批预览/计划哈希匹配,并记录 ,且以已验证主交付作为
direct_render: true;render_source - 所有面向用户的媒体均位于 或
review/下,临时材料位于final/下;work/cache/ - 记录输出、决策、警告和检查结果。
shorts-summary.md
仅生成页面或通过 JSON 验证并不代表成功。观看横版和竖版输出,并检查其审核图像/联系表。