An idea-to-YouTube long-form video engine — built, refined over 4 rounds, and made self-checking.Một cỗ máy biến ý tưởng thành video YouTube dài — được xây và tinh chỉnh qua 4 vòng, và tự kiểm lỗi.
The /twv-longform skill turns a topic into a 16:9 master + 9:16 teaser + thumbnails: authentic footage, animated motion-graphics, voiceover, and a deterministic gate that proves every spoken number is on screen in sync. This explainer captures how it was built, the bugs caught along the way, and exactly what to upgrade next — Remotion, lighting, audio, information.Skill /twv-longform biến một chủ đề thành video ngang 16:9 + teaser dọc 9:16 + thumbnail: footage thật, đồ hoạ chuyển động, lời thuyết minh, và một cổng kiểm tra tự động chứng minh mọi con số được nói ra đều hiện đúng lúc trên màn hình. Bản giải thích này ghi lại cách xây dựng, các lỗi đã bắt được, và chính xác điều gì nên nâng cấp tiếp theo — Remotion, ánh sáng, âm thanh, thông tin.
6-layer thinking chainChuỗi tư duy 6 tầng
"Make a 4-8 min video on an interesting topic — motion, not just stills, with short public-source clips; thumbnail, hook, viral; impressive transitions.""Tạo video 4-8 phút về chủ đề đáng quan tâm — chuyển động, không chỉ ảnh tĩnh, có clip ngắn từ nguồn công khai; thumbnail, hook, viral; hiệu ứng ấn tượng."
How the engine fits togetherCỗ máy ghép lại thế nào
One config file (timeline.json) drives a chain of small scripts. The voiceover timing is the master clock — every shot and every number is positioned as an offset from it, then verified.Một file cấu hình (timeline.json) điều khiển một chuỗi script nhỏ. Thời gian giọng đọc là đồng hồ chủ — mọi cảnh và mọi con số được đặt như độ lệch so với nó, rồi được kiểm chứng.
| Technical termThuật ngữ kỹ thuật | Plain nameTên dễ hiểu | RoleVai trò |
|---|---|---|
narrate.py | Voiceover + timingGiọng đọc + thời gian | Gemini→ElevenLabs TTS; writes vo-full.mp3 and per-paragraph timing (the clock).TTS Gemini→ElevenLabs; tạo vo-full.mp3 và thời gian từng đoạn (đồng hồ). |
timeline.json | The mapBản đồ | Shots + overlays; every number pinned to its spoken phrase with an `at` anchor.Cảnh + overlay; mọi con số được ghim vào câu nói tương ứng bằng anchor `at`. |
fetch-broll.py | Footage curatorNgười tuyển footage | Pexels video search + a poster contact-sheet so you pick authentic Vietnam clips.Tìm video Pexels + bảng poster để chọn clip Việt Nam thật. |
card.html + render-motion.js | Motion-graphics cardsThẻ đồ hoạ động | Editorial cards (Anton type, count-ups) rendered HTML→video via Playwright.Thẻ biên tập (chữ Anton, đếm số) render HTML→video qua Playwright. |
assemble.py | The compositorBộ dựng | Grade + Ken-Burns + deshake + gold logo; xfade chain locked to voice beats; ducked audio; phrase anchors.Chỉnh màu + Ken-Burns + deshake + logo vàng; chuỗi xfade khớp nhịp giọng; nhạc nền tự hạ; anchor theo câu. |
sync-qa.py | The gateCổng kiểm | FAILS if any on-screen number is more than 0.6s out of sync with the voice.BÁO LỖI nếu bất kỳ con số nào lệch hơn 0.6 giây so với giọng đọc. |
make-teaser.py | Vertical cutdownBản cắt dọc | 9:16 teaser with burned captions, ending on the call-to-action.Teaser 9:16 có phụ đề, kết bằng lời kêu gọi hành động. |
Four rounds of refinementBốn vòng tinh chỉnh
Layered decision cardsCác quyết định theo tầng
What to improve next (forward QA)Nên cải thiện gì tiếp theo (QA hướng tới)
Prioritized by impact × effort. The single biggest lever is Remotion for the graphics layer; the fastest win is −14 LUFS audio.Ưu tiên theo tác động × công sức. Đòn bẩy lớn nhất là Remotion cho lớp đồ hoạ; thắng nhanh nhất là chuẩn âm −14 LUFS.
Artifact mapBản đồ tệp tạo ra
| PathĐường dẫn | WhatLà gì | Who reads itAi dùng |
|---|---|---|
~/.claude/skills/twv-longform/SKILL.md | The standardized skill: the IDEA→MAP→SOURCE→BUILD→QA workflow + gatesSkill chuẩn hoá: quy trình IDEA→MAP→SOURCE→BUILD→QA + các cổng | You + future sessionsBạn + các phiên sau |
scripts/twv-automation/longform/assemble.py | Compositor: grade, Ken-Burns, deshake, gold logo, xfade, ducked audio, phrase anchorsBộ dựng: chỉnh màu, Ken-Burns, deshake, logo vàng, xfade, nhạc tự hạ, anchor theo câu | the BUILD stepbước BUILD |
scripts/twv-automation/longform/sync-qa.py | The number↔voice gate (FAILS if any stat is >0.6s out of sync)Cổng số↔giọng (BÁO LỖI nếu số nào lệch >0.6s) | QA before every renderQA trước mỗi render |
scripts/twv-automation/longform/card.html | Editorial motion-graphics templates (title, stat, cost-bars, reg-timeline…)Mẫu đồ hoạ động biên tập (tiêu đề, số liệu, cột chi phí, dòng thời gian quy định…) | render-motion.jsrender-motion.js |
twv-longform/china-plus-one/timeline.json | The map for the first video (China+1 / Vietnam)Bản đồ cho video đầu (China+1 / Việt Nam) | assemble + sync-qaassemble + sync-qa |
twv-longform/china-plus-one/Output/master.mp4 | The finished 4:26 master + a 9:16 teaser + 3 thumbnailsMaster 4:26 hoàn chỉnh + teaser 9:16 + 3 thumbnail | YouTubeYouTube |