Skip to main content

Play YouTube videos and local files as ASCII art in your terminal.

Project description

🎬 ASCII Live

Play YouTube videos and local files directly in your terminal as high-fidelity ASCII art.

Experience video playback like never before, rendered in real-time using ANSI escape codes and half-block characters for a surprisingly detailed "pixelated" look.


✨ Features

  • 📺 YouTube Support: Play any YouTube video by simply providing the URL.
  • 📁 Local Files: Play MP4, MKV, AVI, and other local video formats.
  • 🔊 Audio Sync: Real-time synchronization between ASCII video and audio tracks.
  • ⚙️ Highly Flexible:
    • --no-audio: For silent playback.
    • --fps: Override default frame rates.
    • --quality: Choose between performance or detail.
    • --bw: Sleek monochrome mode.
    • --size: Manual resolution overrides.
  • ⌨️ Interactive Controls:
    • [Space] Play/Pause
    • [←] [→] Seek 10s back/forward
    • [Q] Quit

🚀 Installation

Prerequisites

  • Python 3.8+
  • ffmpeg (Required for audio extraction)
    • Windows: choco install ffmpeg or download from ffmpeg.org
    • Linux: sudo apt install ffmpeg
    • macOS: brew install ffmpeg

Install from PyPI

pip install ascii-live

📖 Usage

Play a YouTube Video

ascii-live "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Play a Local File

ascii-live movie.mp4

Options

# Play without audio
ascii-live "URL" --no-audio

# Force a specific resolution
ascii-live "URL" --size 80x40

# Play in Black & White
ascii-live "URL" --bw

# Set a custom FPS
ascii-live "URL" --fps 15

🛠️ How it Works

ASCII Live uses OpenCV to decode video frames, yt-dlp for stream handling, and Pygame for high-performance audio playback. The renderer uses a custom-built ANSI half-block algorithm that packs two vertical "pixels" into a single character cell, effectively doubling the vertical resolution.


📄 License

Licensed under the Apache License 2.0. See the LICENSE file for details.

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

ascii_live-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

ascii_live-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ascii_live-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ascii_live-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7ca13519fed63ec52773e62f33eaf1dd6aedf0c9cd8f11ee2d5593f368e6751
MD5 f3e707e3c5a5db8c0d6451e64abe2d0d
BLAKE2b-256 c28a6d3f0101c35bf7c8d4f8b39229c8e8418f4342d463ce70b56a7aeba2dd90

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ascii_live-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ascii_live-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00f522a72c1a6a39295a9575a8d28ecbd49b9280e925949b882a06f38d123251
MD5 c4b1f05ae6a9cf8bf8cad01164f047ae
BLAKE2b-256 bcf0c0bb6d48c1cfa4cdfbc32d0b42c562771ba758d63265533d2746f0137de5

See more details on using hashes here.

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