Skip to content

PolimerCode/Rendar

Repository files navigation

Rendar

This is a little engine that makes maths vidoes. especially for visualisations of my school project's things.

What it does

Rendar makes videos from code. You write C++ code that draws stuff, and it makes a video out of it. It uses FFMPEG to encode the video.

How to install

You need these things:

  • CMake: sudo apt install cmake
  • FFMPEG: sudo apt install ffmpeg libswscale-dev libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libavfilter-dev
  • CUDA (optional, for faster rendering)
  • gnuplot: sudo apt install gnuplot
  • GLM: sudo apt install libglm-dev
  • MicroTeX: https://github.com/NanoMichael/MicroTeX/ (put it next to this folder and then compile it to get MicroTex-master/builds/LaTex or smth like this)
  • RSVG and GLib: sudo apt install librsvg2-dev libglib2.0-dev
  • Cairo: sudo apt install libcairo2-dev
  • LibPNG: sudo apt install libpng-dev

How to use

  1. Make a file in src/Projects/yourproject.cpp
  2. Run: ./go.sh yourproject 640 360

That's it. The video goes in out/yourproject/.

Folders

  • src/ - the code
  • out/ - videos go here
  • media/ - put your audio files here
  • build/ - build files

How it works

The program splits videos into chunks called macroblocks (audio chunks) and microblocks (visual chunks). You tell it how many microblocks each macroblock has, then it renders each one.

Example:

scene.stage_macroblock(FileBlock("myaudio"), 3); // 3 microblocks
scene.render_microblock(); // render 1
scene.render_microblock(); // render 2  
scene.render_microblock(); // render 3

If you mess up the count, it crashes.

Testing

Run with -s to test without making video: ./go.sh yourproject 640 360 -s

This just checks if your code works.

About

a renderer for videos on math foundation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors