VanyaJ commited on
Commit
b480c20
ยท
verified ยท
1 Parent(s): d6f4c1f

v3.2: Fix offline timeline freeze & Windows OneCore ko-KR TTS, add standalone index.html player + documentary dossier/B-roll presets

Browse files
README.md CHANGED
@@ -18,13 +18,27 @@ tags:
18
  - offline-ready
19
  ---
20
 
21
- # ๐ŸŽฌ Deck2Video v3.1 Agent Skill (`PPTX ยท DOCX ยท MD ยท HTML ยท ์‚ฌ๋‚ด DRM ๋ธŒ๋ฆฟ์ง€ โž” 16์ข… ๋ชจ์…˜ ๋ ˆ์ด์•„์›ƒ + 10์ข… ๋ฐฐ๊ฒฝ + 6์ข… ์ž๋ง‰ + 10์ข… ํšจ๊ณผ์Œ โž” 1080p MP4`)
22
 
23
- ํŒŒ์›Œํฌ์ธํŠธ(`.pptx` โ€” **์‚ฌ๋‚ด DRM ์—ฐ๋™ ๋ธŒ๋ฆฟ์ง€**, ๊ทธ๋ฃน ๋„ํ˜• ์žฌ๊ท€ ์ถ”์ถœ, ํšŒ์‚ฌ ๋กœ๊ณ  ์ž๋™ ์ œ์™ธ ๋ฐ ๋„ํ‘œ ์ด๋ฏธ์ง€ ์ถ”์ถœ ํฌํ•จ), ์›Œ๋“œ(`.docx`), ๋งˆํฌ๋‹ค์šด(`.md`), HTML ๋ฌธ์„œ๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ **์œ ํŠœ๋ธŒ ์ธ๊ธฐ ํ…Œํฌ ์ฑ„๋„(*์ซ‘๋Œ€ํ‘œ์˜ ๋”ธ๊น์ผ๊ธฐ*, *ITํ†กํ†ก* ๋“ฑ) ๋ฐ Linear / Apple ํ‚ค๋…ธํŠธ ์Šคํƒ€์ผ**์˜ `1920ร—1080` ์ฝ”๋“œ ๋ Œ๋”๋ง ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ์˜์ƒ์„ ์ž๋™ ์ƒ์„ฑํ•˜๋Š” **์˜จยท์˜คํ”„๋ผ์ธ ๊ฒธ์šฉ AI ์—์ด์ „ํŠธ ์Šคํ‚ฌ(v3.1)**์ž…๋‹ˆ๋‹ค.
24
 
25
  ---
26
 
27
- ## ๐Ÿ›ก๏ธ v3.1 ์‹ ๊ทœ ์—…๋ฐ์ดํŠธ: ์‚ฌ๋‚ด ๋ฌธ์„œ ๋ณด์•ˆ(DRM) ํ™˜๊ฒฝ ์™„๋ฒฝ ์—ฐ๋™!
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  ์‚ฌ๋‚ด PC(Fasoo, MarkAny, Softcamp, MS Purview ๋“ฑ)์—์„œ `.pptx`/`.docx`๊ฐ€ DRM์œผ๋กœ ์•”ํ˜ธํ™”๋˜์–ด ์žˆ์–ด ํŒŒ์ด์ฌ(`python-pptx`)์ด ์ง์ ‘ ์—ด์ง€ ๋ชปํ•  ๋•Œ, AI ์—์ด์ „ํŠธ๊ฐ€ ์ž„์˜๋กœ ์ •์  ์Šฌ๋ผ์ด๋“œ ์บก์ฒ˜ ์Šฌ๋ผ์ด๋“œ์‡ผ๋กœ ์šฐํšŒํ•˜์ง€ ์•Š๋„๋ก **2๋‹จ๊ณ„ ์—์ด์ „ํŠธ DRM ๋ธŒ๋ฆฟ์ง€(`--stdin-json` / `--stdin-md` / Exit Code `42` ๊ฐ€๋“œ๋ ˆ์ผ)**๊ฐ€ ๋‚ด์žฅ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
30
 
 
18
  - offline-ready
19
  ---
20
 
21
+ # ๐ŸŽฌ Deck2Video v3.2 Agent Skill (`PPTX ยท DOCX ยท MD ยท HTML ยท ์‚ฌ๋‚ด DRM ๋ธŒ๋ฆฟ์ง€ โž” 18์ข… ๋ชจ์…˜/๋‹คํ ๋ ˆ์ด์•„์›ƒ + ์›น ํ”Œ๋ ˆ์ด์–ด ๋‚ด์žฅ + 1080p MP4`)
22
 
23
+ ํŒŒ์›Œํฌ์ธํŠธ(`.pptx` โ€” **์‚ฌ๋‚ด DRM ์—ฐ๋™ ๋ธŒ๋ฆฟ์ง€**, ๊ทธ๋ฃน ๋„ํ˜• ์žฌ๊ท€ ์ถ”์ถœ, ํšŒ์‚ฌ ๋กœ๊ณ  ์ž๋™ ์ œ์™ธ ๋ฐ ๋„ํ‘œ ์ด๋ฏธ์ง€ ์ถ”์ถœ ํฌํ•จ), ์›Œ๋“œ(`.docx`), ๋งˆํฌ๋‹ค์šด(`.md`), HTML ๋ฌธ์„œ๋ฅผ ์ž…๋ ฅ๋ฐ›์•„ **์œ ํŠœ๋ธŒ ์ธ๊ธฐ ํ…Œํฌยท๋‹คํ ์ฑ„๋„(*์ซ‘๋Œ€ํ‘œ์˜ ๋”ธ๊น์ผ๊ธฐ*, *ITํ†กํ†ก*, *์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ* ๋“ฑ) ๋ฐ Linear / Apple ํ‚ค๋…ธํŠธ ์Šคํƒ€์ผ**์˜ `1920ร—1080` ์ฝ”๋“œ ๋ Œ๋”๋ง ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ์˜์ƒ์„ ์ž๋™ ์ƒ์„ฑํ•˜๋Š” **์˜จยท์˜คํ”„๋ผ์ธ ๊ฒธ์šฉ AI ์—์ด์ „ํŠธ ์Šคํ‚ฌ(v3.2)**์ž…๋‹ˆ๋‹ค.
24
 
25
  ---
26
 
27
+ ## ๐Ÿš€ v3.2 ํ•ต์‹ฌ ์—…๋ฐ์ดํŠธ (์‚ฌ๋‚ด ์˜คํ”„๋ผ์ธ & ์›น ํ”Œ๋ ˆ์ด์–ด ํŒจ์น˜ + ๋‹คํ๋ฉ˜ํ„ฐ๋ฆฌ ์Šคํƒ€์ผ ์ถ”๊ฐ€!)
28
+
29
+ 1. **์‚ฌ๋‚ด ์˜คํ”„๋ผ์ธ ๋ Œ๋”๋Ÿฌ(`--offline`) & ๋‹จ๋… `index.html` ์ฒซ ํ™”๋ฉด ๋ฉˆ์ถค ๋ฒ„๊ทธ ์™„๋ฒฝ ํ•ด๊ฒฐ**
30
+ * `window.__timelines` ์ดˆ๊ธฐํ™” ๋ณด์žฅ ๋ฐ ๋กœ์ปฌ ์‚ฌ๋‚ด ํ”„๋ก์‹œ ์šฐํšŒ(`--no-proxy-server`) ์ ์šฉ์œผ๋กœ ์‚ฌ๋‚ด ํ์‡„๋ง Chrome/Edge ๋ Œ๋”๋ง ์‹œ ๋ชจ๋“  ์Šฌ๋ผ์ด๋“œ์™€ ์• ๋‹ˆ๋ฉ”์ด์…˜์ด 100% ์ •์ƒ ๊ตฌ๋™๋ฉ๋‹ˆ๋‹ค.
31
+ * **๋‹จ๋… ์›น ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ํ”Œ๋ ˆ์ด์–ด(`standalone_player.js`) ๋‚ด์žฅ**: ์ƒ์„ฑ๋œ `index.html`์„ ํฌ๋กฌ/์—ฃ์ง€์—์„œ ๋”๋ธ”ํด๋ฆญํ•ด ์—ด๋ฉด ํ™”๋ฉด ํฌ๊ธฐ์— ๋งž์ถฐ ์ž๋™ ์Šค์ผ€์ผ๋ง๋˜๋ฉฐ ํ•˜๋‹จ **`โ–ถ ์žฌ์ƒ (Space) / โ—€ ์ด์ „ / ๋‹ค์Œ โ–ถ / ์Šฌ๋ผ์ด๋“œ ์ด๋™ ๋ฐ”`**๊ฐ€ ํ™œ์„ฑํ™”๋˜์–ด ์Œ์„ฑยทํšจ๊ณผ์Œยท๋ฐฐ๊ฒฝ์Œ๊ณผ ํ•จ๊ป˜ ์‹ค์‹œ๊ฐ„ ์›น ์Šฌ๋ผ์ด๋“œ๋กœ ๋ฐ”๋กœ ๋ฐœํ‘œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!
32
+ 2. **Windows 10/11 ์‚ฌ๋‚ด PC ์˜คํ”„๋ผ์ธ ํ•œ๊ตญ์–ด TTS ๋ฌด์Œ ํ˜„์ƒ ํ•ด๊ฒฐ (`tts_timeline.py`)**
33
+ * ๊ตฌํ˜• SAPI5์— ํ•œ๊ตญ์–ด ์Œ์„ฑ์ด ์—†์„ ๋•Œ ์˜์–ด ๋ณด์ด์Šค(`Zira`)๊ฐ€ ์„ ํƒ๋˜์–ด ํ•œ๊ธ€์„ ๋ฌด์Œ ์ฒ˜๋ฆฌํ•˜๋˜ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์—ฌ, **Windows 10/11 ๊ธฐ๋ณธ ๋‚ด์žฅ `Speech_OneCore` ํ•œ๊ตญ์–ด ์Œ์„ฑ(`Heami` ๋“ฑ)**์„ ์ž๋™ ํƒ์ƒ‰ํ•ด ๋˜๋ ทํ•œ ํ•œ๊ตญ์–ด ๋‚ด๋ ˆ์ด์…˜์„ ํ•ฉ์„ฑํ•ฉ๋‹ˆ๋‹ค.
34
+ 3. **์‹ ๊ทœ ๋‹คํ๋ฉ˜ํ„ฐ๋ฆฌยท์ €๋„๋ฆฌ์ฆ˜ ํ”„๋ฆฌ์…‹ ์ถ”๊ฐ€ (*์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ* ์Šคํƒ€์ผ ์ง€์›!)**
35
+ * **`dossier_stamp_card`**: ํฌ๋ž˜ํ”„ํŠธ ์„œ๋ฅ˜์ฒ (๊ณต์‹ ํ•ด๋ช…์„œ) / ํ™”์ดํŠธ ํŠนํ—ˆ์ฆ(USPTO) ๋ฌธ์„œ ์นด๋“œ + ๊ณ ๋ฌด๋„์žฅ ์Šคํƒฌํ”„(`[STAMP: ๊ฐœ๋ฐœ ๊ณ„ํš ์—†์Œ]`) ํƒ€๊ฒฉ ์• ๋‹ˆ๋ฉ”์ด์…˜
36
+ * **`cinema_broll_fullscreen`**: ํ’€์Šคํฌ๋ฆฐ ์‹ค์‚ฌ/AI ์‹œ๋„ค๋งˆํ‹ฑ ์˜์ƒยท์ด๋ฏธ์ง€ B-Roll (`[BROLL: clip.mp4]`) + ๋‹คํ ๋น„๋„คํŒ… & ์ผ„๋ฒˆ์ฆˆ ์คŒ ๊ต์ฐจํŽธ์ง‘ ๋ ˆ์ด์•„์›ƒ
37
+ * **`docu_watermark` HUD**: ์ƒ๋‹จ ์Šฌ๋ฆผ ์‹œ์•ˆ-๊ทธ๋ฆฐ ์ง„ํ–‰ ๋ฐ” + ์šฐ์ธก ์ƒ๋‹จ 2์ค„ ์ฑ„๋„ ์›Œํ„ฐ๋งˆํฌ (`--hud-style docu_watermark --brand "์„ค๋ช… ์ข‹์•„ํ•˜๋Š” | ์•„์ €์”จ"`)
38
+
39
+ ---
40
+
41
+ ## ๐Ÿ›ก๏ธ v3.1~v3.2 ์‚ฌ๋‚ด ๋ฌธ์„œ ๋ณด์•ˆ(DRM) ํ™˜๊ฒฝ ์™„๋ฒฝ ์—ฐ๋™!
42
 
43
  ์‚ฌ๋‚ด PC(Fasoo, MarkAny, Softcamp, MS Purview ๋“ฑ)์—์„œ `.pptx`/`.docx`๊ฐ€ DRM์œผ๋กœ ์•”ํ˜ธํ™”๋˜์–ด ์žˆ์–ด ํŒŒ์ด์ฌ(`python-pptx`)์ด ์ง์ ‘ ์—ด์ง€ ๋ชปํ•  ๋•Œ, AI ์—์ด์ „ํŠธ๊ฐ€ ์ž„์˜๋กœ ์ •์  ์Šฌ๋ผ์ด๋“œ ์บก์ฒ˜ ์Šฌ๋ผ์ด๋“œ์‡ผ๋กœ ์šฐํšŒํ•˜์ง€ ์•Š๋„๋ก **2๋‹จ๊ณ„ ์—์ด์ „ํŠธ DRM ๋ธŒ๋ฆฟ์ง€(`--stdin-json` / `--stdin-md` / Exit Code `42` ๊ฐ€๋“œ๋ ˆ์ผ)**๊ฐ€ ๋‚ด์žฅ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
44
 
SKILL.md CHANGED
@@ -5,11 +5,11 @@ description: >
5
  Word (.docx), Markdown (.md/.txt), HTML (.html), or Agent-extracted JSON (--stdin-json) into sleek
6
  code-rendered 1920x1080 MP4 presentation & tech-briefing videos. Includes 10 procedural background
7
  presets (incl. 3D Wireframe Globe & Briefing Grid), 3 HUD modes (Chapter Tabs & ITํ†กํ†ก Tech Briefing),
8
- 6 caption styles (incl. Pill Karaoke & Briefing Bar), 16 scene archetypes, and 10 procedural SFX.
9
- Works both Online and 100% Air-Gapped Offline (--offline) and seamlessly bridges enterprise DRM documents.
10
  ---
11
 
12
- # Deck-to-Video v3.1 Motion Presentation & Enterprise DRM Bridge Skill (`deck-video-pipeline`)
13
 
14
  Use this skill whenever the user asks to:
15
  - Convert **PowerPoint (`.pptx`)**, **Word (`.docx`)**, **Markdown/text (`.md`/`.txt`)**, **HTML (`.html`)**, or **corporate DRM-encrypted Office documents** into a sleek presentation video, deep-dive tech briefing (like *ITํ†กํ†ก* or *์ซ‘๋Œ€ํ‘œ์˜ ๋”ธ๊น์ผ๊ธฐ*), lecture video, or SaaS explainer.
@@ -136,20 +136,33 @@ python3 "<SKILL_DIR>/produce_deck_video.py" \
136
  --bg cycle \
137
  --output "./output/offline_video.mp4"
138
  ```
139
- *(์‚ฌ๋‚ด PPT ์–‘์‹์— ์žฅ์‹์šฉ ๊ทธ๋ฆผ์ด ๋งŽ์•„ ํ…์ŠคํŠธ/์นด๋“œ ์œ„์ฃผ๋กœ๋งŒ ๊ตฌ์„ฑํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด `--ignore-ppt-images` ์˜ต์…˜์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”. ๊ตฌ์„์— ๋ฐ•ํžŒ ์ž‘์€ ํšŒ์‚ฌ ๋กœ๊ณ  ์•„์ด์ฝ˜์€ ๊ธฐ๋ณธ์œผ๋กœ ์ž๋™ ์ œ์™ธ๋ฉ๋‹ˆ๋‹ค.)*
 
 
 
 
 
 
 
 
 
 
 
140
 
141
  ---
142
 
143
- ## 3. Complete v3.1 Presets & Slide Tags
144
 
145
  - **10 Background Presets (`--bg` or `[BG: ...]`)**: `auto`, `cycle`, `horizon_wave`, `wireframe_globe`, `isometric_hud_grid`, `neural_constellation`, `aurora_mesh`, `blueprint_grid`, `vercel_spotlight`, `warm_editorial`, `clean_paper_light`, `cyber_matrix`
146
- - **3 Top HUD Modes (`--hud-style`)**: `chapter_tabs`, `tech_briefing` (with `--brand "..."`), `minimal`
147
  - **6 Caption Styles (`--caption-style`)**: `glass_dual`, `briefing_clean`, `pill_karaoke`, `cinema_minimal`, `neon_bar_left`, `kinetic_pop`
148
- - **16 Scene Archetypes (`[ARCHETYPE: ...]` or JSON `"archetype"`)**:
149
  1. `hero_3d_briefing` โ€” 3D rotating wireframe sphere + giant glowing title + rainbow topic pills
150
  2. `media_showcase_split` โ€” Giant keyword + Korean/ASCII text scramble + right neon `.mp4`/`.png` frame (`[MEDIA: path]`, `[MEDIA_CAPTION: ...]`, `[HERO_WORD: ...]`, `[SCRAMBLE: ...]`)
151
- 3. `changelog_vertical` โ€” Color-coded dates (`11.03 | v2.29 | ๋‚ด์šฉ`) + glowing spine + `[SOURCE: ...]`
152
- 4. `mission_staircase` โ€” 5-color `MISSION 1..5` rows + 3D ascending translucent stepper blocks
153
- 5. `swarm_network` โ€” Central golden `COORDINATOR` hub + 5 `@worker`/`@verifier` spoke nodes
154
- 6. `pricing_matrix` โ€” Multi-tier comparison table (`[PLANS: ๋ฌด๋ฃŒ โ‚ฉ0 | Pro | Ultra]`, rows `๊ธฐ๋Šฅ | โœ“ | โ–ณ | โœ•`)
155
- 7. `arc_cards`, 8. `bento_grid`, 9. `mockup_steps`, 10. `book_quote`, 11. `notebook_flip`, 12. `vs_comparison`, 13. `data_bars`, 14. `process_timeline`, 15. `terminal_flow`, 16. `metric_summary`
 
 
 
5
  Word (.docx), Markdown (.md/.txt), HTML (.html), or Agent-extracted JSON (--stdin-json) into sleek
6
  code-rendered 1920x1080 MP4 presentation & tech-briefing videos. Includes 10 procedural background
7
  presets (incl. 3D Wireframe Globe & Briefing Grid), 3 HUD modes (Chapter Tabs & ITํ†กํ†ก Tech Briefing),
8
+ 6 caption styles (incl. Pill Karaoke & Briefing Bar), 18 scene archetypes (incl. Documentary Dossier Stamp & Fullscreen B-Roll), and 10 procedural SFX.
9
+ Works both Online and 100% Air-Gapped Offline (--offline) with built-in interactive browser player and Enterprise DRM Bridge.
10
  ---
11
 
12
+ # Deck-to-Video v3.2 Motion Presentation, Documentary & Enterprise DRM Bridge Skill (`deck-video-pipeline`)
13
 
14
  Use this skill whenever the user asks to:
15
  - Convert **PowerPoint (`.pptx`)**, **Word (`.docx`)**, **Markdown/text (`.md`/`.txt`)**, **HTML (`.html`)**, or **corporate DRM-encrypted Office documents** into a sleek presentation video, deep-dive tech briefing (like *ITํ†กํ†ก* or *์ซ‘๋Œ€ํ‘œ์˜ ๋”ธ๊น์ผ๊ธฐ*), lecture video, or SaaS explainer.
 
136
  --bg cycle \
137
  --output "./output/offline_video.mp4"
138
  ```
139
+ *(์ƒ์„ฑ๋œ `projects/<์ด๋ฆ„>/index.html`์„ ์ผ๋ฐ˜ ํฌ๋กฌ/์—ฃ์ง€ ๋ธŒ๋ผ์šฐ์ €๋กœ ์ง์ ‘ ์—ด๋ฉด ํ•˜๋‹จ์— ์ธํ„ฐ๋ž™ํ‹ฐ๋ธŒ ์›น ํ”„๋ ˆ์  ํ…Œ์ด์…˜ ์žฌ์ƒ ์ปจํŠธ๋กค ๋ฐ” `โ–ถ ์žฌ์ƒ / โ—€ ์ด์ „ / ๋‹ค์Œ โ–ถ`๊ฐ€ ์ž๋™์œผ๋กœ ํ™œ์„ฑํ™”๋ฉ๋‹ˆ๋‹ค!)*
140
+
141
+ ### E. ์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ Documentary / Editorial Style (`--hud-style docu_watermark`)
142
+ ```bash
143
+ python3 "<SKILL_DIR>/produce_deck_video.py" \
144
+ --input "<SKILL_DIR>/samples/sample_docu_patent.md" \
145
+ --bg warm_editorial \
146
+ --hud-style docu_watermark \
147
+ --brand "์„ค๋ช… ์ข‹์•„ํ•˜๋Š” | ์•„์ €์”จ" \
148
+ --caption-style cinema_minimal \
149
+ --output "./output/documentary_video.mp4"
150
+ ```
151
 
152
  ---
153
 
154
+ ## 3. Complete v3.2 Presets & Slide Tags
155
 
156
  - **10 Background Presets (`--bg` or `[BG: ...]`)**: `auto`, `cycle`, `horizon_wave`, `wireframe_globe`, `isometric_hud_grid`, `neural_constellation`, `aurora_mesh`, `blueprint_grid`, `vercel_spotlight`, `warm_editorial`, `clean_paper_light`, `cyber_matrix`
157
+ - **4 Top HUD Modes (`--hud-style`)**: `chapter_tabs`, `tech_briefing` (with `--brand "..."`), `docu_watermark` (with `--brand "์ƒ๋‹จ | ํ•˜๋‹จ"`), `minimal`
158
  - **6 Caption Styles (`--caption-style`)**: `glass_dual`, `briefing_clean`, `pill_karaoke`, `cinema_minimal`, `neon_bar_left`, `kinetic_pop`
159
+ - **18 Scene Archetypes (`[ARCHETYPE: ...]` or JSON `"archetype"`)**:
160
  1. `hero_3d_briefing` โ€” 3D rotating wireframe sphere + giant glowing title + rainbow topic pills
161
  2. `media_showcase_split` โ€” Giant keyword + Korean/ASCII text scramble + right neon `.mp4`/`.png` frame (`[MEDIA: path]`, `[MEDIA_CAPTION: ...]`, `[HERO_WORD: ...]`, `[SCRAMBLE: ...]`)
