PTENES
Module 3.4

🔁 Seedance + HyperFrames/FFmpeg

Three video engines that work together: Seedance 2 generates seamless website background loops; HyperFrames converts HTML to MP4 via headless Chrome; FFmpeg runs behind both as a universal encoding engine.

6
Topics
30
Minutes
Advanced
Level
Video
Category
VIDEO TRIO SEEDANCE · HYPERFRAMES · FFMPEG Seedance 2 structured prompt → 10s loop video site background ① LOOP HyperFrames HTML + GSAP → PNG frames Chrome headless ② HTML→MP4 FFmpeg universal engine H.264 · WAV sync -nostdin (git-bash) 🎬 Final .mp4
1

🧩 What it is / what it does

seedance-loop-prompt

Prompt generator

Builds highly detailed prompts for the Seedance 2 (image-to-video) that produce background videos in perfect loops for websites. Enforces specificity in camera, lighting, timing, text choreography, and loop mechanics.

output: prompt structured in 7 sections
explainer-video (HyperFrames)

Local HTML → MP4

Generates narrated, animated videos and renders them from a topic. Stack: HyperFrames (Chrome headless captures frames) + FFmpeg encodes + Kokoro TTS local. No API key, no cost per render.

output: narrated 16:9 and 9:16 MP4
FFmpeg — core engine

Universal encoding

FFmpeg is the H.264 encoding engine behind nearly every video skill. It extracts frames, assembles MP4, syncs audio WAV, and requires -nostdin in git-bash to avoid silent exit 0.

binary in C:\ffmpeg\bin
Behind the real names
seedance-loop-prompt — a skill that generates a prompt; it doesn’t render video, it calls Seedance 2 (an external platform).
explainer-video — HyperFrames skill; everything runs locally via npx hyperframes render.
HyperFrames — open-source MIT, repo github.com/heygen-com/hyperframes.
Kokoro TTS — pip install kokoro-onnx soundfile, no espeak-ng; it already phonemizes PT-BR.
Key Concepts
🔁
Seamless loop
same frame at the start and end
🌐
HTML → MP4
browser as render engine
⚙️
FFmpeg basics
engine behind everything
🔇
No external API
Local Kokoro TTS
2

🎣 When it triggers

Triggers: seedance-loop-prompt
🎬
Explicit phrases
"loop video", "website background video", "product loop", "endless loop video", "website background video"
🧴
Product + visual concept
The user describes a product or scene for a continuous web page background, mentions Seedance, or asks for a "looping video prompt".
📰
Headlines to bake in
Provide 1-2 text strings to appear choreographed in the background video.
Triggers: video-explicativo (HyperFrames)
📹
Direct video request
"make a video", "explainer video", "video about X", "mini video tutorial", "INEMA video"
📱
Specific format
"video for Shorts/Reels", "ready-to-use narrated video", "9:16", "16:9 YouTube"
🎯
Topic + local render
The user gives a topic and wants a narrated video with a script, voice-over, animation, and INEMA.CLUB CTA all together.
💡
Seedance confidence gate

If the product/subject is present → generates immediately. If not → asks ONE focused question, then generates. Never asks too many questions. Creative decisions the user hasn’t specified are left to the skill.

Key Concepts
🗣️
Phrase trigger
keywords in the description
🎞️
Narrated video
topic → script → render
🌐
Site background
seamless continuous
⚡
Generates instantly
as long as it has a subject
3

🚀 How it improves your pages

✓ DO with these skills
✓Add a <video loop muted autoplay> as a hero background using the Seedance .mp4
✓Create a 16:9 explainer video to embed in a course module with HyperFrames
✓Generate Shorts/Reels in 9:16 from the same HTML project with no rework
✓Kokoro TTS narrated in PT-BR: premium quality with no per-character cost
✓Preserve privacy: everything runs locally; proprietary content never leaves the machine
✗ AVOID / real limitations
✗Use Seedance for long videos (>30s): it's optimized for 5–10s loops
✗Expecting real-time editing: HyperFrames renders frame by frame (slow on slow machines)
✗Forget -nostdin in git-bash: FFmpeg returns exit 0 without generating a file
✗Animate the wrapper .clip: HyperFrames forces opacity:1 — animate only .scene-inner
Combined impact

A landing page with Seedance in the hero + HyperFrames in the course modules = a premium product experience without relying on any paid external video service. FFmpeg is the link that ensures universal compatibility of the generated .mp4.

10s
default Seedance loop duration
30fps
frames captured by Chrome
4K
Seedance if supported
Key Concepts
🏠
Hero background
video autoplay loop muted
🎓
Video in a course
embedded explainer module
🔒
100% local
zero cost per render
📐
Dual format
16:9 and 9:16, same project
4

⚙️ How it works under the hood

Seedance 2 — prompt structure in 7 sections
1
SCENE

Product/subject with precise details about material, color, and shape. Setting. Real visual references (e.g., "Apple product film meets Dyson reveal").

2
CAMERA

Exact position, angle, movement. "Horizontal orbit at 15° elevation, 1 full rotation" — never "camera moves".

3
ACTION ARC

Slow build → peak at 40–60% → satisfying resolution. Every loop has a visual climax.

4
TEXT CHOREOGRAPHY

Headlines baked into the video. Readability is priority #1 — if a visual effect competes with the text, the effect gives way.

5
LIGHTING & ATMOSPHERE

Static lighting throughout the video. No color temperature variation—non-negotiable for loop consistency.

6
LOOP SEAL

Image-to-video with the same image in the first and last frame. The camera returns to its exact starting position. Particles return to their initial state.

7
TECHNICAL

Duration (default 10s), 4K resolution if supported, no watermarks, seamlessly looping.

HyperFrames — 7-step workflow
1SCRIPT.md

6–9 scenes. Narration ≈100s of voiceover. Acronyms expanded for speech ("SKILL.md" → "SKILL dot M D").

2npx hyperframes init

--example blank --non-interactive. Copy design.md (house style) to the root.

3node fetch-fonts.mjs

Downloads .woff2 subset latin → assets/fonts/fonts.css

4Kokoro TTS

Voice pf_dora --speed 0.98. Generate a WAV for each scene. No espeak-ng.

5Chrome headless capture

For each frame: call anim(t), waits for the DOM to stabilize, PNG screenshot at 30fps. Virtual time — no frames dropped.

6FFmpeg encodes

PNGs → H.264. Syncs WAV. ffmpeg -nostdin in git-bash (avoids exit 0 with no output). Path: C:\ffmpeg\bin.

7Final render

--quality draft first, then --quality high. Generate separate 16:9 and 9:16 versions.

⚠️
FFmpeg in git-bash: required flag

No -nostdin, FFmpeg in git-bash silently returns exit 0 without generating any files. Always use: ffmpeg -nostdin [opções]. Also: check npx hyperframes doctor if something fails in the workflow.

Key Concepts
📋
7 fixed sections
every Seedance prompt
🕐
Virtual time
anim(t) — no frame loss
🔊
pf_dora 0.98
Kokoro PT-BR voice
🚨
-nostdin
FFmpeg git-bash required
5

💬 Practical example + ready-to-use prompt

💡
Two distinct use cases

Seedance = visual website background (the user watch in the background). HyperFrames = explainer video about content (the user learn with the video). The prompts below cover each case separately.

Prompt: generate a background loop with Seedance
for Claude Code
Quero um background loop para o hero do meu
site de cursos INEMA.CLUB. Produto: dashboard
de cursos dark premium com partículas de dados
flutuantes. Headlines: "APRENDA COM QUEM FAZ"
e "INEMA.CLUB". Loop de 10 segundos, paleta
purple e ciano, mood: tecnologia artesanal.
The seedance-loop-prompt skill generates the structured prompt in 7 sections (SCENE, CAMERA, ACTION ARC, TEXT CHOREOGRAPHY, LIGHTING, LOOP SEAL, TECHNICAL), ready to paste into Seedance 2 in image-to-video mode.
Prompt: create an explainer video with HyperFrames
for Claude Code
Faça um vídeo explicativo sobre o skill
seedance-loop-prompt do INEMA.CLUB. PT-BR,
dark premium, accent âmbar. Gere 16:9 e 9:16.
Termina com a cena de CTA do INEMA.CLUB.
Assunto: como criar background loops de site
com prompt estruturado para o Seedance 2.
The video-explicativo skill runs: SCRIPT.md script → project init → fonts → Kokoro TTS (pf_dora) → headless Chrome capture → FFmpeg encoding → final MP4 in both formats.
Relevant FFmpeg commands
bash (git-bash / terminal)
# Render HyperFrames 16:9
node build-index.mjs
npx hyperframes render --quality high \
  --output renders/meu-video-16x9.mp4

