npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

asciinema2video

v1.0.2

Published

Convert asciinema .cast files to video (MP4)

Downloads

89

Readme

asciinema2video

Convert asciinema .cast files to video (MP4) using Node.js and Puppeteer.

Features

  • 🎥 Convert .cast files to high-quality MP4 videos
  • 🎨 Support for asciinema player themes
  • ⚡ Adjustable playback speed
  • 📐 Customizable video dimensions
  • 🎬 60 FPS output for smooth playback

Installation

You can run it directly using npx:

npx asciinema2video input.cast -o output.mp4

Or install globally via npm:

npm install -g asciinema2video

Usage

Basic Usage

npm run dev -- input.cast -o output.mp4

Or after building:

node dist/cli.js input.cast -o output.mp4

Or if installed globally:

asciinema2video input.cast -o output.mp4

Options

$ asciinema2video --help
Usage: asciinema2video [options] <input>

Convert asciinema cast file to video

Arguments:
  input                Path to .cast file

Options:
  -o, --output <path>  Output video path (default: "output.mp4")
  --width <number>     Width of the video (default: "800")
  --height <number>    Height of the video (default: "600")
  --theme <string>     Asciinema theme (choices: "asciinema", "dracula", "gruvbox-dark", "monokai", "solarized-dark",
                       "solarized-light", "tango", "nord", default: "asciinema")
  --speed <number>     Playback speed (default: "1")
  --scale <number>     Player scale (default: "2")
  -h, --help           display help for command

Examples:
  $ asciinema2video demo.cast -o demo.mp4
  $ asciinema2video demo.cast --width 1920 --height 1080 --theme dracula

Themes

Available themes include:

  • asciinema (default)
  • dracula
  • monokai
  • solarized-dark
  • solarized-light
  • tango
  • nord

For a full list of supported themes, please refer to the asciinema-player documentation.

Examples

# Basic conversion
asciinema2video demo.cast -o demo.mp4

# Custom dimensions
asciinema2video demo.cast -o demo.mp4 --width 1920 --height 1080

# Faster playback
asciinema2video demo.cast -o demo.mp4 --speed 2

# Different theme
asciinema2video demo.cast -o demo.mp4 --theme monokai

How It Works

  1. Loads the asciinema player in a headless browser (Puppeteer)
  2. Renders the .cast file using the asciinema-player library
  3. Records the browser screen while the terminal recording plays
  4. Outputs the recording as an MP4 video using FFmpeg

Requirements

  • Node.js 20+
  • FFmpeg (bundled via ffmpeg-static)
  • Graphical Environment: Since this tool uses Puppeteer (Chrome) to record he screen, it requires a graphical environment.
    • On Linux servers (headless), you may need to use Xvfb (X virtual framebuffer).
      xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" asciinema2video input.cast

Dependencies

  • puppeteer: Headless browser automation
  • asciinema-player: Official asciinema player
  • puppeteer-screen-recorder: Screen recording for Puppeteer
  • ffmpeg-static: Bundled FFmpeg binary
  • commander: CLI argument parsing

Creating a Sample Cast File

You can create a .cast file using the asciinema CLI:

# Install asciinema
brew install asciinema  # macOS
# or
apt-get install asciinema  # Linux

# Record a session
asciinema rec demo.cast

# Convert to video
asciinema2video demo.cast -o demo.mp4

License

MIT