Skip to content

A high-performance CLI tool that turns your source code into video clips.

License

Notifications You must be signed in to change notification settings

dmx3377/code-to-vid

code-to-vid (ctv)

Important

code-to-vid is in the BETA stage. Expect bugs and errors. Report any encounters via issues.

code-to-vid is a high-performance CLI tool that turns your source code into video clips. Use it to show your code.

Donate If you found this project cool, please donate so I can make new projects (and maybe buy some stuff lol)
Donate here: https://coindrop.to/dmx

Features

  • Multi-language Support: Highlights syntax for virtually any language (JS, Go, Python, Lua, etc).
  • Cinematic Rendering: Generates 1080p MP4s with smooth fade-in effects (Typewriter mode coming soon).
  • Fast: Uses a Go binary wrapper to handle file I/O and process management.

Installation

  1. Clone the repo
    git clone https://github.com/dmx3377/code-to-vid.git
    cd code-to-vid

Tip

To make it easier, you can use the make command(s) to run code-to-vid

Using Makefile

Setup the tool

make setup

Build

make build

Run

This makes a test render using the example file located in samples/test.js. make run

Cleanup

make cleanup


If you do not want to use Makefile, then:

  1. Install the Python dependencies pip install -r requirements.txt

  2. Run it directly with Go:

go run cmd/ctv/main.go -i samples/test.js -o my_code.mp4

3b. or build the binary:

go build -o ctv cmd/ctv/main.go
./ctv -i main.go

Usage

ctv -i <filename> -o <output_filename>

Flag Description Default
-i Input source code file path (Required)
-o Output video path (.mp4) output.mp4

Documentation

How-to Guide Supported Fonts Please suggest new documentation if you have any!

License

Copyright 2026 dmx3377.

This project is licensed under the Apache 2.0 license, see LICENSE for further details.

About

A high-performance CLI tool that turns your source code into video clips.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks