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.3.0.tar.gz (12.4 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.3.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ascii_live-0.3.0.tar.gz
  • Upload date:
  • Size: 12.4 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.3.0.tar.gz
Algorithm Hash digest
SHA256 28b1daf77e6e6abc2a9d39b1e01067474be6f830508cc5acee7c60daa78e864d
MD5 df88db614bb04c49a80c7400b951c938
BLAKE2b-256 506c70e1aaddef361b20a41b522c4e9d69e06816360104101fabf1538e2b51cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ascii_live-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65bd17a936bbdbead22737c471693f7fb3c05ad558ffcc4007ea01b998db374c
MD5 a3ce111428c53732b1cc990e26607875
BLAKE2b-256 7fe59ab43edd30d33b97d1007644f77c98a8bb09992154c4aceab7e6bfe296a3

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