162
+ 3. `cinema_broll_fullscreen` โ€” Fullscreen B-Roll `.mp4`/`.jpg` (`[BROLL: path]`) + Ken Burns zoom + dark cinema vignette
163
+ 4. `dossier_stamp_card` โ€” Official Kraft manilla folder / White USPTO patent card + rubber stamp slam (`[STAMP: ๊ฐœ๋ฐœ ๊ณ„ํš ์—†์Œ]`, `[SOURCE: ...]`)
164
+ 5. `changelog_vertical` โ€” Color-coded dates (`11.03 | v2.29 | ๋‚ด์šฉ`) + glowing spine + `[SOURCE: ...]`
165
+ 6. `mission_staircase` โ€” 5-color `MISSION 1..5` rows + 3D ascending translucent stepper blocks
166
+ 7. `swarm_network` โ€” Central golden `COORDINATOR` hub + 5 `@worker`/`@verifier` spoke nodes
167
+ 8. `pricing_matrix` โ€” Multi-tier comparison table (`[PLANS: ๋ฌด๋ฃŒ โ‚ฉ0 | Pro | Ultra]`, rows `๊ธฐ๋Šฅ | โœ“ | โ–ณ | โœ•`)
168
+ 9. `arc_cards`, 10. `bento_grid`, 11. `mockup_steps`, 12. `book_quote`, 13. `notebook_flip`, 14. `vs_comparison`, 15. `data_bars`, 16. `process_timeline`, 17. `terminal_flow`, 18. `metric_summary`
assets/js/standalone_player.js ADDED
@@ -0,0 +1,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Standalone Browser Presentation Player for Deck2Video v3.2
2
+ * Automatically inactive inside HyperFrames CLI & Offline Headless Renderer.
3
+ * Activates ONLY when a human opens index.html directly in Chrome / Edge / Safari.
4
+ */
5
+ (function () {
6
+ if (!window.__IS_STANDALONE_BROWSER) return;
7
+
8
+ var tl = window.__timelines && window.__timelines["main"];
9
+ var choreo = window.__CHOREO_SPEC;
10
+ if (!tl || !choreo) return;
11
+
12
+ var totalDur = choreo.totalDuration || tl.duration() || 10;
13
+ var slides = choreo.slides || [];
14
+ var playing = false;
15
+ var curTime = 0;
16
+
17
+ var clips = Array.prototype.slice.call(document.querySelectorAll(".clip[data-start]"));
18
+ var audios = Array.prototype.slice.call(document.querySelectorAll("audio[data-start]"));
19
+ var videos = Array.prototype.slice.call(document.querySelectorAll("video[data-start]"));
20
+
21
+ function fitViewport() {
22
+ var root = document.getElementById("root");
23
+ if (!root) return;
24
+ var vw = window.innerWidth || 1920;
25
+ var vh = window.innerHeight || 1080;
26
+ var scale = Math.min(vw / 1920, vh / 1080);
27
+ document.documentElement.style.width = "100%";
28
+ document.documentElement.style.height = "100%";
29
+ document.body.style.width = "100%";
30
+ document.body.style.height = "100%";
31
+ document.body.style.display = "flex";
32
+ document.body.style.alignItems = "center";
33
+ document.body.style.justifyContent = "center";
34
+ document.body.style.background = "#02040a";
35
+ root.style.width = "1920px";
36
+ root.style.height = "1080px";
37
+ root.style.flexShrink = "0";
38
+ root.style.transformOrigin = "center center";
39
+ root.style.transform = "scale(" + scale.toFixed(4) + ")";
40
+ }
41
+
42
+ function fmtTime(sec) {
43
+ var s = Math.max(0, Math.floor(sec));
44
+ var m = Math.floor(s / 60);
45
+ var r = s % 60;
46
+ return (m < 10 ? "0" + m : String(m)) + ":" + (r < 10 ? "0" + r : String(r));
47
+ }
48
+
49
+ function currentSlideIndex(t) {
50
+ for (var i = 0; i < slides.length; i++) {
51
+ if (t >= slides[i].start && t < slides[i].end) return i;
52
+ }
53
+ return Math.max(0, slides.length - 1);
54
+ }
55
+
56
+ function syncClipsAndMedia(t, syncAudioPlay) {
57
+ for (var i = 0; i < clips.length; i++) {
58
+ var el = clips[i];
59
+ var st = parseFloat(el.getAttribute("data-start") || "0");
60
+ var dur = parseFloat(el.getAttribute("data-duration") || "999999");
61
+ el.style.visibility = t >= st && t < st + dur ? "visible" : "hidden";
62
+ }
63
+ for (var v = 0; v < videos.length; v++) {
64
+ var vid = videos[v];
65
+ var vst = parseFloat(vid.getAttribute("data-start") || "0");
66
+ var vdur = parseFloat(vid.getAttribute("data-duration") || "999999");
67
+ if (t >= vst && t < vst + vdur) {
68
+ var localV = Math.max(0, t - vst);
69
+ if (vid.duration && isFinite(vid.duration) && vid.duration > 0) {
70
+ localV = localV % vid.duration;
71
+ }
72
+ if (playing) {
73
+ if (vid.paused) vid.play().catch(function () {});
74
+ } else {
75
+ if (!vid.paused) vid.pause();
76
+ try { vid.currentTime = localV; } catch (e) {}
77
+ }
78
+ } else if (!vid.paused) {
79
+ vid.pause();
80
+ }
81
+ }
82
+ if (syncAudioPlay) {
83
+ for (var a = 0; a < audios.length; a++) {
84
+ var aud = audios[a];
85
+ var ast = parseFloat(aud.getAttribute("data-start") || "0");
86
+ var adur = parseFloat(aud.getAttribute("data-duration") || "0");
87
+ var vol = parseFloat(aud.getAttribute("data-volume") || "1");
88
+ aud.volume = Math.max(0, Math.min(1, vol));
89
+ if (playing && t >= ast && t < ast + adur - 0.04) {
90
+ var targetT = t - ast;
91
+ if (aud.paused) {
92
+ try { aud.currentTime = targetT; } catch (e) {}
93
+ aud.play().catch(function () {});
94
+ } else if (Math.abs((aud.currentTime || 0) - targetT) > 0.28) {
95
+ try { aud.currentTime = targetT; } catch (e) {}
96
+ }
97
+ } else if (!aud.paused) {
98
+ aud.pause();
99
+ }
100
+ }
101
+ }
102
+ tl.seek(t, false);
103
+ }
104
+
105
+ function stopAllAudio() {
106
+ for (var a = 0; a < audios.length; a++) {
107
+ if (!audios[a].paused) audios[a].pause();
108
+ }
109
+ for (var v = 0; v < videos.length; v++) {
110
+ if (!videos[v].paused) videos[v].pause();
111
+ }
112
+ }
113
+
114
+ // Build sleek floating HUD bar outside #root so it fits any screen
115
+ var bar = document.createElement("div");
116
+ bar.setAttribute("data-layout-ignore", "");
117
+ bar.style.cssText =
118
+ "position:fixed;bottom:16px;left:50%;transform:translateX(-50%);z-index:9999;" +
119
+ "display:flex;align-items:center;gap:12px;padding:10px 18px;border-radius:999px;" +
120
+ "background:rgba(8,14,28,0.92);border:1px solid rgba(56,189,248,0.45);" +
121
+ "box-shadow:0 12px 32px rgba(0,0,0,0.65);font-family:sans-serif;color:#f8fafc;font-size:14px;user-select:none;";
122
+
123
+ var btnPrev = document.createElement("button");
124
+ btnPrev.textContent = "โ—€ ์ด์ „";
125
+ var btnPlay = document.createElement("button");
126
+ btnPlay.textContent = "โ–ถ ์žฌ์ƒ (Space)";
127
+ var btnNext = document.createElement("button");
128
+ btnNext.textContent = "๋‹ค์Œ โ–ถ";
129
+
130
+ [btnPrev, btnPlay, btnNext].forEach(function (b, idx) {
131
+ b.style.cssText =
132
+ "border:1px solid " + (idx === 1 ? "#38bdf8" : "rgba(148,163,184,0.35)") + ";" +
133
+ "background:" + (idx === 1 ? "#0284c7" : "rgba(30,41,59,0.85)") + ";" +
134
+ "color:#fff;font-weight:700;font-size:13px;padding:6px 14px;border-radius:999px;cursor:pointer;";
135
+ });
136
+
137
+ var slideBadge = document.createElement("span");
138
+ slideBadge.style.cssText = "font-weight:800;color:#7dd3fc;min-width:74px;text-align:center;";
139
+
140
+ var scrub = document.createElement("input");
141
+ scrub.type = "range";
142
+ scrub.min = "0";
143
+ scrub.max = String(totalDur);
144
+ scrub.step = "0.03";
145
+ scrub.value = "0";
146
+ scrub.style.cssText = "width:220px;accent-color:#38bdf8;cursor:pointer;";
147
+
148
+ var timeLabel = document.createElement("span");
149
+ timeLabel.style.cssText = "font-family:monospace;font-size:13px;color:#cbd5e1;min-width:96px;text-align:right;";
150
+
151
+ bar.appendChild(btnPrev);
152
+ bar.appendChild(btnPlay);
153
+ bar.appendChild(btnNext);
154
+ bar.appendChild(slideBadge);
155
+ bar.appendChild(scrub);
156
+ bar.appendChild(timeLabel);
157
+ document.body.appendChild(bar);
158
+
159
+ function updateUI() {
160
+ var sIdx = currentSlideIndex(curTime);
161
+ slideBadge.textContent = "SLIDE " + (sIdx + 1) + " / " + slides.length;
162
+ scrub.value = String(curTime.toFixed(2));
163
+ timeLabel.textContent = fmtTime(curTime) + " / " + fmtTime(totalDur);
164
+ btnPlay.textContent = playing ? "โธ ์ผ์‹œ์ •์ง€" : "โ–ถ ์žฌ์ƒ (Space)";
165
+ }
166
+
167
+ function seekTo(newT) {
168
+ curTime = Math.max(0, Math.min(totalDur - 0.01, newT));
169
+ syncClipsAndMedia(curTime, playing);
170
+ updateUI();
171
+ }
172
+
173
+ function togglePlay() {
174
+ if (curTime >= totalDur - 0.05) curTime = 0;
175
+ playing = !playing;
176
+ if (!playing) stopAllAudio();
177
+ syncClipsAndMedia(curTime, playing);
178
+ updateUI();
179
+ }
180
+
181
+ gsap.ticker.add(function (time, deltaTime) {
182
+ if (!playing) return;
183
+ var dt = (deltaTime || 16.67) / 1000;
184
+ curTime += Math.min(0.1, Math.max(0.001, dt));
185
+ if (curTime >= totalDur) {
186
+ curTime = totalDur - 0.01;
187
+ playing = false;
188
+ stopAllAudio();
189
+ }
190
+ syncClipsAndMedia(curTime, true);
191
+ updateUI();
192
+ });
193
+
194
+ btnPlay.addEventListener("click", togglePlay);
195
+ btnPrev.addEventListener("click", function () {
196
+ var idx = currentSlideIndex(curTime);
197
+ var targetIdx = curTime - slides[idx].start > 1.2 ? idx : Math.max(0, idx - 1);
198
+ if (slides[targetIdx]) seekTo(slides[targetIdx].start + 0.05);
199
+ });
200
+ btnNext.addEventListener("click", function () {
201
+ var idx = currentSlideIndex(curTime);
202
+ var targetIdx = Math.min(slides.length - 1, idx + 1);
203
+ if (slides[targetIdx]) seekTo(slides[targetIdx].start + 0.05);
204
+ });
205
+ scrub.addEventListener("input", function () {
206
+ seekTo(parseFloat(scrub.value || "0"));
207
+ });
208
+
209
+ window.addEventListener("keydown", function (e) {
210
+ if (e.code === "Space") {
211
+ e.preventDefault();
212
+ togglePlay();
213
+ } else if (e.code === "ArrowRight") {
214
+ e.preventDefault();
215
+ btnNext.click();
216
+ } else if (e.code === "ArrowLeft") {
217
+ e.preventDefault();
218
+ btnPrev.click();
219
+ }
220
+ });
221
+
222
+ window.addEventListener("resize", fitViewport);
223
+ fitViewport();
224
+ // Show Slide 1 at rest (t = 0.45s so intro entrance is visible immediately when opened!)
225
+ seekTo(Math.min(0.45, totalDur * 0.1));
226
+ })();
deck2video_offline_full.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:62275f72cb58d5c392c5424561882059f48726854c305763bbb525260a3a9042
3
- size 92071295
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca47fe3f972fa161f1c2d02e650fd2f8e82e2c3803cb817a3af3ac7887880155
3
+ size 92081880
html_builder.py CHANGED
@@ -155,6 +155,83 @@ def _render_media_showcase_split_scene(
155
  </div>"""
156
 
157
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  def _render_changelog_vertical_scene(slide: dict[str, Any], s_idx: int) -> str:
159
  sid = f"s{s_idx + 1}"
160
  bullets = (slide.get("bullets") or ["11.03 | v2.29 | ์Œ์„ฑ ๋ชจ๋“œ ๋ฐฐํฌ", "11.09 | v2.30 | ์ง€์‹ ์—…๋ฌด ๋ ˆ์ด์•„์›ƒ"])[:6]
@@ -805,6 +882,9 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
805
  shutil.copy2(font_src, fonts_dst / "PretendardVariable.woff2")
806
  if gsap_src.exists():
807
  shutil.copy2(gsap_src, js_dst / "gsap.min.js")
 
 
 
808
 
809
  requested_bg = (spec.get("bg_preset") or "horizon_wave").lower().strip()
810
  all_text = " ".join(s.get("title", "") + " " + " ".join(s.get("bullets", [])) for s in spec.get("slides", []))
@@ -834,13 +914,30 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
834
  total_dur = spec["total_duration"]
835
  chapters = spec.get("chapters", [])
836
 
837
- # 1. Top HUD Layer (`chapter_tabs` vs `tech_briefing` vs `minimal`)
838
  if hud_style == "tech_briefing":
839
  hud_markup = f"""
840
  <header class="briefing-hud">
841
  <span class="briefing-brand">{_esc(brand_label)}</span>
842
  <span id="briefing-cursor" class="briefing-cursor" data-layout-ignore>|</span>
843
  </header>"""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
844
  elif hud_style == "minimal":
845
  hud_markup = ""
846
  else:
@@ -899,6 +996,22 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
899
  data-duration="{slide['duration']}"
900
  data-track-index="5"
901
  ></video>""")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
902
  elif arch == "changelog_vertical":
903
  inner_markup = _render_changelog_vertical_scene(slide, s_idx)
904
  elif arch == "mission_staircase":
@@ -1065,7 +1178,7 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
1065
  choreo_json = json.dumps(choreo_payload, ensure_ascii=False)
1066
  is_light = theme["is_light"]
1067
  border_subtle = "rgba(15, 23, 42, 0.14)" if is_light else "rgba(148, 163, 184, 0.22)"
1068
- cinema_bg = "rgba(15, 23, 42, 0.88)" if is_light else "transparent"
1069
 
1070
  html_doc = f"""<!doctype html>
1071
  <html lang="ko" data-resolution="landscape">
@@ -1132,6 +1245,17 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
1132
  }}
1133
  .briefing-cursor {{ color: var(--accent); font-weight: 900; }}
1134
 
 
 
 
 
 
 
 
 
 
 
 
1135
  .hud-corner {{ position: absolute; width: 52px; height: 52px; border-color: rgba(96, 165, 250, 0.55); border-style: solid; pointer-events: none; }}
1136
  .hud-corner.tl {{ top: 48px; left: 56px; border-width: 2px 0 0 2px; }}
1137
  .hud-corner.tr {{ top: 48px; right: 56px; border-width: 2px 2px 0 0; }}
@@ -1184,6 +1308,53 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
1184
  .sim-line {{ padding: 18px 22px; border-radius: 14px; background: rgba(30, 41, 59, 0.72); border: 1px solid rgba(56, 189, 248, 0.35); display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 700; color: #f8fafc; }}
1185
  .sim-dot {{ width: 10px; height: 10px; border-radius: 50%; background: #38bdf8; flex-shrink: 0; }}
1186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1187
  /* NEW 3: Vertical Changelog */
1188
  .scene-changelog {{ align-items: flex-start; justify-content: center; max-width: 1580px; }}
1189
  .clog-header {{ font-size: 52px; font-weight: 900; color: var(--text-primary); letter-spacing: -0.03em; align-self: flex-start; }}
@@ -1399,7 +1570,7 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
1399
  .caption-box {{ padding: 14px 32px; border-radius: 18px; background: var(--cap-bg); border: 1px solid rgba(148, 163, 184, 0.2); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 1560px; }}
1400
  .caption-box.style-briefing {{ width: 1540px; border-radius: 12px; background: rgba(3, 6, 14, 0.90); border: 1px solid rgba(56, 189, 248, 0.14); padding: 15px 36px; }}
1401
  .briefing-ko {{ font-size: 36px; font-weight: 700; }}
1402
- .caption-box.style-cinema {{ background: {cinema_bg}; border: none; padding: 10px 28px; }}
1403
  .caption-box.style-neon-bar {{ align-items: flex-start; text-align: left; border-radius: 6px 18px 18px 6px; border-left: 6px solid var(--accent); padding: 14px 34px; }}
1404
  .neon-bar-kicker {{ font-size: 14px; font-weight: 800; letter-spacing: 0.08em; color: #7dd3fc; }}
1405
  .cap-ko {{ font-size: 39px; font-weight: 800; color: #ffffff; letter-spacing: -0.02em; line-height: 1.25; text-shadow: 0 2px 14px rgba(0,0,0,0.88); }}
@@ -1469,6 +1640,9 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
1469
  for (let ci = 0; ci < CHOREO.chaptersCount; ci++) {{
1470
  gsap.set("#chap-fill-" + ci, {{ scaleX: 0 }});
1471
  }}
 
 
 
1472
 
1473
  // Deterministic Text Scramble Decode Animations
1474
  CHOREO.scrambles.forEach(function (sc) {{
@@ -1530,6 +1704,21 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
1530
  }} else if (s.archetype === "media_showcase_split") {{
1531
  tl.fromTo("#" + sid + "-hero-kw", {{ opacity: 0, x: -30 }}, {{ opacity: 1, x: 0, duration: 0.45, ease: "power3.out" }}, st + 0.10);
1532
  tl.fromTo("#" + sid + "-media-frame", {{ opacity: 0, x: 36, scale: 0.96 }}, {{ opacity: 1, x: 0, scale: 1.0, duration: 0.52, ease: "power3.out" }}, st + 0.14);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1533
  }} else if (s.archetype === "changelog_vertical") {{
1534
  tl.fromTo("#" + sid + "-clog-spine", {{ scaleY: 0 }}, {{ scaleY: 1, duration: Math.min(1.4, dur * 0.6), ease: "power2.out" }}, st + 0.12);
1535
  const rCount = Math.min(6, Math.max(1, s.bulletsCount));
@@ -1635,9 +1824,13 @@ def compile_hyperframes_project(spec: dict[str, Any], project_dir: Path) -> Path
1635
  }});
1636
  }}
1637
 
 
 
 
1638
  window.__timelines["main"] = tl;
1639
  tl.seek(0);
1640
  </script>
 
1641
  </body>
1642
  </html>
1643
  """
 
