Skip to content

Code Video Generator

Code Video Generator is a library for Manim that makes creating decent looking code-related animation videos easy. With a few comments in your target source files and a bit of Python, you can generate a code walk through video with animations, code formatting, automatic callouts, and even synchronized sound. Beyond just code, you can also animate diagrams such as sequence or architecture diagrams.


  • Automatic callout-style walkthroughs - Turn your existing code comments into an animated, colorful walkthrough
  • Synchronized music - Add not just music, but music that is automatically synchronized to walkthrough steps
  • Animated diagrams - Visualize higher level structures and processes through diagrams like sequence diagrams
  • Completely free - Apache v2 license


If you have docker available (Windows, Mac, or Linux), the easiest way to try Code Video Generator is via the script:

  1. Download the script and make it executable:

    wget && chmod 755
  2. Create a simple scene to show a file, say

    from code_video import CodeScene
    class MyScene(CodeScene):
        def construct(self):
            # This does the actual code display and animation
            # Wait 5 seconds before finishing
  3. Render the video in low quality (faster) and with an automatic preview:

    ./ -ql
  4. View the video at media/videos/simple/480p15/MyScene.mp4

It should look something like this:

For other ways to install, see the Install page.

Get involved

If you'd like to contribute, feel free to fork or better yet, submit improvements as pull requests or report issues at sleuth-io/code-video-generator.