Generating Videos with Code: 3 Hands-On Tests of AI Agent Video Workflow
The author tests using an AI agent (Doubao Work) to generate videos by writing HTML/JS code for three scenarios — cocktail animation, product demo, and game asset — noting the need to explicitly request MP4 export and code-based generation, and finds the approach accessible for developers lacking video skills.
The author explores using an AI agent in Doubao Work to create videos by generating code (HTML/JavaScript) that orchestrates graphics, text, camera movements, and audio, then exporting to MP4. This code-based approach differs from video generation models like Seedance that produce pixels directly; the code output allows later edits to copy, colors, or pacing.
Case 1: Cocktail Making Animation
Prompt: "Create a recipe motion graphics animation in JavaScript/HTML showing the full process from empty glass to finished cocktail, explainer-video style, with ingredient names and amounts appearing as they are added. Duration: 30 seconds."
Execution took about 23 minutes. The initial output was pure HTML — no playable video file — so the author added a follow-up prompt to export MP4. Lesson: explicitly include "export MP4" in the prompt.
Case 2: OpenWrite Product Introduction
With a more detailed prompt describing the product, target audience, and stage-by-stage requirements, the agent first produced a storyboard, then generated graphics and animations. Execution again took 20+ minutes. The final video accurately reflected product details from the official website, with well-matched animations and sound effects.
Case 3: Game Animation Asset (Treasure Chest Opening)
Prompt specified duration, resolution, format, and a second-by-second breakdown (0-3s, 3-5s, etc.). The agent again started with storyboard design, then built the animation. Result was high-quality and matched the spec.
Key Takeaways
This code-based video workflow is developer-friendly: describe the process, product, or effect, let the agent produce a first version, then iterate.
Applicable scenarios: educational animations, product promo videos, game reward effects.
Critical prompt requirements: explicitly request "code-based implementation" (otherwise the system may call a pixel-video model like Seedance) and "export MP4".
Doubao Work currently offers a limited-time free trial for new users (30-day membership) and daily sign-in credits.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