155
  </div>"""
156
 
157
 
158
+ def _render_dossier_stamp_scene(slide: dict[str, Any], s_idx: int) -> str:
159
+ """Documentary official folder / patent dossier card with tilted rubber stamp (์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ ์Šคํƒ€์ผ)."""
160
+ sid = f"s{s_idx + 1}"
161
+ bullets = (slide.get("bullets") or ["ํ•ต์‹ฌ ํ•ญ๋ชฉ | ์„ธ๋ถ€ ๋‚ด์šฉ ์š”์•ฝ"])[:4]
162
+ title = slide.get("title", "๊ณต์‹ ๋ฌธ์„œ ์š”์•ฝ")
163
+ combined_hdr = (title + " " + slide.get("badge", "") + " " + slide.get("stamp_text", "")).lower()
164
+ is_statement = any(k in combined_hdr for k in ["ํ•ด๋ช…", "๊ณต์‹ ์ž…์žฅ", "statement", "์šฐ๋ ค", "๋…ผ๋ž€", "์—†์Œ", "๋ถˆ๊ฐ€", "๋ฐ˜๋ฐ•"])
165
+ is_patent = (not is_statement) and any(k in combined_hdr for k in ["ํŠนํ—ˆ", "patent", "uspto", "๋“ฑ๋ก"])
166
+ folder_cls = "dossier-card-white" if is_patent else "dossier-card-kraft"
167
+ tab_label = slide.get("badge") if slide.get("badge") and not slide.get("badge", "").startswith("SECTION") else (
168
+ "USPTO REGISTERED PATENT" if is_patent else "OFFICIAL STATEMENT ยท ๊ณต์‹ ๋ฌธ์„œ ์š”์•ฝ"
169
+ )
170
+ stamp_txt = slide.get("stamp_text") or ("PATENT REGISTERED" if is_patent else "ํ•ต์‹ฌ ์Ÿ์  ํ™•์ธ")
171
+ stamp_cls = "rubber-stamp stamp-blue" if is_patent else "rubber-stamp stamp-red"
172
+
173
+ rows_html = []
174
+ for i, raw in enumerate(bullets):
175
+ k_txt, v_txt = _split_card_item(raw, i)
176
+ rows_html.append(f"""
177
+ <div id="{sid}-dos-row-{i}" class="dossier-row">
178
+ <span class="dossier-key">{_esc(k_txt)}</span>
179
+ <span class="dossier-val">{_esc(v_txt)}</span>
180
+ </div>""")
181
+
182
+ meta_right = slide.get("source_note") or slide.get("subtitle") or ""
183
+ meta_html = f'<span class="dossier-meta-right">{_esc(meta_right)}</span>' if meta_right else ""
184
+
185
+ return f"""
186
+ <div id="{sid}-inner" class="scene-inner scene-dossier">
187
+ <div id="{sid}-dos-shell" class="dossier-shell">
188
+ <div class="dossier-folder-tab">{_esc(tab_label)}</div>
189
+ <div class="dossier-card {folder_cls}">
190
+ <div class="dossier-head-row">
191
+ <h2 class="dossier-title">{_esc(title)}</h2>
192
+ {meta_html}
193
+ </div>
194
+ <div class="dossier-divider" data-layout-ignore></div>
195
+ <div class="dossier-rows">{"".join(rows_html)}</div>
196
+ <div id="{sid}-dos-stamp" class="{stamp_cls}" data-layout-ignore>{_esc(stamp_txt)}</div>
197
+ </div>
198
+ </div>
199
+ </div>"""
200
+
201
+
202
+ def _render_cinema_broll_scene(
203
+ slide: dict[str, Any],
204
+ s_idx: int,
205
+ rel_media_path: str,
206
+ media_kind: str,
207
+ ) -> str:
208
+ """Full-screen documentary B-Roll (image Ken-Burns or sibling video) with dark cinema vignette."""
209
+ sid = f"s{s_idx + 1}"
210
+ kicker = slide.get("badge") if slide.get("badge") and not slide.get("badge", "").startswith("SECTION") else ""
211
+ kicker_html = f'<div class="broll-kicker">{_esc(kicker)}</div>' if kicker else ""
212
+
213
+ if media_kind == "image" and rel_media_path:
214
+ bg_layer = f'<img id="{sid}-broll-img" src="{_esc(rel_media_path)}" alt="" class="broll-full-img" data-layout-allow-overflow data-layout-ignore />'
215
+ center_card = ""
216
+ elif media_kind == "video" and rel_media_path:
217
+ bg_layer = ""
218
+ center_card = ""
219
+ else:
220
+ bg_layer = ""
221
+ center_card = f"""
222
+ <div class="broll-atmos-title-wrap">
223
+ {kicker_html}
224
+ <h2 id="{sid}-broll-title" class="broll-atmos-title">{_esc(slide.get("title", ""))}</h2>
225
+ </div>"""
226
+
227
+ return f"""
228
+ <div id="{sid}-inner" class="scene-inner scene-broll-full">
229
+ {bg_layer}
230
+ <div class="broll-vignette" data-layout-ignore></div>
231
+ {center_card}
232
+ </div>"""
233
+
234
+
235
  def _render_changelog_vertical_scene(slide: dict[str, Any], s_idx: int) -> str:
236
  sid = f"s{s_idx + 1}"
237
  bullets = (slide.get("bullets") or ["11.03 | v2.29 | ์Œ์„ฑ ๋ชจ๋“œ ๋ฐฐํฌ", "11.09 | v2.30 | ์ง€์‹ ์—…๋ฌด ๋ ˆ์ด์•„์›ƒ"])[:6]
 
882
  shutil.copy2(font_src, fonts_dst / "PretendardVariable.woff2")
883
  if gsap_src.exists():
884
  shutil.copy2(gsap_src, js_dst / "gsap.min.js")
885
+ player_src = PIPELINE_ROOT / "assets" / "js" / "standalone_player.js"
886
+ if player_src.exists():
887
+ shutil.copy2(player_src, js_dst / "standalone_player.js")
888
 
889
  requested_bg = (spec.get("bg_preset") or "horizon_wave").lower().strip()
890
  all_text = " ".join(s.get("title", "") + " " + " ".join(s.get("bullets", [])) for s in spec.get("slides", []))
 
914
  total_dur = spec["total_duration"]
915
  chapters = spec.get("chapters", [])
916
 
917
+ # 1. Top HUD Layer (`chapter_tabs` vs `tech_briefing` vs `docu_watermark` vs `minimal`)
918
  if hud_style == "tech_briefing":
919
  hud_markup = f"""
920
  <header class="briefing-hud">
921
  <span class="briefing-brand">{_esc(brand_label)}</span>
922
  <span id="briefing-cursor" class="briefing-cursor" data-layout-ignore>|</span>
923
  </header>"""
924
+ elif hud_style == "docu_watermark":
925
+ if "|" in brand_label:
926
+ wm_top, wm_bot = [x.strip() for x in brand_label.split("|", 1)]
927
+ else:
928
+ words = brand_label.strip().split()
929
+ if len(words) >= 2:
930
+ wm_top, wm_bot = " ".join(words[:-1]), words[-1]
931
+ else:
932
+ wm_top, wm_bot = "DOCUMENTARY", brand_label.strip()[:12]
933
+ hud_markup = f"""
934
+ <div class="docu-top-bar" data-layout-ignore>
935
+ <div id="docu-prog-fill" class="docu-top-fill"></div>
936
+ </div>
937
+ <header class="docu-wm-hud">
938
+ <span class="docu-wm-top">{_esc(wm_top)}</span>
939
+ <span class="docu-wm-bot">{_esc(wm_bot)}</span>
940
+ </header>"""
941
  elif hud_style == "minimal":
942
  hud_markup = ""
943
  else:
 
996
  data-duration="{slide['duration']}"
997
  data-track-index="5"
998
  ></video>""")
999
+ elif arch == "cinema_broll_fullscreen":
1000
+ inner_markup = _render_cinema_broll_scene(slide, s_idx, rel_media, media_kind)
1001
+ if media_kind == "video" and rel_media:
1002
+ video_overlays_html.append(f"""
1003
+ <video
1004
+ id="broll-vid-{s_idx + 1}"
1005
+ class="clip broll-video-overlay"
1006
+ src="{_esc(rel_media)}"
1007
+ muted
1008
+ playsinline
1009
+ data-start="{slide['start']}"
1010
+ data-duration="{slide['duration']}"
1011
+ data-track-index="5"
1012
+ ></video>""")
1013
+ elif arch == "dossier_stamp_card":
1014
+ inner_markup = _render_dossier_stamp_scene(slide, s_idx)
1015
  elif arch == "changelog_vertical":
1016
  inner_markup = _render_changelog_vertical_scene(slide, s_idx)
1017
  elif arch == "mission_staircase":
 
1178
  choreo_json = json.dumps(choreo_payload, ensure_ascii=False)
1179
  is_light = theme["is_light"]
1180
  border_subtle = "rgba(15, 23, 42, 0.14)" if is_light else "rgba(148, 163, 184, 0.22)"
1181
+ cinema_bg = "rgba(15, 23, 42, 0.88)" if is_light else "rgba(4, 6, 12, 0.84)"
1182
 
1183
  html_doc = f"""<!doctype html>
1184
  <html lang="ko" data-resolution="landscape">
 
1245
  }}
1246
  .briefing-cursor {{ color: var(--accent); font-weight: 900; }}
1247
 
1248
+ /* HUD C: Documentary Watermark + Top Progress Bar (์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ ์Šคํƒ€์ผ) */
1249
+ .docu-top-bar {{ position: absolute; top: 18px; left: 36px; right: 380px; height: 4px; border-radius: 99px; background: rgba(148, 163, 184, 0.24); overflow: hidden; z-index: 22; }}
1250
+ .docu-top-fill {{ display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #38bdf8, #34d399); transform-origin: left center; }}
1251
+ .docu-wm-hud {{
1252
+ position: absolute; top: 44px; right: 76px; z-index: 22;
1253
+ display: flex; flex-direction: column; align-items: center; gap: 2px;
1254
+ text-shadow: 0 2px 12px rgba(0,0,0,0.85);
1255
+ }}
1256
+ .docu-wm-top {{ font-size: 16px; font-weight: 800; color: #f8fafc; letter-spacing: -0.01em; }}
1257
+ .docu-wm-bot {{ font-size: 38px; font-weight: 900; color: #ffffff; letter-spacing: -0.03em; line-height: 1.02; }}
1258
+
1259
  .hud-corner {{ position: absolute; width: 52px; height: 52px; border-color: rgba(96, 165, 250, 0.55); border-style: solid; pointer-events: none; }}
1260
  .hud-corner.tl {{ top: 48px; left: 56px; border-width: 2px 0 0 2px; }}
1261
  .hud-corner.tr {{ top: 48px; right: 56px; border-width: 2px 2px 0 0; }}
 
1308
  .sim-line {{ padding: 18px 22px; border-radius: 14px; background: rgba(30, 41, 59, 0.72); border: 1px solid rgba(56, 189, 248, 0.35); display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 700; color: #f8fafc; }}
1309
  .sim-dot {{ width: 10px; height: 10px; border-radius: 50%; background: #38bdf8; flex-shrink: 0; }}
1310
 
1311
+ /* NEW 2B: Documentary Dossier / Patent Stamp Card (์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ ์Šคํƒ€์ผ) */
1312
+ .scene-dossier {{ justify-content: center; align-items: center; }}
1313
+ .dossier-shell {{ width: 1440px; display: flex; flex-direction: column; align-items: flex-start; }}
1314
+ .dossier-folder-tab {{
1315
+ margin-left: 36px; padding: 10px 28px 8px 28px; border-radius: 14px 14px 0 0;
1316
+ background: #ebd9bd; color: #7c2d12; font-size: 16px; font-weight: 900; letter-spacing: 0.06em;
1317
+ }}
1318
+ .dossier-card {{
1319
+ position: relative; width: 100%; min-height: 500px; padding: 42px 58px 48px 58px;
1320
+ border-radius: 18px; box-shadow: 0 32px 72px rgba(0,0,0,0.65);
1321
+ display: flex; flex-direction: column; justify-content: space-between;
1322
+ }}
1323
+ .dossier-card-kraft {{ background: #ebd9bd; color: #1c1917; }}
1324
+ .dossier-card-white {{ background: #f8fafc; color: #0f172a; border-top: 8px solid #0ea5e9; }}
1325
+ .dossier-head-row {{ display: flex; justify-content: space-between; align-items: baseline; gap: 24px; }}
1326
+ .dossier-title {{ font-size: 40px; font-weight: 900; letter-spacing: -0.03em; color: #0f172a; }}
1327
+ .dossier-meta-right {{ font-size: 18px; font-weight: 700; font-family: monospace; color: #475569; }}
1328
+ .dossier-divider {{ width: 100%; height: 2px; background: rgba(15, 23, 42, 0.75); margin: 18px 0 12px 0; }}
1329
+ .dossier-rows {{ display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: center; }}
1330
+ .dossier-row {{
1331
+ display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 28px;
1332
+ padding: 20px 8px; border-bottom: 1.5px dotted rgba(15, 23, 42, 0.28);
1333
+ }}
1334
+ .dossier-key {{ font-size: 24px; font-weight: 800; color: #7c2d12; }}
1335
+ .dossier-card-white .dossier-key {{ color: #0369a1; }}
1336
+ .dossier-val {{ font-size: 31px; font-weight: 900; color: #0f172a; letter-spacing: -0.02em; }}
1337
+ .rubber-stamp {{
1338
+ position: absolute; right: 56px; bottom: 38px; padding: 12px 28px;
1339
+ border-radius: 10px; font-size: 36px; font-weight: 900; letter-spacing: 0.04em;
1340
+ transform: rotate(-8deg); pointer-events: none;
1341
+ }}
1342
+ .stamp-red {{ border: 4px solid #dc2626; color: #dc2626; background: rgba(254, 226, 226, 0.35); }}
1343
+ .stamp-blue {{ border: 4px solid #0284c7; color: #0284c7; background: rgba(224, 242, 254, 0.45); }}
1344
+
1345
+ /* NEW 2C: Fullscreen Cinema B-Roll */
1346
+ .scene-broll-full {{ position: absolute; inset: 0; width: 1920px; height: 1080px; overflow: hidden; justify-content: center; align-items: center; }}
1347
+ .broll-full-img {{ position: absolute; inset: 0; width: 1920px; height: 1080px; object-fit: cover; display: block; }}
1348
+ .broll-video-overlay {{ position: absolute; inset: 0; width: 1920px; height: 1080px; object-fit: cover; z-index: 4; pointer-events: none; }}
1349
+ .broll-vignette {{
1350
+ position: absolute; inset: 0; pointer-events: none;
1351
+ background: radial-gradient(ellipse 80% 75% at 50% 45%, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.52) 100%),
1352
+ linear-gradient(180deg, rgba(0,0,0,0.38) 0%, rgba(0,0,0,0) 24%, rgba(0,0,0,0) 68%, rgba(0,0,0,0.78) 100%);
1353
+ }}
1354
+ .broll-atmos-title-wrap {{ position: relative; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 1400px; text-align: center; padding: 0 64px; }}
1355
+ .broll-kicker {{ font-size: 20px; font-weight: 800; letter-spacing: 0.2em; color: #38bdf8; }}
1356
+ .broll-atmos-title {{ font-size: 64px; font-weight: 900; color: #ffffff; text-shadow: 0 4px 28px rgba(0,0,0,0.85); line-height: 1.25; }}
1357
+
1358
  /* NEW 3: Vertical Changelog */
1359
  .scene-changelog {{ align-items: flex-start; justify-content: center; max-width: 1580px; }}
1360
  .clog-header {{ font-size: 52px; font-weight: 900; color: var(--text-primary); letter-spacing: -0.03em; align-self: flex-start; }}
 
1570
  .caption-box {{ padding: 14px 32px; border-radius: 18px; background: var(--cap-bg); border: 1px solid rgba(148, 163, 184, 0.2); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 1560px; }}
1571
  .caption-box.style-briefing {{ width: 1540px; border-radius: 12px; background: rgba(3, 6, 14, 0.90); border: 1px solid rgba(56, 189, 248, 0.14); padding: 15px 36px; }}
1572
  .briefing-ko {{ font-size: 36px; font-weight: 700; }}
1573
+ .caption-box.style-cinema {{ background: {cinema_bg}; border: none; border-radius: 8px; padding: 10px 28px; }}
1574
  .caption-box.style-neon-bar {{ align-items: flex-start; text-align: left; border-radius: 6px 18px 18px 6px; border-left: 6px solid var(--accent); padding: 14px 34px; }}
1575
  .neon-bar-kicker {{ font-size: 14px; font-weight: 800; letter-spacing: 0.08em; color: #7dd3fc; }}
1576
  .cap-ko {{ font-size: 39px; font-weight: 800; color: #ffffff; letter-spacing: -0.02em; line-height: 1.25; text-shadow: 0 2px 14px rgba(0,0,0,0.88); }}
 
1640
  for (let ci = 0; ci < CHOREO.chaptersCount; ci++) {{
1641
  gsap.set("#chap-fill-" + ci, {{ scaleX: 0 }});
1642
  }}
1643
+ if (document.getElementById("docu-prog-fill")) {{
1644
+ tl.fromTo("#docu-prog-fill", {{ scaleX: 0.02 }}, {{ scaleX: 1.0, duration: CHOREO.totalDuration, ease: "none" }}, 0);
1645
+ }}
1646
 
1647
  // Deterministic Text Scramble Decode Animations
1648
  CHOREO.scrambles.forEach(function (sc) {{
 
1704
  }} else if (s.archetype === "media_showcase_split") {{
1705
  tl.fromTo("#" + sid + "-hero-kw", {{ opacity: 0, x: -30 }}, {{ opacity: 1, x: 0, duration: 0.45, ease: "power3.out" }}, st + 0.10);
1706
  tl.fromTo("#" + sid + "-media-frame", {{ opacity: 0, x: 36, scale: 0.96 }}, {{ opacity: 1, x: 0, scale: 1.0, duration: 0.52, ease: "power3.out" }}, st + 0.14);
1707
+ }} else if (s.archetype === "dossier_stamp_card") {{
1708
+ tl.fromTo("#" + sid + "-dos-shell", {{ opacity: 0, y: 30, scale: 0.95 }}, {{ opacity: 1, y: 0, scale: 1.0, duration: 0.48, ease: "power3.out" }}, st + 0.08);
1709
+ const dRows = Math.min(4, Math.max(1, s.bulletsCount));
1710
+ for (let k = 0; k < dRows; k++) {{
1711
+ tl.fromTo("#" + sid + "-dos-row-" + k, {{ opacity: 0, x: -24 }}, {{ opacity: 1, x: 0, duration: 0.34, ease: "power2.out" }}, st + 0.22 + k * 0.16);
1712
+ }}
1713
+ const stampTime = st + 0.65;
1714
+ tl.fromTo("#" + sid + "-dos-stamp", {{ opacity: 0, scale: 2.2, rotation: -18 }}, {{ opacity: 1, scale: 1.0, rotation: -8, duration: 0.34, ease: "back.out(2.0)" }}, stampTime);
1715
+ }} else if (s.archetype === "cinema_broll_fullscreen") {{
1716
+ if (document.getElementById(sid + "-broll-img")) {{
1717
+ tl.fromTo("#" + sid + "-broll-img", {{ scale: 1.0 }}, {{ scale: 1.08, duration: dur, ease: "none" }}, st);
1718
+ }}
1719
+ if (document.getElementById(sid + "-broll-title")) {{
1720
+ tl.fromTo("#" + sid + "-broll-title", {{ opacity: 0, y: 20 }}, {{ opacity: 1, y: 0, duration: 0.55, ease: "power3.out" }}, st + 0.14);
1721
+ }}
1722
  }} else if (s.archetype === "changelog_vertical") {{
1723
  tl.fromTo("#" + sid + "-clog-spine", {{ scaleY: 0 }}, {{ scaleY: 1, duration: Math.min(1.4, dur * 0.6), ease: "power2.out" }}, st + 0.12);
1724
  const rCount = Math.min(6, Math.max(1, s.bulletsCount));
 
1824
  }});
1825
  }}
1826
 
1827
+ window.__IS_STANDALONE_BROWSER = !window.__timelines && !window.__offlineCapture;
1828
+ window.__timelines = window.__timelines || {{}};
1829
+ window.__CHOREO_SPEC = CHOREO;
1830
  window.__timelines["main"] = tl;
1831
  tl.seek(0);
1832
  </script>
1833
+ <script src="assets/js/standalone_player.js"></script>
1834
  </body>
1835
  </html>
1836
  """
