kaizen-agent 1.49.0 → 1.49.1
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/cli/hermes.ts +5 -2
- package/cli/state.test.ts +13 -0
- package/cli/state.ts +12 -0
- package/cli/versions.test.ts +154 -0
- package/cli/versions.ts +272 -0
- package/cli/video.test.ts +64 -3
- package/cli/video.ts +111 -18
- package/cli/web.ts +15 -0
- package/package.json +1 -1
- package/skills/media/kaizen-video/SKILL.md +20 -2
- package/skills/media/kaizen-video/canvas.html +241 -0
- package/skills/media/kaizen-video/examples/canvas-film/cat.txt +31 -0
- package/skills/media/kaizen-video/examples/canvas-film/film.json +460 -0
- package/skills/media/kaizen-video/examples/canvas-film/lines.json +10 -0
- package/skills/media/kaizen-video/examples/canvas-film/skip.txt +18 -0
- package/skills/media/kaizen-video/examples/canvas-film/talk.txt +23 -0
- package/skills/media/kaizen-video/examples/canvas-film/wow.txt +24 -0
- package/skills/media/kaizen-video/examples/kaizen-promo/promo.json +17 -0
- package/skills/media/kaizen-video/examples/kaizen-promo/record.json +10 -0
- package/skills/media/kaizen-video/examples/notula-promo/promo.json +41 -0
- package/skills/media/kaizen-video/examples/notula-promo/record.json +135 -0
- package/skills/media/kaizen-video/examples/notula-promo/seed.php +20 -0
- package/skills/media/kaizen-video/examples/notula-promo/seed.py +38 -0
- package/skills/media/kaizen-video/presets/app-promo/CREDITS.txt +2 -0
- package/skills/media/kaizen-video/presets/app-promo/README.md +21 -0
- package/skills/media/kaizen-video/presets/app-promo/preset.json +7 -0
- package/skills/media/kaizen-video/presets/app-promo/template/compositions/end.html +25 -0
- package/skills/media/kaizen-video/presets/app-promo/template/compositions/hook.html +19 -0
- package/skills/media/kaizen-video/presets/app-promo/template/compositions/name.html +19 -0
- package/skills/media/kaizen-video/presets/app-promo/template/compositions/step.html +52 -0
- package/skills/media/kaizen-video/presets/app-promo/template/index.html +24 -0
- package/skills/media/kaizen-video/presets/film-cinematic-drama/.hidden +1 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/.hidden +1 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/CREDITS.txt +3 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/README.md +7 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/fonts/InstrumentSerif.ttf +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/fonts/SpaceMono.ttf +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/boing.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/ding.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/ending.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/pop.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/reveal.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/shutter.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/stamp.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/tick.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/sfx/whoosh.wav +0 -0
- package/skills/media/kaizen-video/presets/film-explainer-canvas/style.json +15 -0
- package/skills/media/kaizen-video/presets/film-fun-energetic/.hidden +1 -0
- package/skills/media/kaizen-video/presets/film-promo-booth/.hidden +1 -0
- package/skills/media/kaizen-video/presets/film-viral-social/.hidden +1 -0
- package/skills/media/kaizen-video/presets/tiktok-explainer/index.html +1 -1
- package/skills/media/kaizen-video/references/canvas.md +60 -0
- package/skills/media/kaizen-video/references/presets.md +31 -0
- package/skills/media/kaizen-video/references/promo.md +148 -0
- package/skills/media/kaizen-video/references/revisions.md +11 -2
- package/skills/media/kaizen-video/scripts/make_film.py +157 -4
- package/skills/media/kaizen-video/scripts/make_promo.py +297 -0
- package/skills/media/kaizen-video/scripts/make_tiktok.py +34 -6
- package/skills/media/kaizen-video/scripts/pixel.py +40 -0
- package/skills/media/kaizen-video/scripts/record.mjs +103 -0
- package/web/board.html +1 -1
- package/web/board.js +1 -1
- package/web/notebook.js +1 -1
- package/web/term.js +1 -1
- package/web/video.html +43 -9
- package/web/video.js +67 -56
- package/web/video.ts +266 -33
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"url": "http://127.0.0.1:8031/",
|
|
3
|
+
"note": "A local copy of Notula with its own empty database and two sample meetings spoken by synthetic voices.",
|
|
4
|
+
"clips": [
|
|
5
|
+
{
|
|
6
|
+
"name": "list",
|
|
7
|
+
"device": "phone",
|
|
8
|
+
"prep": [
|
|
9
|
+
[
|
|
10
|
+
"goto",
|
|
11
|
+
"/login"
|
|
12
|
+
],
|
|
13
|
+
[
|
|
14
|
+
"type",
|
|
15
|
+
"#login",
|
|
16
|
+
"demo"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"type",
|
|
20
|
+
"#password",
|
|
21
|
+
"demo-pass-1"
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"tap",
|
|
25
|
+
"button[type=submit]"
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
"wait",
|
|
29
|
+
1500
|
|
30
|
+
]
|
|
31
|
+
],
|
|
32
|
+
"path": "/recordings",
|
|
33
|
+
"steps": [
|
|
34
|
+
[
|
|
35
|
+
"wait",
|
|
36
|
+
1200
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
"tap",
|
|
40
|
+
"text:Summarized"
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
"wait",
|
|
44
|
+
900
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"tap",
|
|
48
|
+
"text:All"
|
|
49
|
+
],
|
|
50
|
+
[
|
|
51
|
+
"wait",
|
|
52
|
+
1200
|
|
53
|
+
]
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "list-web",
|
|
58
|
+
"device": "desktop",
|
|
59
|
+
"path": "/recordings",
|
|
60
|
+
"steps": [
|
|
61
|
+
[
|
|
62
|
+
"wait",
|
|
63
|
+
1200
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"tap",
|
|
67
|
+
"text:Summarized"
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
"wait",
|
|
71
|
+
900
|
|
72
|
+
],
|
|
73
|
+
[
|
|
74
|
+
"tap",
|
|
75
|
+
"text:All recordings"
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"wait",
|
|
79
|
+
900
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
"tap",
|
|
83
|
+
"a[href*='01m5v03ej5ehymva3g3gx6jx84']"
|
|
84
|
+
],
|
|
85
|
+
[
|
|
86
|
+
"wait",
|
|
87
|
+
1800
|
|
88
|
+
]
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "meeting",
|
|
93
|
+
"device": "phone",
|
|
94
|
+
"path": "/recordings",
|
|
95
|
+
"steps": [
|
|
96
|
+
[
|
|
97
|
+
"wait",
|
|
98
|
+
900
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
"tap",
|
|
102
|
+
"a[href*='01m5v03ej5ehymva3g3gx6jx84']"
|
|
103
|
+
],
|
|
104
|
+
[
|
|
105
|
+
"wait",
|
|
106
|
+
1500
|
|
107
|
+
],
|
|
108
|
+
[
|
|
109
|
+
"tap",
|
|
110
|
+
"text:Transcript"
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"wait",
|
|
114
|
+
800
|
|
115
|
+
],
|
|
116
|
+
[
|
|
117
|
+
"tap",
|
|
118
|
+
"button[aria-label=Play]"
|
|
119
|
+
],
|
|
120
|
+
[
|
|
121
|
+
"wait",
|
|
122
|
+
4200
|
|
123
|
+
],
|
|
124
|
+
[
|
|
125
|
+
"tap",
|
|
126
|
+
"text:Summary"
|
|
127
|
+
],
|
|
128
|
+
[
|
|
129
|
+
"wait",
|
|
130
|
+
3200
|
|
131
|
+
]
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
// Seeds the scratch Notula database (never the real one) with the two sample meetings.
|
|
3
|
+
use App\Models\Recording;
|
|
4
|
+
use Illuminate\Support\Facades\Storage;
|
|
5
|
+
$m = json_decode(file_get_contents(getenv('SEED') . '/meetings.json'), true);
|
|
6
|
+
$sum = [
|
|
7
|
+
'standup' => "## Decisions\n- Move the microphone permission screen after the welcome tour.\n- Add a sample recording so the list is never empty.\n\n## Action items\n- **Ava** — ship the onboarding change by Thursday.\n- **Ava** — book three customer calls to test Indonesian summaries; share notes Friday.\n\n## Notes\n- Sign-ups are fine; people drop off before their first recording.",
|
|
8
|
+
'interview' => "## Key points\n- Rina types notes during meetings and misses half of what is said.\n- She rewrites everything afterwards.\n\n## What she needs\n- Decisions and owners, not every word.",
|
|
9
|
+
];
|
|
10
|
+
$names = ['standup' => ['Speaker 1' => 'Andrew', 'Speaker 2' => 'Ava'], 'interview' => ['Speaker 1' => 'Rina', 'Speaker 2' => 'Ava']];
|
|
11
|
+
foreach (['interview', 'standup'] as $k) {
|
|
12
|
+
$r = new Recording();
|
|
13
|
+
$r->forceFill(['user_id' => 1, 'title' => $m[$k]['title'], 'language' => 'en', 'source' => 'recording', 'status' => 'transcribed',
|
|
14
|
+
'audio_path' => 'x', 'mime_type' => 'audio/mp4', 'size_bytes' => filesize(getenv('SEED') . "/$k.m4a"), 'duration_seconds' => $m[$k]['seconds'],
|
|
15
|
+
'segments' => $m[$k]['segments'], 'speakers' => $names[$k], 'summary_status' => 'done', 'summary_template' => 'meeting', 'summary' => $sum[$k]])->save();
|
|
16
|
+
$path = "recordings/{$r->id}/original.m4a";
|
|
17
|
+
Storage::disk('local')->put($path, file_get_contents(getenv('SEED') . "/$k.m4a"));
|
|
18
|
+
$r->forceFill(['audio_path' => $path])->save();
|
|
19
|
+
}
|
|
20
|
+
echo Recording::count(), "\n";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Two sample meetings spoken by two synthetic voices, for filming Notula. Writes audio + segments json.
|
|
2
|
+
import asyncio, json, subprocess, edge_tts
|
|
3
|
+
V = {"A": "en-US-AndrewNeural", "B": "en-US-AvaNeural"}
|
|
4
|
+
MEET = {
|
|
5
|
+
"standup": ("Product sync: onboarding", [
|
|
6
|
+
("A", "Quick check on onboarding. Sign-ups are fine, but people drop off before their first recording."),
|
|
7
|
+
("B", "Right. The microphone permission screen confuses them. I'd move it after the welcome tour."),
|
|
8
|
+
("A", "Agreed. Can you ship that this week?"),
|
|
9
|
+
("B", "Yes, by Thursday. I'll also add a sample recording so the list is never empty."),
|
|
10
|
+
("A", "Great. Last thing, summaries in Indonesian. Let's test those with three customers."),
|
|
11
|
+
("B", "I'll book the calls and share notes on Friday."),
|
|
12
|
+
]),
|
|
13
|
+
"interview": ("Customer interview: Rina", [
|
|
14
|
+
("B", "How do you take notes in meetings today?"),
|
|
15
|
+
("A", "I type while people talk, so I miss half of it. Then I rewrite everything after."),
|
|
16
|
+
("B", "What would help most?"),
|
|
17
|
+
("A", "Just the decisions and who does what. I don't need every word."),
|
|
18
|
+
]),
|
|
19
|
+
}
|
|
20
|
+
async def main():
|
|
21
|
+
out = {}
|
|
22
|
+
for key, (title, lines) in MEET.items():
|
|
23
|
+
parts, segs, t = [], [], 0.0
|
|
24
|
+
for i, (spk, text) in enumerate(lines):
|
|
25
|
+
f = f"{key}-{i}.mp3"
|
|
26
|
+
await edge_tts.Communicate(text, V[spk]).save(f)
|
|
27
|
+
d = float(subprocess.check_output(["ffprobe", "-v", "error", "-show_entries", "format=duration", "-of", "csv=p=0", f]))
|
|
28
|
+
segs.append({"speaker": f"Speaker {1 if spk == 'A' else 2}", "start": round(t, 2), "text": text})
|
|
29
|
+
parts.append(f); t += d + 0.35
|
|
30
|
+
with open(f"{key}.txt", "w") as o:
|
|
31
|
+
for p in parts: o.write(f"file '{p}'\nfile 'gap.mp3'\n")
|
|
32
|
+
out[key] = {"title": title, "segments": segs, "seconds": round(t)}
|
|
33
|
+
json.dump(out, open("meetings.json", "w"), indent=1)
|
|
34
|
+
subprocess.run(["ffmpeg", "-v", "error", "-y", "-f", "lavfi", "-i", "anullsrc=r=24000:cl=mono", "-t", "0.35", "-c:a", "libmp3lame", "gap.mp3"], check=True)
|
|
35
|
+
asyncio.run(main())
|
|
36
|
+
for k in ("standup", "interview"):
|
|
37
|
+
subprocess.run(["ffmpeg", "-v", "error", "-y", "-f", "concat", "-safe", "0", "-i", f"{k}.txt", "-ar", "44100", "-c:a", "aac", f"{k}.m4a"], check=True)
|
|
38
|
+
print(open("meetings.json").read()[:300])
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# app-promo
|
|
2
|
+
|
|
3
|
+
A product promo: the real product filmed in use, framed in its own devices, about 20-35 s at 9:16.
|
|
4
|
+
|
|
5
|
+
The video runs in this order:
|
|
6
|
+
1. **Hook:** 2-3 lines, lit word by word; the last word is in the brand accent.
|
|
7
|
+
2. **Name:** the product name and its tagline.
|
|
8
|
+
3. **Steps:** one recorded task each. One caption sits above the device, a tap mark shows on each tap, and
|
|
9
|
+
the camera punches in on the control and back out.
|
|
10
|
+
4. **End card:** the logo fills up, the name wipes in, then the tagline and the call to action hold.
|
|
11
|
+
|
|
12
|
+
The device frames are:
|
|
13
|
+
- a phone, for mobile apps and PWAs;
|
|
14
|
+
- a browser window showing the real URL, for web apps;
|
|
15
|
+
- a titled app window, for native apps (from the user's recording);
|
|
16
|
+
- laptop and phone together, for a product that runs on both.
|
|
17
|
+
|
|
18
|
+
Colours, font and logo come from the product's brand, and work on a light or a dark ground.
|
|
19
|
+
|
|
20
|
+
Built by `scripts/make_promo.py` from `videos/<name>/promo.json` and the recordings that `scripts/record.mjs`
|
|
21
|
+
makes. See `references/promo.md`. Approved by the user on 2026-10-26 (the kaizen launch video).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<style>
|
|
3
|
+
#root { position: absolute; inset: 0; background: var(--bg); font-family: var(--font), Inter, sans-serif; color: var(--ink); }
|
|
4
|
+
#end-mark { position: absolute; left: 50%; top: 470px; width: 340px; margin-left: -170px; }
|
|
5
|
+
#end-mark img { width: 100%; display: block; }
|
|
6
|
+
#end-word { position: absolute; left: 40px; right: 40px; top: 860px; text-align: center; font-weight: 900; font-size: {{END_SIZE}}px; letter-spacing: -0.04em; white-space: nowrap; }
|
|
7
|
+
#end-line { position: absolute; left: 80px; right: 80px; top: 1070px; text-align: center; font-weight: 700; font-size: 44px; color: var(--muted); }
|
|
8
|
+
#end-cta { position: absolute; left: 60px; right: 60px; top: 1180px; text-align: center; font-family: "JetBrains Mono", monospace; font-size: 50px; font-weight: 700; color: var(--accent); }
|
|
9
|
+
</style>
|
|
10
|
+
<div id="root" data-composition-id="end" data-width="1080" data-height="1920">
|
|
11
|
+
{{MARK}}
|
|
12
|
+
<div id="end-word">{{NAME}}</div>
|
|
13
|
+
<div id="end-line">{{TAGLINE}}</div>
|
|
14
|
+
<div id="end-cta">{{CTA}}</div>
|
|
15
|
+
</div>
|
|
16
|
+
<script>
|
|
17
|
+
const tl = gsap.timeline({ paused: true });
|
|
18
|
+
// The mark fills from the bottom up, the name wipes in after it, the call to action lands and holds.
|
|
19
|
+
if (document.querySelector("#end-mark")) tl.fromTo("#end-mark", { clipPath: "inset(100% 0 0 0)" }, { clipPath: "inset(0% 0 0 0)", duration: 0.7, ease: "power2.inOut" }, 0.05);
|
|
20
|
+
tl.fromTo("#end-word", { clipPath: "inset(0 100% 0 0)" }, { clipPath: "inset(0 0% 0 0)", duration: 0.45, ease: "power3.out" }, 0.6);
|
|
21
|
+
tl.fromTo("#end-line", { opacity: 0, filter: "blur(6px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.18, ease: "power2.out" }, 0.95);
|
|
22
|
+
tl.fromTo("#end-cta", { opacity: 0, filter: "blur(6px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.18, ease: "power2.out" }, 1.15);
|
|
23
|
+
window.__timelines["end"] = tl;
|
|
24
|
+
</script>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<style>
|
|
3
|
+
#root { position: absolute; inset: 0; background: var(--bg); font-family: var(--font), Inter, sans-serif; }
|
|
4
|
+
#hook-text { position: absolute; left: 90px; right: 90px; top: 560px; font-weight: 900; font-size: {{HOOK_SIZE}}px; line-height: 1.02; letter-spacing: -0.03em; }
|
|
5
|
+
#hook-text span { display: inline-block; color: var(--dim); }
|
|
6
|
+
</style>
|
|
7
|
+
<div id="root" data-composition-id="hook" data-width="1080" data-height="1920">
|
|
8
|
+
<div id="hook-text">{{HOOK_HTML}}</div>
|
|
9
|
+
</div>
|
|
10
|
+
<script>
|
|
11
|
+
const tl = gsap.timeline({ paused: true });
|
|
12
|
+
// Frame 0 is the thumbnail: the first words are already lit; the rest light up word by word, the last in the accent.
|
|
13
|
+
gsap.set("#hook-text span:nth-child(-n+2)", { color: "var(--ink)" });
|
|
14
|
+
tl.fromTo("#hook-text span:nth-child(n+3)", { color: "var(--dim)" }, { color: "var(--ink)", duration: 0.1, stagger: 0.14, ease: "none" }, 0.2);
|
|
15
|
+
tl.fromTo("#hook-last", { color: "var(--ink)" }, { color: "var(--accent)", duration: 0.12, ease: "none", immediateRender: false }, 0.9);
|
|
16
|
+
tl.to("#hook-text", { x: -700, filter: "blur(16px)", duration: 0.22, ease: "power3.in" }, 2.18);
|
|
17
|
+
window.__timelines["hook"] = tl;
|
|
18
|
+
</script>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<style>
|
|
3
|
+
#root { position: absolute; inset: 0; background: var(--bg); font-family: var(--font), Inter, sans-serif; }
|
|
4
|
+
#name-word { position: absolute; left: 40px; right: 40px; top: 600px; text-align: center; font-weight: 900; font-size: {{NAME_SIZE}}px; letter-spacing: -0.04em; color: var(--ink); white-space: nowrap; }
|
|
5
|
+
#name-line { position: absolute; left: 80px; right: 80px; top: 880px; text-align: center; font-weight: 700; font-size: 46px; color: var(--muted); }
|
|
6
|
+
</style>
|
|
7
|
+
<div id="root" data-composition-id="name" data-width="1080" data-height="1920">
|
|
8
|
+
<div id="name-word">{{NAME}}</div>
|
|
9
|
+
<div id="name-line">{{TAGLINE}}</div>
|
|
10
|
+
</div>
|
|
11
|
+
<script>
|
|
12
|
+
const tl = gsap.timeline({ paused: true });
|
|
13
|
+
tl.fromTo("#name-word", { opacity: 0, filter: "blur(8px)", scale: 1.06 }, { opacity: 1, filter: "blur(0px)", scale: 1, duration: 0.2, ease: "power4.out" }, 0.05);
|
|
14
|
+
tl.fromTo("#name-line", { opacity: 0, filter: "blur(6px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.18, ease: "power2.out" }, 0.45);
|
|
15
|
+
// The name leaves upward as the first device rises into the frame.
|
|
16
|
+
tl.to("#name-word, #name-line", { y: -260, opacity: 0, filter: "blur(10px)", duration: 0.25, ease: "power3.in" }, 1.55);
|
|
17
|
+
window.__timelines["name"] = tl;
|
|
18
|
+
</script>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<style>
|
|
3
|
+
#root { position: absolute; inset: 0; overflow: hidden; background: var(--bg); font-family: var(--font), Inter, sans-serif; }
|
|
4
|
+
.s-cap { position: absolute; left: 80px; right: 80px; top: 200px; text-align: center; color: var(--ink); font-weight: 900; font-size: 86px; line-height: 1.02; letter-spacing: -0.035em; }
|
|
5
|
+
.s-cap b { color: var(--accent); }
|
|
6
|
+
.s-cap span { display: inline-block; }
|
|
7
|
+
.s-cam { position: absolute; inset: 0; transform-origin: 50% 50%; }
|
|
8
|
+
/* Device frames. Content keeps the recording's own pixels; frames are drawn, not photographed. */
|
|
9
|
+
.s-phone { position: absolute; border-radius: 76px; background: var(--bezel); padding: 14px; box-shadow: 0 0 0 2px var(--bezel-edge), 0 60px 120px rgba(0,0,0,.45); }
|
|
10
|
+
.s-phone .scr { position: relative; border-radius: 62px; overflow: hidden; background: #fff; }
|
|
11
|
+
.s-win { position: absolute; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px var(--bezel-edge), 0 50px 110px rgba(0,0,0,.45); }
|
|
12
|
+
.s-win .bar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 22px; background: #eef0f4; border-bottom: 1px solid #d6dae2; font-family: Inter, sans-serif; }
|
|
13
|
+
.s-win .bar i { width: 16px; height: 16px; border-radius: 50%; background: #c9ced8; }
|
|
14
|
+
.s-win .bar .url { flex: 1; margin-left: 10px; height: 40px; border-radius: 10px; background: #fff; border: 1px solid #d6dae2; display: flex; align-items: center; padding: 0 16px; font-size: 24px; color: #4a5468; }
|
|
15
|
+
.s-win .bar .ttl { flex: 1; text-align: center; font-size: 24px; font-weight: 600; color: #4a5468; margin-right: 60px; }
|
|
16
|
+
.s-win .scr { position: relative; overflow: hidden; background: #fff; }
|
|
17
|
+
.s-phone video, .s-win video { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
|
|
18
|
+
.s-tap { position: absolute; width: 74px; height: 74px; margin: -37px 0 0 -37px; border-radius: 50%; background: rgba(255,255,255,.9);
|
|
19
|
+
box-shadow: 0 0 0 3px rgba(12,22,47,.35), 0 8px 20px rgba(12,22,47,.35); opacity: 0; }
|
|
20
|
+
.s-tap.sm { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
|
|
21
|
+
</style>
|
|
22
|
+
<div id="root" data-composition-id="{{ID}}" data-width="1080" data-height="1920">
|
|
23
|
+
<div class="s-cap" id="{{ID}}-cap">{{CAPTION}}</div>
|
|
24
|
+
<div class="s-cam" id="{{ID}}-cam" data-layout-allow-overflow>
|
|
25
|
+
{{FRAMES}}
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<script>
|
|
29
|
+
// Data written by make_promo.py: taps (element id, time), punch-ins (time, x, y in frame px, zoom, hold),
|
|
30
|
+
// whether the device rises in (first step on a device) and the scene length.
|
|
31
|
+
const D = /*DATA*/{};
|
|
32
|
+
const tl = gsap.timeline({ paused: true }), cam = `#${D.id}-cam`;
|
|
33
|
+
gsap.set(cam, { scale: 1, x: 0, y: 0 });
|
|
34
|
+
if (D.rise) tl.fromTo(`#${D.id}-dev`, { y: 900 }, { y: 0, duration: 0.7, ease: "expo.out" }, 0);
|
|
35
|
+
D.taps.forEach(([id, t]) => {
|
|
36
|
+
tl.fromTo(`#${id}`, { opacity: 0, scale: 1.25 }, { opacity: 1, scale: 1, duration: 0.15, ease: "power2.out" }, Math.max(0, t - 0.2))
|
|
37
|
+
.to(`#${id}`, { scale: 0.82, duration: 0.08, ease: "power2.in" }, Math.max(0, t - 0.05))
|
|
38
|
+
.to(`#${id}`, { opacity: 0, scale: 1, duration: 0.2, ease: "power2.out" }, t + 0.08);
|
|
39
|
+
});
|
|
40
|
+
// Camera: punch in on the control a tap is about to hit, hold while the UI acts, pull back out.
|
|
41
|
+
// Never lift the device into the caption: its top stays below 430 px however far the camera zooms.
|
|
42
|
+
D.punches.forEach(([t, x, y, z, hold]) => {
|
|
43
|
+
const floor = 430 - 960 - (D.top - 960) * z;
|
|
44
|
+
tl.to(cam, { scale: z, x: (540 - x) * z, y: Math.max(floor, (1180 - y) * z * 0.6), duration: 0.5, ease: "power2.inOut" }, t)
|
|
45
|
+
.to(cam, { scale: 1, x: 0, y: 0, duration: 0.5, ease: "power2.inOut" }, t + 0.5 + hold);
|
|
46
|
+
});
|
|
47
|
+
// One caption: words blur in and the line holds still; it blurs out as the scene ends.
|
|
48
|
+
tl.fromTo(`#${D.id}-cap span`, { opacity: 0, filter: "blur(6px)" }, { opacity: 1, filter: "blur(0px)", duration: 0.13, stagger: 0.067, ease: "power2.out" }, 0.15);
|
|
49
|
+
if (!D.last) tl.to(`#${D.id}-cap`, { opacity: 0, filter: "blur(8px)", duration: 0.15, ease: "power3.in" }, D.dur - 0.15);
|
|
50
|
+
window.__timelines[D.id] = tl;
|
|
51
|
+
</script>
|
|
52
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="{{LANG}}" data-resolution="portrait">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=1080, height=1920" />
|
|
6
|
+
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
7
|
+
<style>
|
|
8
|
+
{{CSS}}
|
|
9
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
10
|
+
html, body { width: 1080px; height: 1920px; overflow: hidden; background: var(--bg); }
|
|
11
|
+
#root { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--bg); }
|
|
12
|
+
#root > [data-composition-id] { position: absolute; inset: 0; }
|
|
13
|
+
</style>
|
|
14
|
+
</head>
|
|
15
|
+
<body>
|
|
16
|
+
<div id="root" data-composition-id="main" data-start="0" data-duration="{{DURATION}}" data-width="1080" data-height="1920">
|
|
17
|
+
{{SCENES}}
|
|
18
|
+
{{AUDIO}} </div>
|
|
19
|
+
<script>
|
|
20
|
+
const tl = gsap.timeline({ paused: true });
|
|
21
|
+
window.__timelines["main"] = tl;
|
|
22
|
+
</script>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Not approved for the New video wizard yet (2026-10-26); still builds for existing videos.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Not approved for the New video wizard yet (2026-10-26); still builds for existing videos.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
Sound effects: synthesized with ffmpeg for this preset, CC0 (shutter, whoosh, pop, tick, ding, stamp, reveal, boing, ending).
|
|
2
|
+
|
|
3
|
+
Fonts: "Montserrat" by Julieta Ulanovsky et al. (Google Fonts, SIL Open Font License 1.1); "Instrument Serif" by The Instrument Serif Project Authors (Google Fonts, SIL Open Font License 1.1); "Space Mono" by The Space Mono Project Authors (Google Fonts, SIL Open Font License 1.1).
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Explainer canvas (film preset, canvas engine)
|
|
2
|
+
|
|
3
|
+
A from-scratch explainer in the look of `tiktok-explainer`: near-black with drifting light streaks, cream and orange,
|
|
4
|
+
Montserrat 900 headlines, Instrument Serif setup lines, Space Mono timecodes, kinetic lowercase captions and an
|
|
5
|
+
optional pixel mascot in the corner. It is not a slideshow: a camera pans, zooms and follows over one canvas (see
|
|
6
|
+
`references/canvas.md`). Sounds: whoosh on moves, pop, tick on scrubs, shutter on morphs, reveal on fills, stamp.
|
|
7
|
+
9:16, −14 LUFS. Worked example: `examples/canvas-film/`.
|
package/skills/media/kaizen-video/presets/film-explainer-canvas/assets/fonts/InstrumentSerif.ttf
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"engine": "canvas",
|
|
3
|
+
"palette": { "bg": "#0c0b0a", "fg": "#efe6d6", "muted": "#8d867b", "accent": "#f7a93b", "accentBg": "#f7a93b", "red": "#ef4b3a" },
|
|
4
|
+
"fonts": { "display": "Montserrat", "body": "Instrument Serif", "mono": "Space Mono" },
|
|
5
|
+
"pace": { "lead": 0.05, "tail": 0.15 },
|
|
6
|
+
"text": "pop",
|
|
7
|
+
"transition": "punch",
|
|
8
|
+
"layout": "fullbleed",
|
|
9
|
+
"grade": { "grain": 0, "vignette": 0.5, "leak": false },
|
|
10
|
+
"captions": "kinetic",
|
|
11
|
+
"music": { "base": 0.24, "lift": 0.32, "track": "music.mp3" },
|
|
12
|
+
"sfx": { "cut": "", "text": "", "reveal": "", "question": "" },
|
|
13
|
+
"kenburns": 0,
|
|
14
|
+
"loudness": -14
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Not approved for the New video wizard yet (2026-10-26); still builds for existing videos.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Not approved for the New video wizard yet (2026-10-26); still builds for existing videos.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Not approved for the New video wizard yet (2026-10-26); still builds for existing videos.
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
const d = b.dur ?? DUR[b.kind];
|
|
170
170
|
if (b.kind === "title") {
|
|
171
171
|
// Keyword scene: card tucks aside; optional giant outlined numeral that fills up in orange.
|
|
172
|
-
const big = b.big ? `<div class="big"><span class="o">${esc(b.big)}</span><span class="f">${esc(b.big)}</span></div>` : "";
|
|
172
|
+
const big = b.big ? `<div class="big"><span class="o" data-layout-ignore>${esc(b.big)}</span><span class="f">${esc(b.big)}</span></div>` : "";
|
|
173
173
|
const n = el("div", "scene" + (b.big ? "" : " center") + (b.img ? " has-img" : ""), big +
|
|
174
174
|
`<div class="txt">${pic(b)}${b.kicker ? `<div class="k serif">${esc(b.kicker)}</div>` : ""}<h1>${punch(b.title)}</h1>` +
|
|
175
175
|
(b.sub ? `<div class="s serif">${esc(b.sub)}</div>` : "") + "</div>");
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Canvas films: a camera over one large canvas
|
|
2
|
+
|
|
3
|
+
A preset whose `style.json` has `"engine": "canvas"` (bundled: `film-explainer-canvas`) builds the film with
|
|
4
|
+
`canvas.html` instead of `film.html`. The whole video is one large canvas of elements. Each beat moves a camera over
|
|
5
|
+
it, and acts on the elements, timed to the narration. Everything else is a normal film: `lines.json`, `vo.py`,
|
|
6
|
+
`words.json`, kinetic captions, music, loudness, `make_film.py --render`. 9:16 only. Worked example:
|
|
7
|
+
[`examples/canvas-film/`](../examples/canvas-film/). It has the pixel-art sources: run `pixel.py` on each `.txt` first.
|
|
8
|
+
|
|
9
|
+
## film.json
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
"canvas": { "w": 3400, "h": 7600, "elements": [ { "id": "basa", "kind": "text", "x": 170, "y": 320, "size": 150, "text": "BASA-BASI*?*" } ] },
|
|
13
|
+
"mascot": "cat.png",
|
|
14
|
+
"beats": [ { "vo": "v01", "cam": { "to": "basa", "zoom": 1.0 }, "do": [ { "act": "pop", "el": "basa", "at": "word:basa" } ] } ]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Coordinates are canvas pixels (the screen is 1080×1920 at zoom 1). `x`/`y` is an element's top-left. Any element
|
|
18
|
+
takes `rot` (degrees) and `hidden: true` (invisible until a `pop` or `fade` shows it).
|
|
19
|
+
|
|
20
|
+
| kind | fields |
|
|
21
|
+
|---|---|
|
|
22
|
+
| `text` | `text` (`*word*` = accent, `\n` = new line), `size`, `font` `head`/`serif`/`mono`, `color` `fg`/`accent`/`muted`/`red`, `w` (wrap width), `align` |
|
|
23
|
+
| `img` | `img` (a file in the video folder), `w`, `h`, `frame` (cream-framed card), `pixel` (sharp pixel art), `fit`, `chip` (mono tag), `label` (serif line under it) |
|
|
24
|
+
| `card` | a framed card with big text: `text`, `w`, `h`, `size`, `fill` (`accent` for an orange card), `color` |
|
|
25
|
+
| `strip` | a filmstrip: `frames` (each `{img}` or `{text}`, plus `tc` timecode), `fw`, `fh`, `gap`, `pixel`, `playhead` (frame index; adds a red playhead). Its cells are targets named `<id>/<n>` |
|
|
26
|
+
| `numeral` | a giant outlined digit: `value`, `size`, `w`; `fill` fills it, `morph` swaps it to the next value |
|
|
27
|
+
| `tape` | an orange banner: `text`, `w`, `size`, `stamp` (red stamp text that slams on with `stamp`) |
|
|
28
|
+
|
|
29
|
+
## Camera (`cam`, at the beat's start)
|
|
30
|
+
|
|
31
|
+
`{"to": "<id>" | [x, y], "zoom": 1.2, "dur": 0.8, "ease": "power3.inOut", "offset": [dx, dy]}`. The target's centre
|
|
32
|
+
lands at 42% of the screen height, above the captions. Without `zoom`, the camera fits the element. `dur: 0` cuts.
|
|
33
|
+
A beat with no `cam` holds the frame.
|
|
34
|
+
|
|
35
|
+
## Actions (`do`)
|
|
36
|
+
|
|
37
|
+
Each action has `at`: seconds from the beat's start, or `"word:<w>"`, the moment the beat's first word starting with `<w>`
|
|
38
|
+
is spoken. Every action carries a sound (in brackets); `"sfx": ""` silences it, and `"vol"` sets its level.
|
|
39
|
+
|
|
40
|
+
- `move` (whoosh): `el` goes to `to` (an id or `[x, y]`, centre to centre) over `dur`. `arc` lifts it along a curve and `lift` scales it mid-flight. `follow: true` makes the camera ride along, with an optional `zoom`.
|
|
41
|
+
- `pop` (pop): scale in from nothing.
|
|
42
|
+
- `fade`: to `to` (default 1) over `dur`.
|
|
43
|
+
- `glow`: an orange ring and a slight scale-up.
|
|
44
|
+
- `scrub` (tick): a strip's playhead from frame `from` to `to` over `dur`, showing each frame's `tc`.
|
|
45
|
+
- `fill` (reveal): the numeral fills with orange.
|
|
46
|
+
- `morph` (shutter): the numeral swaps to `to` and fills again (`fill: false` keeps the outline).
|
|
47
|
+
- `stamp` (stamp): a tape slaps on, then its stamp slams. Give the tape `hidden: true`.
|
|
48
|
+
- `shake`: a short camera shake.
|
|
49
|
+
|
|
50
|
+
## Choreographing a video
|
|
51
|
+
|
|
52
|
+
- One idea per beat; the camera moves at the start of every beat, so a scene changes every 2–4 s. Add actions
|
|
53
|
+
inside long lines so something moves about every 1.5–2.5 s.
|
|
54
|
+
- Lay the canvas out as the story's map: sections top to bottom, about 1500 px apart, so a wide shot of one section
|
|
55
|
+
does not show the next. Keep each section within roughly 1080/zoom by 1100/zoom canvas pixels around its centre.
|
|
56
|
+
- Reuse elements across beats (pan along the same strip, carry a card from one section into the next). Continuity is
|
|
57
|
+
what makes it feel like one camera, not a slideshow.
|
|
58
|
+
- Put actions on the spoken word they illustrate (`word:`), not on round seconds.
|
|
59
|
+
- Check framing with `npx --yes hyperframes@0.8.176 snapshot --at <s>,<s>` in `videos/<name>/film` before rendering.
|
|
60
|
+
- Pictures: the user's assets, else pixel art (`pixel.py`), else Wikimedia. Credit them in `CREDITS.txt`.
|
|
@@ -28,6 +28,7 @@ a track without touching the others.
|
|
|
28
28
|
|
|
29
29
|
## Template contract
|
|
30
30
|
|
|
31
|
+
|
|
31
32
|
`make_tiktok.py` fills these in `index.html`; keep them:
|
|
32
33
|
|
|
33
34
|
- `{{DURATION}}`, `{{VIDEO_DURATION}}`, `{{VIDEO}}`, `{{MUSIC_VOLUME}}`
|
|
@@ -61,10 +62,40 @@ kaizen package.
|
|
|
61
62
|
| cinematic-drama | pitch opener, brand film | dark, full-bleed photos, slow push-in, rise text, grain + vignette, fades | quiet music, hit on reveal, riser into the question, room tone | subtitle bar | −16 |
|
|
62
63
|
| promo-booth | exhibition loop, deck-faithful promo (the friend's style) | photo in a framed window beside the text, wipes, slide-in text, staged builds | whoosh on cuts, tick on titles, slightly louder music | subtitle bar | −16 |
|
|
63
64
|
| fun-energetic | social posts, parents, events | cream background, rounded photo cards that bounce in, pop text, light leaks | bright track (Carefree), pops and a chime | subtitle bar | −14 |
|
|
65
|
+
| explainer-canvas | TikTok explainers that move like a motion-graphics edit (9:16) | one canvas, camera pans, zooms and follows; filmstrip, numerals, tape and stamp (`references/canvas.md`) | whoosh, pop, tick, stamp | kinetic, lowercase | −14 |
|
|
64
66
|
| viral-social | TikTok / Reels / Shorts (9:16) | full-bleed, fast punch-in cuts, bold Inter, strong Ken Burns | Easy Lemon-type track, whooshes | kinetic 2–3 words, accent on the spoken word | −14 |
|
|
65
67
|
|
|
66
68
|
Pace: `lead` / `tail` = silence before and after each line. Drama 0.8/1.1, booth 0.45/0.7, fun 0.2/0.35, viral 0.05/0.2.
|
|
67
69
|
|
|
70
|
+
## Template presets
|
|
71
|
+
|
|
72
|
+
`app-promo` is a template preset (`preset.json`, kind `template`): a whole HyperFrames film filled from a product brief, built by `make_promo.py`. See [`promo.md`](promo.md). The New video wizard offers it for a brief start, and the five footage presets (tiktok-explainer, tiktok-mystery, tiktok-cheerful, tiktok-scam-alert, educational-warning) for a footage start only: a footage preset edits the user's own recording, so a brief with one is refused. The film-* presets carry a `.hidden` file until the user approves a video made with them; they still build for existing videos.
|
|
73
|
+
|
|
74
|
+
## Crossing over
|
|
75
|
+
|
|
76
|
+
A film preset works for a footage start too: the build script notices it and bridges. A footage preset is offered only for footage on the Video page (2026-10-26); the brief-to-footage bridge below still works when make_film.py is run by hand.
|
|
77
|
+
|
|
78
|
+
- **Footage with a film preset.** `make_tiktok.py` writes `videos/<name>/film-bridge/`: the cut (`video` in the
|
|
79
|
+
config) re-encoded silent as `footage.mp4`, its sound as `v01.mp3`, the caption words as `words.json`, and a
|
|
80
|
+
`film.json` with one `footage` beat and `"style": {"pace": {"lead": 0, "tail": 0}}` so the voice stays on the lips.
|
|
81
|
+
It then runs `make_film.py` on that folder (passing `--render`), which writes `output/<name>/<preset>/` with the
|
|
82
|
+
.srt and thumbnail. Kept: the film style's grade, captions, music levels and loudness, and the config's `music`.
|
|
83
|
+
Dropped: the hook, the cold open and every card in `beats`.
|
|
84
|
+
- **A brief with a footage preset.** `make_film.py` builds the film in `film-viral-social` with no captions, no
|
|
85
|
+
music and no cut sounds, renders it to `videos/<name>/film/pass1.mp4` on every build, then writes
|
|
86
|
+
`videos/<name>/footage-bridge/config.json` (the film's words on that timeline, a jump cut at every scene,
|
|
87
|
+
`hook` from film.json or the first six words, `music` from film.json or `sunny`) and runs `make_tiktok.py` on
|
|
88
|
+
it. Pass 1 carries pictures only and the clip card is hidden (`"card": false`), so the template draws the words
|
|
89
|
+
as its own scenes. Each film scene opens on a headline scene after the 3 s hook (`title` with kick, title, sub
|
|
90
|
+
and picture; `stat` with its first value as the giant numeral; `question` with a giant `?`), then `photo` scenes
|
|
91
|
+
cycle the beat's `img` and `"pics"` at its phrase breaks, about every 2 s, with the captions on. `items` become
|
|
92
|
+
`item` rows and `cta` the `end` card. Under the hook, the first picture shows. A headline over 14 characters
|
|
93
|
+
moves to the serif line with a warning. film.json `"footage_beats"` (template beats, placed with
|
|
94
|
+
`"t"` seconds or `"word"`) replaces the mapping; `"mascot"` (a transparent PNG in the video folder) adds the
|
|
95
|
+
corner mascot. 9:16 only; no .srt. A build takes a render longer.
|
|
96
|
+
|
|
97
|
+
`film.json` `"style"` overrides keys of the preset's `style.json` for one film; a dict merges into the preset's.
|
|
98
|
+
|
|
68
99
|
## Writing for each preset
|
|
69
100
|
- **drama**: full story arc, 70–110 s, long pauses allowed.
|
|
70
101
|
- **booth**: the deck's beats in order, 80–100 s, must make sense when joined mid-loop; real contacts on the CTA.
|