Skip to main content

A Python library for rendering code videos

Project description

logo

A Python library for rendering dynamic code videos based on Manim

CodeVideoRenderer is a Python animation library specifically designed for creating dynamic code demonstration videos. It transforms static code into lively animations that simulate real programming processes.

✨ Core Features

  • 🎬 Professional animation effects: Based on Manim engine, providing high-quality animation rendering
  • 📝 Multi-language support: Syntax highlighting for various programming languages including Python, JavaScript, Java, and more
  • ⚙️ Highly customizable: Adjustable typing speed, line spacing, camera behavior, and other parameters
  • 🎨 Rich styling: Multiple code highlighting styles (such as github-dark, monokai, etc.)
  • 🔧 Dual renderers: Support for both Cairo and OpenGL rendering backends

🚀 Quick Installation

pip install codevideorenderer

💡 Quick Start

from CodeVideoRenderer import CodeVideoRenderer

# Create renderer instance
video = CodeVideoRenderer(
    code="""
def hello_world():
    print("Hello, World!")
    return True
""",
    language="python",
    style="github-dark"
)

# Render video
video.render("hello_world.mp4")

📋 Main Features

Code Animation

  • Simulate typing process: Display code character by character, line by line
  • Intelligent cursor tracking: Camera automatically follows cursor movement
  • Syntax highlighting support: Integrates Pygments syntax highlighting engine

Camera System

  • Auto-scaling: Automatically adjust camera zoom based on code content
  • Smooth movement: Camera smoothly follows cursor movement
  • Focus management: Intelligently recognizes code structure to ensure important parts remain visible

🎯 Use Cases

  • Educational demonstrations: Create code explanation videos for programming courses
  • Technical presentations: Make code demonstration segments for conference talks
  • Algorithm visualization: Dynamically showcase algorithm implementation processes and logic
  • Code review: Visualize code modifications and refactoring processes

📚 Documentation

Full documentation and examples available at https://exploremaths.github.io/CodeVideoRenderer/.

🤝 Contact Us

Found any issues? Please send them to my email. We'll fix them as soon as possible.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codevideorenderer-1.2.2.tar.gz (7.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codevideorenderer-1.2.2-py3-none-any.whl (7.3 MB view details)

Uploaded Python 3

File details

Details for the file codevideorenderer-1.2.2.tar.gz.

File metadata

  • Download URL: codevideorenderer-1.2.2.tar.gz
  • Upload date:
  • Size: 7.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for codevideorenderer-1.2.2.tar.gz
Algorithm Hash digest
SHA256 9e94c26ca764db91c3f8d5d1f0c8bef65be8c603e1a092645a313c4394166299
MD5 073137599a555eb9c4e3105da274a143
BLAKE2b-256 a2099efa3d4f1e80e1a2fd35beb9511788044f2621226d5db09fce1cda156614

See more details on using hashes here.

File details

Details for the file codevideorenderer-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for codevideorenderer-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3e4bf953f344a0c51403d414db0419858b1bac0129af584a15580cbfa590c2ed
MD5 69e3f5e448d134b77a93530aba41151a
BLAKE2b-256 1b2369b4dc36987bc0567343393e3e4293d0efa0c6feb524365232fcd502ceaa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page