Videly AI 團隊如何打造把網站轉成動態設計產品影片的 AI
How we built an AI that turns any website into a motion-designed product video
Videly AI 團隊分享如何打造把網站網址、截圖與品牌素材轉成動態設計產品影片的系統,影片以 HTML/CSS/JS 程式碼構成,而非由模型生成影格。流程先擷取網站畫面、標誌及品牌色,經必須的分鏡審批後,由影片智能體編寫頁面,再以 headless Chromium 逐格渲染成 MP4。
Most SaaS teams need the same videos over and over: a launch video for Product Hunt, a feature announcement, a 20-second promo for social. Hiring a motion designer for each one is slow and expensive, and most AI video tools either give you an avatar talking head or a stock-footage slideshow.
We wanted something different: paste your website URL, get a real motion-designed product video built from your actual screens, logo and brand colors. That became Videly AI. This post is about how it works under the hood and the bugs that taught us the most.
The pipeline in one picture
URL / screenshots / one sentence
│
▼
1. Site capture (Playwright) → real screens, logo, colors, copy
│
▼
2. Storyboard (required) → scene cards + designed frames, user approves
│
▼
3. Film agent writes CODE → one HTML/CSS/JS film with a GSAP timeline
│
▼
4. Audio plan → AI voice-over, music, SFX placed on the timeline
│
▼
5. Render in headless Chromium → frames → MP4 (16:9, 9:16, 1:1)
The key decision: the video is code, not pixels. The model doesn't generate video frames. It writes a web page whose timeline is the film, and we render that page frame by frame.
Why "video as HTML" instead of a video model
Diffusion video models are amazing at cinematic shots, but terrible at the things a product video lives on:
- Exact text. Your headline has to be spelled right, every frame.
- Your real UI. A product video with an invented dashboard is worse than no video.
- Brand consistency. Same fonts, same colors, same logo, 60 seconds long.
- Editability. "Make the second scene shorter" should be a small diff, not a full re-roll.
HTML/CSS/SVG + a GSAP timeline gives us all four. Text is real text, screens are real screenshots captured from the site, and a change request is just an edit to the code. The renderer is deterministic: same code, same video.
Step 1: capture the real product
We open the site with Playwright and collect screenshots at the right viewport for the target format, the logo, the brand palette, fonts and the key copy. That's the raw material the film is built from, so the video shows your product instead of a generic mockup.
For icons we use the free Iconify sets (logo:BRAND for brand marks), and when a scene genuinely needs a real-world photo (people, places, food) we pull one from Pixabay and cache it in our own storage. We tried a paid icon API first; it cost more and picked worse icons ("speaker" → a podium), so we dropped it.
Step 2: a required storyboard (this saved us real money)
Early on, the model went straight from brief to film. When the user didn't like the direction, we had already paid for a full generation and render, several dollars per video.
So we made a storyboard step mandatory: the model proposes scene cards (duration, on-screen text, narration) plus a designed frame per scene. The user approves, edits or regenerates before the expensive part runs.
Two lessons from building it:
- We first used an image model for the frames. Bad idea. It drew beautiful photographic frames the code engine could never actually produce, and it invented fake brand names in the lettering. Now the frames are designed by the same model as HTML/CSS/SVG and rendered by the same renderer as the final film. The storyboard can only promise what the film can deliver.
- The film has to match the storyboard. The film agent can't call "finish" until a check confirms the approved on-screen texts are in the film and the voice-over covers most of the approved narration.
Step 3: getting different films for different products
LLMs love their favorite aesthetic. Two different products would come back with suspiciously similar "dark editorial" films. Fixes that helped:
- No silent defaults. If the model's visual identity was missing a field, our code used to fill in a default palette. That default quietly became every film's look. Now a missing field triggers a retry instead.
- A deterministic "aesthetic seed." We hash the script and pick 3 mood adjectives from a lexicon of 60 (texture, light, density). Same script → same seed (retries stay stable); different scripts → different pushes.
- A critique pass that punishes generic. A vision critique scores each scene for distinctiveness, and "tasteful but generic" gets sent back for a refinement pass.
Step 4: the voice-over bug our logs couldn't see
A paying customer told us one of their videos had a weird hiss at 0:15. Everything in our logs looked fine.
The cause: we cut voice-over phrases using speech-to-text word timestamps, and STT timestamps run up to ~0.3 s late on fricatives like /s/. A cut placed "in the gap between words" actually landed inside the start of the next word, leaving a tiny chopped burst of hiss.
The fix was to stop trusting the timestamps at the edges: before building the voice track we look at the actual waveform around every cut and snap each edge to real silence. We only trim the end when sound runs on ≥ 0.15 s past the cut (a real word, not a natural breath or release). We also log any stray short bursts in the final voice stem so we catch the next variant of this bug before a customer does.
Lesson: if your pipeline cuts audio by transcript timestamps, check the waveform.
Step 5: rendering
The final film page is rendered in headless Chromium frame by frame, then muxed with the audio into MP4. The same composition renders 16:9, 9:16 (Reels/TikTok/Shorts) or 1:1. A whole video takes roughly 10–11 minutes end to end, most of it the model writing the film.
We also tried a "parallel" engine: a director model that splits the film into scenes, writes them in parallel and assembles them. On paper it should be much faster. In practice, in our real test it took 940 s and $5.95 versus ~661 s and ~$2.50 for the single-agent engine, because the QA pass ended up rewriting most of the scenes to make them fit together. We didn't ship it. Sometimes one agent with full context beats a team of agents with partial context.
What we'd tell anyone building AI video for products
- Generate code, not pixels, whenever correctness matters (text, UI, brand).
- Put a cheap approval step before the expensive step.
- Hunt down your silent defaults. They become your product's look.
- Verify AI timestamps against the real signal.
- Measure the fancy architecture against the boring one before switching.
If you want to try it on your own product, Videly AI is free to start (no card): paste your URL and you get a launch, demo or promo video with voice-over and music.
I'm on the Videly AI team. Happy to answer questions about the pipeline in the comments.
This post was written with AI assistance and is based on our real engineering notes.
來源:DEV Community · dev.to