ingest_parser.py CHANGED
@@ -94,6 +94,8 @@ def check_openxml_drm(file_path: Path) -> None:
94
  ARCHETYPES = [
95
  "hero_3d_briefing",
96
  "media_showcase_split",
 
 
97
  "changelog_vertical",
98
  "mission_staircase",
99
  "swarm_network",
@@ -125,10 +127,23 @@ def _clean_chapter_label(raw_ch: str) -> str:
125
  return (cleaned or raw_ch.strip())[:16]
126
 
127
 
128
- def _infer_archetype(idx: int, total: int, title: str, bullets: list[str], notes: str, has_media: bool = False) -> str:
 
 
 
 
 
 
 
 
 
129
  combined = f"{title} {' '.join(bullets)} {notes}".lower()
 
 
130
  if has_media:
131
  return "media_showcase_split"
 
 
132
  if any(k in combined for k in ["์š”๊ธˆ", "ํ”Œ๋žœ", "๊ฐ€๊ฒฉํ‘œ", "ํ• ๋‹น๋Ÿ‰", "๋ฌด๋ฃŒ", "์œ ๋ฃŒ", "pricing"]) and any("|" in b for b in bullets):
133
  return "pricing_matrix"
134
  date_bullets = sum(1 for b in bullets if re.match(r"^(?:\d{1,2}\.\d{1,2}|20\d{2}|v\d+\.\d+)", b.strip(), re.I))
@@ -220,9 +235,18 @@ def _compile_raw_slides_to_spec(deck_title: str, raw_slides: list[dict[str, Any]
220
 
221
  bullets = item.get("bullets") or [item["title"]]
222
  notes_lines = item.get("notes_lines", [])
223
- media_src = meta.get("MEDIA") or item.get("media_src", "")
 
 
224
  archetype = meta.get("ARCHETYPE") or _infer_archetype(
225
- s_idx, len(raw_slides), item["title"], bullets, " ".join(notes_lines), has_media=bool(media_src)
 
 
 
 
 
 
 
226
  )
227
  beats = _parse_notes_into_beats(item["title"], bullets, notes_lines)
228
 
@@ -248,6 +272,7 @@ def _compile_raw_slides_to_spec(deck_title: str, raw_slides: list[dict[str, Any]
248
  "hero_word": meta.get("HERO_WORD", ""),
249
  "scramble_text": meta.get("SCRAMBLE", ""),
250
  "source_note": meta.get("SOURCE", ""),
 
251
  "media_src": media_src,
252
  "media_caption": meta.get("MEDIA_CAPTION", ""),
253
  "plans": meta.get("PLANS", "๋ฌด๋ฃŒ โ‚ฉ0 | Pro ์›” โ‚ฉ29,000 | Ultra ์›” โ‚ฉ119,000~"),
@@ -787,6 +812,9 @@ def parse_agent_json_to_spec(payload: Any, default_title: str = "Presentation")
787
  "media_caption": "MEDIA_CAPTION",
788
  "plans": "PLANS",
789
  "command": "COMMAND",
 
 
 
790
  }
791
  for src_k, dst_k in key_map.items():
792
  val = s.get(src_k)
 
94
  ARCHETYPES = [
95
  "hero_3d_briefing",
96
  "media_showcase_split",
97
+ "cinema_broll_fullscreen",
98
+ "dossier_stamp_card",
99
  "changelog_vertical",
100
  "mission_staircase",
101
  "swarm_network",
 
127
  return (cleaned or raw_ch.strip())[:16]
128
 
129
 
130
+ def _infer_archetype(
131
+ idx: int,
132
+ total: int,
133
+ title: str,
134
+ bullets: list[str],
135
+ notes: str,
136
+ has_media: bool = False,
137
+ has_stamp: bool = False,
138
+ has_broll: bool = False,
139
+ ) -> str:
140
  combined = f"{title} {' '.join(bullets)} {notes}".lower()
141
+ if has_broll:
142
+ return "cinema_broll_fullscreen"
143
  if has_media:
144
  return "media_showcase_split"
145
+ if has_stamp or any(k in combined for k in ["ํŠนํ—ˆ", "๊ณต์‹ ํ•ด๋ช…", "๊ณต์‹ ์ž…์žฅ", "ํŒ๊ฒฐ", "๊ณต๋ฌธ", "์„ฑ๋ช…์„œ", "patent", "official statement"]):
146
+ return "dossier_stamp_card"
147
  if any(k in combined for k in ["์š”๊ธˆ", "ํ”Œ๋žœ", "๊ฐ€๊ฒฉํ‘œ", "ํ• ๋‹น๋Ÿ‰", "๋ฌด๋ฃŒ", "์œ ๋ฃŒ", "pricing"]) and any("|" in b for b in bullets):
148
  return "pricing_matrix"
149
  date_bullets = sum(1 for b in bullets if re.match(r"^(?:\d{1,2}\.\d{1,2}|20\d{2}|v\d+\.\d+)", b.strip(), re.I))
 
235
 
236
  bullets = item.get("bullets") or [item["title"]]
237
  notes_lines = item.get("notes_lines", [])
238
+ broll_src = meta.get("BROLL") or ""
239
+ media_src = broll_src or meta.get("MEDIA") or item.get("media_src", "")
240
+ stamp_text = meta.get("STAMP") or ""
241
  archetype = meta.get("ARCHETYPE") or _infer_archetype(
242
+ s_idx,
243
+ len(raw_slides),
244
+ item["title"],
245
+ bullets,
246
+ " ".join(notes_lines),
247
+ has_media=bool(media_src) and not bool(broll_src),
248
+ has_stamp=bool(stamp_text),
249
+ has_broll=bool(broll_src),
250
  )
251
  beats = _parse_notes_into_beats(item["title"], bullets, notes_lines)
252
 
 
272
  "hero_word": meta.get("HERO_WORD", ""),
273
  "scramble_text": meta.get("SCRAMBLE", ""),
274
  "source_note": meta.get("SOURCE", ""),
275
+ "stamp_text": stamp_text,
276
  "media_src": media_src,
277
  "media_caption": meta.get("MEDIA_CAPTION", ""),
278
  "plans": meta.get("PLANS", "๋ฌด๋ฃŒ โ‚ฉ0 | Pro ์›” โ‚ฉ29,000 | Ultra ์›” โ‚ฉ119,000~"),
 
812
  "media_caption": "MEDIA_CAPTION",
813
  "plans": "PLANS",
814
  "command": "COMMAND",
815
+ "stamp": "STAMP",
816
+ "stamp_text": "STAMP",
817
+ "broll": "BROLL",
818
  }
819
  for src_k, dst_k in key_map.items():
820
  val = s.get(src_k)
offline_renderer.py CHANGED
@@ -275,10 +275,12 @@ def render_offline_via_local_browser(
275
  "--mute-audio",
276
  "--no-first-run",
277
  "--no-default-browser-check",
 
 
278
  "--window-size=1920,1080",
279
  f"--user-data-dir={tmp_profile / 'profile'}",
280
  f"--remote-debugging-port={cdp_port}",
281
- f"http://127.0.0.1:{http_port}/index.html",
282
  ])
283
 
284
  browser_proc = subprocess.Popen(
@@ -287,12 +289,13 @@ def render_offline_via_local_browser(
287
  stderr=subprocess.PIPE,
288
  )
289
 
 
290
  cdp: _MiniCDPClient | None = None
291
  try:
292
  ws_url = ""
293
- for _ in range(50):
294
  try:
295
- with urllib.request.urlopen(f"http://127.0.0.1:{cdp_port}/json", timeout=1) as resp:
296
  targets = json.loads(resp.read().decode("utf-8"))
297
  for tgt in targets:
298
  if tgt.get("type") == "page" and "webSocketDebuggerUrl" in tgt:
@@ -312,29 +315,72 @@ def render_offline_via_local_browser(
312
  "Emulation.setDeviceMetricsOverride",
313
  {"width": 1920, "height": 1080, "deviceScaleFactor": 1, "mobile": False},
314
  )
315
-
316
- # Wait for fonts and timeline registration
317
  cdp.call(
318
- "Runtime.evaluate",
319
- {
320
- "expression": "document.fonts.ready.then(() => Boolean(window.__timelines && window.__timelines['main']))",
321
- "awaitPromise": True,
322
- },
323
  )
 
324
 
325
- # Inject clip visibility helper matching HyperFrames [data-start, data-start + data-duration]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  init_js = """
327
- window.__offlineSeek = function(t) {
328
  var clips = document.querySelectorAll('.clip[data-start]');
 
329
  for (var i = 0; i < clips.length; i++) {
330
  var el = clips[i];
331
  var st = parseFloat(el.getAttribute('data-start') || '0');
332
  var dur = parseFloat(el.getAttribute('data-duration') || '999999');
333
- el.style.visibility = (t >= st && t < st + dur) ? 'visible' : 'hidden';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
  }
335
  if (window.__timelines && window.__timelines['main']) {
336
  window.__timelines['main'].seek(t, false);
337
  }
 
 
 
 
338
  };
339
  """
340
  cdp.call("Runtime.evaluate", {"expression": init_js})
@@ -363,7 +409,7 @@ def render_offline_via_local_browser(
363
 
364
  for frame_idx in range(total_frames):
365
  t_sec = frame_idx / float(fps)
366
- cdp.call("Runtime.evaluate", {"expression": f"window.__offlineSeek({t_sec:.5f});"})
367
  shot = cdp.call("Page.captureScreenshot", {"format": "jpeg", "quality": 94})
368
  ff_proc.stdin.write(base64.b64decode(shot["data"]))
369
  if frame_idx % 60 == 0 or frame_idx == total_frames - 1:
 
275
  "--mute-audio",
276
  "--no-first-run",
277
  "--no-default-browser-check",
278
+ "--no-proxy-server",
279
+ "--autoplay-policy=no-user-gesture-required",
280
  "--window-size=1920,1080",
281
  f"--user-data-dir={tmp_profile / 'profile'}",
282
  f"--remote-debugging-port={cdp_port}",
283
+ "about:blank",
284
  ])
285
 
286
  browser_proc = subprocess.Popen(
 
289
  stderr=subprocess.PIPE,
290
  )
291
 
292
+ no_proxy_opener = urllib.request.build_opener(urllib.request.ProxyHandler({}))
293
  cdp: _MiniCDPClient | None = None
294
  try:
295
  ws_url = ""
296
+ for _ in range(60):
297
  try:
298
+ with no_proxy_opener.open(f"http://127.0.0.1:{cdp_port}/json", timeout=1) as resp:
299
  targets = json.loads(resp.read().decode("utf-8"))
300
  for tgt in targets:
301
  if tgt.get("type") == "page" and "webSocketDebuggerUrl" in tgt:
 
315
  "Emulation.setDeviceMetricsOverride",
316
  {"width": 1920, "height": 1080, "deviceScaleFactor": 1, "mobile": False},
317
  )
 
 
318
  cdp.call(
319
+ "Page.addScriptToEvaluateOnNewDocument",
320
+ {"source": "window.__timelines = window.__timelines || {}; window.__offlineCapture = true;"},
 
 
 
321
  )
322
+ cdp.call("Page.navigate", {"url": f"http://127.0.0.1:{http_port}/index.html"})
323
 
324
+ # Poll until fonts and main GSAP timeline are both initialized
325
+ tl_ready = False
326
+ for _ in range(50):
327
+ ev = cdp.call(
328
+ "Runtime.evaluate",
329
+ {
330
+ "expression": (
331
+ "Boolean(document.readyState === 'complete' && window.__timelines && window.__timelines['main'])"
332
+ ),
333
+ "returnByValue": True,
334
+ },
335
+ )
336
+ if ev.get("result", {}).get("value") is True:
337
+ tl_ready = True
338
+ break
339
+ time.sleep(0.1)
340
+
341
+ if not tl_ready:
342
+ err_probe = cdp.call(
343
+ "Runtime.evaluate",
344
+ {"expression": "String(window.__lastScriptError || 'timeline not registered')", "returnByValue": True},
345
+ )
346
+ raise RuntimeError(f"GSAP main timeline failed to initialize in offline browser: {err_probe}")
347
+
348
+ cdp.call("Runtime.evaluate", {"expression": "document.fonts.ready", "awaitPromise": True})
349
+
350
+ # Inject async clip visibility + <video> seek + GSAP seek helper
351
  init_js = """
352
+ window.__offlineSeek = async function(t) {
353
  var clips = document.querySelectorAll('.clip[data-start]');
354
+ var seekPromises = [];
355
  for (var i = 0; i < clips.length; i++) {
356
  var el = clips[i];
357
  var st = parseFloat(el.getAttribute('data-start') || '0');
358
  var dur = parseFloat(el.getAttribute('data-duration') || '999999');
359
+ var active = (t >= st && t < st + dur);
360
+ el.style.visibility = active ? 'visible' : 'hidden';
361
+ if (active && el.tagName === 'VIDEO') {
362
+ var localT = Math.max(0, t - st);
363
+ if (el.duration && isFinite(el.duration) && el.duration > 0) {
364
+ localT = localT % el.duration;
365
+ }
366
+ if (Math.abs((el.currentTime || 0) - localT) > 0.02) {
367
+ seekPromises.push(new Promise(function(resolve) {
368
+ var done = false;
369
+ var finish = function() { if (!done) { done = true; resolve(); } };
370
+ el.addEventListener('seeked', finish, { once: true });
371
+ setTimeout(finish, 120);
372
+ try { el.currentTime = localT; } catch (e) { finish(); }
373
+ }));
374
+ }
375
+ }
376
  }
377
  if (window.__timelines && window.__timelines['main']) {
378
  window.__timelines['main'].seek(t, false);
379
  }
380
+ if (seekPromises.length) {
381
+ await Promise.all(seekPromises);
382
+ }
383
+ return true;
384
  };
385
  """
386
  cdp.call("Runtime.evaluate", {"expression": init_js})
 
409
 
410
  for frame_idx in range(total_frames):
411
  t_sec = frame_idx / float(fps)
412
+ cdp.call("Runtime.evaluate", {"expression": f"window.__offlineSeek({t_sec:.5f})", "awaitPromise": True})
413
  shot = cdp.call("Page.captureScreenshot", {"format": "jpeg", "quality": 94})
414
  ff_proc.stdin.write(base64.b64decode(shot["data"]))
415
  if frame_idx % 60 == 0 or frame_idx == total_frames - 1:
pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
 
5
  [project]
6
  name = "deck-video-pipeline"
7
- version = "3.1.0"
8
  description = "Universal PPTX / DOCX / Markdown / HTML / Enterprise-DRM-Bridge to Code-Rendered Motion + SFX MP4 Pipeline"
9
  readme = "README.md"
10
  requires-python = ">=3.10"
 
4
 
5
  [project]
6
  name = "deck-video-pipeline"
7
+ version = "3.2.0"
8
  description = "Universal PPTX / DOCX / Markdown / HTML / Enterprise-DRM-Bridge to Code-Rendered Motion + SFX MP4 Pipeline"
9
  readme = "README.md"
10
  requires-python = ">=3.10"
samples/sample_docu_patent.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ์‚ฌํ›„ ๋””์ง€ํ„ธ ๊ณ„์ • AI ํŠนํ—ˆ์˜ ๋ช…์•”
2
+
3
+ ## 01 ๋‚จ๊ฒจ์ง„ ํ˜‘ํƒ ์œ„์˜ ์Šค๋งˆํŠธํฐ๊ณผ ๊ทธ๋ฆฌ์šด ๋ชฉ์†Œ๋ฆฌ
4
+ [ARCHETYPE: cinema_broll_fullscreen]
5
+ [BADGE: DIGITAL AFTERLIFE DOCUMENTARY]
6
+ > ๊ณ ์ธ์˜ ์ƒ์ „ ๊ธฐ๋ก์„ ํ•™์Šตํ•ด ์‚ฌํ›„์—๋„ ๋Œ€ํ™”๋ฅผ ์ด์–ด๊ฐ€๋Š” ์ธ๊ณต์ง€๋Šฅ ๊ธฐ์ˆ ์ด ํ˜„์‹ค๋กœ ๋‹ค๊ฐ€์™”์Šต๋‹ˆ๋‹ค.
7
+
8
+ ## ๋ฏธ๊ตญ ํŠนํ—ˆ ๋“ฑ๋ก์œผ๋กœ ๋“œ๋Ÿฌ๋‚œ ์‚ฌํ›„ ๊ณ„์ • ์œ ์ง€ ๊ธฐ์ˆ 
9
+ [ARCHETYPE: dossier_stamp_card]
10
+ [BADGE: USPTO REGISTERED PATENT]
11
+ [SOURCE: US Patent 12,513,102 B2 ยท 2025.12]
12
+ [STAMP: PATENT 2025]
13
+ - 01 ๋Œ€์ƒ ๋ฐ์ดํ„ฐ | ์ƒ์ „์— ๋‚จ๊ธด ๊ฒŒ์‹œ๋ฌผยท๋Œ“๊ธ€ยท๋ฉ”์‹œ์ง€ ๊ธฐ๋ก ์ „์ˆ˜ ํ•™์Šต
14
+ - 02 ์Œ์„ฑ ์žฌํ˜„ | ํ†ตํ™” ๋ฐ ์Œ์„ฑ ๋ฉ”์‹œ์ง€๋ฅผ ๋ถ„์„ํ•ด ๋™์ผํ•œ ์–ต์–‘ ๋ณต์›
15
+ - 03 ์ž๋™ ์‘๋‹ต | ์‚ฌ๋ง ์ดํ›„์—๋„ ๊ณ ์ธ์ฒ˜๋Ÿผ ๋ฐ˜์‘ํ•˜๋ฉฐ ๊ณ„์ • ํ™œ๋™ ์ง€์†
16
+ > ๋“ฑ๋ก๋œ ํŠนํ—ˆ ๋ฌธ์„œ์—๋Š” ์ƒ์ „์˜ ๋Œ€ํ™”์™€ ๋ชฉ์†Œ๋ฆฌ๋ฅผ ํ•™์Šตํ•ด ๊ณ ์ธ์ฒ˜๋Ÿผ ๋ฐ˜์‘ํ•˜๋Š” ๊ตฌ์ฒด์ ์ธ ์„ค๊ณ„๊ฐ€ ๋‹ด๊ฒจ ์žˆ์Šต๋‹ˆ๋‹ค. ๋น„๋‚œ ์—ฌ๋ก ์ด ์ผ์ž ๊ธฐ์—… ์ธก์€ ๊ณง๋ฐ”๋กœ ํ•ด๋ช…์— ๋‚˜์„ฐ์Šต๋‹ˆ๋‹ค.
17
+
18
+ ## ํŠนํ—ˆ ํŒŒ์žฅ์— ๋Œ€ํ•œ ๊ธฐ์—… ์ธก ๊ณต์‹ ํ•ด๋ช…๊ณผ ์‹œ์žฅ ํ˜„์‹ค
19
+ [ARCHETYPE: dossier_stamp_card]
20
+ [BADGE: OFFICIAL STATEMENT ยท ๊ธฐ์—… ์ธก ๊ณต์‹ ์ž…์žฅ]
21
+ [STAMP: ๊ฐœ๋ฐœ ๊ณ„ํš ์—†์Œ]
22
+ - ์—ฌ๋ก  ๋ฐ˜์‘ | ์œ ์กฑ์˜ ๊ทธ๋ฆฌ์›€์„ ์ƒ์—…์ ์œผ๋กœ ์ด์šฉํ•œ๋‹ค๋Š” ์šฐ๋ ค ํ™•์‚ฐ
23
+ - ํšŒ์‚ฌ ๋ฐœํ‘œ | ํŠนํ—ˆ๋งŒ ๋“ฑ๋กํ–ˆ์„ ๋ฟ ์‹ค์ œ ์ถœ์‹œ ๊ณ„ํš์€ ์—†๋‹ค๊ณ  ์„  ๊ทธ์Œ
24
+ - ์‹œ์žฅ ํ˜„์‹ค | ์ด๋ฏธ ํ•ด์™ธ์—์„œ๋Š” ์œ ๋ฃŒ ์ถ”๋ชจ AI ๊ตฌ๋… ์„œ๋น„์Šค๊ฐ€ ์„ฑ์—… ์ค‘
25
+ > ํšŒ์‚ฌ ์ธก์€ ์ƒ์šฉํ™” ๊ณ„ํš์ด ์—†๋‹ค๊ณ  ๋ฐํ˜”์ง€๋งŒ ์ด๋ฏธ ๋ฐ”๊นฅ ์‹œ์žฅ์—์„œ๋Š” ์œ ๋ฃŒ ์ถ”๋ชจ ์„œ๋น„์Šค๊ฐ€ ๋น ๋ฅด๊ฒŒ ๋ฒˆ์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋งŒ์•ฝ ๋งค๋‹ฌ ๊ตฌ๋…๋ฃŒ๋ฅผ ๋‚ด์•ผ๋งŒ ๊ฐ€์กฑ์˜ ๋ชฉ์†Œ๋ฆฌ๋ฅผ ๋“ค์„ ์ˆ˜ ์žˆ๋‹ค๋ฉด ์–ด๋–จ๊นŒ์š”?
26
+
27
+ ## ์„œ๋ฒ„ ๊ตฌ๋… ์˜์ˆ˜์ฆ vs ๊ฐ€์Šด ์† ์ง„์งœ ๊ธฐ์–ต
28
+ [ARCHETYPE: vs_comparison]
29
+ - ๋งค๋‹ฌ ์ž๋™ ๊ฒฐ์ œ ์ฒญ๊ตฌ | ์„œ๋ฒ„ ์† ๋””์ง€ํ„ธ ๊ทธ๋ฆผ์ž ์œ ์ง€
30
+ - ๊ตฌ๋… ํ•ด์ง€ ์‹œ ์ฃ„์ฑ…๊ฐ | ์œ ์กฑ์˜ ๊ฐ์ •์ด ์š”๊ธˆ์ œ์— ์ข…์†๋˜๋Š” ๊ตฌ์กฐ
31
+ - ๋””์ง€ํ„ธ ์ž‘๋ณ„ ์ ˆ์ฐจ ํ•„์š” | ์ƒ์ „ ๋™์˜์™€ ์กด์—„ํ•œ ๋งˆ๋ฌด๋ฆฌ๊ฐ€ ์šฐ์„ 
32
+ > ์‚ฌ๋ž‘ํ•˜๋Š” ์‚ฌ๋žŒ์„ ๊ธฐ์–ตํ•˜๋Š” ์ผ๋งˆ์ € ๋งค๋‹ฌ ๊ฒฐ์ œํ•˜๋Š” ๊ตฌ๋… ์„œ๋น„์Šค์— ๋งก๊ฒจ๋„ ๊ดœ์ฐฎ์„์ง€ ๊นŠ์ด ๊ณ ๋ฏผํ•ด์•ผ ํ•  ์‹œ์ ์ž…๋‹ˆ๋‹ค.
themes_and_presets.py CHANGED
@@ -174,6 +174,7 @@ BACKGROUND_PRESETS: dict[str, dict[str, Any]] = {
174
  HUD_STYLES: dict[str, str] = {
175
  "chapter_tabs": "์ƒ๋‹จ ๋‹ค์ค‘ ์ฑ•ํ„ฐ ์ง„ํ–‰ ๊ฒŒ์ด์ง€ ํƒญ ๋ฐ” (์ซ‘๋Œ€ํ‘œ์˜ ๋”ธ๊น์ผ๊ธฐ ์Šคํƒ€์ผ ยท ๊ธฐ๋ณธ)",
176
  "tech_briefing": "์ขŒ์ƒ๋‹จ ํ„ฐ๋ฏธ๋„ ๋ธŒ๋ฆฌํ•‘ ํ—ค๋” + 4์ฝ”๋„ˆ ๋ทฐํŒŒ์ธ๋” ๋ธŒ๋ž˜ํ‚ท + ํ•˜๋‹จ ์ถœ์ฒ˜ ๊ฐ์ฃผ (ITํ†กํ†ก ์Šคํƒ€์ผ)",
 
177
  "minimal": "์ƒ๋‹จ HUD ์—†์ด ๊น”๋”ํ•œ ํ’€์Šคํฌ๋ฆฐ ์Šคํ…Œ์ด์ง€",
178
  }
179
 
@@ -182,7 +183,7 @@ CAPTION_STYLES: dict[str, str] = {
182
  "glass_dual": "๋ฐ˜ํˆฌ๋ช… ๊ธ€๋ž˜์Šค ๋ฐ•์Šค + ํ•œยท์˜ ์ด์ค‘ ์ž๋ง‰ (๊ธฐ๋ณธ ๋ ˆํผ๋Ÿฐ์Šค ์Šคํƒ€์ผ)",
183
  "briefing_clean": "ํ•˜๋‹จ ๋‹คํฌ ์™€์ด๋“œ ๋ฐ” + ์„ ๋ช…ํ•œ ๋‹จ์ผ/์ด์ค‘ ์ž๋ง‰ (ITํ†กํ†ก ํ…Œํฌ ๋ธŒ๋ฆฌํ•‘ ์Šคํƒ€์ผ)",
184
  "pill_karaoke": "์‹ค์‹œ๊ฐ„ ๋‹จ์–ด๋ณ„ ๋„ค์˜จ ์•Œ์•ฝ(Pill) ํ•˜์ด๋ผ์ดํŠธ ๋…ธ๋ž˜๋ฐฉ ์ž๋ง‰ (2026 ํŠธ๋ Œ๋“œ)",
185
- "cinema_minimal": "๋ฐ•์Šค ์—†๋Š” ๋„ทํ”Œ๋ฆญ์Šคยท์• ํ”Œ ๋‹คํ๋ฉ˜ํ„ฐ๋ฆฌ ์Šคํƒ€์ผ ์‹œ๋„ค๋งˆ ์ž๋ง‰",
186
  "neon_bar_left": "์ขŒ์ธก ๋„ค์˜จ ํฌ์ธํŠธ ๋ฐ” + ๋ฐฉ์†ก ๋‰ด์Šคยทํ…Œํฌ ๋ธŒ๋ฆฌํ•‘ ๋กœ์›Œ์„œ๋“œ ์ž๋ง‰",
187
  "kinetic_pop": "์Šคํ”„๋ง ํŒ์—… + ์ˆซ์žยทํ•ต์‹ฌ์–ด ์ž๋™ ์ปฌ๋Ÿฌ ๊ฐ•์กฐ ๋‹ค์ด๋‚˜๋ฏน ์ž๋ง‰",
188
  }
@@ -191,6 +192,8 @@ CAPTION_STYLES: dict[str, str] = {
191
  SCENE_ARCHETYPES: dict[str, str] = {
192
  "hero_3d_briefing": "3D ์™€์ด์–ดํ”„๋ ˆ์ž„ ์˜คํ”„๋‹ ํƒ€์ดํ‹€ + ์ปฌ๋Ÿฌ ํ† ํ”ฝ ์•Œ์•ฝ ํƒœ๊ทธ (ITํ†กํ†ก ์˜คํ”„๋‹ ์Šคํƒ€์ผ)",
193
  "media_showcase_split": "์ขŒ์ธก ๋Œ€ํ˜• ํ‚ค์›Œ๋“œ & ํ…์ŠคํŠธ ์Šคํฌ๋žจ๋ธ” + ์šฐ์ธก ์‹ค์ œ ์˜์ƒ/์ด๋ฏธ์ง€ ๋„ค์˜จ ํ”„๋ ˆ์ž„ (ITํ†กํ†ก ์‹œ์—ฐ ์Šคํƒ€์ผ)",
 
 
194
  "changelog_vertical": "๋‚ ์งœยท๋ฒ„์ „๋ณ„ ์ปฌ๋Ÿฌ ํƒ€์ž„๋ผ์ธ ์ŠคํŒŒ์ธ + ์ˆœ์ฐจ ๋ณ€๊ฒฝ ๋กœ๊ทธ (ITํ†กํ†ก ์—…๋ฐ์ดํŠธ ์ •๋ฆฌ ์Šคํƒ€์ผ)",
195
  "mission_staircase": "5์ƒ‰ ๋ฏธ์…˜ ๋ฆฌ์ŠคํŠธ + ์šฐ์ธก 3D ์•„์ด์†Œ๋ฉ”ํŠธ๋ฆญ ์ƒ์Šน ๊ณ„๋‹จ ๋ธ”๋ก (ITํ†กํ†ก ๋ฏธ์…˜ 5๋‹จ๊ณ„ ์Šคํƒ€์ผ)",
196
  "swarm_network": "์ค‘์•™ ์ฝ”๋””๋„ค์ดํ„ฐ ํ—ˆ๋ธŒ & ๋ฉ€ํ‹ฐ ์—์ด์ „ํŠธ ์›Œ์ปค ์Šคํฌํฌ ๋„คํŠธ์›Œํฌ ๊ทธ๋ž˜ํ”„ (/swarm ์Šคํƒ€์ผ)",
 
174
  HUD_STYLES: dict[str, str] = {
175
  "chapter_tabs": "์ƒ๋‹จ ๋‹ค์ค‘ ์ฑ•ํ„ฐ ์ง„ํ–‰ ๊ฒŒ์ด์ง€ ํƒญ ๋ฐ” (์ซ‘๋Œ€ํ‘œ์˜ ๋”ธ๊น์ผ๊ธฐ ์Šคํƒ€์ผ ยท ๊ธฐ๋ณธ)",
176
  "tech_briefing": "์ขŒ์ƒ๋‹จ ํ„ฐ๋ฏธ๋„ ๋ธŒ๋ฆฌํ•‘ ํ—ค๋” + 4์ฝ”๋„ˆ ๋ทฐํŒŒ์ธ๋” ๋ธŒ๋ž˜ํ‚ท + ํ•˜๋‹จ ์ถœ์ฒ˜ ๊ฐ์ฃผ (ITํ†กํ†ก ์Šคํƒ€์ผ)",
177
+ "docu_watermark": "์ƒ๋‹จ ์Šฌ๋ฆผ ์ง„ํ–‰ ๋ฐ” + ์šฐ์ธก ์ƒ๋‹จ 2์ค„ ์ฑ„๋„ ์›Œํ„ฐ๋งˆํฌ (์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ ๋‹คํ๋ฉ˜ํ„ฐ๋ฆฌ ์Šคํƒ€์ผ)",
178
  "minimal": "์ƒ๋‹จ HUD ์—†์ด ๊น”๋”ํ•œ ํ’€์Šคํฌ๋ฆฐ ์Šคํ…Œ์ด์ง€",
179
  }
180
 
 
183
  "glass_dual": "๋ฐ˜ํˆฌ๋ช… ๊ธ€๋ž˜์Šค ๋ฐ•์Šค + ํ•œยท์˜ ์ด์ค‘ ์ž๋ง‰ (๊ธฐ๋ณธ ๋ ˆํผ๋Ÿฐ์Šค ์Šคํƒ€์ผ)",
184
  "briefing_clean": "ํ•˜๋‹จ ๋‹คํฌ ์™€์ด๋“œ ๋ฐ” + ์„ ๋ช…ํ•œ ๋‹จ์ผ/์ด์ค‘ ์ž๋ง‰ (ITํ†กํ†ก ํ…Œํฌ ๋ธŒ๋ฆฌํ•‘ ์Šคํƒ€์ผ)",
185
  "pill_karaoke": "์‹ค์‹œ๊ฐ„ ๋‹จ์–ด๋ณ„ ๋„ค์˜จ ์•Œ์•ฝ(Pill) ํ•˜์ด๋ผ์ดํŠธ ๋…ธ๋ž˜๋ฐฉ ์ž๋ง‰ (2026 ํŠธ๋ Œ๋“œ)",
186
+ "cinema_minimal": "๋‹คํ๋ฉ˜ํ„ฐ๋ฆฌยท์˜ํ™” ์Šคํƒ€์ผ ๋ธ”๋ž™ ๋ฐ˜ํˆฌ๋ช… ์‹œ๋„ค๋งˆ ์ž๋ง‰ (์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ ์Šคํƒ€์ผ)",
187
  "neon_bar_left": "์ขŒ์ธก ๋„ค์˜จ ํฌ์ธํŠธ ๋ฐ” + ๋ฐฉ์†ก ๋‰ด์Šคยทํ…Œํฌ ๋ธŒ๋ฆฌํ•‘ ๋กœ์›Œ์„œ๋“œ ์ž๋ง‰",
188
  "kinetic_pop": "์Šคํ”„๋ง ํŒ์—… + ์ˆซ์žยทํ•ต์‹ฌ์–ด ์ž๋™ ์ปฌ๋Ÿฌ ๊ฐ•์กฐ ๋‹ค์ด๋‚˜๋ฏน ์ž๋ง‰",
189
  }
 
192
  SCENE_ARCHETYPES: dict[str, str] = {
193
  "hero_3d_briefing": "3D ์™€์ด์–ดํ”„๋ ˆ์ž„ ์˜คํ”„๋‹ ํƒ€์ดํ‹€ + ์ปฌ๋Ÿฌ ํ† ํ”ฝ ์•Œ์•ฝ ํƒœ๊ทธ (ITํ†กํ†ก ์˜คํ”„๋‹ ์Šคํƒ€์ผ)",
194
  "media_showcase_split": "์ขŒ์ธก ๋Œ€ํ˜• ํ‚ค์›Œ๋“œ & ํ…์ŠคํŠธ ์Šคํฌ๋žจ๋ธ” + ์šฐ์ธก ์‹ค์ œ ์˜์ƒ/์ด๋ฏธ์ง€ ๋„ค์˜จ ํ”„๋ ˆ์ž„ (ITํ†กํ†ก ์‹œ์—ฐ ์Šคํƒ€์ผ)",
195
+ "cinema_broll_fullscreen": "ํ’€์Šคํฌ๋ฆฐ ์‹œ๋„ค๋งˆํ‹ฑ ์˜์ƒ/์‚ฌ์ง„ B-Roll + ๋น„๋„คํŒ… & ์ผ„๋ฒˆ์ฆˆ ์คŒ (์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ ๊ต์ฐจํŽธ์ง‘ ์Šคํƒ€์ผ)",
196
+ "dossier_stamp_card": "ํฌ๋ž˜ํ”„ํŠธ ์„œ๋ฅ˜์ฒ ยทํŠนํ—ˆ ๋ฌธ์„œ ์นด๋“œ + ๊ณ ๋ฌด๋„์žฅ ์Šคํƒฌํ”„ ํƒ€๊ฒฉ ๋ชจ์…˜ (์„ค๋ช…์ข‹์•„ํ•˜๋Š”์•„์ €์”จ ๋ฌธ์„œ ์Šคํƒ€์ผ)",
197
  "changelog_vertical": "๋‚ ์งœยท๋ฒ„์ „๋ณ„ ์ปฌ๋Ÿฌ ํƒ€์ž„๋ผ์ธ ์ŠคํŒŒ์ธ + ์ˆœ์ฐจ ๋ณ€๊ฒฝ ๋กœ๊ทธ (ITํ†กํ†ก ์—…๋ฐ์ดํŠธ ์ •๋ฆฌ ์Šคํƒ€์ผ)",
198
  "mission_staircase": "5์ƒ‰ ๋ฏธ์…˜ ๋ฆฌ์ŠคํŠธ + ์šฐ์ธก 3D ์•„์ด์†Œ๋ฉ”ํŠธ๋ฆญ ์ƒ์Šน ๊ณ„๋‹จ ๋ธ”๋ก (ITํ†กํ†ก ๋ฏธ์…˜ 5๋‹จ๊ณ„ ์Šคํƒ€์ผ)",
199
  "swarm_network": "์ค‘์•™ ์ฝ”๋””๋„ค์ดํ„ฐ ํ—ˆ๋ธŒ & ๋ฉ€ํ‹ฐ ์—์ด์ „ํŠธ ์›Œ์ปค ์Šคํฌํฌ ๋„คํŠธ์›Œํฌ ๊ทธ๋ž˜ํ”„ (/swarm ์Šคํƒ€์ผ)",
tts_timeline.py CHANGED
@@ -5,6 +5,7 @@ Works identically on Windows, macOS, and Linux โ€” both ONLINE and OFFLINE.
5
  """
6
 
7
  from __future__ import annotations
 
8
  import hashlib
9
  import os
10
  import platform
@@ -50,13 +51,35 @@ def probe_duration(media_path: Path) -> float:
50
  return max(0.2, round(float(res.stdout.strip()), 3))
51
 
52
 
53
- def _synth_offline_os_tts(text: str, raw_audio_out: Path) -> bool:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  """
55
  Attempts OS-native 100% offline TTS synthesis:
56
  - macOS: `/usr/bin/say -v Yuna` (Korean)
57
- - Windows: PowerShell `System.Speech.Synthesis.SpeechSynthesizer`
 
58
  - Linux: `espeak-ng -v ko`
59
- Returns True if speech audio was written, False otherwise.
60
  """
61
  system = platform.system().lower()
62
  try:
@@ -68,42 +91,108 @@ def _synth_offline_os_tts(text: str, raw_audio_out: Path) -> bool:
68
  )
69
  if res.returncode != 0:
70
  subprocess.run(["/usr/bin/say", "-o", str(aiff_tmp), text], check=True, capture_output=True)
71
- if aiff_tmp.exists() and aiff_tmp.stat().st_size > 500:
72
  aiff_tmp.replace(raw_audio_out)
73
  return True
 
74
 
75
  elif system == "windows":
76
- wav_tmp = raw_audio_out.with_suffix(".wav")
77
- escaped = text.replace("'", "''")
78
- ps_script = (
79
- "Add-Type -AssemblyName System.Speech; "
80
- "$s = New-Object System.Speech.Synthesis.SpeechSynthesizer; "
81
- "try { $s.SelectVoiceByHints([System.Speech.Synthesis.VoiceGender]::NotSet, "
82
- "[System.Speech.Synthesis.VoiceAge]::NotSet, 0, [System.Globalization.CultureInfo]::GetCultureInfo('ko-KR')) } catch {}; "
83
- f"$s.SetOutputToWaveFile('{wav_tmp}'); "
84
- f"$s.Speak('{escaped}'); $s.Dispose();"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  )
86
- subprocess.run(["powershell", "-NoProfile", "-Command", ps_script], check=True, capture_output=True)
87
- if wav_tmp.exists() and wav_tmp.stat().st_size > 500:
88
  wav_tmp.replace(raw_audio_out)
89
  return True
 
90
 
91
  else:
92
  espeak = shutil.which("espeak-ng") or shutil.which("espeak")
93
  if espeak:
94
  wav_tmp = raw_audio_out.with_suffix(".wav")
95
  subprocess.run([espeak, "-v", "ko", "-s", "165", "-w", str(wav_tmp), text], check=True, capture_output=True)
96
- if wav_tmp.exists() and wav_tmp.stat().st_size > 500:
97
  wav_tmp.replace(raw_audio_out)
98
  return True
 
99
  except Exception as exc:
100
  print(f"[Offline TTS Warning] OS voice fallback error: {exc}")
101
  return False
102
 
103
 
 
 
 
104
  def _synth_silent_timed_wav(text: str, wav_out: Path) -> None:
105
- """Last-resort silent pacing track (approx 0.14s per character, min 2.2s) if headless Linux has no TTS."""
106
- dur = max(2.2, min(8.0, len(text.strip()) * 0.14))
 
 
 
 
 
 
 
107
  sr = 48000
108
  pcm = np.zeros((int(sr * dur), 2), dtype=np.int16)
109
  with wave.open(str(wav_out), "wb") as wf:
@@ -126,6 +215,7 @@ def synthesize_beat_tts(
126
 
127
  if not out_mp3.exists() or out_mp3.stat().st_size < 500:
128
  used_online = False
 
129
  if not offline:
130
  try:
131
  raw_mp3 = out_mp3.with_suffix(".raw.mp3")
@@ -137,31 +227,40 @@ def synthesize_beat_tts(
137
  "--write-media", str(raw_mp3),
138
  ]
139
  subprocess.run(cmd_tts, check=True, capture_output=True, timeout=20)
140
- raw_mp3.replace(raw_src)
141
- used_online = True
 
 
 
 
142
  except Exception as exc:
143
  print(f"[TTS Info] Online Edge-TTS unavailable ({type(exc).__name__}); switching to offline OS TTS.")
144
 
145
  if not used_online:
146
- if not _synth_offline_os_tts(text, raw_src):
 
 
147
  _synth_silent_timed_wav(text, raw_src)
148
 
149
- cmd_trim = [
150
- ffmpeg_bin, "-y",
151
- "-i", str(raw_src),
152
- "-af", (
153
- "silenceremove=start_periods=1:start_duration=0.03:start_threshold=-45dB,"
154
- "areverse,silenceremove=start_periods=1:start_duration=0.05:start_threshold=-45dB,areverse"
155
- ),
156
- "-ar", "48000",
157
- "-ac", "2",
158
- "-c:a", "libmp3lame",
159
- "-b:a", "192k",
160
- str(out_mp3),
161
- ]
162
- res = subprocess.run(cmd_trim, capture_output=True)
163
- if res.returncode != 0 or not out_mp3.exists() or out_mp3.stat().st_size < 300:
164
- # In case silenceremove trimmed an all-silent fallback track completely
 
 
 
165
  subprocess.run(
166
  [ffmpeg_bin, "-y", "-i", str(raw_src), "-ar", "48000", "-ac", "2", "-c:a", "libmp3lame", "-b:a", "192k", str(out_mp3)],
167
  check=True,
@@ -222,7 +321,7 @@ def build_audio_and_timeline(
222
  })
223
 
224
  enriched_beats = []
225
- mode_tag = "offline" if offline else voice
226
  for b_idx, beat in enumerate(slide["beats"]):
227
  text_hash = hashlib.md5(f"{mode_tag}:{rate}:{beat['narration']}".encode("utf-8")).hexdigest()[:8]
228
  fname = f"s{s_idx + 1:02d}_b{b_idx + 1:02d}_{text_hash}.mp3"
@@ -291,6 +390,25 @@ def build_audio_and_timeline(
291
  "duration": sfx_durations["pulse"],
292
  "volume": 0.28,
293
  })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
  elif arch in ("changelog_vertical", "mission_staircase", "pricing_matrix", "swarm_network"):
295
  for r_i in range(min(4, max(2, len(enriched_beats)))):
296
  sfx_events.append({
 
5
  """
6
 
7
  from __future__ import annotations
8
+ import base64
9
  import hashlib
10
  import os
11
  import platform
 
51
  return max(0.2, round(float(res.stdout.strip()), 3))
52
 
53
 
54
+ def _has_audible_speech(ffmpeg_bin: str, audio_file: Path) -> bool:
55
+ """Verify the synthesized audio actually contains audible voice waveform (not an empty/silent WAV)."""
56
+ if not audio_file.exists() or audio_file.stat().st_size < 500:
57
+ return False
58
+ try:
59
+ res = subprocess.run(
60
+ [ffmpeg_bin, "-v", "error", "-i", str(audio_file), "-f", "s16le", "-acodec", "pcm_s16le", "-ar", "16000", "-ac", "1", "-"],
61
+ capture_output=True,
62
+ check=True,
63
+ timeout=10,
64
+ )
65
+ samples = np.frombuffer(res.stdout, dtype=np.int16).astype(np.float32) / 32768.0
66
+ if len(samples) < int(16000 * 0.28):
67
+ return False
68
+ rms = float(np.sqrt(np.mean(samples * samples)))
69
+ peak = float(np.max(np.abs(samples)))
70
+ return rms >= 0.002 and peak >= 0.015
71
+ except Exception:
72
+ return False
73
+
74
+
75
+ def _synth_offline_os_tts(text: str, raw_audio_out: Path, ffmpeg_bin: str) -> bool:
76
  """
77
  Attempts OS-native 100% offline TTS synthesis:
78
  - macOS: `/usr/bin/say -v Yuna` (Korean)
79
+ - Windows: 1) SAPI.SpVoice + Speech_OneCore (Windows 10/11 Korean OneCore voices like Heami)
80
+ 2) System.Speech.Synthesis verified ko-KR voice (UTF-16LE -EncodedCommand, zero escaping bugs)
81
  - Linux: `espeak-ng -v ko`
82
+ Returns True ONLY if audible speech waveform was written, False otherwise.
83
  """
84
  system = platform.system().lower()
85
  try:
 
91
  )
92
  if res.returncode != 0:
93
  subprocess.run(["/usr/bin/say", "-o", str(aiff_tmp), text], check=True, capture_output=True)
94
+ if _has_audible_speech(ffmpeg_bin, aiff_tmp):
95
  aiff_tmp.replace(raw_audio_out)
96
  return True
97
+ aiff_tmp.unlink(missing_ok=True)
98
 
99
  elif system == "windows":
100
+ wav_tmp = raw_audio_out.with_suffix(".wav").resolve()
101
+ txt_tmp = raw_audio_out.with_suffix(".tts.txt").resolve()
102
+ txt_tmp.write_text(text, encoding="utf-8")
103
+ ps_code = f"""
104
+ $ErrorActionPreference = 'Stop'
105
+ $txt = [System.IO.File]::ReadAllText('{str(txt_tmp).replace("'", "''")}', [System.Text.Encoding]::UTF8)
106
+ $outWav = '{str(wav_tmp).replace("'", "''")}'
107
+ $done = $false
108
+
109
+ # 1. Try Windows 10/11 Speech_OneCore COM tokens (finds Microsoft Heami OneCore even when Desktop SAPI5 lacks ko-KR!)
110
+ try {{
111
+ $voice = New-Object -ComObject SAPI.SpVoice
112
+ $selected = $null
113
+ foreach ($catPath in @('HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech_OneCore\\Voices', 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices')) {{
114
+ try {{
115
+ $cat = New-Object -ComObject SAPI.SpObjectTokenCategory
116
+ $cat.SetId($catPath, $false)
117
+ foreach ($tok in $cat.EnumerateTokens()) {{
118
+ $lang = ''
119
+ try {{ $lang = $tok.GetAttribute('Language') }} catch {{}}
120
+ $desc = $tok.GetDescription()
121
+ if ($lang -eq '412' -or $desc -match 'Korean|Heami|SunHi|ํ•œ๊ตญ์–ด') {{
122
+ $selected = $tok
123
+ break
124
+ }}
125
+ }}
126
+ }} catch {{}}
127
+ if ($selected -ne $null) {{ break }}
128
+ }}
129
+ if ($selected -ne $null) {{
130
+ $voice.Voice = $selected
131
+ $voice.Rate = 1
132
+ $stream = New-Object -ComObject SAPI.SpFileStream
133
+ $stream.Open($outWav, 3, $false)
134
+ $voice.AudioOutputStream = $stream
135
+ [void]$voice.Speak($txt)
136
+ $stream.Close()
137
+ $done = $true
138
+ }}
139
+ }} catch {{}}
140
+
141
+ # 2. Fallback: .NET System.Speech ONLY if an installed voice supports Korean (prevents English Zira silent skip!)
142
+ if (-not $done) {{
143
+ try {{
144
+ Add-Type -AssemblyName System.Speech
145
+ $s = New-Object System.Speech.Synthesis.SpeechSynthesizer
146
+ $ko = $s.GetInstalledVoices() | Where-Object {{ $_.Enabled -and ($_.VoiceInfo.Culture.Name -like 'ko*') }} | Select-Object -First 1
147
+ if ($ko -ne $null) {{
148
+ $s.SelectVoice($ko.VoiceInfo.Name)
149
+ $s.Rate = 1
150
+ $s.SetOutputToWaveFile($outWav)
151
+ $s.Speak($txt)
152
+ }}
153
+ $s.Dispose()
154
+ }} catch {{}}
155
+ }}
156
+ """
157
+ encoded_cmd = base64.b64encode(ps_code.encode("utf-16le")).decode("ascii")
158
+ subprocess.run(
159
+ ["powershell", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-EncodedCommand", encoded_cmd],
160
+ capture_output=True,
161
+ timeout=25,
162
  )
163
+ txt_tmp.unlink(missing_ok=True)
164
+ if _has_audible_speech(ffmpeg_bin, wav_tmp):
165
  wav_tmp.replace(raw_audio_out)
166
  return True
167
+ wav_tmp.unlink(missing_ok=True)
168
 
169
  else:
170
  espeak = shutil.which("espeak-ng") or shutil.which("espeak")
171
  if espeak:
172
  wav_tmp = raw_audio_out.with_suffix(".wav")
173
  subprocess.run([espeak, "-v", "ko", "-s", "165", "-w", str(wav_tmp), text], check=True, capture_output=True)
174
+ if _has_audible_speech(ffmpeg_bin, wav_tmp):
175
  wav_tmp.replace(raw_audio_out)
176
  return True
177
+ wav_tmp.unlink(missing_ok=True)
178
  except Exception as exc:
179
  print(f"[Offline TTS Warning] OS voice fallback error: {exc}")
180
  return False
181
 
182
 
183
+ _WARNED_SILENT_FALLBACK = False
184
+
185
+
186
  def _synth_silent_timed_wav(text: str, wav_out: Path) -> None:
187
+ """Last-resort silent pacing track (approx 0.16s per character, min 2.6s) if OS lacks Korean TTS pack."""
188
+ global _WARNED_SILENT_FALLBACK
189
+ if not _WARNED_SILENT_FALLBACK:
190
+ print(
191
+ "[Offline TTS Notice] OS์— ํ•œ๊ตญ์–ด ์˜คํ”„๋ผ์ธ ์Œ์„ฑ ํŒฉ(Windows ์„ค์ • -> ์‹œ๊ฐ„ ๋ฐ ์–ธ์–ด -> ์Œ์„ฑ -> ํ•œ๊ตญ์–ด ์ถ”๊ฐ€)์ด ์—†์–ด "
192
+ "์ž์—ฐ์Šค๋Ÿฌ์šด ์ฝ๊ธฐ ์†๋„(์Šฌ๋ผ์ด๋“œ๋‹น 3~7์ดˆ) ์ž๋ง‰ ํƒ€์ด๋ฐ ํŠธ๋ž™์œผ๋กœ ์ง„ํ–‰ํ•ฉ๋‹ˆ๋‹ค."
193
+ )
194
+ _WARNED_SILENT_FALLBACK = True
195
+ dur = max(2.6, min(8.0, len(text.strip()) * 0.16))
196
  sr = 48000
197
  pcm = np.zeros((int(sr * dur), 2), dtype=np.int16)
198
  with wave.open(str(wav_out), "wb") as wf:
 
215
 
216
  if not out_mp3.exists() or out_mp3.stat().st_size < 500:
217
  used_online = False
218
+ used_audible_tts = False
219
  if not offline:
220
  try:
221
  raw_mp3 = out_mp3.with_suffix(".raw.mp3")
 
227
  "--write-media", str(raw_mp3),
228
  ]
229
  subprocess.run(cmd_tts, check=True, capture_output=True, timeout=20)
230
+ if _has_audible_speech(ffmpeg_bin, raw_mp3):
231
+ raw_mp3.replace(raw_src)
232
+ used_online = True
233
+ used_audible_tts = True
234
+ else:
235
+ raw_mp3.unlink(missing_ok=True)
236
  except Exception as exc:
237
  print(f"[TTS Info] Online Edge-TTS unavailable ({type(exc).__name__}); switching to offline OS TTS.")
238
 
239
  if not used_online:
240
+ if _synth_offline_os_tts(text, raw_src, ffmpeg_bin):
241
+ used_audible_tts = True
242
+ else:
243
  _synth_silent_timed_wav(text, raw_src)
244
 
245
+ if used_audible_tts:
246
+ cmd_trim = [
247
+ ffmpeg_bin, "-y",
248
+ "-i", str(raw_src),
249
+ "-af", (
250
+ "silenceremove=start_periods=1:start_duration=0.03:start_threshold=-45dB,"
251
+ "areverse,silenceremove=start_periods=1:start_duration=0.05:start_threshold=-45dB,areverse"
252
+ ),
253
+ "-ar", "48000",
254
+ "-ac", "2",
255
+ "-c:a", "libmp3lame",
256
+ "-b:a", "192k",
257
+ str(out_mp3),
258
+ ]
259
+ res = subprocess.run(cmd_trim, capture_output=True)
260
+ else:
261
+ res = None
262
+
263
+ if res is None or res.returncode != 0 or not out_mp3.exists() or out_mp3.stat().st_size < 500:
264
  subprocess.run(
265
  [ffmpeg_bin, "-y", "-i", str(raw_src), "-ar", "48000", "-ac", "2", "-c:a", "libmp3lame", "-b:a", "192k", str(out_mp3)],
266
  check=True,
 
321
  })
322
 
323
  enriched_beats = []
324
+ mode_tag = "offline_v32" if offline else voice
325
  for b_idx, beat in enumerate(slide["beats"]):
326
  text_hash = hashlib.md5(f"{mode_tag}:{rate}:{beat['narration']}".encode("utf-8")).hexdigest()[:8]
327
  fname = f"s{s_idx + 1:02d}_b{b_idx + 1:02d}_{text_hash}.mp3"
 
390
  "duration": sfx_durations["pulse"],
391
  "volume": 0.28,
392
  })
393
+ elif arch == "dossier_stamp_card":
394
+ if "page_flip" in sfx_map:
395
+ sfx_events.append({
396
+ "id": f"sfx-flip-dos-s{s_idx + 1}",
397
+ "kind": "page_flip",
398
+ "src": f"assets/audio/sfx/{sfx_map['page_flip'].name}",
399
+ "start": round(slide_start + 0.14, 3),
400
+ "duration": sfx_durations["page_flip"],
401
+ "volume": 0.30,
402
+ })
403
+ if "pulse" in sfx_map:
404
+ sfx_events.append({
405
+ "id": f"sfx-stamp-dos-s{s_idx + 1}",
406
+ "kind": "pulse",
407
+ "src": f"assets/audio/sfx/{sfx_map['pulse'].name}",
408
+ "start": round(slide_start + 0.65, 3),
409
+ "duration": sfx_durations["pulse"],
410
+ "volume": 0.36,
411
+ })
412
  elif arch in ("changelog_vertical", "mission_staircase", "pricing_matrix", "swarm_network"):
413
  for r_i in range(min(4, max(2, len(enriched_beats)))):
414
  sfx_events.append({