ASCII Colorizer is a Python-based command-line tool for converting images and videos into colorful ASCII art, rendered directly in your terminal using ANSI escape sequences. It supports both CPU and GPU processing and runs on Linux, macOS, and Windows.
This tool is built for developers, system tweakers, terminal hobbyists, or anyone who wants to animate or visualize media in a unique, resourceful way without leaving the terminal.
Key Features
- Image & Video Input: Supports JPG, PNG, GIF, MP4, AVI, WebM, and more
- TrueColor & 256-Color Support: Works with modern terminals
- GPU Acceleration (Optional): Leverage CUDA with PyTorch for performance
- Adaptive Optimization: Frame skipping and detail control for smooth playback
- CLI First: Fully scriptable and configurable through the command line
- Cross-Platform: Runs on Python 3.12+ across all major operating systems
Getting Started
git clone https://github.com/Cod-e-Codes/ascii-colorizer.git
cd ascii-colorizer
pip install -r requirements.txt
pip install -e .
Optional GPU support (requires NVIDIA CUDA):
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
Example Usage
Convert an Image
ascii-colorizer --file image.png --width 100
Play a Video as ASCII Animation
ascii-colorizer --file clip.mp4 --fps 15
Use GPU Acceleration
ascii-colorizer --file clip.mp4 --gpu
Save Output to File
ascii-colorizer --file image.jpg --save ascii_output.txt
Performance Tuning
You can improve rendering speed and quality by adjusting playback parameters or enabling GPU mode:
ascii-colorizer --file video.mp4 --fast --adaptive
ascii-colorizer --file video.mp4 --gpu --gpu-batch-size 8
Need to benchmark your system?
ascii-colorizer --file image.jpg --gpu --benchmark
When to Use This
- Display system logos and short videos in your terminal
- Create media-rich terminal dashboards or ambient art
- Animate media while running tools like
neofetch
orhtop
- Generate colorful ASCII output for fun or live demos
- Turn large displays or LED matrices into live ASCII screens
Requirements
- Python 3.12+
- A terminal with ANSI TrueColor support
- Optional: CUDA-compatible GPU (for acceleration)
Try It
This project is actively maintained and open to contributions. If you're interested in terminal graphics, performance benchmarking, or novel input/output interfaces, give ASCII Colorizer a try.
Top comments (0)