Skip to content

[feat] video: add editable reference shot breakdowns - #606

Draft
prettygirlisnotme wants to merge 13 commits into
ThinkFlowLab:mainfrom
prettygirlisnotme:feat/reference-shot-breakdown-171-draft
Draft

prettygirlisnotme wants to merge 13 commits into
ThinkFlowLab:mainfrom
prettygirlisnotme:feat/reference-shot-breakdown-171-draft

Conversation

@prettygirlisnotme

@prettygirlisnotme prettygirlisnotme commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refs #171. Select a reference video on the canvas to detect cuts locally and save representative frames as part of the project. You can join adjacent draft shots, split at the playhead, and write a separate description for each segment. Only video analysis creates the measured record. Detected ranges and representative frames stay available for comparison. The canvas and Agent edit the saved breakdown using the same version-checked command.

An optional image-input model can describe the subject, scene, and framing visible in a representative frame. Fill missing suggestions works on up to 12 missing shots per request batch and saves each result as it arrives. After a rate limit or another provider error, the editor shows the reason and keeps the data already saved. After a session expires, reopen the project and continue from the missing suggestions. Starting analysis from an Agent prompt and describing motion across frames are follow-up work tracked by #171.

Labels

Suggested labels are type:feat, area:canvas, area:agent, and modality:video.

Test plan

  • Local candidate 12edf20ac7746c2582d8a0106fe90d7928c048d7 against main at 83b142f02f03cf670dab65ebef12772550f550df. Resolving the merge retained both the upstream motion editor and the shot breakdown editor in the shared project contract. The generated contracts, full PR-diff pre-commit hooks, bilingual copy check, and production build passed.
  • 375 focused Python tests passed across shot detection, shared editor commands, asset publication, link import, motion editing, and video blockout. Coverage includes rejection of measured shots created by generic editor commands, shared canvas/Agent edits, competing revisions, session expiry, partial model results, and interrupted writes. All 1,117 frontend tests passed.
  • The Release workflow's bundled OpenCode gateway selection passed locally, including image-model input (7 passed, 2 Windows-only skips). GitHub Release checks, CodeQL, and other applicable PR-triggered checks remain pending for this head.
  • Chromium verified link import, three detected shots, a simulated HTTP 429, a manual cut at 2.333 s, saving and reopening, and recovery to all three suggestions with both draft notes intact. A separate browser check confirmed the Chinese preview tooltip. The upstream motion studio browser test also passed in Chinese and English.
  • Independent pre-review: 85/100 on base 83b142f02f03cf670dab65ebef12772550f550df and head 12edf20ac7746c2582d8a0106fe90d7928c048d7. The remaining gaps are the hosted PR checks, live-provider description quality, and full-corpus cut accuracy.

Evidence

Browser walkthrough on 12edf20a · Run receipt

Previously, a partial result did not identify a rate limit, and save confirmation was easy to miss when the draft was scrolled. In the walkthrough, choose the fixture model and click Analyze shots. The second model request returns HTTP 429 and the editor names the reason. Add a cut and notes, then click Save breakdown. The confirmation stays next to the button. Refresh, reopen, and use Fill missing suggestions.

Screenshot of the 429 explanation · Screenshot of the saved draft · Screenshot of the Chinese preview tooltip

The preview tooltip directs a read-only browser window to the action that enables editing. Its previous text said to unlock the node even while the window was in preview mode. Reproduce it by opening the same project in a second browser window and hovering over the Shot Breakdown button.

The clip is five seconds from the Sintel trailer. Sintel is by the Blender Foundation, licensed CC BY 3.0.

Provider verification

The walkthrough uses actual Chromium, video decoding, and project storage. A download fixture supplies the same Sintel clip, and a local model fixture supplies responses and the simulated rate limit. Live-provider description quality and full-corpus cut accuracy remain open validation items.

Bilingual UI

The controls, progress messages, and guide ship in English and Simplified Chinese.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD 7ad0b12 Refs #171

我下载看了 48 秒的 Sintel 录像:从画布打开分镜、检测切点、修改第 5 镜、刷新后仍能看到编辑值。检测结果和用户编辑分开保存,这个方向合理。现在建议先确认模型描述是否要支持补跑:如果先只检测,或者模型中途 429,现有入口会直接返回已保存文档,不能补齐缺失建议。具体位置见行内。

草稿暂定 73/100(非批准分):范围 2/3、正确性 2/3、验证 3/3、主张证据 2/3、简洁性 2/3。当前 Release checks、CodeQL 和 DSH 已绿;我未独立运行应用。录像验证的是本地切镜和保存,模型描述只有替身测试,不代表真实模型或人工标注集的效果。如果描述补跑留后续,建议在 UI 和 #171 都写清楚本版边界。

English: Verified the recorded detect/edit/reopen path and green CI. Clarify recovery for partial or detection-only results before marking ready.

Dot,代表 @david6666666。

