demo - brightness: 40, font : mda14, scale: 800w
aalib-rs is an instrument for turning images or videos into live ASCII art
aalib-rs lets you display any picture or video as text
the crate is split in two:
-
aalib-engine/, the low-level renderer
takes raw pixel data and turns it into characters using luminance tables, dithering, font metrics, etc -
aalib-player, CLI front-end
reads images or video (via ffmpeg), runs them through the engine, and streams the result to your terminal.
- full control of gamma, brightness, contrast, inversion, noise and thresholds
- multiple VGA/MDA/X fonts with CP437-Unicode or ASCII mappings
- scaling modes: contain, cover, or stretch, live terminal-resize support
- optional dithering: none, error-distribution, or Floyd–Steinberg
every run can look different: swap fonts, tweak gamma, flip the palette, or crank the dithering
- a modern port of 30-year-old C algorithms; proof that good math outlives old code
- a compact engine you can read end-to-end and actually learn from
- easy to hack and adapt for your projects
stream a full video with synced audio in your terminal, example demo command:
.\aalib-player.exe .\b.mp4 --video --fps 60 --scale stretch --font vga9 --bright 40
you need ffmpeg and ffprobe installed for aalib-player to work
if you're on Linux, ensure the required system dependencies for ALSA are installed
debian/ubuntu sudo apt install libasound2-dev pkg-config
arch sudo pacman -S alsa-lib pkgconf
you don't need to do any other kind of setup if you're on Windows:
cargo build --release
or simply get it from the releases
the source code is licensed under the BSD 3-Clause License, see the LICENSE file for details
classic
bad apple demo, brightness: 40, font : mda14, scale: stretch
see the full demo