{"id":22158705,"url":"https://github.com/dhobsd/castty","last_synced_at":"2025-09-21T16:31:18.614Z","repository":{"id":44165194,"uuid":"84496784","full_name":"dhobsd/castty","owner":"dhobsd","description":"A CLI tool to record audio-enabled screencasts of your terminal, for the web.","archived":false,"fork":false,"pushed_at":"2020-11-10T14:13:30.000Z","size":216,"stargazers_count":118,"open_issues_count":10,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-29T08:11:49.783Z","etag":null,"topics":["asciicast","audio-recording","cli","recorder","recording","screencast","screencast-recording","terminal","terminal-recording","tty"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhobsd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-09T23:01:57.000Z","updated_at":"2024-12-28T02:10:34.000Z","dependencies_parsed_at":"2022-07-30T11:08:03.696Z","dependency_job_id":null,"html_url":"https://github.com/dhobsd/castty","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhobsd%2Fcastty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhobsd%2Fcastty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhobsd%2Fcastty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhobsd%2Fcastty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhobsd","download_url":"https://codeload.github.com/dhobsd/castty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233770283,"owners_count":18727552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asciicast","audio-recording","cli","recorder","recording","screencast","screencast-recording","terminal","terminal-recording","tty"],"created_at":"2024-12-02T03:35:44.273Z","updated_at":"2025-09-21T16:31:13.319Z","avatar_url":"https://github.com/dhobsd.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CasTTY\n\nCasTTY is a program similar to [ttyrec](http://0xcc.net/ttyrec/) and\n[asciinema](https://github.com/asciinema/asciinema) that makes it easy to\ncreate audio-enabled, terminal-based screencasts for publication on webpages.\nIt was originally a fork of `ttyrec`, but has since effectively been\nrewritten from scratch.\n\nThere may be bugs. Feel free to contribute patches or file an issue!\n\n[You probably want to see what you get after you use this.](https://9vx.org/~dho/term/index.html)\n\n## Compatibility\n\nI've tested CasTTY on macOS Sierra and Linux. It should work on other systems,\nbut if not, please feel free to send a patch. It probably can't record if you\ndon't have a microphone, unless you have some weird audio mixing setup.\n\n## Building\n\n### Dependencies \n\nIt depends on [libsoundio](http://libsound.io/). Ubuntu 16.04 seems to ship a\nbroken version of `libsoundio` that depends on a version of JACK that doesn't\nwork. This is fixed in the [libsoundio repo](https://github.com/andrewrk/libsoundio),\nbut you will have to build it yourself.\n\nCasTTY also depends on [LAME](http://lame.sourceforge.net/) (and in particular,\nlibmp3lame) for on-the-fly MP3 encoding. It is possible to compile without LAME\n(and therefore without mp3 support) by modifying `config.mk` to contain \n`WITH_LAME = no`.\n\nThere are no UI build dependencies because I find that idea a little silly.\n\n### Make\n\nTo build, simply run `make` once dependencies have been installed. If they were\ninstalled to a location other than `/usr/local/`, you will have to edit the\n`Makefile`. \n\n## Usage\n\n    usage: castty record [-acdelrt] [out.json]\n     -a \u003coutfile\u003e   Output audio to \u003coutfile\u003e. Must be specified with -d.\n     -c \u003ccols\u003e      Use \u003ccols\u003e columns in the recorded shell session.\n     -D \u003coutfile\u003e   Send debugging information into \u003coutfile\u003e\n     -d \u003cdevice\u003e    Use audio device \u003cdevice\u003e for input.\n     -e \u003ccmd\u003e       Execute \u003ccmd\u003e from the recorded shell session.\n     -l             List available audio input devices and exit.\n     -m             Encode audio to mp3 before writing.\n     -r \u003crows\u003e      Use \u003crows\u003e rows in the recorded shell session.\n     -R             Use a raw sound device.\n     -t \u003ctitle\u003e     Title of the cast.\n    \n     [out.json]     Optional output filename of recorded events. If not specified,\n                    a file \"events.json\" will be created.\n\nTo list usable input devices for recording, just run `castty record -l`. Output will\nlook something like this:\n\n    Available input devices:\n       0: Built-in Microphone 44100Hz\n          castty -d 'AppleHDAEngineInput:1B,0,1,0:1' -a audio.raw\n\nThe `-d 'AppleHDAEngineInput:1B,0,1,0:1'` argument can be pasted directly to\nCasTTY to choose that device for recording. The audio format and sample rate\nCasTTY will use is also provided.\n\nCasTTY supports MP3 output by default, but other encodings may be desirable.\nWithout the `-m` flag, CasTTY outputs interleaved PCM audio. (CasTTY upgrades\nmono audio to stereo.)\n\nUtilities like [sox](http://sox.sourceforge.net/) may be used to convert the\naudio into more useful formats for web publication.\n\n    % sox -D -r 44100 -e signed -b 16 -c 2 -L audio.raw audio.wav\n\nBy default, CasTTY does _not_ record audio and sends its terminal event output\nto a file called `events.js`.\n\n### Runtime Commands\n\nCasTTY contains a runtime command interface. Commands are entered with the\nsequence `^a` (`C-a`, `Control-a`), followed by the command character.\nCurrently supported commands are:\n\n * `^a`: Send a literal `^a` to the recorded session.\n * `a`: Send a literal `^a` to the recorded session.\n * `m`: Mute or unmute the recording. Recording will continue, but without any\n   audio until unmuted.\n * `p`: Pause or unpause the recording. Neither terminal nor audio will be\n   recorded during the paused period. When unpausing, CasTTY requests the\n   screen to be redrawn. This may cause your terminal buffer to clear.\n\n### Miscellaneous\n\nCasTTY does support window resizing. However, because the size of the player\nis automatically calculated based on the size of the original window, the\nrecorded window size can only ever be as large or smaller than the original\nwindow size.\n\nCasTTY supports UTF-8 input.\n\nCasTTY outputs in\n[asciicast v1](https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md)\nformat. Its output files should be compatible with the asciinema player\n(though that player does not support audio).\n\n## Web Interface\n\nThe `ui` directory of the repository is a self-contained implementation of a\nCasTTY player. Utilities used include:\n\n * [jQuery](https://jquery.com/)\n * [rangeslider.js](https://github.com/andreruffert/rangeslider.js)\n * [xterm.js](https://github.com/sourcelair/xterm.js)\n\nLicenses for all these utilities can be found in their respective repositories\nand in the LICENSE file in this repository.\n\nTo create a cast, simply modify `ui/index.html` to point to the correct audio\nfile and `events.js` output from `castty`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhobsd%2Fcastty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhobsd%2Fcastty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhobsd%2Fcastty/lists"}