Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Want to create an online presentation or screencast, but are frustrated by complicated interfaces or expensive tools? Maybe you're using one that almost does what you need, but that one feature it's missing is a deal-breaker?

Castaway to the rescue! Write your scripts, mix your audio, and render your video, all via a simple-yet-powerful DSL.

Want to re-render your video with a different resolution or frame rate? No problem--just run the script with different parameters.

Is that arrow pointing at the wrong point, or does that animation start at the wrong time? Easy-peasy. Change the position or timing in your script, and rerun it.

Screen-casting just got a whole lot easier.


Castaway depends on a few external tools to do the heavy lifting. You'll need to make sure you have the following tools installed:

  • ImageMagick is used to render video frames and special effects. (Tested with version 6.9.5)
  • Sox is used to edit and mix audio. (Tested with version 14.4.2)
  • FFmpeg is used to combine the frames and audio into a single video file. (Tested with version 3.2.2)

Once you've met those requirements, installing Castaway itself is simple:

$ gem install castaway

And you're good to go!


Watch a four-minute introduction to Castaway--created with Castaway!--on YouTube, here: .

Scripts are written in a DSL in Ruby. You declare scenes and sound clips, and describe what comprises those scenes and sound clips. Here's a simple example:

soundclip :theme, resource('music.wav')

soundtrack do |clip| soundclip(:theme)
  # fade in the theme music
  clip.chain.fade(5, type: :linear)

scene 'Title Screen' do
  start '0:00'
  script 'Hello, and welcome to our new screencast!'

  plan do
    # start with a black screen

    # dissolve-in our title screen
      in(:dissolve, speed: 0.5)

finish '0:10'

This declares a sound track that fades in over five seconds, as well as a single scene that displays a still frame, dissolved in at the 0.5 second mark. The whole finishes at the ten second mark. If this were saved as script.rb, you could generate the video like so:

$ castaway build script.rb

This will generate the frames, mix the audio, and compose the whole together into a video called script.mp4 (it uses the name of the script file as the default for naming the video).

To name it something else:

$ castaway build -o movie.mp4 script.rb

By default, the video will be rendered at 540p (960x540 pixels). Change this with the --resolution parameter:

$ castaway build --resolution 1080p script.rb

You can specify either HD-style resolutions (1080p, 540p, etc.) or WIDTHxHEIGHT resolutions (e.g. 960x540).

Also by default, video will be rendered at NTSC-standard 29.97 frames/second. To change the number of frames per second, use the --fps parameter:

$ castaway build --fps 10 script.rb

This can be useful for previewing a build quickly, before building the final movie.


This is a work in progress, and will probably not do everything you need just yet. Documentation and examples are severely lacking.

But stay tuned!


Castaway was written by Jamis Buck (


Castaway is distributed under the MIT license. (See the MIT-LICENSE file for details).


System for building screencasts and video presentations





No packages published