- Notifications
You must be signed in to change notification settings - Fork4
System for building screencasts and video presentations
License
jamis/castaway
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Want to create an online presentation or screencast, but are frustrated bycomplicated interfaces or expensive tools? Maybe you're using one thatalmostdoes 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 yourvideo, all via a simple-yet-powerful DSL.
Want to re-render your video with a different resolution or frame rate? Noproblem--just run the script with different parameters.
Is that arrow pointing at the wrong point, or does that animation start at thewrong time? Easy-peasy. Change the position or timing in your script, and rerunit.
Screen-casting just got a whole lot easier.
Castaway depends on a few external tools to do the heavy lifting. You'll need tomake sure you have the following tools installed:
- ImageMagick is usedto render video frames and special effects.(Tested with version 6.9.5)
- Sox is used to edit and mixaudio.(Tested with version 14.4.2)
- FFmpeg is used to combine the frames andaudio 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:https://www.youtube.com/watch?v=F5ShAdLvVIk .
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 simpleexample:
soundclip:theme,resource('music.wav')soundtrackdo |clip|clip.insoundclip(:theme)# fade in the theme musicclip.chain.fade(5,type::linear)endscene'Title Screen'dostart'0:00'script'Hello, and welcome to our new screencast!'plando# start with a black screenmatte(:black).exit(1)# dissolve-in our title screenstill('title.png').enter(0.5).in(:dissolve,speed:0.5)endendfinish'0:10'
This declares a sound track that fades in over five seconds, as well as asingle 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 asscript.rb
,you could generate the video like so:
$ castaway build script.rb
This will generate the frames, mix the audio, and compose the whole togetherinto a video calledscript.mp4
(it uses the name of the script file as thedefault 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 thiswith the--resolution
parameter:
$ castaway build --resolution 1080p script.rb
You can specify either HD-style resolutions (1080p, 540p, etc.) or WIDTHxHEIGHTresolutions (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 finalmovie.
This is a work in progress, and will probably not do everything you need justyet. Documentation and examples are severely lacking.
But stay tuned!
Castaway was written by Jamis Buck (jamis@jamisbuck.org).
Castaway is distributed under the MIT license. (See theMIT-LICENSE
file fordetails).
About
System for building screencasts and video presentations