# Render HyperFrames 9:16
node build-index.mjs --vertical
npx hyperframes render --quality high \
  --output renders/meu-video-9x16.mp4

# FFmpeg direto (com -nostdin obrigatório no git-bash)
ffmpeg -nostdin -framerate 30 \
  -i frames/frame_%04d.png \
  -i audio/narration.wav \
  -c:v libx264 -crf 18 -pix_fmt yuv420p \
  output.mp4

# Verificar instalação
npx hyperframes doctor
Key Concepts
📝
Full prompt
paste directly into Seedance 2
🎬
"make a video"
activates the HyperFrames skill
💻
hyperframes doctor
setup diagnostics
🏁
INEMA.CLUB CTA
standard final scene
6

🧬 Works well with / limitations

✓ Works really well with
✓
animation-designer
Creates CSS/GSAP animations for the page; HyperFrames' headless Chrome can capture these animations and turn them into video scenes.
✓
3d-animation-creator
Generates 3D WebGL/Three.js animations that can be rendered via HyperFrames as explainer video scenes.
✓
canvas-design / web-artifacts-builder
HTML prototypes created with these skills can be converted into videos with HyperFrames to create animated product demos.
✓
formato-curso / printing-press
Course pages created with formato-curso can embed HyperFrames MP4s and use Seedance background loops in the hero.
✗ When NOT to use it / actual limitations
✗
Live-action video
HyperFrames renders HTML/CSS/GSAP. For footage of people or real cameras, use conventional video production platforms.
✗
Seedance for narrative videos
Seedance is a background loop with no narration. For explainer videos with voiceover, use HyperFrames + Kokoro TTS.
✗
Machines without Node 22+ / Chrome / FFmpeg
HyperFrames requires a configured environment. Without these prerequisites, the workflow won't work. Seedance has no local prerequisites.
✗
Renders on CI/CD servers
Chrome headless and local FFmpeg aren't native to CI. Designed for the developer's machine.
🎓
Related course: complete HyperFrames

This module provides a high-level overview of both skills. To master all the details of HyperFrames (setup, scenes, GSAP, Kokoro, debugging, deploy), take the dedicated course:

🔗 inematds.github.io/skill-hyperframes-videos →
Key Concepts
🤝
animation-designer
CSS/GSAP → HF scene
🧊
3d-animation-creator
Three.js → video
📚
HyperFrames course
dedicated github.io
🚫
Not for footage
HTML/CSS render only
Module 3.4 Summary

What you learned

Skills covered
  • ✓ seedance-loop-prompt: highly detailed prompt in 7 sections for Seedance 2
  • ✓ explainer-video (HyperFrames): HTML+GSAP → Chrome headless → FFmpeg → MP4
  • ✓ FFmpeg as the core engine: H.264, WAV sync, -nostdin in git-bash
  • ✓ Kokoro TTS: pf_dora --speed 0.98, PT-BR, without espeak-ng
  • ✓ Loop seal: same frame at the start and end → seamless loop
  • ✓ 16:9 and 9:16 from the same HyperFrames project
  • ✓ Works with animation-designer, 3d-animation-creator, formato-curso
Non-negotiable rules
  • → Seedance: static lighting throughout the video (loop consistency)
  • → HyperFrames: animate .scene-inner, never the .clip
  • → FFmpeg: -nostdin in git-bash is non-negotiable
  • → Text readability is priority #1 in Seedance
Next stop
🔎 Track 4 — Support

Workflow support skills: research, diagnostics, memory, helper agents.