$npx -y skills add tody-agent/codymaster --skill cm-video-factoryPrivate Code-to-Video Engine using Remotion React, TTS (ElevenLabs/OpenAI), and Content Mastery. Creates pure VibeCoding-style animations for TikTok/Shorts/Reels automatically.
| 1 | # CM Video Factory v2.0 — Mass Video Production Engine (Private) |
| 2 | |
| 3 | A self-hosted, batch-capable video factory built on **Remotion React** (code-to-video). |
| 4 | Scripts → TTS → Subtitles → Render → Policy Check → Publish. |
| 5 | |
| 6 | Dual format: **9:16 vertical** (TikTok/Shorts/Reels) + **16:9 horizontal** (YouTube). |
| 7 | Dual language: **Vietnamese** (VieNeu-TTS) + **English** (ElevenLabs/OpenAI). |
| 8 | |
| 9 | Spiritual twin of `cm-content-factory`, focused on Short-Form + Long-Form video at scale. |
| 10 | |
| 11 | --- |
| 12 | |
| 13 | ## Core Philosophy |
| 14 | |
| 15 | - **Video is Math, Not Art.** React components define every frame. JSON scripts define every word. |
| 16 | - **VibeCoding Aesthetic.** Dark SaaS visuals, cyan `#00F0FF` glow, `Fira Code`, engineering UI motifs. |
| 17 | - **Content Mastery DNA.** Every script uses SB7, Cialdini, Hook Formulas. No boring "Hello guys" intros. |
| 18 | - **Batch-First.** One command renders 10+ videos overnight. Queue, progress, retry, resume. |
| 19 | - **Policy-Safe.** Built-in guardrails prevent shadowbans, demonetization, and content strikes. |
| 20 | |
| 21 | --- |
| 22 | |
| 23 | ## Architecture |
| 24 | |
| 25 | ``` |
| 26 | ┌─────────────────────────────────────────────────────────────┐ |
| 27 | │ 📹 CM VIDEO FACTORY v2.0 │ |
| 28 | │ Batch Code-to-Video Production Engine │ |
| 29 | ├─────────────────────────────────────────────────────────────┤ |
| 30 | │ │ |
| 31 | │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌────────┐ │ |
| 32 | │ │ SCRIPT │──▶│ TTS │──▶│ SUBTITLE │──▶│ RENDER │ │ |
| 33 | │ │ Generator│ │ Engine │ │ @remotion/│ │ Engine │ │ |
| 34 | │ │ (JSON) │ │ VieNeu + │ │ captions │ │ Batch │ │ |
| 35 | │ │ CM hooks │ │ ElevenL │ │ SRT+JSON │ │ Queue │ │ |
| 36 | │ └──────────┘ └──────────┘ └──────────┘ └────────┘ │ |
| 37 | │ │ │ │ │ │ |
| 38 | │ ┌────┴──────────────┴──────────────┴──────────────┴────┐ │ |
| 39 | │ │ 🎛️ FORMAT ROUTER │ │ |
| 40 | │ │ ┌─────────────┐ ┌──────────────┐ │ │ |
| 41 | │ │ │ VERTICAL │ │ HORIZONTAL │ │ │ |
| 42 | │ │ │ 9:16 │ │ 16:9 │ │ │ |
| 43 | │ │ │ 1080×1920 │ │ 1920×1080 │ │ │ |
| 44 | │ │ │ TikTok │ │ YouTube │ │ │ |
| 45 | │ │ │ Reels │ │ Facebook │ │ │ |
| 46 | │ │ │ Shorts │ │ │ │ │ |
| 47 | │ │ └─────────────┘ └──────────────┘ │ │ |
| 48 | │ └──────────────────────────────────────────────────────┘ │ |
| 49 | │ │ |
| 50 | │ ┌──────────────────────────────────────────────────────┐ │ |
| 51 | │ │ 🛡️ POLICY COMPLIANCE ENGINE │ │ |
| 52 | │ │ Content scan | AI labeling | Upload throttle | Hash │ │ |
| 53 | │ └──────────────────────────────────────────────────────┘ │ |
| 54 | │ │ |
| 55 | │ ┌──────────────────────────────────────────────────────┐ │ |
| 56 | │ │ 📊 BATCH QUEUE MANAGER │ │ |
| 57 | │ │ queue.json | progress.json | retry logic | cron │ │ |
| 58 | │ └──────────────────────────────────────────────────────┘ │ |
| 59 | └─────────────────────────────────────────────────────────────┘ |
| 60 | ``` |
| 61 | |
| 62 | --- |
| 63 | |
| 64 | ## Quick Start |
| 65 | |
| 66 | ```bash |
| 67 | # 1. Setup Remotion project (one-time) |
| 68 | cd video-factory && npm install |
| 69 | |
| 70 | # 2. Generate single video (interactive) |
| 71 | node scripts/pipeline.js --script scripts-input/video_01.json --format tiktok |
| 72 | |
| 73 | # 3. Batch render (queue-based) |
| 74 | node scripts/batch-runner.js --queue queue.json --batch-size 5 |
| 75 | |
| 76 | # 4. Resume interrupted batch |
| 77 | node scripts/batch-runner.js --queue queue.json --resume |
| 78 | |
| 79 | # 5. Preview in browser (hot reload) |
| 80 | npx remotion studio |
| 81 | ``` |
| 82 | |
| 83 | --- |
| 84 | |
| 85 | ## 7-Phase Execution Pipeline |
| 86 | |
| 87 | ### Phase 1: 🔬 RESEARCH |
| 88 | Scrape documentation, GitHub repos, URLs. Build knowledge base per topic. |
| 89 | Uses `cm-cro-methodology` to identify pain points for maximum hook impact. |
| 90 | |
| 91 | ### Phase 2: ✍️ SCRIPT (JSON) |
| 92 | AI generates strictly-keyed JSON scripts. One JSON = one video. |
| 93 | |
| 94 | ```json |
| 95 | { |
| 96 | "id": "video_042", |
| 97 | "title": "Debug mệt mỏi?", |
| 98 | "hook": "99% Dev tốn thanh xuân để debug vì bỏ qua quy tắc này.", |
| 99 | "hook_formula": "data_shock", |
| 100 | "language": "vi", |
| 101 | "duration_target": 45, |
| 102 | "format": "tiktok", |
| 103 | "scenes": [ |
| 104 | { |
| 105 | "time_start": 0, |
| 106 | "duration": 3.5, |
| 107 | "text": "99% Dev tốn thanh xuân để debug vì...", |
| 108 | "visual": "TerminalCrashView", |
| 109 | "props": { "error": "SIGSEGV", "animation": "glitch" } |
| 110 | }, |
| 111 | { |
| 112 | "time_start": 3.5, |
| 113 | "duration": 5, |
| 114 | "text": "Với Cody Master, lỗi tự phơi bày trong 2 giây.", |
| 115 | "visual": "CodeGlowView", |
| 116 | "props": { "code": "cm-debugging --trace", "highlight": true } |
| 117 | } |
| 118 | ], |
| 119 | "cta": "Click link ở Bio để cài đặt miễn phí.", |
| 120 | "hashtags": ["#vibecoding", "#devtools", "#codymaster"], |
| 121 | "metadata": { |
| 122 | "ai_generated |