raise ProjectError('正在分析另一段参考视频,请稍后重试。', 409, code='shot_analysis_busy')
async with self.analysis_slot:
saved = await asyncio.to_thread(self.get, project_id, asset_id)
if saved is not None:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这会让同一素材的后续分析直接拿到旧文档。先选「仅检测」,或描述跑到一半遇到 429,用户就没法再给未描述的镜头补建议。能否用一个独立的补跑入口,只填缺失建议,保留检测结果和手工编辑?如果有意留给后续,也建议在界面明确告诉用户这次结果不会自动补齐。

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD 1b1c991 Refs #171

上轮模型描述无法补跑的问题已修。新入口只读取已保存的代表帧、补缺失建议,每条成功就保存。我下载核对了 58 秒的录像:第一次只存了 1/3;第 2 镜手工改过、保存并重新打开后,点击补齐,最后是 3/3,手工改动仍在。测试也覆盖了限流、重复补齐和生成期间的并发编辑。原行内意见不重复贴。

本次草稿 92/100(非批准分):范围 2/3(仅覆盖 #171 的分镜及补齐切片)、正确性 3/3、验证 3/3、主张证据 3/3、简洁性 2/3。Ran: 同一提交 Release checks、CodeQL 和 DSH 都绿。Not run: 我没有独立运行应用或真实视觉模型;录像的 429 和模型建议来自本地替身,不是描述质量或切点精度的评测。

目前还是 Draft,先等维护者确认这版交付边界并转 Ready,再评是否满足正式批准条件。

English: The new recording verifies partial recovery and preservation of manual edits. Exact-head CI is green; no live-model quality claim. Still a draft.

Dot,代表 @david6666666。

@princepride

Copy link
Copy Markdown
Collaborator

@prettygirlisnotme I had prototyped a reference breakdown on my side before noticing this PR. Since #171 is yours and #606 is further along, I'm leaving the breakdown here and only sent the part that doesn't overlap: #634 imports a video from a web page link (canvas menu, opendirector asset import-url, and the Agent), so a reference can come from a URL before it reaches your editor.

Two things from the prototype that may help once your format settles, and I'm happy to send them as follow-ups on top of #606 rather than here:

  • CLI / Agent entry. The real Agent (Default runtime, Qwen3.8-27B) never discovered a breakdown command on its own: asked to "break down the reference video on the canvas", it ran ffmpeg select='gt(scene,…)' directly on files in the project's assets/ directory. With a short bundled skill pointing to the command, it ran it and read the result in four calls. An opendirector command over your save/detect services plus a skill like that would let the Agent use your breakdown.
  • One overview request. Sending a single numbered contact sheet (one keyframe per shot, labelled #N in–out) to an image-input chat model and asking for JSON per shot gave usable shot size / camera / content for a 14-shot trailer in one request (~25 s on Qwen3.8-27B). It might be an option for the "fill missing suggestions" batch if per-shot requests get slow.

No action needed on this PR from my side; just flagging so we don't duplicate work.

Copy link
Copy Markdown
Contributor Author

Thanks, @princepride! The Agent example was really helpful, and #634 fits nicely with the breakdown workflow. I’ve synced my local branch with main and tested the import-to-breakdown flow. I’d be happy to take you up on the CLI/Agent follow-up once the breakdown format settles. The contact sheet sounds worth benchmarking too.

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD a9e762f Refs #171

我下载看了 72 秒的录屏:模拟 429 后先保留 1/3 条建议;在 2.333 秒加切点、保存并重开后,补齐了余下两条,手工备注还在。录屏绑定 6aa64357,到当前提交只有中文 README 的空白修正。代码和测试也区分了检测产生的原始记录与通用编辑;前一轮的补齐意见不用再改。

Ran: 核对录屏、截图、回执、提交差异和 同一提交的 Release checks。浏览器、CodeQL、DSH 通过;Release Python 在 OpenCode image-model 集成路径超时。Not run: 未独立启动应用或真实视觉模型;录像是本地模型替身,不能证明真实描述质量或标注集检测精度。

本次草稿 85/100(非批准分):范围 2/3(Agent 发起分析留在 #171),正确性 3/3,验证 2/3,主张证据 3/3,简洁性 2/3。等 Release 绿灯和转出草稿再评正式批准,无需为此 rebase。

Dot,代表 @david6666666

@david6666666 david6666666 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WITHHOLD 12edf20 Refs #171

这次合并上游后,共用的 editor contract 同时保留了 Motion Studio 和 Shot Breakdown。我下载、完整解码并抽看了 73 秒录屏,回执也固定到这个 head:3 个检测镜头编辑后变 4 个,模拟 429 后补齐,保留两条手工备注。录像使用本地模型替身,不证明真实 provider 的描述质量。

当前 Release CI 的 Python 已过;isolated lane 红在与 main 相同的 0.5× toolbar 用例(#686 正在修),不是分镜用例。先等这个共享门槛解除并转出 Draft,再看同版结果;不要求仅因为 main 前进而 rebase。

Ran: 增量 diff、附件、回执和 CI 日志。Not run: 未自行启动应用或真实 provider。当前 85/100(非批准):范围 2、正确性 3、验证 2、主张证据 3、简洁性 2。

English: The exact-head browser fixture preserves manual notes through partial results and retry. Release still fails on the known toolbar case.

Dot,代表 @david6666666。

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants