ถ้าวันนี้เราสามารถ “ตัดต่อวิดีโอด้วยการพิมพ์คำสั่ง” แทนการนั่งลาก Timeline ทีละคลิป จะเป็นยังไง?
ลองนึกภาพว่าเรามีคลิปพูดหน้ากล้อง 1 ไฟล์ แล้วพิมพ์บอก AI ว่า
ตัดช่วงเงียบออก ทำวิดีโอเป็นแนวตั้ง 9:16 ใส่ซับภาษาไทย ทำข้อความ Hook ตอนเปิดคลิป เพิ่ม Motion Graphic แบบ Minimal และ Export เป็น MP4
จากนั้น Claude Code ก็เข้าไปแก้โปรเจกต์ สร้าง Animation จัด Timeline และให้ HyperFrames Render วิดีโอออกมาให้
นี่คือ Workflow ที่ทำได้จริงด้วย Claude Code + HyperFrames
และจุดที่น่าสนใจคือ เราไม่ได้กำลังใช้ AI Video Generator แบบที่สร้างวิดีโอใหม่ทั้งหมด แต่กำลังใช้ AI เป็นเหมือน Video Editor ที่เขียนโค้ดให้เรา
Claude Code + HyperFrames คืออะไร?
ก่อนเริ่มใช้งาน ต้องเข้าใจบทบาทของเครื่องมือสองตัวนี้ก่อน
Claude Code คือ AI Coding Agent ของ Anthropic ที่ทำงานผ่าน Terminal สามารถอ่านและแก้ไขไฟล์ในโปรเจกต์ รวมถึงรันคำสั่งต่าง ๆ ให้เราได้ผ่านภาษาธรรมชาติ
ส่วน HyperFrames เป็น Open-source framework จาก HeyGen สำหรับสร้างวิดีโอด้วย HTML, CSS, JavaScript, Media และ Animation แล้ว Render ออกมาเป็นวิดีโอ MP4 ได้
พูดง่าย ๆ คือ
Claude Code = คนตัดต่อที่รับคำสั่งจากเรา
HyperFrames = เครื่องมือและระบบ Render วิดีโอ
เบื้องหลัง HyperFrames จะเปิด Composition ผ่าน Browser Engine จับภาพทีละ Frame และใช้ FFmpeg ประกอบกลับเป็นไฟล์วิดีโอ จึงสามารถสร้าง Animation ที่ Render ซ้ำได้แบบค่อนข้างแน่นอน ต่างจากการอัดหน้าจอ Animation แบบ Real-time
แล้วมันทำอะไรกับวิดีโอได้บ้าง?
Workflow แบบนี้เหมาะมากกับงานประเภท
- Talking Head / คลิปพูดหน้ากล้อง
- TikTok, Reels และ YouTube Shorts
- Product Demo
- Motion Graphics
- Intro / Outro
- Animated Infographic
- Subtitle และ Karaoke Caption
- Lower Third
- Video จากหน้าเว็บไซต์
- วิดีโอที่ต้องสร้างหลายเวอร์ชันจาก Template เดียวกัน
HyperFrames ยังรองรับเทคนิคอย่าง GSAP, Lottie, Three.js, Footage compositing, Captions และ Sound Effect ได้ด้วย โดยโปรเจกต์ตัวอย่างของ HyperFrames เองก็ใช้เทคนิคเหล่านี้ร่วมกันจริง
สิ่งที่ทำให้มันน่าสนใจมากคือ เราไม่จำเป็นต้องเขียน Animation ทั้งหมดเอง
เราสามารถ “บรีฟ” Claude Code ได้เลย
Step 1: เตรียมเครื่องก่อนเริ่ม
HyperFrames สำหรับการ Render ในเครื่องต้องมีอย่างน้อย
Node.js 22 ขึ้นไป
และ
FFmpeg
ตามเอกสารปัจจุบันของ HyperFrames
ตรวจสอบ Node.js:
node --version
ควรขึ้นประมาณนี้
v22.x.x
ตรวจสอบ FFmpeg:
ffmpeg -version
สำหรับ macOS สามารถติดตั้ง FFmpeg ผ่าน Homebrew ได้
brew install ffmpeg
Ubuntu / Debian:
sudo apt install ffmpeg
Windows สามารถใช้
winget install ffmpeg
เมื่อติดตั้งแล้วสามารถตรวจ Environment ของ HyperFrames เพิ่มเติมด้วย
npx hyperframes doctor
Step 2: ติดตั้ง Claude Code
ปัจจุบัน Anthropic แนะนำ Native Installer สำหรับ Claude Code มากกว่าการติดตั้งผ่าน npm แบบเดิม
macOS / Linux
curl -fsSL https://claude.ai/install.sh | bash
หรือใช้ Homebrew
brew install --cask claude-code
Windows PowerShell
irm https://claude.ai/install.ps1 | iex
เมื่อติดตั้งเสร็จ ตรวจสอบด้วย
claude --version
จากนั้นเข้าโฟลเดอร์ที่ต้องการทำงานแล้วพิมพ์
claude
ครั้งแรกระบบจะให้ Login บัญชี Claude ก่อน
Step 3: เพิ่ม HyperFrames ให้ Claude Code
ปัจจุบัน HyperFrames มี Plugin สำหรับ Claude Code โดยตรง
เพิ่ม Marketplace ก่อน
claude plugin marketplace add heygen-com/hyperframes
จากนั้นติดตั้ง HyperFrames
claude plugin install hyperframes@hyperframes
เมื่อเรียบร้อย Claude Code จะสามารถเรียกใช้ความสามารถของ HyperFrames ผ่านคำสั่ง
/hyperframes:hyperframes
HyperFrames ยังมีวิธีติดตั้งแบบ Standalone Skills ด้วย
npx skills add heygen-com/hyperframes
ซึ่งเหมาะกับ Coding Agent อื่น เช่น Cursor, Codex หรือ Gemini CLI เช่นกัน
Step 4: สร้างโปรเจกต์วิดีโอ
สมมติเรามีไฟล์
talking-head.mp4
และต้องการเอาคลิปนี้มาตัดเป็น Short Video
เปิด Terminal ในโฟลเดอร์เดียวกับวิดีโอ แล้วรัน
npx hyperframes init my-video --example warm-grain --video ./talking-head.mp4
จากนั้นเข้าโปรเจกต์
cd my-video
HyperFrames รองรับการส่งไฟล์วิดีโอเข้า init ผ่าน --video และสามารถเตรียมข้อมูลสำหรับ transcription/captions ให้กับโปรเจกต์ได้
โครงสร้างคร่าว ๆ จะมีลักษณะประมาณนี้
my-video/
├── index.html
├── meta.json
├── compositions/
└── assets/
ไฟล์ index.html ทำหน้าที่เป็น Composition หลักของวิดีโอ ส่วน assets ใช้เก็บวิดีโอ รูปภาพ เสียง และไฟล์ประกอบต่าง ๆ
Step 5: เปิด Claude Code แล้วเริ่ม “สั่งตัดต่อ”
ภายในโฟลเดอร์ my-video รัน
claude
จากนั้นถึงส่วนสนุกที่สุด
แทนที่จะเปิด Timeline แล้วนั่งตัดเอง เราจะเขียน Brief ให้ Claude
ตัวอย่าง:
Using /hyperframes:hyperframes
Edit the imported talking-head video into a short-form vertical video.
Format:
- 1080x1920
- 9:16
-ประมาณ 45-60 seconds
Editing:
- Remove unnecessary pauses and obvious retakes
- Keep cuts natural
- Keep the speaker's original voice
Captions:
- Add Thai subtitles
- Position captions near the bottom center
- Highlight important keywords
- Use clean white typography
- Make captions easy to read on mobile
Motion graphics:
- Add a strong text hook during the first 3 seconds
- Add minimal motion graphics when important points are mentioned
- Use a modern dark visual style
Ending:
- Add a short fade-out
- Do not render the final version yet
- Open a preview first
ตรงนี้แนะนำให้บอก Claude ให้ชัดว่า ยังไม่ต้อง Render Final
เพราะเราควรดู Preview ก่อน
Step 6: เปิด Preview ดูผลงาน
ใช้คำสั่ง
npx hyperframes preview
HyperFrames จะเปิด Studio ผ่าน Browser และรองรับ Live Reload ดังนั้นเมื่อ Claude แก้ HTML หรือ Animation เราสามารถดูผลลัพธ์ใหม่ได้โดยไม่ต้อง Render MP4 ใหม่ทุกครั้ง
จากนั้นดูวิดีโอรอบแรกก่อน
อย่าเพิ่งคาดหวังว่า Prompt เดียวแล้วทุกอย่างจะ Perfect
หัวใจสำคัญของ Workflow แบบ Agentic Editing คือ
สร้างเวอร์ชันแรก → ดู → Feedback → แก้ → ดูอีกครั้ง
เช่น ถ้าตัวหนังสือใหญ่เกินไป บอก Claude ว่า
Make the captions about 20% smaller.
Keep them inside the mobile-safe area.
ถ้า Animation เยอะเกินไป
Reduce the amount of animation.
Keep motion graphics only for important keywords.
ถ้าช่วงเปิดคลิปยังไม่ดึงดูด
Improve the first 3 seconds.
Start immediately with the strongest sentence from the speaker,
then show a large animated text hook.
Do not add an intro logo before the hook.
HyperFrames เองก็แนะนำให้ Iterate ด้วย Prompt เล็ก ๆ ที่เจาะจง แทนการสั่งแก้งานทั้งหมดใหม่ทุกครั้ง
Step 7: สั่ง Motion Graphic แบบละเอียดขึ้น
ข้อดีของ Workflow นี้คือ เราสามารถใช้ศัพท์งาน Motion Design กับ Claude ได้ตรง ๆ
เช่น
Add a lower third at 00:05.
Animation:
- slide up 20px
- opacity 0 to 100
- duration 0.4 seconds
- ease out
- stay for 3 seconds
- fade out smoothly
หรือ
At the moment where the speaker says "AI Automation",
show the words AI AUTOMATION behind the speaker.
Use oversized typography,
subtle blur,
and slow scale animation.
Keep it minimal.
HyperFrames รองรับ GSAP และระบบ Animation แบบ seekable โดย Timeline จะถูกควบคุมตามเวลาในการ Render ทำให้ Animation สามารถจับ Frame ได้อย่างสม่ำเสมอ
Step 8: ให้ Claude ช่วยตรวจงานก่อน Render
ก่อน Render Final แนะนำให้ตรวจโปรเจกต์ด้วย
npx hyperframes lint
และ
npx hyperframes check
lint ใช้ตรวจโครงสร้างของ Composition ส่วน check จะเปิดโปรเจกต์ใน Browser เพื่อตรวจปัญหาเกี่ยวกับ Runtime, Layout, Motion, Media และ Contrast ก่อน Render
หรือจะบอก Claude ตรง ๆ ก็ได้
Run HyperFrames lint and check.
Fix any errors you find,
but do not make major visual changes without telling me.
Step 9: Render เป็น MP4
เมื่อทุกอย่างพร้อมแล้ว ใช้
npx hyperframes render --output final.mp4
HyperFrames จะจับภาพ Composition ทีละ Frame แล้วใช้ FFmpeg Encode ออกมาเป็นวิดีโอ
ถ้ากำลังทดลองหลายเวอร์ชัน สามารถใช้ Draft Render ก่อนเพื่อลดเวลารอ
npx hyperframes render --quality draft
เมื่อ Render เสร็จ เราก็จะได้ไฟล์
final.mp4
พร้อมนำไปโพสต์หรือส่งต่อเข้า Workflow อื่น
Prompt แจก: เอาไปใช้ตัด Talking Head ได้เลย
ถ้าไม่อยากเริ่มเขียน Prompt เอง ลองใช้ Template นี้ได้
Using /hyperframes:hyperframes
Act as a professional short-form video editor.
Analyze the imported talking-head video and create a vertical social media edit.
OUTPUT
- 1080x1920
- 9:16
- 30 fps
- Target duration: 45-60 seconds
EDITING
- Remove unnecessary pauses
- Remove obvious failed takes and repeated sentences
- Keep cuts natural
- Prioritize the strongest and most useful parts
- Do not change the meaning of what the speaker says
HOOK
- Start with the strongest statement
- The first 3 seconds must immediately communicate the topic
- Add a large animated text hook
CAPTIONS
- Generate Thai captions
- Keep captions near the bottom center
- Maximum 2 lines
- Highlight important keywords
- Use readable mobile-friendly typography
VISUAL STYLE
- Modern
- Minimal
- Dark
- High contrast
- Avoid excessive effects
MOTION GRAPHICS
- Add graphics only when they help explain the content
- Use smooth GSAP animations
- Add lower thirds where appropriate
AUDIO
- Keep dialogue clearly audible
- Avoid music overpowering speech
Before final rendering:
1. Create the first edit
2. Run lint/check
3. Open HyperFrames preview
4. Wait for revision instructions
5. Do not render final.mp4 yet
แค่เปลี่ยน Style, Caption หรือรายละเอียดของคลิป ก็สามารถเอา Prompt เดิมไปใช้ซ้ำได้
Trick: อย่าสั่งให้ AI ทำทุกอย่างพร้อมกัน
หนึ่งในวิธีที่ช่วยให้ Workflow นี้ควบคุมง่ายขึ้นคือแบ่งงานเป็นรอบ
รอบแรก:
Analyze the video and create the basic edit only.
No motion graphics yet.
รอบสอง:
Now add captions.
รอบสาม:
Add motion graphics only to the important moments.
รอบสี่:
Improve pacing and polish the transitions.
วิธีนี้แก้งานง่ายกว่าการสั่ง
“ตัดคลิป ใส่เพลง ทำซับ ทำ Animation ทำ Thumbnail ทำทุกอย่างให้สวย”
ภายใน Prompt เดียว
แล้ว Claude Code + HyperFrames แทน Premiere Pro หรือ CapCut ได้ไหม?
คำตอบคือ ขึ้นอยู่กับประเภทงาน
ถ้าเป็น Short-form Content, Talking Head, Motion Graphic, Product Demo หรืองานที่ต้องทำซ้ำหลายเวอร์ชัน วิธีนี้น่าสนใจมาก เพราะ Video ถูกเก็บอยู่ในรูปแบบโปรเจกต์ที่แก้ด้วย Code ได้
เช่น จาก
เปลี่ยน Subtitle จากสีขาวเป็นสีเหลือง
ไปจนถึง
ลด Scene 3 เหลือ 2.5 วินาที แล้วให้ Scene 4 เข้ามาเร็วขึ้น
เราสามารถสั่งเป็นภาษาได้เลย
แต่ถ้าเป็นงาน Long-form ที่ต้องนั่งเลือก Shot จำนวนมาก งาน Multicam ซับซ้อน Color Grading หนัก ๆ หรือการปรับ Audio แบบละเอียดมาก โปรแกรม NLE อย่าง Premiere Pro หรือ DaVinci Resolve ยังมี Interface ที่เหมาะกับการตัดสินใจแบบ Manual มากกว่า
ดังนั้นสิ่งที่น่าสนใจอาจไม่ใช่คำถามว่า
“AI จะมาแทนโปรแกรมตัดต่อหรือยัง?”
แต่เป็น
“งานส่วนไหนของการตัดต่อที่เราไม่จำเป็นต้องทำด้วยมืออีกแล้ว?”
จุดเปลี่ยนสำคัญคือ “วิดีโอกลายเป็น Code”
สิ่งที่ผมคิดว่าน่าสนใจที่สุดของ HyperFrames ไม่ใช่แค่การพิมพ์ Prompt แล้วได้วิดีโอ
แต่คือแนวคิดที่ว่า
Video สามารถเป็น Software Project ได้
เราสามารถ Version Control ได้
แก้ Animation ด้วย Code ได้
สร้าง Template ได้
เปลี่ยนข้อมูลแล้ว Render วิดีโอใหม่ได้
และให้ AI Coding Agent เข้ามาช่วยแก้โปรเจกต์แทนเราได้
นั่นหมายความว่าในอนาคต Workflow อาจกลายเป็น
Raw Video
↓
Claude วิเคราะห์
↓
สร้าง Timeline
↓
Caption
↓
Motion Graphics
↓
ตรวจงาน
↓
Render MP4
โดยมนุษย์ทำหน้าที่หลักเป็นคนกำหนด Direction และตรวจคุณภาพ มากกว่านั่งทำทุก Click ด้วยตัวเอง
สรุป
ถ้าอยากลอง Workflow ใหม่ในการทำวิดีโอ Claude Code + HyperFrames เป็นหนึ่งในชุดเครื่องมือที่น่าลองมาก
เพราะเราไม่ได้แค่ให้ AI “สร้างวิดีโอ”
แต่กำลังให้ AI เข้ามาช่วยจัดการกระบวนการตัดต่อจริง ๆ ตั้งแต่แก้ Composition ทำ Caption สร้าง Motion Graphic ตรวจโปรเจกต์ ไปจนถึง Render MP4
ขั้นตอนหลักมีเพียง
1. ติดตั้ง Claude Code
2. ติดตั้ง Node.js 22+ และ FFmpeg
3. เพิ่ม HyperFrames
4. Import วิดีโอ
5. เปิด Claude Code
6. Brief งานด้วยภาษาธรรมชาติ
7. Preview และ Feedback
8. Render เป็น MP4
สำหรับคนทำ Content, Developer, Designer หรือสาย Automation นี่เป็น Workflow ที่น่าจับตามองมาก
เพราะวันที่เราจะพูดกับคอมพิวเตอร์ว่า
“ช่วยตัดคลิปนี้ให้หน่อย เพิ่มซับ ทำ Motion ให้ตรง Brand แล้ว Export มาให้ด้วย”
แล้วมันทำงานให้จริง ๆ
ตอนนี้ไม่ได้เป็นแค่ Demo แนวคิดอีกต่อไปแล้ว