Repolode
masihsultani

masihsultani/whiteboard-animator

Command-line tool and Python library that turns a whiteboard-style image into a CPU-rendered hand-drawn reveal MP4, optionally paced to narration.

Stars
242
Forks
27
Open issues
3
Last commit
last month

What is it?

whiteboard-animator takes a finished image with ink on a white background and produces a video of it being drawn by hand. Text is written word by word, outlines are traced, shapes are filled with brush strokes or an angled sweep, and branched line art is drawn one pen path at a time. It runs on CPU with no training or API keys required for rendering, using a bundled ONNX CRAFT text detector to tell text apart from shapes.

The tool installs from PyPI as a `whiteboard-animate` command and also exposes a Python API for rendering scenes, concatenating several scenes into one video, and tuning fade and fill parameters. Output is produced through FFmpeg, which must be on the PATH. Audio can be supplied per scene, and the drawing is then timed to finish within the narration; a JSON region plan can estimate pacing from annotation text, and an optional Gemini-based feature can propose that plan.

The engine works best on clean marker-style drawings with flat colors. Photos, gradients, and textured or colored backgrounds are not supported as input.

Key features

  • 01Writes text word by word and traces outlines automatically.
  • 02Fills shapes with brush strokes or a sweep depending on size.
  • 03Runs on CPU with a bundled text detection model, no GPU or API key needed.
  • 04Times the drawing to match a narration file's duration.
  • 05Concatenates multiple scenes into one MP4 through FFmpeg.
  • 06Provides both a CLI and a Python API with tunable parameters.

Use cases

  • Animating diagrams or whiteboard sketches for lecture or explainer videos.
  • Adding a hand-drawn reveal effect to narrated educational content.
  • Batch-rendering a series of illustrated scenes into one video from the command line.

Quick start

  1. 1

    Install FFmpeg (macOS via Homebrew)

    brew install ffmpeg
  2. 2

    Install the package from PyPI

    pip install whiteboard-animator
  3. 3

    Render a whiteboard image to an MP4 of 8 seconds

    whiteboard-animate sketch.png --duration 8 -o sketch.mp4

Things to know

  • Requires FFmpeg and ffprobe installed separately on your PATH.
  • Works best on white-background, marker-style ink drawings; photos and colored backgrounds will not animate well.
  • Narration pacing is estimated from text, not aligned to speech, so timing can drift from the voice.

Topics

FAQ

What is whiteboard-animator?
Command-line tool and Python library that turns a whiteboard-style image into a CPU-rendered hand-drawn reveal MP4, optionally paced to narration. whiteboard-animator takes a finished image with ink on a white background and produces a video of it being drawn by hand. Text is written word by word, outlines are traced, shapes are filled with brush strokes or an angled sweep, and branched line art is drawn one pen path at a time. It runs on CPU with no training or API keys required for rendering, using a bundled ONNX CRAFT text detector to tell text apart from shapes.
Is whiteboard-animator free to use? What license does it have?
whiteboard-animator is open source under the MIT license. Check the license terms before using it in commercial products.
Is whiteboard-animator still maintained?
Updated within 6 months. The last commit to whiteboard-animator was on Sep 8, 2026.
What can I use whiteboard-animator for?
Animating diagrams or whiteboard sketches for lecture or explainer videos. Adding a hand-drawn reveal effect to narrated educational content. Batch-rendering a series of illustrated scenes into one video from the command line.
How do I install whiteboard-animator?
Install FFmpeg (macOS via Homebrew): brew install ffmpeg Install the package from PyPI: pip install whiteboard-animator Render a whiteboard image to an MP4 of 8 seconds: whiteboard-animate sketch.png --duration 8 -o sketch.mp4
Where can I get whiteboard-animator?
The source code and installation instructions are on GitHub: https://github.com/masihsultani/whiteboard-animator

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects