You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

ascii-camera

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ascii-camera

Real-time webcam to ASCII art converter for terminal

0.1.0
pipPyPI
Maintainers
1

ASCII Camera 📹✨

╔══════════════════════════════════════════╗
║            🎥 ASCII CAMERA 📹            ║
║        Real-time Retro Video Art         ║
╚══════════════════════════════════════════╝

Transform your webcam feed into retro ASCII art in real-time! ASCII Camera brings back the nostalgic charm of text-based graphics while showcasing your creativity in the terminal.

Features

🎥 Real-time conversion: Live webcam feed to ASCII art
🌈 Colorful output: Support for colored ASCII art with ANSI escape codes
High performance: Optimized for smooth real-time rendering
🎛️ Customizable: Multiple ASCII character sets and color schemes
📏 Adaptive resolution: Automatically adjusts to your terminal size
🔧 Easy to use: Simple command-line interface

Installation

pip install ascii-camera

From source

git clone https://github.com/masashimorita/ascii_camera.git
cd ascii_camera
pip install -e .

Usage

Basic usage

ascii-camera

With custom options

# High detail ASCII characters
ascii-camera --charset detailed

# Colored output
ascii-camera --color

# Custom resolution
ascii-camera --width 80 --height 24

# Different FPS
ascii-camera --fps 15

# Retro green terminal theme
ascii-camera --color --theme matrix

Available options

  • --width, -w: Terminal width (default: auto-detect)
  • --height, -h: Terminal height (default: auto-detect)
  • --fps: Frames per second (default: 12)
  • --charset: ASCII character set (simple/detailed/block)
  • --color: Enable colored output
  • --theme: Color theme (matrix/amber/cyan/rainbow)
  • --camera: Camera device index (default: 0)
  • --help: Show help message

ASCII Character Sets

  • Simple: .:-=+*#%@ (10 levels)
  • Detailed: .,'~!;<>+*xvXGM#8@ (16 levels)
  • Block: ░▒▓█ (4 levels, bold look)

Color Themes

  • Matrix: Classic green-on-black terminal
  • Amber: Retro amber terminal
  • Cyan: Cool cyan blue
  • Rainbow: Dynamic color mapping

Requirements

  • Python 3.8+
  • OpenCV (opencv-python)
  • NumPy
  • Colorama (for Windows color support)
  • Webcam/camera device

How it works

  • Capture: Uses OpenCV to grab frames from your webcam
  • Process: Converts each frame to grayscale and resizes to terminal dimensions
  • Map: Maps pixel brightness values to ASCII characters
  • Display: Renders the ASCII frame in your terminal with optional colors
  • Repeat: Continues the process for real-time video

Troubleshooting

Camera not found

# Try different camera indices
ascii-camera --camera 1
ascii-camera --camera 2

Performance issues

# Lower FPS for better performance
ascii-camera --fps 8

# Smaller resolution
ascii-camera --width 60 --height 20

Terminal compatibility

  • Works best with modern terminals that support ANSI escape codes
  • For Windows: Use Windows Terminal, ConEmu, or enable ANSI support

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

Inspiration

Inspired by classic ASCII art and retro terminal aesthetics. Perfect for developers who love the intersection of modern technology and nostalgic computing.

Keywords

ascii

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts