cueframe 0.11.0 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/analyze-C3MSCON6.js +2 -0
- package/dist/{chunk-M3NS5UR2.js → chunk-OAJBHFAJ.js} +6 -6
- package/dist/cueframe.js +46 -46
- package/dist/skills/add-music-bed/SKILL.md +5 -23
- package/dist/skills/brand-reel/SKILL.md +5 -28
- package/dist/skills/clip-a-talking-head/SKILL.md +2 -20
- package/dist/skills/composing-video/SKILL.md +36 -432
- package/dist/skills/composing-video/references/acceptance-template.md +21 -0
- package/dist/skills/composing-video/references/audio-design.md +125 -0
- package/dist/skills/composing-video/references/card-and-motion-runtime.md +49 -0
- package/dist/skills/composing-video/references/craft-principles.md +25 -0
- package/dist/skills/composing-video/references/film-planning.md +37 -0
- package/dist/skills/composing-video/references/format-decisions.md +17 -0
- package/dist/skills/composing-video/references/format-playbooks.md +96 -0
- package/dist/skills/composing-video/references/motion-design.md +25 -0
- package/dist/skills/composing-video/references/project-policy.md +18 -0
- package/dist/skills/composing-video/references/sfx-pack.md +69 -0
- package/dist/skills/composing-video/references/sound-and-timing.md +15 -0
- package/dist/skills/composing-video/references/tool-map.md +43 -0
- package/dist/skills/cueframe-brand-demo/SKILL.md +1 -7
- package/dist/skills/cueframe-cli/SKILL.md +9 -7
- package/dist/skills/cueframe-component-authoring/SKILL.md +20 -169
- package/dist/skills/cueframe-component-authoring/references/authoring-paths.md +72 -0
- package/dist/skills/cueframe-component-authoring/references/forking-and-layout.md +35 -0
- package/dist/skills/cueframe-component-authoring/references/native-component-workflows.md +98 -0
- package/dist/skills/cueframe-component-authoring/references/native-source-contract.md +54 -0
- package/dist/skills/cueframe-component-authoring/references/parented-device-card.json +13 -0
- package/dist/skills/cueframe-component-authoring/references/parented-motion.md +25 -0
- package/dist/skills/cueframe-component-authoring/references/retired-projects.md +26 -0
- package/dist/skills/cueframe-compose-loop/SKILL.md +14 -115
- package/dist/skills/cueframe-compose-loop/references/convergence-loop.md +128 -0
- package/dist/skills/cueframe-compose-loop/references/preview-workflow.md +6 -2
- package/dist/skills/cueframe-connect/SKILL.md +1 -7
- package/dist/skills/cueframe-connect/references/tools.md +6 -5
- package/dist/skills/cueframe-product-video/SKILL.md +1 -7
- package/dist/skills/cueframe-reference-video/SKILL.md +30 -0
- package/dist/skills/cueframe-reference-video/references/measurement-and-comparison.md +45 -0
- package/dist/skills/cueframe-reference-video/scripts/motion-grid.sh +116 -0
- package/dist/skills/cueframe-scene-shot/SKILL.md +2 -8
- package/dist/skills/cueframe-storyboard/SKILL.md +1 -7
- package/dist/skills/every-format-from-one-edit/SKILL.md +3 -19
- package/dist/skills/extracting-brand-kits/SKILL.md +1 -7
- package/dist/skills/launch-video/SKILL.md +6 -26
- package/dist/skills/make-a-social-reel/SKILL.md +7 -26
- package/dist/skills/rebrand-a-video/SKILL.md +2 -19
- package/dist/skills/video-craft-standards/SKILL.md +20 -103
- package/dist/skills/video-craft-standards/references/format-standards.md +118 -0
- package/package.json +4 -4
- package/dist/analyze-5KCAIZI6.js +0 -2
|
@@ -1,131 +1,30 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cueframe-compose-loop
|
|
3
|
-
description: Use when an
|
|
3
|
+
description: "Use when previewing, reviewing or revising a CueFrame composition, including a scoped correction, reference comparison or final-delivery check. Also use when an agent should drive CueFrame to a high-quality clip itself: author, look at rendered frames, score with the judge, fix the weakest thing and repeat, over the primitives in the `cueframe-cli` skill. Triggers on \"turn this source into a polished 9:16 clip\" or \"compose and self-correct until it scores well\"."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# CueFrame
|
|
6
|
+
# CueFrame preview and revision
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Use the [project and capability policy](../composing-video/references/project-policy.md). This skill owns evidence, revision scope and delivery; craft and format skills describe what to look for.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Read the current saved composition and relevant source before changing it. Reuse the approved brief or supplied reference. A local correction does not restart planning. For exact builtin preset/recipe insertion, use [builtin insertion](references/builtin-insertion.md).
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Inspect the behavior that matters
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Read [preview workflow](references/preview-workflow.md) to choose the supported hosted or local surface. Match evidence to the question: stills for typography/geometry, motion for paths and handoffs, audio inspection for the mix. Requested timestamps, artifact URLs and successful jobs are not proof that their content was observed.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
judge (verify); you supply the taste and the iteration. The engine does NOT
|
|
18
|
-
auto-compose for you here — you drive the loop and decide when it's done. Drive
|
|
19
|
-
the primitives with the `cueframe-cli` skill; this tells you *how to converge*.
|
|
16
|
+
Locate a finding in the film: when it happens, what is visible or audible, what the brief/reference requires, and which relationship needs to change. For reconstruction, compare matching source/output landmarks and the interval between them. If a requested revision deliberately changed timing, compare corresponding events rather than pretending they still share timestamps.
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
It owns hosted/local routing, bounded motion evidence, and the distinction between a small edit
|
|
23
|
-
and final delivery. For a minor revision, keep the approved brief and inspect the changed behavior
|
|
24
|
-
plus relevant regressions; do not restart the full planning/judging loop below.
|
|
18
|
+
Fix the highest-impact cause you can explain. A layout failure may need a grid change, a position adjustment, a different parent transform or a new shot choice. Do not force every correction into one technique. Use targeted atomic operations against the observed revision and retain concurrent edits. Every committing batch needs the required `if_match` from the current read. After a conflict, reread the changed state and rebuild the intended change; never resend old operations with the error's `currentEtag`.
|
|
25
19
|
|
|
26
|
-
##
|
|
20
|
+
## Recheck the affected scene
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
get_context → author → scoped preview (look) → judge if useful
|
|
30
|
-
↑ │
|
|
31
|
-
└──────── fix the WORST criterion ──────┘ → stop → render
|
|
32
|
-
```
|
|
22
|
+
A timing change can affect more than the edited clip: backing plates, screen masks, linked controls, captions, sound and neighboring handoffs. Inspect the changed window with its entrance/exit context. If the ending must be preserved, verify the complete final scene through its last frame, not just an unchanged logo object. Check saved values as well as actual output.
|
|
33
23
|
|
|
34
|
-
|
|
35
|
-
wait for each terminal result; there is no hosted render box to open, warm, or close.
|
|
36
|
-
Use the local live-preview tools when working in a desktop project that exposes them.
|
|
24
|
+
`score_composition` can supply broader editorial, spatial, brand and caption critique when useful and within budget. Its fixed caption criterion can penalize intentionally uncaptioned work; do not add captions solely to improve a score. These instructions do not change judge behavior. A failed brief requirement remains a failure regardless of a numerical score.
|
|
37
25
|
|
|
38
|
-
|
|
26
|
+
Continue while evidence suggests a useful correction within the task's time/cost scope. If progress stalls, change the diagnosed cause or report the remaining gap; repeated scores alone are not progress. A scoped edit can finish with verified previews. For a finished-video request, export the saved revision and inspect the resulting artifact. Report the output, what was actually reviewed, and unresolved limitations.
|
|
39
27
|
|
|
40
|
-
|
|
41
|
-
to author well for a source:
|
|
28
|
+
## Detailed guidance
|
|
42
29
|
|
|
43
|
-
-
|
|
44
|
-
primary speaker), normalized `bbox`, `speakingShare` (0–1). Use these to aim
|
|
45
|
-
reframe/crop intents at the right subject. `faces.status: "not_detected"` means
|
|
46
|
-
no detection has run yet — author without face-targeted reframe, or trigger a
|
|
47
|
-
pass first; never invent face ids.
|
|
48
|
-
- **transcript** — utterances with per-word `start`/`end` (seconds). Use for
|
|
49
|
-
caption timing and for placing overlays on the right beat.
|
|
50
|
-
|
|
51
|
-
For a maintained builtin package, follow [exact builtin insertion](references/builtin-insertion.md)
|
|
52
|
-
before authoring custom source.
|
|
53
|
-
|
|
54
|
-
## 1. Author
|
|
55
|
-
|
|
56
|
-
Build/modify the working composition with the op vocabulary —
|
|
57
|
-
the curated `apply_composition({ projectId, body: { ops: [...] } })`. Read
|
|
58
|
-
`describe_composition_ops` for supported operations and `get_composition` for
|
|
59
|
-
current revision and brand witnesses before editing. Pass that revision as `if_match`
|
|
60
|
-
on every committing call. A 409 means someone saved after your read: call `get_composition`
|
|
61
|
-
again, rebuild your ops against what it returns, and send them with its revision. Never resend
|
|
62
|
-
the same ops with the 409's `currentEtag`; that overwrites a save you have not read. Op keys
|
|
63
|
-
are `.strict()`: a typo'd key is rejected, not silently dropped, so read the
|
|
64
|
-
error and fix the key. Reference faces from get_context in your reframe segments;
|
|
65
|
-
time captions/overlays from the transcript word timings.
|
|
66
|
-
|
|
67
|
-
## 2. Preview — look at it
|
|
68
|
-
|
|
69
|
-
Use the curated `preview_frame` MCP tool, or
|
|
70
|
-
`POST /v1/projects/:id/preview-frame-jobs`, with the composition target and the
|
|
71
|
-
timestamps you need to inspect. The operation returns `{ jobId }` immediately.
|
|
72
|
-
Call `wait_job({ kind: "preview_frame", id: jobId })`, then view the image artifact
|
|
73
|
-
URLs in the successful result. Look at the beats you're unsure about: a cut, an
|
|
74
|
-
overlay entrance, or the hook. The stills are real render evidence, not continuous-motion proof.
|
|
75
|
-
Use `preview_clip` for the affected composition window to judge cuts, entrances, camera movement,
|
|
76
|
-
and audio timing; use `preview_component` or `preview_card` for isolated authoring checks.
|
|
77
|
-
|
|
78
|
-
## 3. Score it
|
|
79
|
-
|
|
80
|
-
When broader review is useful and within budget, use `score_composition`, or `POST /v1/projects/:id/score-composition`, with the
|
|
81
|
-
composition target plus optional `editorialIntent` and `brandContext`. It returns
|
|
82
|
-
`{ jobId }`; call `wait_job({ kind: "verify", id: jobId })`. CueFrame's judge samples
|
|
83
|
-
the meaningful beats, renders them, and returns:
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
{ perCriterion: { editorial, spatial, brand, caption } each { score 0–10, critique },
|
|
87
|
-
composite, // weighted overall
|
|
88
|
-
critique, // worst-first, leads with the criterion to fix
|
|
89
|
-
beats }
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
The four criteria:
|
|
93
|
-
|
|
94
|
-
| criterion | what it grades |
|
|
95
|
-
|---|---|
|
|
96
|
-
| **editorial** | does the framing/cut serve the stated intent (the hook, the point)? |
|
|
97
|
-
| **spatial** | subject framing — centered/tight enough, not lost in dead space, not occluded by captions |
|
|
98
|
-
| **brand** | on-brand color/typography/voice; cohesive look |
|
|
99
|
-
| **caption** | caption legibility, timing, placement (or `no_captions` when absent) |
|
|
100
|
-
|
|
101
|
-
The hosted caption criterion can penalize intentionally uncaptioned work; do not add captions solely for a score. These instructions do not change judge behavior.
|
|
102
|
-
|
|
103
|
-
You get **scores and the critique, never the rubric** — the taste is CueFrame's.
|
|
104
|
-
Pass `editorialIntent` (your brief/hook) so editorial is graded against what you
|
|
105
|
-
meant.
|
|
106
|
-
|
|
107
|
-
## 4. Fix the worst — then re-score
|
|
108
|
-
|
|
109
|
-
Read `critique` — it names the lowest criterion first and says why. Fix **that one
|
|
110
|
-
thing** (re-author the relevant ops), then score again. One criterion per pass:
|
|
111
|
-
chasing all four at once thrashes. Example: editorial 4 "two subjects off-center
|
|
112
|
-
vs centered intent" → tighten the reframe onto face-0 → re-score. A layout critique
|
|
113
|
-
("cramped", "unbalanced", "text crowds the art") on a laid-out card or component is a
|
|
114
|
-
change to its CSS grid tracks or flex basis. Re-author those; never nudge pixels (see
|
|
115
|
-
`cueframe-component-authoring`).
|
|
116
|
-
|
|
117
|
-
## 5. Stop — then render
|
|
118
|
-
|
|
119
|
-
For a whole-film review, check the brief's actual acceptance criteria; no fixed score threshold applies. Two no-improvement passes are a reason to stop spending and report what
|
|
120
|
-
remains, not to declare a rejected result approved. Render with `create_render` only when a
|
|
121
|
-
finished video is requested or the work reaches final delivery. A scoped revision can end with
|
|
122
|
-
verified preview evidence and an explicit note that no new final export was made.
|
|
123
|
-
|
|
124
|
-
## Notes
|
|
125
|
-
|
|
126
|
-
- **Whose tokens:** you run this loop on your own model/tokens; CueFrame bills the
|
|
127
|
-
infra (capture/render) + the judge. That's the point — you keep the orchestration.
|
|
128
|
-
- **Don't re-derive the judge or beat sampling** — verify owns both. Your job is
|
|
129
|
-
author → read scores → fix worst → repeat.
|
|
130
|
-
- **Budget the loop:** 3–5 scoring passes is plenty for most clips. If composite
|
|
131
|
-
won't climb, the limiter is usually the source or the intent, not more passes.
|
|
30
|
+
[The convergence loop](references/convergence-loop.md) has the step-by-step author, preview, score, fix and stop procedure for an agent driving a clip to quality.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# The convergence loop
|
|
2
|
+
|
|
3
|
+
Defaults, examples and detail for this topic. The [skill](../SKILL.md) and the [project and capability policy](../../composing-video/references/project-policy.md) take precedence where they differ, and the current tool schemas are authoritative.
|
|
4
|
+
|
|
5
|
+
## Scope and capability policy
|
|
6
|
+
|
|
7
|
+
User intent and acceptance criteria override this recipe's aesthetic defaults. Silent, typography-only, uncaptioned and slow work are valid; no universal narration, footage, CTA, beat count or score target. Contracts, factual fidelity, media bindings and current source revisions remain mandatory.
|
|
8
|
+
|
|
9
|
+
Read available tools and current project; preserve the chosen local/hosted lane. Supported local work needs no hosted registration. Do not silently install, authenticate, switch projects or upload local content. Before metered hosted work, check `get_account`, entitlements, balance and quotes. Desktop setup: https://docs.cueframe.ai.
|
|
10
|
+
|
|
11
|
+
For scoped revisions, preserve unrelated timing, media, audio and shared brand-kit state. Edit affected content; inspect relevant frames, continuous motion and affected audio. No restarted intake, new approval pause, paid judge or final export by default. Judge only when useful; scores never override acceptance failures. Stop/report after two no-improvement passes. See [preview workflow](../../cueframe-compose-loop/references/preview-workflow.md).
|
|
12
|
+
|
|
13
|
+
You are the director. CueFrame gives you hands (author), eyes (capture), and a
|
|
14
|
+
judge (verify); you supply the taste and the iteration. The engine does NOT
|
|
15
|
+
auto-compose for you here — you drive the loop and decide when it's done. Drive
|
|
16
|
+
the primitives with the `cueframe-cli` skill; this tells you *how to converge*.
|
|
17
|
+
|
|
18
|
+
Before choosing a preview or export, read [preview-workflow.md](preview-workflow.md).
|
|
19
|
+
It owns hosted/local routing, bounded motion evidence, and the distinction between a small edit
|
|
20
|
+
and final delivery. For a minor revision, keep the approved brief and inspect the changed behavior
|
|
21
|
+
plus relevant regressions; do not restart the full planning/judging loop below.
|
|
22
|
+
|
|
23
|
+
## The loop
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
get_media_context → author → scoped preview (look) → judge if useful
|
|
27
|
+
↑ │
|
|
28
|
+
└──────── fix the WORST criterion ──────┘ → stop → render
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Hosted preview and scoring are durable, stateless jobs. Keep their job IDs and
|
|
32
|
+
wait for each terminal result; there is no hosted render box to open, warm, or close.
|
|
33
|
+
Use the local live-preview tools when working in a desktop project that exposes them.
|
|
34
|
+
|
|
35
|
+
## 0. Context — relevant project and source first
|
|
36
|
+
|
|
37
|
+
`GET /v1/media/:id/context` (`get_media_context`) returns what you need
|
|
38
|
+
to author well for a source:
|
|
39
|
+
|
|
40
|
+
- **faces** — the subject roster per source window: `faceId` (face-0 = largest/
|
|
41
|
+
primary speaker), normalized `bbox`, `speakingShare` (0–1). Use these to aim
|
|
42
|
+
reframe/crop intents at the right subject. `faces.status: "not_detected"` means
|
|
43
|
+
no detection has run yet — author without face-targeted reframe, or trigger a
|
|
44
|
+
pass first; never invent face ids.
|
|
45
|
+
- **transcript** — utterances with per-word `start`/`end` (seconds). Use for
|
|
46
|
+
caption timing and for placing overlays on the right beat.
|
|
47
|
+
|
|
48
|
+
For a maintained builtin package, follow [exact builtin insertion](builtin-insertion.md)
|
|
49
|
+
before authoring custom source.
|
|
50
|
+
|
|
51
|
+
## 1. Author
|
|
52
|
+
|
|
53
|
+
Build/modify the working composition with the op vocabulary —
|
|
54
|
+
the curated `apply_composition({ projectId, body: { ops: [...] } })`. Read
|
|
55
|
+
`describe_composition_ops` for supported operations and `get_composition` for
|
|
56
|
+
current revision and brand witnesses before editing. Pass that revision as `if_match`
|
|
57
|
+
on every committing call. A 409 means someone saved after your read: call `get_composition`
|
|
58
|
+
again, rebuild your ops against what it returns, and send them with its revision. Never resend
|
|
59
|
+
the same ops with the 409's `currentEtag`; that overwrites a save you have not read. Op keys
|
|
60
|
+
are `.strict()`: a typo'd key is rejected, not silently dropped, so read the
|
|
61
|
+
error and fix the key. Reference faces from get_media_context in your reframe segments;
|
|
62
|
+
time captions/overlays from the transcript word timings.
|
|
63
|
+
|
|
64
|
+
## 2. Preview — look at it
|
|
65
|
+
|
|
66
|
+
Use the curated `preview_frame` MCP tool, or
|
|
67
|
+
`POST /v1/projects/:id/preview-frame-jobs`, with the composition target and the
|
|
68
|
+
timestamps you need to inspect. The operation returns `{ jobId }` immediately.
|
|
69
|
+
Call `wait_job({ kind: "preview_frame", id: jobId })`, then view the image artifact
|
|
70
|
+
URLs in the successful result. Look at the beats you're unsure about: a cut, an
|
|
71
|
+
overlay entrance, or the hook. The stills are real render evidence, not continuous-motion proof.
|
|
72
|
+
Use `preview_clip` for the affected composition window to judge cuts, entrances, camera movement,
|
|
73
|
+
and audio timing; use `preview_component` or `preview_card` for isolated authoring checks.
|
|
74
|
+
|
|
75
|
+
## 3. Score it
|
|
76
|
+
|
|
77
|
+
When broader review is useful and within budget, use `score_composition`, or `POST /v1/projects/:id/score-composition`, with the
|
|
78
|
+
composition target plus optional `editorialIntent` and `brandContext`. It returns
|
|
79
|
+
`{ jobId }`; call `wait_job({ kind: "verify", id: jobId })`. CueFrame's judge samples
|
|
80
|
+
the meaningful beats, renders them, and returns:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
{ perCriterion: { editorial, spatial, brand, caption } each { score 0–10, critique },
|
|
84
|
+
composite, // weighted overall
|
|
85
|
+
critique, // worst-first, leads with the criterion to fix
|
|
86
|
+
beats }
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The four criteria:
|
|
90
|
+
|
|
91
|
+
| criterion | what it grades |
|
|
92
|
+
|---|---|
|
|
93
|
+
| **editorial** | does the framing/cut serve the stated intent (the hook, the point)? |
|
|
94
|
+
| **spatial** | subject framing — centered/tight enough, not lost in dead space, not occluded by captions |
|
|
95
|
+
| **brand** | on-brand color/typography/voice; cohesive look |
|
|
96
|
+
| **caption** | caption legibility, timing, placement (or `no_captions` when absent) |
|
|
97
|
+
|
|
98
|
+
The hosted caption criterion can penalize intentionally uncaptioned work; do not add captions solely for a score. These instructions do not change judge behavior.
|
|
99
|
+
|
|
100
|
+
You get **scores and the critique, never the rubric** — the taste is CueFrame's.
|
|
101
|
+
Pass `editorialIntent` (your brief/hook) so editorial is graded against what you
|
|
102
|
+
meant.
|
|
103
|
+
|
|
104
|
+
## 4. Fix the worst — then re-score
|
|
105
|
+
|
|
106
|
+
Read `critique` — it names the lowest criterion first and says why. Fix **that one
|
|
107
|
+
thing** (re-author the relevant ops), then score again. One criterion per pass:
|
|
108
|
+
chasing all four at once thrashes. Example: editorial 4 "two subjects off-center
|
|
109
|
+
vs centered intent" → tighten the reframe onto face-0 → re-score. A layout critique
|
|
110
|
+
("cramped", "unbalanced", "text crowds the art") on a laid-out card or component is a
|
|
111
|
+
change to its CSS grid tracks or flex basis. Re-author those; never nudge pixels (see
|
|
112
|
+
`cueframe-component-authoring`).
|
|
113
|
+
|
|
114
|
+
## 5. Stop — then render
|
|
115
|
+
|
|
116
|
+
For a whole-film review, check the brief's actual acceptance criteria; no fixed score threshold applies. Two no-improvement passes are a reason to stop spending and report what
|
|
117
|
+
remains, not to declare a rejected result approved. Render with `create_render` only when a
|
|
118
|
+
finished video is requested or the work reaches final delivery. A scoped revision can end with
|
|
119
|
+
verified preview evidence and an explicit note that no new final export was made.
|
|
120
|
+
|
|
121
|
+
## Notes
|
|
122
|
+
|
|
123
|
+
- **Whose tokens:** you run this loop on your own model/tokens; CueFrame bills the
|
|
124
|
+
infra (capture/render) + the judge. That's the point — you keep the orchestration.
|
|
125
|
+
- **Don't re-derive the judge or beat sampling** — verify owns both. Your job is
|
|
126
|
+
author → read scores → fix worst → repeat.
|
|
127
|
+
- **Budget the loop:** 3–5 scoring passes is plenty for most clips. If composite
|
|
128
|
+
won't climb, the limiter is usually the source or the intent, not more passes.
|
|
@@ -23,14 +23,18 @@ The local component preview compiles replacement source revisions; it is not a p
|
|
|
23
23
|
- Use a component's existing params for supported changes; update its source in place only when necessary. Do not create a new component ID for each tweak.
|
|
24
24
|
- `durationInFrames` sets the component's render duration; it is **not a generic trim window**. Shortening it can retime animations normalized over duration. Preserve production timing. Use a documented component-specific offset only if it preserves that timing, or use the saved composition's `preview_clip` window. `startFrame` is not a universal preview API parameter.
|
|
25
25
|
- Preserve FPS when judging motion. Choose resolution for the question: a low-resolution motion preview may establish timing but not typography, glass edges, or final-resolution shader quality. Use appropriate stills for those details.
|
|
26
|
-
- Batch related still timestamps.
|
|
26
|
+
- Batch related still timestamps within the tool's delivery bounds. Check which image blocks actually arrived and their timestamp/identity; metadata for more frames does not establish their delivery. Request missing frames through the supported selector or another bounded preview. Repeating an unchanged completed job is not evidence of additional frames. A contact sheet shows sampled frames, not continuous playback. Inspect the critical motion window and listen when the change affects sound.
|
|
27
27
|
- Scope output and compute are different: a short composition preview can still trigger preparation or an alpha bake on a cache miss. Inspect progress/receipts before diagnosing cost. Do not promise instant previews, cross-job cache hits, or that every requested still requires a full bake.
|
|
28
28
|
|
|
29
29
|
## Evidence and stopping
|
|
30
30
|
|
|
31
31
|
Keep component source revision/hash, params, asset bindings, dimensions, FPS, requested frames/window, and returned artifact/job identity together. For hosted composition parity, inspect `previewed.source`, composition ID, and ETag where provided. Source can change without changing the composition ETag. Unchanged pixels outside an edit's visible frame range do not by themselves prove a stale cache.
|
|
32
32
|
|
|
33
|
-
Compare affected frames and motion with the reference at matching timestamps. Keep isolated-component proof distinct from saved-composition proof and final-export proof. For a minor edit, stop once the requested behavior and relevant regressions are checked; report the preview and explicitly say if no new final export was made.
|
|
33
|
+
Compare affected frames and motion with the reference at matching timestamps, or corresponding named events when a requested revision intentionally retimed them. For structural changes, inspect connected layers and the intervals on both sides of each affected boundary; preserve a complete ending, including its background and audio tail. Keep isolated-component proof distinct from saved-composition proof and final-export proof. For a minor edit, stop once the requested behavior and relevant regressions are checked; report the preview and explicitly say if no new final export was made.
|
|
34
|
+
|
|
35
|
+
For precise reference matching, `compare_frames` can place a certified source frame beside an existing saved preview and return an unaligned overlay. Use full-resolution images for glyph bounds and spacing; request a common-coordinate crop for details. Read actual frame/source identities, color/display transforms and delivery status from the result. Derived comparison images are diagnostic evidence, not authored reconstruction layers. Reuse the candidate preview; comparing a different view does not require rendering it again.
|
|
36
|
+
|
|
37
|
+
After a correction, capture the affected saved version and compare it with the same reference moment. Inspect the adjacent movement separately: doubled edges in an overlay can identify a displaced object, but they cannot explain its acceleration or establish that sound is synchronized. A former comparison remains evidence of the former source; it does not update when a component or composition changes.
|
|
34
38
|
|
|
35
39
|
Use `score_composition` for broader editorial/brand review when useful and within budget. Do not require repeated whole-film judging to verify a known local correction. A judge score does not override a failed acceptance criterion or the user's visual feedback.
|
|
36
40
|
|
|
@@ -5,13 +5,7 @@ description: Use when CueFrame is not connected yet, the user asks how to connec
|
|
|
5
5
|
|
|
6
6
|
# Connect CueFrame
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
User intent and acceptance criteria override this recipe's aesthetic defaults. Silent, typography-only, uncaptioned and slow work are valid; no universal narration, footage, CTA, beat count or score target. Contracts, factual fidelity, media bindings and current source revisions remain mandatory.
|
|
11
|
-
|
|
12
|
-
Read available tools and current project; preserve the chosen local/hosted lane. Supported local work needs no hosted registration. Do not silently install, authenticate, switch projects or upload local content. Before metered hosted work, check `get_account`, entitlements, balance and quotes. Desktop setup: https://docs.cueframe.ai.
|
|
13
|
-
|
|
14
|
-
For scoped revisions, preserve unrelated timing, media, audio and shared brand-kit state. Edit affected content; inspect relevant frames, continuous motion and affected audio. No restarted intake, new approval pause, paid judge or final export by default. Judge only when useful; scores never override acceptance failures. Stop/report after two no-improvement passes. See [preview workflow](../cueframe-compose-loop/references/preview-workflow.md).
|
|
8
|
+
Use the [project and capability policy](../composing-video/references/project-policy.md) for scope, current state and metered work.
|
|
15
9
|
|
|
16
10
|
First inspect available CueFrame tools and their current project context. If the requested work is supported by an existing connection, use it without installing again. Preserve the user's chosen local or hosted lane. Local-only desktop work needs no hosted registration; desktop connection instructions are at https://docs.cueframe.ai. This public plugin connects to the hosted product at `https://api.cueframe.ai/v1/mcp`.
|
|
17
11
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CueFrame tool reference
|
|
2
2
|
|
|
3
|
-
Generated from the @cueframe/mcp 0.
|
|
3
|
+
Generated from the @cueframe/mcp 0.13.0 catalog (commit eb1b03358). Do not edit it by hand.
|
|
4
4
|
|
|
5
5
|
Every CueFrame tool by its catalog name. A host may show it with a connection prefix (`mcp__cueframe__get_account`, `cueframe-read__get_account`); the name after the last `__` is the catalog name. **read** tools change no state, though some are metered; **write** tools change state, and a composition write takes the revision it edits.
|
|
6
6
|
|
|
@@ -15,10 +15,11 @@ Hosted surfaces: `api` is the MCP server at `https://api.cueframe.ai/v1/mcp`; `e
|
|
|
15
15
|
| `cancel_export` | write | api | - |
|
|
16
16
|
| `cancel_job` | write | api | - |
|
|
17
17
|
| `cancel_render` | write | api | - |
|
|
18
|
-
| `check_template` |
|
|
18
|
+
| `check_template` | read | - | director, plan, external, cli |
|
|
19
19
|
| `close_component_preview` | write | - | director, plan, external, cli |
|
|
20
20
|
| `close_project` | write | - | external |
|
|
21
21
|
| `commit_component_preview` | write | - | director, external, cli |
|
|
22
|
+
| `compare_frames` | read | api, editor, compose | director, plan, external, cli |
|
|
22
23
|
| `compose` | write | api | - |
|
|
23
24
|
| `consult` | write | api | - |
|
|
24
25
|
| `create_brand_kit` | write | api | - |
|
|
@@ -53,7 +54,7 @@ Hosted surfaces: `api` is the MCP server at `https://api.cueframe.ai/v1/mcp`; `e
|
|
|
53
54
|
| `editorial_list_briefs` | read | api, editor, compose | director, plan, cli |
|
|
54
55
|
| `editorial_list_evidence` | read | api, editor, compose | director, plan, cli |
|
|
55
56
|
| `editorial_list_runs` | read | api, editor, compose | director, plan, cli |
|
|
56
|
-
| `editorial_run_source` | read | api, editor, compose |
|
|
57
|
+
| `editorial_run_source` | read | api, editor, compose | director, plan, external, cli |
|
|
57
58
|
| `editorial_sample_motion` | write | api, editor, compose | director, cli |
|
|
58
59
|
| `export_project` | write | - | external |
|
|
59
60
|
| `extract_brand_kit` | write | api | - |
|
|
@@ -92,9 +93,9 @@ Hosted surfaces: `api` is the MCP server at `https://api.cueframe.ai/v1/mcp`; `e
|
|
|
92
93
|
| `list_media` | read | api, editor, compose | director, plan, external, cli |
|
|
93
94
|
| `list_plans` | read | api | - |
|
|
94
95
|
| `list_projects` | read | api | external |
|
|
95
|
-
| `list_render_fonts` | read | api |
|
|
96
|
+
| `list_render_fonts` | read | api | director, plan, external, cli |
|
|
96
97
|
| `list_taste` | read | api, editor, compose | director, plan, external, cli |
|
|
97
|
-
| `list_templates` | read | api, editor |
|
|
98
|
+
| `list_templates` | read | api, editor | director, plan, external, cli |
|
|
98
99
|
| `new_composition` | write | api, editor, compose | director, external, cli |
|
|
99
100
|
| `open_component_preview` | write | - | director, plan, external, cli |
|
|
100
101
|
| `open_project` | write | - | external |
|
|
@@ -5,13 +5,7 @@ description: Use when turning a screen recording (with cursor/click events) into
|
|
|
5
5
|
|
|
6
6
|
# CueFrame — Product Video recipe
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
User intent and acceptance criteria override this recipe's aesthetic defaults. Silent, typography-only, uncaptioned and slow work are valid; no universal narration, footage, CTA, beat count or score target. Contracts, factual fidelity, media bindings and current source revisions remain mandatory.
|
|
11
|
-
|
|
12
|
-
Read available tools and current project; preserve the chosen local/hosted lane. Supported local work needs no hosted registration. Do not silently install, authenticate, switch projects or upload local content. Before metered hosted work, check `get_account`, entitlements, balance and quotes. Desktop setup: https://docs.cueframe.ai.
|
|
13
|
-
|
|
14
|
-
For scoped revisions, preserve unrelated timing, media, audio and shared brand-kit state. Edit affected content; inspect relevant frames, continuous motion and affected audio. No restarted intake, new approval pause, paid judge or final export by default. Judge only when useful; scores never override acceptance failures. Stop/report after two no-improvement passes. See [preview workflow](../cueframe-compose-loop/references/preview-workflow.md).
|
|
8
|
+
Use the [project and capability policy](../composing-video/references/project-policy.md) for scope, current state and metered work.
|
|
15
9
|
|
|
16
10
|
A **use-case recipe**, not new framework surface. CueFrame's engine only knows
|
|
17
11
|
primitives (`upload` → `composition put` → `render`, the `reframe` viewport, the
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cueframe-reference-video
|
|
3
|
+
description: Use when recreating a supplied video or matching its motion, camera, typography, transitions, visual identity or audiovisual timing in CueFrame.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CueFrame reference-video reconstruction
|
|
7
|
+
|
|
8
|
+
Use the [project and capability policy](../composing-video/references/project-policy.md) for scope, current state and metered work.
|
|
9
|
+
|
|
10
|
+
For a reconstruction, the reference film and full-frame captures are analysis inputs, not finished reconstruction layers; source excerpts remain valid when the user requests an edit or remix.
|
|
11
|
+
|
|
12
|
+
Treat the supplied film as the acceptance anchor. Reconstruct what it communicates and how its objects move; matching endpoint stills alone does not match a film. Preserve the requested duration, style and intentional holds. Typography, gradients and reconstructed interface artwork are valid when the reference calls for them; do not present reconstructed UI as a capture of a working product.
|
|
13
|
+
|
|
14
|
+
## Inspect before choosing the technique
|
|
15
|
+
|
|
16
|
+
Use the current runtime's advertised source and motion-inspection capabilities. An overview finds the phrases; denser samples around a transformation reveal its path, overlap, masking, occlusion and settling. Increase coverage where adjacent observations do not explain the motion. Distinguish a visible cut from an inferred continuous morph.
|
|
17
|
+
|
|
18
|
+
Keep a concise [reference ledger](references/measurement-and-comparison.md) linking observed timing, geometry, type, materials and sound events to evidence. Measure relevant landmarks and projected dimensions before guessing easing or camera behavior. Record unknown assets, fonts and audio separately from observations.
|
|
19
|
+
|
|
20
|
+
Eve may have no shell or local media access. Use delivered source/motion evidence through available tools; do not assume FFmpeg, downloads or local scripts can run. A capable local host can use FFprobe/FFmpeg for analysis, comparisons and decode checks. These are not substitute renderers for CueFrame. Report missing observation capabilities rather than claiming unseen motion or unheard sound.
|
|
21
|
+
|
|
22
|
+
For a local file, `bash scripts/motion-grid.sh INPUT OUTPUT_DIR` creates overview/dense grids and TSV indices with actual source frame numbers and presentation timestamps. Optional `--start SEC --duration SEC` selects an interval relative to the first presented frame; `--overview-fps N --dense-fps N` controls sampling. Each requested instant selects the first source frame at or after it, without duplicate frames; read the recorded actual time rather than assuming the requested rate landed exactly. Use a fresh output directory. The script requires FFprobe/FFmpeg and is an optional local observation aid.
|
|
23
|
+
|
|
24
|
+
## Author, compare and deliver
|
|
25
|
+
|
|
26
|
+
Choose useful fidelity anchors and prove the difficult motion early through supported component or timeline previews. Use CueFrame tools for saved authoring, previews and rendering. Keep related motion and sound tied to the same timing decisions; preserve editable text and meaningful parameters. Native peers can help when separate authored work is useful, but continuity still needs integrated review.
|
|
27
|
+
|
|
28
|
+
Compare actual output at the reference's timestamps and inspect the intervening motion. When available, use `compare_frames` on an identified source frame and saved preview artifact; its unaligned pair/overlay exposes layout drift without rendering the composition again. Read the [worked comparison](references/measurement-and-comparison.md) for geometry, intentional retiming and evidence limits. Fix located mismatches in scale, pose, direction, timing, readability or material before decorative polish. A score or successful compile cannot approve a failed reference requirement. Separate measured audio properties from listening and reused audio from new sound design.
|
|
29
|
+
|
|
30
|
+
For a finished-film request, deliver an actual CueFrame-produced MP4, verify its format/decode and identify remaining fidelity gaps. Do not invent the user's verdict. For a narrow revision, retain approved work and use the scoped preview workflow in `cueframe-compose-loop`; a new full export is only needed for requested final delivery.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Reference ledger and matched-time comparison
|
|
2
|
+
|
|
3
|
+
Keep observations, measurements and inferred implementation separate. A ledger can use ordinary shot notes; it does not require a new timeline or rigid production schema.
|
|
4
|
+
|
|
5
|
+
| Note | Useful evidence |
|
|
6
|
+
|---|---|
|
|
7
|
+
| Purpose and identity | What this phrase communicates; recurring subject, type, palette, artwork and material cues |
|
|
8
|
+
| Time | Source seconds/frames, meaningful arrival/hold/exit windows, source/output time mapping |
|
|
9
|
+
| Geometry | Normalized positions and projected sizes, margins, two corners or edges of a moving subject |
|
|
10
|
+
| Motion | Direction, changing displacement, acceleration/settling, rotation/depth cues, blur and opacity |
|
|
11
|
+
| Handoff | What disappears first, what overlaps, which object carries the eye, actual cut versus inferred morph |
|
|
12
|
+
| Sound | Observed cue/onset, rhythmic change or deliberate silence; whether heard or only measured |
|
|
13
|
+
| Evidence and confidence | Source identity, sampled timestamps, image/motion/audio evidence, observed/measured/inferred/unknown |
|
|
14
|
+
|
|
15
|
+
Start with broad coverage to find the important windows. Use denser samples for a fast handoff, a long camera move or text with a short reading window. Source-rate inspection is useful near impacts, replacements and direction changes. Sample only valid source times; an encoded audio tail is not extra video. If the tool samples or seeks approximately, retain that uncertainty rather than claiming frame-exact timing.
|
|
16
|
+
|
|
17
|
+
For each difficult move, compare source and output at identical timestamps. Follow the same landmarks: projected width may match while pose, occlusion or velocity is wrong. Inspect before, during and after the transition, not just its landed state. Do not temporally warp the result to conceal drift. A visible replacement is not evidence of a continuous extraction, and cursor contact does not prove a selected or confirmed UI state.
|
|
18
|
+
|
|
19
|
+
Use isolated authoring previews to establish technique, then persisted timeline previews to verify placement and interaction with other layers. After changing component source, verify its pinned source version and the output where the change should be visible; a composition ETag alone may not identify a changed referenced source.
|
|
20
|
+
|
|
21
|
+
Record findings as `time/window · observed mismatch → intended correction · what stays`. Reinspect the affected move and adjacent handoffs. Structural feedback can change the story and require retiming dependent copy, camera, graphics and sound; preserve unrelated user edits against current shared state.
|
|
22
|
+
|
|
23
|
+
A complete delivery can include a small set of fidelity anchors, critical motion comparisons, actual movie identity, asset/source provenance and unresolved differences. Audio signal measurements establish technical properties, not a listening verdict. Reusing the reference mix can isolate picture timing, but it does not demonstrate an authored score; reordering visuals may require reconsidering that mix.
|
|
24
|
+
|
|
25
|
+
## Worked correction: title spacing and a list thumbnail
|
|
26
|
+
|
|
27
|
+
In a 1920×1080, 30 fps reference study, the title at frame 117 had a 34px gap from its left word to a central mark and a 41px gap from that mark to the right word. The saved reproduction measured about 3px and 22px. Its type group was also narrower: 1021px against 1304px. These were visible glyph bounds in the output, not the HTML elements' CSS widths.
|
|
28
|
+
|
|
29
|
+
Inspect the separate frames, then an unaligned 50% overlay. Establish outer group placement and cap height before adjusting the two internal gaps. Change the actual title/mark source, preserving approved copy and the timeline. The corrected saved preview measured about 35px and 39px, with a 1315px group width. Those measurements had approximately ±2–4px uncertainty. They establish a specific spacing improvement, not a font match or a whole-film fidelity percentage.
|
|
30
|
+
|
|
31
|
+
At frame 180, a list thumbnail was 190px high against a 154px reference and had about 30px top inset against 48px. Its row pitch was already close. Reducing the thumbnail and recovering its inset corrected that relationship without rebuilding the outer panel or retiming the film. Use the same crop coordinates for both images so a shifted crop cannot hide a shifted object.
|
|
32
|
+
|
|
33
|
+
The title's settled frame improved, but around frame 99 its moving carrier remained displaced by roughly 90px. The list entrance and exit also remained late. This is the useful counterexample: a well-fitted endpoint does not establish the correct path, rotation, overlap, acceleration or timing. Reinspect the affected entrance, hold and exit; use continuous playback for the final motion verdict.
|
|
34
|
+
|
|
35
|
+
These observations come from CueFrame's Cardly reconstruction study. They are a worked diagnostic example, not default gaps, a required style or a reusable claim about every film. Keep the source reference separate from authored reconstruction layers.
|
|
36
|
+
|
|
37
|
+
## Reading comparison evidence
|
|
38
|
+
|
|
39
|
+
`compare_frames` compares already identified inputs. A source-frame operand may decode the certified representation; a candidate references an existing saved preview. Replaying a comparison or changing its crop does not mean a new composition render occurred. Read the delivered images and receipt rather than inferring delivery from URLs or metadata.
|
|
40
|
+
|
|
41
|
+
Keep actual frame indices, rational FPS/timebase, requested versus sampled time, dimensions, source hashes and composition/source versions with the observation. Hosted render bookends can make the internal render frame differ from the composition frame. A normalized representation is not necessarily the original file's clock. Unknown color transforms, approximate seeks or missing frames constrain the conclusion.
|
|
42
|
+
|
|
43
|
+
Use the raw pair and overlay at unchanged coordinates. A difference image can locate change but is easily dominated by backgrounds and materials; it is not an acceptance score. Automatic image registration can conceal displacement. Cropping is a view into the same coordinate space, not permission to independently fit the two images.
|
|
44
|
+
|
|
45
|
+
For an intentional structural revision, record the source-to-output event correspondence and compare those events. Do not temporally warp the evidence or undo the user's changed timing merely to reduce image differences. After editing, compare a preview from the new saved source, then inspect connected motion and sound.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
export LC_ALL=C
|
|
4
|
+
|
|
5
|
+
usage() {
|
|
6
|
+
echo "usage: motion-grid.sh INPUT OUTPUT_DIR [--overview-fps N] [--dense-fps N] [--start SEC] [--duration SEC]" >&2
|
|
7
|
+
exit 2
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[[ $# -ge 2 ]] || usage
|
|
11
|
+
input=$1
|
|
12
|
+
output_dir=$2
|
|
13
|
+
shift 2
|
|
14
|
+
overview_fps=1
|
|
15
|
+
dense_fps=6
|
|
16
|
+
start_sec=0
|
|
17
|
+
duration_sec=""
|
|
18
|
+
while [[ $# -gt 0 ]]; do
|
|
19
|
+
case "$1" in
|
|
20
|
+
--overview-fps) [[ $# -ge 2 ]] || usage; overview_fps=$2; shift 2 ;;
|
|
21
|
+
--dense-fps) [[ $# -ge 2 ]] || usage; dense_fps=$2; shift 2 ;;
|
|
22
|
+
--start) [[ $# -ge 2 ]] || usage; start_sec=$2; shift 2 ;;
|
|
23
|
+
--duration) [[ $# -ge 2 ]] || usage; duration_sec=$2; shift 2 ;;
|
|
24
|
+
*) usage ;;
|
|
25
|
+
esac
|
|
26
|
+
done
|
|
27
|
+
awk -v a="$overview_fps" -v b="$dense_fps" -v s="$start_sec" -v d="$duration_sec" 'BEGIN {
|
|
28
|
+
number = "^[0-9]+([.][0-9]+)?$"
|
|
29
|
+
exit !(a ~ number && a > 0 && b ~ number && b > 0 && s ~ number && (d == "" || (d ~ number && d > 0)))
|
|
30
|
+
}' || usage
|
|
31
|
+
command -v ffmpeg >/dev/null || { echo "ffmpeg is required" >&2; exit 1; }
|
|
32
|
+
command -v ffprobe >/dev/null || { echo "ffprobe is required" >&2; exit 1; }
|
|
33
|
+
[[ -f "$input" ]] || { echo "input not found: $input" >&2; exit 1; }
|
|
34
|
+
mkdir -p "$output_dir"
|
|
35
|
+
for label in overview dense; do
|
|
36
|
+
[[ ! -e "$output_dir/${label}-index.tsv" && ! -e "$output_dir/${label}-001.jpg" ]] || {
|
|
37
|
+
echo "use a fresh output directory (existing $label grid)" >&2; exit 1;
|
|
38
|
+
}
|
|
39
|
+
done
|
|
40
|
+
work_dir=$(mktemp -d "${TMPDIR:-/tmp}/cueframe-motion-grid.XXXXXX")
|
|
41
|
+
trap 'rm -rf "$work_dir"' EXIT
|
|
42
|
+
|
|
43
|
+
ffprobe -v error \
|
|
44
|
+
-show_entries format=duration,format_name:stream=index,codec_name,codec_type,width,height,r_frame_rate,avg_frame_rate,time_base,start_time,sample_rate,channels \
|
|
45
|
+
-of json "$input" > "$output_dir/probe.json"
|
|
46
|
+
# ffprobe emits frames in presentation order, matching FFmpeg select's n on
|
|
47
|
+
# the first video stream. Keep their actual timestamps, including VFR timing.
|
|
48
|
+
ffprobe -v error -select_streams v:0 -show_frames \
|
|
49
|
+
-show_entries frame=best_effort_timestamp,best_effort_timestamp_time \
|
|
50
|
+
-of compact "$input" > "$work_dir/frames.txt"
|
|
51
|
+
awk -F '|' '
|
|
52
|
+
$1 == "frame" {
|
|
53
|
+
pts = ""; seconds = ""
|
|
54
|
+
for (i = 2; i <= NF; i++) {
|
|
55
|
+
split($i, field, "=")
|
|
56
|
+
if (field[1] == "best_effort_timestamp") pts = field[2]
|
|
57
|
+
if (field[1] == "best_effort_timestamp_time") seconds = field[2]
|
|
58
|
+
}
|
|
59
|
+
if (pts !~ /^-?[0-9]+$/ || seconds !~ /^-?[0-9]+([.][0-9]+)?$/) exit 1
|
|
60
|
+
if (n && seconds + 0 < previous) exit 1
|
|
61
|
+
printf "%d\t%s\t%s\n", n++, pts, seconds
|
|
62
|
+
previous = seconds + 0
|
|
63
|
+
}
|
|
64
|
+
END { if (!n) exit 1 }
|
|
65
|
+
' "$work_dir/frames.txt" > "$work_dir/frames.tsv" || {
|
|
66
|
+
echo "source has missing or nonmonotonic presentation timestamps" >&2; exit 1;
|
|
67
|
+
}
|
|
68
|
+
ffmpeg -hide_banner -filters > "$work_dir/filters.txt" 2>/dev/null
|
|
69
|
+
has_drawtext=0
|
|
70
|
+
if grep -q ' drawtext ' "$work_dir/filters.txt"; then has_drawtext=1; fi
|
|
71
|
+
|
|
72
|
+
make_grid() {
|
|
73
|
+
local label=$1 rate=$2 filter
|
|
74
|
+
# Select the first actual source frame at/after each requested instant, once.
|
|
75
|
+
# Start/duration are relative to the first presented frame; the end is exclusive.
|
|
76
|
+
awk -F '\t' -v rate="$rate" -v start="$start_sec" -v duration="$duration_sec" '
|
|
77
|
+
BEGIN { print "page\tcell\ttime_sec\tsource_frame\tsource_pts\tsource_pts_time_sec\ttarget_time_sec"; target = start }
|
|
78
|
+
NR == 1 { origin = $3 + 0 }
|
|
79
|
+
{
|
|
80
|
+
time = $3 - origin
|
|
81
|
+
if (duration != "" && time >= start + duration - 0.0000005) next
|
|
82
|
+
if (time + 0.0000005 < target) next
|
|
83
|
+
printf "%03d\t%02d\t%.6f\t%s\t%s\t%s\t%.6f\n", int(count / 16) + 1, count % 16 + 1, time, $1, $2, $3, target
|
|
84
|
+
count++
|
|
85
|
+
target = start + (int((time - start + 0.0000005) * rate) + 1) / rate
|
|
86
|
+
}
|
|
87
|
+
END { if (!count) exit 1 }
|
|
88
|
+
' "$work_dir/frames.tsv" > "$work_dir/${label}-index.tsv" || {
|
|
89
|
+
echo "no source frames in the requested interval" >&2; return 1;
|
|
90
|
+
}
|
|
91
|
+
# FFmpeg recursively parses sums; balance them so long selections do not
|
|
92
|
+
# exhaust its expression depth while preserving the exact frame indices.
|
|
93
|
+
awk -F '\t' '
|
|
94
|
+
function selection(first, last, middle) {
|
|
95
|
+
if (first == last) return "eq(n\\," frames[first] ")"
|
|
96
|
+
middle = int((first + last) / 2)
|
|
97
|
+
return "(" selection(first, middle) "+" selection(middle + 1, last) ")"
|
|
98
|
+
}
|
|
99
|
+
NR > 1 { frames[++count] = $4 }
|
|
100
|
+
END { print selection(1, count) }
|
|
101
|
+
' \
|
|
102
|
+
"$work_dir/${label}-index.tsv" > "$work_dir/selection.txt"
|
|
103
|
+
filter="select='$(cat "$work_dir/selection.txt")',scale=384:-2:flags=lanczos"
|
|
104
|
+
if [[ "$has_drawtext" -eq 1 ]]; then
|
|
105
|
+
filter="${filter},drawtext=fontcolor=white:fontsize=20:box=1:boxcolor=black@0.72:x=8:y=h-th-8:text='pts=%{pts\\:flt}'"
|
|
106
|
+
fi
|
|
107
|
+
filter="${filter},tile=4x4:padding=8:margin=8:color=0x111827"
|
|
108
|
+
# No seek/fps filter: neither source frame indices nor timestamps are relabeled.
|
|
109
|
+
ffmpeg -hide_banner -loglevel error -copyts -i "$input" -map 0:v:0 \
|
|
110
|
+
-vf "$filter" -fps_mode passthrough -q:v 2 \
|
|
111
|
+
"$output_dir/${label}-%03d.jpg"
|
|
112
|
+
cp "$work_dir/${label}-index.tsv" "$output_dir/${label}-index.tsv"
|
|
113
|
+
}
|
|
114
|
+
make_grid overview "$overview_fps"
|
|
115
|
+
make_grid dense "$dense_fps"
|
|
116
|
+
echo "wrote probe.json, grids and actual source-frame/PTS indices to $output_dir"
|
|
@@ -5,13 +5,7 @@ description: Author a CueFrame 3D world-object shot as canonical SceneShotSpecV2
|
|
|
5
5
|
|
|
6
6
|
# CueFrame scene shots
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
User intent and acceptance criteria override this recipe's aesthetic defaults. Silent, typography-only, uncaptioned and slow work are valid; no universal narration, footage, CTA, beat count or score target. Contracts, factual fidelity, media bindings and current source revisions remain mandatory.
|
|
11
|
-
|
|
12
|
-
Read available tools and current project; preserve the chosen local/hosted lane. Supported local work needs no hosted registration. Do not silently install, authenticate, switch projects or upload local content. Before metered hosted work, check `get_account`, entitlements, balance and quotes. Desktop setup: https://docs.cueframe.ai.
|
|
13
|
-
|
|
14
|
-
For scoped revisions, preserve unrelated timing, media, audio and shared brand-kit state. Edit affected content; inspect relevant frames, continuous motion and affected audio. No restarted intake, new approval pause, paid judge or final export by default. Judge only when useful; scores never override acceptance failures. Stop/report after two no-improvement passes. See [preview workflow](../cueframe-compose-loop/references/preview-workflow.md).
|
|
8
|
+
Use the [project and capability policy](../composing-video/references/project-policy.md) for scope, current state and metered work.
|
|
15
9
|
|
|
16
10
|
Use `scene.add` and `scene.update` through `apply_composition`. Author the scene JSON; CueFrame owns the generated wrapper, preparation, resource admission, previews, and export.
|
|
17
11
|
|
|
@@ -37,7 +31,7 @@ not only keyframes. A scene tweak can finish with preview evidence; export for f
|
|
|
37
31
|
|
|
38
32
|
The composition owns clip start, duration, ordering, cuts, and transitions. The scene owns objects, camera, environment, backdrop, post effects, constraints, and normalized animation. Scene clips occupy a dedicated full-frame front overlay track. Outer region, position, scale, rotation, fit, clip effects, and internal fades are refused because they would create two transform or timing owners.
|
|
39
33
|
|
|
40
|
-
`referenceSize` must have the same aspect ratio as the composition.
|
|
34
|
+
`referenceSize` must have the same aspect ratio as the composition. World coordinates are reference pixels with origin at frame center, +X right, +Y up, and +Z toward the default viewer. World rotations use radians in Euler XYZ order; laptop `openAngle` uses radians in [0, PI]. Equal-aspect outputs scale uniformly.
|
|
41
35
|
|
|
42
36
|
Animation keyframe `at` is normalized over clip duration. Easing belongs to the keyframe it arrives at. The first keyframe has no easing; each later keyframe supplies `linear`, `hold`, or cubic `bezier` easing. Topology, bindings, text content, fonts, material roles, and object kind remain static within a shot.
|
|
43
37
|
|