Video creation and manipulation in Clojure
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src add cljunit testing Nov 8, 2015
.gitignore ignore out.mp4 Nov 8, 2015
.travis.yml add travis config Nov 8, 2015
LICENSE Initial commit Sep 28, 2015
README.md Add jcodec info Nov 8, 2015
pom.xml Update deps Oct 4, 2016

README.md

telegenic

Video creation and manipulation in Clojure

Clojars Project

Currently you can use it to encode H264 video from a sequence of image frames. Not much support for anything else yet.

Note on JCodec usage

Telegenic is a wrapper for the pure-Java JCodec library for video encoding / decoding. You may need to manually install the jcodec-javase dependency into your local maven repository, as this is currently not available on Maven Central. You can download the artifacts here:

http://jcodec.org/

Usage

(use 'telegenic.core)
(use 'mikera.image.core :as img)

(let [;; A green frame
      f1 (img/new-image 100 100)
      _ (img/fill-rect! f1 0 0 100 100 java.awt.Color/GREEN)
      
      ;; A green frame
      f2 (img/new-image 100 100)
      
      ;; A sequence of frames. Frames can be re-used for efficiency.
      frames (concat (repeat 20 f1) (repeat 20 f2) (repeat 20 f1) (repeat 20 f2)))]
  
  ;; finally encode everything into an mp4
  (encode frames {:filename "out.mp4"})