Skip to main content

A powerful Python package to convert images and videos to highly customizable ASCII art.

Project description

auto-ascii

A powerful, flexible, and easy-to-use Python package that converts images and videos into customizable ASCII art!

✨ Features

  • Images and Videos: Convert static images or entire videos to ASCII art.
  • Terminal Playback: Watch videos in real-time as an ASCII stream within your terminal.
  • Over 100 Presets: Choose from numerous languages and visual representations. From traditional standard ASCII, block characters, Braille, Japanese, Chinese, Cyrillic, or Emojis.
  • Exporting Options: Dump ASCII directly into .txt, auto-upscale results directly to .png/.jpg, or render an .mp4 video out of ASCII frames.
  • Aspect Ratio & Resolution Keeping: Keep the original picture aspect ratio or output native resolution text mappings up to 4K parity images explicitly.

Installation

Install directly via pip:

pip install auto-ascii

Quick Start

CLI Usage

# Convert an image and output to terminal
auto-ascii test_image.jpg -w 120

# Convert an image using Japanese Kanji and save as a high-res PNG image
auto-ascii input.jpg -c japanese_kanji -o ascii_art.png

# Play a video in the terminal as ASCII blocks with a 30 FPS cap
auto-ascii input.mp4 --video --fps 30 -c blocks

# Render an entire video into an ASCII MP4 output natively
auto-ascii input.mp4 --video -o output_ascii.mp4

Note: You can view all available charsets by running auto-ascii --help.

Python API Usage

Use auto-ascii directly in your Python code:

from auto_ascii import image_to_ascii, video_to_ascii

# Convert image to a raw ASCII string
ascii_art = image_to_ascii("image.jpg", new_width=100, char_set="emoji_faces")
print(ascii_art)

# Playback a video in the terminal (runs synchronously until finished)
video_to_ascii("video.mp4", new_width=80, char_set="braille")

# Output ASCII text back into an image programmatically
from auto_ascii.converter import ascii_to_image_obj
img = ascii_to_image_obj(ascii_art)
img.show()

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

auto_ascii-0.1.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

auto_ascii-0.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file auto_ascii-0.1.0.tar.gz.

File metadata

  • Download URL: auto_ascii-0.1.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for auto_ascii-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8abb32a123b2038e7bb40d3efe1f5adf3392a97537376ec7dc332149ffcbee4f
MD5 cef319f4dd3d30e6c2180bcc06f199dc
BLAKE2b-256 5fb295ad9015c8e129fe73399d89381c3a497b6a45798da4b54479682f9541f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for auto_ascii-0.1.0.tar.gz:

Publisher: publish.yml on PluvioXO/auto-ascii

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file auto_ascii-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: auto_ascii-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for auto_ascii-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e5f1c087cc1051a378fa9c1621d9f85767123d860604df72ebc626b30ff939ef
MD5 5e9f0c1f6f9d1683b284c04b0832423b
BLAKE2b-256 50c55e7a62aac7bdcb92d24fc82eddc86e45f99c209bded1acf78d8e56079351

See more details on using hashes here.

Provenance

The following attestation bundles were made for auto_ascii-0.1.0-py3-none-any.whl:

Publisher: publish.yml on PluvioXO/auto-ascii

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page