Warning
Work In Progress
This project is still under active development. The implementation is currently unoptimized and may contain bugs, inefficiencies, and incomplete features. Performance improvements and additional functionality are planned for future releases. See the Future Improvements section for the planned work.
Convert images and videos into ASCII-art representations using Rust and FFmpeg.
ascii_video_compressed.mp4
This project converts images and videos into ASCII art by mapping pixel brightness values to text characters of varying visual density.
For videos, the workflow consists of:
- Extracting video frames.
- Converting each frame into ASCII art.
- Rendering the ASCII representation back into image frames.
- Combining the generated frames into a final video.
Run directly (no clone needed):
nix run github:devnchill/AsciifyBuild locally:
git clone https://github.com/devnchill/Asciify
cd Asciify
nix buildRequires Rust and ffmpeg on your system.
git clone https://github.com/devnchill/Asciify
cd Asciify
cargo run --releaseCheck the open issues if you'd like to help out.
Nix users: simply run nix develop to get a shell with all dependencies (Rust toolchain + ffmpeg).
- Faster frame processing
- Parallel frame generation
- Colored ASCII output
- Custom character ramps
- Adjustable output resolution
- Audio preservation
- Better font rendering
- Reduced memory usage
The input video is decomposed into individual frames using FFmpeg.
Input Video
│
▼
Frame 000001.png
Frame 000002.png
Frame 000003.png
...
Each frame is stored as a PNG image for processing.
For every frame:
- The image is loaded into memory.
- The image is resized to the target ASCII dimensions.
- Pixel brightness values are calculated.
Conceptually:
Dark Pixel ─────► Dense Character
Bright Pixel ───► Sparse Character
Each brightness value is mapped to a character from a predefined density ramp.
Example:
@%#*+=-:.
Darker pixels become:
@
#
%
Brighter pixels become:
.
:
-
This creates the illusion of shading using only characters.
After mapping, each frame becomes a text-based representation.
Example:
@@@@@@@@@@@@@@
@@@@@@##***++=
@@@##*++==--::
###*++==-::...
The ASCII output is then rendered back into an image frame.
This step allows standard video encoders to process the output.
Once all ASCII frames have been generated, FFmpeg combines them into a video.
ASCII Frames
│
▼
FFmpeg Encoding
│
▼
ASCII Video (.mp4)
The final result preserves the original motion while displaying every frame as ASCII art.
Input Video
│
▼
Frame Extraction
│
▼
PNG Frames
│
▼
ASCII Conversion
│
▼
ASCII Frames
│
▼
Video Encoding
│
▼
ASCII Video
- Rust
- FFmpeg