Castaway
System for building screencasts and video presentations
Install / Use
/learn @jamis/CastawayREADME
Castaway
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.
Installation
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!
Usage
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 simple example:
soundclip :theme, resource('music.wav')
soundtrack do |clip|
clip.in soundclip(:theme)
# fade in the theme music
clip.chain.fade(5, type: :linear)
end
scene 'Title Screen' do
start '0:00'
script 'Hello, and welcome to our new screencast!'
plan do
# start with a black screen
matte(:black).
exit(1)
# dissolve-in our title screen
still('title.png').
enter(0.5).
in(:dissolve, speed: 0.5)
end
end
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.
Caveats
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!
Author
Castaway was written by Jamis Buck (jamis@jamisbuck.org).
License
Castaway is distributed under the MIT license. (See the MIT-LICENSE file for
details).
Related Skills
qqbot-channel
354.3kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
docs-writer
100.9k`docs-writer` skill instructions As an expert technical writer and editor for the Gemini CLI project, you produce accurate, clear, and consistent documentation. When asked to write, edit, or revie
model-usage
354.3kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
ddd
Guía de Principios DDD para el Proyecto > 📚 Documento Complementario : Este documento define los principios y reglas de DDD. Para ver templates de código, ejemplos detallados y guías paso
