kantera

by carrotflakes

GitHub Readme.md

Kantera

Video composition and rendering kit for Rust, depends on FFmpeg and cairo.

Kantera supports you create simple videos from few Rust code (or Web-UI).

This is my challenging project.💪😬

Process for make video from Rust code:

  1. Prepare assets (images, videos) on memory if you need.
  2. Build renderer with render trait.
  3. Render it use render_to_mp4 function.

kantera-logo

TODO:

  • Import videos
  • Import images
  • Text rendering with any font
  • Output video with audio
  • Web-UI as GUI
  • Sound composition
  • DSL for building renderer
  • Multi-thread rendering
  • Realtime hosting via WebRTC
  • Documentation...

Concepts

  • Orthogonal APIs

Requirement

You need install them:

  • FFmpeg
  • cairo

Usage

Example of video generating

$ cargo run --release --example demo

After a while, a video named out.mp4 will be output to current directory.

Web UI

$ cd kantera-web-ui/front
$ yarn install
$ yarn build
$ cd ..
$ cargo run --release

Then open localhost:8080 in your web browser.

e.g. https://twitter.com/carrotflakes/status/1213135191125872642

Web UI (heroku)

Deploy

Author

Copyright

Copyright (c) 2020 carrotflakes (carrotflakes@gmail.com)

License

Licensed under the MIT License.