Giter Site home page Giter Site logo

castty's Introduction

CasTTY is a script for lecture recording and postprocessing. It was written in the duress of 2020. When it breaks, you get to keep both pieces.

WORKFLOW AND EXAMPLES

Workflow

CasTTY includes commands to:

  1. Record individual slides, or parts of slides.
  2. Postprocess recorded files, including:
    • Transcoding,
    • Applying video overlays on a background slide,
    • Concatenating slides/parts,
    • And audio filtering.

Commands are run from the Common Lisp REPL, so it helps to have multiple monitors. Most of the real work is done by FFmpeg.

Working Directory

CasTTY operates relative to a working directory:

(setq castty:*workdir* "/PATH/TO/STORE/MY/VIDEO/FILES")

Record

Record screen and audio quickly with minimal / fast compression.

  • To record audio and video for a slide:

      (castty:record :number '(SLIDE-NUMBER SLIDE-PART) :video t :audio t)
    
  • To record audio and take a screenshot:

      (castty:record :number '(SLIDE-NUMBER SLIDE-PART) :video :screenshot :audio t)
    
  • To take a screenshot and not record audio:

      (castty:record :number '(SLIDE-NUMBER SLIDE-PART) :video :screenshot :audio nil)
    
  • To record audio and no video or screenshot:

      (castty:record :number '(SLIDE-NUMBER SLIDE-PART) :video nil :audio t)
    

To end the recording run the casttykill script; it helps configure a key binding in your window manager to call this script.

Video Overlays

CasTTY can overlay a separate video (and audio) on a captured slide.

  1. Take a screenshot for the overlay background:

     (castty:record :number '(SLIDE-NUMBER SLIDE-PART) :video :background :audio nil)
    
  2. Copy the video overlay into the ./src directory.

The overlay will be constructed during postprocessing.

Postprocess

Postprocessing involves transcoding, overlay construction, concatenation, and audio filtering. The following command will postprocess the recordings:

(castty:post)

You can also postprocess from the shell with the following command, in which case the current directory will be the working directory.

$ castty post

Cleanup

Remove all temporary and output files in the working directory:

(castty:clean)

You can also clean from the shell with the following command, in which case the current directory will be the working directory.

$ castty clean

Transcoding

You can transcode files from the shell with:

$ CASTTY_INPUT=file.mp4 castty transcode

If you want to modify options, you can override the default scene or specific parameters:

$ CASTTY_PARAM_AUDIO_FILTER="highpass=f=100,lowpass=f=10000" \
  CASTTY_INPUT=file.mp4  castty transcode

FILES

Configuration

  • $HOME/.config/castty/scene-alist.lisp: configuration file to set recording and output options. See the ./lisp/scene-alist.lisp in the source tree for an example.

Directories

Directories are relative to the working directory set in castty:*workdir*.

  • ./rec/: Directory containing initial recordings
  • ./src/: Directory containing (lossless) transcoded recordings
  • ./out/: Directory containing output files
  • ./tmp/: Directory for Temporary working files

Temporary Files

  • /var/run/user/$UID/castty.pid: PIDs of currently running recording processes. The casttykill script stops a recording by killing each of these processes.

Output Files

  • ./out/hi-quality.mkv: high-quality video file
  • ./out/compressed.mp4: compressed video file

ENVIRONMENT

  • CASTTY_SCENE: The scene to use when calling from the shell
  • CASTTY_PARAM_FOO: Override scene parameter FOO
  • CASTTY_INPUT: Input file

castty's People

Contributors

ndantam avatar

Stargazers

S Pearman avatar Joel Boehland avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.