Animator: AI-Driven Whiteboard Video Generation from Text

Animator is a Python-based tool that converts a single text prompt into a narrated whiteboard animation, handling scriptwriting, drawing, and voiceovers.

cpaua3 min4

Animator is an open-source tool that automatically creates narrated whiteboard-style animation videos based on a text prompt. Developed in Python, it manages the entire production pipeline by generating a script, drawing scenes, recording narration, and animating icons to match the spoken text. This automation allows a 4–5 scene video to be produced in approximately one minute.

The AI pipeline from prompt to MP4

The tool uses Gemini to handle the creative and structural phases of production. First, it creates a storyboard consisting of beats, where each beat pairs one sentence with one icon. Gemini then draws each scene as a 16:9 whiteboard frame and generates the narration via TTS, using pauses to mark the start and end of each beat.

To synchronize the visuals, Gemini identifies the location of each icon within the image and assigns it to the corresponding beat. The final animation is handled by a local engine on the CPU, which traces outlines from real endpoints, writes text stroke by stroke, and fills shapes with brush strokes. A bundled CRAFT model is used to distinguish text from shapes, meaning no GPU is required for the rendering process.

Running Animator via CLI and Docker

The tool requires Python 3.10+ and FFmpeg. Users can generate a video from a prompt using the following command:

bash
python -m animator --prompt "How do planes fly?" -o plane.mp4

For those preferring containerized environments, the project is Docker-ready. Running the web app and API together can be achieved with:

bash
docker compose up --build

The command line is also accessible within the container:

docker compose run --rm -v "$PWD/outputs:/out" api \n python -m animator --prompt "How do planes fly?" -o /out/plane.mp4

Customizing video output and styles

Users can control the production through various CLI flags. The --scenes N flag sets the exact number of scenes, while --voice NAME changes the Gemini TTS voice, with Kore as the default. Quality settings can be adjusted between low (20fps/500k), medium (24fps/1500k), and high (24fps/3000k). For developers building AI-powered movie creation tools, the project also provides a Python API to render videos using Scene and SnippetRegionPlan classes.

The visual and narrative style is controlled by plain text files located in the animator/prompts/ directory. storyboard.txt manages the tone and story arc, while image_style.txt defines the art style of the doodle icons and colors. Editing these files allows for style changes without modifying the underlying code.

Working with custom images and audio

Animator can function without an API key when using existing assets. It supports creating silent videos of a fixed length from a PNG, or pacing the animation to a specific WAV file. Multiple scenes can be joined in order by passing several images and audio files.

To ensure the best results, the tool requires images to be ink on white, such as clean marker drawings with flat colors. Photos, gradients, and dark backgrounds are not suitable for the animation engine. Users can manually control the drawing order by passing a region plan via --regions plan.json or let the AI determine the order using --detect-regions.

This project is a heavily extended fork of the whiteboard-animator repository by Masih Sultani, adding the AI-driven pipeline to the original animation engine. For those interested in other AI tools on GitHub, this repository demonstrates a full integration of LLM-based storyboarding and local rendering.

Sources

ashishjamarkattel/Animatorgithub.com/ashishjamarkattel/Animator
Share

Author

cpaua

VibeCode blog admin. Writing about vibe coding, AI and open source.

Related news

Comments

To leave a comment, log in
Loading...

Weekly digest

The best of vibe coding, AI agents and open source — once a week, no spam.