CodeCast - Code in Videos

A few months ago I had this wild idea: “how hard would it be to code videos of code”. Basically: instead of screen-casting your IDE, build a dedicated tool designed to render code as videos. Allowing for animated highlighting, and all the sort of things that people typically add with AfterEffects and similar video editing software. A quick search uncovered the jCodec project, and I figured that Kotlin is an almost perfect language to define a nice “video DSL” in, so over a weekend I set to work writing a tool that I nicnamed “CodeCast”. This evening, I’m publishing the code to GitHub so that it’s not just living on my machine anymore.

Now, full disclosure: CodeCast is a bodge job. It’s not pretty on the inside, it’s DSL is incomplete, and it’s very limited in what it can do. That out of the way: it works.

There are possibly better toolkits to use, but a pure JVM project makes it easy to find libraries (like jCodec) to do the video encoding and everything else that comes with this sort of project. Kotlin isn’t just great at building DSL’s, it can also be used as a scripting language (via the javax.script API), and while I’m not using that feature yet (the scenes are hard-coded) it’s not a hard feature to add in.

If you like the idea of an extensible tool designed for programming videos about programming, take a quick look and maybe try writing a script of your own. If I have time over the next few months, I’ll see about adding some more features.