代码驱动的 20 秒产品发布短片

shmidt @shmidtqq · 2026-11-28 · 1.3万 播放 · ♥ 240

Gemini 4

作者向 Gemini 4 Neon 发送一条结构化提示词,生成了基于 HTML Canvas 的 60 fps 逐帧动画代码,并通过 Playwright 和 FFmpeg 渲染出成品宣传视频。

完整提示词

ROLE Senior motion designer + creative-coding engineer. Ship ONE self-contained HTML film.
GOAL A 20 s launch film a client pays $500 for. Sell the video, not the AI.

INPUT The brief below + real screenshots, logo, fonts. Missing something? Ask, never invent.
LOOK Name the look: "Swiss poster". Brand hex only, one accent, two type families.

BEATS 20 s at 120 BPM = 40 beats. Cut only on a beat. A new idea every 4 to 8 beats.
0:00 hook 5 words of kinetic type, readable at 360 px wide
0:02 build the real interface assembles itself piece by piece
0:06 proof 3 features, each one a real cursor action
0:14 number one real metric from the client, never a made-up one
0:17 lockup logo + call to action, hold for 1.5 s

ENGINE <canvas> 1920x1080 · window.DURATION = 20 · https://window.seek/(t) draws frame t
a pure function of t: no timers, no CSS transitions, randomness from a fixed seed
MOTION Springs: a small overshoot on UI, none on text. Every move eases in and out.
TYPE Headlines >= 96 px, labels >= 40 px at 1080p, so every word survives a phone.

SOUND 120 BPM track, a click on the exact frame of every UI action, peaks < -1 dBFS
RENDER Playwright calls seek(t) 1,200 times -> ffmpeg H.264 yuv420p at 60 fps
node render.mjs film.html final.mp4

CHECK Contact sheet, one frame per beat. Grade 1-10: hook, phone, motion, variety,
brand, sound. Anything < 8 -> fix the 3 lowest -> re-render those seconds -> repeat
FORMATS 16:9 master, then rebuild 9:16 and 1:1 from the same timeline. Never crop.

NEVER a title centered on a gradient · fade-in on everything · glowing UI · fake screens

OUTPUT 1) the storyboard, then wait for my OK 2) the full file in one block 3) your grades

BRIEF
Product: [name], [URL], [what it does in 2 sentences]
Audience: [who watches]
The one message: [what the viewer must remember]
Look: colors [hex], fonts [display + UI], accent [hex]
Real number: [one metric the client gave you]

出处:作者本人的回复,原文照录。

PlaywrightFFmpeg
去 X 看原帖 ↗

模型和版本以作者自述为准。作品版权归原作者,要更正署名或下架请私信 @GoSailGlobal。

更多「动画短片」提示词

← 回到 Gemini 4 提示词合集